blob: b70e3c92bedd8421b8e16b21d0c13f16c8fe6f67 [file] [log] [blame]
Herbert Xuda7f0332008-07-31 17:08:25 +08001/*
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 *
Adrian Hoban69435b92010-11-04 15:02:04 -04009 * 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 *
Herbert Xuda7f0332008-07-31 17:08:25 +080018 * 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
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080027#include <linux/netlink.h>
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080028
Herbert Xuda7f0332008-07-31 17:08:25 +080029#define MAX_DIGEST_SIZE 64
30#define MAX_TAP 8
31
Horia Geanta29b77e52014-07-23 11:59:38 +030032#define MAX_KEYLEN 160
Herbert Xuda7f0332008-07-31 17:08:25 +080033#define MAX_IVLEN 32
34
35struct hash_testvec {
36 /* only used with keyed hash algorithms */
37 char *key;
38 char *plaintext;
39 char *digest;
40 unsigned char tap[MAX_TAP];
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020041 unsigned short psize;
Herbert Xuda7f0332008-07-31 17:08:25 +080042 unsigned char np;
43 unsigned char ksize;
44};
45
LABBE Corentina7eed152015-06-05 11:39:22 +020046/*
47 * cipher_testvec: structure to describe a cipher test
48 * @key: A pointer to a key used by the test
49 * @klen: The length of @key
50 * @iv: A pointer to the IV used by the test
51 * @input: A pointer to data used as input
52 * @ilen The length of data in @input
53 * @result: A pointer to what the test need to produce
54 * @rlen: The length of data in @result
55 * @fail: If set to one, the test need to fail
56 * @wk: Does the test need CRYPTO_TFM_REQ_WEAK_KEY
57 * ( e.g. test needs to fail due to a weak key )
58 * @np: numbers of SG to distribute data in (from 1 to MAX_TAP)
59 * @tap: How to distribute data in @np SGs
60 * @also_non_np: if set to 1, the test will be also done without
61 * splitting data in @np SGs
62 */
63
Herbert Xuda7f0332008-07-31 17:08:25 +080064struct cipher_testvec {
65 char *key;
66 char *iv;
Boris BREZILLON8a826a32015-06-16 11:46:46 +020067 char *iv_out;
Herbert Xuda7f0332008-07-31 17:08:25 +080068 char *input;
69 char *result;
70 unsigned short tap[MAX_TAP];
71 int np;
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030072 unsigned char also_non_np;
David Howells09e21782015-04-28 15:36:36 +010073 bool fail;
Herbert Xuda7f0332008-07-31 17:08:25 +080074 unsigned char wk; /* weak key flag */
75 unsigned char klen;
76 unsigned short ilen;
77 unsigned short rlen;
78};
79
80struct aead_testvec {
81 char *key;
82 char *iv;
83 char *input;
84 char *assoc;
85 char *result;
86 unsigned char tap[MAX_TAP];
87 unsigned char atap[MAX_TAP];
88 int np;
89 int anp;
David Howells09e21782015-04-28 15:36:36 +010090 bool fail;
Jarod Wilsone44a1b42009-05-04 19:22:11 +080091 unsigned char novrfy; /* ccm dec verification failure expected */
Herbert Xuda7f0332008-07-31 17:08:25 +080092 unsigned char wk; /* weak key flag */
93 unsigned char klen;
94 unsigned short ilen;
95 unsigned short alen;
96 unsigned short rlen;
97};
98
Jarod Wilson7647d6c2009-05-04 19:44:50 +080099struct cprng_testvec {
100 char *key;
101 char *dt;
102 char *v;
103 char *result;
104 unsigned char klen;
105 unsigned short dtlen;
106 unsigned short vlen;
107 unsigned short rlen;
108 unsigned short loops;
109};
110
Stephan Mueller3332ee22014-05-31 17:24:38 +0200111struct drbg_testvec {
112 unsigned char *entropy;
113 size_t entropylen;
114 unsigned char *entpra;
115 unsigned char *entprb;
116 size_t entprlen;
117 unsigned char *addtla;
118 unsigned char *addtlb;
119 size_t addtllen;
120 unsigned char *pers;
121 size_t perslen;
122 unsigned char *expected;
123 size_t expectedlen;
124};
125
Tadeusz Struk946cc462015-06-16 10:31:06 -0700126struct akcipher_testvec {
127 unsigned char *key;
128 unsigned char *m;
129 unsigned char *c;
130 unsigned int key_len;
131 unsigned int m_size;
132 unsigned int c_size;
133 bool public_key_vec;
134};
135
Herbert Xuda7f0332008-07-31 17:08:25 +0800136static char zeroed_string[48];
137
138/*
Tadeusz Struk946cc462015-06-16 10:31:06 -0700139 * RSA test vectors. Borrowed from openSSL.
140 */
141#ifdef CONFIG_CRYPTO_FIPS
142#define RSA_TEST_VECTORS 2
143#else
144#define RSA_TEST_VECTORS 4
145#endif
146static struct akcipher_testvec rsa_tv_template[] = {
147 {
148#ifndef CONFIG_CRYPTO_FIPS
149 .key =
Tadeusz Struk22287b02015-10-08 09:26:55 -0700150 "\x30\x81\x9A" /* sequence of 154 bytes */
151 "\x02\x01\x01" /* version - integer of 1 byte */
Tadeusz Struk946cc462015-06-16 10:31:06 -0700152 "\x02\x41" /* modulus - integer of 65 bytes */
153 "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
154 "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
155 "\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93"
156 "\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1"
157 "\xF5"
158 "\x02\x01\x11" /* public key - integer of 1 byte */
159 "\x02\x40" /* private key - integer of 64 bytes */
160 "\x0A\x03\x37\x48\x62\x64\x87\x69\x5F\x5F\x30\xBC\x38\xB9\x8B\x44"
161 "\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64"
162 "\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9"
Tadeusz Struk22287b02015-10-08 09:26:55 -0700163 "\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51"
164 "\x02\x01\x00" /* prime1 - integer of 1 byte */
165 "\x02\x01\x00" /* prime2 - integer of 1 byte */
166 "\x02\x01\x00" /* exponent1 - integer of 1 byte */
167 "\x02\x01\x00" /* exponent2 - integer of 1 byte */
168 "\x02\x01\x00", /* coefficient - integer of 1 byte */
Tadeusz Struk946cc462015-06-16 10:31:06 -0700169 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
170 .c =
171 "\x63\x1c\xcd\x7b\xe1\x7e\xe4\xde\xc9\xa8\x89\xa1\x74\xcb\x3c\x63"
172 "\x7d\x24\xec\x83\xc3\x15\xe4\x7f\x73\x05\x34\xd1\xec\x22\xbb\x8a"
173 "\x5e\x32\x39\x6d\xc1\x1d\x7d\x50\x3b\x9f\x7a\xad\xf0\x2e\x25\x53"
174 "\x9f\x6e\xbd\x4c\x55\x84\x0c\x9b\xcf\x1a\x4b\x51\x1e\x9e\x0c\x06",
Tadeusz Struk22287b02015-10-08 09:26:55 -0700175 .key_len = 157,
Tadeusz Struk946cc462015-06-16 10:31:06 -0700176 .m_size = 8,
177 .c_size = 64,
178 }, {
179 .key =
Tadeusz Struk22287b02015-10-08 09:26:55 -0700180 "\x30\x82\x01\x1D" /* sequence of 285 bytes */
181 "\x02\x01\x01" /* version - integer of 1 byte */
Tadeusz Struk946cc462015-06-16 10:31:06 -0700182 "\x02\x81\x81" /* modulus - integer of 129 bytes */
183 "\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
184 "\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
185 "\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD"
186 "\x48\x76\xED\x52\x0D\x60\xE1\xEC\x46\x19\x71\x9D\x8A\x5B\x8B\x80"
187 "\x7F\xAF\xB8\xE0\xA3\xDF\xC7\x37\x72\x3E\xE6\xB4\xB7\xD9\x3A\x25"
188 "\x84\xEE\x6A\x64\x9D\x06\x09\x53\x74\x88\x34\xB2\x45\x45\x98\x39"
189 "\x4E\xE0\xAA\xB1\x2D\x7B\x61\xA5\x1F\x52\x7A\x9A\x41\xF6\xC1\x68"
190 "\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD"
191 "\xCB"
192 "\x02\x01\x11" /* public key - integer of 1 byte */
193 "\x02\x81\x81" /* private key - integer of 129 bytes */
194 "\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD"
195 "\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41"
196 "\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69"
197 "\xD6\x87\x0D\xA2\xC0\x82\xA9\x39\xE3\x7F\xDC\xB8\x2E\xC9\x3E\xDA"
198 "\xC9\x7F\xF3\xAD\x59\x50\xAC\xCF\xBC\x11\x1C\x76\xF1\xA9\x52\x94"
199 "\x44\xE5\x6A\xAF\x68\xC5\x6C\x09\x2C\xD3\x8D\xC3\xBE\xF5\xD2\x0A"
200 "\x93\x99\x26\xED\x4F\x74\xA1\x3E\xDD\xFB\xE1\xA1\xCE\xCC\x48\x94"
201 "\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3"
Tadeusz Struk22287b02015-10-08 09:26:55 -0700202 "\xC1"
203 "\x02\x01\x00" /* prime1 - integer of 1 byte */
204 "\x02\x01\x00" /* prime2 - integer of 1 byte */
205 "\x02\x01\x00" /* exponent1 - integer of 1 byte */
206 "\x02\x01\x00" /* exponent2 - integer of 1 byte */
207 "\x02\x01\x00", /* coefficient - integer of 1 byte */
208 .key_len = 289,
Tadeusz Struk946cc462015-06-16 10:31:06 -0700209 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
210 .c =
211 "\x74\x1b\x55\xac\x47\xb5\x08\x0a\x6e\x2b\x2d\xf7\x94\xb8\x8a\x95"
212 "\xed\xa3\x6b\xc9\x29\xee\xb2\x2c\x80\xc3\x39\x3b\x8c\x62\x45\x72"
213 "\xc2\x7f\x74\x81\x91\x68\x44\x48\x5a\xdc\xa0\x7e\xa7\x0b\x05\x7f"
214 "\x0e\xa0\x6c\xe5\x8f\x19\x4d\xce\x98\x47\x5f\xbd\x5f\xfe\xe5\x34"
215 "\x59\x89\xaf\xf0\xba\x44\xd7\xf1\x1a\x50\x72\xef\x5e\x4a\xb6\xb7"
216 "\x54\x34\xd1\xc4\x83\x09\xdf\x0f\x91\x5f\x7d\x91\x70\x2f\xd4\x13"
217 "\xcc\x5e\xa4\x6c\xc3\x4d\x28\xef\xda\xaf\xec\x14\x92\xfc\xa3\x75"
218 "\x13\xb4\xc1\xa1\x11\xfc\x40\x2f\x4c\x9d\xdf\x16\x76\x11\x20\x6b",
219 .m_size = 8,
220 .c_size = 128,
221 }, {
222#endif
223 .key =
Tadeusz Struk22287b02015-10-08 09:26:55 -0700224 "\x30\x82\x02\x1F" /* sequence of 543 bytes */
225 "\x02\x01\x01" /* version - integer of 1 byte */
Tadeusz Struk946cc462015-06-16 10:31:06 -0700226 "\x02\x82\x01\x00" /* modulus - integer of 256 bytes */
227 "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
228 "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
229 "\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D"
230 "\x41\xE4\x25\x99\xAC\xFC\xD2\x0F\x02\xD3\xD1\x54\x06\x1A\x51\x77"
231 "\xBD\xB6\xBF\xEA\xA7\x5C\x06\xA9\x5D\x69\x84\x45\xD7\xF5\x05\xBA"
232 "\x47\xF0\x1B\xD7\x2B\x24\xEC\xCB\x9B\x1B\x10\x8D\x81\xA0\xBE\xB1"
233 "\x8C\x33\xE4\x36\xB8\x43\xEB\x19\x2A\x81\x8D\xDE\x81\x0A\x99\x48"
234 "\xB6\xF6\xBC\xCD\x49\x34\x3A\x8F\x26\x94\xE3\x28\x82\x1A\x7C\x8F"
235 "\x59\x9F\x45\xE8\x5D\x1A\x45\x76\x04\x56\x05\xA1\xD0\x1B\x8C\x77"
236 "\x6D\xAF\x53\xFA\x71\xE2\x67\xE0\x9A\xFE\x03\xA9\x85\xD2\xC9\xAA"
237 "\xBA\x2A\xBC\xF4\xA0\x08\xF5\x13\x98\x13\x5D\xF0\xD9\x33\x34\x2A"
238 "\x61\xC3\x89\x55\xF0\xAE\x1A\x9C\x22\xEE\x19\x05\x8D\x32\xFE\xEC"
239 "\x9C\x84\xBA\xB7\xF9\x6C\x3A\x4F\x07\xFC\x45\xEB\x12\xE5\x7B\xFD"
240 "\x55\xE6\x29\x69\xD1\xC2\xE8\xB9\x78\x59\xF6\x79\x10\xC6\x4E\xEB"
241 "\x6A\x5E\xB9\x9A\xC7\xC4\x5B\x63\xDA\xA3\x3F\x5E\x92\x7A\x81\x5E"
242 "\xD6\xB0\xE2\x62\x8F\x74\x26\xC2\x0C\xD3\x9A\x17\x47\xE6\x8E\xAB"
243 "\x02\x03\x01\x00\x01" /* public key - integer of 3 bytes */
244 "\x02\x82\x01\x00" /* private key - integer of 256 bytes */
245 "\x52\x41\xF4\xDA\x7B\xB7\x59\x55\xCA\xD4\x2F\x0F\x3A\xCB\xA4\x0D"
246 "\x93\x6C\xCC\x9D\xC1\xB2\xFB\xFD\xAE\x40\x31\xAC\x69\x52\x21\x92"
247 "\xB3\x27\xDF\xEA\xEE\x2C\x82\xBB\xF7\x40\x32\xD5\x14\xC4\x94\x12"
248 "\xEC\xB8\x1F\xCA\x59\xE3\xC1\x78\xF3\x85\xD8\x47\xA5\xD7\x02\x1A"
249 "\x65\x79\x97\x0D\x24\xF4\xF0\x67\x6E\x75\x2D\xBF\x10\x3D\xA8\x7D"
250 "\xEF\x7F\x60\xE4\xE6\x05\x82\x89\x5D\xDF\xC6\xD2\x6C\x07\x91\x33"
251 "\x98\x42\xF0\x02\x00\x25\x38\xC5\x85\x69\x8A\x7D\x2F\x95\x6C\x43"
252 "\x9A\xB8\x81\xE2\xD0\x07\x35\xAA\x05\x41\xC9\x1E\xAF\xE4\x04\x3B"
253 "\x19\xB8\x73\xA2\xAC\x4B\x1E\x66\x48\xD8\x72\x1F\xAC\xF6\xCB\xBC"
254 "\x90\x09\xCA\xEC\x0C\xDC\xF9\x2C\xD7\xEB\xAE\xA3\xA4\x47\xD7\x33"
255 "\x2F\x8A\xCA\xBC\x5E\xF0\x77\xE4\x97\x98\x97\xC7\x10\x91\x7D\x2A"
256 "\xA6\xFF\x46\x83\x97\xDE\xE9\xE2\x17\x03\x06\x14\xE2\xD7\xB1\x1D"
257 "\x77\xAF\x51\x27\x5B\x5E\x69\xB8\x81\xE6\x11\xC5\x43\x23\x81\x04"
258 "\x62\xFF\xE9\x46\xB8\xD8\x44\xDB\xA5\xCC\x31\x54\x34\xCE\x3E\x82"
259 "\xD6\xBF\x7A\x0B\x64\x21\x6D\x88\x7E\x5B\x45\x12\x1E\x63\x8D\x49"
Tadeusz Struk22287b02015-10-08 09:26:55 -0700260 "\xA7\x1D\xD9\x1E\x06\xCD\xE8\xBA\x2C\x8C\x69\x32\xEA\xBE\x60\x71"
261 "\x02\x01\x00" /* prime1 - integer of 1 byte */
262 "\x02\x01\x00" /* prime2 - integer of 1 byte */
263 "\x02\x01\x00" /* exponent1 - integer of 1 byte */
264 "\x02\x01\x00" /* exponent2 - integer of 1 byte */
265 "\x02\x01\x00", /* coefficient - integer of 1 byte */
266 .key_len = 547,
Tadeusz Struk946cc462015-06-16 10:31:06 -0700267 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
268 .c =
269 "\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe"
270 "\xcf\x49\xbc\x48\xd3\x6c\x8f\x0a\x0e\xc1\x73\xbd\x7b\x55\x79\x36"
271 "\x0e\xa1\x87\x88\xb9\x2c\x90\xa6\x53\x5e\xe9\xef\xc4\xe2\x4d\xdd"
272 "\xf7\xa6\x69\x82\x3f\x56\xa4\x7b\xfb\x62\xe0\xae\xb8\xd3\x04\xb3"
273 "\xac\x5a\x15\x2a\xe3\x19\x9b\x03\x9a\x0b\x41\xda\x64\xec\x0a\x69"
274 "\xfc\xf2\x10\x92\xf3\xc1\xbf\x84\x7f\xfd\x2c\xae\xc8\xb5\xf6\x41"
275 "\x70\xc5\x47\x03\x8a\xf8\xff\x6f\x3f\xd2\x6f\x09\xb4\x22\xf3\x30"
276 "\xbe\xa9\x85\xcb\x9c\x8d\xf9\x8f\xeb\x32\x91\xa2\x25\x84\x8f\xf5"
277 "\xdc\xc7\x06\x9c\x2d\xe5\x11\x2c\x09\x09\x87\x09\xa9\xf6\x33\x73"
278 "\x90\xf1\x60\xf2\x65\xdd\x30\xa5\x66\xce\x62\x7b\xd0\xf8\x2d\x3d"
279 "\x19\x82\x77\xe3\x0a\x5f\x75\x2f\x8e\xb1\xe5\xe8\x91\x35\x1b\x3b"
280 "\x33\xb7\x66\x92\xd1\xf2\x8e\x6f\xe5\x75\x0c\xad\x36\xfb\x4e\xd0"
281 "\x66\x61\xbd\x49\xfe\xf4\x1a\xa2\x2b\x49\xfe\x03\x4c\x74\x47\x8d"
282 "\x9a\x66\xb2\x49\x46\x4d\x77\xea\x33\x4d\x6b\x3c\xb4\x49\x4a\xc6"
283 "\x7d\x3d\xb5\xb9\x56\x41\x15\x67\x0f\x94\x3c\x93\x65\x27\xe0\x21"
284 "\x5d\x59\xc3\x62\xd5\xa6\xda\x38\x26\x22\x5e\x34\x1c\x94\xaf\x98",
285 .m_size = 8,
286 .c_size = 256,
287 }, {
288 .key =
289 "\x30\x82\x01\x09" /* sequence of 265 bytes */
290 "\x02\x82\x01\x00" /* modulus - integer of 256 bytes */
291 "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
292 "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
293 "\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D"
294 "\x41\xE4\x25\x99\xAC\xFC\xD2\x0F\x02\xD3\xD1\x54\x06\x1A\x51\x77"
295 "\xBD\xB6\xBF\xEA\xA7\x5C\x06\xA9\x5D\x69\x84\x45\xD7\xF5\x05\xBA"
296 "\x47\xF0\x1B\xD7\x2B\x24\xEC\xCB\x9B\x1B\x10\x8D\x81\xA0\xBE\xB1"
297 "\x8C\x33\xE4\x36\xB8\x43\xEB\x19\x2A\x81\x8D\xDE\x81\x0A\x99\x48"
298 "\xB6\xF6\xBC\xCD\x49\x34\x3A\x8F\x26\x94\xE3\x28\x82\x1A\x7C\x8F"
299 "\x59\x9F\x45\xE8\x5D\x1A\x45\x76\x04\x56\x05\xA1\xD0\x1B\x8C\x77"
300 "\x6D\xAF\x53\xFA\x71\xE2\x67\xE0\x9A\xFE\x03\xA9\x85\xD2\xC9\xAA"
301 "\xBA\x2A\xBC\xF4\xA0\x08\xF5\x13\x98\x13\x5D\xF0\xD9\x33\x34\x2A"
302 "\x61\xC3\x89\x55\xF0\xAE\x1A\x9C\x22\xEE\x19\x05\x8D\x32\xFE\xEC"
303 "\x9C\x84\xBA\xB7\xF9\x6C\x3A\x4F\x07\xFC\x45\xEB\x12\xE5\x7B\xFD"
304 "\x55\xE6\x29\x69\xD1\xC2\xE8\xB9\x78\x59\xF6\x79\x10\xC6\x4E\xEB"
305 "\x6A\x5E\xB9\x9A\xC7\xC4\x5B\x63\xDA\xA3\x3F\x5E\x92\x7A\x81\x5E"
306 "\xD6\xB0\xE2\x62\x8F\x74\x26\xC2\x0C\xD3\x9A\x17\x47\xE6\x8E\xAB"
307 "\x02\x03\x01\x00\x01", /* public key - integer of 3 bytes */
308 .key_len = 269,
309 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
310 .c =
311 "\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe"
312 "\xcf\x49\xbc\x48\xd3\x6c\x8f\x0a\x0e\xc1\x73\xbd\x7b\x55\x79\x36"
313 "\x0e\xa1\x87\x88\xb9\x2c\x90\xa6\x53\x5e\xe9\xef\xc4\xe2\x4d\xdd"
314 "\xf7\xa6\x69\x82\x3f\x56\xa4\x7b\xfb\x62\xe0\xae\xb8\xd3\x04\xb3"
315 "\xac\x5a\x15\x2a\xe3\x19\x9b\x03\x9a\x0b\x41\xda\x64\xec\x0a\x69"
316 "\xfc\xf2\x10\x92\xf3\xc1\xbf\x84\x7f\xfd\x2c\xae\xc8\xb5\xf6\x41"
317 "\x70\xc5\x47\x03\x8a\xf8\xff\x6f\x3f\xd2\x6f\x09\xb4\x22\xf3\x30"
318 "\xbe\xa9\x85\xcb\x9c\x8d\xf9\x8f\xeb\x32\x91\xa2\x25\x84\x8f\xf5"
319 "\xdc\xc7\x06\x9c\x2d\xe5\x11\x2c\x09\x09\x87\x09\xa9\xf6\x33\x73"
320 "\x90\xf1\x60\xf2\x65\xdd\x30\xa5\x66\xce\x62\x7b\xd0\xf8\x2d\x3d"
321 "\x19\x82\x77\xe3\x0a\x5f\x75\x2f\x8e\xb1\xe5\xe8\x91\x35\x1b\x3b"
322 "\x33\xb7\x66\x92\xd1\xf2\x8e\x6f\xe5\x75\x0c\xad\x36\xfb\x4e\xd0"
323 "\x66\x61\xbd\x49\xfe\xf4\x1a\xa2\x2b\x49\xfe\x03\x4c\x74\x47\x8d"
324 "\x9a\x66\xb2\x49\x46\x4d\x77\xea\x33\x4d\x6b\x3c\xb4\x49\x4a\xc6"
325 "\x7d\x3d\xb5\xb9\x56\x41\x15\x67\x0f\x94\x3c\x93\x65\x27\xe0\x21"
326 "\x5d\x59\xc3\x62\xd5\xa6\xda\x38\x26\x22\x5e\x34\x1c\x94\xaf\x98",
327 .m_size = 8,
328 .c_size = 256,
329 .public_key_vec = true,
330 }
331};
332
333/*
Herbert Xuda7f0332008-07-31 17:08:25 +0800334 * MD4 test vectors from RFC1320
335 */
336#define MD4_TEST_VECTORS 7
337
338static struct hash_testvec md4_tv_template [] = {
339 {
340 .plaintext = "",
341 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
342 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
343 }, {
344 .plaintext = "a",
345 .psize = 1,
346 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
347 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
348 }, {
349 .plaintext = "abc",
350 .psize = 3,
351 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
352 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
353 }, {
354 .plaintext = "message digest",
355 .psize = 14,
356 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
357 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
358 }, {
359 .plaintext = "abcdefghijklmnopqrstuvwxyz",
360 .psize = 26,
361 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
362 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
363 .np = 2,
364 .tap = { 13, 13 },
365 }, {
366 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
367 .psize = 62,
368 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
369 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
370 }, {
371 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
372 "45678901234567890",
373 .psize = 80,
374 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
375 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
376 },
377};
378
raveendra padasalagi79cc6ab2016-06-17 10:30:36 +0530379#define SHA3_224_TEST_VECTORS 3
380static struct hash_testvec sha3_224_tv_template[] = {
381 {
382 .plaintext = "",
383 .digest = "\x6b\x4e\x03\x42\x36\x67\xdb\xb7"
384 "\x3b\x6e\x15\x45\x4f\x0e\xb1\xab"
385 "\xd4\x59\x7f\x9a\x1b\x07\x8e\x3f"
386 "\x5b\x5a\x6b\xc7",
387 }, {
388 .plaintext = "a",
389 .psize = 1,
390 .digest = "\x9e\x86\xff\x69\x55\x7c\xa9\x5f"
391 "\x40\x5f\x08\x12\x69\x68\x5b\x38"
392 "\xe3\xa8\x19\xb3\x09\xee\x94\x2f"
393 "\x48\x2b\x6a\x8b",
394 }, {
395 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl"
396 "jklmklmnlmnomnopnopq",
397 .psize = 56,
398 .digest = "\x8a\x24\x10\x8b\x15\x4a\xda\x21"
399 "\xc9\xfd\x55\x74\x49\x44\x79\xba"
400 "\x5c\x7e\x7a\xb7\x6e\xf2\x64\xea"
401 "\xd0\xfc\xce\x33",
402 },
403};
404
405#define SHA3_256_TEST_VECTORS 3
406static struct hash_testvec sha3_256_tv_template[] = {
407 {
408 .plaintext = "",
409 .digest = "\xa7\xff\xc6\xf8\xbf\x1e\xd7\x66"
410 "\x51\xc1\x47\x56\xa0\x61\xd6\x62"
411 "\xf5\x80\xff\x4d\xe4\x3b\x49\xfa"
412 "\x82\xd8\x0a\x4b\x80\xf8\x43\x4a",
413 }, {
414 .plaintext = "a",
415 .psize = 1,
416 .digest = "\x80\x08\x4b\xf2\xfb\xa0\x24\x75"
417 "\x72\x6f\xeb\x2c\xab\x2d\x82\x15"
418 "\xea\xb1\x4b\xc6\xbd\xd8\xbf\xb2"
419 "\xc8\x15\x12\x57\x03\x2e\xcd\x8b",
420 }, {
421 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl"
422 "jklmklmnlmnomnopnopq",
423 .psize = 56,
424 .digest = "\x41\xc0\xdb\xa2\xa9\xd6\x24\x08"
425 "\x49\x10\x03\x76\xa8\x23\x5e\x2c"
426 "\x82\xe1\xb9\x99\x8a\x99\x9e\x21"
427 "\xdb\x32\xdd\x97\x49\x6d\x33\x76",
428 },
429};
430
431
432#define SHA3_384_TEST_VECTORS 3
433static struct hash_testvec sha3_384_tv_template[] = {
434 {
435 .plaintext = "",
436 .digest = "\x0c\x63\xa7\x5b\x84\x5e\x4f\x7d"
437 "\x01\x10\x7d\x85\x2e\x4c\x24\x85"
438 "\xc5\x1a\x50\xaa\xaa\x94\xfc\x61"
439 "\x99\x5e\x71\xbb\xee\x98\x3a\x2a"
440 "\xc3\x71\x38\x31\x26\x4a\xdb\x47"
441 "\xfb\x6b\xd1\xe0\x58\xd5\xf0\x04",
442 }, {
443 .plaintext = "a",
444 .psize = 1,
445 .digest = "\x18\x15\xf7\x74\xf3\x20\x49\x1b"
446 "\x48\x56\x9e\xfe\xc7\x94\xd2\x49"
447 "\xee\xb5\x9a\xae\x46\xd2\x2b\xf7"
448 "\x7d\xaf\xe2\x5c\x5e\xdc\x28\xd7"
449 "\xea\x44\xf9\x3e\xe1\x23\x4a\xa8"
450 "\x8f\x61\xc9\x19\x12\xa4\xcc\xd9",
451 }, {
452 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl"
453 "jklmklmnlmnomnopnopq",
454 .psize = 56,
455 .digest = "\x99\x1c\x66\x57\x55\xeb\x3a\x4b"
456 "\x6b\xbd\xfb\x75\xc7\x8a\x49\x2e"
457 "\x8c\x56\xa2\x2c\x5c\x4d\x7e\x42"
458 "\x9b\xfd\xbc\x32\xb9\xd4\xad\x5a"
459 "\xa0\x4a\x1f\x07\x6e\x62\xfe\xa1"
460 "\x9e\xef\x51\xac\xd0\x65\x7c\x22",
461 },
462};
463
464
465#define SHA3_512_TEST_VECTORS 3
466static struct hash_testvec sha3_512_tv_template[] = {
467 {
468 .plaintext = "",
469 .digest = "\xa6\x9f\x73\xcc\xa2\x3a\x9a\xc5"
470 "\xc8\xb5\x67\xdc\x18\x5a\x75\x6e"
471 "\x97\xc9\x82\x16\x4f\xe2\x58\x59"
472 "\xe0\xd1\xdc\xc1\x47\x5c\x80\xa6"
473 "\x15\xb2\x12\x3a\xf1\xf5\xf9\x4c"
474 "\x11\xe3\xe9\x40\x2c\x3a\xc5\x58"
475 "\xf5\x00\x19\x9d\x95\xb6\xd3\xe3"
476 "\x01\x75\x85\x86\x28\x1d\xcd\x26",
477 }, {
478 .plaintext = "a",
479 .psize = 1,
480 .digest = "\x69\x7f\x2d\x85\x61\x72\xcb\x83"
481 "\x09\xd6\xb8\xb9\x7d\xac\x4d\xe3"
482 "\x44\xb5\x49\xd4\xde\xe6\x1e\xdf"
483 "\xb4\x96\x2d\x86\x98\xb7\xfa\x80"
484 "\x3f\x4f\x93\xff\x24\x39\x35\x86"
485 "\xe2\x8b\x5b\x95\x7a\xc3\xd1\xd3"
486 "\x69\x42\x0c\xe5\x33\x32\x71\x2f"
487 "\x99\x7b\xd3\x36\xd0\x9a\xb0\x2a",
488 }, {
489 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl"
490 "jklmklmnlmnomnopnopq",
491 .psize = 56,
492 .digest = "\x04\xa3\x71\xe8\x4e\xcf\xb5\xb8"
493 "\xb7\x7c\xb4\x86\x10\xfc\xa8\x18"
494 "\x2d\xd4\x57\xce\x6f\x32\x6a\x0f"
495 "\xd3\xd7\xec\x2f\x1e\x91\x63\x6d"
496 "\xee\x69\x1f\xbe\x0c\x98\x53\x02"
497 "\xba\x1b\x0d\x8d\xc7\x8c\x08\x63"
498 "\x46\xb5\x33\xb4\x9c\x03\x0d\x99"
499 "\xa2\x7d\xaf\x11\x39\xd6\xe7\x5e",
500 },
501};
502
503
Herbert Xuda7f0332008-07-31 17:08:25 +0800504/*
505 * MD5 test vectors from RFC1321
506 */
507#define MD5_TEST_VECTORS 7
508
509static struct hash_testvec md5_tv_template[] = {
510 {
511 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
512 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
513 }, {
514 .plaintext = "a",
515 .psize = 1,
516 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
517 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
518 }, {
519 .plaintext = "abc",
520 .psize = 3,
521 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
522 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
523 }, {
524 .plaintext = "message digest",
525 .psize = 14,
526 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
527 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
528 }, {
529 .plaintext = "abcdefghijklmnopqrstuvwxyz",
530 .psize = 26,
531 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
532 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
533 .np = 2,
534 .tap = {13, 13}
535 }, {
536 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
537 .psize = 62,
538 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
539 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
540 }, {
541 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
542 "345678901234567890",
543 .psize = 80,
544 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
545 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
546 }
547
548};
549
550/*
551 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
552 */
553#define RMD128_TEST_VECTORS 10
554
555static struct hash_testvec rmd128_tv_template[] = {
556 {
557 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
558 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
559 }, {
560 .plaintext = "a",
561 .psize = 1,
562 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
563 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
564 }, {
565 .plaintext = "abc",
566 .psize = 3,
567 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
568 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
569 }, {
570 .plaintext = "message digest",
571 .psize = 14,
572 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
573 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
574 }, {
575 .plaintext = "abcdefghijklmnopqrstuvwxyz",
576 .psize = 26,
577 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
578 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
579 }, {
580 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
581 "fghijklmnopqrstuvwxyz0123456789",
582 .psize = 62,
583 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
584 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
585 }, {
586 .plaintext = "1234567890123456789012345678901234567890"
587 "1234567890123456789012345678901234567890",
588 .psize = 80,
589 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
590 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
591 }, {
592 .plaintext = "abcdbcdecdefdefgefghfghighij"
593 "hijkijkljklmklmnlmnomnopnopq",
594 .psize = 56,
595 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
596 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
597 .np = 2,
598 .tap = { 28, 28 },
599 }, {
600 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
601 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
602 "lmnopqrsmnopqrstnopqrstu",
603 .psize = 112,
604 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
605 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
606 }, {
607 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
608 .psize = 32,
609 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
610 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
611 }
612};
613
614/*
615 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
616 */
617#define RMD160_TEST_VECTORS 10
618
619static struct hash_testvec rmd160_tv_template[] = {
620 {
621 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
622 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
623 }, {
624 .plaintext = "a",
625 .psize = 1,
626 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
627 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
628 }, {
629 .plaintext = "abc",
630 .psize = 3,
631 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
632 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
633 }, {
634 .plaintext = "message digest",
635 .psize = 14,
636 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
637 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
638 }, {
639 .plaintext = "abcdefghijklmnopqrstuvwxyz",
640 .psize = 26,
641 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
642 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
643 }, {
644 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
645 "fghijklmnopqrstuvwxyz0123456789",
646 .psize = 62,
647 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
648 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
649 }, {
650 .plaintext = "1234567890123456789012345678901234567890"
651 "1234567890123456789012345678901234567890",
652 .psize = 80,
653 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
654 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
655 }, {
656 .plaintext = "abcdbcdecdefdefgefghfghighij"
657 "hijkijkljklmklmnlmnomnopnopq",
658 .psize = 56,
659 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
660 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
661 .np = 2,
662 .tap = { 28, 28 },
663 }, {
664 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
665 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
666 "lmnopqrsmnopqrstnopqrstu",
667 .psize = 112,
668 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
669 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
670 }, {
671 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
672 .psize = 32,
673 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
674 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
675 }
676};
677
678/*
679 * RIPEMD-256 test vectors
680 */
681#define RMD256_TEST_VECTORS 8
682
683static struct hash_testvec rmd256_tv_template[] = {
684 {
685 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
686 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
687 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
688 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
689 }, {
690 .plaintext = "a",
691 .psize = 1,
692 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
693 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
694 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
695 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
696 }, {
697 .plaintext = "abc",
698 .psize = 3,
699 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
700 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
701 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
702 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
703 }, {
704 .plaintext = "message digest",
705 .psize = 14,
706 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
707 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
708 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
709 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
710 }, {
711 .plaintext = "abcdefghijklmnopqrstuvwxyz",
712 .psize = 26,
713 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
714 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
715 "\x78\x96\x11\x8a\x51\x97\x96\x87"
716 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
717 }, {
718 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
719 "fghijklmnopqrstuvwxyz0123456789",
720 .psize = 62,
721 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
722 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
723 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
724 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
725 }, {
726 .plaintext = "1234567890123456789012345678901234567890"
727 "1234567890123456789012345678901234567890",
728 .psize = 80,
729 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
730 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
731 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
732 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
733 }, {
734 .plaintext = "abcdbcdecdefdefgefghfghighij"
735 "hijkijkljklmklmnlmnomnopnopq",
736 .psize = 56,
737 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
738 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
739 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
740 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
741 .np = 2,
742 .tap = { 28, 28 },
743 }
744};
745
746/*
747 * RIPEMD-320 test vectors
748 */
749#define RMD320_TEST_VECTORS 8
750
751static struct hash_testvec rmd320_tv_template[] = {
752 {
753 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
754 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
755 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
756 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
757 }, {
758 .plaintext = "a",
759 .psize = 1,
760 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
761 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
762 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
763 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
764 }, {
765 .plaintext = "abc",
766 .psize = 3,
767 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
768 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
769 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
770 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
771 }, {
772 .plaintext = "message digest",
773 .psize = 14,
774 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
775 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
776 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
777 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
778 }, {
779 .plaintext = "abcdefghijklmnopqrstuvwxyz",
780 .psize = 26,
781 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
782 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
783 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
784 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
785 }, {
786 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
787 "fghijklmnopqrstuvwxyz0123456789",
788 .psize = 62,
789 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
790 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
791 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
792 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
793 }, {
794 .plaintext = "1234567890123456789012345678901234567890"
795 "1234567890123456789012345678901234567890",
796 .psize = 80,
797 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
798 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
799 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
800 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
801 }, {
802 .plaintext = "abcdbcdecdefdefgefghfghighij"
803 "hijkijkljklmklmnlmnomnopnopq",
804 .psize = 56,
805 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
806 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
807 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
808 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
809 .np = 2,
810 .tap = { 28, 28 },
811 }
812};
813
Herbert Xu684115212013-09-07 12:56:26 +1000814#define CRCT10DIF_TEST_VECTORS 3
815static struct hash_testvec crct10dif_tv_template[] = {
816 {
817 .plaintext = "abc",
818 .psize = 3,
819#ifdef __LITTLE_ENDIAN
820 .digest = "\x3b\x44",
821#else
822 .digest = "\x44\x3b",
823#endif
824 }, {
825 .plaintext = "1234567890123456789012345678901234567890"
826 "123456789012345678901234567890123456789",
827 .psize = 79,
828#ifdef __LITTLE_ENDIAN
829 .digest = "\x70\x4b",
830#else
831 .digest = "\x4b\x70",
832#endif
833 }, {
834 .plaintext =
835 "abcddddddddddddddddddddddddddddddddddddddddddddddddddddd",
836 .psize = 56,
837#ifdef __LITTLE_ENDIAN
838 .digest = "\xe3\x9c",
839#else
840 .digest = "\x9c\xe3",
841#endif
842 .np = 2,
843 .tap = { 28, 28 }
844 }
845};
846
Herbert Xuda7f0332008-07-31 17:08:25 +0800847/*
848 * SHA1 test vectors from from FIPS PUB 180-1
Herbert Xubd1f2992011-02-17 14:24:45 +1100849 * Long vector from CAVS 5.0
Herbert Xuda7f0332008-07-31 17:08:25 +0800850 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300851#define SHA1_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +0800852
853static struct hash_testvec sha1_tv_template[] = {
854 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300855 .plaintext = "",
856 .psize = 0,
857 .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55"
858 "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09",
859 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800860 .plaintext = "abc",
861 .psize = 3,
862 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
863 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
864 }, {
865 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
866 .psize = 56,
867 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
868 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
869 .np = 2,
870 .tap = { 28, 28 }
Herbert Xubd1f2992011-02-17 14:24:45 +1100871 }, {
872 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
873 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
874 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
875 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
876 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
877 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
878 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
879 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
880 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
881 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
882 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
883 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
884 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
885 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
886 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
887 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
888 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
889 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
890 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
891 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
892 "\x5a\x90\x11",
893 .psize = 163,
894 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
895 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
896 .np = 4,
897 .tap = { 63, 64, 31, 5 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800898 }, {
899 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
900 .psize = 64,
901 .digest = "\xc8\x71\xf6\x9a\x63\xcc\xa9\x84\x84\x82"
902 "\x64\xe7\x79\x95\x5d\xd7\x19\x41\x7c\x91",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300903 }, {
904 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
905 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
906 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
907 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
908 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
909 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
910 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
911 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
912 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
913 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
914 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
915 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
916 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
917 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
918 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
919 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
920 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
921 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
922 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
923 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
924 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
925 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
926 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
927 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
928 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
929 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
930 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
931 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
932 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
933 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
934 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
935 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
936 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
937 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
938 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
939 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
940 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
941 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
942 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
943 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
944 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
945 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
946 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
947 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
948 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
949 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
950 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
951 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
952 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
953 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
954 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
955 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
956 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
957 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
958 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
959 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
960 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
961 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
962 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
963 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
964 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
965 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
966 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
967 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
968 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
969 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
970 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
971 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
972 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
973 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
974 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
975 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
976 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
977 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
978 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
979 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
980 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
981 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
982 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
983 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
984 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
985 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
986 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
987 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
988 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
989 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
990 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
991 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
992 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
993 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
994 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
995 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
996 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
997 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
998 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
999 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1000 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1001 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1002 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1003 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1004 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1005 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1006 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1007 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1008 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1009 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1010 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1011 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1012 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1013 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1014 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1015 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1016 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1017 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1018 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1019 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1020 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1021 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1022 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1023 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1024 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1025 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1026 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1027 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1028 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1029 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1030 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1031 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1032 .psize = 1023,
1033 .digest = "\xb8\xe3\x54\xed\xc5\xfc\xef\xa4"
1034 "\x55\x73\x4a\x81\x99\xe4\x47\x2a"
1035 "\x30\xd6\xc9\x85",
Herbert Xuda7f0332008-07-31 17:08:25 +08001036 }
1037};
1038
1039
1040/*
1041 * SHA224 test vectors from from FIPS PUB 180-2
1042 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001043#define SHA224_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08001044
1045static struct hash_testvec sha224_tv_template[] = {
1046 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001047 .plaintext = "",
1048 .psize = 0,
1049 .digest = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9"
1050 "\x47\x61\x02\xbb\x28\x82\x34\xc4"
1051 "\x15\xa2\xb0\x1f\x82\x8e\xa6\x2a"
1052 "\xc5\xb3\xe4\x2f",
1053 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001054 .plaintext = "abc",
1055 .psize = 3,
1056 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
1057 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
1058 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
1059 "\xE3\x6C\x9D\xA7",
1060 }, {
1061 .plaintext =
1062 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1063 .psize = 56,
1064 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
1065 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
1066 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
1067 "\x52\x52\x25\x25",
1068 .np = 2,
1069 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +08001070 }, {
1071 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1072 .psize = 64,
1073 .digest = "\xc4\xdb\x2b\x3a\x58\xc3\x99\x01"
1074 "\x42\xfd\x10\x92\xaa\x4e\x04\x08"
1075 "\x58\xbb\xbb\xe8\xf8\x14\xa7\x0c"
1076 "\xef\x3b\xcb\x0e",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001077 }, {
1078 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1079 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1080 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1081 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1082 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1083 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1084 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1085 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1086 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1087 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1088 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1089 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1090 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1091 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1092 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1093 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1094 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1095 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1096 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1097 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1098 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1099 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1100 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1101 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1102 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1103 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1104 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1105 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1106 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1107 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1108 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1109 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1110 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1111 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1112 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1113 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1114 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1115 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1116 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1117 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1118 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1119 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1120 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1121 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1122 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1123 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1124 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1125 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1126 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1127 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1128 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1129 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1130 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1131 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1132 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1133 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1134 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1135 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1136 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1137 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1138 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1139 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1140 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1141 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1142 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1143 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1144 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1145 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1146 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1147 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1148 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1149 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1150 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1151 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1152 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1153 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1154 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1155 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1156 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1157 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1158 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1159 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1160 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1161 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1162 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1163 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1164 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1165 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1166 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1167 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1168 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1169 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1170 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1171 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1172 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1173 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1174 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1175 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1176 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1177 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1178 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1179 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1180 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1181 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1182 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1183 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1184 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1185 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1186 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1187 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1188 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1189 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1190 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1191 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1192 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1193 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1194 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1195 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1196 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1197 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1198 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1199 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1200 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1201 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1202 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1203 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1204 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1205 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1206 .psize = 1023,
1207 .digest = "\x98\x43\x07\x63\x75\xe0\xa7\x1c"
1208 "\x78\xb1\x8b\xfd\x04\xf5\x2d\x91"
1209 "\x20\x48\xa4\x28\xff\x55\xb1\xd3"
1210 "\xe6\xf9\x4f\xcc",
Herbert Xuda7f0332008-07-31 17:08:25 +08001211 }
1212};
1213
1214/*
1215 * SHA256 test vectors from from NIST
1216 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001217#define SHA256_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08001218
1219static struct hash_testvec sha256_tv_template[] = {
1220 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001221 .plaintext = "",
1222 .psize = 0,
1223 .digest = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14"
1224 "\x9a\xfb\xf4\xc8\x99\x6f\xb9\x24"
1225 "\x27\xae\x41\xe4\x64\x9b\x93\x4c"
1226 "\xa4\x95\x99\x1b\x78\x52\xb8\x55",
1227 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001228 .plaintext = "abc",
1229 .psize = 3,
1230 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
1231 "\x41\x41\x40\xde\x5d\xae\x22\x23"
1232 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
1233 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
1234 }, {
1235 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1236 .psize = 56,
1237 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
1238 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
1239 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
1240 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
1241 .np = 2,
1242 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +08001243 }, {
1244 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1245 .psize = 64,
1246 .digest = "\xb5\xfe\xad\x56\x7d\xff\xcb\xa4"
1247 "\x2c\x32\x29\x32\x19\xbb\xfb\xfa"
1248 "\xd6\xff\x94\xa3\x72\x91\x85\x66"
1249 "\x3b\xa7\x87\x77\x58\xa3\x40\x3a",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001250 }, {
1251 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1252 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1253 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1254 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1255 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1256 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1257 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1258 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1259 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1260 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1261 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1262 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1263 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1264 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1265 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1266 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1267 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1268 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1269 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1270 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1271 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1272 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1273 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1274 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1275 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1276 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1277 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1278 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1279 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1280 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1281 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1282 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1283 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1284 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1285 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1286 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1287 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1288 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1289 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1290 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1291 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1292 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1293 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1294 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1295 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1296 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1297 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1298 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1299 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1300 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1301 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1302 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1303 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1304 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1305 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1306 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1307 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1308 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1309 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1310 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1311 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1312 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1313 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1314 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1315 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1316 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1317 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1318 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1319 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1320 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1321 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1322 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1323 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1324 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1325 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1326 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1327 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1328 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1329 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1330 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1331 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1332 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1333 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1334 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1335 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1336 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1337 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1338 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1339 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1340 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1341 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1342 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1343 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1344 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1345 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1346 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1347 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1348 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1349 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1350 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1351 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1352 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1353 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1354 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1355 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1356 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1357 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1358 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1359 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1360 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1361 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1362 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1363 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1364 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1365 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1366 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1367 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1368 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1369 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1370 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1371 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1372 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1373 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1374 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1375 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1376 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1377 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1378 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1379 .psize = 1023,
1380 .digest = "\xc5\xce\x0c\xca\x01\x4f\x53\x3a"
1381 "\x32\x32\x17\xcc\xd4\x6a\x71\xa9"
1382 "\xf3\xed\x50\x10\x64\x8e\x06\xbe"
1383 "\x9b\x4a\xa6\xbb\x05\x89\x59\x51",
Ard Biesheuvel45859882014-04-16 20:40:04 +08001384 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001385};
1386
1387/*
1388 * SHA384 test vectors from from NIST and kerneli
1389 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001390#define SHA384_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001391
1392static struct hash_testvec sha384_tv_template[] = {
1393 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001394 .plaintext = "",
1395 .psize = 0,
1396 .digest = "\x38\xb0\x60\xa7\x51\xac\x96\x38"
1397 "\x4c\xd9\x32\x7e\xb1\xb1\xe3\x6a"
1398 "\x21\xfd\xb7\x11\x14\xbe\x07\x43"
1399 "\x4c\x0c\xc7\xbf\x63\xf6\xe1\xda"
1400 "\x27\x4e\xde\xbf\xe7\x6f\x65\xfb"
1401 "\xd5\x1a\xd2\xf1\x48\x98\xb9\x5b",
1402 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001403 .plaintext= "abc",
1404 .psize = 3,
1405 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
1406 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
1407 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
1408 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
1409 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
1410 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
1411 }, {
1412 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1413 .psize = 56,
1414 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
1415 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
1416 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
1417 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
1418 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
1419 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
1420 }, {
1421 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1422 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1423 .psize = 112,
1424 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
1425 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
1426 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
1427 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
1428 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
1429 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
1430 }, {
1431 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1432 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1433 .psize = 104,
1434 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
1435 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
1436 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
1437 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
1438 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
1439 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
1440 .np = 4,
1441 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001442 }, {
1443 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1444 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1445 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1446 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1447 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1448 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1449 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1450 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1451 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1452 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1453 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1454 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1455 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1456 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1457 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1458 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1459 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1460 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1461 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1462 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1463 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1464 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1465 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1466 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1467 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1468 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1469 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1470 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1471 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1472 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1473 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1474 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1475 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1476 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1477 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1478 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1479 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1480 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1481 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1482 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1483 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1484 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1485 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1486 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1487 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1488 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1489 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1490 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1491 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1492 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1493 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1494 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1495 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1496 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1497 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1498 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1499 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1500 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1501 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1502 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1503 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1504 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1505 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1506 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1507 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1508 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1509 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1510 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1511 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1512 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1513 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1514 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1515 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1516 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1517 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1518 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1519 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1520 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1521 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1522 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1523 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1524 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1525 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1526 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1527 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1528 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1529 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1530 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1531 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1532 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1533 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1534 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1535 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1536 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1537 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1538 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1539 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1540 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1541 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1542 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1543 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1544 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1545 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1546 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1547 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1548 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1549 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1550 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1551 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1552 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1553 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1554 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1555 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1556 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1557 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1558 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1559 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1560 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1561 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1562 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1563 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1564 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1565 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1566 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1567 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1568 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1569 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1570 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1571 .psize = 1023,
1572 .digest = "\x4d\x97\x23\xc8\xea\x7a\x7c\x15"
1573 "\xb8\xff\x97\x9c\xf5\x13\x4f\x31"
1574 "\xde\x67\xf7\x24\x73\xcd\x70\x1c"
1575 "\x03\x4a\xba\x8a\x87\x49\xfe\xdc"
1576 "\x75\x29\x62\x83\xae\x3f\x17\xab"
1577 "\xfd\x10\x4d\x8e\x17\x1c\x1f\xca",
1578 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001579};
1580
1581/*
1582 * SHA512 test vectors from from NIST and kerneli
1583 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001584#define SHA512_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001585
1586static struct hash_testvec sha512_tv_template[] = {
1587 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001588 .plaintext = "",
1589 .psize = 0,
1590 .digest = "\xcf\x83\xe1\x35\x7e\xef\xb8\xbd"
1591 "\xf1\x54\x28\x50\xd6\x6d\x80\x07"
1592 "\xd6\x20\xe4\x05\x0b\x57\x15\xdc"
1593 "\x83\xf4\xa9\x21\xd3\x6c\xe9\xce"
1594 "\x47\xd0\xd1\x3c\x5d\x85\xf2\xb0"
1595 "\xff\x83\x18\xd2\x87\x7e\xec\x2f"
1596 "\x63\xb9\x31\xbd\x47\x41\x7a\x81"
1597 "\xa5\x38\x32\x7a\xf9\x27\xda\x3e",
1598 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001599 .plaintext = "abc",
1600 .psize = 3,
1601 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
1602 "\xcc\x41\x73\x49\xae\x20\x41\x31"
1603 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
1604 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
1605 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
1606 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
1607 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
1608 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
1609 }, {
1610 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1611 .psize = 56,
1612 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
1613 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
1614 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
1615 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
1616 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
1617 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
1618 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
1619 "\x54\xec\x63\x12\x38\xca\x34\x45",
1620 }, {
1621 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1622 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1623 .psize = 112,
1624 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
1625 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
1626 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
1627 "\x72\x99\xae\xad\xb6\x88\x90\x18"
1628 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
1629 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
1630 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
1631 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
1632 }, {
1633 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1634 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1635 .psize = 104,
1636 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
1637 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
1638 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
1639 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
1640 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
1641 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
1642 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
1643 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
1644 .np = 4,
1645 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001646 }, {
1647 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1648 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1649 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1650 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1651 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1652 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1653 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1654 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1655 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1656 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1657 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1658 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1659 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1660 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1661 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1662 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1663 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1664 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1665 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1666 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1667 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1668 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1669 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1670 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1671 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1672 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1673 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1674 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1675 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1676 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1677 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1678 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1679 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1680 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1681 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1682 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1683 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1684 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1685 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1686 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1687 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1688 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1689 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1690 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1691 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1692 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1693 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1694 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1695 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1696 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1697 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1698 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1699 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1700 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1701 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1702 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1703 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1704 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1705 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1706 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1707 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1708 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1709 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1710 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1711 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1712 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1713 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1714 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1715 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1716 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1717 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1718 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1719 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1720 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1721 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1722 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1723 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1724 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1725 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1726 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1727 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1728 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1729 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1730 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1731 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1732 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1733 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1734 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1735 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1736 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1737 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1738 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1739 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1740 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1741 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1742 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1743 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1744 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1745 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1746 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1747 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1748 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1749 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1750 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1751 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1752 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1753 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1754 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1755 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1756 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1757 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1758 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1759 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1760 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1761 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1762 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1763 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1764 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1765 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1766 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1767 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1768 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1769 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1770 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1771 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1772 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1773 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1774 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1775 .psize = 1023,
1776 .digest = "\x76\xc9\xd4\x91\x7a\x5f\x0f\xaa"
1777 "\x13\x39\xf3\x01\x7a\xfa\xe5\x41"
1778 "\x5f\x0b\xf8\xeb\x32\xfc\xbf\xb0"
1779 "\xfa\x8c\xcd\x17\x83\xe2\xfa\xeb"
1780 "\x1c\x19\xde\xe2\x75\xdc\x34\x64"
1781 "\x5f\x35\x9c\x61\x2f\x10\xf9\xec"
1782 "\x59\xca\x9d\xcc\x25\x0c\x43\xba"
1783 "\x85\xa8\xf8\xfe\xb5\x24\xb2\xee",
1784 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001785};
1786
1787
1788/*
1789 * WHIRLPOOL test vectors from Whirlpool package
1790 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
1791 * submission
1792 */
1793#define WP512_TEST_VECTORS 8
1794
1795static struct hash_testvec wp512_tv_template[] = {
1796 {
1797 .plaintext = "",
1798 .psize = 0,
1799 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1800 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1801 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1802 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1803 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1804 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
1805 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
1806 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
1807
1808
1809 }, {
1810 .plaintext = "a",
1811 .psize = 1,
1812 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1813 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1814 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1815 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1816 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1817 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
1818 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
1819 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
1820 }, {
1821 .plaintext = "abc",
1822 .psize = 3,
1823 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1824 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1825 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1826 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1827 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1828 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
1829 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
1830 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
1831 }, {
1832 .plaintext = "message digest",
1833 .psize = 14,
1834 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1835 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1836 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1837 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1838 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1839 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
1840 "\x92\xED\x92\x00\x52\x83\x8F\x33"
1841 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
1842 }, {
1843 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1844 .psize = 26,
1845 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1846 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1847 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1848 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1849 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1850 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
1851 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
1852 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
1853 }, {
1854 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1855 "abcdefghijklmnopqrstuvwxyz0123456789",
1856 .psize = 62,
1857 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1858 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1859 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1860 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1861 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1862 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
1863 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
1864 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
1865 }, {
1866 .plaintext = "1234567890123456789012345678901234567890"
1867 "1234567890123456789012345678901234567890",
1868 .psize = 80,
1869 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1870 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1871 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1872 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1873 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1874 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
1875 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
1876 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
1877 }, {
1878 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1879 .psize = 32,
1880 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1881 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1882 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1883 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1884 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1885 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
1886 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
1887 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
1888 },
1889};
1890
1891#define WP384_TEST_VECTORS 8
1892
1893static struct hash_testvec wp384_tv_template[] = {
1894 {
1895 .plaintext = "",
1896 .psize = 0,
1897 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1898 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1899 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1900 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1901 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1902 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
1903
1904
1905 }, {
1906 .plaintext = "a",
1907 .psize = 1,
1908 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1909 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1910 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1911 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1912 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1913 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
1914 }, {
1915 .plaintext = "abc",
1916 .psize = 3,
1917 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1918 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1919 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1920 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1921 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1922 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
1923 }, {
1924 .plaintext = "message digest",
1925 .psize = 14,
1926 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1927 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1928 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1929 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1930 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1931 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
1932 }, {
1933 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1934 .psize = 26,
1935 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1936 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1937 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1938 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1939 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1940 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
1941 }, {
1942 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1943 "abcdefghijklmnopqrstuvwxyz0123456789",
1944 .psize = 62,
1945 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1946 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1947 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1948 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1949 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1950 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
1951 }, {
1952 .plaintext = "1234567890123456789012345678901234567890"
1953 "1234567890123456789012345678901234567890",
1954 .psize = 80,
1955 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1956 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1957 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1958 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1959 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1960 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
1961 }, {
1962 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1963 .psize = 32,
1964 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1965 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1966 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1967 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1968 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1969 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
1970 },
1971};
1972
1973#define WP256_TEST_VECTORS 8
1974
1975static struct hash_testvec wp256_tv_template[] = {
1976 {
1977 .plaintext = "",
1978 .psize = 0,
1979 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1980 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1981 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1982 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
1983
1984
1985 }, {
1986 .plaintext = "a",
1987 .psize = 1,
1988 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1989 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1990 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1991 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
1992 }, {
1993 .plaintext = "abc",
1994 .psize = 3,
1995 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1996 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1997 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1998 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
1999 }, {
2000 .plaintext = "message digest",
2001 .psize = 14,
2002 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
2003 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
2004 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
2005 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
2006 }, {
2007 .plaintext = "abcdefghijklmnopqrstuvwxyz",
2008 .psize = 26,
2009 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
2010 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
2011 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
2012 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
2013 }, {
2014 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
2015 "abcdefghijklmnopqrstuvwxyz0123456789",
2016 .psize = 62,
2017 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
2018 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
2019 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
2020 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
2021 }, {
2022 .plaintext = "1234567890123456789012345678901234567890"
2023 "1234567890123456789012345678901234567890",
2024 .psize = 80,
2025 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
2026 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
2027 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
2028 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
2029 }, {
2030 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
2031 .psize = 32,
2032 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
2033 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
2034 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
2035 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
2036 },
2037};
2038
2039/*
2040 * TIGER test vectors from Tiger website
2041 */
2042#define TGR192_TEST_VECTORS 6
2043
2044static struct hash_testvec tgr192_tv_template[] = {
2045 {
2046 .plaintext = "",
2047 .psize = 0,
2048 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
2049 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
2050 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
2051 }, {
2052 .plaintext = "abc",
2053 .psize = 3,
2054 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
2055 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
2056 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
2057 }, {
2058 .plaintext = "Tiger",
2059 .psize = 5,
2060 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
2061 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
2062 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
2063 }, {
2064 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
2065 .psize = 64,
2066 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
2067 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
2068 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
2069 }, {
2070 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
2071 .psize = 64,
2072 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
2073 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
2074 "\x57\x89\x65\x65\x97\x5f\x91\x97",
2075 }, {
2076 .plaintext = "Tiger - A Fast New Hash Function, "
2077 "by Ross Anderson and Eli Biham, "
2078 "proceedings of Fast Software Encryption 3, "
2079 "Cambridge, 1996.",
2080 .psize = 125,
2081 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
2082 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
2083 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
2084 },
2085};
2086
2087#define TGR160_TEST_VECTORS 6
2088
2089static struct hash_testvec tgr160_tv_template[] = {
2090 {
2091 .plaintext = "",
2092 .psize = 0,
2093 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
2094 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
2095 "\xf3\x73\xde\x2d",
2096 }, {
2097 .plaintext = "abc",
2098 .psize = 3,
2099 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
2100 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
2101 "\x93\x5f\x7b\x95",
2102 }, {
2103 .plaintext = "Tiger",
2104 .psize = 5,
2105 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
2106 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
2107 "\x37\x79\x0c\x11",
2108 }, {
2109 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
2110 .psize = 64,
2111 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
2112 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
2113 "\xb5\x86\x44\x50",
2114 }, {
2115 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
2116 .psize = 64,
2117 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
2118 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
2119 "\x57\x89\x65\x65",
2120 }, {
2121 .plaintext = "Tiger - A Fast New Hash Function, "
2122 "by Ross Anderson and Eli Biham, "
2123 "proceedings of Fast Software Encryption 3, "
2124 "Cambridge, 1996.",
2125 .psize = 125,
2126 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
2127 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
2128 "\xdd\x68\x15\x1d",
2129 },
2130};
2131
2132#define TGR128_TEST_VECTORS 6
2133
2134static struct hash_testvec tgr128_tv_template[] = {
2135 {
2136 .plaintext = "",
2137 .psize = 0,
2138 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
2139 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
2140 }, {
2141 .plaintext = "abc",
2142 .psize = 3,
2143 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
2144 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
2145 }, {
2146 .plaintext = "Tiger",
2147 .psize = 5,
2148 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
2149 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
2150 }, {
2151 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
2152 .psize = 64,
2153 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
2154 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
2155 }, {
2156 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
2157 .psize = 64,
2158 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
2159 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
2160 }, {
2161 .plaintext = "Tiger - A Fast New Hash Function, "
2162 "by Ross Anderson and Eli Biham, "
2163 "proceedings of Fast Software Encryption 3, "
2164 "Cambridge, 1996.",
2165 .psize = 125,
2166 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
2167 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
2168 },
2169};
2170
Harald Freudenberger445a8e02015-05-21 17:34:31 +02002171#define GHASH_TEST_VECTORS 6
Youquan, Song507069c2009-11-23 20:23:04 +08002172
2173static struct hash_testvec ghash_tv_template[] =
2174{
2175 {
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002176 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03"
2177 "\xff\xca\xff\x95\xf8\x30\xf0\x61",
Youquan, Song507069c2009-11-23 20:23:04 +08002178 .ksize = 16,
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002179 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
2180 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
Youquan, Song507069c2009-11-23 20:23:04 +08002181 .psize = 16,
2182 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
2183 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002184 }, {
2185 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2186 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2187 .ksize = 16,
2188 .plaintext = "what do ya want for nothing?",
2189 .psize = 28,
2190 .digest = "\x3e\x1f\x5c\x4d\x65\xf0\xef\xce"
2191 "\x0d\x61\x06\x27\x66\x51\xd5\xe2",
2192 .np = 2,
2193 .tap = {14, 14}
2194 }, {
2195 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2196 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2197 .ksize = 16,
2198 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2199 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2200 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2201 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2202 .psize = 50,
2203 .digest = "\xfb\x49\x8a\x36\xe1\x96\xe1\x96"
2204 "\xe1\x96\xe1\x96\xe1\x96\xe1\x96",
2205 }, {
2206 .key = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
2207 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
2208 .ksize = 16,
2209 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2210 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2211 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2212 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2213 .psize = 50,
2214 .digest = "\x2b\x5c\x0c\x7f\x52\xd1\x60\xc2"
2215 "\x49\xed\x6e\x32\x7a\xa9\xbe\x08",
2216 }, {
2217 .key = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
2218 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
2219 .ksize = 16,
2220 .plaintext = "Test With Truncation",
2221 .psize = 20,
2222 .digest = "\xf8\x94\x87\x2a\x4b\x63\x99\x28"
2223 "\x23\xf7\x93\xf7\x19\xf5\x96\xd9",
Harald Freudenberger445a8e02015-05-21 17:34:31 +02002224 }, {
2225 .key = "\x0a\x1b\x2c\x3d\x4e\x5f\x64\x71"
2226 "\x82\x93\xa4\xb5\xc6\xd7\xe8\xf9",
2227 .ksize = 16,
2228 .plaintext = "\x56\x6f\x72\x20\x6c\x61\x75\x74"
2229 "\x65\x72\x20\x4c\x61\x75\x73\x63"
2230 "\x68\x65\x6e\x20\x75\x6e\x64\x20"
2231 "\x53\x74\x61\x75\x6e\x65\x6e\x20"
2232 "\x73\x65\x69\x20\x73\x74\x69\x6c"
2233 "\x6c\x2c\x0a\x64\x75\x20\x6d\x65"
2234 "\x69\x6e\x20\x74\x69\x65\x66\x74"
2235 "\x69\x65\x66\x65\x73\x20\x4c\x65"
2236 "\x62\x65\x6e\x3b\x0a\x64\x61\x73"
2237 "\x73\x20\x64\x75\x20\x77\x65\x69"
2238 "\xc3\x9f\x74\x20\x77\x61\x73\x20"
2239 "\x64\x65\x72\x20\x57\x69\x6e\x64"
2240 "\x20\x64\x69\x72\x20\x77\x69\x6c"
2241 "\x6c\x2c\x0a\x65\x68\x20\x6e\x6f"
2242 "\x63\x68\x20\x64\x69\x65\x20\x42"
2243 "\x69\x72\x6b\x65\x6e\x20\x62\x65"
2244 "\x62\x65\x6e\x2e\x0a\x0a\x55\x6e"
2245 "\x64\x20\x77\x65\x6e\x6e\x20\x64"
2246 "\x69\x72\x20\x65\x69\x6e\x6d\x61"
2247 "\x6c\x20\x64\x61\x73\x20\x53\x63"
2248 "\x68\x77\x65\x69\x67\x65\x6e\x20"
2249 "\x73\x70\x72\x61\x63\x68\x2c\x0a"
2250 "\x6c\x61\x73\x73\x20\x64\x65\x69"
2251 "\x6e\x65\x20\x53\x69\x6e\x6e\x65"
2252 "\x20\x62\x65\x73\x69\x65\x67\x65"
2253 "\x6e\x2e\x0a\x4a\x65\x64\x65\x6d"
2254 "\x20\x48\x61\x75\x63\x68\x65\x20"
2255 "\x67\x69\x62\x74\x20\x64\x69\x63"
2256 "\x68\x2c\x20\x67\x69\x62\x20\x6e"
2257 "\x61\x63\x68\x2c\x0a\x65\x72\x20"
2258 "\x77\x69\x72\x64\x20\x64\x69\x63"
2259 "\x68\x20\x6c\x69\x65\x62\x65\x6e"
2260 "\x20\x75\x6e\x64\x20\x77\x69\x65"
2261 "\x67\x65\x6e\x2e\x0a\x0a\x55\x6e"
2262 "\x64\x20\x64\x61\x6e\x6e\x20\x6d"
2263 "\x65\x69\x6e\x65\x20\x53\x65\x65"
2264 "\x6c\x65\x20\x73\x65\x69\x74\x20"
2265 "\x77\x65\x69\x74\x2c\x20\x73\x65"
2266 "\x69\x20\x77\x65\x69\x74\x2c\x0a"
2267 "\x64\x61\x73\x73\x20\x64\x69\x72"
2268 "\x20\x64\x61\x73\x20\x4c\x65\x62"
2269 "\x65\x6e\x20\x67\x65\x6c\x69\x6e"
2270 "\x67\x65\x2c\x0a\x62\x72\x65\x69"
2271 "\x74\x65\x20\x64\x69\x63\x68\x20"
2272 "\x77\x69\x65\x20\x65\x69\x6e\x20"
2273 "\x46\x65\x69\x65\x72\x6b\x6c\x65"
2274 "\x69\x64\x0a\xc3\xbc\x62\x65\x72"
2275 "\x20\x64\x69\x65\x20\x73\x69\x6e"
2276 "\x6e\x65\x6e\x64\x65\x6e\x20\x44"
2277 "\x69\x6e\x67\x65\x2e\x2e\x2e\x0a",
2278 .psize = 400,
2279 .digest = "\xad\xb1\xc1\xe9\x56\x70\x31\x1d"
2280 "\xbb\x5b\xdf\x5e\x70\x72\x1a\x57",
Youquan, Song507069c2009-11-23 20:23:04 +08002281 },
2282};
2283
Herbert Xuda7f0332008-07-31 17:08:25 +08002284/*
2285 * HMAC-MD5 test vectors from RFC2202
2286 * (These need to be fixed to not use strlen).
2287 */
2288#define HMAC_MD5_TEST_VECTORS 7
2289
2290static struct hash_testvec hmac_md5_tv_template[] =
2291{
2292 {
2293 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2294 .ksize = 16,
2295 .plaintext = "Hi There",
2296 .psize = 8,
2297 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
2298 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
2299 }, {
2300 .key = "Jefe",
2301 .ksize = 4,
2302 .plaintext = "what do ya want for nothing?",
2303 .psize = 28,
2304 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
2305 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
2306 .np = 2,
2307 .tap = {14, 14}
2308 }, {
2309 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2310 .ksize = 16,
2311 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2312 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2313 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2314 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2315 .psize = 50,
2316 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
2317 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
2318 }, {
2319 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2320 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2321 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2322 .ksize = 25,
2323 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2324 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2325 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2326 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2327 .psize = 50,
2328 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
2329 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
2330 }, {
2331 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2332 .ksize = 16,
2333 .plaintext = "Test With Truncation",
2334 .psize = 20,
2335 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
2336 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
2337 }, {
2338 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2339 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2340 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2341 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2342 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2343 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2344 "\xaa\xaa",
2345 .ksize = 80,
2346 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2347 .psize = 54,
2348 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
2349 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
2350 }, {
2351 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2352 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2353 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2354 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2355 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2356 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2357 "\xaa\xaa",
2358 .ksize = 80,
2359 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2360 "Block-Size Data",
2361 .psize = 73,
2362 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
2363 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
2364 },
2365};
2366
2367/*
2368 * HMAC-RIPEMD128 test vectors from RFC2286
2369 */
2370#define HMAC_RMD128_TEST_VECTORS 7
2371
2372static struct hash_testvec hmac_rmd128_tv_template[] = {
2373 {
2374 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2375 .ksize = 16,
2376 .plaintext = "Hi There",
2377 .psize = 8,
2378 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
2379 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
2380 }, {
2381 .key = "Jefe",
2382 .ksize = 4,
2383 .plaintext = "what do ya want for nothing?",
2384 .psize = 28,
2385 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
2386 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
2387 .np = 2,
2388 .tap = { 14, 14 },
2389 }, {
2390 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2391 .ksize = 16,
2392 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2393 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2394 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2395 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2396 .psize = 50,
2397 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
2398 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
2399 }, {
2400 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2401 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2402 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2403 .ksize = 25,
2404 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2405 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2406 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2407 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2408 .psize = 50,
2409 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
2410 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
2411 }, {
2412 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2413 .ksize = 16,
2414 .plaintext = "Test With Truncation",
2415 .psize = 20,
2416 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
2417 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
2418 }, {
2419 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2420 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2421 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2422 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2423 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2424 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2425 "\xaa\xaa",
2426 .ksize = 80,
2427 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2428 .psize = 54,
2429 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
2430 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
2431 }, {
2432 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2433 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2434 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2435 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2436 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2437 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2438 "\xaa\xaa",
2439 .ksize = 80,
2440 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2441 "Block-Size Data",
2442 .psize = 73,
2443 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
2444 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
2445 },
2446};
2447
2448/*
2449 * HMAC-RIPEMD160 test vectors from RFC2286
2450 */
2451#define HMAC_RMD160_TEST_VECTORS 7
2452
2453static struct hash_testvec hmac_rmd160_tv_template[] = {
2454 {
2455 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2456 .ksize = 20,
2457 .plaintext = "Hi There",
2458 .psize = 8,
2459 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
2460 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
2461 }, {
2462 .key = "Jefe",
2463 .ksize = 4,
2464 .plaintext = "what do ya want for nothing?",
2465 .psize = 28,
2466 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
2467 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
2468 .np = 2,
2469 .tap = { 14, 14 },
2470 }, {
2471 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2472 .ksize = 20,
2473 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2474 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2475 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2476 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2477 .psize = 50,
2478 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
2479 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
2480 }, {
2481 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2482 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2483 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2484 .ksize = 25,
2485 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2486 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2487 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2488 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2489 .psize = 50,
2490 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
2491 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
2492 }, {
2493 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2494 .ksize = 20,
2495 .plaintext = "Test With Truncation",
2496 .psize = 20,
2497 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
2498 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
2499 }, {
2500 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2501 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2502 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2503 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2504 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2505 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2506 "\xaa\xaa",
2507 .ksize = 80,
2508 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2509 .psize = 54,
2510 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
2511 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
2512 }, {
2513 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2514 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2515 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2516 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2517 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2518 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2519 "\xaa\xaa",
2520 .ksize = 80,
2521 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2522 "Block-Size Data",
2523 .psize = 73,
2524 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
2525 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
2526 },
2527};
2528
2529/*
2530 * HMAC-SHA1 test vectors from RFC2202
2531 */
2532#define HMAC_SHA1_TEST_VECTORS 7
2533
2534static struct hash_testvec hmac_sha1_tv_template[] = {
2535 {
2536 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2537 .ksize = 20,
2538 .plaintext = "Hi There",
2539 .psize = 8,
2540 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
2541 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
2542 "\x46\xbe",
2543 }, {
2544 .key = "Jefe",
2545 .ksize = 4,
2546 .plaintext = "what do ya want for nothing?",
2547 .psize = 28,
2548 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
2549 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
2550 .np = 2,
2551 .tap = { 14, 14 }
2552 }, {
2553 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2554 .ksize = 20,
2555 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2556 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2557 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2558 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2559 .psize = 50,
2560 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
2561 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
2562 }, {
2563 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2564 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2565 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2566 .ksize = 25,
2567 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2568 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2569 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2570 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2571 .psize = 50,
2572 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
2573 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
2574 }, {
2575 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2576 .ksize = 20,
2577 .plaintext = "Test With Truncation",
2578 .psize = 20,
2579 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
2580 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
2581 }, {
2582 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2583 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2584 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2585 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2586 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2587 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2588 "\xaa\xaa",
2589 .ksize = 80,
2590 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2591 .psize = 54,
2592 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
2593 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
2594 }, {
2595 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2596 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2597 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2598 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2599 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2600 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2601 "\xaa\xaa",
2602 .ksize = 80,
2603 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2604 "Block-Size Data",
2605 .psize = 73,
2606 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
2607 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
2608 },
2609};
2610
2611
2612/*
2613 * SHA224 HMAC test vectors from RFC4231
2614 */
2615#define HMAC_SHA224_TEST_VECTORS 4
2616
2617static struct hash_testvec hmac_sha224_tv_template[] = {
2618 {
2619 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2620 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2621 "\x0b\x0b\x0b\x0b",
2622 .ksize = 20,
2623 /* ("Hi There") */
2624 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
2625 .psize = 8,
2626 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
2627 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
2628 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
2629 "\x53\x68\x4b\x22",
2630 }, {
2631 .key = "Jefe",
2632 .ksize = 4,
2633 /* ("what do ya want for nothing?") */
2634 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
2635 "\x79\x61\x20\x77\x61\x6e\x74\x20"
2636 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
2637 "\x69\x6e\x67\x3f",
2638 .psize = 28,
2639 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
2640 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
2641 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
2642 "\x8f\xd0\x5e\x44",
2643 .np = 4,
2644 .tap = { 7, 7, 7, 7 }
2645 }, {
2646 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2647 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2648 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2649 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2650 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2651 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2652 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2653 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2654 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2655 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2656 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2657 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2658 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2659 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2660 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2661 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2662 "\xaa\xaa\xaa",
2663 .ksize = 131,
2664 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
2665 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
2666 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
2667 "\x72\x20\x54\x68\x61\x6e\x20\x42"
2668 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
2669 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
2670 "\x48\x61\x73\x68\x20\x4b\x65\x79"
2671 "\x20\x46\x69\x72\x73\x74",
2672 .psize = 54,
2673 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
2674 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
2675 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
2676 "\x3f\xa6\x87\x0e",
2677 }, {
2678 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2679 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2680 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2681 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2682 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2683 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2684 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2685 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2686 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2687 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2688 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2689 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2690 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2691 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2692 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2693 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2694 "\xaa\xaa\xaa",
2695 .ksize = 131,
2696 /* ("This is a test using a larger than block-size key and a")
2697 (" larger than block-size data. The key needs to be")
2698 (" hashed before being used by the HMAC algorithm.") */
2699 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
2700 "\x61\x20\x74\x65\x73\x74\x20\x75"
2701 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
2702 "\x61\x72\x67\x65\x72\x20\x74\x68"
2703 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
2704 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
2705 "\x79\x20\x61\x6e\x64\x20\x61\x20"
2706 "\x6c\x61\x72\x67\x65\x72\x20\x74"
2707 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
2708 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
2709 "\x61\x74\x61\x2e\x20\x54\x68\x65"
2710 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
2711 "\x64\x73\x20\x74\x6f\x20\x62\x65"
2712 "\x20\x68\x61\x73\x68\x65\x64\x20"
2713 "\x62\x65\x66\x6f\x72\x65\x20\x62"
2714 "\x65\x69\x6e\x67\x20\x75\x73\x65"
2715 "\x64\x20\x62\x79\x20\x74\x68\x65"
2716 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
2717 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
2718 .psize = 152,
2719 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
2720 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
2721 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
2722 "\xf6\xf5\x65\xd1",
2723 },
2724};
2725
2726/*
2727 * HMAC-SHA256 test vectors from
2728 * draft-ietf-ipsec-ciph-sha-256-01.txt
2729 */
2730#define HMAC_SHA256_TEST_VECTORS 10
2731
2732static struct hash_testvec hmac_sha256_tv_template[] = {
2733 {
2734 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2735 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2736 "\x11\x12\x13\x14\x15\x16\x17\x18"
2737 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2738 .ksize = 32,
2739 .plaintext = "abc",
2740 .psize = 3,
2741 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
2742 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
2743 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
2744 "\x92\x75\x90\x21\xcf\xab\x81\x81",
2745 }, {
2746 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2747 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2748 "\x11\x12\x13\x14\x15\x16\x17\x18"
2749 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2750 .ksize = 32,
2751 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2752 .psize = 56,
2753 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
2754 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
2755 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
2756 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
2757 }, {
2758 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2759 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2760 "\x11\x12\x13\x14\x15\x16\x17\x18"
2761 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2762 .ksize = 32,
2763 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
2764 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2765 .psize = 112,
2766 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
2767 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
2768 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
2769 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
2770 }, {
2771 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2772 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2773 "\x0b\x0b\x0b\x0b\x0b\x0b",
2774 .ksize = 32,
2775 .plaintext = "Hi There",
2776 .psize = 8,
2777 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
2778 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
2779 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
2780 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
2781 }, {
2782 .key = "Jefe",
2783 .ksize = 4,
2784 .plaintext = "what do ya want for nothing?",
2785 .psize = 28,
2786 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
2787 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
2788 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
2789 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
2790 .np = 2,
2791 .tap = { 14, 14 }
2792 }, {
2793 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2794 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2795 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2796 .ksize = 32,
2797 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2798 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2799 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2800 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2801 .psize = 50,
2802 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
2803 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
2804 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
2805 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
2806 }, {
2807 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2808 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2809 "\x11\x12\x13\x14\x15\x16\x17\x18"
2810 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
2811 "\x21\x22\x23\x24\x25",
2812 .ksize = 37,
2813 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2814 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2815 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2816 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2817 .psize = 50,
2818 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
2819 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
2820 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
2821 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
2822 }, {
2823 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2824 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2825 "\x0c\x0c\x0c\x0c\x0c\x0c",
2826 .ksize = 32,
2827 .plaintext = "Test With Truncation",
2828 .psize = 20,
2829 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
2830 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
2831 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
2832 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
2833 }, {
2834 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2835 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2836 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2837 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2838 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2839 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2840 "\xaa\xaa",
2841 .ksize = 80,
2842 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2843 .psize = 54,
2844 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
2845 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
2846 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
2847 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
2848 }, {
2849 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2850 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2851 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2852 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2853 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2854 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2855 "\xaa\xaa",
2856 .ksize = 80,
2857 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
2858 "One Block-Size Data",
2859 .psize = 73,
2860 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
2861 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
2862 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
2863 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
2864 },
2865};
2866
Jussi Kivilinna93b5e862013-04-08 10:48:44 +03002867#define CMAC_AES_TEST_VECTORS 6
2868
2869static struct hash_testvec aes_cmac128_tv_template[] = {
2870 { /* From NIST Special Publication 800-38B, AES-128 */
2871 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2872 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2873 .plaintext = zeroed_string,
2874 .digest = "\xbb\x1d\x69\x29\xe9\x59\x37\x28"
2875 "\x7f\xa3\x7d\x12\x9b\x75\x67\x46",
2876 .psize = 0,
2877 .ksize = 16,
2878 }, {
2879 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2880 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2881 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2882 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a",
2883 .digest = "\x07\x0a\x16\xb4\x6b\x4d\x41\x44"
2884 "\xf7\x9b\xdd\x9d\xd0\x4a\x28\x7c",
2885 .psize = 16,
2886 .ksize = 16,
2887 }, {
2888 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2889 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2890 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2891 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2892 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2893 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2894 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11",
2895 .digest = "\xdf\xa6\x67\x47\xde\x9a\xe6\x30"
2896 "\x30\xca\x32\x61\x14\x97\xc8\x27",
2897 .psize = 40,
2898 .ksize = 16,
2899 }, {
2900 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2901 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2902 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2903 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2904 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2905 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2906 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2907 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2908 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2909 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2910 .digest = "\x51\xf0\xbe\xbf\x7e\x3b\x9d\x92"
2911 "\xfc\x49\x74\x17\x79\x36\x3c\xfe",
2912 .psize = 64,
2913 .ksize = 16,
2914 }, { /* From NIST Special Publication 800-38B, AES-256 */
2915 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2916 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2917 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2918 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2919 .plaintext = zeroed_string,
2920 .digest = "\x02\x89\x62\xf6\x1b\x7b\xf8\x9e"
2921 "\xfc\x6b\x55\x1f\x46\x67\xd9\x83",
2922 .psize = 0,
2923 .ksize = 32,
2924 }, {
2925 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2926 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2927 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2928 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2929 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2930 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2931 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2932 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2933 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2934 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2935 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2936 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2937 .digest = "\xe1\x99\x21\x90\x54\x9f\x6e\xd5"
2938 "\x69\x6a\x2c\x05\x6c\x31\x54\x10",
2939 .psize = 64,
2940 .ksize = 32,
2941 }
2942};
2943
2944#define CMAC_DES3_EDE_TEST_VECTORS 4
2945
2946static struct hash_testvec des3_ede_cmac64_tv_template[] = {
2947/*
2948 * From NIST Special Publication 800-38B, Three Key TDEA
2949 * Corrected test vectors from:
2950 * http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf
2951 */
2952 {
2953 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2954 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2955 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2956 .plaintext = zeroed_string,
2957 .digest = "\xb7\xa6\x88\xe1\x22\xff\xaf\x95",
2958 .psize = 0,
2959 .ksize = 24,
2960 }, {
2961 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2962 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2963 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2964 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96",
2965 .digest = "\x8e\x8f\x29\x31\x36\x28\x37\x97",
2966 .psize = 8,
2967 .ksize = 24,
2968 }, {
2969 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2970 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2971 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2972 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2973 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2974 "\xae\x2d\x8a\x57",
2975 .digest = "\x74\x3d\xdb\xe0\xce\x2d\xc2\xed",
2976 .psize = 20,
2977 .ksize = 24,
2978 }, {
2979 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2980 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2981 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2982 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2983 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2984 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2985 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51",
2986 .digest = "\x33\xe6\xb1\x09\x24\x00\xea\xe5",
2987 .psize = 32,
2988 .ksize = 24,
2989 }
2990};
2991
Herbert Xuda7f0332008-07-31 17:08:25 +08002992#define XCBC_AES_TEST_VECTORS 6
2993
2994static struct hash_testvec aes_xcbc128_tv_template[] = {
2995 {
2996 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2997 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2998 .plaintext = zeroed_string,
2999 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
3000 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
3001 .psize = 0,
3002 .ksize = 16,
3003 }, {
3004 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3005 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3006 .plaintext = "\x00\x01\x02",
3007 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
3008 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
3009 .psize = 3,
3010 .ksize = 16,
3011 } , {
3012 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3013 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3014 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
3015 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3016 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
3017 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
3018 .psize = 16,
3019 .ksize = 16,
3020 }, {
3021 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3022 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3023 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
3024 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3025 "\x10\x11\x12\x13",
3026 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
3027 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
3028 .tap = { 10, 10 },
3029 .psize = 20,
3030 .np = 2,
3031 .ksize = 16,
3032 }, {
3033 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3034 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3035 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
3036 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3037 "\x10\x11\x12\x13\x14\x15\x16\x17"
3038 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
3039 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
3040 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
3041 .psize = 32,
3042 .ksize = 16,
3043 }, {
3044 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3045 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3046 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
3047 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3048 "\x10\x11\x12\x13\x14\x15\x16\x17"
3049 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3050 "\x20\x21",
3051 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
3052 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
3053 .tap = { 17, 17 },
3054 .psize = 34,
3055 .np = 2,
3056 .ksize = 16,
3057 }
3058};
3059
Salman Qaziba1ee072012-10-05 14:24:14 -07003060#define VMAC_AES_TEST_VECTORS 11
Shane Wang304a2042010-03-18 20:22:55 +08003061static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
Shane Wangf1939f72009-09-02 20:05:22 +10003062 '\x02', '\x03', '\x02', '\x02',
3063 '\x02', '\x04', '\x01', '\x07',
3064 '\x04', '\x01', '\x04', '\x03',};
Shane Wang304a2042010-03-18 20:22:55 +08003065static char vmac_string2[128] = {'a', 'b', 'c',};
3066static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
3067 'a', 'b', 'c', 'a', 'b', 'c',
3068 'a', 'b', 'c', 'a', 'b', 'c',
3069 'a', 'b', 'c', 'a', 'b', 'c',
3070 'a', 'b', 'c', 'a', 'b', 'c',
3071 'a', 'b', 'c', 'a', 'b', 'c',
3072 'a', 'b', 'c', 'a', 'b', 'c',
3073 'a', 'b', 'c', 'a', 'b', 'c',
3074 };
3075
Salman Qaziba1ee072012-10-05 14:24:14 -07003076static char vmac_string4[17] = {'b', 'c', 'e', 'f',
3077 'i', 'j', 'l', 'm',
3078 'o', 'p', 'r', 's',
3079 't', 'u', 'w', 'x', 'z'};
3080
3081static char vmac_string5[127] = {'r', 'm', 'b', 't', 'c',
3082 'o', 'l', 'k', ']', '%',
3083 '9', '2', '7', '!', 'A'};
3084
3085static char vmac_string6[129] = {'p', 't', '*', '7', 'l',
3086 'i', '!', '#', 'w', '0',
3087 'z', '/', '4', 'A', 'n'};
3088
Shane Wangf1939f72009-09-02 20:05:22 +10003089static struct hash_testvec aes_vmac128_tv_template[] = {
3090 {
Shane Wang304a2042010-03-18 20:22:55 +08003091 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3092 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3093 .plaintext = NULL,
3094 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
3095 .psize = 0,
3096 .ksize = 16,
3097 }, {
Shane Wangf1939f72009-09-02 20:05:22 +10003098 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3099 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Shane Wang304a2042010-03-18 20:22:55 +08003100 .plaintext = vmac_string1,
3101 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
3102 .psize = 128,
3103 .ksize = 16,
3104 }, {
3105 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3106 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3107 .plaintext = vmac_string2,
3108 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
3109 .psize = 128,
3110 .ksize = 16,
3111 }, {
3112 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3113 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3114 .plaintext = vmac_string3,
3115 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
3116 .psize = 128,
3117 .ksize = 16,
3118 }, {
3119 .key = "abcdefghijklmnop",
3120 .plaintext = NULL,
3121 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
3122 .psize = 0,
3123 .ksize = 16,
3124 }, {
3125 .key = "abcdefghijklmnop",
3126 .plaintext = vmac_string1,
3127 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
3128 .psize = 128,
3129 .ksize = 16,
3130 }, {
3131 .key = "abcdefghijklmnop",
3132 .plaintext = vmac_string2,
3133 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
3134 .psize = 128,
3135 .ksize = 16,
3136 }, {
3137 .key = "abcdefghijklmnop",
3138 .plaintext = vmac_string3,
3139 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
Shane Wangf1939f72009-09-02 20:05:22 +10003140 .psize = 128,
3141 .ksize = 16,
Salman Qaziba1ee072012-10-05 14:24:14 -07003142 }, {
3143 .key = "a09b5cd!f#07K\x00\x00\x00",
3144 .plaintext = vmac_string4,
3145 .digest = "\xab\xa5\x0f\xea\x42\x4e\xa1\x5f",
3146 .psize = sizeof(vmac_string4),
3147 .ksize = 16,
3148 }, {
3149 .key = "a09b5cd!f#07K\x00\x00\x00",
3150 .plaintext = vmac_string5,
3151 .digest = "\x25\x31\x98\xbc\x1d\xe8\x67\x60",
3152 .psize = sizeof(vmac_string5),
3153 .ksize = 16,
3154 }, {
3155 .key = "a09b5cd!f#07K\x00\x00\x00",
3156 .plaintext = vmac_string6,
3157 .digest = "\xc4\xae\x9b\x47\x95\x65\xeb\x41",
3158 .psize = sizeof(vmac_string6),
3159 .ksize = 16,
Shane Wangf1939f72009-09-02 20:05:22 +10003160 },
3161};
3162
Herbert Xuda7f0332008-07-31 17:08:25 +08003163/*
3164 * SHA384 HMAC test vectors from RFC4231
3165 */
3166
3167#define HMAC_SHA384_TEST_VECTORS 4
3168
3169static struct hash_testvec hmac_sha384_tv_template[] = {
3170 {
3171 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3172 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3173 "\x0b\x0b\x0b\x0b",
3174 .ksize = 20,
3175 .plaintext = "Hi There",
3176 .psize = 8,
3177 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
3178 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
3179 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
3180 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
3181 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
3182 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
3183 }, {
3184 .key = "Jefe",
3185 .ksize = 4,
3186 .plaintext = "what do ya want for nothing?",
3187 .psize = 28,
3188 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
3189 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
3190 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
3191 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
3192 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
3193 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
3194 .np = 4,
3195 .tap = { 7, 7, 7, 7 }
3196 }, {
3197 .key = "\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\xaa\xaa\xaa\xaa\xaa"
3209 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3210 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3211 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3212 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3213 "\xaa\xaa\xaa",
3214 .ksize = 131,
3215 .plaintext = "Test Using Larger Than Block-Siz"
3216 "e Key - Hash Key First",
3217 .psize = 54,
3218 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
3219 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
3220 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
3221 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
3222 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
3223 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
3224 }, {
3225 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3226 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3227 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3228 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3229 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3230 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3231 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3232 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3233 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3234 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3235 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3236 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3237 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3238 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3239 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3240 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3241 "\xaa\xaa\xaa",
3242 .ksize = 131,
3243 .plaintext = "This is a test u"
3244 "sing a larger th"
3245 "an block-size ke"
3246 "y and a larger t"
3247 "han block-size d"
3248 "ata. The key nee"
3249 "ds to be hashed "
3250 "before being use"
3251 "d by the HMAC al"
3252 "gorithm.",
3253 .psize = 152,
3254 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
3255 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
3256 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
3257 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
3258 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
3259 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
3260 },
3261};
3262
3263/*
3264 * SHA512 HMAC test vectors from RFC4231
3265 */
3266
3267#define HMAC_SHA512_TEST_VECTORS 4
3268
3269static struct hash_testvec hmac_sha512_tv_template[] = {
3270 {
3271 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3272 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3273 "\x0b\x0b\x0b\x0b",
3274 .ksize = 20,
3275 .plaintext = "Hi There",
3276 .psize = 8,
3277 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
3278 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
3279 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
3280 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
3281 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
3282 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
3283 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
3284 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
3285 }, {
3286 .key = "Jefe",
3287 .ksize = 4,
3288 .plaintext = "what do ya want for nothing?",
3289 .psize = 28,
3290 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
3291 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
3292 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
3293 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
3294 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
3295 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
3296 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
3297 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
3298 .np = 4,
3299 .tap = { 7, 7, 7, 7 }
3300 }, {
3301 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3302 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3303 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3304 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3305 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3306 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3307 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3308 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3309 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3310 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3311 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3312 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3313 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3314 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3315 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3316 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3317 "\xaa\xaa\xaa",
3318 .ksize = 131,
3319 .plaintext = "Test Using Large"
3320 "r Than Block-Siz"
3321 "e Key - Hash Key"
3322 " First",
3323 .psize = 54,
3324 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
3325 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
3326 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
3327 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
3328 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
3329 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
3330 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
3331 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
3332 }, {
3333 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3334 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3335 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3336 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3337 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3338 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3339 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3340 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3341 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3342 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3343 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3344 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3345 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3346 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3347 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3348 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3349 "\xaa\xaa\xaa",
3350 .ksize = 131,
3351 .plaintext =
3352 "This is a test u"
3353 "sing a larger th"
3354 "an block-size ke"
3355 "y and a larger t"
3356 "han block-size d"
3357 "ata. The key nee"
3358 "ds to be hashed "
3359 "before being use"
3360 "d by the HMAC al"
3361 "gorithm.",
3362 .psize = 152,
3363 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
3364 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
3365 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
3366 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
3367 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
3368 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
3369 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
3370 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
3371 },
3372};
3373
3374/*
Martin Willieee9dc62015-06-01 13:43:59 +02003375 * Poly1305 test vectors from RFC7539 A.3.
3376 */
3377
3378#define POLY1305_TEST_VECTORS 11
3379
3380static struct hash_testvec poly1305_tv_template[] = {
3381 { /* Test Vector #1 */
Martin Willieee9dc62015-06-01 13:43:59 +02003382 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
3383 "\x00\x00\x00\x00\x00\x00\x00\x00"
3384 "\x00\x00\x00\x00\x00\x00\x00\x00"
3385 "\x00\x00\x00\x00\x00\x00\x00\x00"
3386 "\x00\x00\x00\x00\x00\x00\x00\x00"
3387 "\x00\x00\x00\x00\x00\x00\x00\x00"
3388 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003389 "\x00\x00\x00\x00\x00\x00\x00\x00"
3390 "\x00\x00\x00\x00\x00\x00\x00\x00"
3391 "\x00\x00\x00\x00\x00\x00\x00\x00"
3392 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003393 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003394 .psize = 96,
Martin Willieee9dc62015-06-01 13:43:59 +02003395 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3396 "\x00\x00\x00\x00\x00\x00\x00\x00",
3397 }, { /* Test Vector #2 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003398 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003399 "\x00\x00\x00\x00\x00\x00\x00\x00"
3400 "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003401 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3402 "\x41\x6e\x79\x20\x73\x75\x62\x6d"
Martin Willieee9dc62015-06-01 13:43:59 +02003403 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3404 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3405 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3406 "\x64\x65\x64\x20\x62\x79\x20\x74"
3407 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3408 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3409 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3410 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3411 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3412 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3413 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3414 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3415 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3416 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3417 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3418 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3419 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3420 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3421 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3422 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3423 "\x45\x54\x46\x20\x61\x63\x74\x69"
3424 "\x76\x69\x74\x79\x20\x69\x73\x20"
3425 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3426 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3427 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3428 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3429 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3430 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3431 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3432 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3433 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3434 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3435 "\x54\x46\x20\x73\x65\x73\x73\x69"
3436 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3437 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3438 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3439 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3440 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3441 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3442 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3443 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3444 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3445 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3446 "\x20\x77\x68\x69\x63\x68\x20\x61"
3447 "\x72\x65\x20\x61\x64\x64\x72\x65"
3448 "\x73\x73\x65\x64\x20\x74\x6f",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003449 .psize = 407,
Martin Willieee9dc62015-06-01 13:43:59 +02003450 .digest = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3451 "\xf0\xef\xca\x96\x22\x7a\x86\x3e",
3452 }, { /* Test Vector #3 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003453 .plaintext = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
Martin Willieee9dc62015-06-01 13:43:59 +02003454 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3455 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003456 "\x00\x00\x00\x00\x00\x00\x00\x00"
3457 "\x41\x6e\x79\x20\x73\x75\x62\x6d"
Martin Willieee9dc62015-06-01 13:43:59 +02003458 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3459 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3460 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3461 "\x64\x65\x64\x20\x62\x79\x20\x74"
3462 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3463 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3464 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3465 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3466 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3467 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3468 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3469 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3470 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3471 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3472 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3473 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3474 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3475 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3476 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3477 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3478 "\x45\x54\x46\x20\x61\x63\x74\x69"
3479 "\x76\x69\x74\x79\x20\x69\x73\x20"
3480 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3481 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3482 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3483 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3484 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3485 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3486 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3487 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3488 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3489 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3490 "\x54\x46\x20\x73\x65\x73\x73\x69"
3491 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3492 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3493 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3494 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3495 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3496 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3497 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3498 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3499 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3500 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3501 "\x20\x77\x68\x69\x63\x68\x20\x61"
3502 "\x72\x65\x20\x61\x64\x64\x72\x65"
3503 "\x73\x73\x65\x64\x20\x74\x6f",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003504 .psize = 407,
Martin Willieee9dc62015-06-01 13:43:59 +02003505 .digest = "\xf3\x47\x7e\x7c\xd9\x54\x17\xaf"
3506 "\x89\xa6\xb8\x79\x4c\x31\x0c\xf0",
3507 }, { /* Test Vector #4 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003508 .plaintext = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
Martin Willieee9dc62015-06-01 13:43:59 +02003509 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
3510 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003511 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
3512 "\x27\x54\x77\x61\x73\x20\x62\x72"
Martin Willieee9dc62015-06-01 13:43:59 +02003513 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
3514 "\x6e\x64\x20\x74\x68\x65\x20\x73"
3515 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
3516 "\x76\x65\x73\x0a\x44\x69\x64\x20"
3517 "\x67\x79\x72\x65\x20\x61\x6e\x64"
3518 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
3519 "\x69\x6e\x20\x74\x68\x65\x20\x77"
3520 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
3521 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
3522 "\x65\x72\x65\x20\x74\x68\x65\x20"
3523 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
3524 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
3525 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
3526 "\x72\x61\x74\x68\x73\x20\x6f\x75"
3527 "\x74\x67\x72\x61\x62\x65\x2e",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003528 .psize = 159,
Martin Willieee9dc62015-06-01 13:43:59 +02003529 .digest = "\x45\x41\x66\x9a\x7e\xaa\xee\x61"
3530 "\xe7\x08\xdc\x7c\xbc\xc5\xeb\x62",
3531 }, { /* Test Vector #5 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003532 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003533 "\x00\x00\x00\x00\x00\x00\x00\x00"
3534 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003535 "\x00\x00\x00\x00\x00\x00\x00\x00"
3536 "\xff\xff\xff\xff\xff\xff\xff\xff"
3537 "\xff\xff\xff\xff\xff\xff\xff\xff",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003538 .psize = 48,
3539 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003540 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003541 }, { /* Test Vector #6 */
3542 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
3543 "\x00\x00\x00\x00\x00\x00\x00\x00"
3544 "\xff\xff\xff\xff\xff\xff\xff\xff"
3545 "\xff\xff\xff\xff\xff\xff\xff\xff"
3546 "\x02\x00\x00\x00\x00\x00\x00\x00"
3547 "\x00\x00\x00\x00\x00\x00\x00\x00",
3548 .psize = 48,
Martin Willieee9dc62015-06-01 13:43:59 +02003549 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
3550 "\x00\x00\x00\x00\x00\x00\x00\x00",
3551 }, { /* Test Vector #7 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003552 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003553 "\x00\x00\x00\x00\x00\x00\x00\x00"
3554 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003555 "\x00\x00\x00\x00\x00\x00\x00\x00"
3556 "\xff\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003557 "\xff\xff\xff\xff\xff\xff\xff\xff"
3558 "\xf0\xff\xff\xff\xff\xff\xff\xff"
3559 "\xff\xff\xff\xff\xff\xff\xff\xff"
3560 "\x11\x00\x00\x00\x00\x00\x00\x00"
3561 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003562 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003563 .digest = "\x05\x00\x00\x00\x00\x00\x00\x00"
3564 "\x00\x00\x00\x00\x00\x00\x00\x00",
3565 }, { /* Test Vector #8 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003566 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003567 "\x00\x00\x00\x00\x00\x00\x00\x00"
3568 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003569 "\x00\x00\x00\x00\x00\x00\x00\x00"
3570 "\xff\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003571 "\xff\xff\xff\xff\xff\xff\xff\xff"
3572 "\xfb\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3573 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3574 "\x01\x01\x01\x01\x01\x01\x01\x01"
3575 "\x01\x01\x01\x01\x01\x01\x01\x01",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003576 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003577 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3578 "\x00\x00\x00\x00\x00\x00\x00\x00",
3579 }, { /* Test Vector #9 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003580 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003581 "\x00\x00\x00\x00\x00\x00\x00\x00"
3582 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003583 "\x00\x00\x00\x00\x00\x00\x00\x00"
3584 "\xfd\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003585 "\xff\xff\xff\xff\xff\xff\xff\xff",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003586 .psize = 48,
Martin Willieee9dc62015-06-01 13:43:59 +02003587 .digest = "\xfa\xff\xff\xff\xff\xff\xff\xff"
3588 "\xff\xff\xff\xff\xff\xff\xff\xff",
3589 }, { /* Test Vector #10 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003590 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003591 "\x04\x00\x00\x00\x00\x00\x00\x00"
3592 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003593 "\x00\x00\x00\x00\x00\x00\x00\x00"
3594 "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
Martin Willieee9dc62015-06-01 13:43:59 +02003595 "\x00\x00\x00\x00\x00\x00\x00\x00"
3596 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3597 "\x01\x00\x00\x00\x00\x00\x00\x00"
3598 "\x00\x00\x00\x00\x00\x00\x00\x00"
3599 "\x00\x00\x00\x00\x00\x00\x00\x00"
3600 "\x01\x00\x00\x00\x00\x00\x00\x00"
3601 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003602 .psize = 96,
Martin Willieee9dc62015-06-01 13:43:59 +02003603 .digest = "\x14\x00\x00\x00\x00\x00\x00\x00"
3604 "\x55\x00\x00\x00\x00\x00\x00\x00",
3605 }, { /* Test Vector #11 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003606 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003607 "\x04\x00\x00\x00\x00\x00\x00\x00"
3608 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003609 "\x00\x00\x00\x00\x00\x00\x00\x00"
3610 "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
Martin Willieee9dc62015-06-01 13:43:59 +02003611 "\x00\x00\x00\x00\x00\x00\x00\x00"
3612 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3613 "\x01\x00\x00\x00\x00\x00\x00\x00"
3614 "\x00\x00\x00\x00\x00\x00\x00\x00"
3615 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003616 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003617 .digest = "\x13\x00\x00\x00\x00\x00\x00\x00"
3618 "\x00\x00\x00\x00\x00\x00\x00\x00",
3619 },
3620};
3621
3622/*
Herbert Xuda7f0332008-07-31 17:08:25 +08003623 * DES test vectors.
3624 */
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003625#define DES_ENC_TEST_VECTORS 11
3626#define DES_DEC_TEST_VECTORS 5
3627#define DES_CBC_ENC_TEST_VECTORS 6
3628#define DES_CBC_DEC_TEST_VECTORS 5
3629#define DES_CTR_ENC_TEST_VECTORS 2
3630#define DES_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003631#define DES3_EDE_ENC_TEST_VECTORS 4
3632#define DES3_EDE_DEC_TEST_VECTORS 4
3633#define DES3_EDE_CBC_ENC_TEST_VECTORS 2
3634#define DES3_EDE_CBC_DEC_TEST_VECTORS 2
3635#define DES3_EDE_CTR_ENC_TEST_VECTORS 2
3636#define DES3_EDE_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08003637
3638static struct cipher_testvec des_enc_tv_template[] = {
3639 { /* From Applied Cryptography */
3640 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3641 .klen = 8,
3642 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3643 .ilen = 8,
3644 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3645 .rlen = 8,
3646 }, { /* Same key, different plaintext block */
3647 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3648 .klen = 8,
3649 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
3650 .ilen = 8,
3651 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3652 .rlen = 8,
3653 }, { /* Sbox test from NBS */
3654 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3655 .klen = 8,
3656 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3657 .ilen = 8,
3658 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3659 .rlen = 8,
3660 }, { /* Three blocks */
3661 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3662 .klen = 8,
3663 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3664 "\x22\x33\x44\x55\x66\x77\x88\x99"
3665 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3666 .ilen = 24,
3667 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3668 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3669 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3670 .rlen = 24,
3671 }, { /* Weak key */
David Howells09e21782015-04-28 15:36:36 +01003672 .fail = true,
Herbert Xuda7f0332008-07-31 17:08:25 +08003673 .wk = 1,
3674 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
3675 .klen = 8,
3676 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3677 .ilen = 8,
3678 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3679 .rlen = 8,
3680 }, { /* Two blocks -- for testing encryption across pages */
3681 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3682 .klen = 8,
3683 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3684 "\x22\x33\x44\x55\x66\x77\x88\x99",
3685 .ilen = 16,
3686 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3687 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3688 .rlen = 16,
3689 .np = 2,
3690 .tap = { 8, 8 }
3691 }, { /* Four blocks -- for testing encryption with chunking */
3692 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3693 .klen = 8,
3694 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3695 "\x22\x33\x44\x55\x66\x77\x88\x99"
3696 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
3697 "\x22\x33\x44\x55\x66\x77\x88\x99",
3698 .ilen = 32,
3699 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3700 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3701 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
3702 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3703 .rlen = 32,
3704 .np = 3,
3705 .tap = { 14, 10, 8 }
3706 }, {
3707 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3708 .klen = 8,
3709 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3710 "\x22\x33\x44\x55\x66\x77\x88\x99"
3711 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3712 .ilen = 24,
3713 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3714 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3715 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3716 .rlen = 24,
3717 .np = 4,
3718 .tap = { 2, 1, 3, 18 }
3719 }, {
3720 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3721 .klen = 8,
3722 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3723 "\x22\x33\x44\x55\x66\x77\x88\x99",
3724 .ilen = 16,
3725 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3726 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3727 .rlen = 16,
3728 .np = 5,
3729 .tap = { 2, 2, 2, 2, 8 }
3730 }, {
3731 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3732 .klen = 8,
3733 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3734 .ilen = 8,
3735 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3736 .rlen = 8,
3737 .np = 8,
3738 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003739 }, { /* Generated with Crypto++ */
3740 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3741 .klen = 8,
3742 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3743 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3744 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3745 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3746 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3747 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3748 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3749 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3750 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3751 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3752 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3753 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3754 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3755 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3756 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3757 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3758 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3759 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3760 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3761 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3762 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3763 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3764 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3765 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3766 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3767 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3768 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3769 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3770 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3771 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3772 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3773 .ilen = 248,
3774 .result = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3775 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3776 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3777 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3778 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3779 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3780 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3781 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3782 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3783 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3784 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3785 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3786 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3787 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3788 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3789 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3790 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3791 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3792 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3793 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3794 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3795 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3796 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3797 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3798 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3799 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3800 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3801 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3802 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3803 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3804 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3805 .rlen = 248,
3806 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003807 .np = 3,
3808 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003809 },
3810};
3811
3812static struct cipher_testvec des_dec_tv_template[] = {
3813 { /* From Applied Cryptography */
3814 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3815 .klen = 8,
3816 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3817 .ilen = 8,
3818 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3819 .rlen = 8,
3820 }, { /* Sbox test from NBS */
3821 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3822 .klen = 8,
3823 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3824 .ilen = 8,
3825 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3826 .rlen = 8,
3827 }, { /* Two blocks, for chunking test */
3828 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3829 .klen = 8,
3830 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3831 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3832 .ilen = 16,
3833 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3834 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3835 .rlen = 16,
3836 .np = 2,
3837 .tap = { 8, 8 }
3838 }, {
3839 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3840 .klen = 8,
3841 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3842 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3843 .ilen = 16,
3844 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3845 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3846 .rlen = 16,
3847 .np = 3,
3848 .tap = { 3, 12, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003849 }, { /* Generated with Crypto++ */
3850 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3851 .klen = 8,
3852 .input = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3853 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3854 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3855 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3856 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3857 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3858 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3859 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3860 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3861 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3862 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3863 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3864 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3865 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3866 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3867 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3868 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3869 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3870 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3871 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3872 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3873 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3874 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3875 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3876 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3877 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3878 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3879 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3880 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3881 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3882 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3883 .ilen = 248,
3884 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3885 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3886 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3887 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3888 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3889 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3890 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3891 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3892 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3893 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3894 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3895 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3896 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3897 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3898 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3899 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3900 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3901 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3902 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3903 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3904 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3905 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3906 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3907 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3908 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3909 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3910 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3911 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3912 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3913 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3914 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3915 .rlen = 248,
3916 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003917 .np = 3,
3918 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003919 },
3920};
3921
3922static struct cipher_testvec des_cbc_enc_tv_template[] = {
3923 { /* From OpenSSL */
3924 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3925 .klen = 8,
3926 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3927 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3928 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3929 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3930 .ilen = 24,
3931 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3932 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3933 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3934 .rlen = 24,
3935 }, { /* FIPS Pub 81 */
3936 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3937 .klen = 8,
3938 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3939 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3940 .ilen = 8,
3941 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3942 .rlen = 8,
3943 }, {
3944 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3945 .klen = 8,
3946 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3947 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3948 .ilen = 8,
3949 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3950 .rlen = 8,
3951 }, {
3952 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3953 .klen = 8,
3954 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3955 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3956 .ilen = 8,
3957 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3958 .rlen = 8,
3959 }, { /* Copy of openssl vector for chunk testing */
3960 /* From OpenSSL */
3961 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3962 .klen = 8,
3963 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3964 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3965 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3966 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3967 .ilen = 24,
3968 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3969 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3970 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3971 .rlen = 24,
3972 .np = 2,
3973 .tap = { 13, 11 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003974 }, { /* Generated with Crypto++ */
3975 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3976 .klen = 8,
3977 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3978 .input = "\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 .ilen = 248,
4010 .result = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
4011 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
4012 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
4013 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
4014 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
4015 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
4016 "\x81\x72\x74\xDE\x30\x19\x69\x49"
4017 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
4018 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
4019 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
4020 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
4021 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
4022 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
4023 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
4024 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
4025 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
4026 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
4027 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
4028 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
4029 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
4030 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
4031 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
4032 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
4033 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
4034 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
4035 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
4036 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
4037 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
4038 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
4039 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
4040 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
4041 .rlen = 248,
4042 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004043 .np = 3,
4044 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004045 },
4046};
4047
4048static struct cipher_testvec des_cbc_dec_tv_template[] = {
4049 { /* FIPS Pub 81 */
4050 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4051 .klen = 8,
4052 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
4053 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
4054 .ilen = 8,
4055 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
4056 .rlen = 8,
4057 }, {
4058 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4059 .klen = 8,
4060 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
4061 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
4062 .ilen = 8,
4063 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
4064 .rlen = 8,
4065 }, {
4066 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4067 .klen = 8,
4068 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
4069 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
4070 .ilen = 8,
4071 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
4072 .rlen = 8,
4073 }, { /* Copy of above, for chunk testing */
4074 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4075 .klen = 8,
4076 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
4077 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
4078 .ilen = 8,
4079 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
4080 .rlen = 8,
4081 .np = 2,
4082 .tap = { 4, 4 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004083 }, { /* Generated with Crypto++ */
4084 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4085 .klen = 8,
4086 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4087 .input = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
4088 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
4089 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
4090 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
4091 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
4092 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
4093 "\x81\x72\x74\xDE\x30\x19\x69\x49"
4094 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
4095 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
4096 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
4097 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
4098 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
4099 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
4100 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
4101 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
4102 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
4103 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
4104 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
4105 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
4106 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
4107 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
4108 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
4109 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
4110 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
4111 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
4112 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
4113 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
4114 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
4115 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
4116 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
4117 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
4118 .ilen = 248,
4119 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4120 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4121 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4122 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4123 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4124 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4125 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4126 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4127 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4128 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4129 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4130 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4131 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4132 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4133 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4134 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4135 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4136 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4137 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4138 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4139 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4140 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4141 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4142 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4143 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4144 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4145 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4146 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4147 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4148 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4149 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4150 .rlen = 248,
4151 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004152 .np = 3,
4153 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004154 },
4155};
4156
4157static struct cipher_testvec des_ctr_enc_tv_template[] = {
4158 { /* Generated with Crypto++ */
4159 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4160 .klen = 8,
4161 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4162 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4163 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4164 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4165 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4166 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4167 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4168 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4169 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4170 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4171 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4172 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4173 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4174 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4175 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4176 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4177 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4178 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4179 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4180 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4181 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4182 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4183 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4184 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4185 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4186 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4187 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4188 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4189 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4190 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4191 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4192 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4193 .ilen = 248,
4194 .result = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
4195 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
4196 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
4197 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
4198 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
4199 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
4200 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
4201 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
4202 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4203 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4204 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4205 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4206 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4207 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4208 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4209 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4210 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4211 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4212 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4213 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4214 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4215 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4216 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4217 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4218 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4219 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4220 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4221 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4222 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4223 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4224 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4225 .rlen = 248,
4226 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004227 .np = 3,
4228 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004229 }, { /* Generated with Crypto++ */
4230 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4231 .klen = 8,
4232 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4233 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4234 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4235 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4236 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4237 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4238 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4239 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4240 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4241 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4242 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4243 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4244 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4245 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4246 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4247 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4248 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4249 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4250 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4251 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4252 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4253 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4254 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4255 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4256 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4257 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4258 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4259 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4260 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4261 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4262 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4263 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4264 .ilen = 247,
4265 .result = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4266 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4267 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4268 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4269 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4270 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4271 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4272 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4273 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4274 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4275 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4276 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4277 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4278 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4279 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4280 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4281 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4282 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4283 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4284 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4285 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4286 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4287 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4288 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4289 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4290 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4291 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4292 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4293 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4294 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4295 "\x91\x45\x05\x3E\x58\xBF\x32",
4296 .rlen = 247,
4297 .also_non_np = 1,
4298 .np = 2,
4299 .tap = { 247 - 8, 8 },
4300 },
4301};
4302
4303static struct cipher_testvec des_ctr_dec_tv_template[] = {
4304 { /* Generated with Crypto++ */
4305 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4306 .klen = 8,
4307 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4308 .input = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
4309 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
4310 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
4311 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
4312 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
4313 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
4314 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
4315 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
4316 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4317 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4318 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4319 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4320 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4321 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4322 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4323 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4324 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4325 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4326 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4327 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4328 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4329 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4330 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4331 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4332 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4333 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4334 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4335 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4336 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4337 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4338 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4339 .ilen = 248,
4340 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4341 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4342 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4343 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4344 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4345 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4346 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4347 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4348 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4349 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4350 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4351 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4352 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4353 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4354 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4355 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4356 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4357 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4358 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4359 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4360 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4361 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4362 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4363 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4364 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4365 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4366 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4367 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4368 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4369 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4370 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4371 .rlen = 248,
4372 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004373 .np = 3,
4374 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004375 }, { /* Generated with Crypto++ */
4376 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4377 .klen = 8,
4378 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4379 .input = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4380 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4381 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4382 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4383 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4384 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4385 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4386 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4387 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4388 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4389 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4390 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4391 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4392 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4393 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4394 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4395 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4396 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4397 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4398 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4399 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4400 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4401 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4402 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4403 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4404 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4405 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4406 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4407 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4408 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4409 "\x91\x45\x05\x3E\x58\xBF\x32",
4410 .ilen = 247,
4411 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4412 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4413 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4414 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4415 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4416 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4417 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4418 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4419 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4420 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4421 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4422 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4423 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4424 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4425 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4426 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4427 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4428 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4429 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4430 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4431 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4432 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4433 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4434 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4435 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4436 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4437 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4438 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4439 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4440 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4441 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4442 .rlen = 247,
4443 .also_non_np = 1,
4444 .np = 2,
4445 .tap = { 247 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004446 },
4447};
4448
4449static struct cipher_testvec des3_ede_enc_tv_template[] = {
4450 { /* These are from openssl */
4451 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4452 "\x55\x55\x55\x55\x55\x55\x55\x55"
4453 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4454 .klen = 24,
4455 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4456 .ilen = 8,
4457 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4458 .rlen = 8,
4459 }, {
4460 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4461 "\x86\x02\x87\x66\x59\x08\x21\x98"
4462 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4463 .klen = 24,
4464 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4465 .ilen = 8,
4466 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4467 .rlen = 8,
4468 }, {
4469 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4470 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4471 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4472 .klen = 24,
4473 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
4474 .ilen = 8,
4475 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4476 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004477 }, { /* Generated with Crypto++ */
4478 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4479 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4480 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4481 .klen = 24,
4482 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4483 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4484 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4485 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4486 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4487 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4488 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4489 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4490 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4491 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4492 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4493 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4494 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4495 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4496 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4497 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4498 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4499 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4500 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4501 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4502 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4503 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4504 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4505 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4506 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4507 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4508 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4509 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4510 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4511 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4512 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4513 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4514 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4515 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4516 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4517 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4518 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4519 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4520 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4521 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4522 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4523 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4524 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4525 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4526 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4527 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4528 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4529 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4530 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4531 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4532 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4533 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4534 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4535 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4536 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4537 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4538 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4539 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4540 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4541 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4542 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4543 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4544 .ilen = 496,
4545 .result = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4546 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4547 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4548 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4549 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4550 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4551 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4552 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4553 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4554 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4555 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4556 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4557 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4558 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4559 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4560 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4561 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4562 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4563 "\x45\x86\x50\x01\x70\x35\x99\x92"
4564 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4565 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4566 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4567 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4568 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4569 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4570 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4571 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4572 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4573 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4574 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4575 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4576 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4577 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4578 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4579 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4580 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4581 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4582 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4583 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4584 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4585 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4586 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4587 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4588 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4589 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4590 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4591 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4592 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4593 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4594 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4595 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4596 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4597 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4598 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4599 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4600 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4601 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4602 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4603 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4604 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4605 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4606 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4607 .rlen = 496,
4608 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004609 .np = 3,
4610 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004611 },
4612};
4613
4614static struct cipher_testvec des3_ede_dec_tv_template[] = {
4615 { /* These are from openssl */
4616 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4617 "\x55\x55\x55\x55\x55\x55\x55\x55"
4618 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4619 .klen = 24,
4620 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4621 .ilen = 8,
4622 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4623 .rlen = 8,
4624 }, {
4625 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4626 "\x86\x02\x87\x66\x59\x08\x21\x98"
4627 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4628 .klen = 24,
4629 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4630 .ilen = 8,
4631 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4632 .rlen = 8,
4633 }, {
4634 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4635 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4636 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4637 .klen = 24,
4638 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4639 .ilen = 8,
4640 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
4641 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004642 }, { /* Generated with Crypto++ */
4643 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4644 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4645 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4646 .klen = 24,
4647 .input = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4648 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4649 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4650 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4651 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4652 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4653 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4654 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4655 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4656 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4657 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4658 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4659 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4660 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4661 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4662 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4663 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4664 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4665 "\x45\x86\x50\x01\x70\x35\x99\x92"
4666 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4667 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4668 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4669 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4670 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4671 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4672 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4673 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4674 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4675 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4676 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4677 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4678 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4679 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4680 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4681 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4682 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4683 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4684 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4685 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4686 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4687 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4688 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4689 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4690 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4691 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4692 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4693 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4694 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4695 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4696 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4697 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4698 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4699 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4700 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4701 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4702 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4703 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4704 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4705 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4706 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4707 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4708 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4709 .ilen = 496,
4710 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4711 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4712 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4713 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4714 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4715 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4716 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4717 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4718 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4719 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4720 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4721 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4722 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4723 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4724 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4725 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4726 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4727 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4728 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4729 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4730 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4731 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4732 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4733 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4734 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4735 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4736 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4737 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4738 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4739 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4740 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4741 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4742 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4743 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4744 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4745 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4746 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4747 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4748 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4749 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4750 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4751 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4752 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4753 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4754 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4755 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4756 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4757 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4758 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4759 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4760 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4761 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4762 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4763 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4764 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4765 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4766 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4767 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4768 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4769 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4770 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4771 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4772 .rlen = 496,
4773 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004774 .np = 3,
4775 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004776 },
4777};
4778
4779static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
4780 { /* Generated from openssl */
4781 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4782 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4783 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4784 .klen = 24,
4785 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4786 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4787 "\x53\x20\x63\x65\x65\x72\x73\x74"
4788 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4789 "\x20\x79\x65\x53\x72\x63\x74\x65"
4790 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4791 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4792 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4793 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4794 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4795 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4796 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4797 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4798 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4799 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4800 "\x63\x65\x65\x72\x73\x74\x54\x20"
4801 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4802 .ilen = 128,
4803 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4804 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4805 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4806 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4807 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4808 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4809 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4810 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4811 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4812 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4813 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4814 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4815 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4816 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4817 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4818 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4819 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004820 }, { /* Generated with Crypto++ */
4821 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4822 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4823 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4824 .klen = 24,
4825 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4826 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4827 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4828 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4829 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4830 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4831 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4832 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4833 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4834 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4835 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4836 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4837 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4838 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4839 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4840 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4841 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4842 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4843 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4844 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4845 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4846 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4847 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4848 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4849 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4850 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4851 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4852 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4853 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4854 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4855 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4856 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4857 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4858 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4859 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4860 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4861 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4862 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4863 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4864 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4865 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4866 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4867 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4868 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4869 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4870 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4871 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4872 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4873 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4874 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4875 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4876 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4877 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4878 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4879 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4880 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4881 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4882 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4883 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4884 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4885 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4886 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4887 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4888 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4889 .ilen = 496,
4890 .result = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4891 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4892 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4893 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4894 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4895 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4896 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4897 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4898 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4899 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4900 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4901 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4902 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4903 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4904 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4905 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4906 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4907 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4908 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4909 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4910 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4911 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4912 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4913 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4914 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4915 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4916 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4917 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4918 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4919 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4920 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4921 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4922 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4923 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4924 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4925 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4926 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4927 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4928 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4929 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4930 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4931 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4932 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4933 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4934 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4935 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4936 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4937 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4938 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4939 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4940 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4941 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4942 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4943 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4944 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4945 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4946 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4947 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4948 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4949 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4950 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4951 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4952 .rlen = 496,
4953 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004954 .np = 3,
4955 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004956 },
4957};
4958
4959static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
4960 { /* Generated from openssl */
4961 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4962 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4963 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4964 .klen = 24,
4965 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4966 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4967 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4968 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4969 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4970 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4971 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4972 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4973 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4974 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4975 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4976 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4977 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4978 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4979 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4980 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4981 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4982 .ilen = 128,
4983 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4984 "\x53\x20\x63\x65\x65\x72\x73\x74"
4985 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4986 "\x20\x79\x65\x53\x72\x63\x74\x65"
4987 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4988 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4989 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4990 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4991 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4992 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4993 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4994 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4995 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4996 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4997 "\x63\x65\x65\x72\x73\x74\x54\x20"
4998 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4999 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005000 }, { /* Generated with Crypto++ */
5001 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5002 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5003 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5004 .klen = 24,
5005 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5006 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5007 .input = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
5008 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
5009 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
5010 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
5011 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
5012 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
5013 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
5014 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
5015 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
5016 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
5017 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
5018 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
5019 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
5020 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
5021 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
5022 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
5023 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
5024 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
5025 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
5026 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
5027 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
5028 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
5029 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
5030 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
5031 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
5032 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
5033 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
5034 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
5035 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
5036 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
5037 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
5038 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
5039 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
5040 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
5041 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
5042 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
5043 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
5044 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
5045 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
5046 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
5047 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
5048 "\x73\x50\x08\x56\x20\x9B\x94\x23"
5049 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
5050 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
5051 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
5052 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
5053 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
5054 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
5055 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
5056 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
5057 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
5058 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
5059 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
5060 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
5061 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
5062 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
5063 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
5064 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
5065 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
5066 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
5067 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
5068 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
5069 .ilen = 496,
5070 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5071 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5072 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5073 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5074 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5075 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5076 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5077 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5078 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5079 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5080 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5081 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5082 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5083 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5084 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5085 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5086 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5087 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5088 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5089 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5090 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5091 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5092 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5093 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5094 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5095 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5096 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5097 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5098 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5099 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5100 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5101 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5102 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5103 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5104 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5105 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5106 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5107 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5108 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5109 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5110 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5111 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5112 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5113 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5114 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5115 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5116 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5117 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5118 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5119 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5120 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5121 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5122 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5123 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5124 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5125 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5126 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5127 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5128 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5129 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5130 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5131 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5132 .rlen = 496,
5133 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005134 .np = 3,
5135 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005136 },
5137};
5138
5139static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
5140 { /* Generated with Crypto++ */
5141 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5142 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5143 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5144 .klen = 24,
5145 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5146 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5147 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5148 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5149 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5150 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5151 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5152 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5153 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5154 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5155 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5156 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5157 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5158 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5159 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5160 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5161 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5162 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5163 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5164 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5165 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5166 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5167 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5168 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5169 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5170 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5171 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5172 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5173 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5174 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5175 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5176 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5177 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5178 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5179 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5180 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5181 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5182 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5183 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5184 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5185 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5186 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5187 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5188 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5189 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5190 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5191 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5192 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5193 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5194 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5195 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5196 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5197 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5198 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5199 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5200 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5201 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5202 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5203 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5204 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5205 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5206 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5207 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5208 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5209 .ilen = 496,
5210 .result = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5211 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5212 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5213 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5214 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5215 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5216 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5217 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5218 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5219 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5220 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5221 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5222 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5223 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5224 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5225 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5226 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5227 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5228 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5229 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5230 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5231 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5232 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5233 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5234 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5235 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5236 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5237 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5238 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5239 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5240 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5241 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5242 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5243 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5244 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5245 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5246 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5247 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5248 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5249 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5250 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5251 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5252 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5253 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5254 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5255 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5256 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5257 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5258 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5259 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5260 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5261 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5262 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5263 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5264 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5265 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5266 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5267 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5268 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5269 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5270 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5271 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5272 .rlen = 496,
5273 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005274 .np = 3,
5275 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005276 }, { /* Generated with Crypto++ */
5277 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5278 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5279 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5280 .klen = 24,
5281 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5282 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5283 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5284 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5285 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5286 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5287 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5288 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5289 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5290 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5291 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5292 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5293 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5294 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5295 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5296 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5297 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5298 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5299 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5300 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5301 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5302 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5303 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5304 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5305 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5306 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5307 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5308 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5309 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5310 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5311 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5312 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5313 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5314 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5315 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5316 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5317 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5318 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5319 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5320 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5321 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5322 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5323 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5324 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5325 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5326 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5327 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5328 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5329 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5330 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5331 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5332 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5333 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5334 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5335 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5336 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5337 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5338 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5339 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5340 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5341 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5342 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5343 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5344 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5345 "\x2E\xB1\x18",
5346 .ilen = 499,
5347 .result = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5348 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5349 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5350 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5351 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5352 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5353 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5354 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5355 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5356 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5357 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5358 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5359 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5360 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5361 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5362 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5363 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5364 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5365 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5366 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5367 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5368 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5369 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5370 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5371 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5372 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5373 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5374 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5375 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5376 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5377 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5378 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5379 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5380 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5381 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5382 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5383 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5384 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5385 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5386 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5387 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5388 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5389 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5390 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5391 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5392 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5393 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5394 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5395 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5396 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5397 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5398 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5399 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5400 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5401 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5402 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5403 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5404 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5405 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5406 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5407 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5408 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5409 "\xF2\x79\xD9",
5410 .rlen = 499,
5411 .also_non_np = 1,
5412 .np = 2,
5413 .tap = { 499 - 16, 16 },
5414 },
5415};
5416
5417static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
5418 { /* Generated with Crypto++ */
5419 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5420 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5421 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5422 .klen = 24,
5423 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5424 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5425 .input = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5426 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5427 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5428 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5429 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5430 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5431 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5432 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5433 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5434 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5435 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5436 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5437 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5438 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5439 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5440 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5441 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5442 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5443 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5444 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5445 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5446 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5447 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5448 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5449 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5450 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5451 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5452 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5453 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5454 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5455 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5456 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5457 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5458 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5459 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5460 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5461 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5462 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5463 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5464 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5465 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5466 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5467 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5468 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5469 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5470 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5471 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5472 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5473 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5474 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5475 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5476 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5477 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5478 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5479 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5480 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5481 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5482 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5483 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5484 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5485 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5486 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5487 .ilen = 496,
5488 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5489 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5490 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5491 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5492 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5493 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5494 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5495 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5496 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5497 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5498 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5499 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5500 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5501 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5502 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5503 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5504 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5505 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5506 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5507 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5508 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5509 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5510 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5511 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5512 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5513 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5514 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5515 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5516 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5517 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5518 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5519 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5520 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5521 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5522 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5523 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5524 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5525 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5526 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5527 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5528 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5529 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5530 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5531 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5532 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5533 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5534 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5535 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5536 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5537 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5538 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5539 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5540 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5541 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5542 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5543 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5544 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5545 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5546 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5547 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5548 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5549 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5550 .rlen = 496,
5551 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005552 .np = 3,
5553 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005554 }, { /* Generated with Crypto++ */
5555 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5556 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5557 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5558 .klen = 24,
5559 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5560 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5561 .input = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5562 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5563 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5564 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5565 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5566 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5567 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5568 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5569 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5570 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5571 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5572 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5573 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5574 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5575 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5576 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5577 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5578 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5579 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5580 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5581 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5582 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5583 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5584 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5585 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5586 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5587 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5588 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5589 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5590 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5591 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5592 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5593 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5594 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5595 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5596 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5597 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5598 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5599 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5600 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5601 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5602 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5603 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5604 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5605 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5606 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5607 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5608 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5609 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5610 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5611 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5612 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5613 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5614 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5615 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5616 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5617 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5618 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5619 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5620 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5621 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5622 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5623 "\xF2\x79\xD9",
5624 .ilen = 499,
5625 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5626 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5627 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5628 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5629 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5630 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5631 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5632 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5633 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5634 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5635 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5636 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5637 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5638 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5639 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5640 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5641 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5642 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5643 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5644 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5645 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5646 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5647 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5648 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5649 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5650 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5651 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5652 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5653 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5654 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5655 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5656 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5657 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5658 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5659 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5660 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5661 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5662 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5663 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5664 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5665 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5666 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5667 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5668 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5669 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5670 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5671 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5672 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5673 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5674 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5675 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5676 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5677 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5678 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5679 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5680 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5681 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5682 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5683 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5684 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5685 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5686 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5687 "\x2E\xB1\x18",
5688 .rlen = 499,
5689 .also_non_np = 1,
5690 .np = 2,
5691 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005692 },
5693};
5694
5695/*
5696 * Blowfish test vectors.
5697 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005698#define BF_ENC_TEST_VECTORS 7
5699#define BF_DEC_TEST_VECTORS 7
5700#define BF_CBC_ENC_TEST_VECTORS 2
5701#define BF_CBC_DEC_TEST_VECTORS 2
5702#define BF_CTR_ENC_TEST_VECTORS 2
5703#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08005704
5705static struct cipher_testvec bf_enc_tv_template[] = {
5706 { /* DES test vectors from OpenSSL */
5707 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5708 .klen = 8,
5709 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
5710 .ilen = 8,
5711 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5712 .rlen = 8,
5713 }, {
5714 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5715 .klen = 8,
5716 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5717 .ilen = 8,
5718 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5719 .rlen = 8,
5720 }, {
5721 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5722 .klen = 8,
5723 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5724 .ilen = 8,
5725 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5726 .rlen = 8,
5727 }, { /* Vary the keylength... */
5728 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5729 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5730 .klen = 16,
5731 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5732 .ilen = 8,
5733 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5734 .rlen = 8,
5735 }, {
5736 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5737 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5738 "\x00\x11\x22\x33\x44",
5739 .klen = 21,
5740 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5741 .ilen = 8,
5742 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5743 .rlen = 8,
5744 }, { /* Generated with bf488 */
5745 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5746 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5747 "\x00\x11\x22\x33\x44\x55\x66\x77"
5748 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5749 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5750 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5751 "\xff\xff\xff\xff\xff\xff\xff\xff",
5752 .klen = 56,
5753 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5754 .ilen = 8,
5755 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5756 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005757 }, { /* Generated with Crypto++ */
5758 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5759 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5760 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5761 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5762 .klen = 32,
5763 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5764 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5765 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5766 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005767 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5768 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5769 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5770 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5771 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5772 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5773 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5774 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5775 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5776 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5777 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5778 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5779 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5780 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5781 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5782 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5783 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5784 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5785 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5786 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5787 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5788 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5789 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5790 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5791 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5792 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5793 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5794 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5795 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5796 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5797 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5798 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5799 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5800 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5801 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5802 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5803 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5804 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5805 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5806 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5807 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5808 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5809 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5810 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5811 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5812 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5813 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5814 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5815 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5816 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5817 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5818 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5819 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5820 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5821 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5822 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5823 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5824 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5825 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5826 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005827 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5828 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5829 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5830 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005831 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5832 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5833 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5834 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5835 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5836 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5837 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5838 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5839 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5840 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5841 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5842 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5843 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5844 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5845 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5846 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5847 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5848 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5849 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5850 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5851 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5852 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5853 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5854 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5855 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5856 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5857 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5858 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5859 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5860 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5861 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5862 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5863 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5864 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5865 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5866 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5867 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5868 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5869 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5870 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5871 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5872 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5873 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5874 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5875 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5876 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5877 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5878 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5879 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5880 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5881 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5882 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5883 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5884 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5885 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5886 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5887 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5888 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5889 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5890 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005891 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005892 .np = 3,
5893 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005894 },
5895};
5896
5897static struct cipher_testvec bf_dec_tv_template[] = {
5898 { /* DES test vectors from OpenSSL */
5899 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5900 .klen = 8,
5901 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5902 .ilen = 8,
5903 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
5904 .rlen = 8,
5905 }, {
5906 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5907 .klen = 8,
5908 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5909 .ilen = 8,
5910 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5911 .rlen = 8,
5912 }, {
5913 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5914 .klen = 8,
5915 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5916 .ilen = 8,
5917 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5918 .rlen = 8,
5919 }, { /* Vary the keylength... */
5920 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5921 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5922 .klen = 16,
5923 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5924 .ilen = 8,
5925 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5926 .rlen = 8,
5927 }, {
5928 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5929 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5930 "\x00\x11\x22\x33\x44",
5931 .klen = 21,
5932 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5933 .ilen = 8,
5934 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5935 .rlen = 8,
5936 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
5937 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5938 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5939 "\x00\x11\x22\x33\x44\x55\x66\x77"
5940 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5941 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5942 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5943 "\xff\xff\xff\xff\xff\xff\xff\xff",
5944 .klen = 56,
5945 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5946 .ilen = 8,
5947 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5948 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005949 }, { /* Generated with Crypto++ */
5950 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5951 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5952 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5953 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5954 .klen = 32,
5955 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5956 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5957 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5958 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005959 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5960 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5961 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5962 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5963 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5964 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5965 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5966 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5967 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5968 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5969 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5970 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5971 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5972 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5973 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5974 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5975 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5976 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5977 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5978 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5979 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5980 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5981 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5982 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5983 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5984 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5985 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5986 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5987 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5988 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5989 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5990 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5991 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5992 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5993 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5994 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5995 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5996 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5997 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5998 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5999 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
6000 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
6001 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
6002 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
6003 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
6004 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
6005 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
6006 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
6007 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
6008 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
6009 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
6010 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
6011 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
6012 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
6013 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
6014 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
6015 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
6016 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
6017 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
6018 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006019 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6020 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6021 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6022 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006023 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6024 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6025 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6026 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6027 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6028 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6029 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6030 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6031 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6032 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6033 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6034 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6035 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6036 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6037 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6038 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6039 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6040 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6041 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6042 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6043 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6044 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6045 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6046 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6047 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6048 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6049 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6050 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6051 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6052 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6053 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6054 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6055 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6056 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6057 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6058 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6059 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6060 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6061 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6062 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6063 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6064 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6065 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6066 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6067 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6068 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6069 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6070 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6071 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6072 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6073 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6074 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6075 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6076 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6077 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6078 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6079 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6080 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6081 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6082 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006083 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006084 .np = 3,
6085 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006086 },
6087};
6088
6089static struct cipher_testvec bf_cbc_enc_tv_template[] = {
6090 { /* From OpenSSL */
6091 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6092 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6093 .klen = 16,
6094 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6095 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
6096 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
6097 "\x68\x65\x20\x74\x69\x6d\x65\x20"
6098 "\x66\x6f\x72\x20\x00\x00\x00\x00",
6099 .ilen = 32,
6100 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
6101 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
6102 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
6103 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
6104 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006105 }, { /* Generated with Crypto++ */
6106 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6107 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6108 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6109 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6110 .klen = 32,
6111 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6112 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6113 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6114 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6115 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006116 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6117 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6118 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6119 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6120 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6121 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6122 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6123 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6124 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6125 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6126 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6127 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6128 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6129 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6130 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6131 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6132 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6133 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6134 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6135 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6136 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6137 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6138 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6139 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6140 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6141 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6142 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6143 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6144 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6145 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6146 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6147 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6148 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6149 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6150 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6151 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6152 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6153 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6154 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6155 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6156 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6157 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6158 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6159 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6160 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6161 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6162 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6163 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6164 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6165 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6166 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6167 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6168 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6169 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6170 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6171 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6172 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6173 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6174 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6175 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006176 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
6177 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
6178 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
6179 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006180 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
6181 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
6182 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
6183 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
6184 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
6185 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
6186 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
6187 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
6188 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
6189 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
6190 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
6191 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
6192 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
6193 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
6194 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
6195 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
6196 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
6197 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
6198 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
6199 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
6200 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
6201 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
6202 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
6203 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
6204 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
6205 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
6206 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
6207 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
6208 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
6209 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
6210 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
6211 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
6212 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
6213 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
6214 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
6215 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
6216 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
6217 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
6218 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
6219 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
6220 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
6221 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
6222 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
6223 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6224 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6225 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6226 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6227 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6228 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6229 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6230 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6231 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6232 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6233 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6234 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6235 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6236 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6237 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6238 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6239 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006240 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006241 .np = 3,
6242 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006243 },
6244};
6245
6246static struct cipher_testvec bf_cbc_dec_tv_template[] = {
6247 { /* From OpenSSL */
6248 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6249 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6250 .klen = 16,
6251 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6252 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
6253 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
6254 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
6255 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
6256 .ilen = 32,
6257 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
6258 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
6259 "\x68\x65\x20\x74\x69\x6d\x65\x20"
6260 "\x66\x6f\x72\x20\x00\x00\x00\x00",
6261 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006262 }, { /* Generated with Crypto++ */
6263 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6264 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6265 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6266 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6267 .klen = 32,
6268 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6269 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
6270 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
6271 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
6272 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006273 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
6274 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
6275 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
6276 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
6277 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
6278 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
6279 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
6280 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
6281 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
6282 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
6283 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
6284 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
6285 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
6286 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
6287 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
6288 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
6289 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
6290 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
6291 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
6292 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
6293 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
6294 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
6295 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
6296 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
6297 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
6298 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
6299 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
6300 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
6301 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
6302 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
6303 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
6304 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
6305 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
6306 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
6307 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
6308 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
6309 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
6310 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
6311 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
6312 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
6313 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
6314 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
6315 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
6316 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6317 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6318 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6319 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6320 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6321 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6322 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6323 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6324 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6325 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6326 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6327 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6328 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6329 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6330 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6331 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6332 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006333 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6334 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6335 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6336 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006337 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6338 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6339 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6340 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6341 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6342 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6343 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6344 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6345 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6346 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6347 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6348 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6349 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6350 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6351 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6352 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6353 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6354 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6355 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6356 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6357 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6358 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6359 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6360 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6361 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6362 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6363 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6364 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6365 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6366 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6367 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6368 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6369 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6370 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6371 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6372 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6373 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6374 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6375 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6376 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6377 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6378 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6379 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6380 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6381 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6382 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6383 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6384 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6385 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6386 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6387 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6388 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6389 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6390 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6391 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6392 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6393 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6394 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6395 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6396 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006397 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006398 .np = 3,
6399 .tap = { 504 - 10, 2, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006400 },
6401};
6402
6403static struct cipher_testvec bf_ctr_enc_tv_template[] = {
6404 { /* Generated with Crypto++ */
6405 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6406 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6407 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6408 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6409 .klen = 32,
6410 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6411 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6412 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6413 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6414 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006415 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6416 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6417 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6418 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6419 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6420 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6421 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6422 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6423 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6424 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6425 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6426 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6427 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6428 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6429 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6430 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6431 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6432 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6433 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6434 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6435 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6436 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6437 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6438 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6439 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6440 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6441 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6442 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6443 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6444 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6445 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6446 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6447 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6448 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6449 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6450 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6451 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6452 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6453 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6454 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6455 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6456 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6457 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6458 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6459 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6460 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6461 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6462 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6463 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6464 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6465 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6466 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6467 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6468 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6469 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6470 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6471 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6472 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6473 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6474 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006475 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6476 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6477 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6478 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006479 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6480 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6481 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6482 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6483 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6484 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6485 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6486 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6487 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6488 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6489 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6490 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6491 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6492 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6493 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6494 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6495 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6496 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6497 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6498 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6499 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6500 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6501 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6502 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6503 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6504 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6505 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6506 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6507 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6508 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6509 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6510 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6511 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6512 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6513 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6514 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6515 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6516 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6517 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6518 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6519 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6520 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6521 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6522 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6523 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6524 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6525 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6526 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6527 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6528 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6529 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6530 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6531 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6532 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6533 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6534 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6535 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6536 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6537 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6538 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006539 }, { /* Generated with Crypto++ */
6540 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6541 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6542 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6543 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6544 .klen = 32,
6545 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6546 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6547 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6548 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6549 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6550 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006551 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6552 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6553 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6554 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6555 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6556 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6557 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6558 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6559 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6560 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6561 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6562 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6563 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6564 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6565 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6566 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6567 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6568 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6569 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6570 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6571 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6572 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6573 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6574 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6575 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6576 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6577 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6578 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6579 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6580 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6581 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6582 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6583 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6584 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6585 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6586 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6587 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6588 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6589 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6590 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6591 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6592 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6593 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6594 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6595 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6596 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6597 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6598 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6599 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6600 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6601 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6602 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6603 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6604 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6605 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6606 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6607 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6608 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6609 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006610 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6611 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6612 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6613 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6614 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006615 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6616 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6617 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6618 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6619 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6620 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6621 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6622 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6623 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6624 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6625 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6626 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6627 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6628 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6629 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6630 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6631 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6632 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6633 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6634 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6635 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6636 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6637 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6638 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6639 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6640 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6641 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6642 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6643 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6644 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6645 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6646 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6647 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6648 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6649 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6650 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6651 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6652 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6653 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6654 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6655 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6656 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6657 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6658 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6659 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6660 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6661 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6662 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6663 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6664 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6665 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6666 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6667 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6668 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6669 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6670 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6671 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6672 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6673 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006674 .also_non_np = 1,
6675 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006676 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006677 }, { /* Generated with Crypto++ */
6678 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6679 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6680 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6681 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6682 .klen = 32,
6683 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6684 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6685 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6686 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6687 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6688 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6689 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6690 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6691 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6692 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6693 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6694 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6695 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6696 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6697 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6698 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6699 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6700 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6701 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6702 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6703 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6704 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6705 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6706 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6707 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6708 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6709 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6710 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6711 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6712 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6713 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6714 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6715 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6716 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6717 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6718 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6719 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6720 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6721 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6722 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6723 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6724 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6725 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6726 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6727 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6728 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6729 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6730 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6731 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6732 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6733 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6734 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6735 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6736 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6737 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6738 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6739 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6740 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6741 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6742 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6743 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6744 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6745 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6746 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6747 .ilen = 504,
6748 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6749 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6750 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6751 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6752 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6753 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6754 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6755 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6756 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6757 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6758 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6759 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6760 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6761 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6762 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6763 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6764 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6765 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6766 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6767 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6768 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6769 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6770 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6771 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6772 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6773 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6774 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6775 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6776 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6777 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6778 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6779 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6780 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6781 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6782 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6783 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6784 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6785 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6786 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6787 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6788 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6789 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6790 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6791 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6792 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
6793 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
6794 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
6795 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
6796 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
6797 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
6798 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
6799 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
6800 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
6801 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
6802 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
6803 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
6804 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
6805 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
6806 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
6807 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
6808 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
6809 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
6810 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
6811 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006812 },
6813};
6814
6815static struct cipher_testvec bf_ctr_dec_tv_template[] = {
6816 { /* Generated with Crypto++ */
6817 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6818 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6819 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6820 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6821 .klen = 32,
6822 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6823 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6824 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6825 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6826 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006827 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6828 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6829 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6830 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6831 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6832 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6833 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6834 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6835 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6836 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6837 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6838 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6839 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6840 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6841 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6842 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6843 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6844 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6845 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6846 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6847 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6848 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6849 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6850 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6851 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6852 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6853 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6854 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6855 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6856 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6857 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6858 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6859 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6860 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6861 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6862 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6863 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6864 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6865 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6866 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6867 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6868 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6869 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6870 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6871 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6872 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6873 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6874 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6875 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6876 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6877 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6878 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6879 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6880 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6881 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6882 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6883 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6884 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6885 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6886 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006887 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6888 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6889 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6890 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006891 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6892 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6893 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6894 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6895 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6896 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6897 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6898 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6899 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6900 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6901 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6902 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6903 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6904 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6905 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6906 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6907 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6908 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6909 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6910 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6911 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6912 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6913 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6914 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6915 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6916 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6917 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6918 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6919 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6920 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6921 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6922 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6923 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6924 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6925 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6926 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6927 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6928 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6929 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6930 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6931 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6932 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6933 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6934 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6935 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6936 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6937 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6938 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6939 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6940 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6941 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6942 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6943 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6944 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6945 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6946 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6947 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6948 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6949 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6950 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006951 }, { /* Generated with Crypto++ */
6952 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6953 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6954 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6955 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6956 .klen = 32,
6957 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6958 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6959 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6960 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6961 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6962 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006963 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6964 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6965 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6966 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6967 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6968 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6969 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6970 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6971 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6972 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6973 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6974 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6975 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6976 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6977 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6978 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6979 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6980 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6981 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6982 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6983 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6984 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6985 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6986 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6987 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6988 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6989 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6990 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6991 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6992 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6993 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6994 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6995 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6996 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6997 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6998 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6999 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
7000 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
7001 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
7002 "\x82\x63\x11\xB3\x54\x49\x00\x08"
7003 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
7004 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
7005 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
7006 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
7007 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
7008 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
7009 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
7010 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
7011 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
7012 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
7013 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
7014 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
7015 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
7016 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
7017 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
7018 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
7019 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
7020 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
7021 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03007022 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7023 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7024 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7025 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7026 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03007027 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7028 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7029 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7030 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7031 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7032 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7033 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7034 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7035 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7036 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7037 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7038 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7039 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7040 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7041 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7042 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7043 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7044 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7045 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7046 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7047 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7048 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7049 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7050 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7051 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7052 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7053 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7054 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7055 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7056 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7057 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7058 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7059 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7060 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7061 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7062 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7063 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7064 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7065 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7066 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7067 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7068 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7069 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7070 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7071 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7072 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7073 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7074 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7075 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7076 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7077 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7078 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7079 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7080 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7081 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7082 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7083 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7084 "\x2B\xC2\x59\xF0\x64\xFB\x92",
7085 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007086 .also_non_np = 1,
7087 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03007088 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007089 }, { /* Generated with Crypto++ */
7090 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7091 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7092 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7093 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7094 .klen = 32,
7095 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7096 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
7097 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
7098 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
7099 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
7100 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
7101 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
7102 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
7103 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
7104 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
7105 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
7106 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
7107 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
7108 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
7109 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
7110 "\x0B\x82\x59\x14\x26\x67\x08\x09"
7111 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
7112 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
7113 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
7114 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
7115 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
7116 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
7117 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
7118 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
7119 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
7120 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
7121 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
7122 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
7123 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
7124 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
7125 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
7126 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
7127 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
7128 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
7129 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
7130 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
7131 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
7132 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
7133 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
7134 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
7135 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
7136 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
7137 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
7138 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
7139 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
7140 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
7141 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
7142 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
7143 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
7144 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
7145 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
7146 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
7147 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
7148 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
7149 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
7150 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
7151 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
7152 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
7153 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
7154 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
7155 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
7156 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
7157 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
7158 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
7159 .ilen = 504,
7160 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7161 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7162 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7163 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7164 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7165 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7166 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7167 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7168 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7169 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7170 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7171 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7172 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7173 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7174 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7175 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7176 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7177 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7178 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7179 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7180 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7181 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7182 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7183 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7184 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7185 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7186 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7187 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7188 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7189 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7190 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7191 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7192 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7193 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7194 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7195 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7196 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7197 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7198 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7199 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7200 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7201 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7202 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7203 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7204 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7205 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7206 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7207 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7208 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7209 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7210 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7211 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7212 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7213 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7214 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7215 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7216 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7217 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7218 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7219 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7220 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7221 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7222 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
7223 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08007224 },
7225};
7226
7227/*
7228 * Twofish test vectors.
7229 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03007230#define TF_ENC_TEST_VECTORS 4
7231#define TF_DEC_TEST_VECTORS 4
7232#define TF_CBC_ENC_TEST_VECTORS 5
7233#define TF_CBC_DEC_TEST_VECTORS 5
7234#define TF_CTR_ENC_TEST_VECTORS 2
7235#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03007236#define TF_LRW_ENC_TEST_VECTORS 8
7237#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03007238#define TF_XTS_ENC_TEST_VECTORS 5
7239#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08007240
7241static struct cipher_testvec tf_enc_tv_template[] = {
7242 {
7243 .key = zeroed_string,
7244 .klen = 16,
7245 .input = zeroed_string,
7246 .ilen = 16,
7247 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7248 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7249 .rlen = 16,
7250 }, {
7251 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7252 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7253 "\x00\x11\x22\x33\x44\x55\x66\x77",
7254 .klen = 24,
7255 .input = zeroed_string,
7256 .ilen = 16,
7257 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7258 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7259 .rlen = 16,
7260 }, {
7261 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7262 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7263 "\x00\x11\x22\x33\x44\x55\x66\x77"
7264 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7265 .klen = 32,
7266 .input = zeroed_string,
7267 .ilen = 16,
7268 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7269 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7270 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007271 }, { /* Generated with Crypto++ */
7272 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7273 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7274 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7275 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7276 .klen = 32,
7277 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7278 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7279 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7280 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7281 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7282 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7283 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007284 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7285 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7286 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7287 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7288 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7289 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7290 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7291 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7292 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7293 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7294 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7295 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7296 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7297 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7298 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7299 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7300 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7301 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7302 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7303 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7304 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7305 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7306 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7307 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7308 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7309 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7310 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7311 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7312 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7313 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7314 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7315 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7316 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7317 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7318 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7319 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7320 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7321 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7322 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7323 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7324 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7325 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7326 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7327 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7328 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7329 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7330 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7331 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7332 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7333 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7334 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7335 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7336 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7337 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7338 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7339 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007340 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7341 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7342 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7343 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7344 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7345 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7346 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007347 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7348 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7349 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7350 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7351 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7352 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7353 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7354 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7355 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7356 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7357 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7358 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7359 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7360 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7361 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7362 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7363 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7364 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7365 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7366 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7367 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7368 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7369 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7370 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7371 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7372 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7373 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7374 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7375 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7376 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7377 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7378 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7379 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7380 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7381 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7382 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7383 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7384 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7385 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7386 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7387 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7388 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7389 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7390 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7391 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7392 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7393 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7394 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7395 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7396 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7397 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7398 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7399 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7400 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7401 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7402 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007403 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007404 .np = 3,
7405 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007406 },
7407};
7408
7409static struct cipher_testvec tf_dec_tv_template[] = {
7410 {
7411 .key = zeroed_string,
7412 .klen = 16,
7413 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7414 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7415 .ilen = 16,
7416 .result = zeroed_string,
7417 .rlen = 16,
7418 }, {
7419 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7420 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7421 "\x00\x11\x22\x33\x44\x55\x66\x77",
7422 .klen = 24,
7423 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7424 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7425 .ilen = 16,
7426 .result = zeroed_string,
7427 .rlen = 16,
7428 }, {
7429 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7430 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7431 "\x00\x11\x22\x33\x44\x55\x66\x77"
7432 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7433 .klen = 32,
7434 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7435 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7436 .ilen = 16,
7437 .result = zeroed_string,
7438 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007439 }, { /* Generated with Crypto++ */
7440 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7441 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7442 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7443 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7444 .klen = 32,
7445 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7446 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7447 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7448 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7449 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7450 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7451 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007452 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7453 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7454 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7455 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7456 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7457 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7458 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7459 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7460 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7461 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7462 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7463 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7464 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7465 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7466 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7467 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7468 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7469 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7470 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7471 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7472 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7473 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7474 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7475 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7476 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7477 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7478 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7479 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7480 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7481 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7482 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7483 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7484 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7485 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7486 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7487 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7488 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7489 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7490 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7491 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7492 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7493 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7494 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7495 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7496 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7497 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7498 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7499 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7500 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7501 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7502 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7503 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7504 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7505 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7506 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7507 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007508 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7509 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7510 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7511 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7512 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7513 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7514 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007515 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7516 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7517 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7518 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7519 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7520 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7521 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7522 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7523 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7524 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7525 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7526 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7527 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7528 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7529 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7530 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7531 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7532 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7533 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7534 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7535 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7536 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7537 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7538 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7539 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7540 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7541 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7542 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7543 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7544 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7545 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7546 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7547 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7548 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7549 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7550 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7551 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7552 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7553 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7554 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7555 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7556 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7557 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7558 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7559 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7560 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7561 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7562 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7563 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7564 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7565 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7566 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7567 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7568 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7569 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7570 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007571 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007572 .np = 3,
7573 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007574 },
7575};
7576
7577static struct cipher_testvec tf_cbc_enc_tv_template[] = {
7578 { /* Generated with Nettle */
7579 .key = zeroed_string,
7580 .klen = 16,
7581 .iv = zeroed_string,
7582 .input = zeroed_string,
7583 .ilen = 16,
7584 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7585 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7586 .rlen = 16,
7587 }, {
7588 .key = zeroed_string,
7589 .klen = 16,
7590 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7591 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7592 .input = zeroed_string,
7593 .ilen = 16,
7594 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7595 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7596 .rlen = 16,
7597 }, {
7598 .key = zeroed_string,
7599 .klen = 16,
7600 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7601 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7602 .input = zeroed_string,
7603 .ilen = 16,
7604 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7605 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7606 .rlen = 16,
7607 }, {
7608 .key = zeroed_string,
7609 .klen = 16,
7610 .iv = zeroed_string,
7611 .input = zeroed_string,
7612 .ilen = 48,
7613 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7614 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7615 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7616 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7617 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7618 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7619 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007620 }, { /* Generated with Crypto++ */
7621 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7622 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7623 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7624 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7625 .klen = 32,
7626 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7627 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7628 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7629 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7630 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7631 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7632 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7633 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7634 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007635 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7636 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7637 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7638 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7639 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7640 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7641 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7642 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7643 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7644 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7645 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7646 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7647 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7648 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7649 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7650 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7651 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7652 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7653 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7654 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7655 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7656 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7657 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7658 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7659 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7660 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7661 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7662 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7663 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7664 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7665 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7666 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7667 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7668 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7669 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7670 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7671 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7672 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7673 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7674 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7675 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7676 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7677 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7678 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7679 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7680 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7681 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7682 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7683 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7684 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7685 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7686 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7687 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7688 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7689 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7690 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007691 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7692 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7693 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7694 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7695 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7696 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7697 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007698 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7699 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7700 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7701 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7702 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7703 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7704 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7705 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7706 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7707 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7708 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7709 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7710 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7711 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7712 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7713 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7714 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7715 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7716 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7717 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7718 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7719 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7720 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7721 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7722 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7723 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7724 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7725 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7726 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7727 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7728 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7729 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7730 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7731 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7732 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7733 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7734 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7735 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7736 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7737 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7738 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7739 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7740 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7741 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7742 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7743 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7744 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7745 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7746 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7747 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7748 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7749 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7750 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7751 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7752 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7753 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007754 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007755 .np = 3,
7756 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007757 },
7758};
7759
7760static struct cipher_testvec tf_cbc_dec_tv_template[] = {
7761 { /* Reverse of the first four above */
7762 .key = zeroed_string,
7763 .klen = 16,
7764 .iv = zeroed_string,
7765 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7766 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7767 .ilen = 16,
7768 .result = zeroed_string,
7769 .rlen = 16,
7770 }, {
7771 .key = zeroed_string,
7772 .klen = 16,
7773 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7774 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7775 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7776 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7777 .ilen = 16,
7778 .result = zeroed_string,
7779 .rlen = 16,
7780 }, {
7781 .key = zeroed_string,
7782 .klen = 16,
7783 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7784 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7785 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7786 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7787 .ilen = 16,
7788 .result = zeroed_string,
7789 .rlen = 16,
7790 }, {
7791 .key = zeroed_string,
7792 .klen = 16,
7793 .iv = zeroed_string,
7794 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7795 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7796 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7797 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7798 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7799 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7800 .ilen = 48,
7801 .result = zeroed_string,
7802 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007803 }, { /* 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 = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7812 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7813 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7814 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7815 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7816 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7817 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007818 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7819 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7820 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7821 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7822 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7823 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7824 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7825 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7826 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7827 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7828 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7829 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7830 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7831 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7832 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7833 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7834 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7835 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7836 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7837 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7838 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7839 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7840 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7841 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7842 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7843 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7844 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7845 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7846 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7847 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7848 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7849 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7850 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7851 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7852 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7853 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7854 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7855 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7856 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7857 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7858 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7859 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7860 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7861 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7862 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7863 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7864 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7865 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7866 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7867 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7868 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7869 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7870 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7871 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7872 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7873 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007874 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7875 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7876 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7877 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7878 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7879 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7880 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007881 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7882 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7883 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7884 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7885 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7886 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7887 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7888 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7889 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7890 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7891 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7892 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7893 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7894 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7895 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7896 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7897 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7898 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7899 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7900 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7901 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7902 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7903 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7904 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7905 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7906 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7907 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7908 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7909 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7910 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7911 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7912 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7913 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7914 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7915 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7916 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7917 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7918 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7919 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7920 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7921 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7922 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7923 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7924 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7925 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7926 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7927 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7928 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7929 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7930 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7931 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7932 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7933 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7934 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7935 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7936 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007937 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007938 .np = 3,
7939 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03007940 },
7941};
7942
7943static struct cipher_testvec tf_ctr_enc_tv_template[] = {
7944 { /* Generated with Crypto++ */
7945 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7946 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7947 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7948 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7949 .klen = 32,
7950 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7951 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7952 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7953 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7954 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7955 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7956 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7957 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7958 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007959 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7960 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7961 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7962 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7963 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7964 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7965 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7966 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7967 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7968 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7969 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7970 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7971 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7972 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7973 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7974 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7975 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7976 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7977 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7978 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7979 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7980 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7981 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7982 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7983 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7984 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7985 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7986 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7987 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7988 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7989 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7990 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7991 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7992 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7993 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7994 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7995 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7996 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7997 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7998 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7999 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8000 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8001 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8002 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8003 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8004 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8005 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8006 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8007 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8008 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8009 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8010 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8011 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8012 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8013 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8014 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008015 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8016 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8017 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8018 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8019 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8020 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8021 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008022 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8023 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8024 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8025 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8026 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8027 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8028 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8029 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8030 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8031 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8032 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8033 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8034 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8035 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8036 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8037 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8038 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8039 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8040 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8041 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8042 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8043 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8044 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8045 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8046 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8047 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8048 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8049 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8050 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8051 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8052 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8053 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8054 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8055 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8056 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8057 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8058 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8059 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8060 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8061 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8062 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8063 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8064 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8065 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8066 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8067 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8068 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8069 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8070 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8071 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8072 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8073 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8074 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8075 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8076 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
8077 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008078 }, { /* Generated with Crypto++ */
8079 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8080 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8081 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8082 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8083 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03008084 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
8085 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
8086 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8087 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8088 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8089 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8090 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8091 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8092 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8093 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8094 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8095 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8096 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8097 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8098 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8099 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8100 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8101 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8102 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8103 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8104 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8105 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8106 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8107 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8108 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8109 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8110 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8111 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8112 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8113 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8114 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8115 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8116 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8117 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8118 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8119 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8120 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8121 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8122 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8123 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8124 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8125 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8126 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8127 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8128 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8129 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8130 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8131 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8132 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8133 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8134 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8135 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8136 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8137 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8138 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8139 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8140 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8141 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8142 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8143 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8144 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8145 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8146 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8147 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8148 .ilen = 496,
8149 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8150 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8151 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8152 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8153 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8154 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8155 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8156 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8157 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8158 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8159 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8160 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8161 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8162 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8163 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8164 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8165 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8166 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8167 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8168 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8169 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8170 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8171 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8172 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8173 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8174 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8175 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8176 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8177 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8178 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8179 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8180 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8181 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8182 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8183 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8184 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8185 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8186 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8187 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8188 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8189 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8190 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8191 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8192 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8193 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8194 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8195 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8196 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8197 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8198 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8199 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8200 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8201 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8202 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8203 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8204 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8205 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8206 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8207 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8208 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8209 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8210 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8211 .rlen = 496,
8212 }, { /* Generated with Crypto++ */
8213 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8214 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8215 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8216 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8217 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008218 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8219 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8220 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8221 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8222 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8223 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8224 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8225 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8226 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8227 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008228 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8229 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8230 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8231 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8232 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8233 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8234 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8235 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8236 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8237 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8238 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8239 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8240 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8241 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8242 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8243 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8244 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8245 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8246 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8247 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8248 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8249 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8250 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8251 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8252 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8253 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8254 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8255 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8256 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8257 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8258 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8259 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8260 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8261 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8262 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8263 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8264 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8265 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8266 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8267 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8268 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8269 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8270 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8271 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8272 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8273 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8274 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8275 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8276 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8277 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8278 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8279 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8280 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8281 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8282 "\x2B\xC2\x59",
8283 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008284 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8285 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8286 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8287 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8288 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8289 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8290 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8291 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008292 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8293 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8294 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8295 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8296 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8297 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8298 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8299 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8300 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8301 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8302 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8303 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8304 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8305 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8306 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8307 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8308 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8309 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8310 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8311 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8312 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8313 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8314 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8315 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8316 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8317 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8318 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8319 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8320 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8321 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8322 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8323 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8324 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8325 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8326 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8327 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8328 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8329 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8330 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8331 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8332 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8333 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8334 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8335 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8336 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8337 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8338 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8339 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8340 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8341 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8342 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8343 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8344 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8345 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8346 "\x6C\x82\x9D",
8347 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008348 .also_non_np = 1,
8349 .np = 2,
8350 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03008351 },
8352};
8353
8354static struct cipher_testvec tf_ctr_dec_tv_template[] = {
8355 { /* Generated with Crypto++ */
8356 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8357 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8358 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8359 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8360 .klen = 32,
8361 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8362 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8363 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8364 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8365 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8366 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8367 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8368 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8369 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008370 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8371 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8372 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8373 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8374 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8375 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8376 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8377 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8378 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8379 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8380 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8381 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8382 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8383 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8384 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8385 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8386 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8387 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8388 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8389 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8390 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8391 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8392 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8393 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8394 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8395 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8396 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8397 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8398 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8399 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8400 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8401 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8402 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8403 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8404 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8405 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8406 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8407 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8408 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8409 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8410 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8411 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8412 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8413 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8414 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8415 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8416 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8417 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8418 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8419 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8420 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8421 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8422 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8423 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8424 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
8425 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008426 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8427 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8428 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8429 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8430 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8431 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8432 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008433 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8434 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8435 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8436 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8437 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8438 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8439 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8440 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8441 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8442 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8443 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8444 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8445 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8446 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8447 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8448 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8449 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8450 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8451 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8452 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8453 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8454 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8455 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8456 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8457 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8458 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8459 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8460 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8461 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8462 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8463 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8464 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8465 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8466 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8467 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8468 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8469 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8470 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8471 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8472 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8473 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8474 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8475 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8476 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8477 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8478 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8479 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8480 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8481 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8482 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8483 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8484 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8485 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8486 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8487 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8488 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008489 }, { /* Generated with Crypto++ */
8490 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8491 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8492 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8493 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8494 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03008495 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
8496 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
8497 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8498 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8499 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8500 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8501 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8502 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8503 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8504 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8505 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8506 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8507 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8508 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8509 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8510 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8511 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8512 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8513 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8514 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8515 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8516 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8517 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8518 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8519 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8520 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8521 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8522 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8523 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8524 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8525 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8526 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8527 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8528 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8529 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8530 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8531 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8532 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8533 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8534 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8535 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8536 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8537 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8538 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8539 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8540 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8541 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8542 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8543 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8544 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8545 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8546 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8547 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8548 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8549 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8550 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8551 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8552 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8553 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8554 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8555 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8556 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8557 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8558 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8559 .ilen = 496,
8560 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8561 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8562 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8563 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8564 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8565 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8566 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8567 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8568 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8569 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8570 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8571 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8572 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8573 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8574 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8575 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8576 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8577 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8578 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8579 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8580 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8581 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8582 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8583 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8584 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8585 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8586 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8587 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8588 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8589 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8590 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8591 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8592 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8593 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8594 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8595 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8596 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8597 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8598 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8599 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8600 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8601 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8602 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8603 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8604 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8605 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8606 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8607 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8608 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8609 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8610 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8611 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8612 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8613 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8614 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8615 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8616 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8617 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8618 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8619 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8620 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8621 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8622 .rlen = 496,
8623 }, { /* Generated with Crypto++ */
8624 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8625 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8626 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8627 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8628 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008629 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8630 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8631 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8632 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8633 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8634 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8635 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8636 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8637 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8638 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008639 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8640 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8641 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8642 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8643 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8644 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8645 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8646 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8647 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8648 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8649 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8650 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8651 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8652 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8653 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8654 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8655 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8656 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8657 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8658 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8659 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8660 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8661 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8662 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8663 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8664 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8665 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8666 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8667 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8668 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8669 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8670 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8671 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8672 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8673 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8674 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8675 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8676 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8677 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8678 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8679 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8680 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8681 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8682 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8683 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8684 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8685 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8686 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8687 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8688 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8689 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8690 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8691 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8692 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8693 "\x6C\x82\x9D",
8694 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008695 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8696 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8697 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8698 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8699 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8700 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8701 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8702 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008703 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8704 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8705 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8706 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8707 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8708 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8709 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8710 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8711 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8712 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8713 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8714 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8715 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8716 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8717 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8718 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8719 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8720 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8721 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8722 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8723 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8724 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8725 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8726 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8727 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8728 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8729 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8730 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8731 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8732 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8733 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8734 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8735 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8736 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8737 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8738 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8739 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8740 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8741 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8742 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8743 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8744 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8745 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8746 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8747 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8748 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8749 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8750 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8751 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8752 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8753 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8754 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8755 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8756 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8757 "\x2B\xC2\x59",
8758 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008759 .also_non_np = 1,
8760 .np = 2,
8761 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008762 },
8763};
8764
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008765static struct cipher_testvec tf_lrw_enc_tv_template[] = {
8766 /* Generated from AES-LRW test vectors */
8767 {
8768 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8769 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8770 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8771 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8772 .klen = 32,
8773 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8774 "\x00\x00\x00\x00\x00\x00\x00\x01",
8775 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8776 "\x38\x39\x41\x42\x43\x44\x45\x46",
8777 .ilen = 16,
8778 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8779 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8780 .rlen = 16,
8781 }, {
8782 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8783 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8784 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8785 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8786 .klen = 32,
8787 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8788 "\x00\x00\x00\x00\x00\x00\x00\x02",
8789 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8790 "\x38\x39\x41\x42\x43\x44\x45\x46",
8791 .ilen = 16,
8792 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8793 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8794 .rlen = 16,
8795 }, {
8796 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8797 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8798 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8799 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8800 .klen = 32,
8801 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8802 "\x00\x00\x00\x02\x00\x00\x00\x00",
8803 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8804 "\x38\x39\x41\x42\x43\x44\x45\x46",
8805 .ilen = 16,
8806 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8807 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8808 .rlen = 16,
8809 }, {
8810 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8811 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8812 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8813 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8814 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8815 .klen = 40,
8816 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8817 "\x00\x00\x00\x00\x00\x00\x00\x01",
8818 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8819 "\x38\x39\x41\x42\x43\x44\x45\x46",
8820 .ilen = 16,
8821 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8822 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8823 .rlen = 16,
8824 }, {
8825 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8826 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8827 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8828 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8829 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8830 .klen = 40,
8831 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8832 "\x00\x00\x00\x02\x00\x00\x00\x00",
8833 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8834 "\x38\x39\x41\x42\x43\x44\x45\x46",
8835 .ilen = 16,
8836 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8837 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8838 .rlen = 16,
8839 }, {
8840 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8841 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8842 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8843 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8844 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8845 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8846 .klen = 48,
8847 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8848 "\x00\x00\x00\x00\x00\x00\x00\x01",
8849 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8850 "\x38\x39\x41\x42\x43\x44\x45\x46",
8851 .ilen = 16,
8852 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8853 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8854 .rlen = 16,
8855 }, {
8856 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8857 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8858 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8859 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8860 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8861 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8862 .klen = 48,
8863 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8864 "\x00\x00\x00\x02\x00\x00\x00\x00",
8865 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8866 "\x38\x39\x41\x42\x43\x44\x45\x46",
8867 .ilen = 16,
8868 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8869 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8870 .rlen = 16,
8871 }, {
8872 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8873 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8874 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8875 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8876 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8877 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8878 .klen = 48,
8879 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8880 "\x00\x00\x00\x00\x00\x00\x00\x01",
8881 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8882 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8883 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8884 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8885 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8886 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8887 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8888 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8889 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8890 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8891 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8892 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8893 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8894 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8895 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8896 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8897 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8898 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8899 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8900 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8901 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8902 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8903 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8904 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8905 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8906 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8907 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8908 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8909 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8910 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8911 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8912 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8913 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8914 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8915 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8916 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8917 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8918 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8919 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8920 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8921 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8922 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8923 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8924 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8925 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8926 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8927 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8928 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8929 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8930 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8931 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8932 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8933 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8934 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8935 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8936 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8937 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8938 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8939 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8940 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8941 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8942 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8943 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8944 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8945 .ilen = 512,
8946 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8947 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8948 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8949 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8950 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8951 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8952 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
8953 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
8954 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
8955 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
8956 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
8957 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
8958 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
8959 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
8960 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
8961 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
8962 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
8963 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
8964 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
8965 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
8966 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
8967 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
8968 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
8969 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
8970 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
8971 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
8972 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
8973 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
8974 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
8975 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
8976 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
8977 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
8978 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
8979 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
8980 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
8981 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
8982 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
8983 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
8984 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
8985 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
8986 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
8987 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
8988 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
8989 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
8990 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
8991 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
8992 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
8993 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
8994 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
8995 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
8996 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
8997 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
8998 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
8999 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
9000 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
9001 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
9002 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
9003 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
9004 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
9005 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
9006 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
9007 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
9008 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
9009 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
9010 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009011 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009012 .np = 3,
9013 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03009014 },
9015};
9016
9017static struct cipher_testvec tf_lrw_dec_tv_template[] = {
9018 /* Generated from AES-LRW test vectors */
9019 /* same as enc vectors with input and result reversed */
9020 {
9021 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
9022 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
9023 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
9024 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
9025 .klen = 32,
9026 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9027 "\x00\x00\x00\x00\x00\x00\x00\x01",
9028 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
9029 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
9030 .ilen = 16,
9031 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9032 "\x38\x39\x41\x42\x43\x44\x45\x46",
9033 .rlen = 16,
9034 }, {
9035 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
9036 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
9037 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
9038 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
9039 .klen = 32,
9040 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9041 "\x00\x00\x00\x00\x00\x00\x00\x02",
9042 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
9043 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
9044 .ilen = 16,
9045 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9046 "\x38\x39\x41\x42\x43\x44\x45\x46",
9047 .rlen = 16,
9048 }, {
9049 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
9050 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
9051 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
9052 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
9053 .klen = 32,
9054 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9055 "\x00\x00\x00\x02\x00\x00\x00\x00",
9056 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
9057 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
9058 .ilen = 16,
9059 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9060 "\x38\x39\x41\x42\x43\x44\x45\x46",
9061 .rlen = 16,
9062 }, {
9063 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
9064 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
9065 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
9066 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
9067 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
9068 .klen = 40,
9069 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9070 "\x00\x00\x00\x00\x00\x00\x00\x01",
9071 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
9072 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
9073 .ilen = 16,
9074 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9075 "\x38\x39\x41\x42\x43\x44\x45\x46",
9076 .rlen = 16,
9077 }, {
9078 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
9079 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
9080 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
9081 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
9082 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
9083 .klen = 40,
9084 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9085 "\x00\x00\x00\x02\x00\x00\x00\x00",
9086 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
9087 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
9088 .ilen = 16,
9089 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9090 "\x38\x39\x41\x42\x43\x44\x45\x46",
9091 .rlen = 16,
9092 }, {
9093 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9094 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9095 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9096 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9097 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9098 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9099 .klen = 48,
9100 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9101 "\x00\x00\x00\x00\x00\x00\x00\x01",
9102 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
9103 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
9104 .ilen = 16,
9105 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9106 "\x38\x39\x41\x42\x43\x44\x45\x46",
9107 .rlen = 16,
9108 }, {
9109 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
9110 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
9111 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
9112 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
9113 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
9114 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
9115 .klen = 48,
9116 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9117 "\x00\x00\x00\x02\x00\x00\x00\x00",
9118 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
9119 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
9120 .ilen = 16,
9121 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9122 "\x38\x39\x41\x42\x43\x44\x45\x46",
9123 .rlen = 16,
9124 }, {
9125 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9126 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9127 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9128 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9129 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9130 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9131 .klen = 48,
9132 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9133 "\x00\x00\x00\x00\x00\x00\x00\x01",
9134 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
9135 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
9136 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
9137 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
9138 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
9139 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
9140 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
9141 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
9142 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
9143 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
9144 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
9145 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
9146 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
9147 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
9148 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
9149 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
9150 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
9151 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
9152 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
9153 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
9154 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
9155 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
9156 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
9157 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
9158 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
9159 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
9160 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
9161 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
9162 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
9163 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
9164 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
9165 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
9166 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
9167 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
9168 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
9169 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
9170 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
9171 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
9172 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
9173 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
9174 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
9175 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
9176 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
9177 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
9178 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
9179 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
9180 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
9181 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
9182 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
9183 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
9184 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
9185 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
9186 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
9187 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
9188 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
9189 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
9190 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
9191 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
9192 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
9193 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
9194 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
9195 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
9196 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
9197 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
9198 .ilen = 512,
9199 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
9200 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
9201 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
9202 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
9203 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
9204 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
9205 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
9206 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
9207 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
9208 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
9209 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
9210 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
9211 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
9212 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
9213 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
9214 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
9215 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
9216 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
9217 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
9218 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
9219 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
9220 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
9221 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
9222 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
9223 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
9224 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
9225 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
9226 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
9227 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
9228 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
9229 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
9230 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
9231 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
9232 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
9233 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
9234 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
9235 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
9236 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
9237 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
9238 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
9239 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
9240 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
9241 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
9242 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9243 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9244 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9245 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9246 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9247 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9248 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9249 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9250 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9251 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9252 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9253 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9254 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9255 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9256 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9257 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9258 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9259 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9260 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9261 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9262 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9263 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009264 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009265 .np = 3,
9266 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03009267 },
9268};
9269
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009270static struct cipher_testvec tf_xts_enc_tv_template[] = {
9271 /* Generated from AES-XTS test vectors */
9272{
9273 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9274 "\x00\x00\x00\x00\x00\x00\x00\x00"
9275 "\x00\x00\x00\x00\x00\x00\x00\x00"
9276 "\x00\x00\x00\x00\x00\x00\x00\x00",
9277 .klen = 32,
9278 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9279 "\x00\x00\x00\x00\x00\x00\x00\x00",
9280 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9281 "\x00\x00\x00\x00\x00\x00\x00\x00"
9282 "\x00\x00\x00\x00\x00\x00\x00\x00"
9283 "\x00\x00\x00\x00\x00\x00\x00\x00",
9284 .ilen = 32,
9285 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9286 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9287 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9288 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9289 .rlen = 32,
9290 }, {
9291 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9292 "\x11\x11\x11\x11\x11\x11\x11\x11"
9293 "\x22\x22\x22\x22\x22\x22\x22\x22"
9294 "\x22\x22\x22\x22\x22\x22\x22\x22",
9295 .klen = 32,
9296 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9297 "\x00\x00\x00\x00\x00\x00\x00\x00",
9298 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
9299 "\x44\x44\x44\x44\x44\x44\x44\x44"
9300 "\x44\x44\x44\x44\x44\x44\x44\x44"
9301 "\x44\x44\x44\x44\x44\x44\x44\x44",
9302 .ilen = 32,
9303 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9304 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9305 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9306 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9307 .rlen = 32,
9308 }, {
9309 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9310 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9311 "\x22\x22\x22\x22\x22\x22\x22\x22"
9312 "\x22\x22\x22\x22\x22\x22\x22\x22",
9313 .klen = 32,
9314 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9315 "\x00\x00\x00\x00\x00\x00\x00\x00",
9316 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
9317 "\x44\x44\x44\x44\x44\x44\x44\x44"
9318 "\x44\x44\x44\x44\x44\x44\x44\x44"
9319 "\x44\x44\x44\x44\x44\x44\x44\x44",
9320 .ilen = 32,
9321 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9322 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9323 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9324 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9325 .rlen = 32,
9326 }, {
9327 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9328 "\x23\x53\x60\x28\x74\x71\x35\x26"
9329 "\x31\x41\x59\x26\x53\x58\x97\x93"
9330 "\x23\x84\x62\x64\x33\x83\x27\x95",
9331 .klen = 32,
9332 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9333 "\x00\x00\x00\x00\x00\x00\x00\x00",
9334 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9335 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9336 "\x10\x11\x12\x13\x14\x15\x16\x17"
9337 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9338 "\x20\x21\x22\x23\x24\x25\x26\x27"
9339 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9340 "\x30\x31\x32\x33\x34\x35\x36\x37"
9341 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9342 "\x40\x41\x42\x43\x44\x45\x46\x47"
9343 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9344 "\x50\x51\x52\x53\x54\x55\x56\x57"
9345 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9346 "\x60\x61\x62\x63\x64\x65\x66\x67"
9347 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9348 "\x70\x71\x72\x73\x74\x75\x76\x77"
9349 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9350 "\x80\x81\x82\x83\x84\x85\x86\x87"
9351 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9352 "\x90\x91\x92\x93\x94\x95\x96\x97"
9353 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9354 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9355 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9356 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9357 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9358 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9359 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9360 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9361 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9362 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9363 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9364 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9365 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9366 "\x00\x01\x02\x03\x04\x05\x06\x07"
9367 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9368 "\x10\x11\x12\x13\x14\x15\x16\x17"
9369 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9370 "\x20\x21\x22\x23\x24\x25\x26\x27"
9371 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9372 "\x30\x31\x32\x33\x34\x35\x36\x37"
9373 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9374 "\x40\x41\x42\x43\x44\x45\x46\x47"
9375 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9376 "\x50\x51\x52\x53\x54\x55\x56\x57"
9377 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9378 "\x60\x61\x62\x63\x64\x65\x66\x67"
9379 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9380 "\x70\x71\x72\x73\x74\x75\x76\x77"
9381 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9382 "\x80\x81\x82\x83\x84\x85\x86\x87"
9383 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9384 "\x90\x91\x92\x93\x94\x95\x96\x97"
9385 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9386 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9387 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9388 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9389 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9390 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9391 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9392 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9393 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9394 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9395 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9396 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9397 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9398 .ilen = 512,
9399 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9400 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9401 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9402 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9403 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9404 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9405 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9406 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9407 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9408 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9409 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9410 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9411 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9412 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9413 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9414 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9415 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9416 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9417 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9418 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9419 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9420 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9421 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9422 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9423 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9424 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9425 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9426 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9427 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9428 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9429 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9430 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9431 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9432 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9433 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9434 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9435 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9436 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9437 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9438 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9439 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9440 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9441 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9442 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9443 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9444 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9445 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9446 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9447 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9448 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9449 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9450 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9451 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9452 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9453 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9454 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9455 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9456 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9457 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9458 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9459 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9460 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9461 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9462 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9463 .rlen = 512,
9464 }, {
9465 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9466 "\x23\x53\x60\x28\x74\x71\x35\x26"
9467 "\x62\x49\x77\x57\x24\x70\x93\x69"
9468 "\x99\x59\x57\x49\x66\x96\x76\x27"
9469 "\x31\x41\x59\x26\x53\x58\x97\x93"
9470 "\x23\x84\x62\x64\x33\x83\x27\x95"
9471 "\x02\x88\x41\x97\x16\x93\x99\x37"
9472 "\x51\x05\x82\x09\x74\x94\x45\x92",
9473 .klen = 64,
9474 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9475 "\x00\x00\x00\x00\x00\x00\x00\x00",
9476 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9477 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9478 "\x10\x11\x12\x13\x14\x15\x16\x17"
9479 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9480 "\x20\x21\x22\x23\x24\x25\x26\x27"
9481 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9482 "\x30\x31\x32\x33\x34\x35\x36\x37"
9483 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9484 "\x40\x41\x42\x43\x44\x45\x46\x47"
9485 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9486 "\x50\x51\x52\x53\x54\x55\x56\x57"
9487 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9488 "\x60\x61\x62\x63\x64\x65\x66\x67"
9489 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9490 "\x70\x71\x72\x73\x74\x75\x76\x77"
9491 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9492 "\x80\x81\x82\x83\x84\x85\x86\x87"
9493 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9494 "\x90\x91\x92\x93\x94\x95\x96\x97"
9495 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9496 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9497 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9498 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9499 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9500 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9501 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9502 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9503 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9504 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9505 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9506 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9507 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9508 "\x00\x01\x02\x03\x04\x05\x06\x07"
9509 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9510 "\x10\x11\x12\x13\x14\x15\x16\x17"
9511 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9512 "\x20\x21\x22\x23\x24\x25\x26\x27"
9513 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9514 "\x30\x31\x32\x33\x34\x35\x36\x37"
9515 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9516 "\x40\x41\x42\x43\x44\x45\x46\x47"
9517 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9518 "\x50\x51\x52\x53\x54\x55\x56\x57"
9519 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9520 "\x60\x61\x62\x63\x64\x65\x66\x67"
9521 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9522 "\x70\x71\x72\x73\x74\x75\x76\x77"
9523 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9524 "\x80\x81\x82\x83\x84\x85\x86\x87"
9525 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9526 "\x90\x91\x92\x93\x94\x95\x96\x97"
9527 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9528 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9529 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9530 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9531 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9532 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9533 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9534 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9535 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9536 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9537 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9538 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9539 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9540 .ilen = 512,
9541 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9542 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9543 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9544 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9545 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9546 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9547 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9548 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9549 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9550 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9551 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9552 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9553 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9554 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9555 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9556 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9557 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9558 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9559 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9560 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9561 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9562 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9563 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9564 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9565 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9566 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9567 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9568 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9569 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9570 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9571 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9572 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9573 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9574 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9575 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9576 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9577 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9578 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9579 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9580 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9581 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9582 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9583 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9584 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9585 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9586 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9587 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9588 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9589 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9590 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9591 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9592 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9593 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9594 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9595 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9596 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9597 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9598 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9599 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9600 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9601 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9602 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9603 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9604 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9605 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009606 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009607 .np = 3,
9608 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009609 },
9610};
9611
9612static struct cipher_testvec tf_xts_dec_tv_template[] = {
9613 /* Generated from AES-XTS test vectors */
9614 /* same as enc vectors with input and result reversed */
9615 {
9616 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9617 "\x00\x00\x00\x00\x00\x00\x00\x00"
9618 "\x00\x00\x00\x00\x00\x00\x00\x00"
9619 "\x00\x00\x00\x00\x00\x00\x00\x00",
9620 .klen = 32,
9621 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9622 "\x00\x00\x00\x00\x00\x00\x00\x00",
9623 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9624 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9625 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9626 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9627 .ilen = 32,
9628 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
9629 "\x00\x00\x00\x00\x00\x00\x00\x00"
9630 "\x00\x00\x00\x00\x00\x00\x00\x00"
9631 "\x00\x00\x00\x00\x00\x00\x00\x00",
9632 .rlen = 32,
9633 }, {
9634 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9635 "\x11\x11\x11\x11\x11\x11\x11\x11"
9636 "\x22\x22\x22\x22\x22\x22\x22\x22"
9637 "\x22\x22\x22\x22\x22\x22\x22\x22",
9638 .klen = 32,
9639 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9640 "\x00\x00\x00\x00\x00\x00\x00\x00",
9641 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9642 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9643 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9644 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9645 .ilen = 32,
9646 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9647 "\x44\x44\x44\x44\x44\x44\x44\x44"
9648 "\x44\x44\x44\x44\x44\x44\x44\x44"
9649 "\x44\x44\x44\x44\x44\x44\x44\x44",
9650 .rlen = 32,
9651 }, {
9652 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9653 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9654 "\x22\x22\x22\x22\x22\x22\x22\x22"
9655 "\x22\x22\x22\x22\x22\x22\x22\x22",
9656 .klen = 32,
9657 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9658 "\x00\x00\x00\x00\x00\x00\x00\x00",
9659 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9660 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9661 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9662 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9663 .ilen = 32,
9664 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9665 "\x44\x44\x44\x44\x44\x44\x44\x44"
9666 "\x44\x44\x44\x44\x44\x44\x44\x44"
9667 "\x44\x44\x44\x44\x44\x44\x44\x44",
9668 .rlen = 32,
9669 }, {
9670 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9671 "\x23\x53\x60\x28\x74\x71\x35\x26"
9672 "\x31\x41\x59\x26\x53\x58\x97\x93"
9673 "\x23\x84\x62\x64\x33\x83\x27\x95",
9674 .klen = 32,
9675 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9676 "\x00\x00\x00\x00\x00\x00\x00\x00",
9677 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9678 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9679 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9680 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9681 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9682 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9683 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9684 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9685 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9686 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9687 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9688 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9689 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9690 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9691 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9692 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9693 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9694 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9695 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9696 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9697 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9698 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9699 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9700 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9701 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9702 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9703 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9704 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9705 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9706 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9707 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9708 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9709 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9710 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9711 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9712 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9713 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9714 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9715 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9716 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9717 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9718 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9719 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9720 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9721 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9722 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9723 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9724 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9725 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9726 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9727 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9728 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9729 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9730 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9731 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9732 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9733 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9734 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9735 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9736 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9737 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9738 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9739 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9740 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9741 .ilen = 512,
9742 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9743 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9744 "\x10\x11\x12\x13\x14\x15\x16\x17"
9745 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9746 "\x20\x21\x22\x23\x24\x25\x26\x27"
9747 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9748 "\x30\x31\x32\x33\x34\x35\x36\x37"
9749 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9750 "\x40\x41\x42\x43\x44\x45\x46\x47"
9751 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9752 "\x50\x51\x52\x53\x54\x55\x56\x57"
9753 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9754 "\x60\x61\x62\x63\x64\x65\x66\x67"
9755 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9756 "\x70\x71\x72\x73\x74\x75\x76\x77"
9757 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9758 "\x80\x81\x82\x83\x84\x85\x86\x87"
9759 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9760 "\x90\x91\x92\x93\x94\x95\x96\x97"
9761 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9762 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9763 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9764 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9765 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9766 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9767 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9768 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9769 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9770 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9771 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9772 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9773 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9774 "\x00\x01\x02\x03\x04\x05\x06\x07"
9775 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9776 "\x10\x11\x12\x13\x14\x15\x16\x17"
9777 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9778 "\x20\x21\x22\x23\x24\x25\x26\x27"
9779 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9780 "\x30\x31\x32\x33\x34\x35\x36\x37"
9781 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9782 "\x40\x41\x42\x43\x44\x45\x46\x47"
9783 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9784 "\x50\x51\x52\x53\x54\x55\x56\x57"
9785 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9786 "\x60\x61\x62\x63\x64\x65\x66\x67"
9787 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9788 "\x70\x71\x72\x73\x74\x75\x76\x77"
9789 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9790 "\x80\x81\x82\x83\x84\x85\x86\x87"
9791 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9792 "\x90\x91\x92\x93\x94\x95\x96\x97"
9793 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9794 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9795 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9796 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9797 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9798 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9799 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9800 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9801 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9802 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9803 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9804 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9805 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9806 .rlen = 512,
9807 }, {
9808 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9809 "\x23\x53\x60\x28\x74\x71\x35\x26"
9810 "\x62\x49\x77\x57\x24\x70\x93\x69"
9811 "\x99\x59\x57\x49\x66\x96\x76\x27"
9812 "\x31\x41\x59\x26\x53\x58\x97\x93"
9813 "\x23\x84\x62\x64\x33\x83\x27\x95"
9814 "\x02\x88\x41\x97\x16\x93\x99\x37"
9815 "\x51\x05\x82\x09\x74\x94\x45\x92",
9816 .klen = 64,
9817 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9818 "\x00\x00\x00\x00\x00\x00\x00\x00",
9819 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9820 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9821 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9822 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9823 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9824 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9825 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9826 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9827 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9828 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9829 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9830 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9831 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9832 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9833 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9834 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9835 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9836 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9837 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9838 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9839 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9840 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9841 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9842 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9843 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9844 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9845 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9846 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9847 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9848 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9849 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9850 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9851 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9852 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9853 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9854 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9855 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9856 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9857 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9858 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9859 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9860 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9861 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9862 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9863 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9864 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9865 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9866 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9867 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9868 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9869 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9870 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9871 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9872 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9873 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9874 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9875 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9876 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9877 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9878 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9879 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9880 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9881 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9882 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9883 .ilen = 512,
9884 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9885 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9886 "\x10\x11\x12\x13\x14\x15\x16\x17"
9887 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9888 "\x20\x21\x22\x23\x24\x25\x26\x27"
9889 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9890 "\x30\x31\x32\x33\x34\x35\x36\x37"
9891 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9892 "\x40\x41\x42\x43\x44\x45\x46\x47"
9893 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9894 "\x50\x51\x52\x53\x54\x55\x56\x57"
9895 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9896 "\x60\x61\x62\x63\x64\x65\x66\x67"
9897 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9898 "\x70\x71\x72\x73\x74\x75\x76\x77"
9899 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9900 "\x80\x81\x82\x83\x84\x85\x86\x87"
9901 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9902 "\x90\x91\x92\x93\x94\x95\x96\x97"
9903 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9904 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9905 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9906 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9907 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9908 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9909 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9910 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9911 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9912 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9913 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9914 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9915 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9916 "\x00\x01\x02\x03\x04\x05\x06\x07"
9917 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9918 "\x10\x11\x12\x13\x14\x15\x16\x17"
9919 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9920 "\x20\x21\x22\x23\x24\x25\x26\x27"
9921 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9922 "\x30\x31\x32\x33\x34\x35\x36\x37"
9923 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9924 "\x40\x41\x42\x43\x44\x45\x46\x47"
9925 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9926 "\x50\x51\x52\x53\x54\x55\x56\x57"
9927 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9928 "\x60\x61\x62\x63\x64\x65\x66\x67"
9929 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9930 "\x70\x71\x72\x73\x74\x75\x76\x77"
9931 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9932 "\x80\x81\x82\x83\x84\x85\x86\x87"
9933 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9934 "\x90\x91\x92\x93\x94\x95\x96\x97"
9935 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9936 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9937 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9938 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9939 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9940 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9941 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9942 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9943 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9944 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9945 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9946 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9947 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9948 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009949 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009950 .np = 3,
9951 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009952 },
9953};
9954
Herbert Xuda7f0332008-07-31 17:08:25 +08009955/*
9956 * Serpent test vectors. These are backwards because Serpent writes
9957 * octet sequences in right-to-left mode.
9958 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009959#define SERPENT_ENC_TEST_VECTORS 5
9960#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08009961
9962#define TNEPRES_ENC_TEST_VECTORS 4
9963#define TNEPRES_DEC_TEST_VECTORS 4
9964
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009965#define SERPENT_CBC_ENC_TEST_VECTORS 1
9966#define SERPENT_CBC_DEC_TEST_VECTORS 1
9967
9968#define SERPENT_CTR_ENC_TEST_VECTORS 2
9969#define SERPENT_CTR_DEC_TEST_VECTORS 2
9970
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03009971#define SERPENT_LRW_ENC_TEST_VECTORS 8
9972#define SERPENT_LRW_DEC_TEST_VECTORS 8
9973
Jussi Kivilinna18be20b2011-10-18 13:33:17 +03009974#define SERPENT_XTS_ENC_TEST_VECTORS 5
9975#define SERPENT_XTS_DEC_TEST_VECTORS 5
9976
Herbert Xuda7f0332008-07-31 17:08:25 +08009977static struct cipher_testvec serpent_enc_tv_template[] = {
9978 {
9979 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9980 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9981 .ilen = 16,
9982 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
9983 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
9984 .rlen = 16,
9985 }, {
9986 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9987 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9988 .klen = 16,
9989 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9990 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9991 .ilen = 16,
9992 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
9993 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
9994 .rlen = 16,
9995 }, {
9996 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9997 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9998 "\x10\x11\x12\x13\x14\x15\x16\x17"
9999 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10000 .klen = 32,
10001 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10002 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10003 .ilen = 16,
10004 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
10005 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
10006 .rlen = 16,
10007 }, {
10008 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10009 .klen = 16,
10010 .input = zeroed_string,
10011 .ilen = 16,
10012 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
10013 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
10014 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010015 }, { /* Generated with Crypto++ */
10016 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10017 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10018 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10019 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10020 .klen = 32,
10021 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10022 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10023 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10024 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10025 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10026 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10027 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10028 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10029 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10030 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10031 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10032 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10033 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10034 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10035 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10036 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10037 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010038 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10039 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10040 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10041 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10042 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10043 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10044 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10045 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10046 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10047 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10048 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10049 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10050 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10051 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10052 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10053 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10054 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10055 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10056 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10057 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10058 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10059 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10060 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10061 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10062 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10063 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10064 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10065 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10066 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10067 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10068 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10069 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10070 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10071 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10072 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10073 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10074 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10075 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10076 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10077 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10078 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10079 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10080 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10081 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10082 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10083 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010084 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
10085 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
10086 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
10087 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
10088 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
10089 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
10090 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
10091 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
10092 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
10093 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
10094 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
10095 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
10096 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
10097 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
10098 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
10099 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
10100 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010101 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
10102 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
10103 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
10104 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
10105 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
10106 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
10107 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
10108 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
10109 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
10110 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
10111 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
10112 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
10113 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
10114 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
10115 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
10116 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
10117 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
10118 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
10119 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
10120 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
10121 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
10122 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
10123 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
10124 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
10125 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
10126 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
10127 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
10128 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
10129 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
10130 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
10131 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
10132 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
10133 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
10134 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
10135 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
10136 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
10137 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
10138 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
10139 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
10140 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
10141 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
10142 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
10143 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
10144 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10145 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10146 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010147 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010148 .np = 3,
10149 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010150 },
10151};
10152
10153static struct cipher_testvec tnepres_enc_tv_template[] = {
10154 { /* KeySize=128, PT=0, I=1 */
10155 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10156 "\x00\x00\x00\x00\x00\x00\x00\x00",
10157 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10158 "\x00\x00\x00\x00\x00\x00\x00\x00",
10159 .klen = 16,
10160 .ilen = 16,
10161 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
10162 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
10163 .rlen = 16,
10164 }, { /* KeySize=192, PT=0, I=1 */
10165 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10166 "\x00\x00\x00\x00\x00\x00\x00\x00"
10167 "\x00\x00\x00\x00\x00\x00\x00\x00",
10168 .klen = 24,
10169 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10170 "\x00\x00\x00\x00\x00\x00\x00\x00",
10171 .ilen = 16,
10172 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
10173 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
10174 .rlen = 16,
10175 }, { /* KeySize=256, PT=0, I=1 */
10176 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10177 "\x00\x00\x00\x00\x00\x00\x00\x00"
10178 "\x00\x00\x00\x00\x00\x00\x00\x00"
10179 "\x00\x00\x00\x00\x00\x00\x00\x00",
10180 .klen = 32,
10181 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10182 "\x00\x00\x00\x00\x00\x00\x00\x00",
10183 .ilen = 16,
10184 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
10185 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
10186 .rlen = 16,
10187 }, { /* KeySize=256, I=257 */
10188 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
10189 "\x17\x16\x15\x14\x13\x12\x11\x10"
10190 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
10191 "\x07\x06\x05\x04\x03\x02\x01\x00",
10192 .klen = 32,
10193 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
10194 "\x07\x06\x05\x04\x03\x02\x01\x00",
10195 .ilen = 16,
10196 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
10197 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
10198 .rlen = 16,
10199 },
10200};
10201
10202
10203static struct cipher_testvec serpent_dec_tv_template[] = {
10204 {
10205 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
10206 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
10207 .ilen = 16,
10208 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10209 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10210 .rlen = 16,
10211 }, {
10212 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10213 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10214 .klen = 16,
10215 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
10216 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
10217 .ilen = 16,
10218 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10219 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10220 .rlen = 16,
10221 }, {
10222 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10223 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10224 "\x10\x11\x12\x13\x14\x15\x16\x17"
10225 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10226 .klen = 32,
10227 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
10228 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
10229 .ilen = 16,
10230 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10231 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10232 .rlen = 16,
10233 }, {
10234 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10235 .klen = 16,
10236 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
10237 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
10238 .ilen = 16,
10239 .result = zeroed_string,
10240 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010241 }, { /* Generated with Crypto++ */
10242 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10243 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10244 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10245 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10246 .klen = 32,
10247 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
10248 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
10249 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
10250 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
10251 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
10252 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
10253 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
10254 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
10255 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
10256 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
10257 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
10258 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
10259 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
10260 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
10261 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
10262 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
10263 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010264 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
10265 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
10266 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
10267 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
10268 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
10269 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
10270 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
10271 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
10272 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
10273 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
10274 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
10275 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
10276 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
10277 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
10278 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
10279 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
10280 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
10281 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
10282 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
10283 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
10284 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
10285 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
10286 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
10287 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
10288 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
10289 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
10290 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
10291 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
10292 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
10293 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
10294 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
10295 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
10296 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
10297 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
10298 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
10299 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
10300 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
10301 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
10302 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
10303 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
10304 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
10305 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
10306 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
10307 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10308 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10309 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010310 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10311 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10312 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10313 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10314 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10315 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10316 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10317 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10318 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10319 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10320 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10321 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10322 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10323 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10324 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10325 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10326 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010327 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10328 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10329 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10330 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10331 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10332 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10333 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10334 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10335 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10336 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10337 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10338 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10339 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10340 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10341 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10342 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10343 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10344 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10345 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10346 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10347 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10348 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10349 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10350 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10351 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10352 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10353 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10354 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10355 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10356 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10357 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10358 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10359 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10360 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10361 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10362 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10363 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10364 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10365 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10366 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10367 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10368 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10369 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10370 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10371 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10372 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010373 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010374 .np = 3,
10375 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010376 },
10377};
10378
10379static struct cipher_testvec tnepres_dec_tv_template[] = {
10380 {
10381 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
10382 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
10383 .ilen = 16,
10384 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10385 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10386 .rlen = 16,
10387 }, {
10388 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10389 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10390 .klen = 16,
10391 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
10392 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
10393 .ilen = 16,
10394 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10395 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10396 .rlen = 16,
10397 }, {
10398 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10399 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10400 "\x10\x11\x12\x13\x14\x15\x16\x17"
10401 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10402 .klen = 32,
10403 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
10404 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
10405 .ilen = 16,
10406 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10407 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10408 .rlen = 16,
10409 }, { /* KeySize=128, I=121 */
10410 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10411 .klen = 16,
10412 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
10413 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
10414 .ilen = 16,
10415 .result = zeroed_string,
10416 .rlen = 16,
10417 },
10418};
10419
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010420static struct cipher_testvec serpent_cbc_enc_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 = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10430 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10431 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10432 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10433 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10434 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10435 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10436 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10437 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10438 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10439 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10440 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10441 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10442 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10443 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10444 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10445 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010446 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10447 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10448 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10449 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10450 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10451 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10452 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10453 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10454 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10455 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10456 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10457 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10458 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10459 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10460 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10461 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10462 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10463 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10464 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10465 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10466 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10467 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10468 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10469 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10470 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10471 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10472 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10473 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10474 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10475 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10476 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10477 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10478 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10479 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10480 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10481 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10482 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10483 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10484 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10485 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10486 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10487 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10488 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10489 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10490 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10491 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010492 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10493 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10494 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10495 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10496 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10497 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10498 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10499 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10500 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10501 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10502 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10503 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10504 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10505 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10506 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10507 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10508 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010509 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10510 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10511 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10512 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10513 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10514 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10515 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10516 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10517 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10518 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10519 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10520 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10521 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10522 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10523 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10524 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10525 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10526 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10527 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10528 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10529 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10530 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10531 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10532 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10533 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10534 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10535 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10536 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10537 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10538 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10539 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10540 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10541 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10542 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10543 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10544 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10545 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10546 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10547 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10548 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10549 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10550 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10551 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10552 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10553 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10554 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010555 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010556 .np = 3,
10557 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010558 },
10559};
10560
10561static struct cipher_testvec serpent_cbc_dec_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 = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10571 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10572 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10573 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10574 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10575 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10576 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10577 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10578 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10579 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10580 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10581 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10582 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10583 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10584 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10585 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10586 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010587 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10588 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10589 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10590 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10591 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10592 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10593 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10594 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10595 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10596 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10597 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10598 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10599 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10600 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10601 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10602 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10603 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10604 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10605 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10606 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10607 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10608 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10609 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10610 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10611 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10612 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10613 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10614 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10615 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10616 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10617 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10618 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10619 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10620 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10621 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10622 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10623 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10624 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10625 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10626 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10627 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10628 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10629 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10630 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10631 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10632 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010633 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10634 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10635 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10636 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10637 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10638 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10639 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10640 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10641 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10642 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10643 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10644 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10645 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10646 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10647 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10648 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10649 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010650 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10651 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10652 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10653 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10654 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10655 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10656 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10657 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10658 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10659 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10660 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10661 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10662 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10663 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10664 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10665 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10666 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10667 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10668 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10669 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10670 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10671 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10672 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10673 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10674 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10675 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10676 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10677 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10678 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10679 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10680 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10681 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10682 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10683 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10684 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10685 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10686 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10687 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10688 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10689 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10690 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10691 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10692 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10693 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10694 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10695 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010696 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010697 .np = 3,
10698 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010699 },
10700};
10701
10702static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
10703 { /* Generated with Crypto++ */
10704 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10705 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10706 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10707 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10708 .klen = 32,
10709 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10710 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10711 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10712 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10713 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10714 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10715 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10716 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10717 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10718 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10719 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10720 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10721 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10722 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10723 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10724 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10725 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10726 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10727 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010728 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10729 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10730 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10731 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10732 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10733 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10734 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10735 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10736 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10737 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10738 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10739 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10740 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10741 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10742 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10743 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10744 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10745 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10746 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10747 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10748 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10749 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10750 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10751 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10752 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10753 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10754 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10755 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10756 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10757 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10758 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10759 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10760 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10761 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10762 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10763 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10764 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10765 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10766 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10767 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10768 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10769 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10770 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10771 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10772 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10773 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010774 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10775 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10776 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10777 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10778 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10779 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10780 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10781 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10782 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10783 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10784 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10785 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10786 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10787 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10788 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10789 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10790 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010791 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10792 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10793 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10794 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10795 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10796 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10797 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10798 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10799 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10800 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10801 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10802 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10803 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10804 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10805 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10806 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10807 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10808 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10809 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10810 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10811 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10812 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10813 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10814 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10815 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10816 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10817 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10818 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10819 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10820 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10821 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10822 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10823 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10824 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10825 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10826 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10827 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10828 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10829 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10830 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10831 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10832 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10833 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10834 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10835 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
10836 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010837 }, { /* Generated with Crypto++ */
10838 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10839 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10840 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10841 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10842 .klen = 32,
10843 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10844 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10845 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10846 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10847 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10848 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10849 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10850 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10851 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10852 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10853 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10854 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10855 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10856 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10857 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10858 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10859 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10860 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10861 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10862 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010863 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10864 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10865 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10866 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10867 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10868 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10869 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10870 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10871 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10872 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10873 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10874 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10875 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10876 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10877 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10878 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10879 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10880 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10881 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10882 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10883 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10884 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10885 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10886 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10887 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10888 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10889 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10890 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10891 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10892 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10893 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10894 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10895 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10896 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10897 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10898 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10899 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10900 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10901 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10902 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10903 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10904 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10905 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10906 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
10907 "\x2B\xC2\x59",
10908 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010909 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10910 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10911 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10912 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10913 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10914 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10915 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10916 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10917 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10918 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10919 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10920 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10921 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10922 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10923 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10924 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10925 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10926 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010927 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10928 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10929 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10930 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10931 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10932 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10933 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10934 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10935 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10936 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10937 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10938 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10939 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10940 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10941 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10942 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10943 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10944 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10945 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10946 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10947 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10948 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10949 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10950 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10951 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10952 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10953 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10954 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10955 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10956 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10957 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10958 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10959 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10960 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10961 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10962 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10963 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10964 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10965 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10966 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10967 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10968 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10969 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10970 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
10971 "\x38\xE2\xE5",
10972 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010973 .also_non_np = 1,
10974 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010975 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030010976 }, { /* Generated with Crypto++ */
10977 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10978 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10979 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10980 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10981 .klen = 32,
10982 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
10983 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
10984 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10985 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10986 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10987 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10988 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10989 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10990 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10991 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10992 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10993 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10994 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10995 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10996 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10997 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10998 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10999 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11000 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11001 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11002 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11003 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11004 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11005 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11006 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11007 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11008 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11009 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11010 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11011 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11012 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11013 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11014 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11015 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11016 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11017 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11018 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11019 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11020 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11021 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11022 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11023 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11024 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11025 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11026 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11027 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11028 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11029 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11030 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11031 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11032 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11033 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11034 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11035 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11036 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11037 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11038 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11039 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11040 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11041 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11042 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11043 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11044 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11045 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11046 .ilen = 496,
11047 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
11048 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
11049 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
11050 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
11051 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
11052 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
11053 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
11054 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
11055 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
11056 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
11057 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
11058 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
11059 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
11060 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
11061 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
11062 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
11063 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
11064 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
11065 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
11066 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
11067 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
11068 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
11069 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
11070 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
11071 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
11072 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
11073 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
11074 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
11075 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
11076 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
11077 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
11078 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
11079 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
11080 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
11081 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
11082 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
11083 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
11084 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
11085 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
11086 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
11087 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
11088 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
11089 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
11090 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
11091 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
11092 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
11093 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
11094 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
11095 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
11096 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
11097 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
11098 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
11099 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
11100 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
11101 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
11102 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
11103 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
11104 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
11105 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
11106 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
11107 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
11108 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
11109 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011110 },
11111};
11112
11113static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
11114 { /* Generated with Crypto++ */
11115 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11116 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11117 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11118 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11119 .klen = 32,
11120 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11121 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11122 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
11123 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
11124 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
11125 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
11126 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
11127 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
11128 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
11129 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
11130 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
11131 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
11132 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
11133 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
11134 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
11135 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
11136 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
11137 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
11138 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011139 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
11140 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11141 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11142 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11143 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11144 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11145 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11146 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11147 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11148 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11149 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11150 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11151 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11152 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11153 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11154 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11155 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11156 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11157 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11158 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11159 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11160 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11161 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11162 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11163 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11164 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11165 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11166 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11167 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11168 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11169 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11170 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11171 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11172 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11173 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11174 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11175 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11176 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11177 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11178 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11179 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11180 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11181 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11182 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11183 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
11184 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011185 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11186 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11187 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11188 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11189 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11190 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11191 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11192 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11193 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11194 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11195 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11196 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11197 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11198 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11199 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11200 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11201 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011202 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11203 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11204 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11205 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11206 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11207 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11208 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11209 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11210 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11211 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11212 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11213 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11214 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11215 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11216 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11217 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11218 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11219 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11220 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11221 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11222 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11223 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11224 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11225 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11226 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11227 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11228 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11229 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11230 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11231 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11232 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11233 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11234 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11235 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11236 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11237 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11238 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11239 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11240 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11241 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11242 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11243 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11244 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11245 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11246 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11247 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011248 }, { /* Generated with Crypto++ */
11249 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11250 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11251 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11252 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11253 .klen = 32,
11254 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11255 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11256 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
11257 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
11258 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
11259 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
11260 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
11261 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
11262 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
11263 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
11264 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
11265 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
11266 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
11267 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
11268 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
11269 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
11270 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
11271 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
11272 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
11273 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011274 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11275 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11276 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11277 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11278 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11279 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11280 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11281 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11282 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11283 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11284 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11285 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11286 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11287 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11288 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11289 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11290 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11291 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11292 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11293 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11294 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11295 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11296 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11297 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11298 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11299 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11300 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11301 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11302 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11303 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11304 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11305 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11306 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11307 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11308 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11309 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11310 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11311 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11312 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11313 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11314 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11315 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11316 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11317 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
11318 "\x38\xE2\xE5",
11319 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011320 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11321 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11322 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11323 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11324 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11325 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11326 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11327 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11328 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11329 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11330 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11331 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11332 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11333 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11334 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11335 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11336 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11337 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011338 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11339 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11340 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11341 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11342 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11343 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11344 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11345 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11346 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11347 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11348 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11349 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11350 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11351 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11352 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11353 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11354 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11355 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11356 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11357 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11358 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11359 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11360 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11361 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11362 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11363 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11364 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11365 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11366 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11367 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11368 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11369 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11370 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11371 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11372 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11373 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11374 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11375 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11376 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11377 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11378 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11379 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11380 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11381 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
11382 "\x2B\xC2\x59",
11383 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011384 .also_non_np = 1,
11385 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011386 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030011387 }, { /* Generated with Crypto++ */
11388 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11389 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11390 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11391 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11392 .klen = 32,
11393 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
11394 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
11395 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
11396 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
11397 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
11398 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
11399 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
11400 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
11401 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
11402 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
11403 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
11404 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
11405 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
11406 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
11407 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
11408 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
11409 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
11410 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
11411 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
11412 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
11413 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
11414 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
11415 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
11416 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
11417 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
11418 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
11419 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
11420 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
11421 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
11422 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
11423 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
11424 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
11425 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
11426 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
11427 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
11428 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
11429 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
11430 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
11431 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
11432 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
11433 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
11434 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
11435 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
11436 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
11437 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
11438 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
11439 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
11440 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
11441 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
11442 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
11443 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
11444 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
11445 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
11446 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
11447 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
11448 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
11449 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
11450 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
11451 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
11452 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
11453 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
11454 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
11455 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
11456 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
11457 .ilen = 496,
11458 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11459 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11460 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11461 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11462 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11463 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11464 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11465 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11466 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11467 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11468 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11469 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11470 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11471 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11472 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11473 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11474 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11475 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11476 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11477 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11478 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11479 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11480 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11481 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11482 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11483 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11484 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11485 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11486 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11487 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11488 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11489 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11490 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11491 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11492 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11493 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11494 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11495 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11496 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11497 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11498 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11499 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11500 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11501 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11502 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11503 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11504 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11505 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11506 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11507 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11508 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11509 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11510 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11511 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11512 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11513 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11514 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11515 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11516 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11517 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11518 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11519 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11520 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011521 },
11522};
Herbert Xuda7f0332008-07-31 17:08:25 +080011523
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011524static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
11525 /* Generated from AES-LRW test vectors */
11526 {
11527 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11528 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11529 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11530 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11531 .klen = 32,
11532 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11533 "\x00\x00\x00\x00\x00\x00\x00\x01",
11534 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11535 "\x38\x39\x41\x42\x43\x44\x45\x46",
11536 .ilen = 16,
11537 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11538 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11539 .rlen = 16,
11540 }, {
11541 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11542 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11543 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11544 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11545 .klen = 32,
11546 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11547 "\x00\x00\x00\x00\x00\x00\x00\x02",
11548 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11549 "\x38\x39\x41\x42\x43\x44\x45\x46",
11550 .ilen = 16,
11551 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11552 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11553 .rlen = 16,
11554 }, {
11555 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11556 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11557 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11558 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11559 .klen = 32,
11560 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11561 "\x00\x00\x00\x02\x00\x00\x00\x00",
11562 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11563 "\x38\x39\x41\x42\x43\x44\x45\x46",
11564 .ilen = 16,
11565 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11566 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11567 .rlen = 16,
11568 }, {
11569 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11570 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11571 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11572 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11573 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11574 .klen = 40,
11575 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11576 "\x00\x00\x00\x00\x00\x00\x00\x01",
11577 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11578 "\x38\x39\x41\x42\x43\x44\x45\x46",
11579 .ilen = 16,
11580 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11581 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11582 .rlen = 16,
11583 }, {
11584 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11585 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11586 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11587 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11588 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11589 .klen = 40,
11590 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11591 "\x00\x00\x00\x02\x00\x00\x00\x00",
11592 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11593 "\x38\x39\x41\x42\x43\x44\x45\x46",
11594 .ilen = 16,
11595 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11596 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11597 .rlen = 16,
11598 }, {
11599 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11600 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11601 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11602 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11603 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11604 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11605 .klen = 48,
11606 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11607 "\x00\x00\x00\x00\x00\x00\x00\x01",
11608 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11609 "\x38\x39\x41\x42\x43\x44\x45\x46",
11610 .ilen = 16,
11611 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11612 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11613 .rlen = 16,
11614 }, {
11615 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11616 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11617 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11618 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11619 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11620 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11621 .klen = 48,
11622 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11623 "\x00\x00\x00\x02\x00\x00\x00\x00",
11624 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11625 "\x38\x39\x41\x42\x43\x44\x45\x46",
11626 .ilen = 16,
11627 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11628 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11629 .rlen = 16,
11630 }, {
11631 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11632 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11633 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11634 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11635 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11636 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11637 .klen = 48,
11638 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11639 "\x00\x00\x00\x00\x00\x00\x00\x01",
11640 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11641 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11642 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11643 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11644 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11645 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11646 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11647 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11648 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11649 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11650 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11651 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11652 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11653 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11654 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11655 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11656 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11657 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11658 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11659 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11660 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11661 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11662 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11663 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11664 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11665 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11666 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11667 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11668 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11669 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11670 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11671 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11672 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11673 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11674 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11675 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11676 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11677 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11678 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11679 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11680 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11681 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11682 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11683 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11684 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11685 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11686 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11687 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11688 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11689 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11690 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11691 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11692 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11693 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11694 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11695 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11696 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11697 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11698 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11699 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11700 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11701 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11702 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11703 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11704 .ilen = 512,
11705 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11706 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11707 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11708 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11709 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11710 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11711 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11712 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11713 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11714 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11715 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11716 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11717 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11718 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11719 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11720 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11721 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11722 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11723 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11724 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11725 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11726 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11727 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11728 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11729 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11730 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11731 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11732 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11733 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11734 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11735 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11736 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11737 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11738 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11739 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11740 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11741 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11742 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11743 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11744 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11745 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11746 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11747 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11748 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11749 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11750 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11751 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11752 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11753 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11754 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11755 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11756 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11757 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11758 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11759 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11760 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11761 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11762 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11763 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11764 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11765 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11766 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11767 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11768 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11769 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011770 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011771 .np = 3,
11772 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011773 },
11774};
11775
11776static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
11777 /* Generated from AES-LRW test vectors */
11778 /* same as enc vectors with input and result reversed */
11779 {
11780 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11781 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11782 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11783 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11784 .klen = 32,
11785 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11786 "\x00\x00\x00\x00\x00\x00\x00\x01",
11787 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11788 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11789 .ilen = 16,
11790 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11791 "\x38\x39\x41\x42\x43\x44\x45\x46",
11792 .rlen = 16,
11793 }, {
11794 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11795 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11796 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11797 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11798 .klen = 32,
11799 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11800 "\x00\x00\x00\x00\x00\x00\x00\x02",
11801 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11802 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11803 .ilen = 16,
11804 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11805 "\x38\x39\x41\x42\x43\x44\x45\x46",
11806 .rlen = 16,
11807 }, {
11808 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11809 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11810 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11811 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11812 .klen = 32,
11813 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11814 "\x00\x00\x00\x02\x00\x00\x00\x00",
11815 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11816 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11817 .ilen = 16,
11818 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11819 "\x38\x39\x41\x42\x43\x44\x45\x46",
11820 .rlen = 16,
11821 }, {
11822 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11823 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11824 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11825 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11826 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11827 .klen = 40,
11828 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11829 "\x00\x00\x00\x00\x00\x00\x00\x01",
11830 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11831 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11832 .ilen = 16,
11833 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11834 "\x38\x39\x41\x42\x43\x44\x45\x46",
11835 .rlen = 16,
11836 }, {
11837 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11838 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11839 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11840 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11841 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11842 .klen = 40,
11843 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11844 "\x00\x00\x00\x02\x00\x00\x00\x00",
11845 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11846 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11847 .ilen = 16,
11848 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11849 "\x38\x39\x41\x42\x43\x44\x45\x46",
11850 .rlen = 16,
11851 }, {
11852 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11853 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11854 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11855 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11856 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11857 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11858 .klen = 48,
11859 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11860 "\x00\x00\x00\x00\x00\x00\x00\x01",
11861 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11862 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11863 .ilen = 16,
11864 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11865 "\x38\x39\x41\x42\x43\x44\x45\x46",
11866 .rlen = 16,
11867 }, {
11868 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11869 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11870 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11871 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11872 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11873 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11874 .klen = 48,
11875 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11876 "\x00\x00\x00\x02\x00\x00\x00\x00",
11877 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11878 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11879 .ilen = 16,
11880 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11881 "\x38\x39\x41\x42\x43\x44\x45\x46",
11882 .rlen = 16,
11883 }, {
11884 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11885 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11886 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11887 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11888 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11889 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11890 .klen = 48,
11891 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11892 "\x00\x00\x00\x00\x00\x00\x00\x01",
11893 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11894 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11895 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11896 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11897 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11898 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11899 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11900 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11901 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11902 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11903 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11904 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11905 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11906 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11907 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11908 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11909 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11910 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11911 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11912 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11913 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11914 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11915 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11916 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11917 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11918 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11919 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11920 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11921 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11922 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11923 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11924 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11925 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11926 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11927 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11928 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11929 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11930 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11931 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11932 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11933 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11934 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11935 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11936 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11937 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11938 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11939 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11940 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11941 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11942 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11943 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11944 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11945 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11946 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11947 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11948 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11949 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11950 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11951 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11952 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11953 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11954 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11955 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11956 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11957 .ilen = 512,
11958 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11959 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11960 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11961 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11962 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11963 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11964 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11965 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11966 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11967 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11968 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11969 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11970 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11971 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11972 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11973 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11974 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11975 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11976 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11977 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11978 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11979 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11980 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11981 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11982 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11983 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11984 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11985 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11986 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11987 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11988 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11989 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11990 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11991 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11992 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11993 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11994 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11995 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11996 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11997 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11998 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11999 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
12000 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
12001 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
12002 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
12003 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
12004 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
12005 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
12006 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
12007 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
12008 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
12009 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
12010 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
12011 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
12012 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
12013 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
12014 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
12015 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
12016 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
12017 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
12018 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
12019 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
12020 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
12021 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
12022 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012023 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012024 .np = 3,
12025 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030012026 },
12027};
12028
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030012029static struct cipher_testvec serpent_xts_enc_tv_template[] = {
12030 /* Generated from AES-XTS test vectors */
12031 {
12032 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
12033 "\x00\x00\x00\x00\x00\x00\x00\x00"
12034 "\x00\x00\x00\x00\x00\x00\x00\x00"
12035 "\x00\x00\x00\x00\x00\x00\x00\x00",
12036 .klen = 32,
12037 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12038 "\x00\x00\x00\x00\x00\x00\x00\x00",
12039 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
12040 "\x00\x00\x00\x00\x00\x00\x00\x00"
12041 "\x00\x00\x00\x00\x00\x00\x00\x00"
12042 "\x00\x00\x00\x00\x00\x00\x00\x00",
12043 .ilen = 32,
12044 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
12045 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
12046 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
12047 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
12048 .rlen = 32,
12049 }, {
12050 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
12051 "\x11\x11\x11\x11\x11\x11\x11\x11"
12052 "\x22\x22\x22\x22\x22\x22\x22\x22"
12053 "\x22\x22\x22\x22\x22\x22\x22\x22",
12054 .klen = 32,
12055 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12056 "\x00\x00\x00\x00\x00\x00\x00\x00",
12057 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
12058 "\x44\x44\x44\x44\x44\x44\x44\x44"
12059 "\x44\x44\x44\x44\x44\x44\x44\x44"
12060 "\x44\x44\x44\x44\x44\x44\x44\x44",
12061 .ilen = 32,
12062 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
12063 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
12064 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
12065 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
12066 .rlen = 32,
12067 }, {
12068 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12069 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12070 "\x22\x22\x22\x22\x22\x22\x22\x22"
12071 "\x22\x22\x22\x22\x22\x22\x22\x22",
12072 .klen = 32,
12073 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12074 "\x00\x00\x00\x00\x00\x00\x00\x00",
12075 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
12076 "\x44\x44\x44\x44\x44\x44\x44\x44"
12077 "\x44\x44\x44\x44\x44\x44\x44\x44"
12078 "\x44\x44\x44\x44\x44\x44\x44\x44",
12079 .ilen = 32,
12080 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
12081 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
12082 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
12083 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
12084 .rlen = 32,
12085 }, {
12086 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12087 "\x23\x53\x60\x28\x74\x71\x35\x26"
12088 "\x31\x41\x59\x26\x53\x58\x97\x93"
12089 "\x23\x84\x62\x64\x33\x83\x27\x95",
12090 .klen = 32,
12091 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12092 "\x00\x00\x00\x00\x00\x00\x00\x00",
12093 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12094 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12095 "\x10\x11\x12\x13\x14\x15\x16\x17"
12096 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12097 "\x20\x21\x22\x23\x24\x25\x26\x27"
12098 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12099 "\x30\x31\x32\x33\x34\x35\x36\x37"
12100 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12101 "\x40\x41\x42\x43\x44\x45\x46\x47"
12102 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12103 "\x50\x51\x52\x53\x54\x55\x56\x57"
12104 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12105 "\x60\x61\x62\x63\x64\x65\x66\x67"
12106 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12107 "\x70\x71\x72\x73\x74\x75\x76\x77"
12108 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12109 "\x80\x81\x82\x83\x84\x85\x86\x87"
12110 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12111 "\x90\x91\x92\x93\x94\x95\x96\x97"
12112 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12113 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12114 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12115 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12116 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12117 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12118 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12119 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12120 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12121 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12122 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12123 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12124 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12125 "\x00\x01\x02\x03\x04\x05\x06\x07"
12126 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12127 "\x10\x11\x12\x13\x14\x15\x16\x17"
12128 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12129 "\x20\x21\x22\x23\x24\x25\x26\x27"
12130 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12131 "\x30\x31\x32\x33\x34\x35\x36\x37"
12132 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12133 "\x40\x41\x42\x43\x44\x45\x46\x47"
12134 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12135 "\x50\x51\x52\x53\x54\x55\x56\x57"
12136 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12137 "\x60\x61\x62\x63\x64\x65\x66\x67"
12138 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12139 "\x70\x71\x72\x73\x74\x75\x76\x77"
12140 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12141 "\x80\x81\x82\x83\x84\x85\x86\x87"
12142 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12143 "\x90\x91\x92\x93\x94\x95\x96\x97"
12144 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12145 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12146 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12147 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12148 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12149 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12150 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12151 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12152 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12153 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12154 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12155 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12156 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12157 .ilen = 512,
12158 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12159 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12160 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12161 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12162 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12163 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12164 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12165 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12166 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12167 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12168 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12169 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12170 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12171 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12172 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12173 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12174 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12175 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12176 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12177 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12178 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12179 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12180 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12181 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12182 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12183 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12184 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12185 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12186 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12187 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12188 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12189 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12190 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12191 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12192 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12193 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12194 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12195 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12196 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12197 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12198 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12199 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12200 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12201 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12202 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12203 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12204 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12205 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12206 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12207 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12208 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12209 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12210 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12211 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12212 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12213 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12214 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12215 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12216 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12217 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12218 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12219 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12220 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12221 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12222 .rlen = 512,
12223 }, {
12224 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12225 "\x23\x53\x60\x28\x74\x71\x35\x26"
12226 "\x62\x49\x77\x57\x24\x70\x93\x69"
12227 "\x99\x59\x57\x49\x66\x96\x76\x27"
12228 "\x31\x41\x59\x26\x53\x58\x97\x93"
12229 "\x23\x84\x62\x64\x33\x83\x27\x95"
12230 "\x02\x88\x41\x97\x16\x93\x99\x37"
12231 "\x51\x05\x82\x09\x74\x94\x45\x92",
12232 .klen = 64,
12233 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12234 "\x00\x00\x00\x00\x00\x00\x00\x00",
12235 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12236 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12237 "\x10\x11\x12\x13\x14\x15\x16\x17"
12238 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12239 "\x20\x21\x22\x23\x24\x25\x26\x27"
12240 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12241 "\x30\x31\x32\x33\x34\x35\x36\x37"
12242 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12243 "\x40\x41\x42\x43\x44\x45\x46\x47"
12244 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12245 "\x50\x51\x52\x53\x54\x55\x56\x57"
12246 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12247 "\x60\x61\x62\x63\x64\x65\x66\x67"
12248 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12249 "\x70\x71\x72\x73\x74\x75\x76\x77"
12250 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12251 "\x80\x81\x82\x83\x84\x85\x86\x87"
12252 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12253 "\x90\x91\x92\x93\x94\x95\x96\x97"
12254 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12255 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12256 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12257 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12258 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12259 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12260 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12261 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12262 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12263 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12264 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12265 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12266 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12267 "\x00\x01\x02\x03\x04\x05\x06\x07"
12268 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12269 "\x10\x11\x12\x13\x14\x15\x16\x17"
12270 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12271 "\x20\x21\x22\x23\x24\x25\x26\x27"
12272 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12273 "\x30\x31\x32\x33\x34\x35\x36\x37"
12274 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12275 "\x40\x41\x42\x43\x44\x45\x46\x47"
12276 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12277 "\x50\x51\x52\x53\x54\x55\x56\x57"
12278 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12279 "\x60\x61\x62\x63\x64\x65\x66\x67"
12280 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12281 "\x70\x71\x72\x73\x74\x75\x76\x77"
12282 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12283 "\x80\x81\x82\x83\x84\x85\x86\x87"
12284 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12285 "\x90\x91\x92\x93\x94\x95\x96\x97"
12286 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12287 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12288 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12289 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12290 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12291 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12292 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12293 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12294 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12295 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12296 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12297 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12298 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12299 .ilen = 512,
12300 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12301 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12302 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12303 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12304 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12305 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12306 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12307 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12308 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12309 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12310 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12311 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12312 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12313 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12314 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12315 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12316 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12317 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12318 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12319 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12320 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12321 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12322 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12323 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12324 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12325 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12326 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12327 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12328 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12329 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12330 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12331 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12332 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12333 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12334 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12335 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12336 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12337 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12338 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12339 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12340 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12341 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12342 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12343 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12344 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12345 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12346 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12347 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12348 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12349 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12350 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12351 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12352 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12353 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12354 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12355 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12356 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12357 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12358 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12359 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12360 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12361 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12362 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12363 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12364 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012365 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012366 .np = 3,
12367 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030012368 },
12369};
12370
12371static struct cipher_testvec serpent_xts_dec_tv_template[] = {
12372 /* Generated from AES-XTS test vectors */
12373 /* same as enc vectors with input and result reversed */
12374 {
12375 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
12376 "\x00\x00\x00\x00\x00\x00\x00\x00"
12377 "\x00\x00\x00\x00\x00\x00\x00\x00"
12378 "\x00\x00\x00\x00\x00\x00\x00\x00",
12379 .klen = 32,
12380 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12381 "\x00\x00\x00\x00\x00\x00\x00\x00",
12382 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
12383 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
12384 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
12385 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
12386 .ilen = 32,
12387 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
12388 "\x00\x00\x00\x00\x00\x00\x00\x00"
12389 "\x00\x00\x00\x00\x00\x00\x00\x00"
12390 "\x00\x00\x00\x00\x00\x00\x00\x00",
12391 .rlen = 32,
12392 }, {
12393 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
12394 "\x11\x11\x11\x11\x11\x11\x11\x11"
12395 "\x22\x22\x22\x22\x22\x22\x22\x22"
12396 "\x22\x22\x22\x22\x22\x22\x22\x22",
12397 .klen = 32,
12398 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12399 "\x00\x00\x00\x00\x00\x00\x00\x00",
12400 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
12401 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
12402 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
12403 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
12404 .ilen = 32,
12405 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12406 "\x44\x44\x44\x44\x44\x44\x44\x44"
12407 "\x44\x44\x44\x44\x44\x44\x44\x44"
12408 "\x44\x44\x44\x44\x44\x44\x44\x44",
12409 .rlen = 32,
12410 }, {
12411 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12412 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12413 "\x22\x22\x22\x22\x22\x22\x22\x22"
12414 "\x22\x22\x22\x22\x22\x22\x22\x22",
12415 .klen = 32,
12416 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12417 "\x00\x00\x00\x00\x00\x00\x00\x00",
12418 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
12419 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
12420 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
12421 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
12422 .ilen = 32,
12423 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12424 "\x44\x44\x44\x44\x44\x44\x44\x44"
12425 "\x44\x44\x44\x44\x44\x44\x44\x44"
12426 "\x44\x44\x44\x44\x44\x44\x44\x44",
12427 .rlen = 32,
12428 }, {
12429 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12430 "\x23\x53\x60\x28\x74\x71\x35\x26"
12431 "\x31\x41\x59\x26\x53\x58\x97\x93"
12432 "\x23\x84\x62\x64\x33\x83\x27\x95",
12433 .klen = 32,
12434 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12435 "\x00\x00\x00\x00\x00\x00\x00\x00",
12436 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12437 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12438 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12439 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12440 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12441 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12442 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12443 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12444 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12445 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12446 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12447 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12448 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12449 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12450 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12451 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12452 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12453 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12454 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12455 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12456 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12457 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12458 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12459 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12460 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12461 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12462 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12463 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12464 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12465 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12466 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12467 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12468 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12469 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12470 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12471 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12472 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12473 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12474 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12475 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12476 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12477 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12478 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12479 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12480 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12481 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12482 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12483 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12484 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12485 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12486 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12487 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12488 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12489 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12490 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12491 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12492 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12493 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12494 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12495 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12496 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12497 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12498 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12499 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12500 .ilen = 512,
12501 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12502 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12503 "\x10\x11\x12\x13\x14\x15\x16\x17"
12504 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12505 "\x20\x21\x22\x23\x24\x25\x26\x27"
12506 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12507 "\x30\x31\x32\x33\x34\x35\x36\x37"
12508 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12509 "\x40\x41\x42\x43\x44\x45\x46\x47"
12510 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12511 "\x50\x51\x52\x53\x54\x55\x56\x57"
12512 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12513 "\x60\x61\x62\x63\x64\x65\x66\x67"
12514 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12515 "\x70\x71\x72\x73\x74\x75\x76\x77"
12516 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12517 "\x80\x81\x82\x83\x84\x85\x86\x87"
12518 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12519 "\x90\x91\x92\x93\x94\x95\x96\x97"
12520 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12521 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12522 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12523 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12524 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12525 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12526 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12527 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12528 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12529 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12530 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12531 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12532 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12533 "\x00\x01\x02\x03\x04\x05\x06\x07"
12534 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12535 "\x10\x11\x12\x13\x14\x15\x16\x17"
12536 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12537 "\x20\x21\x22\x23\x24\x25\x26\x27"
12538 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12539 "\x30\x31\x32\x33\x34\x35\x36\x37"
12540 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12541 "\x40\x41\x42\x43\x44\x45\x46\x47"
12542 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12543 "\x50\x51\x52\x53\x54\x55\x56\x57"
12544 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12545 "\x60\x61\x62\x63\x64\x65\x66\x67"
12546 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12547 "\x70\x71\x72\x73\x74\x75\x76\x77"
12548 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12549 "\x80\x81\x82\x83\x84\x85\x86\x87"
12550 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12551 "\x90\x91\x92\x93\x94\x95\x96\x97"
12552 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12553 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12554 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12555 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12556 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12557 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12558 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12559 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12560 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12561 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12562 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12563 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12564 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12565 .rlen = 512,
12566 }, {
12567 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12568 "\x23\x53\x60\x28\x74\x71\x35\x26"
12569 "\x62\x49\x77\x57\x24\x70\x93\x69"
12570 "\x99\x59\x57\x49\x66\x96\x76\x27"
12571 "\x31\x41\x59\x26\x53\x58\x97\x93"
12572 "\x23\x84\x62\x64\x33\x83\x27\x95"
12573 "\x02\x88\x41\x97\x16\x93\x99\x37"
12574 "\x51\x05\x82\x09\x74\x94\x45\x92",
12575 .klen = 64,
12576 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12577 "\x00\x00\x00\x00\x00\x00\x00\x00",
12578 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12579 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12580 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12581 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12582 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12583 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12584 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12585 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12586 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12587 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12588 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12589 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12590 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12591 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12592 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12593 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12594 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12595 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12596 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12597 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12598 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12599 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12600 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12601 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12602 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12603 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12604 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12605 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12606 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12607 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12608 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12609 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12610 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12611 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12612 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12613 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12614 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12615 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12616 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12617 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12618 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12619 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12620 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12621 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12622 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12623 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12624 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12625 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12626 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12627 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12628 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12629 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12630 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12631 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12632 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12633 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12634 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12635 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12636 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12637 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12638 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12639 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12640 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12641 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12642 .ilen = 512,
12643 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12644 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12645 "\x10\x11\x12\x13\x14\x15\x16\x17"
12646 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12647 "\x20\x21\x22\x23\x24\x25\x26\x27"
12648 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12649 "\x30\x31\x32\x33\x34\x35\x36\x37"
12650 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12651 "\x40\x41\x42\x43\x44\x45\x46\x47"
12652 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12653 "\x50\x51\x52\x53\x54\x55\x56\x57"
12654 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12655 "\x60\x61\x62\x63\x64\x65\x66\x67"
12656 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12657 "\x70\x71\x72\x73\x74\x75\x76\x77"
12658 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12659 "\x80\x81\x82\x83\x84\x85\x86\x87"
12660 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12661 "\x90\x91\x92\x93\x94\x95\x96\x97"
12662 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12663 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12664 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12665 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12666 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12667 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12668 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12669 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12670 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12671 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12672 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12673 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12674 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12675 "\x00\x01\x02\x03\x04\x05\x06\x07"
12676 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12677 "\x10\x11\x12\x13\x14\x15\x16\x17"
12678 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12679 "\x20\x21\x22\x23\x24\x25\x26\x27"
12680 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12681 "\x30\x31\x32\x33\x34\x35\x36\x37"
12682 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12683 "\x40\x41\x42\x43\x44\x45\x46\x47"
12684 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12685 "\x50\x51\x52\x53\x54\x55\x56\x57"
12686 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12687 "\x60\x61\x62\x63\x64\x65\x66\x67"
12688 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12689 "\x70\x71\x72\x73\x74\x75\x76\x77"
12690 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12691 "\x80\x81\x82\x83\x84\x85\x86\x87"
12692 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12693 "\x90\x91\x92\x93\x94\x95\x96\x97"
12694 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12695 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12696 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12697 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12698 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12699 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12700 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12701 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12702 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12703 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12704 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12705 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12706 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12707 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012708 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012709 .np = 3,
12710 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030012711 },
12712};
12713
Herbert Xuda7f0332008-07-31 17:08:25 +080012714/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012715#define CAST6_ENC_TEST_VECTORS 4
12716#define CAST6_DEC_TEST_VECTORS 4
12717#define CAST6_CBC_ENC_TEST_VECTORS 1
12718#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030012719#define CAST6_CTR_ENC_TEST_VECTORS 2
12720#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012721#define CAST6_LRW_ENC_TEST_VECTORS 1
12722#define CAST6_LRW_DEC_TEST_VECTORS 1
12723#define CAST6_XTS_ENC_TEST_VECTORS 1
12724#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +080012725
12726static struct cipher_testvec cast6_enc_tv_template[] = {
12727 {
12728 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12729 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12730 .klen = 16,
12731 .input = zeroed_string,
12732 .ilen = 16,
12733 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12734 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12735 .rlen = 16,
12736 }, {
12737 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12738 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12739 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12740 .klen = 24,
12741 .input = zeroed_string,
12742 .ilen = 16,
12743 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12744 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12745 .rlen = 16,
12746 }, {
12747 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12748 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12749 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12750 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12751 .klen = 32,
12752 .input = zeroed_string,
12753 .ilen = 16,
12754 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12755 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12756 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012757 }, { /* Generated from TF test vectors */
12758 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12759 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12760 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12761 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12762 .klen = 32,
12763 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12764 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12765 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12766 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12767 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12768 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12769 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12770 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12771 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12772 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12773 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12774 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12775 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12776 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12777 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12778 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12779 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12780 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12781 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12782 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12783 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12784 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12785 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12786 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12787 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12788 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12789 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12790 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12791 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12792 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12793 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12794 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12795 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12796 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12797 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12798 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12799 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12800 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12801 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12802 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12803 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12804 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12805 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12806 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12807 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12808 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12809 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12810 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12811 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12812 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12813 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12814 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12815 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12816 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12817 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12818 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12819 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12820 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12821 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12822 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12823 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12824 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12825 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12826 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12827 .ilen = 496,
12828 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12829 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12830 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12831 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12832 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12833 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12834 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12835 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12836 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12837 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12838 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12839 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12840 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12841 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12842 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12843 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12844 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12845 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12846 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12847 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12848 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12849 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12850 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12851 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12852 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12853 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12854 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12855 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12856 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12857 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12858 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12859 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12860 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12861 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12862 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12863 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12864 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12865 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12866 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12867 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12868 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12869 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12870 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12871 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12872 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12873 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12874 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12875 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12876 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12877 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12878 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12879 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12880 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12881 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12882 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12883 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12884 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12885 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12886 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12887 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12888 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12889 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12890 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012891 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012892 .np = 3,
12893 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012894 },
12895};
12896
12897static struct cipher_testvec cast6_dec_tv_template[] = {
12898 {
12899 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12900 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12901 .klen = 16,
12902 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12903 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12904 .ilen = 16,
12905 .result = zeroed_string,
12906 .rlen = 16,
12907 }, {
12908 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12909 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12910 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12911 .klen = 24,
12912 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12913 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12914 .ilen = 16,
12915 .result = zeroed_string,
12916 .rlen = 16,
12917 }, {
12918 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12919 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12920 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12921 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12922 .klen = 32,
12923 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12924 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12925 .ilen = 16,
12926 .result = zeroed_string,
12927 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012928 }, { /* 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 = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12937 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12938 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12939 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12940 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12941 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12942 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12943 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12944 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12945 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12946 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12947 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12948 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12949 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12950 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12951 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12952 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12953 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12954 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12955 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12956 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12957 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12958 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12959 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12960 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12961 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12962 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12963 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12964 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12965 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12966 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12967 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12968 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12969 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12970 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12971 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12972 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12973 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12974 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12975 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12976 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12977 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12978 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12979 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12980 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12981 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12982 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12983 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12984 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12985 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12986 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12987 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12988 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12989 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12990 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12991 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12992 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12993 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12994 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12995 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12996 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12997 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12998 .ilen = 496,
12999 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13000 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13001 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13002 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13003 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13004 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13005 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13006 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13007 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13008 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13009 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13010 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13011 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13012 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13013 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13014 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13015 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13016 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13017 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13018 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13019 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13020 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13021 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13022 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13023 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13024 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13025 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13026 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13027 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13028 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13029 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13030 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13031 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13032 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13033 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13034 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13035 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13036 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13037 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13038 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13039 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13040 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13041 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13042 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13043 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13044 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13045 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13046 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13047 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13048 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13049 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13050 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13051 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13052 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13053 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13054 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13055 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13056 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13057 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13058 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13059 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13060 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13061 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013062 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013063 .np = 3,
13064 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013065 },
13066};
13067
13068static struct cipher_testvec cast6_cbc_enc_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 = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13078 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13079 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13080 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13081 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13082 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13083 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13084 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13085 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13086 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13087 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13088 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13089 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13090 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13091 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13092 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13093 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13094 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13095 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13096 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13097 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13098 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13099 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13100 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13101 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13102 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13103 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13104 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13105 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13106 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13107 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13108 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13109 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13110 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13111 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13112 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13113 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13114 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13115 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13116 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13117 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13118 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13119 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13120 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13121 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13122 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13123 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13124 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13125 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13126 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13127 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13128 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13129 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13130 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13131 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13132 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13133 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13134 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13135 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13136 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13137 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13138 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13139 .ilen = 496,
13140 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
13141 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
13142 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
13143 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
13144 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
13145 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
13146 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
13147 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
13148 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
13149 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
13150 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
13151 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
13152 "\x23\x16\x47\x72\x81\x13\x3A\x72"
13153 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
13154 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
13155 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
13156 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
13157 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
13158 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
13159 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
13160 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
13161 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
13162 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
13163 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
13164 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
13165 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
13166 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
13167 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
13168 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
13169 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
13170 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
13171 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
13172 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
13173 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
13174 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
13175 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
13176 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
13177 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
13178 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
13179 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
13180 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
13181 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
13182 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
13183 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
13184 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
13185 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
13186 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
13187 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
13188 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
13189 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
13190 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
13191 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
13192 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
13193 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
13194 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
13195 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
13196 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
13197 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
13198 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
13199 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
13200 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
13201 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
13202 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013203 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013204 .np = 3,
13205 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013206 },
13207};
13208
13209static struct cipher_testvec cast6_cbc_dec_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 = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
13219 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
13220 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
13221 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
13222 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
13223 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
13224 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
13225 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
13226 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
13227 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
13228 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
13229 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
13230 "\x23\x16\x47\x72\x81\x13\x3A\x72"
13231 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
13232 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
13233 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
13234 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
13235 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
13236 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
13237 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
13238 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
13239 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
13240 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
13241 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
13242 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
13243 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
13244 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
13245 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
13246 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
13247 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
13248 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
13249 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
13250 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
13251 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
13252 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
13253 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
13254 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
13255 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
13256 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
13257 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
13258 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
13259 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
13260 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
13261 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
13262 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
13263 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
13264 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
13265 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
13266 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
13267 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
13268 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
13269 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
13270 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
13271 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
13272 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
13273 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
13274 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
13275 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
13276 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
13277 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
13278 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
13279 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
13280 .ilen = 496,
13281 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13282 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13283 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13284 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13285 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13286 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13287 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13288 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13289 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13290 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13291 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13292 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13293 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13294 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13295 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13296 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13297 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13298 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13299 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13300 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13301 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13302 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13303 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13304 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13305 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13306 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13307 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13308 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13309 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13310 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13311 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13312 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13313 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13314 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13315 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13316 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13317 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13318 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13319 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13320 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13321 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13322 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13323 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13324 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13325 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13326 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13327 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13328 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13329 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13330 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13331 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13332 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13333 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13334 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13335 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13336 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13337 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13338 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13339 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13340 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13341 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13342 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13343 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013344 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013345 .np = 3,
13346 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013347 },
13348};
13349
13350static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
13351 { /* Generated from TF test vectors */
13352 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13353 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13354 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13355 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13356 .klen = 32,
13357 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13358 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13359 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13360 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013361 "\x3A",
13362 .ilen = 17,
13363 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13364 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13365 "\x57",
13366 .rlen = 17,
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 = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13376 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013377 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13378 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13379 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13380 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13381 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13382 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13383 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13384 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13385 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13386 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13387 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13388 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13389 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13390 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13391 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13392 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13393 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13394 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13395 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13396 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13397 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13398 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13399 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13400 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13401 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13402 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13403 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13404 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13405 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13406 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13407 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13408 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13409 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13410 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13411 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13412 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13413 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13414 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13415 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13416 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13417 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13418 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13419 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13420 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13421 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13422 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13423 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13424 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13425 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13426 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13427 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13428 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13429 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13430 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13431 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13432 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13433 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13434 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13435 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13436 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13437 .ilen = 496,
13438 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13439 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13440 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13441 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13442 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13443 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13444 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13445 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13446 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13447 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13448 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13449 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13450 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13451 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13452 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13453 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13454 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13455 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13456 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13457 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13458 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13459 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13460 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13461 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13462 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13463 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13464 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13465 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13466 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13467 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13468 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13469 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13470 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13471 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13472 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13473 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13474 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13475 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13476 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13477 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13478 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13479 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13480 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13481 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13482 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13483 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13484 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13485 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13486 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13487 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13488 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13489 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13490 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13491 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13492 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13493 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13494 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13495 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13496 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13497 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13498 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13499 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13500 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013501 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013502 .np = 3,
13503 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013504 },
13505};
13506
13507static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
13508 { /* Generated from TF test vectors */
13509 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13510 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13511 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13512 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13513 .klen = 32,
13514 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13515 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13516 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13517 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013518 "\x57",
13519 .ilen = 17,
13520 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13521 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13522 "\x3A",
13523 .rlen = 17,
13524 }, { /* Generated from TF test vectors */
13525 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13526 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13527 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13528 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13529 .klen = 32,
13530 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13531 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13532 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13533 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013534 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13535 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13536 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13537 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13538 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13539 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13540 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13541 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13542 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13543 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13544 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13545 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13546 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13547 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13548 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13549 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13550 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13551 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13552 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13553 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13554 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13555 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13556 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13557 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13558 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13559 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13560 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13561 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13562 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13563 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13564 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13565 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13566 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13567 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13568 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13569 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13570 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13571 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13572 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13573 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13574 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13575 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13576 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13577 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13578 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13579 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13580 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13581 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13582 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13583 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13584 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13585 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13586 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13587 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13588 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13589 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13590 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13591 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13592 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13593 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13594 .ilen = 496,
13595 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13596 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13597 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13598 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13599 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13600 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13601 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13602 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13603 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13604 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13605 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13606 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13607 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13608 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13609 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13610 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13611 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13612 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13613 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13614 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13615 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13616 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13617 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13618 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13619 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13620 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13621 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13622 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13623 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13624 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13625 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13626 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13627 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13628 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13629 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13630 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13631 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13632 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13633 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13634 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13635 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13636 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13637 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13638 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13639 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13640 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13641 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13642 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13643 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13644 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13645 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13646 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13647 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13648 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13649 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13650 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13651 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13652 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13653 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13654 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13655 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13656 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13657 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013658 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013659 .np = 3,
13660 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013661 },
13662};
13663
13664static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
13665 { /* Generated from TF test vectors */
13666 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13667 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13668 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13669 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13670 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13671 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13672 .klen = 48,
13673 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13674 "\x00\x00\x00\x00\x00\x00\x00\x01",
13675 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13676 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13677 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13678 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13679 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13680 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13681 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13682 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13683 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13684 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13685 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13686 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13687 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13688 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13689 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13690 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13691 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13692 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13693 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13694 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13695 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13696 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13697 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13698 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13699 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13700 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13701 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13702 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13703 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13704 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13705 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13706 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13707 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13708 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13709 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13710 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13711 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13712 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13713 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13714 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13715 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13716 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13717 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13718 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13719 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13720 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13721 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13722 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13723 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13724 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13725 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13726 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13727 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13728 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13729 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13730 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13731 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13732 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13733 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13734 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13735 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13736 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13737 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13738 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13739 .ilen = 512,
13740 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13741 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13742 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13743 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13744 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13745 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13746 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13747 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13748 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13749 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13750 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13751 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13752 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13753 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13754 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13755 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13756 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13757 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13758 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13759 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13760 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13761 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13762 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13763 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13764 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13765 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13766 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13767 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13768 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13769 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13770 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13771 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13772 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13773 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13774 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13775 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13776 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13777 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13778 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13779 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13780 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13781 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13782 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13783 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13784 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13785 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13786 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13787 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13788 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13789 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13790 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13791 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13792 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13793 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13794 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13795 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13796 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13797 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13798 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13799 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13800 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13801 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13802 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13803 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13804 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013805 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013806 .np = 3,
13807 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013808 },
13809};
13810
13811static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
13812 { /* Generated from TF test vectors */
13813 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13814 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13815 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13816 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13817 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13818 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13819 .klen = 48,
13820 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13821 "\x00\x00\x00\x00\x00\x00\x00\x01",
13822 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13823 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13824 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13825 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13826 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13827 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13828 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13829 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13830 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13831 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13832 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13833 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13834 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13835 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13836 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13837 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13838 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13839 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13840 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13841 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13842 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13843 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13844 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13845 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13846 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13847 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13848 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13849 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13850 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13851 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13852 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13853 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13854 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13855 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13856 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13857 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13858 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13859 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13860 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13861 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13862 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13863 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13864 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13865 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13866 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13867 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13868 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13869 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13870 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13871 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13872 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13873 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13874 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13875 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13876 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13877 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13878 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13879 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13880 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13881 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13882 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13883 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13884 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13885 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13886 .ilen = 512,
13887 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13888 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13889 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13890 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13891 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13892 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13893 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13894 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13895 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13896 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13897 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13898 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13899 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13900 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13901 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13902 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13903 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13904 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13905 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13906 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13907 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13908 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13909 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13910 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13911 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13912 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13913 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13914 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13915 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13916 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13917 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13918 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13919 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13920 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13921 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13922 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13923 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13924 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13925 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13926 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13927 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13928 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13929 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13930 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13931 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13932 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13933 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13934 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13935 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13936 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13937 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13938 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13939 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13940 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13941 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13942 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13943 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13944 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13945 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13946 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13947 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13948 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13949 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13950 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13951 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013952 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013953 .np = 3,
13954 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013955 },
13956};
13957
13958static struct cipher_testvec cast6_xts_enc_tv_template[] = {
13959 { /* Generated from TF test vectors */
13960 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13961 "\x23\x53\x60\x28\x74\x71\x35\x26"
13962 "\x62\x49\x77\x57\x24\x70\x93\x69"
13963 "\x99\x59\x57\x49\x66\x96\x76\x27"
13964 "\x31\x41\x59\x26\x53\x58\x97\x93"
13965 "\x23\x84\x62\x64\x33\x83\x27\x95"
13966 "\x02\x88\x41\x97\x16\x93\x99\x37"
13967 "\x51\x05\x82\x09\x74\x94\x45\x92",
13968 .klen = 64,
13969 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13970 "\x00\x00\x00\x00\x00\x00\x00\x00",
13971 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13972 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13973 "\x10\x11\x12\x13\x14\x15\x16\x17"
13974 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13975 "\x20\x21\x22\x23\x24\x25\x26\x27"
13976 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13977 "\x30\x31\x32\x33\x34\x35\x36\x37"
13978 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13979 "\x40\x41\x42\x43\x44\x45\x46\x47"
13980 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13981 "\x50\x51\x52\x53\x54\x55\x56\x57"
13982 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13983 "\x60\x61\x62\x63\x64\x65\x66\x67"
13984 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13985 "\x70\x71\x72\x73\x74\x75\x76\x77"
13986 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13987 "\x80\x81\x82\x83\x84\x85\x86\x87"
13988 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13989 "\x90\x91\x92\x93\x94\x95\x96\x97"
13990 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13991 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13992 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13993 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13994 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13995 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13996 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13997 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13998 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13999 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14000 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14001 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14002 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
14003 "\x00\x01\x02\x03\x04\x05\x06\x07"
14004 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14005 "\x10\x11\x12\x13\x14\x15\x16\x17"
14006 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14007 "\x20\x21\x22\x23\x24\x25\x26\x27"
14008 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14009 "\x30\x31\x32\x33\x34\x35\x36\x37"
14010 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14011 "\x40\x41\x42\x43\x44\x45\x46\x47"
14012 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14013 "\x50\x51\x52\x53\x54\x55\x56\x57"
14014 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14015 "\x60\x61\x62\x63\x64\x65\x66\x67"
14016 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14017 "\x70\x71\x72\x73\x74\x75\x76\x77"
14018 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14019 "\x80\x81\x82\x83\x84\x85\x86\x87"
14020 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14021 "\x90\x91\x92\x93\x94\x95\x96\x97"
14022 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14023 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14024 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14025 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14026 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14027 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14028 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14029 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14030 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14031 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14032 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14033 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14034 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
14035 .ilen = 512,
14036 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
14037 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
14038 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
14039 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
14040 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
14041 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
14042 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
14043 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
14044 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
14045 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
14046 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
14047 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
14048 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
14049 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
14050 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
14051 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
14052 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
14053 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
14054 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
14055 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
14056 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
14057 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
14058 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
14059 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
14060 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
14061 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
14062 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
14063 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
14064 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
14065 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
14066 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
14067 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
14068 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
14069 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
14070 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
14071 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
14072 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
14073 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
14074 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
14075 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
14076 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
14077 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
14078 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
14079 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
14080 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
14081 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
14082 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
14083 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
14084 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
14085 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
14086 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
14087 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
14088 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
14089 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
14090 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
14091 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
14092 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
14093 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
14094 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
14095 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
14096 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
14097 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
14098 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
14099 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
14100 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014101 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014102 .np = 3,
14103 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020014104 },
14105};
14106
14107static struct cipher_testvec cast6_xts_dec_tv_template[] = {
14108 { /* Generated from TF test vectors */
14109 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
14110 "\x23\x53\x60\x28\x74\x71\x35\x26"
14111 "\x62\x49\x77\x57\x24\x70\x93\x69"
14112 "\x99\x59\x57\x49\x66\x96\x76\x27"
14113 "\x31\x41\x59\x26\x53\x58\x97\x93"
14114 "\x23\x84\x62\x64\x33\x83\x27\x95"
14115 "\x02\x88\x41\x97\x16\x93\x99\x37"
14116 "\x51\x05\x82\x09\x74\x94\x45\x92",
14117 .klen = 64,
14118 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
14119 "\x00\x00\x00\x00\x00\x00\x00\x00",
14120 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
14121 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
14122 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
14123 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
14124 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
14125 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
14126 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
14127 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
14128 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
14129 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
14130 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
14131 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
14132 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
14133 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
14134 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
14135 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
14136 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
14137 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
14138 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
14139 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
14140 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
14141 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
14142 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
14143 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
14144 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
14145 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
14146 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
14147 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
14148 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
14149 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
14150 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
14151 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
14152 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
14153 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
14154 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
14155 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
14156 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
14157 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
14158 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
14159 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
14160 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
14161 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
14162 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
14163 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
14164 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
14165 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
14166 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
14167 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
14168 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
14169 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
14170 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
14171 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
14172 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
14173 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
14174 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
14175 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
14176 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
14177 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
14178 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
14179 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
14180 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
14181 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
14182 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
14183 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
14184 .ilen = 512,
14185 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14186 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14187 "\x10\x11\x12\x13\x14\x15\x16\x17"
14188 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14189 "\x20\x21\x22\x23\x24\x25\x26\x27"
14190 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14191 "\x30\x31\x32\x33\x34\x35\x36\x37"
14192 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14193 "\x40\x41\x42\x43\x44\x45\x46\x47"
14194 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14195 "\x50\x51\x52\x53\x54\x55\x56\x57"
14196 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14197 "\x60\x61\x62\x63\x64\x65\x66\x67"
14198 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14199 "\x70\x71\x72\x73\x74\x75\x76\x77"
14200 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14201 "\x80\x81\x82\x83\x84\x85\x86\x87"
14202 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14203 "\x90\x91\x92\x93\x94\x95\x96\x97"
14204 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14205 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14206 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14207 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14208 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14209 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14210 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14211 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14212 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14213 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14214 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14215 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14216 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
14217 "\x00\x01\x02\x03\x04\x05\x06\x07"
14218 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14219 "\x10\x11\x12\x13\x14\x15\x16\x17"
14220 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14221 "\x20\x21\x22\x23\x24\x25\x26\x27"
14222 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14223 "\x30\x31\x32\x33\x34\x35\x36\x37"
14224 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14225 "\x40\x41\x42\x43\x44\x45\x46\x47"
14226 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14227 "\x50\x51\x52\x53\x54\x55\x56\x57"
14228 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14229 "\x60\x61\x62\x63\x64\x65\x66\x67"
14230 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14231 "\x70\x71\x72\x73\x74\x75\x76\x77"
14232 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14233 "\x80\x81\x82\x83\x84\x85\x86\x87"
14234 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14235 "\x90\x91\x92\x93\x94\x95\x96\x97"
14236 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14237 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14238 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14239 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14240 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14241 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14242 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14243 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14244 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14245 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14246 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14247 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14248 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
14249 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014250 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014251 .np = 3,
14252 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014253 },
14254};
14255
14256
14257/*
14258 * AES test vectors.
14259 */
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014260#define AES_ENC_TEST_VECTORS 4
14261#define AES_DEC_TEST_VECTORS 4
14262#define AES_CBC_ENC_TEST_VECTORS 5
14263#define AES_CBC_DEC_TEST_VECTORS 5
Horia Geantabca4feb2014-03-14 17:46:51 +020014264#define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
14265#define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
Nitesh Lal5208ed22014-05-21 17:09:08 +053014266#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2
14267#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2
14268#define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7
14269#define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7
14270#define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7
Herbert Xuda7f0332008-07-31 17:08:25 +080014271#define AES_LRW_ENC_TEST_VECTORS 8
14272#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +100014273#define AES_XTS_ENC_TEST_VECTORS 5
14274#define AES_XTS_DEC_TEST_VECTORS 5
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014275#define AES_CTR_ENC_TEST_VECTORS 5
14276#define AES_CTR_DEC_TEST_VECTORS 5
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100014277#define AES_OFB_ENC_TEST_VECTORS 1
14278#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080014279#define AES_CTR_3686_ENC_TEST_VECTORS 7
14280#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +080014281#define AES_GCM_ENC_TEST_VECTORS 9
14282#define AES_GCM_DEC_TEST_VECTORS 8
Herbert Xu8f69b762015-06-16 13:54:26 +080014283#define AES_GCM_4106_ENC_TEST_VECTORS 23
14284#define AES_GCM_4106_DEC_TEST_VECTORS 23
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030014285#define AES_GCM_4543_ENC_TEST_VECTORS 1
14286#define AES_GCM_4543_DEC_TEST_VECTORS 2
Ard Biesheuvel45859882014-04-16 20:40:04 +080014287#define AES_CCM_ENC_TEST_VECTORS 8
Herbert Xuda7f0332008-07-31 17:08:25 +080014288#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +080014289#define AES_CCM_4309_ENC_TEST_VECTORS 7
14290#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +080014291
14292static struct cipher_testvec aes_enc_tv_template[] = {
14293 { /* From FIPS-197 */
14294 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14295 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14296 .klen = 16,
14297 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14298 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14299 .ilen = 16,
14300 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14301 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14302 .rlen = 16,
14303 }, {
14304 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14305 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14306 "\x10\x11\x12\x13\x14\x15\x16\x17",
14307 .klen = 24,
14308 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14309 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14310 .ilen = 16,
14311 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14312 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14313 .rlen = 16,
14314 }, {
14315 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14316 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14317 "\x10\x11\x12\x13\x14\x15\x16\x17"
14318 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14319 .klen = 32,
14320 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14321 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14322 .ilen = 16,
14323 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14324 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14325 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014326 }, { /* Generated with Crypto++ */
14327 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14328 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14329 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14330 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14331 .klen = 32,
14332 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14333 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14334 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14335 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14336 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14337 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14338 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14339 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14340 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14341 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14342 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14343 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14344 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14345 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14346 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14347 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14348 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14349 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14350 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14351 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14352 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14353 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14354 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14355 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14356 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14357 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14358 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14359 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14360 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14361 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14362 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14363 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14364 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14365 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14366 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14367 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14368 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14369 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14370 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14371 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14372 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14373 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14374 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14375 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14376 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14377 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14378 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14379 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14380 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14381 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14382 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14383 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14384 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14385 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14386 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14387 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14388 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14389 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14390 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14391 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14392 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14393 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14394 .ilen = 496,
14395 .result = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14396 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14397 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14398 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14399 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14400 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14401 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14402 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14403 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14404 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14405 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14406 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14407 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14408 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14409 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14410 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14411 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14412 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14413 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14414 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14415 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14416 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14417 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14418 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14419 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14420 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14421 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14422 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14423 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14424 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14425 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14426 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14427 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14428 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14429 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14430 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14431 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14432 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14433 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14434 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14435 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14436 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14437 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14438 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14439 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14440 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14441 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14442 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14443 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14444 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14445 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14446 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14447 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14448 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14449 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14450 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14451 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14452 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14453 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14454 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14455 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14456 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14457 .rlen = 496,
14458 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014459 .np = 3,
14460 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014461 },
14462};
14463
14464static struct cipher_testvec aes_dec_tv_template[] = {
14465 { /* From FIPS-197 */
14466 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14467 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14468 .klen = 16,
14469 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14470 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14471 .ilen = 16,
14472 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14473 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14474 .rlen = 16,
14475 }, {
14476 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14477 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14478 "\x10\x11\x12\x13\x14\x15\x16\x17",
14479 .klen = 24,
14480 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14481 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14482 .ilen = 16,
14483 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14484 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14485 .rlen = 16,
14486 }, {
14487 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14488 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14489 "\x10\x11\x12\x13\x14\x15\x16\x17"
14490 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14491 .klen = 32,
14492 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14493 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14494 .ilen = 16,
14495 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14496 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14497 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014498 }, { /* Generated with Crypto++ */
14499 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14500 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14501 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14502 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14503 .klen = 32,
14504 .input = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14505 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14506 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14507 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14508 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14509 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14510 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14511 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14512 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14513 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14514 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14515 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14516 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14517 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14518 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14519 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14520 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14521 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14522 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14523 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14524 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14525 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14526 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14527 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14528 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14529 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14530 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14531 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14532 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14533 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14534 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14535 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14536 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14537 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14538 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14539 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14540 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14541 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14542 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14543 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14544 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14545 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14546 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14547 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14548 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14549 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14550 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14551 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14552 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14553 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14554 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14555 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14556 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14557 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14558 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14559 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14560 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14561 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14562 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14563 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14564 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14565 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14566 .ilen = 496,
14567 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14568 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14569 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14570 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14571 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14572 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14573 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14574 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14575 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14576 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14577 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14578 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14579 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14580 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14581 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14582 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14583 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14584 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14585 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14586 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14587 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14588 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14589 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14590 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14591 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14592 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14593 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14594 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14595 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14596 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14597 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14598 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14599 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14600 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14601 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14602 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14603 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14604 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14605 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14606 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14607 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14608 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14609 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14610 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14611 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14612 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14613 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14614 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14615 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14616 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14617 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14618 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14619 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14620 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14621 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14622 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14623 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14624 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14625 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14626 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14627 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14628 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14629 .rlen = 496,
14630 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014631 .np = 3,
14632 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014633 },
14634};
14635
14636static struct cipher_testvec aes_cbc_enc_tv_template[] = {
14637 { /* From RFC 3602 */
14638 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14639 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14640 .klen = 16,
14641 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14642 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14643 .input = "Single block msg",
14644 .ilen = 16,
14645 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14646 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14647 .rlen = 16,
LABBE Corentin0d8dc962015-07-06 13:37:33 +020014648 .also_non_np = 1,
14649 .np = 8,
14650 .tap = { 3, 2, 3, 2, 3, 1, 1, 1 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014651 }, {
14652 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14653 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14654 .klen = 16,
14655 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14656 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14657 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14658 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14659 "\x10\x11\x12\x13\x14\x15\x16\x17"
14660 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14661 .ilen = 32,
14662 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14663 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14664 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14665 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14666 .rlen = 32,
14667 }, { /* From NIST SP800-38A */
14668 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14669 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14670 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14671 .klen = 24,
14672 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14673 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14674 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14675 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14676 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14677 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14678 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14679 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14680 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14681 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14682 .ilen = 64,
14683 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14684 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14685 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14686 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14687 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14688 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14689 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14690 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14691 .rlen = 64,
14692 }, {
14693 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14694 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14695 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14696 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14697 .klen = 32,
14698 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14699 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14700 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14701 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14702 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14703 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14704 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14705 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14706 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14707 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14708 .ilen = 64,
14709 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14710 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14711 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14712 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14713 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14714 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14715 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14716 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14717 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014718 }, { /* Generated with Crypto++ */
14719 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14720 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14721 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14722 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14723 .klen = 32,
14724 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14725 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14726 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14727 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14728 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14729 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14730 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14731 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14732 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14733 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14734 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14735 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14736 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14737 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14738 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14739 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14740 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14741 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14742 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14743 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14744 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14745 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14746 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14747 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14748 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14749 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14750 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14751 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14752 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14753 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14754 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14755 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14756 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14757 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14758 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14759 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14760 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14761 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14762 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14763 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14764 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14765 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14766 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14767 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14768 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14769 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14770 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14771 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14772 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14773 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14774 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14775 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14776 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14777 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14778 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14779 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14780 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14781 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14782 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14783 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14784 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14785 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14786 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14787 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14788 .ilen = 496,
14789 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14790 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14791 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14792 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14793 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14794 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14795 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14796 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14797 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14798 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14799 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14800 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14801 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14802 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14803 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14804 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14805 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14806 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14807 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14808 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14809 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14810 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14811 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14812 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14813 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14814 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14815 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14816 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14817 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14818 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14819 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14820 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14821 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14822 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14823 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14824 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14825 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14826 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14827 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14828 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14829 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14830 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14831 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14832 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14833 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14834 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14835 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14836 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14837 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14838 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14839 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14840 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14841 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14842 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14843 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14844 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14845 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14846 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14847 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14848 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14849 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14850 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14851 .rlen = 496,
14852 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014853 .np = 3,
14854 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014855 },
14856};
14857
14858static struct cipher_testvec aes_cbc_dec_tv_template[] = {
14859 { /* From RFC 3602 */
14860 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14861 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14862 .klen = 16,
14863 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14864 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14865 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14866 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14867 .ilen = 16,
14868 .result = "Single block msg",
14869 .rlen = 16,
LABBE Corentin0d8dc962015-07-06 13:37:33 +020014870 .also_non_np = 1,
14871 .np = 8,
14872 .tap = { 3, 2, 3, 2, 3, 1, 1, 1 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014873 }, {
14874 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14875 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14876 .klen = 16,
14877 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14878 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14879 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14880 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14881 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14882 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14883 .ilen = 32,
14884 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14885 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14886 "\x10\x11\x12\x13\x14\x15\x16\x17"
14887 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14888 .rlen = 32,
14889 }, { /* From NIST SP800-38A */
14890 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14891 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14892 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14893 .klen = 24,
14894 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14895 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14896 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14897 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14898 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14899 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14900 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14901 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14902 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14903 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14904 .ilen = 64,
14905 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14906 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14907 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14908 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14909 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14910 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14911 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14912 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14913 .rlen = 64,
14914 }, {
14915 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14916 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14917 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14918 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14919 .klen = 32,
14920 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14921 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14922 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14923 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14924 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14925 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14926 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14927 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14928 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14929 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14930 .ilen = 64,
14931 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14932 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14933 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14934 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14935 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14936 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14937 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14938 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14939 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014940 }, { /* Generated with Crypto++ */
14941 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14942 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14943 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14944 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14945 .klen = 32,
14946 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14947 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14948 .input = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14949 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14950 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14951 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14952 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14953 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14954 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14955 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14956 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14957 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14958 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14959 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14960 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14961 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14962 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14963 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14964 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14965 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14966 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14967 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14968 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14969 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14970 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14971 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14972 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14973 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14974 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14975 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14976 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14977 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14978 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14979 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14980 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14981 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14982 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14983 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14984 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14985 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14986 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14987 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14988 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14989 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14990 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14991 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14992 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14993 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14994 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14995 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14996 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14997 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14998 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14999 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
15000 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
15001 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
15002 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
15003 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
15004 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
15005 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
15006 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
15007 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
15008 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
15009 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
15010 .ilen = 496,
15011 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
15012 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
15013 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
15014 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
15015 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
15016 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
15017 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
15018 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
15019 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
15020 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
15021 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
15022 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
15023 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
15024 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
15025 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
15026 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
15027 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
15028 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
15029 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
15030 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
15031 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
15032 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
15033 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
15034 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
15035 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
15036 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
15037 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
15038 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
15039 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
15040 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
15041 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
15042 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
15043 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
15044 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
15045 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
15046 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
15047 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
15048 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
15049 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
15050 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
15051 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
15052 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
15053 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
15054 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
15055 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
15056 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
15057 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
15058 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
15059 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
15060 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
15061 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
15062 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
15063 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
15064 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
15065 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
15066 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
15067 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
15068 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
15069 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
15070 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
15071 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
15072 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
15073 .rlen = 496,
15074 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020015075 .np = 3,
15076 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015077 },
15078};
15079
Horia Geantabca4feb2014-03-14 17:46:51 +020015080static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
15081 { /* Input data from RFC 2410 Case 1 */
15082#ifdef __LITTLE_ENDIAN
15083 .key = "\x08\x00" /* rta length */
15084 "\x01\x00" /* rta type */
15085#else
15086 .key = "\x00\x08" /* rta length */
15087 "\x00\x01" /* rta type */
15088#endif
15089 "\x00\x00\x00\x00" /* enc key length */
15090 "\x00\x00\x00\x00\x00\x00\x00\x00"
15091 "\x00\x00\x00\x00\x00\x00\x00\x00",
15092 .klen = 8 + 16 + 0,
15093 .iv = "",
15094 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15095 .ilen = 8,
15096 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15097 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
15098 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
15099 .rlen = 8 + 16,
15100 }, { /* Input data from RFC 2410 Case 2 */
15101#ifdef __LITTLE_ENDIAN
15102 .key = "\x08\x00" /* rta length */
15103 "\x01\x00" /* rta type */
15104#else
15105 .key = "\x00\x08" /* rta length */
15106 "\x00\x01" /* rta type */
15107#endif
15108 "\x00\x00\x00\x00" /* enc key length */
15109 "\x00\x00\x00\x00\x00\x00\x00\x00"
15110 "\x00\x00\x00\x00\x00\x00\x00\x00",
15111 .klen = 8 + 16 + 0,
15112 .iv = "",
15113 .input = "Network Security People Have A Strange Sense Of Humor",
15114 .ilen = 53,
15115 .result = "Network Security People Have A Strange Sense Of Humor"
15116 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
15117 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
15118 .rlen = 53 + 16,
15119 },
15120};
15121
15122static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
15123 {
15124#ifdef __LITTLE_ENDIAN
15125 .key = "\x08\x00" /* rta length */
15126 "\x01\x00" /* rta type */
15127#else
15128 .key = "\x00\x08" /* rta length */
15129 "\x00\x01" /* rta type */
15130#endif
15131 "\x00\x00\x00\x00" /* enc key length */
15132 "\x00\x00\x00\x00\x00\x00\x00\x00"
15133 "\x00\x00\x00\x00\x00\x00\x00\x00",
15134 .klen = 8 + 16 + 0,
15135 .iv = "",
15136 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15137 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
15138 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
15139 .ilen = 8 + 16,
15140 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15141 .rlen = 8,
15142 }, {
15143#ifdef __LITTLE_ENDIAN
15144 .key = "\x08\x00" /* rta length */
15145 "\x01\x00" /* rta type */
15146#else
15147 .key = "\x00\x08" /* rta length */
15148 "\x00\x01" /* rta type */
15149#endif
15150 "\x00\x00\x00\x00" /* enc key length */
15151 "\x00\x00\x00\x00\x00\x00\x00\x00"
15152 "\x00\x00\x00\x00\x00\x00\x00\x00",
15153 .klen = 8 + 16 + 0,
15154 .iv = "",
15155 .input = "Network Security People Have A Strange Sense Of Humor"
15156 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
15157 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
15158 .ilen = 53 + 16,
15159 .result = "Network Security People Have A Strange Sense Of Humor",
15160 .rlen = 53,
15161 },
15162};
15163
Nitesh Lal5208ed22014-05-21 17:09:08 +053015164static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015165 { /* RFC 3602 Case 1 */
15166#ifdef __LITTLE_ENDIAN
15167 .key = "\x08\x00" /* rta length */
15168 "\x01\x00" /* rta type */
15169#else
15170 .key = "\x00\x08" /* rta length */
15171 "\x00\x01" /* rta type */
15172#endif
15173 "\x00\x00\x00\x10" /* enc key length */
15174 "\x00\x00\x00\x00\x00\x00\x00\x00"
15175 "\x00\x00\x00\x00\x00\x00\x00\x00"
15176 "\x00\x00\x00\x00"
15177 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15178 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15179 .klen = 8 + 20 + 16,
15180 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15181 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
Herbert Xu7079ce62015-07-30 17:53:14 +080015182 .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15183 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15184 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015185 .input = "Single block msg",
15186 .ilen = 16,
15187 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15188 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15189 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
15190 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
15191 "\x03\x71\xa2\x06",
15192 .rlen = 16 + 20,
15193 }, { /* RFC 3602 Case 2 */
15194#ifdef __LITTLE_ENDIAN
15195 .key = "\x08\x00" /* rta length */
15196 "\x01\x00" /* rta type */
15197#else
15198 .key = "\x00\x08" /* rta length */
15199 "\x00\x01" /* rta type */
15200#endif
15201 "\x00\x00\x00\x10" /* enc key length */
15202 "\x20\x21\x22\x23\x24\x25\x26\x27"
15203 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15204 "\x30\x31\x32\x33"
15205 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15206 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15207 .klen = 8 + 20 + 16,
15208 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15209 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
Herbert Xu7079ce62015-07-30 17:53:14 +080015210 .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15211 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15212 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015213 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15214 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15215 "\x10\x11\x12\x13\x14\x15\x16\x17"
15216 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15217 .ilen = 32,
15218 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15219 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15220 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15221 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15222 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
15223 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
15224 "\x65\x39\xf8\xde",
15225 .rlen = 32 + 20,
15226 }, { /* RFC 3602 Case 3 */
15227#ifdef __LITTLE_ENDIAN
15228 .key = "\x08\x00" /* rta length */
15229 "\x01\x00" /* rta type */
15230#else
15231 .key = "\x00\x08" /* rta length */
15232 "\x00\x01" /* rta type */
15233#endif
15234 "\x00\x00\x00\x10" /* enc key length */
15235 "\x11\x22\x33\x44\x55\x66\x77\x88"
15236 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15237 "\x22\x33\x44\x55"
15238 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15239 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15240 .klen = 8 + 20 + 16,
15241 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15242 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
Herbert Xu7079ce62015-07-30 17:53:14 +080015243 .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15244 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15245 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015246 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15247 .ilen = 48,
15248 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15249 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15250 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15251 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15252 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15253 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15254 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
15255 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
15256 "\x8d\x62\xf2\x1e",
15257 .rlen = 48 + 20,
15258 }, { /* RFC 3602 Case 4 */
15259#ifdef __LITTLE_ENDIAN
15260 .key = "\x08\x00" /* rta length */
15261 "\x01\x00" /* rta type */
15262#else
15263 .key = "\x00\x08" /* rta length */
15264 "\x00\x01" /* rta type */
15265#endif
15266 "\x00\x00\x00\x10" /* enc key length */
15267 "\x11\x22\x33\x44\x55\x66\x77\x88"
15268 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15269 "\x22\x33\x44\x55"
15270 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15271 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15272 .klen = 8 + 20 + 16,
15273 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15274 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
Herbert Xu7079ce62015-07-30 17:53:14 +080015275 .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15276 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15277 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015278 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15279 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15280 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15281 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15282 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15283 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15284 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15285 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15286 .ilen = 64,
15287 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15288 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15289 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15290 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15291 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15292 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15293 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15294 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15295 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
15296 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
15297 "\x1d\xbe\xc6\xe9",
15298 .rlen = 64 + 20,
15299 }, { /* RFC 3602 Case 5 */
15300#ifdef __LITTLE_ENDIAN
15301 .key = "\x08\x00" /* rta length */
15302 "\x01\x00" /* rta type */
15303#else
15304 .key = "\x00\x08" /* rta length */
15305 "\x00\x01" /* rta type */
15306#endif
15307 "\x00\x00\x00\x10" /* enc key length */
15308 "\x11\x22\x33\x44\x55\x66\x77\x88"
15309 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15310 "\x22\x33\x44\x55"
15311 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15312 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15313 .klen = 8 + 20 + 16,
15314 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15315 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
Herbert Xu7079ce62015-07-30 17:53:14 +080015316 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
15317 "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15318 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15319 .alen = 24,
Horia Geantae46e9a42012-07-03 19:16:54 +030015320 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15321 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15322 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15323 "\x10\x11\x12\x13\x14\x15\x16\x17"
15324 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15325 "\x20\x21\x22\x23\x24\x25\x26\x27"
15326 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15327 "\x30\x31\x32\x33\x34\x35\x36\x37"
15328 "\x01\x02\x03\x04\x05\x06\x07\x08"
15329 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15330 .ilen = 80,
15331 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15332 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15333 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15334 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15335 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15336 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15337 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15338 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15339 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15340 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15341 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
15342 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
15343 "\x85\xe1\x59\xf7",
15344 .rlen = 80 + 20,
15345 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15346#ifdef __LITTLE_ENDIAN
15347 .key = "\x08\x00" /* rta length */
15348 "\x01\x00" /* rta type */
15349#else
15350 .key = "\x00\x08" /* rta length */
15351 "\x00\x01" /* rta type */
15352#endif
15353 "\x00\x00\x00\x18" /* enc key length */
15354 "\x11\x22\x33\x44\x55\x66\x77\x88"
15355 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15356 "\x22\x33\x44\x55"
15357 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15358 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15359 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15360 .klen = 8 + 20 + 24,
15361 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15362 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015363 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15364 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15365 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015366 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15367 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15368 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15369 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15370 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15371 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15372 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15373 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15374 .ilen = 64,
15375 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15376 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15377 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15378 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15379 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15380 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15381 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15382 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15383 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
15384 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
15385 "\x47\x4c\xfc\x36",
15386 .rlen = 64 + 20,
15387 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15388#ifdef __LITTLE_ENDIAN
15389 .key = "\x08\x00" /* rta length */
15390 "\x01\x00" /* rta type */
15391#else
15392 .key = "\x00\x08" /* rta length */
15393 "\x00\x01" /* rta type */
15394#endif
15395 "\x00\x00\x00\x20" /* enc key length */
15396 "\x11\x22\x33\x44\x55\x66\x77\x88"
15397 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15398 "\x22\x33\x44\x55"
15399 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15400 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15401 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15402 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15403 .klen = 8 + 20 + 32,
15404 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15405 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015406 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15407 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15408 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015409 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15410 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15411 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15412 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15413 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15414 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15415 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15416 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15417 .ilen = 64,
15418 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15419 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15420 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15421 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15422 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15423 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15424 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15425 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15426 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
15427 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
15428 "\x51\xee\xd6\x4e",
15429 .rlen = 64 + 20,
15430 },
15431};
15432
Nitesh Lal5208ed22014-05-21 17:09:08 +053015433static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015434 { /* Input data from RFC 2410 Case 1 */
15435#ifdef __LITTLE_ENDIAN
15436 .key = "\x08\x00" /* rta length */
15437 "\x01\x00" /* rta type */
15438#else
15439 .key = "\x00\x08" /* rta length */
15440 "\x00\x01" /* rta type */
15441#endif
15442 "\x00\x00\x00\x00" /* enc key length */
15443 "\x00\x00\x00\x00\x00\x00\x00\x00"
15444 "\x00\x00\x00\x00\x00\x00\x00\x00"
15445 "\x00\x00\x00\x00",
15446 .klen = 8 + 20 + 0,
15447 .iv = "",
15448 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15449 .ilen = 8,
15450 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15451 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15452 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15453 "\x8c\x5e\xe4\x08",
15454 .rlen = 8 + 20,
15455 }, { /* Input data from RFC 2410 Case 2 */
15456#ifdef __LITTLE_ENDIAN
15457 .key = "\x08\x00" /* rta length */
15458 "\x01\x00" /* rta type */
15459#else
15460 .key = "\x00\x08" /* rta length */
15461 "\x00\x01" /* rta type */
15462#endif
15463 "\x00\x00\x00\x00" /* enc key length */
15464 "\x00\x00\x00\x00\x00\x00\x00\x00"
15465 "\x00\x00\x00\x00\x00\x00\x00\x00"
15466 "\x00\x00\x00\x00",
15467 .klen = 8 + 20 + 0,
15468 .iv = "",
15469 .input = "Network Security People Have A Strange Sense Of Humor",
15470 .ilen = 53,
15471 .result = "Network Security People Have A Strange Sense Of Humor"
15472 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15473 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15474 "\x91\x56\xe4\xd6",
15475 .rlen = 53 + 20,
15476 },
15477};
15478
Nitesh Lal5208ed22014-05-21 17:09:08 +053015479static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015480 {
15481#ifdef __LITTLE_ENDIAN
15482 .key = "\x08\x00" /* rta length */
15483 "\x01\x00" /* rta type */
15484#else
15485 .key = "\x00\x08" /* rta length */
15486 "\x00\x01" /* rta type */
15487#endif
15488 "\x00\x00\x00\x00" /* enc key length */
15489 "\x00\x00\x00\x00\x00\x00\x00\x00"
15490 "\x00\x00\x00\x00\x00\x00\x00\x00"
15491 "\x00\x00\x00\x00",
15492 .klen = 8 + 20 + 0,
15493 .iv = "",
15494 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15495 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15496 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15497 "\x8c\x5e\xe4\x08",
15498 .ilen = 8 + 20,
15499 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15500 .rlen = 8,
15501 }, {
15502#ifdef __LITTLE_ENDIAN
15503 .key = "\x08\x00" /* rta length */
15504 "\x01\x00" /* rta type */
15505#else
15506 .key = "\x00\x08" /* rta length */
15507 "\x00\x01" /* rta type */
15508#endif
15509 "\x00\x00\x00\x00" /* enc key length */
15510 "\x00\x00\x00\x00\x00\x00\x00\x00"
15511 "\x00\x00\x00\x00\x00\x00\x00\x00"
15512 "\x00\x00\x00\x00",
15513 .klen = 8 + 20 + 0,
15514 .iv = "",
15515 .input = "Network Security People Have A Strange Sense Of Humor"
15516 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15517 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15518 "\x91\x56\xe4\xd6",
15519 .ilen = 53 + 20,
15520 .result = "Network Security People Have A Strange Sense Of Humor",
15521 .rlen = 53,
15522 },
15523};
15524
Nitesh Lal5208ed22014-05-21 17:09:08 +053015525static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015526 { /* RFC 3602 Case 1 */
15527#ifdef __LITTLE_ENDIAN
15528 .key = "\x08\x00" /* rta length */
15529 "\x01\x00" /* rta type */
15530#else
15531 .key = "\x00\x08" /* rta length */
15532 "\x00\x01" /* rta type */
15533#endif
15534 "\x00\x00\x00\x10" /* enc key length */
15535 "\x00\x00\x00\x00\x00\x00\x00\x00"
15536 "\x00\x00\x00\x00\x00\x00\x00\x00"
15537 "\x00\x00\x00\x00\x00\x00\x00\x00"
15538 "\x00\x00\x00\x00\x00\x00\x00\x00"
15539 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15540 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15541 .klen = 8 + 32 + 16,
15542 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15543 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
Herbert Xu7079ce62015-07-30 17:53:14 +080015544 .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15545 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15546 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015547 .input = "Single block msg",
15548 .ilen = 16,
15549 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15550 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15551 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
15552 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
15553 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
15554 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
15555 .rlen = 16 + 32,
15556 }, { /* RFC 3602 Case 2 */
15557#ifdef __LITTLE_ENDIAN
15558 .key = "\x08\x00" /* rta length */
15559 "\x01\x00" /* rta type */
15560#else
15561 .key = "\x00\x08" /* rta length */
15562 "\x00\x01" /* rta type */
15563#endif
15564 "\x00\x00\x00\x10" /* enc key length */
15565 "\x20\x21\x22\x23\x24\x25\x26\x27"
15566 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15567 "\x30\x31\x32\x33\x34\x35\x36\x37"
15568 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15569 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15570 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15571 .klen = 8 + 32 + 16,
15572 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15573 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
Herbert Xu7079ce62015-07-30 17:53:14 +080015574 .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15575 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15576 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015577 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15578 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15579 "\x10\x11\x12\x13\x14\x15\x16\x17"
15580 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15581 .ilen = 32,
15582 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15583 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15584 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15585 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15586 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
15587 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
15588 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
15589 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
15590 .rlen = 32 + 32,
15591 }, { /* RFC 3602 Case 3 */
15592#ifdef __LITTLE_ENDIAN
15593 .key = "\x08\x00" /* rta length */
15594 "\x01\x00" /* rta type */
15595#else
15596 .key = "\x00\x08" /* rta length */
15597 "\x00\x01" /* rta type */
15598#endif
15599 "\x00\x00\x00\x10" /* enc key length */
15600 "\x11\x22\x33\x44\x55\x66\x77\x88"
15601 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15602 "\x22\x33\x44\x55\x66\x77\x88\x99"
15603 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15604 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15605 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15606 .klen = 8 + 32 + 16,
15607 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15608 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
Herbert Xu7079ce62015-07-30 17:53:14 +080015609 .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15610 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15611 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015612 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15613 .ilen = 48,
15614 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15615 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15616 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15617 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15618 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15619 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15620 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
15621 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
15622 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
15623 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
15624 .rlen = 48 + 32,
15625 }, { /* RFC 3602 Case 4 */
15626#ifdef __LITTLE_ENDIAN
15627 .key = "\x08\x00" /* rta length */
15628 "\x01\x00" /* rta type */
15629#else
15630 .key = "\x00\x08" /* rta length */
15631 "\x00\x01" /* rta type */
15632#endif
15633 "\x00\x00\x00\x10" /* enc key length */
15634 "\x11\x22\x33\x44\x55\x66\x77\x88"
15635 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15636 "\x22\x33\x44\x55\x66\x77\x88\x99"
15637 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15638 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15639 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15640 .klen = 8 + 32 + 16,
15641 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15642 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
Herbert Xu7079ce62015-07-30 17:53:14 +080015643 .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15644 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15645 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015646 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15647 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15648 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15649 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15650 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15651 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15652 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15653 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15654 .ilen = 64,
15655 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15656 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15657 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15658 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15659 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15660 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15661 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15662 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15663 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
15664 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
15665 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
15666 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
15667 .rlen = 64 + 32,
15668 }, { /* RFC 3602 Case 5 */
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 "\x11\x22\x33\x44\x55\x66\x77\x88"
15678 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15679 "\x22\x33\x44\x55\x66\x77\x88\x99"
15680 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15681 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15682 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15683 .klen = 8 + 32 + 16,
15684 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15685 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
Herbert Xu7079ce62015-07-30 17:53:14 +080015686 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
15687 "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15688 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15689 .alen = 24,
Horia Geantae46e9a42012-07-03 19:16:54 +030015690 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15691 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15692 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15693 "\x10\x11\x12\x13\x14\x15\x16\x17"
15694 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15695 "\x20\x21\x22\x23\x24\x25\x26\x27"
15696 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15697 "\x30\x31\x32\x33\x34\x35\x36\x37"
15698 "\x01\x02\x03\x04\x05\x06\x07\x08"
15699 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15700 .ilen = 80,
15701 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15702 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15703 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15704 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15705 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15706 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15707 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15708 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15709 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15710 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15711 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
15712 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
15713 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
15714 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
15715 .rlen = 80 + 32,
15716 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15717#ifdef __LITTLE_ENDIAN
15718 .key = "\x08\x00" /* rta length */
15719 "\x01\x00" /* rta type */
15720#else
15721 .key = "\x00\x08" /* rta length */
15722 "\x00\x01" /* rta type */
15723#endif
15724 "\x00\x00\x00\x18" /* enc key length */
15725 "\x11\x22\x33\x44\x55\x66\x77\x88"
15726 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15727 "\x22\x33\x44\x55\x66\x77\x88\x99"
15728 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15729 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15730 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15731 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15732 .klen = 8 + 32 + 24,
15733 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15734 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015735 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15736 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15737 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015738 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15739 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15740 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15741 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15742 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15743 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15744 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15745 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15746 .ilen = 64,
15747 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15748 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15749 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15750 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15751 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15752 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15753 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15754 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15755 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
15756 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
15757 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
15758 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
15759 .rlen = 64 + 32,
15760 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15761#ifdef __LITTLE_ENDIAN
15762 .key = "\x08\x00" /* rta length */
15763 "\x01\x00" /* rta type */
15764#else
15765 .key = "\x00\x08" /* rta length */
15766 "\x00\x01" /* rta type */
15767#endif
15768 "\x00\x00\x00\x20" /* enc key length */
15769 "\x11\x22\x33\x44\x55\x66\x77\x88"
15770 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15771 "\x22\x33\x44\x55\x66\x77\x88\x99"
15772 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15773 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15774 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15775 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15776 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15777 .klen = 8 + 32 + 32,
15778 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15779 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015780 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15781 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15782 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015783 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15784 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15785 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15786 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15787 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15788 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15789 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15790 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15791 .ilen = 64,
15792 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15793 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15794 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15795 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15796 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15797 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15798 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15799 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15800 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
15801 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
15802 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
15803 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
15804 .rlen = 64 + 32,
15805 },
15806};
15807
Nitesh Lal5208ed22014-05-21 17:09:08 +053015808static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015809 { /* RFC 3602 Case 1 */
15810#ifdef __LITTLE_ENDIAN
15811 .key = "\x08\x00" /* rta length */
15812 "\x01\x00" /* rta type */
15813#else
15814 .key = "\x00\x08" /* rta length */
15815 "\x00\x01" /* rta type */
15816#endif
15817 "\x00\x00\x00\x10" /* enc key length */
15818 "\x00\x00\x00\x00\x00\x00\x00\x00"
15819 "\x00\x00\x00\x00\x00\x00\x00\x00"
15820 "\x00\x00\x00\x00\x00\x00\x00\x00"
15821 "\x00\x00\x00\x00\x00\x00\x00\x00"
15822 "\x00\x00\x00\x00\x00\x00\x00\x00"
15823 "\x00\x00\x00\x00\x00\x00\x00\x00"
15824 "\x00\x00\x00\x00\x00\x00\x00\x00"
15825 "\x00\x00\x00\x00\x00\x00\x00\x00"
15826 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15827 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15828 .klen = 8 + 64 + 16,
15829 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15830 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
Herbert Xu7079ce62015-07-30 17:53:14 +080015831 .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15832 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15833 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015834 .input = "Single block msg",
15835 .ilen = 16,
15836 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15837 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15838 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
15839 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
15840 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
15841 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
15842 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
15843 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
15844 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
15845 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
15846 .rlen = 16 + 64,
15847 }, { /* RFC 3602 Case 2 */
15848#ifdef __LITTLE_ENDIAN
15849 .key = "\x08\x00" /* rta length */
15850 "\x01\x00" /* rta type */
15851#else
15852 .key = "\x00\x08" /* rta length */
15853 "\x00\x01" /* rta type */
15854#endif
15855 "\x00\x00\x00\x10" /* enc key length */
15856 "\x20\x21\x22\x23\x24\x25\x26\x27"
15857 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15858 "\x30\x31\x32\x33\x34\x35\x36\x37"
15859 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15860 "\x40\x41\x42\x43\x44\x45\x46\x47"
15861 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15862 "\x50\x51\x52\x53\x54\x55\x56\x57"
15863 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15864 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15865 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15866 .klen = 8 + 64 + 16,
15867 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15868 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
Herbert Xu7079ce62015-07-30 17:53:14 +080015869 .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15870 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15871 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015872 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15873 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15874 "\x10\x11\x12\x13\x14\x15\x16\x17"
15875 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15876 .ilen = 32,
15877 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15878 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15879 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15880 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15881 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
15882 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
15883 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
15884 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
15885 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
15886 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
15887 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
15888 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
15889 .rlen = 32 + 64,
15890 }, { /* RFC 3602 Case 3 */
15891#ifdef __LITTLE_ENDIAN
15892 .key = "\x08\x00" /* rta length */
15893 "\x01\x00" /* rta type */
15894#else
15895 .key = "\x00\x08" /* rta length */
15896 "\x00\x01" /* rta type */
15897#endif
15898 "\x00\x00\x00\x10" /* enc key length */
15899 "\x11\x22\x33\x44\x55\x66\x77\x88"
15900 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15901 "\x22\x33\x44\x55\x66\x77\x88\x99"
15902 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15903 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15904 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15905 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15906 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15907 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15908 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15909 .klen = 8 + 64 + 16,
15910 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15911 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
Herbert Xu7079ce62015-07-30 17:53:14 +080015912 .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15913 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15914 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015915 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15916 .ilen = 48,
15917 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15918 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15919 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15920 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15921 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15922 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15923 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
15924 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
15925 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
15926 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
15927 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
15928 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
15929 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
15930 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
15931 .rlen = 48 + 64,
15932 }, { /* RFC 3602 Case 4 */
15933#ifdef __LITTLE_ENDIAN
15934 .key = "\x08\x00" /* rta length */
15935 "\x01\x00" /* rta type */
15936#else
15937 .key = "\x00\x08" /* rta length */
15938 "\x00\x01" /* rta type */
15939#endif
15940 "\x00\x00\x00\x10" /* enc key length */
15941 "\x11\x22\x33\x44\x55\x66\x77\x88"
15942 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15943 "\x22\x33\x44\x55\x66\x77\x88\x99"
15944 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15945 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15946 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15947 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15948 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15949 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15950 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15951 .klen = 8 + 64 + 16,
15952 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15953 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
Herbert Xu7079ce62015-07-30 17:53:14 +080015954 .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15955 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15956 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015957 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15958 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15959 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15960 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15961 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15962 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15963 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15964 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15965 .ilen = 64,
15966 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15967 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15968 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15969 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15970 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15971 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15972 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15973 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15974 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
15975 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
15976 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
15977 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
15978 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
15979 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
15980 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
15981 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
15982 .rlen = 64 + 64,
15983 }, { /* RFC 3602 Case 5 */
15984#ifdef __LITTLE_ENDIAN
15985 .key = "\x08\x00" /* rta length */
15986 "\x01\x00" /* rta type */
15987#else
15988 .key = "\x00\x08" /* rta length */
15989 "\x00\x01" /* rta type */
15990#endif
15991 "\x00\x00\x00\x10" /* enc key length */
15992 "\x11\x22\x33\x44\x55\x66\x77\x88"
15993 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15994 "\x22\x33\x44\x55\x66\x77\x88\x99"
15995 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15996 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15997 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15998 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15999 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16000 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
16001 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
16002 .klen = 8 + 64 + 16,
16003 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
16004 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
Herbert Xu7079ce62015-07-30 17:53:14 +080016005 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16006 "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
16007 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
16008 .alen = 24,
Horia Geantae46e9a42012-07-03 19:16:54 +030016009 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
16010 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
16011 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16012 "\x10\x11\x12\x13\x14\x15\x16\x17"
16013 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16014 "\x20\x21\x22\x23\x24\x25\x26\x27"
16015 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16016 "\x30\x31\x32\x33\x34\x35\x36\x37"
16017 "\x01\x02\x03\x04\x05\x06\x07\x08"
16018 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
16019 .ilen = 80,
16020 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
16021 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
16022 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
16023 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
16024 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
16025 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
16026 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
16027 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
16028 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
16029 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
16030 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
16031 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
16032 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
16033 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
16034 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
16035 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
16036 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
16037 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
16038 .rlen = 80 + 64,
16039 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
16040#ifdef __LITTLE_ENDIAN
16041 .key = "\x08\x00" /* rta length */
16042 "\x01\x00" /* rta type */
16043#else
16044 .key = "\x00\x08" /* rta length */
16045 "\x00\x01" /* rta type */
16046#endif
16047 "\x00\x00\x00\x18" /* enc key length */
16048 "\x11\x22\x33\x44\x55\x66\x77\x88"
16049 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16050 "\x22\x33\x44\x55\x66\x77\x88\x99"
16051 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16052 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16053 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16054 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16055 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16056 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
16057 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
16058 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
16059 .klen = 8 + 64 + 24,
16060 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
16061 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080016062 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
16063 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
16064 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030016065 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
16066 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
16067 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
16068 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
16069 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
16070 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
16071 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
16072 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
16073 .ilen = 64,
16074 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
16075 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
16076 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
16077 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
16078 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
16079 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
16080 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
16081 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
16082 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
16083 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
16084 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
16085 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
16086 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
16087 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
16088 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
16089 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
16090 .rlen = 64 + 64,
16091 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
16092#ifdef __LITTLE_ENDIAN
16093 .key = "\x08\x00" /* rta length */
16094 "\x01\x00" /* rta type */
16095#else
16096 .key = "\x00\x08" /* rta length */
16097 "\x00\x01" /* rta type */
16098#endif
16099 "\x00\x00\x00\x20" /* enc key length */
16100 "\x11\x22\x33\x44\x55\x66\x77\x88"
16101 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16102 "\x22\x33\x44\x55\x66\x77\x88\x99"
16103 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16104 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16105 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16106 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16107 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16108 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
16109 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
16110 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
16111 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
16112 .klen = 8 + 64 + 32,
16113 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
16114 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080016115 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
16116 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
16117 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030016118 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
16119 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
16120 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
16121 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
16122 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
16123 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
16124 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
16125 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
16126 .ilen = 64,
16127 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
16128 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
16129 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
16130 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
16131 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
16132 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
16133 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
16134 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
16135 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
16136 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
16137 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
16138 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
16139 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
16140 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
16141 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
16142 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
16143 .rlen = 64 + 64,
16144 },
16145};
16146
Nitesh Lal5208ed22014-05-21 17:09:08 +053016147#define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1
16148
16149static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = {
16150 { /*Generated with cryptopp*/
16151#ifdef __LITTLE_ENDIAN
16152 .key = "\x08\x00" /* rta length */
16153 "\x01\x00" /* rta type */
16154#else
16155 .key = "\x00\x08" /* rta length */
16156 "\x00\x01" /* rta type */
16157#endif
16158 "\x00\x00\x00\x08" /* enc key length */
16159 "\x11\x22\x33\x44\x55\x66\x77\x88"
16160 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16161 "\x22\x33\x44\x55"
16162 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16163 .klen = 8 + 20 + 8,
16164 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016165 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16166 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16167 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016168 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16169 "\x53\x20\x63\x65\x65\x72\x73\x74"
16170 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16171 "\x20\x79\x65\x53\x72\x63\x74\x65"
16172 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16173 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16174 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16175 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16176 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16177 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16178 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16179 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16180 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16181 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16182 "\x63\x65\x65\x72\x73\x74\x54\x20"
16183 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16184 .ilen = 128,
16185 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16186 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16187 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16188 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16189 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16190 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16191 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16192 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16193 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16194 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16195 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16196 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16197 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16198 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16199 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16200 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16201 "\x95\x16\x20\x09\xf5\x95\x19\xfd"
16202 "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa"
16203 "\x5c\x44\xa9\x37",
16204 .rlen = 128 + 20,
16205 },
16206};
16207
16208#define HMAC_SHA224_DES_CBC_ENC_TEST_VEC 1
16209
16210static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = {
16211 { /*Generated with cryptopp*/
16212#ifdef __LITTLE_ENDIAN
16213 .key = "\x08\x00" /* rta length */
16214 "\x01\x00" /* rta type */
16215#else
16216 .key = "\x00\x08" /* rta length */
16217 "\x00\x01" /* rta type */
16218#endif
16219 "\x00\x00\x00\x08" /* enc key length */
16220 "\x11\x22\x33\x44\x55\x66\x77\x88"
16221 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16222 "\x22\x33\x44\x55\x66\x77\x88\x99"
16223 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16224 .klen = 8 + 24 + 8,
16225 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016226 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16227 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16228 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016229 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16230 "\x53\x20\x63\x65\x65\x72\x73\x74"
16231 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16232 "\x20\x79\x65\x53\x72\x63\x74\x65"
16233 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16234 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16235 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16236 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16237 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16238 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16239 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16240 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16241 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16242 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16243 "\x63\x65\x65\x72\x73\x74\x54\x20"
16244 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16245 .ilen = 128,
16246 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16247 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16248 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16249 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16250 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16251 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16252 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16253 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16254 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16255 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16256 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16257 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16258 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16259 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16260 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16261 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16262 "\x9c\x2d\x7e\xee\x20\x34\x55\x0a"
16263 "\xce\xb5\x4e\x64\x53\xe7\xbf\x91"
16264 "\xab\xd4\xd9\xda\xc9\x12\xae\xf7",
16265 .rlen = 128 + 24,
16266 },
16267};
16268
16269#define HMAC_SHA256_DES_CBC_ENC_TEST_VEC 1
16270
16271static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = {
16272 { /*Generated with cryptopp*/
16273#ifdef __LITTLE_ENDIAN
16274 .key = "\x08\x00" /* rta length */
16275 "\x01\x00" /* rta type */
16276#else
16277 .key = "\x00\x08" /* rta length */
16278 "\x00\x01" /* rta type */
16279#endif
16280 "\x00\x00\x00\x08" /* enc key length */
16281 "\x11\x22\x33\x44\x55\x66\x77\x88"
16282 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16283 "\x22\x33\x44\x55\x66\x77\x88\x99"
16284 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16285 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16286 .klen = 8 + 32 + 8,
16287 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016288 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16289 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16290 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016291 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16292 "\x53\x20\x63\x65\x65\x72\x73\x74"
16293 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16294 "\x20\x79\x65\x53\x72\x63\x74\x65"
16295 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16296 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16297 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16298 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16299 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16300 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16301 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16302 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16303 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16304 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16305 "\x63\x65\x65\x72\x73\x74\x54\x20"
16306 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16307 .ilen = 128,
16308 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16309 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16310 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16311 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16312 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16313 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16314 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16315 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16316 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16317 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16318 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16319 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16320 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16321 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16322 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16323 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16324 "\xc6\x58\xa1\x60\x70\x91\x39\x36"
16325 "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e"
16326 "\xde\x63\xde\x76\x52\xde\x9f\xba"
16327 "\x90\xcf\x15\xf2\xbb\x6e\x84\x00",
16328 .rlen = 128 + 32,
16329 },
16330};
16331
16332#define HMAC_SHA384_DES_CBC_ENC_TEST_VEC 1
16333
16334static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = {
16335 { /*Generated with cryptopp*/
16336#ifdef __LITTLE_ENDIAN
16337 .key = "\x08\x00" /* rta length */
16338 "\x01\x00" /* rta type */
16339#else
16340 .key = "\x00\x08" /* rta length */
16341 "\x00\x01" /* rta type */
16342#endif
16343 "\x00\x00\x00\x08" /* enc key length */
16344 "\x11\x22\x33\x44\x55\x66\x77\x88"
16345 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16346 "\x22\x33\x44\x55\x66\x77\x88\x99"
16347 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16348 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16349 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16350 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16351 .klen = 8 + 48 + 8,
16352 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016353 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16354 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16355 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016356 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16357 "\x53\x20\x63\x65\x65\x72\x73\x74"
16358 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16359 "\x20\x79\x65\x53\x72\x63\x74\x65"
16360 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16361 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16362 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16363 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16364 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16365 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16366 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16367 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16368 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16369 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16370 "\x63\x65\x65\x72\x73\x74\x54\x20"
16371 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16372 .ilen = 128,
16373 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16374 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16375 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16376 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16377 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16378 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16379 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16380 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16381 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16382 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16383 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16384 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16385 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16386 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16387 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16388 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16389 "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0"
16390 "\xc8\x8c\xef\x25\x07\x83\x11\x3a"
16391 "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe"
16392 "\x5e\x67\xb5\x74\xe7\xe7\x85\x61"
16393 "\x6a\x95\x26\x75\xcc\x53\x89\xf3"
16394 "\x74\xc9\x2a\x76\x20\xa2\x64\x62",
16395 .rlen = 128 + 48,
16396 },
16397};
16398
16399#define HMAC_SHA512_DES_CBC_ENC_TEST_VEC 1
16400
16401static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = {
16402 { /*Generated with cryptopp*/
16403#ifdef __LITTLE_ENDIAN
16404 .key = "\x08\x00" /* rta length */
16405 "\x01\x00" /* rta type */
16406#else
16407 .key = "\x00\x08" /* rta length */
16408 "\x00\x01" /* rta type */
16409#endif
16410 "\x00\x00\x00\x08" /* enc key length */
16411 "\x11\x22\x33\x44\x55\x66\x77\x88"
16412 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16413 "\x22\x33\x44\x55\x66\x77\x88\x99"
16414 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16415 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16416 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16417 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16418 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16419 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16420 .klen = 8 + 64 + 8,
16421 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016422 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16423 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16424 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016425 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16426 "\x53\x20\x63\x65\x65\x72\x73\x74"
16427 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16428 "\x20\x79\x65\x53\x72\x63\x74\x65"
16429 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16430 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16431 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16432 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16433 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16434 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16435 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16436 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16437 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16438 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16439 "\x63\x65\x65\x72\x73\x74\x54\x20"
16440 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16441 .ilen = 128,
16442 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16443 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16444 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16445 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16446 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16447 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16448 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16449 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16450 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16451 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16452 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16453 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16454 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16455 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16456 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16457 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16458 "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e"
16459 "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb"
16460 "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb"
16461 "\x58\x83\xda\x67\xfb\x21\x24\xa2"
16462 "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93"
16463 "\x97\xe2\xe3\xb8\xaa\x48\x85\xee"
16464 "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96"
16465 "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b",
16466 .rlen = 128 + 64,
16467 },
16468};
16469
16470#define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC 1
16471
16472static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = {
16473 { /*Generated with cryptopp*/
16474#ifdef __LITTLE_ENDIAN
16475 .key = "\x08\x00" /* rta length */
16476 "\x01\x00" /* rta type */
16477#else
16478 .key = "\x00\x08" /* rta length */
16479 "\x00\x01" /* rta type */
16480#endif
16481 "\x00\x00\x00\x18" /* enc key length */
16482 "\x11\x22\x33\x44\x55\x66\x77\x88"
16483 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16484 "\x22\x33\x44\x55"
16485 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16486 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16487 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16488 .klen = 8 + 20 + 24,
16489 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016490 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16491 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16492 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016493 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16494 "\x53\x20\x63\x65\x65\x72\x73\x74"
16495 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16496 "\x20\x79\x65\x53\x72\x63\x74\x65"
16497 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16498 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16499 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16500 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16501 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16502 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16503 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16504 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16505 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16506 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16507 "\x63\x65\x65\x72\x73\x74\x54\x20"
16508 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16509 .ilen = 128,
16510 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16511 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16512 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16513 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16514 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16515 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16516 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16517 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16518 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16519 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16520 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16521 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16522 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16523 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16524 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16525 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16526 "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6"
16527 "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf"
16528 "\xd1\x60\x91\xb3",
16529 .rlen = 128 + 20,
16530 },
16531};
16532
16533#define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC 1
16534
16535static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = {
16536 { /*Generated with cryptopp*/
16537#ifdef __LITTLE_ENDIAN
16538 .key = "\x08\x00" /* rta length */
16539 "\x01\x00" /* rta type */
16540#else
16541 .key = "\x00\x08" /* rta length */
16542 "\x00\x01" /* rta type */
16543#endif
16544 "\x00\x00\x00\x18" /* enc key length */
16545 "\x11\x22\x33\x44\x55\x66\x77\x88"
16546 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16547 "\x22\x33\x44\x55\x66\x77\x88\x99"
16548 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16549 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16550 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16551 .klen = 8 + 24 + 24,
16552 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016553 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16554 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16555 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016556 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16557 "\x53\x20\x63\x65\x65\x72\x73\x74"
16558 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16559 "\x20\x79\x65\x53\x72\x63\x74\x65"
16560 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16561 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16562 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16563 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16564 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16565 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16566 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16567 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16568 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16569 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16570 "\x63\x65\x65\x72\x73\x74\x54\x20"
16571 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16572 .ilen = 128,
16573 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16574 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16575 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16576 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16577 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16578 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16579 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16580 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16581 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16582 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16583 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16584 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16585 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16586 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16587 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16588 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16589 "\x15\x24\x7f\x5a\x45\x4a\x66\xce"
16590 "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c"
16591 "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0",
16592 .rlen = 128 + 24,
16593 },
16594};
16595
16596#define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC 1
16597
16598static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = {
16599 { /*Generated with cryptopp*/
16600#ifdef __LITTLE_ENDIAN
16601 .key = "\x08\x00" /* rta length */
16602 "\x01\x00" /* rta type */
16603#else
16604 .key = "\x00\x08" /* rta length */
16605 "\x00\x01" /* rta type */
16606#endif
16607 "\x00\x00\x00\x18" /* enc key length */
16608 "\x11\x22\x33\x44\x55\x66\x77\x88"
16609 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16610 "\x22\x33\x44\x55\x66\x77\x88\x99"
16611 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16612 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16613 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16614 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16615 .klen = 8 + 32 + 24,
16616 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016617 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16618 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16619 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016620 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16621 "\x53\x20\x63\x65\x65\x72\x73\x74"
16622 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16623 "\x20\x79\x65\x53\x72\x63\x74\x65"
16624 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16625 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16626 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16627 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16628 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16629 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16630 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16631 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16632 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16633 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16634 "\x63\x65\x65\x72\x73\x74\x54\x20"
16635 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16636 .ilen = 128,
16637 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16638 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16639 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16640 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16641 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16642 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16643 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16644 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16645 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16646 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16647 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16648 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16649 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16650 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16651 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16652 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16653 "\x73\xb0\xea\x9f\xe8\x18\x80\xd6"
16654 "\x56\x38\x44\xc0\xdb\xe3\x4f\x71"
16655 "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f"
16656 "\xca\x43\x95\xdf\x80\x61\x81\xa9",
16657 .rlen = 128 + 32,
16658 },
16659};
16660
16661#define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC 1
16662
16663static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = {
16664 { /*Generated with cryptopp*/
16665#ifdef __LITTLE_ENDIAN
16666 .key = "\x08\x00" /* rta length */
16667 "\x01\x00" /* rta type */
16668#else
16669 .key = "\x00\x08" /* rta length */
16670 "\x00\x01" /* rta type */
16671#endif
16672 "\x00\x00\x00\x18" /* enc key length */
16673 "\x11\x22\x33\x44\x55\x66\x77\x88"
16674 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16675 "\x22\x33\x44\x55\x66\x77\x88\x99"
16676 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16677 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16678 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16679 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16680 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16681 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16682 .klen = 8 + 48 + 24,
16683 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016684 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16685 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16686 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016687 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16688 "\x53\x20\x63\x65\x65\x72\x73\x74"
16689 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16690 "\x20\x79\x65\x53\x72\x63\x74\x65"
16691 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16692 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16693 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16694 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16695 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16696 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16697 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16698 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16699 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16700 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16701 "\x63\x65\x65\x72\x73\x74\x54\x20"
16702 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16703 .ilen = 128,
16704 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16705 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16706 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16707 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16708 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16709 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16710 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16711 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16712 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16713 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16714 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16715 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16716 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16717 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16718 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16719 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16720 "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7"
16721 "\x70\xe7\x93\xbf\x73\xe6\x9f\x83"
16722 "\x99\x62\x23\xe6\x5b\xd0\xda\x18"
16723 "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39"
16724 "\x36\x5d\x13\x2f\x86\x10\x78\xd6"
16725 "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b",
16726 .rlen = 128 + 48,
16727 },
16728};
16729
16730#define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC 1
16731
16732static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = {
16733 { /*Generated with cryptopp*/
16734#ifdef __LITTLE_ENDIAN
16735 .key = "\x08\x00" /* rta length */
16736 "\x01\x00" /* rta type */
16737#else
16738 .key = "\x00\x08" /* rta length */
16739 "\x00\x01" /* rta type */
16740#endif
16741 "\x00\x00\x00\x18" /* enc key length */
16742 "\x11\x22\x33\x44\x55\x66\x77\x88"
16743 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16744 "\x22\x33\x44\x55\x66\x77\x88\x99"
16745 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16746 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16747 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16748 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16749 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16750 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16751 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16752 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16753 .klen = 8 + 64 + 24,
16754 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016755 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16756 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16757 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016758 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16759 "\x53\x20\x63\x65\x65\x72\x73\x74"
16760 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16761 "\x20\x79\x65\x53\x72\x63\x74\x65"
16762 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16763 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16764 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16765 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16766 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16767 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16768 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16769 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16770 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16771 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16772 "\x63\x65\x65\x72\x73\x74\x54\x20"
16773 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16774 .ilen = 128,
16775 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16776 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16777 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16778 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16779 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16780 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16781 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16782 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16783 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16784 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16785 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16786 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16787 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16788 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16789 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16790 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16791 "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32"
16792 "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e"
16793 "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b"
16794 "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60"
16795 "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0"
16796 "\x2a\x74\xd4\x65\x12\xcb\x55\xf2"
16797 "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2"
16798 "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb",
16799 .rlen = 128 + 64,
16800 },
16801};
16802
Herbert Xuda7f0332008-07-31 17:08:25 +080016803static struct cipher_testvec aes_lrw_enc_tv_template[] = {
16804 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16805 { /* LRW-32-AES 1 */
16806 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16807 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16808 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16809 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16810 .klen = 32,
16811 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16812 "\x00\x00\x00\x00\x00\x00\x00\x01",
16813 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16814 "\x38\x39\x41\x42\x43\x44\x45\x46",
16815 .ilen = 16,
16816 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16817 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16818 .rlen = 16,
16819 }, { /* LRW-32-AES 2 */
16820 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16821 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16822 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16823 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16824 .klen = 32,
16825 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16826 "\x00\x00\x00\x00\x00\x00\x00\x02",
16827 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16828 "\x38\x39\x41\x42\x43\x44\x45\x46",
16829 .ilen = 16,
16830 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16831 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16832 .rlen = 16,
16833 }, { /* LRW-32-AES 3 */
16834 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16835 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16836 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16837 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16838 .klen = 32,
16839 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16840 "\x00\x00\x00\x02\x00\x00\x00\x00",
16841 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16842 "\x38\x39\x41\x42\x43\x44\x45\x46",
16843 .ilen = 16,
16844 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16845 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16846 .rlen = 16,
16847 }, { /* LRW-32-AES 4 */
16848 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16849 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16850 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16851 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16852 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16853 .klen = 40,
16854 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16855 "\x00\x00\x00\x00\x00\x00\x00\x01",
16856 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16857 "\x38\x39\x41\x42\x43\x44\x45\x46",
16858 .ilen = 16,
16859 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16860 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16861 .rlen = 16,
16862 }, { /* LRW-32-AES 5 */
16863 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16864 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16865 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16866 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16867 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16868 .klen = 40,
16869 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16870 "\x00\x00\x00\x02\x00\x00\x00\x00",
16871 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16872 "\x38\x39\x41\x42\x43\x44\x45\x46",
16873 .ilen = 16,
16874 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16875 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16876 .rlen = 16,
16877 }, { /* LRW-32-AES 6 */
16878 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16879 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16880 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16881 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16882 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16883 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16884 .klen = 48,
16885 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16886 "\x00\x00\x00\x00\x00\x00\x00\x01",
16887 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16888 "\x38\x39\x41\x42\x43\x44\x45\x46",
16889 .ilen = 16,
16890 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16891 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16892 .rlen = 16,
16893 }, { /* LRW-32-AES 7 */
16894 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16895 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16896 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16897 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16898 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16899 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16900 .klen = 48,
16901 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16902 "\x00\x00\x00\x02\x00\x00\x00\x00",
16903 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16904 "\x38\x39\x41\x42\x43\x44\x45\x46",
16905 .ilen = 16,
16906 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16907 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16908 .rlen = 16,
16909 }, {
16910/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16911 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16912 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16913 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16914 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16915 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16916 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16917 .klen = 48,
16918 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16919 "\x00\x00\x00\x00\x00\x00\x00\x01",
16920 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16921 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16922 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16923 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16924 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16925 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16926 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16927 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16928 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16929 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16930 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16931 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16932 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16933 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16934 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16935 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16936 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16937 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16938 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16939 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16940 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16941 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16942 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16943 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16944 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16945 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16946 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16947 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16948 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16949 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16950 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16951 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16952 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16953 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16954 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16955 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16956 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16957 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16958 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16959 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16960 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16961 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16962 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16963 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16964 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16965 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16966 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16967 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16968 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16969 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16970 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16971 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16972 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16973 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16974 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16975 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16976 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16977 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16978 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16979 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16980 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16981 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16982 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16983 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16984 .ilen = 512,
16985 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16986 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16987 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16988 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16989 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16990 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16991 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16992 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16993 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16994 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16995 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16996 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16997 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16998 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16999 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
17000 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
17001 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
17002 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
17003 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
17004 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
17005 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
17006 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
17007 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
17008 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
17009 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
17010 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
17011 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
17012 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
17013 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
17014 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
17015 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
17016 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
17017 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
17018 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
17019 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
17020 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
17021 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
17022 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
17023 "\xb8\x79\x78\x97\x94\xff\x72\x13"
17024 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
17025 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
17026 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
17027 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
17028 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
17029 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
17030 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
17031 "\x1e\x86\x53\x11\x53\x94\x00\xee"
17032 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
17033 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
17034 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
17035 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
17036 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
17037 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
17038 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
17039 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
17040 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
17041 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
17042 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
17043 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
17044 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
17045 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
17046 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
17047 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
17048 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
17049 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017050 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017051 .np = 3,
17052 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017053 }
17054};
17055
17056static struct cipher_testvec aes_lrw_dec_tv_template[] = {
17057 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
17058 /* same as enc vectors with input and result reversed */
17059 { /* LRW-32-AES 1 */
17060 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
17061 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
17062 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
17063 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
17064 .klen = 32,
17065 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17066 "\x00\x00\x00\x00\x00\x00\x00\x01",
17067 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
17068 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
17069 .ilen = 16,
17070 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17071 "\x38\x39\x41\x42\x43\x44\x45\x46",
17072 .rlen = 16,
17073 }, { /* LRW-32-AES 2 */
17074 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
17075 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
17076 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
17077 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
17078 .klen = 32,
17079 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17080 "\x00\x00\x00\x00\x00\x00\x00\x02",
17081 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
17082 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
17083 .ilen = 16,
17084 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17085 "\x38\x39\x41\x42\x43\x44\x45\x46",
17086 .rlen = 16,
17087 }, { /* LRW-32-AES 3 */
17088 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
17089 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
17090 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
17091 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
17092 .klen = 32,
17093 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17094 "\x00\x00\x00\x02\x00\x00\x00\x00",
17095 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
17096 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
17097 .ilen = 16,
17098 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17099 "\x38\x39\x41\x42\x43\x44\x45\x46",
17100 .rlen = 16,
17101 }, { /* LRW-32-AES 4 */
17102 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
17103 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
17104 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
17105 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
17106 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
17107 .klen = 40,
17108 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17109 "\x00\x00\x00\x00\x00\x00\x00\x01",
17110 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
17111 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
17112 .ilen = 16,
17113 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17114 "\x38\x39\x41\x42\x43\x44\x45\x46",
17115 .rlen = 16,
17116 }, { /* LRW-32-AES 5 */
17117 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
17118 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
17119 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
17120 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
17121 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
17122 .klen = 40,
17123 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17124 "\x00\x00\x00\x02\x00\x00\x00\x00",
17125 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
17126 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
17127 .ilen = 16,
17128 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17129 "\x38\x39\x41\x42\x43\x44\x45\x46",
17130 .rlen = 16,
17131 }, { /* LRW-32-AES 6 */
17132 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17133 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17134 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17135 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17136 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17137 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17138 .klen = 48,
17139 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17140 "\x00\x00\x00\x00\x00\x00\x00\x01",
17141 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
17142 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
17143 .ilen = 16,
17144 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17145 "\x38\x39\x41\x42\x43\x44\x45\x46",
17146 .rlen = 16,
17147 }, { /* LRW-32-AES 7 */
17148 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
17149 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
17150 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
17151 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
17152 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
17153 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
17154 .klen = 48,
17155 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17156 "\x00\x00\x00\x02\x00\x00\x00\x00",
17157 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
17158 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
17159 .ilen = 16,
17160 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17161 "\x38\x39\x41\x42\x43\x44\x45\x46",
17162 .rlen = 16,
17163 }, {
17164/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
17165 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17166 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17167 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17168 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17169 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17170 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17171 .klen = 48,
17172 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17173 "\x00\x00\x00\x00\x00\x00\x00\x01",
17174 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
17175 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
17176 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
17177 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
17178 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
17179 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
17180 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
17181 "\xe8\x58\x46\x97\x39\x51\x07\xde"
17182 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
17183 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
17184 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
17185 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
17186 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
17187 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
17188 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
17189 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
17190 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
17191 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
17192 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
17193 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
17194 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
17195 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
17196 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
17197 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
17198 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
17199 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
17200 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
17201 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
17202 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
17203 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
17204 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
17205 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
17206 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
17207 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
17208 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
17209 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
17210 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
17211 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
17212 "\xb8\x79\x78\x97\x94\xff\x72\x13"
17213 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
17214 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
17215 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
17216 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
17217 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
17218 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
17219 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
17220 "\x1e\x86\x53\x11\x53\x94\x00\xee"
17221 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
17222 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
17223 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
17224 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
17225 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
17226 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
17227 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
17228 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
17229 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
17230 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
17231 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
17232 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
17233 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
17234 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
17235 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
17236 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
17237 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
17238 .ilen = 512,
17239 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
17240 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
17241 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
17242 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
17243 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
17244 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
17245 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
17246 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
17247 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
17248 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
17249 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
17250 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
17251 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
17252 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
17253 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
17254 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
17255 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
17256 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
17257 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
17258 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
17259 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
17260 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
17261 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
17262 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
17263 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
17264 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
17265 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
17266 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
17267 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
17268 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
17269 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
17270 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
17271 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
17272 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
17273 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
17274 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
17275 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
17276 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
17277 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
17278 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
17279 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
17280 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
17281 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
17282 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
17283 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
17284 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
17285 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
17286 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
17287 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
17288 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
17289 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
17290 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
17291 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
17292 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
17293 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
17294 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
17295 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
17296 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
17297 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
17298 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
17299 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
17300 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
17301 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
17302 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
17303 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017304 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017305 .np = 3,
17306 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017307 }
17308};
17309
17310static struct cipher_testvec aes_xts_enc_tv_template[] = {
17311 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17312 { /* XTS-AES 1 */
17313 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17314 "\x00\x00\x00\x00\x00\x00\x00\x00"
17315 "\x00\x00\x00\x00\x00\x00\x00\x00"
17316 "\x00\x00\x00\x00\x00\x00\x00\x00",
17317 .klen = 32,
17318 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17319 "\x00\x00\x00\x00\x00\x00\x00\x00",
17320 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
17321 "\x00\x00\x00\x00\x00\x00\x00\x00"
17322 "\x00\x00\x00\x00\x00\x00\x00\x00"
17323 "\x00\x00\x00\x00\x00\x00\x00\x00",
17324 .ilen = 32,
17325 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17326 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17327 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17328 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17329 .rlen = 32,
17330 }, { /* XTS-AES 2 */
17331 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17332 "\x11\x11\x11\x11\x11\x11\x11\x11"
17333 "\x22\x22\x22\x22\x22\x22\x22\x22"
17334 "\x22\x22\x22\x22\x22\x22\x22\x22",
17335 .klen = 32,
17336 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17337 "\x00\x00\x00\x00\x00\x00\x00\x00",
17338 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
17339 "\x44\x44\x44\x44\x44\x44\x44\x44"
17340 "\x44\x44\x44\x44\x44\x44\x44\x44"
17341 "\x44\x44\x44\x44\x44\x44\x44\x44",
17342 .ilen = 32,
17343 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17344 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17345 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17346 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17347 .rlen = 32,
17348 }, { /* XTS-AES 3 */
17349 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17350 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17351 "\x22\x22\x22\x22\x22\x22\x22\x22"
17352 "\x22\x22\x22\x22\x22\x22\x22\x22",
17353 .klen = 32,
17354 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17355 "\x00\x00\x00\x00\x00\x00\x00\x00",
17356 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
17357 "\x44\x44\x44\x44\x44\x44\x44\x44"
17358 "\x44\x44\x44\x44\x44\x44\x44\x44"
17359 "\x44\x44\x44\x44\x44\x44\x44\x44",
17360 .ilen = 32,
17361 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17362 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17363 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17364 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17365 .rlen = 32,
17366 }, { /* XTS-AES 4 */
17367 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17368 "\x23\x53\x60\x28\x74\x71\x35\x26"
17369 "\x31\x41\x59\x26\x53\x58\x97\x93"
17370 "\x23\x84\x62\x64\x33\x83\x27\x95",
17371 .klen = 32,
17372 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17373 "\x00\x00\x00\x00\x00\x00\x00\x00",
17374 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17375 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17376 "\x10\x11\x12\x13\x14\x15\x16\x17"
17377 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17378 "\x20\x21\x22\x23\x24\x25\x26\x27"
17379 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17380 "\x30\x31\x32\x33\x34\x35\x36\x37"
17381 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17382 "\x40\x41\x42\x43\x44\x45\x46\x47"
17383 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17384 "\x50\x51\x52\x53\x54\x55\x56\x57"
17385 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17386 "\x60\x61\x62\x63\x64\x65\x66\x67"
17387 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17388 "\x70\x71\x72\x73\x74\x75\x76\x77"
17389 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17390 "\x80\x81\x82\x83\x84\x85\x86\x87"
17391 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17392 "\x90\x91\x92\x93\x94\x95\x96\x97"
17393 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17394 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17395 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17396 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17397 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17398 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17399 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17400 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17401 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17402 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17403 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17404 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17405 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17406 "\x00\x01\x02\x03\x04\x05\x06\x07"
17407 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17408 "\x10\x11\x12\x13\x14\x15\x16\x17"
17409 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17410 "\x20\x21\x22\x23\x24\x25\x26\x27"
17411 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17412 "\x30\x31\x32\x33\x34\x35\x36\x37"
17413 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17414 "\x40\x41\x42\x43\x44\x45\x46\x47"
17415 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17416 "\x50\x51\x52\x53\x54\x55\x56\x57"
17417 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17418 "\x60\x61\x62\x63\x64\x65\x66\x67"
17419 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17420 "\x70\x71\x72\x73\x74\x75\x76\x77"
17421 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17422 "\x80\x81\x82\x83\x84\x85\x86\x87"
17423 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17424 "\x90\x91\x92\x93\x94\x95\x96\x97"
17425 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17426 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17427 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17428 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17429 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17430 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17431 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17432 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17433 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17434 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17435 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17436 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17437 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17438 .ilen = 512,
17439 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17440 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17441 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17442 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17443 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17444 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17445 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17446 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17447 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17448 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17449 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17450 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17451 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17452 "\x22\x97\x61\x46\xae\x20\xce\x84"
17453 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17454 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17455 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17456 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17457 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17458 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17459 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17460 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17461 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17462 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17463 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17464 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17465 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17466 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17467 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17468 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17469 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17470 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17471 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17472 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17473 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17474 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17475 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17476 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17477 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17478 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17479 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17480 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17481 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17482 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17483 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17484 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17485 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17486 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17487 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17488 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17489 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17490 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17491 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17492 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17493 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17494 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17495 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17496 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17497 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17498 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17499 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17500 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17501 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17502 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17503 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017504 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17505 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17506 "\x23\x53\x60\x28\x74\x71\x35\x26"
17507 "\x62\x49\x77\x57\x24\x70\x93\x69"
17508 "\x99\x59\x57\x49\x66\x96\x76\x27"
17509 "\x31\x41\x59\x26\x53\x58\x97\x93"
17510 "\x23\x84\x62\x64\x33\x83\x27\x95"
17511 "\x02\x88\x41\x97\x16\x93\x99\x37"
17512 "\x51\x05\x82\x09\x74\x94\x45\x92",
17513 .klen = 64,
17514 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17515 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017516 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17517 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17518 "\x10\x11\x12\x13\x14\x15\x16\x17"
17519 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17520 "\x20\x21\x22\x23\x24\x25\x26\x27"
17521 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17522 "\x30\x31\x32\x33\x34\x35\x36\x37"
17523 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17524 "\x40\x41\x42\x43\x44\x45\x46\x47"
17525 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17526 "\x50\x51\x52\x53\x54\x55\x56\x57"
17527 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17528 "\x60\x61\x62\x63\x64\x65\x66\x67"
17529 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17530 "\x70\x71\x72\x73\x74\x75\x76\x77"
17531 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17532 "\x80\x81\x82\x83\x84\x85\x86\x87"
17533 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17534 "\x90\x91\x92\x93\x94\x95\x96\x97"
17535 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17536 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17537 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17538 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17539 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17540 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17541 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17542 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17543 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17544 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17545 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17546 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17547 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17548 "\x00\x01\x02\x03\x04\x05\x06\x07"
17549 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17550 "\x10\x11\x12\x13\x14\x15\x16\x17"
17551 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17552 "\x20\x21\x22\x23\x24\x25\x26\x27"
17553 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17554 "\x30\x31\x32\x33\x34\x35\x36\x37"
17555 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17556 "\x40\x41\x42\x43\x44\x45\x46\x47"
17557 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17558 "\x50\x51\x52\x53\x54\x55\x56\x57"
17559 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17560 "\x60\x61\x62\x63\x64\x65\x66\x67"
17561 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17562 "\x70\x71\x72\x73\x74\x75\x76\x77"
17563 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17564 "\x80\x81\x82\x83\x84\x85\x86\x87"
17565 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17566 "\x90\x91\x92\x93\x94\x95\x96\x97"
17567 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17568 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17569 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17570 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17571 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17572 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17573 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17574 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17575 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17576 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17577 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17578 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17579 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17580 .ilen = 512,
17581 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17582 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17583 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17584 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17585 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17586 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17587 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17588 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17589 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17590 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17591 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17592 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17593 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17594 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17595 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17596 "\x00\x02\x08\x87\x89\x14\x29\xca"
17597 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17598 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17599 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17600 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17601 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17602 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17603 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17604 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17605 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17606 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17607 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17608 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17609 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17610 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17611 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17612 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17613 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17614 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17615 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17616 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17617 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17618 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17619 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17620 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17621 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17622 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17623 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17624 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17625 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17626 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17627 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17628 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17629 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17630 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17631 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17632 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17633 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17634 "\x94\x30\x54\xff\x84\x01\x14\x93"
17635 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17636 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17637 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17638 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17639 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17640 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17641 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17642 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17643 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17644 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17645 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017646 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017647 .np = 3,
17648 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017649 }
17650};
17651
17652static struct cipher_testvec aes_xts_dec_tv_template[] = {
17653 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17654 { /* XTS-AES 1 */
17655 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17656 "\x00\x00\x00\x00\x00\x00\x00\x00"
17657 "\x00\x00\x00\x00\x00\x00\x00\x00"
17658 "\x00\x00\x00\x00\x00\x00\x00\x00",
17659 .klen = 32,
17660 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17661 "\x00\x00\x00\x00\x00\x00\x00\x00",
17662 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17663 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17664 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17665 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17666 .ilen = 32,
17667 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
17668 "\x00\x00\x00\x00\x00\x00\x00\x00"
17669 "\x00\x00\x00\x00\x00\x00\x00\x00"
17670 "\x00\x00\x00\x00\x00\x00\x00\x00",
17671 .rlen = 32,
17672 }, { /* XTS-AES 2 */
17673 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17674 "\x11\x11\x11\x11\x11\x11\x11\x11"
17675 "\x22\x22\x22\x22\x22\x22\x22\x22"
17676 "\x22\x22\x22\x22\x22\x22\x22\x22",
17677 .klen = 32,
17678 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17679 "\x00\x00\x00\x00\x00\x00\x00\x00",
17680 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17681 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17682 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17683 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17684 .ilen = 32,
17685 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17686 "\x44\x44\x44\x44\x44\x44\x44\x44"
17687 "\x44\x44\x44\x44\x44\x44\x44\x44"
17688 "\x44\x44\x44\x44\x44\x44\x44\x44",
17689 .rlen = 32,
17690 }, { /* XTS-AES 3 */
17691 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17692 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17693 "\x22\x22\x22\x22\x22\x22\x22\x22"
17694 "\x22\x22\x22\x22\x22\x22\x22\x22",
17695 .klen = 32,
17696 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17697 "\x00\x00\x00\x00\x00\x00\x00\x00",
17698 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17699 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17700 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17701 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17702 .ilen = 32,
17703 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17704 "\x44\x44\x44\x44\x44\x44\x44\x44"
17705 "\x44\x44\x44\x44\x44\x44\x44\x44"
17706 "\x44\x44\x44\x44\x44\x44\x44\x44",
17707 .rlen = 32,
17708 }, { /* XTS-AES 4 */
17709 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17710 "\x23\x53\x60\x28\x74\x71\x35\x26"
17711 "\x31\x41\x59\x26\x53\x58\x97\x93"
17712 "\x23\x84\x62\x64\x33\x83\x27\x95",
17713 .klen = 32,
17714 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17715 "\x00\x00\x00\x00\x00\x00\x00\x00",
17716 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17717 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17718 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17719 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17720 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17721 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17722 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17723 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17724 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17725 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17726 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17727 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17728 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17729 "\x22\x97\x61\x46\xae\x20\xce\x84"
17730 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17731 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17732 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17733 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17734 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17735 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17736 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17737 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17738 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17739 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17740 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17741 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17742 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17743 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17744 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17745 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17746 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17747 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17748 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17749 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17750 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17751 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17752 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17753 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17754 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17755 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17756 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17757 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17758 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17759 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17760 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17761 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17762 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17763 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17764 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17765 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17766 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17767 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17768 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17769 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17770 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17771 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17772 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17773 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17774 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17775 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17776 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17777 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17778 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17779 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17780 .ilen = 512,
17781 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17782 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17783 "\x10\x11\x12\x13\x14\x15\x16\x17"
17784 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17785 "\x20\x21\x22\x23\x24\x25\x26\x27"
17786 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17787 "\x30\x31\x32\x33\x34\x35\x36\x37"
17788 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17789 "\x40\x41\x42\x43\x44\x45\x46\x47"
17790 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17791 "\x50\x51\x52\x53\x54\x55\x56\x57"
17792 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17793 "\x60\x61\x62\x63\x64\x65\x66\x67"
17794 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17795 "\x70\x71\x72\x73\x74\x75\x76\x77"
17796 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17797 "\x80\x81\x82\x83\x84\x85\x86\x87"
17798 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17799 "\x90\x91\x92\x93\x94\x95\x96\x97"
17800 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17801 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17802 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17803 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17804 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17805 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17806 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17807 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17808 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17809 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17810 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17811 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17812 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17813 "\x00\x01\x02\x03\x04\x05\x06\x07"
17814 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17815 "\x10\x11\x12\x13\x14\x15\x16\x17"
17816 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17817 "\x20\x21\x22\x23\x24\x25\x26\x27"
17818 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17819 "\x30\x31\x32\x33\x34\x35\x36\x37"
17820 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17821 "\x40\x41\x42\x43\x44\x45\x46\x47"
17822 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17823 "\x50\x51\x52\x53\x54\x55\x56\x57"
17824 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17825 "\x60\x61\x62\x63\x64\x65\x66\x67"
17826 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17827 "\x70\x71\x72\x73\x74\x75\x76\x77"
17828 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17829 "\x80\x81\x82\x83\x84\x85\x86\x87"
17830 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17831 "\x90\x91\x92\x93\x94\x95\x96\x97"
17832 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17833 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17834 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17835 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17836 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17837 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17838 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17839 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17840 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17841 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17842 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17843 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17844 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17845 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017846 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17847 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17848 "\x23\x53\x60\x28\x74\x71\x35\x26"
17849 "\x62\x49\x77\x57\x24\x70\x93\x69"
17850 "\x99\x59\x57\x49\x66\x96\x76\x27"
17851 "\x31\x41\x59\x26\x53\x58\x97\x93"
17852 "\x23\x84\x62\x64\x33\x83\x27\x95"
17853 "\x02\x88\x41\x97\x16\x93\x99\x37"
17854 "\x51\x05\x82\x09\x74\x94\x45\x92",
17855 .klen = 64,
17856 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17857 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017858 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17859 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17860 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17861 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17862 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17863 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17864 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17865 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17866 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17867 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17868 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17869 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17870 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17871 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17872 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17873 "\x00\x02\x08\x87\x89\x14\x29\xca"
17874 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17875 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17876 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17877 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17878 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17879 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17880 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17881 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17882 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17883 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17884 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17885 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17886 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17887 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17888 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17889 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17890 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17891 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17892 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17893 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17894 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17895 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17896 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17897 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17898 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17899 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17900 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17901 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17902 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17903 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17904 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17905 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17906 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17907 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17908 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17909 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17910 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17911 "\x94\x30\x54\xff\x84\x01\x14\x93"
17912 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17913 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17914 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17915 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17916 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17917 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17918 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17919 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17920 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17921 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17922 .ilen = 512,
17923 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17924 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17925 "\x10\x11\x12\x13\x14\x15\x16\x17"
17926 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17927 "\x20\x21\x22\x23\x24\x25\x26\x27"
17928 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17929 "\x30\x31\x32\x33\x34\x35\x36\x37"
17930 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17931 "\x40\x41\x42\x43\x44\x45\x46\x47"
17932 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17933 "\x50\x51\x52\x53\x54\x55\x56\x57"
17934 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17935 "\x60\x61\x62\x63\x64\x65\x66\x67"
17936 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17937 "\x70\x71\x72\x73\x74\x75\x76\x77"
17938 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17939 "\x80\x81\x82\x83\x84\x85\x86\x87"
17940 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17941 "\x90\x91\x92\x93\x94\x95\x96\x97"
17942 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17943 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17944 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17945 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17946 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17947 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17948 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17949 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17950 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17951 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17952 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17953 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17954 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17955 "\x00\x01\x02\x03\x04\x05\x06\x07"
17956 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17957 "\x10\x11\x12\x13\x14\x15\x16\x17"
17958 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17959 "\x20\x21\x22\x23\x24\x25\x26\x27"
17960 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17961 "\x30\x31\x32\x33\x34\x35\x36\x37"
17962 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17963 "\x40\x41\x42\x43\x44\x45\x46\x47"
17964 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17965 "\x50\x51\x52\x53\x54\x55\x56\x57"
17966 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17967 "\x60\x61\x62\x63\x64\x65\x66\x67"
17968 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17969 "\x70\x71\x72\x73\x74\x75\x76\x77"
17970 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17971 "\x80\x81\x82\x83\x84\x85\x86\x87"
17972 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17973 "\x90\x91\x92\x93\x94\x95\x96\x97"
17974 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17975 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17976 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17977 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17978 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17979 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17980 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17981 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17982 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17983 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17984 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17985 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17986 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17987 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017988 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017989 .np = 3,
17990 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017991 }
17992};
17993
17994
17995static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017996 { /* From NIST Special Publication 800-38A, Appendix F.5 */
17997 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17998 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17999 .klen = 16,
18000 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18001 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18002 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18003 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18004 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18005 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18006 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18007 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18008 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18009 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18010 .ilen = 64,
18011 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
18012 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
18013 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
18014 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
18015 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
18016 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
18017 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
18018 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
18019 .rlen = 64,
18020 }, {
18021 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
18022 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
18023 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
18024 .klen = 24,
18025 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18026 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18027 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18028 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18029 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18030 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18031 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18032 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18033 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18034 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18035 .ilen = 64,
18036 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
18037 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
18038 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
18039 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
18040 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
18041 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
18042 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
18043 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
18044 .rlen = 64,
18045 }, {
18046 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
18047 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
18048 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
18049 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
18050 .klen = 32,
18051 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18052 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18053 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18054 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18055 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18056 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18057 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18058 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18059 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18060 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18061 .ilen = 64,
18062 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
18063 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
18064 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18065 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18066 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18067 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18068 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18069 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18070 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018071 }, { /* Generated with Crypto++ */
18072 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18073 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18074 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18075 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18076 .klen = 32,
18077 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18078 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18079 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18080 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18081 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18082 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18083 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18084 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18085 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18086 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18087 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18088 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18089 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18090 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18091 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18092 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18093 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18094 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18095 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18096 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18097 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18098 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18099 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18100 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18101 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18102 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18103 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18104 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18105 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18106 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18107 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18108 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18109 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18110 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18111 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18112 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18113 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18114 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18115 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18116 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18117 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18118 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18119 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18120 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18121 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18122 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18123 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18124 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18125 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18126 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18127 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18128 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18129 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18130 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18131 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18132 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18133 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18134 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18135 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18136 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18137 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18138 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18139 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18140 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18141 .ilen = 496,
18142 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18143 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18144 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18145 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18146 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18147 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18148 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18149 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18150 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18151 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18152 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18153 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18154 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18155 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18156 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18157 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18158 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18159 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18160 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18161 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18162 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18163 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18164 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18165 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18166 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18167 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18168 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18169 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18170 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18171 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18172 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18173 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18174 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18175 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18176 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18177 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18178 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18179 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18180 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18181 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18182 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18183 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18184 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18185 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18186 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18187 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18188 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18189 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18190 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18191 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18192 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18193 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18194 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18195 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18196 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18197 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18198 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18199 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18200 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18201 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18202 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18203 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18204 .rlen = 496,
18205 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018206 .np = 3,
18207 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018208 }, { /* Generated with Crypto++ */
18209 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18210 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18211 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18212 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18213 .klen = 32,
18214 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18215 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18216 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18217 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18218 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18219 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18220 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18221 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18222 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18223 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18224 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18225 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18226 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18227 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18228 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18229 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18230 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18231 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18232 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18233 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18234 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18235 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18236 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18237 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18238 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18239 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18240 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18241 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18242 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18243 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18244 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18245 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18246 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18247 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18248 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18249 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18250 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18251 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18252 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18253 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18254 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18255 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18256 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18257 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18258 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18259 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18260 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18261 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18262 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18263 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18264 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18265 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18266 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18267 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18268 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18269 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18270 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18271 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18272 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18273 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18274 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18275 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18276 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18277 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18278 "\x7B\xE4\x4D",
18279 .ilen = 499,
18280 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18281 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18282 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18283 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18284 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18285 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18286 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18287 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18288 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18289 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18290 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18291 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18292 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18293 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18294 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18295 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18296 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18297 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18298 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18299 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18300 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18301 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18302 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18303 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18304 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18305 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18306 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18307 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18308 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18309 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18310 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18311 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18312 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18313 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18314 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18315 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18316 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18317 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18318 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18319 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18320 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18321 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18322 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18323 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18324 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18325 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18326 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18327 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18328 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18329 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18330 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18331 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18332 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18333 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18334 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18335 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18336 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18337 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18338 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18339 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18340 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18341 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18342 "\xFB\xF2\x3F",
18343 .rlen = 499,
18344 .also_non_np = 1,
18345 .np = 2,
18346 .tap = { 499 - 16, 16 },
18347 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018348};
18349
18350static struct cipher_testvec aes_ctr_dec_tv_template[] = {
18351 { /* From NIST Special Publication 800-38A, Appendix F.5 */
18352 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
18353 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
18354 .klen = 16,
18355 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18356 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18357 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
18358 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
18359 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
18360 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
18361 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
18362 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
18363 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
18364 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
18365 .ilen = 64,
18366 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18367 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18368 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18369 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18370 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18371 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18372 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18373 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18374 .rlen = 64,
18375 }, {
18376 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
18377 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
18378 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
18379 .klen = 24,
18380 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18381 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18382 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
18383 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
18384 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
18385 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
18386 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
18387 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
18388 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
18389 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
18390 .ilen = 64,
18391 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18392 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18393 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18394 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18395 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18396 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18397 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18398 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18399 .rlen = 64,
18400 }, {
18401 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
18402 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
18403 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
18404 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
18405 .klen = 32,
18406 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18407 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18408 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
18409 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
18410 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18411 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18412 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18413 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18414 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18415 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18416 .ilen = 64,
18417 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18418 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18419 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18420 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18421 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18422 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18423 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18424 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18425 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018426 }, { /* Generated with Crypto++ */
18427 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18428 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18429 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18430 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18431 .klen = 32,
18432 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18433 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18434 .input = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18435 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18436 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18437 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18438 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18439 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18440 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18441 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18442 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18443 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18444 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18445 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18446 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18447 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18448 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18449 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18450 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18451 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18452 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18453 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18454 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18455 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18456 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18457 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18458 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18459 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18460 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18461 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18462 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18463 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18464 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18465 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18466 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18467 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18468 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18469 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18470 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18471 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18472 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18473 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18474 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18475 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18476 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18477 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18478 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18479 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18480 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18481 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18482 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18483 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18484 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18485 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18486 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18487 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18488 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18489 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18490 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18491 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18492 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18493 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18494 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18495 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18496 .ilen = 496,
18497 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18498 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18499 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18500 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18501 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18502 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18503 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18504 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18505 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18506 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18507 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18508 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18509 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18510 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18511 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18512 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18513 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18514 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18515 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18516 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18517 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18518 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18519 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18520 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18521 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18522 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18523 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18524 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18525 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18526 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18527 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18528 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18529 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18530 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18531 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18532 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18533 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18534 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18535 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18536 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18537 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18538 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18539 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18540 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18541 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18542 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18543 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18544 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18545 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18546 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18547 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18548 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18549 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18550 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18551 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18552 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18553 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18554 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18555 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18556 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18557 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18558 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18559 .rlen = 496,
18560 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018561 .np = 3,
18562 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018563 }, { /* Generated with Crypto++ */
18564 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18565 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18566 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18567 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18568 .klen = 32,
18569 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18570 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18571 .input = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18572 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18573 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18574 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18575 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18576 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18577 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18578 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18579 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18580 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18581 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18582 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18583 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18584 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18585 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18586 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18587 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18588 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18589 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18590 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18591 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18592 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18593 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18594 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18595 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18596 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18597 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18598 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18599 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18600 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18601 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18602 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18603 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18604 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18605 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18606 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18607 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18608 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18609 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18610 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18611 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18612 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18613 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18614 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18615 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18616 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18617 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18618 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18619 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18620 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18621 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18622 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18623 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18624 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18625 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18626 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18627 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18628 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18629 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18630 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18631 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18632 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18633 "\xFB\xF2\x3F",
18634 .ilen = 499,
18635 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18636 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18637 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18638 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18639 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18640 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18641 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18642 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18643 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18644 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18645 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18646 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18647 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18648 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18649 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18650 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18651 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18652 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18653 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18654 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18655 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18656 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18657 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18658 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18659 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18660 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18661 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18662 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18663 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18664 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18665 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18666 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18667 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18668 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18669 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18670 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18671 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18672 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18673 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18674 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18675 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18676 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18677 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18678 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18679 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18680 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18681 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18682 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18683 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18684 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18685 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18686 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18687 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18688 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18689 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18690 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18691 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18692 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18693 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18694 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18695 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18696 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18697 "\x7B\xE4\x4D",
18698 .rlen = 499,
18699 .also_non_np = 1,
18700 .np = 2,
18701 .tap = { 499 - 16, 16 },
18702 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018703};
18704
18705static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080018706 { /* From RFC 3686 */
18707 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
18708 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
18709 "\x00\x00\x00\x30",
18710 .klen = 20,
18711 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18712 .input = "Single block msg",
18713 .ilen = 16,
18714 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
18715 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
18716 .rlen = 16,
18717 }, {
18718 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
18719 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
18720 "\x00\x6c\xb6\xdb",
18721 .klen = 20,
18722 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
18723 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18724 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18725 "\x10\x11\x12\x13\x14\x15\x16\x17"
18726 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18727 .ilen = 32,
18728 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
18729 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
18730 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
18731 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
18732 .rlen = 32,
18733 }, {
18734 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
18735 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
18736 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
18737 "\x00\x00\x00\x48",
18738 .klen = 28,
18739 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
18740 .input = "Single block msg",
18741 .ilen = 16,
18742 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
18743 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
18744 .rlen = 16,
18745 }, {
18746 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
18747 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
18748 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
18749 "\x00\x96\xb0\x3b",
18750 .klen = 28,
18751 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
18752 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18753 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18754 "\x10\x11\x12\x13\x14\x15\x16\x17"
18755 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18756 .ilen = 32,
18757 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
18758 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
18759 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
18760 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
18761 .rlen = 32,
18762 }, {
18763 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
18764 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
18765 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
18766 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
18767 "\x00\x00\x00\x60",
18768 .klen = 36,
18769 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
18770 .input = "Single block msg",
18771 .ilen = 16,
18772 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
18773 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
18774 .rlen = 16,
18775 }, {
18776 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
18777 "\x07\x96\x36\x58\x79\xef\xf8\x86"
18778 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
18779 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
18780 "\x00\xfa\xac\x24",
18781 .klen = 36,
18782 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
18783 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18784 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18785 "\x10\x11\x12\x13\x14\x15\x16\x17"
18786 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18787 .ilen = 32,
18788 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
18789 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
18790 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
18791 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
18792 .rlen = 32,
18793 }, {
18794 // generated using Crypto++
18795 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18796 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18797 "\x10\x11\x12\x13\x14\x15\x16\x17"
18798 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18799 "\x00\x00\x00\x00",
18800 .klen = 32 + 4,
18801 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18802 .input =
18803 "\x00\x01\x02\x03\x04\x05\x06\x07"
18804 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18805 "\x10\x11\x12\x13\x14\x15\x16\x17"
18806 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18807 "\x20\x21\x22\x23\x24\x25\x26\x27"
18808 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18809 "\x30\x31\x32\x33\x34\x35\x36\x37"
18810 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18811 "\x40\x41\x42\x43\x44\x45\x46\x47"
18812 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18813 "\x50\x51\x52\x53\x54\x55\x56\x57"
18814 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18815 "\x60\x61\x62\x63\x64\x65\x66\x67"
18816 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18817 "\x70\x71\x72\x73\x74\x75\x76\x77"
18818 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18819 "\x80\x81\x82\x83\x84\x85\x86\x87"
18820 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18821 "\x90\x91\x92\x93\x94\x95\x96\x97"
18822 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18823 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18824 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18825 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18826 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18827 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18828 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18829 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18830 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18831 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18832 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18833 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18834 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18835 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
18836 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
18837 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
18838 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
18839 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
18840 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
18841 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
18842 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
18843 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
18844 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
18845 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
18846 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
18847 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
18848 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
18849 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
18850 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
18851 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
18852 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
18853 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
18854 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
18855 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
18856 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
18857 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
18858 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
18859 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
18860 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
18861 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
18862 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
18863 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
18864 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
18865 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
18866 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
18867 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
18868 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
18869 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
18870 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
18871 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
18872 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
18873 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
18874 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
18875 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
18876 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
18877 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
18878 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
18879 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
18880 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
18881 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
18882 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
18883 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
18884 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
18885 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
18886 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
18887 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
18888 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
18889 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
18890 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
18891 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
18892 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
18893 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
18894 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
18895 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
18896 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
18897 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
18898 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
18899 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
18900 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
18901 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
18902 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
18903 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
18904 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
18905 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
18906 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
18907 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
18908 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
18909 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
18910 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
18911 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
18912 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
18913 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
18914 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
18915 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
18916 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
18917 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
18918 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
18919 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
18920 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
18921 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
18922 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
18923 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
18924 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
18925 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
18926 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
18927 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
18928 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
18929 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
18930 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
18931 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
18932 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
18933 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
18934 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
18935 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
18936 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
18937 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
18938 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
18939 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
18940 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
18941 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
18942 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
18943 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
18944 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
18945 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
18946 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
18947 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
18948 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
18949 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
18950 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
18951 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
18952 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
18953 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
18954 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
18955 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
18956 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
18957 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
18958 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
18959 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
18960 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
18961 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
18962 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
18963 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
18964 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
18965 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
18966 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
18967 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
18968 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
18969 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
18970 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
18971 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
18972 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
18973 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
18974 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
18975 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
18976 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
18977 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
18978 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
18979 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
18980 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
18981 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
18982 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
18983 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
18984 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
18985 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
18986 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
18987 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
18988 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
18989 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
18990 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
18991 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
18992 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
18993 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
18994 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
18995 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
18996 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
18997 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
18998 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
18999 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
19000 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
19001 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
19002 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
19003 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
19004 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
19005 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
19006 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
19007 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
19008 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
19009 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
19010 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
19011 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
19012 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
19013 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
19014 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
19015 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
19016 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
19017 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
19018 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
19019 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
19020 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
19021 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
19022 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
19023 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
19024 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
19025 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
19026 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
19027 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
19028 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
19029 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
19030 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
19031 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
19032 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
19033 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
19034 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
19035 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
19036 "\x38\x47\x56\x65\x74\x83\x92\xa1"
19037 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
19038 "\x28\x37\x46\x55\x64\x73\x82\x91"
19039 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
19040 "\x18\x27\x36\x45\x54\x63\x72\x81"
19041 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
19042 "\x08\x17\x26\x35\x44\x53\x62\x71"
19043 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
19044 "\xf8\x07\x16\x25\x34\x43\x52\x61"
19045 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
19046 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
19047 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
19048 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
19049 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
19050 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
19051 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
19052 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
19053 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
19054 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
19055 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
19056 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
19057 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
19058 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
19059 "\x00\x11\x22\x33\x44\x55\x66\x77"
19060 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
19061 "\x10\x21\x32\x43\x54\x65\x76\x87"
19062 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
19063 "\x20\x31\x42\x53\x64\x75\x86\x97"
19064 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
19065 "\x30\x41\x52\x63\x74\x85\x96\xa7"
19066 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
19067 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
19068 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
19069 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
19070 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
19071 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
19072 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
19073 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
19074 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
19075 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
19076 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
19077 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
19078 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
19079 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
19080 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
19081 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
19082 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
19083 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
19084 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
19085 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
19086 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
19087 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
19088 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
19089 "\xf0\x01\x12\x23\x34\x45\x56\x67"
19090 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
19091 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
19092 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
19093 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
19094 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
19095 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
19096 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
19097 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
19098 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
19099 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
19100 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
19101 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
19102 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
19103 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
19104 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
19105 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
19106 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
19107 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
19108 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
19109 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
19110 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
19111 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
19112 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
19113 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
19114 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
19115 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
19116 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
19117 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
19118 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
19119 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
19120 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
19121 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
19122 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
19123 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
19124 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
19125 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
19126 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
19127 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
19128 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
19129 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
19130 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
19131 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
19132 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
19133 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
19134 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
19135 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
19136 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
19137 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
19138 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
19139 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
19140 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
19141 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
19142 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
19143 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
19144 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
19145 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
19146 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
19147 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
19148 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
19149 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
19150 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
19151 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
19152 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
19153 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
19154 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
19155 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
19156 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
19157 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
19158 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
19159 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
19160 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
19161 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
19162 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
19163 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
19164 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
19165 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
19166 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
19167 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
19168 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
19169 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
19170 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
19171 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
19172 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
19173 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
19174 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
19175 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
19176 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
19177 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
19178 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
19179 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
19180 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
19181 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
19182 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
19183 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
19184 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
19185 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
19186 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
19187 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
19188 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
19189 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
19190 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
19191 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
19192 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
19193 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
19194 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
19195 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
19196 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
19197 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
19198 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
19199 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
19200 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
19201 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
19202 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
19203 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
19204 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
19205 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
19206 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
19207 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
19208 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
19209 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
19210 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
19211 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
19212 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
19213 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
19214 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
19215 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
19216 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
19217 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
19218 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
19219 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
19220 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
19221 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
19222 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
19223 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
19224 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
19225 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
19226 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
19227 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
19228 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
19229 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
19230 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
19231 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
19232 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
19233 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
19234 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
19235 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
19236 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
19237 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
19238 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
19239 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
19240 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
19241 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
19242 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
19243 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
19244 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
19245 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
19246 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
19247 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
19248 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
19249 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
19250 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
19251 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
19252 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
19253 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
19254 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
19255 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
19256 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
19257 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
19258 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
19259 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
19260 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
19261 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
19262 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
19263 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
19264 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
19265 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
19266 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
19267 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
19268 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
19269 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
19270 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
19271 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
19272 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
19273 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
19274 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
19275 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
19276 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
19277 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
19278 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
19279 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
19280 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
19281 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
19282 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
19283 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
19284 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
19285 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
19286 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
19287 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
19288 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
19289 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
19290 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
19291 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
19292 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
19293 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
19294 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
19295 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
19296 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
19297 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
19298 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
19299 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
19300 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
19301 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
19302 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
19303 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
19304 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
19305 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
19306 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
19307 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
19308 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
19309 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
19310 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
19311 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
19312 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
19313 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
19314 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
19315 "\x00\x21\x42\x63",
19316 .ilen = 4100,
19317 .result =
19318 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
19319 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
19320 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
19321 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
19322 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
19323 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
19324 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
19325 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
19326 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
19327 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
19328 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
19329 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
19330 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
19331 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
19332 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
19333 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
19334 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
19335 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
19336 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
19337 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
19338 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
19339 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
19340 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
19341 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
19342 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
19343 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
19344 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
19345 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
19346 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
19347 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
19348 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
19349 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
19350 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
19351 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
19352 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
19353 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
19354 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
19355 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
19356 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
19357 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
19358 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
19359 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
19360 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
19361 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
19362 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
19363 "\x04\x02\xef\xd3\x44\xde\x76\x31"
19364 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
19365 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
19366 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
19367 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
19368 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
19369 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
19370 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
19371 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
19372 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
19373 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
19374 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
19375 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
19376 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
19377 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
19378 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
19379 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
19380 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
19381 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
19382 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
19383 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
19384 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
19385 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
19386 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
19387 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
19388 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
19389 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
19390 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
19391 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
19392 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
19393 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
19394 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
19395 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
19396 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
19397 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
19398 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
19399 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
19400 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
19401 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
19402 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
19403 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
19404 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
19405 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
19406 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
19407 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
19408 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
19409 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
19410 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
19411 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
19412 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
19413 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
19414 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
19415 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
19416 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
19417 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
19418 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
19419 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
19420 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
19421 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
19422 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
19423 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
19424 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
19425 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
19426 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
19427 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
19428 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
19429 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
19430 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
19431 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
19432 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
19433 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
19434 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
19435 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
19436 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
19437 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
19438 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
19439 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
19440 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
19441 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
19442 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
19443 "\x26\x39\x83\x94\xef\x27\xd8\x53"
19444 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
19445 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
19446 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
19447 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
19448 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
19449 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
19450 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
19451 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
19452 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
19453 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
19454 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
19455 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
19456 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
19457 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
19458 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
19459 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
19460 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
19461 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
19462 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
19463 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
19464 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
19465 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
19466 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
19467 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
19468 "\x35\x12\xe3\x36\x28\x27\x36\x58"
19469 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
19470 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
19471 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
19472 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
19473 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
19474 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
19475 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
19476 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
19477 "\x89\xf3\x78\x35\x44\x62\x78\x72"
19478 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
19479 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
19480 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
19481 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
19482 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
19483 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
19484 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
19485 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
19486 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
19487 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
19488 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
19489 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
19490 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
19491 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
19492 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
19493 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
19494 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
19495 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
19496 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
19497 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
19498 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
19499 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
19500 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
19501 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
19502 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
19503 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
19504 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
19505 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
19506 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
19507 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
19508 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
19509 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
19510 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
19511 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
19512 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
19513 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
19514 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
19515 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
19516 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
19517 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
19518 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
19519 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
19520 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
19521 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
19522 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
19523 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
19524 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
19525 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
19526 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
19527 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
19528 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
19529 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
19530 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
19531 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
19532 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
19533 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
19534 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
19535 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
19536 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
19537 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
19538 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
19539 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
19540 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
19541 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
19542 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
19543 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
19544 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
19545 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
19546 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
19547 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
19548 "\x29\x90\x46\x30\x92\x69\x7d\x13"
19549 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
19550 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
19551 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
19552 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
19553 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
19554 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
19555 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
19556 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
19557 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
19558 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
19559 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
19560 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
19561 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
19562 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
19563 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
19564 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
19565 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
19566 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
19567 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
19568 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
19569 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
19570 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
19571 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
19572 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
19573 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
19574 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
19575 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
19576 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
19577 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
19578 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
19579 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
19580 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
19581 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
19582 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
19583 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
19584 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
19585 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
19586 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
19587 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
19588 "\x73\x02\x3b\x78\x21\x72\x43\x00"
19589 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
19590 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
19591 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
19592 "\x11\x94\x13\x69\x51\x09\x28\xde"
19593 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
19594 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
19595 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
19596 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
19597 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
19598 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
19599 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
19600 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
19601 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
19602 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
19603 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
19604 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
19605 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
19606 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
19607 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
19608 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
19609 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
19610 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
19611 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
19612 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
19613 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
19614 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
19615 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
19616 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
19617 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
19618 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
19619 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
19620 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
19621 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
19622 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
19623 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
19624 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
19625 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
19626 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
19627 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
19628 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
19629 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
19630 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
19631 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
19632 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
19633 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
19634 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
19635 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
19636 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
19637 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
19638 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
19639 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
19640 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
19641 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
19642 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
19643 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
19644 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
19645 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
19646 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
19647 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
19648 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
19649 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
19650 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
19651 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
19652 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
19653 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
19654 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
19655 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
19656 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
19657 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
19658 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
19659 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
19660 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
19661 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
19662 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
19663 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
19664 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
19665 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
19666 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
19667 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
19668 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
19669 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
19670 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
19671 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
19672 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
19673 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
19674 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
19675 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
19676 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
19677 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
19678 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
19679 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
19680 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
19681 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
19682 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
19683 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
19684 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
19685 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
19686 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
19687 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
19688 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
19689 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
19690 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
19691 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
19692 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
19693 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
19694 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
19695 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
19696 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
19697 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
19698 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
19699 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
19700 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
19701 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
19702 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
19703 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
19704 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
19705 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
19706 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
19707 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
19708 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
19709 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
19710 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
19711 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
19712 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
19713 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
19714 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
19715 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
19716 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
19717 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
19718 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
19719 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
19720 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
19721 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
19722 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
19723 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
19724 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
19725 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
19726 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
19727 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
19728 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
19729 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
19730 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
19731 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
19732 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
19733 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
19734 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
19735 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
19736 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
19737 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
19738 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
19739 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
19740 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
19741 "\xae\xed\x39\x88\x42\x11\x3c\xed"
19742 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
19743 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
19744 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
19745 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
19746 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
19747 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
19748 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
19749 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
19750 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
19751 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
19752 "\x34\x17\xde\xba\x47\xf1\x06\x18"
19753 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
19754 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
19755 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
19756 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
19757 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
19758 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
19759 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
19760 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
19761 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
19762 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
19763 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
19764 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
19765 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
19766 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
19767 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
19768 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
19769 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
19770 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
19771 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
19772 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
19773 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
19774 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
19775 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
19776 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
19777 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
19778 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
19779 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
19780 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
19781 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
19782 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
19783 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
19784 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
19785 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
19786 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
19787 "\x74\x56\x58\x40\x02\x37\x52\x2c"
19788 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
19789 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
19790 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
19791 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
19792 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
19793 "\xed\x38\x80\x36\x72\x43\x27\x49"
19794 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
19795 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
19796 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
19797 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
19798 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
19799 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
19800 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
19801 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
19802 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
19803 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
19804 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
19805 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
19806 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
19807 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
19808 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
19809 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
19810 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
19811 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
19812 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
19813 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
19814 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
19815 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
19816 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
19817 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
19818 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
19819 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
19820 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
19821 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
19822 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
19823 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
19824 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
19825 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
19826 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
19827 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
19828 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
19829 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
19830 "\x21\xed\xda\x86",
19831 .rlen = 4100,
19832 .np = 2,
19833 .tap = { 4064, 36 },
19834 },
19835};
19836
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080019837static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080019838 { /* From RFC 3686 */
19839 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
19840 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
19841 "\x00\x00\x00\x30",
19842 .klen = 20,
19843 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19844 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
19845 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
19846 .ilen = 16,
19847 .result = "Single block msg",
19848 .rlen = 16,
19849 }, {
19850 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
19851 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
19852 "\x00\x6c\xb6\xdb",
19853 .klen = 20,
19854 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
19855 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
19856 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
19857 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
19858 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
19859 .ilen = 32,
19860 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19861 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19862 "\x10\x11\x12\x13\x14\x15\x16\x17"
19863 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19864 .rlen = 32,
19865 }, {
19866 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
19867 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
19868 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
19869 "\x00\x00\x00\x48",
19870 .klen = 28,
19871 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
19872 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
19873 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
19874 .ilen = 16,
19875 .result = "Single block msg",
19876 .rlen = 16,
19877 }, {
19878 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
19879 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
19880 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
19881 "\x00\x96\xb0\x3b",
19882 .klen = 28,
19883 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
19884 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
19885 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
19886 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
19887 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
19888 .ilen = 32,
19889 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19890 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19891 "\x10\x11\x12\x13\x14\x15\x16\x17"
19892 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19893 .rlen = 32,
19894 }, {
19895 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
19896 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
19897 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
19898 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
19899 "\x00\x00\x00\x60",
19900 .klen = 36,
19901 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
19902 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
19903 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
19904 .ilen = 16,
19905 .result = "Single block msg",
19906 .rlen = 16,
19907 }, {
19908 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
19909 "\x07\x96\x36\x58\x79\xef\xf8\x86"
19910 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
19911 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
19912 "\x00\xfa\xac\x24",
19913 .klen = 36,
19914 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
19915 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
19916 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
19917 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
19918 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
19919 .ilen = 32,
19920 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19921 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19922 "\x10\x11\x12\x13\x14\x15\x16\x17"
19923 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19924 .rlen = 32,
19925 },
19926};
19927
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100019928static struct cipher_testvec aes_ofb_enc_tv_template[] = {
19929 /* From NIST Special Publication 800-38A, Appendix F.5 */
19930 {
19931 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19932 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19933 .klen = 16,
19934 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19935 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19936 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19937 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19938 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19939 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19940 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19941 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19942 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19943 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19944 .ilen = 64,
19945 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19946 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19947 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19948 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19949 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19950 "\x44\xf7\xa8\x22\x60\xed\xcc"
19951 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19952 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19953 .rlen = 64,
19954 }
19955};
19956
19957static struct cipher_testvec aes_ofb_dec_tv_template[] = {
19958 /* From NIST Special Publication 800-38A, Appendix F.5 */
19959 {
19960 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19961 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19962 .klen = 16,
19963 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19964 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19965 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19966 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19967 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19968 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19969 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19970 "\x44\xf7\xa8\x22\x60\xed\xcc"
19971 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19972 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19973 .ilen = 64,
19974 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19975 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19976 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19977 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19978 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19979 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19980 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19981 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19982 .rlen = 64,
19983 }
19984};
19985
Herbert Xuda7f0332008-07-31 17:08:25 +080019986static struct aead_testvec aes_gcm_enc_tv_template[] = {
19987 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19988 .key = zeroed_string,
19989 .klen = 16,
19990 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
19991 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
19992 .rlen = 16,
19993 }, {
19994 .key = zeroed_string,
19995 .klen = 16,
19996 .input = zeroed_string,
19997 .ilen = 16,
19998 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
19999 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
20000 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
20001 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
20002 .rlen = 32,
20003 }, {
20004 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20005 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20006 .klen = 16,
20007 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20008 "\xde\xca\xf8\x88",
20009 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20010 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20011 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20012 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20013 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20014 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20015 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20016 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20017 .ilen = 64,
20018 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20019 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20020 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20021 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20022 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20023 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20024 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20025 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
20026 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
20027 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
20028 .rlen = 80,
20029 }, {
20030 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20031 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20032 .klen = 16,
20033 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20034 "\xde\xca\xf8\x88",
20035 .input = "\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",
20043 .ilen = 60,
20044 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20045 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20046 "\xab\xad\xda\xd2",
20047 .alen = 20,
20048 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20049 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20050 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20051 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20052 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20053 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20054 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20055 "\x3d\x58\xe0\x91"
20056 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
20057 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
20058 .rlen = 76,
20059 }, {
20060 .key = zeroed_string,
20061 .klen = 24,
20062 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
20063 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
20064 .rlen = 16,
20065 }, {
20066 .key = zeroed_string,
20067 .klen = 24,
20068 .input = zeroed_string,
20069 .ilen = 16,
20070 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
20071 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
20072 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
20073 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
20074 .rlen = 32,
20075 }, {
20076 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20077 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20078 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20079 .klen = 24,
20080 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20081 "\xde\xca\xf8\x88",
20082 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20083 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20084 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20085 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20086 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20087 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20088 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20089 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20090 .ilen = 64,
20091 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20092 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20093 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20094 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20095 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20096 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20097 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20098 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
20099 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
20100 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
20101 .rlen = 80,
20102 }, {
20103 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20104 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20105 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20106 .klen = 24,
20107 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20108 "\xde\xca\xf8\x88",
20109 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20110 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20111 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20112 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20113 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20114 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20115 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20116 "\xba\x63\x7b\x39",
20117 .ilen = 60,
20118 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20119 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20120 "\xab\xad\xda\xd2",
20121 .alen = 20,
20122 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20123 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20124 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20125 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20126 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20127 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20128 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20129 "\xcc\xda\x27\x10"
20130 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
20131 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
20132 .rlen = 76,
20133 .np = 2,
20134 .tap = { 32, 28 },
20135 .anp = 2,
20136 .atap = { 8, 12 }
20137 }, {
20138 .key = zeroed_string,
20139 .klen = 32,
20140 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
20141 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
20142 .rlen = 16,
20143 }
20144};
20145
20146static struct aead_testvec aes_gcm_dec_tv_template[] = {
20147 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
20148 .key = zeroed_string,
20149 .klen = 32,
20150 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
20151 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
20152 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
20153 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
20154 .ilen = 32,
20155 .result = zeroed_string,
20156 .rlen = 16,
20157 }, {
20158 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20159 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20160 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20161 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20162 .klen = 32,
20163 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20164 "\xde\xca\xf8\x88",
20165 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
20166 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
20167 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
20168 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
20169 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
20170 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
20171 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
20172 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
20173 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
20174 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
20175 .ilen = 80,
20176 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20177 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20178 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20179 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20180 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20181 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20182 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20183 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20184 .rlen = 64,
20185 }, {
20186 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20187 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20188 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20189 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20190 .klen = 32,
20191 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20192 "\xde\xca\xf8\x88",
20193 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
20194 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
20195 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
20196 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
20197 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
20198 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
20199 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
20200 "\xbc\xc9\xf6\x62"
20201 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
20202 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
20203 .ilen = 76,
20204 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20205 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20206 "\xab\xad\xda\xd2",
20207 .alen = 20,
20208 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20209 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20210 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20211 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20212 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20213 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20214 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20215 "\xba\x63\x7b\x39",
20216 .rlen = 60,
20217 .np = 2,
20218 .tap = { 48, 28 },
20219 .anp = 3,
20220 .atap = { 8, 8, 4 }
20221 }, {
20222 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20223 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20224 .klen = 16,
20225 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20226 "\xde\xca\xf8\x88",
20227 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20228 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20229 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20230 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20231 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20232 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20233 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20234 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
20235 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
20236 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
20237 .ilen = 80,
20238 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20239 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20240 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20241 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20242 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20243 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20244 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20245 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20246 .rlen = 64,
20247 }, {
20248 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20249 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20250 .klen = 16,
20251 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20252 "\xde\xca\xf8\x88",
20253 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20254 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20255 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20256 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20257 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20258 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20259 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20260 "\x3d\x58\xe0\x91"
20261 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
20262 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
20263 .ilen = 76,
20264 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20265 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20266 "\xab\xad\xda\xd2",
20267 .alen = 20,
20268 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20269 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20270 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20271 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20272 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20273 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20274 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20275 "\xba\x63\x7b\x39",
20276 .rlen = 60,
20277 }, {
20278 .key = zeroed_string,
20279 .klen = 24,
20280 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
20281 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
20282 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
20283 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
20284 .ilen = 32,
20285 .result = zeroed_string,
20286 .rlen = 16,
20287 }, {
20288 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20289 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20290 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20291 .klen = 24,
20292 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20293 "\xde\xca\xf8\x88",
20294 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20295 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20296 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20297 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20298 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20299 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20300 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20301 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
20302 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
20303 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
20304 .ilen = 80,
20305 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20306 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20307 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20308 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20309 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20310 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20311 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20312 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20313 .rlen = 64,
20314 }, {
20315 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20316 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20317 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20318 .klen = 24,
20319 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20320 "\xde\xca\xf8\x88",
20321 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20322 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20323 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20324 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20325 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20326 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20327 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20328 "\xcc\xda\x27\x10"
20329 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
20330 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
20331 .ilen = 76,
20332 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20333 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20334 "\xab\xad\xda\xd2",
20335 .alen = 20,
20336 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20337 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20338 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20339 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20340 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20341 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20342 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20343 "\xba\x63\x7b\x39",
20344 .rlen = 60,
20345 }
20346};
20347
Adrian Hoban69435b92010-11-04 15:02:04 -040020348static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
Herbert Xu85375442015-07-09 07:17:25 +080020349 { /* Generated using Crypto++ */
Adrian Hoban69435b92010-11-04 15:02:04 -040020350 .key = zeroed_string,
20351 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020352 .iv = zeroed_string,
20353 .input = zeroed_string,
20354 .ilen = 16,
20355 .assoc = zeroed_string,
20356 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020357 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
Herbert Xu85375442015-07-09 07:17:25 +080020358 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20359 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20360 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
Adrian Hoban69435b92010-11-04 15:02:04 -040020361 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020362 },{
Adrian Hoban69435b92010-11-04 15:02:04 -040020363 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20364 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020365 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020366 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020367 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20368 .input = zeroed_string,
20369 .ilen = 16,
20370 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
20371 "\x00\x00\x00\x00\x00\x00\x00\x01",
20372 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020373 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
Herbert Xu85375442015-07-09 07:17:25 +080020374 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20375 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20376 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
Adrian Hoban69435b92010-11-04 15:02:04 -040020377 .rlen = 32,
20378
Herbert Xu85375442015-07-09 07:17:25 +080020379 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020380 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20381 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020382 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020383 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020384 .iv = zeroed_string,
20385 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20386 "\x01\x01\x01\x01\x01\x01\x01\x01",
20387 .ilen = 16,
20388 .assoc = zeroed_string,
20389 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020390 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020391 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20392 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20393 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
Adrian Hoban69435b92010-11-04 15:02:04 -040020394 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020395 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020396 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20397 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020398 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020399 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020400 .iv = zeroed_string,
20401 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20402 "\x01\x01\x01\x01\x01\x01\x01\x01",
20403 .ilen = 16,
20404 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20405 "\x00\x00\x00\x00\x00\x00\x00\x00",
20406 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020407 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020408 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20409 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20410 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
Adrian Hoban69435b92010-11-04 15:02:04 -040020411 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020412 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020413 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20414 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020415 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020416 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020417 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20418 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20419 "\x01\x01\x01\x01\x01\x01\x01\x01",
20420 .ilen = 16,
20421 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20422 "\x00\x00\x00\x00\x00\x00\x00\x01",
20423 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020424 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020425 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20426 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20427 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
Adrian Hoban69435b92010-11-04 15:02:04 -040020428 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020429 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020430 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20431 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020432 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020433 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020434 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20435 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20436 "\x01\x01\x01\x01\x01\x01\x01\x01"
20437 "\x01\x01\x01\x01\x01\x01\x01\x01"
20438 "\x01\x01\x01\x01\x01\x01\x01\x01"
20439 "\x01\x01\x01\x01\x01\x01\x01\x01"
20440 "\x01\x01\x01\x01\x01\x01\x01\x01"
20441 "\x01\x01\x01\x01\x01\x01\x01\x01"
20442 "\x01\x01\x01\x01\x01\x01\x01\x01",
20443 .ilen = 64,
20444 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20445 "\x00\x00\x00\x00\x00\x00\x00\x01",
20446 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020447 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020448 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20449 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20450 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20451 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20452 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20453 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20454 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20455 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20456 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
Adrian Hoban69435b92010-11-04 15:02:04 -040020457 .rlen = 80,
Herbert Xu85375442015-07-09 07:17:25 +080020458 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020459 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20460 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
Herbert Xu85375442015-07-09 07:17:25 +080020461 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020462 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020463 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
20464 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
20465 "\xff\xff\xff\xff\xff\xff\xff\xff"
20466 "\xff\xff\xff\xff\xff\xff\xff\xff"
20467 "\xff\xff\xff\xff\xff\xff\xff\xff"
20468 "\xff\xff\xff\xff\xff\xff\xff\xff"
20469 "\xff\xff\xff\xff\xff\xff\xff\xff"
20470 "\xff\xff\xff\xff\xff\xff\xff\xff"
20471 "\xff\xff\xff\xff\xff\xff\xff\xff"
20472 "\xff\xff\xff\xff\xff\xff\xff\xff"
20473 "\xff\xff\xff\xff\xff\xff\xff\xff"
20474 "\xff\xff\xff\xff\xff\xff\xff\xff"
20475 "\xff\xff\xff\xff\xff\xff\xff\xff"
20476 "\xff\xff\xff\xff\xff\xff\xff\xff"
20477 "\xff\xff\xff\xff\xff\xff\xff\xff"
20478 "\xff\xff\xff\xff\xff\xff\xff\xff"
20479 "\xff\xff\xff\xff\xff\xff\xff\xff"
20480 "\xff\xff\xff\xff\xff\xff\xff\xff"
20481 "\xff\xff\xff\xff\xff\xff\xff\xff"
20482 "\xff\xff\xff\xff\xff\xff\xff\xff"
20483 "\xff\xff\xff\xff\xff\xff\xff\xff"
20484 "\xff\xff\xff\xff\xff\xff\xff\xff"
20485 "\xff\xff\xff\xff\xff\xff\xff\xff"
20486 "\xff\xff\xff\xff\xff\xff\xff\xff"
20487 "\xff\xff\xff\xff\xff\xff\xff\xff",
20488 .ilen = 192,
20489 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20490 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
20491 "\x89\xab\xcd\xef",
20492 .alen = 20,
Adrian Hoban69435b92010-11-04 15:02:04 -040020493 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20494 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20495 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20496 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20497 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20498 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20499 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20500 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20501 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20502 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20503 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20504 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20505 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20506 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20507 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20508 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20509 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20510 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20511 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20512 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20513 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20514 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20515 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20516 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20517 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20518 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20519 .rlen = 208,
Herbert Xu8f69b762015-06-16 13:54:26 +080020520 }, { /* From draft-mcgrew-gcm-test-01 */
20521 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20522 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20523 "\x2E\x44\x3B\x68",
20524 .klen = 20,
20525 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20526 .input = "\x45\x00\x00\x48\x69\x9A\x00\x00"
20527 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
20528 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
20529 "\x38\xD3\x01\x00\x00\x01\x00\x00"
20530 "\x00\x00\x00\x00\x04\x5F\x73\x69"
20531 "\x70\x04\x5F\x75\x64\x70\x03\x73"
20532 "\x69\x70\x09\x63\x79\x62\x65\x72"
20533 "\x63\x69\x74\x79\x02\x64\x6B\x00"
20534 "\x00\x21\x00\x01\x01\x02\x02\x01",
20535 .ilen = 72,
20536 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080020537 "\x00\x00\x00\x00\x49\x56\xED\x7E"
20538 "\x3B\x24\x4C\xFE",
20539 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020540 .result = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
20541 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
20542 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
20543 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
20544 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
20545 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
20546 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
20547 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
20548 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
20549 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
20550 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
20551 .rlen = 88,
20552 }, {
20553 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20554 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20555 "\xCA\xFE\xBA\xBE",
20556 .klen = 20,
20557 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20558 .input = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
20559 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
20560 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
20561 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
20562 "\x00\x01\x00\x00\x00\x00\x00\x00"
20563 "\x03\x73\x69\x70\x09\x63\x79\x62"
20564 "\x65\x72\x63\x69\x74\x79\x02\x64"
20565 "\x6B\x00\x00\x01\x00\x01\x00\x01",
20566 .ilen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080020567 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
20568 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20569 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020570 .result = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
20571 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
20572 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
20573 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
20574 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
20575 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
20576 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
20577 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
20578 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
20579 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
20580 .rlen = 80,
20581 }, {
20582 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20583 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20584 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20585 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20586 "\x11\x22\x33\x44",
20587 .klen = 36,
20588 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
20589 .input = "\x45\x00\x00\x30\x69\xA6\x40\x00"
20590 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
20591 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
20592 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
20593 "\x70\x02\x40\x00\x20\xBF\x00\x00"
20594 "\x02\x04\x05\xB4\x01\x01\x04\x02"
20595 "\x01\x02\x02\x01",
20596 .ilen = 52,
Herbert Xu85375442015-07-09 07:17:25 +080020597 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
20598 "\x01\x02\x03\x04\x05\x06\x07\x08",
20599 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020600 .result = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
20601 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
20602 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
20603 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
20604 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
20605 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
20606 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
20607 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
20608 "\x15\x95\x6C\x96",
20609 .rlen = 68,
20610 }, {
20611 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
20612 "\x00\x00\x00\x00\x00\x00\x00\x00"
20613 "\x00\x00\x00\x00",
20614 .klen = 20,
20615 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20616 .input = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
20617 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
20618 "\x01\x01\x01\x01\x08\x00\x07\x5C"
20619 "\x02\x00\x44\x00\x61\x62\x63\x64"
20620 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20621 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20622 "\x75\x76\x77\x61\x62\x63\x64\x65"
20623 "\x66\x67\x68\x69\x01\x02\x02\x01",
20624 .ilen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080020625 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
20626 "\x00\x00\x00\x00\x00\x00\x00\x00",
20627 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020628 .result = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
20629 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
20630 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
20631 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
20632 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
20633 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
20634 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
20635 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
20636 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
20637 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
20638 .rlen = 80,
20639 }, {
20640 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20641 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20642 "\x57\x69\x0E\x43",
20643 .klen = 20,
20644 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20645 .input = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
20646 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
20647 "\x01\x01\x01\x01\x08\x00\x08\x5C"
20648 "\x02\x00\x43\x00\x61\x62\x63\x64"
20649 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20650 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20651 "\x75\x76\x77\x61\x62\x63\x64\x65"
20652 "\x66\x67\x68\x69\x01\x02\x02\x01",
20653 .ilen = 64,
20654 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020655 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20656 "\xA2\xFC\xA1\xA3",
20657 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020658 .result = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
20659 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
20660 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
20661 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
20662 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20663 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20664 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
20665 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
20666 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
20667 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
20668 .rlen = 80,
20669 }, {
20670 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20671 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20672 "\x57\x69\x0E\x43",
20673 .klen = 20,
20674 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20675 .input = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
20676 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
20677 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
20678 "\x01\x02\x02\x01",
20679 .ilen = 28,
20680 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020681 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20682 "\xA2\xFC\xA1\xA3",
20683 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020684 .result = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
20685 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
20686 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
20687 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
20688 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
20689 "\xE7\xD0\x5D\x35",
20690 .rlen = 44,
20691 }, {
20692 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20693 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20694 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20695 "\xCA\xFE\xBA\xBE",
20696 .klen = 28,
20697 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20698 .input = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
20699 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
20700 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
20701 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
20702 "\x50\x10\x16\xD0\x75\x68\x00\x01",
20703 .ilen = 40,
Herbert Xu85375442015-07-09 07:17:25 +080020704 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
20705 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20706 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020707 .result = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
20708 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
20709 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
20710 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
20711 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
20712 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
20713 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
20714 .rlen = 56,
20715 }, {
20716 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20717 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20718 "\xDE\xCA\xF8\x88",
20719 .klen = 20,
20720 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20721 .input = "\x45\x00\x00\x49\x33\xBA\x00\x00"
20722 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
20723 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20724 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
20725 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
20726 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
20727 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
20728 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
20729 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
20730 "\x23\x01\x01\x01",
20731 .ilen = 76,
20732 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080020733 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
20734 "\xCE\xFA\xCE\x74",
20735 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020736 .result = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
20737 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
20738 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
20739 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
20740 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
20741 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
20742 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
20743 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
20744 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
20745 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
20746 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
20747 "\x69\x62\x34\x36",
20748 .rlen = 92,
20749 }, {
20750 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20751 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20752 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20753 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20754 "\x73\x61\x6C\x74",
20755 .klen = 36,
20756 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20757 .input = "\x45\x08\x00\x28\x73\x2C\x00\x00"
20758 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
20759 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
20760 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
20761 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
20762 .ilen = 40,
20763 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080020764 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
20765 "\x69\x76\x65\x63",
20766 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020767 .result = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
20768 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
20769 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
20770 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
20771 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
20772 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
20773 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
20774 .rlen = 56,
20775 }, {
20776 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20777 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20778 "\x57\x69\x0E\x43",
20779 .klen = 20,
20780 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20781 .input = "\x45\x00\x00\x49\x33\x3E\x00\x00"
20782 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
20783 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20784 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
20785 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
20786 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
20787 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
20788 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
20789 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
20790 "\x15\x01\x01\x01",
20791 .ilen = 76,
20792 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020793 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20794 "\xA2\xFC\xA1\xA3",
20795 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020796 .result = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
20797 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
20798 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
20799 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
20800 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
20801 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
20802 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
20803 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
20804 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
20805 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
20806 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
20807 "\x8C\xAA\x81\xE2",
20808 .rlen = 92,
20809 }, {
20810 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20811 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20812 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20813 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20814 "\x73\x61\x6C\x74",
20815 .klen = 36,
20816 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20817 .input = "\x63\x69\x73\x63\x6F\x01\x72\x75"
20818 "\x6C\x65\x73\x01\x74\x68\x65\x01"
20819 "\x6E\x65\x74\x77\x65\x01\x64\x65"
20820 "\x66\x69\x6E\x65\x01\x74\x68\x65"
20821 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
20822 "\x67\x69\x65\x73\x01\x74\x68\x61"
20823 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
20824 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
20825 "\x72\x72\x6F\x77\x01\x02\x02\x01",
20826 .ilen = 72,
20827 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080020828 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
20829 "\x69\x76\x65\x63",
20830 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020831 .result = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
20832 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
20833 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
20834 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
20835 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
20836 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
20837 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
20838 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
20839 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
20840 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
20841 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
20842 .rlen = 88,
20843 }, {
20844 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
20845 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
20846 "\xD9\x66\x42\x67",
20847 .klen = 20,
20848 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
20849 .input = "\x01\x02\x02\x01",
20850 .ilen = 4,
Herbert Xu85375442015-07-09 07:17:25 +080020851 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
20852 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
20853 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020854 .result = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
20855 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
20856 "\x04\xBE\xF2\x70",
20857 .rlen = 20,
20858 }, {
20859 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20860 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20861 "\xDE\xCA\xF8\x88",
20862 .klen = 20,
20863 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20864 .input = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
20865 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
20866 "\x62\x65\x00\x01",
20867 .ilen = 20,
20868 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080020869 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
20870 "\xCE\xFA\xCE\x74",
20871 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020872 .result = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
20873 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
20874 "\x43\x33\x21\x64\x41\x25\x03\x52"
20875 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
20876 "\x43\xAF\x8C\x3E",
20877 .rlen = 36,
20878 }, {
20879 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
20880 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
20881 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
20882 "\x62\x65\x66\x6F\x72\x65\x69\x61"
20883 "\x74\x75\x72\x6E",
20884 .klen = 36,
20885 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
20886 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20887 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20888 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20889 "\x02\x00\x07\x00\x61\x62\x63\x64"
20890 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20891 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20892 "\x01\x02\x02\x01",
20893 .ilen = 52,
20894 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
Herbert Xu85375442015-07-09 07:17:25 +080020895 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
20896 "\x67\x65\x74\x6D",
20897 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020898 .result = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
20899 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
20900 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
20901 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
20902 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
20903 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
20904 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
20905 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
20906 "\x9F\xB4\xC0\x53",
20907 .rlen = 68,
20908 }, {
20909 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20910 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20911 "\x57\x69\x0E\x43",
20912 .klen = 20,
20913 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20914 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20915 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20916 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20917 "\x02\x00\x07\x00\x61\x62\x63\x64"
20918 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20919 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20920 "\x01\x02\x02\x01",
20921 .ilen = 52,
20922 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020923 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20924 "\xA2\xFC\xA1\xA3",
20925 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020926 .result = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
20927 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
20928 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
20929 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
20930 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20931 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20932 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
20933 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
20934 "\x40\xD7\xCB\x05",
20935 .rlen = 68,
20936 }, {
20937 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20938 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20939 "\x22\x43\x3C\x64",
20940 .klen = 20,
20941 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
20942 .input = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
20943 "\x61\x62\x63\x64\x65\x66\x67\x68"
20944 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
20945 "\x71\x72\x73\x74\x01\x02\x02\x01",
20946 .ilen = 32,
20947 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080020948 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
20949 "\x3A\x23\x4B\xFD",
20950 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020951 .result = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
20952 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
20953 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
20954 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
20955 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
20956 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
20957 .rlen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040020958 }
20959};
20960
20961static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
Herbert Xu85375442015-07-09 07:17:25 +080020962 { /* Generated using Crypto++ */
Adrian Hoban69435b92010-11-04 15:02:04 -040020963 .key = zeroed_string,
20964 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020965 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040020966 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
Herbert Xu85375442015-07-09 07:17:25 +080020967 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20968 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20969 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
Adrian Hoban69435b92010-11-04 15:02:04 -040020970 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020971 .assoc = zeroed_string,
20972 .alen = 16,
20973 .result = zeroed_string,
20974 .rlen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020975
Herbert Xu85375442015-07-09 07:17:25 +080020976 },{
Adrian Hoban69435b92010-11-04 15:02:04 -040020977 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20978 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020979 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020980 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020981 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040020982 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
Herbert Xu85375442015-07-09 07:17:25 +080020983 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20984 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20985 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
Adrian Hoban69435b92010-11-04 15:02:04 -040020986 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020987 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
20988 "\x00\x00\x00\x00\x00\x00\x00\x01",
20989 .alen = 16,
20990 .result = zeroed_string,
20991 .rlen = 16,
20992 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020993 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20994 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020995 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020996 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020997 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040020998 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020999 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
21000 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
21001 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
Adrian Hoban69435b92010-11-04 15:02:04 -040021002 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080021003 .assoc = zeroed_string,
21004 .alen = 16,
21005 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
21006 "\x01\x01\x01\x01\x01\x01\x01\x01",
21007 .rlen = 16,
21008 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040021009 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
21010 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080021011 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040021012 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021013 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040021014 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080021015 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
21016 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
21017 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
Adrian Hoban69435b92010-11-04 15:02:04 -040021018 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080021019 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
21020 "\x00\x00\x00\x00\x00\x00\x00\x00",
21021 .alen = 16,
21022 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
21023 "\x01\x01\x01\x01\x01\x01\x01\x01",
21024 .rlen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040021025
Herbert Xu85375442015-07-09 07:17:25 +080021026 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040021027 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
21028 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080021029 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040021030 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021031 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040021032 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080021033 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
21034 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
21035 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
Adrian Hoban69435b92010-11-04 15:02:04 -040021036 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080021037 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
21038 "\x00\x00\x00\x00\x00\x00\x00\x01",
21039 .alen = 16,
21040 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
21041 "\x01\x01\x01\x01\x01\x01\x01\x01",
21042 .rlen = 16,
21043 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040021044 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
21045 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080021046 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040021047 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021048 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040021049 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080021050 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
21051 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
21052 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
21053 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
21054 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
21055 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
21056 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
21057 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
21058 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
Adrian Hoban69435b92010-11-04 15:02:04 -040021059 .ilen = 80,
Herbert Xu85375442015-07-09 07:17:25 +080021060 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
21061 "\x00\x00\x00\x00\x00\x00\x00\x01",
21062 .alen = 16,
21063 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
21064 "\x01\x01\x01\x01\x01\x01\x01\x01"
21065 "\x01\x01\x01\x01\x01\x01\x01\x01"
21066 "\x01\x01\x01\x01\x01\x01\x01\x01"
21067 "\x01\x01\x01\x01\x01\x01\x01\x01"
21068 "\x01\x01\x01\x01\x01\x01\x01\x01"
21069 "\x01\x01\x01\x01\x01\x01\x01\x01"
21070 "\x01\x01\x01\x01\x01\x01\x01\x01",
21071 .rlen = 64,
21072 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040021073 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
21074 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
Herbert Xu85375442015-07-09 07:17:25 +080021075 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040021076 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021077 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
Adrian Hoban69435b92010-11-04 15:02:04 -040021078 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
21079 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
21080 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
21081 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
21082 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
21083 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
21084 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
21085 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
21086 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
21087 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
21088 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
21089 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
21090 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
21091 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
21092 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
21093 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
21094 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
21095 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
21096 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
21097 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
21098 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
21099 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
21100 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
21101 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
21102 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
21103 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
21104 .ilen = 208,
Herbert Xu85375442015-07-09 07:17:25 +080021105 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
21106 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
21107 "\x89\xab\xcd\xef",
21108 .alen = 20,
21109 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
21110 "\xff\xff\xff\xff\xff\xff\xff\xff"
21111 "\xff\xff\xff\xff\xff\xff\xff\xff"
21112 "\xff\xff\xff\xff\xff\xff\xff\xff"
21113 "\xff\xff\xff\xff\xff\xff\xff\xff"
21114 "\xff\xff\xff\xff\xff\xff\xff\xff"
21115 "\xff\xff\xff\xff\xff\xff\xff\xff"
21116 "\xff\xff\xff\xff\xff\xff\xff\xff"
21117 "\xff\xff\xff\xff\xff\xff\xff\xff"
21118 "\xff\xff\xff\xff\xff\xff\xff\xff"
21119 "\xff\xff\xff\xff\xff\xff\xff\xff"
21120 "\xff\xff\xff\xff\xff\xff\xff\xff"
21121 "\xff\xff\xff\xff\xff\xff\xff\xff"
21122 "\xff\xff\xff\xff\xff\xff\xff\xff"
21123 "\xff\xff\xff\xff\xff\xff\xff\xff"
21124 "\xff\xff\xff\xff\xff\xff\xff\xff"
21125 "\xff\xff\xff\xff\xff\xff\xff\xff"
21126 "\xff\xff\xff\xff\xff\xff\xff\xff"
21127 "\xff\xff\xff\xff\xff\xff\xff\xff"
21128 "\xff\xff\xff\xff\xff\xff\xff\xff"
21129 "\xff\xff\xff\xff\xff\xff\xff\xff"
21130 "\xff\xff\xff\xff\xff\xff\xff\xff"
21131 "\xff\xff\xff\xff\xff\xff\xff\xff"
21132 "\xff\xff\xff\xff\xff\xff\xff\xff",
21133 .rlen = 192,
Herbert Xu8f69b762015-06-16 13:54:26 +080021134 }, {
21135 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21136 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21137 "\x2E\x44\x3B\x68",
21138 .klen = 20,
21139 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
21140 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
21141 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
21142 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
21143 "\x38\xD3\x01\x00\x00\x01\x00\x00"
21144 "\x00\x00\x00\x00\x04\x5F\x73\x69"
21145 "\x70\x04\x5F\x75\x64\x70\x03\x73"
21146 "\x69\x70\x09\x63\x79\x62\x65\x72"
21147 "\x63\x69\x74\x79\x02\x64\x6B\x00"
21148 "\x00\x21\x00\x01\x01\x02\x02\x01",
21149 .rlen = 72,
21150 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080021151 "\x00\x00\x00\x00\x49\x56\xED\x7E"
21152 "\x3B\x24\x4C\xFE",
21153 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021154 .input = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
21155 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
21156 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
21157 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
21158 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
21159 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
21160 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
21161 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
21162 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
21163 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
21164 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
21165 .ilen = 88,
21166 }, {
21167 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21168 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21169 "\xCA\xFE\xBA\xBE",
21170 .klen = 20,
21171 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21172 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
21173 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
21174 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
21175 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
21176 "\x00\x01\x00\x00\x00\x00\x00\x00"
21177 "\x03\x73\x69\x70\x09\x63\x79\x62"
21178 "\x65\x72\x63\x69\x74\x79\x02\x64"
21179 "\x6B\x00\x00\x01\x00\x01\x00\x01",
21180 .rlen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080021181 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
21182 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21183 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021184 .input = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
21185 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
21186 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
21187 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
21188 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
21189 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
21190 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
21191 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
21192 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
21193 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
21194 .ilen = 80,
21195 }, {
21196 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21197 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21198 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21199 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21200 "\x11\x22\x33\x44",
21201 .klen = 36,
21202 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
21203 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
21204 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
21205 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
21206 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
21207 "\x70\x02\x40\x00\x20\xBF\x00\x00"
21208 "\x02\x04\x05\xB4\x01\x01\x04\x02"
21209 "\x01\x02\x02\x01",
21210 .rlen = 52,
Herbert Xu85375442015-07-09 07:17:25 +080021211 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
21212 "\x01\x02\x03\x04\x05\x06\x07\x08",
21213 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021214 .input = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
21215 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
21216 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
21217 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
21218 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
21219 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
21220 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
21221 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
21222 "\x15\x95\x6C\x96",
21223 .ilen = 68,
21224 }, {
21225 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
21226 "\x00\x00\x00\x00\x00\x00\x00\x00"
21227 "\x00\x00\x00\x00",
21228 .klen = 20,
21229 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
21230 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
21231 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
21232 "\x01\x01\x01\x01\x08\x00\x07\x5C"
21233 "\x02\x00\x44\x00\x61\x62\x63\x64"
21234 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21235 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21236 "\x75\x76\x77\x61\x62\x63\x64\x65"
21237 "\x66\x67\x68\x69\x01\x02\x02\x01",
21238 .rlen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080021239 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
21240 "\x00\x00\x00\x00\x00\x00\x00\x00",
21241 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021242 .input = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
21243 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
21244 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
21245 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
21246 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
21247 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
21248 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
21249 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
21250 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
21251 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
21252 .ilen = 80,
21253 }, {
21254 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21255 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21256 "\x57\x69\x0E\x43",
21257 .klen = 20,
21258 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21259 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
21260 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
21261 "\x01\x01\x01\x01\x08\x00\x08\x5C"
21262 "\x02\x00\x43\x00\x61\x62\x63\x64"
21263 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21264 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21265 "\x75\x76\x77\x61\x62\x63\x64\x65"
21266 "\x66\x67\x68\x69\x01\x02\x02\x01",
21267 .rlen = 64,
21268 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021269 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21270 "\xA2\xFC\xA1\xA3",
21271 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021272 .input = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
21273 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
21274 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
21275 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
21276 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21277 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21278 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
21279 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
21280 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
21281 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
21282 .ilen = 80,
21283 }, {
21284 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21285 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21286 "\x57\x69\x0E\x43",
21287 .klen = 20,
21288 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21289 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
21290 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
21291 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
21292 "\x01\x02\x02\x01",
21293 .rlen = 28,
21294 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021295 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21296 "\xA2\xFC\xA1\xA3",
21297 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021298 .input = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
21299 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
21300 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
21301 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
21302 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
21303 "\xE7\xD0\x5D\x35",
21304 .ilen = 44,
21305 }, {
21306 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21307 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21308 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21309 "\xCA\xFE\xBA\xBE",
21310 .klen = 28,
21311 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21312 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
21313 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
21314 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
21315 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
21316 "\x50\x10\x16\xD0\x75\x68\x00\x01",
21317 .rlen = 40,
Herbert Xu85375442015-07-09 07:17:25 +080021318 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
21319 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21320 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021321 .input = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
21322 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
21323 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
21324 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
21325 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
21326 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
21327 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
21328 .ilen = 56,
21329 }, {
21330 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21331 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21332 "\xDE\xCA\xF8\x88",
21333 .klen = 20,
21334 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21335 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
21336 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
21337 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21338 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
21339 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
21340 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
21341 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
21342 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
21343 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
21344 "\x23\x01\x01\x01",
21345 .rlen = 76,
21346 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080021347 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21348 "\xCE\xFA\xCE\x74",
21349 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021350 .input = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
21351 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
21352 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
21353 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
21354 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
21355 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
21356 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
21357 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
21358 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
21359 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
21360 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
21361 "\x69\x62\x34\x36",
21362 .ilen = 92,
21363 }, {
21364 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21365 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21366 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21367 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21368 "\x73\x61\x6C\x74",
21369 .klen = 36,
21370 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21371 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
21372 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
21373 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
21374 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
21375 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
21376 .rlen = 40,
21377 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080021378 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21379 "\x69\x76\x65\x63",
21380 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021381 .input = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
21382 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
21383 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
21384 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
21385 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
21386 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
21387 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
21388 .ilen = 56,
21389 }, {
21390 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21391 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21392 "\x57\x69\x0E\x43",
21393 .klen = 20,
21394 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21395 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
21396 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
21397 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21398 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
21399 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
21400 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
21401 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
21402 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
21403 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
21404 "\x15\x01\x01\x01",
21405 .rlen = 76,
21406 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021407 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21408 "\xA2\xFC\xA1\xA3",
21409 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021410 .input = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
21411 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
21412 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
21413 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
21414 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
21415 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
21416 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
21417 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
21418 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
21419 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
21420 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
21421 "\x8C\xAA\x81\xE2",
21422 .ilen = 92,
21423 }, {
21424 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21425 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21426 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21427 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21428 "\x73\x61\x6C\x74",
21429 .klen = 36,
21430 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21431 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
21432 "\x6C\x65\x73\x01\x74\x68\x65\x01"
21433 "\x6E\x65\x74\x77\x65\x01\x64\x65"
21434 "\x66\x69\x6E\x65\x01\x74\x68\x65"
21435 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
21436 "\x67\x69\x65\x73\x01\x74\x68\x61"
21437 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
21438 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
21439 "\x72\x72\x6F\x77\x01\x02\x02\x01",
21440 .rlen = 72,
21441 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080021442 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21443 "\x69\x76\x65\x63",
21444 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021445 .input = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
21446 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
21447 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
21448 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
21449 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
21450 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
21451 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
21452 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
21453 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
21454 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
21455 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
21456 .ilen = 88,
21457 }, {
21458 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
21459 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
21460 "\xD9\x66\x42\x67",
21461 .klen = 20,
21462 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21463 .result = "\x01\x02\x02\x01",
21464 .rlen = 4,
Herbert Xu85375442015-07-09 07:17:25 +080021465 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
21466 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21467 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021468 .input = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
21469 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
21470 "\x04\xBE\xF2\x70",
21471 .ilen = 20,
21472 }, {
21473 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21474 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21475 "\xDE\xCA\xF8\x88",
21476 .klen = 20,
21477 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21478 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
21479 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
21480 "\x62\x65\x00\x01",
21481 .rlen = 20,
21482 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080021483 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21484 "\xCE\xFA\xCE\x74",
21485 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021486 .input = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
21487 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
21488 "\x43\x33\x21\x64\x41\x25\x03\x52"
21489 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
21490 "\x43\xAF\x8C\x3E",
21491 .ilen = 36,
21492 }, {
21493 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
21494 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
21495 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
21496 "\x62\x65\x66\x6F\x72\x65\x69\x61"
21497 "\x74\x75\x72\x6E",
21498 .klen = 36,
21499 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
21500 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21501 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21502 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21503 "\x02\x00\x07\x00\x61\x62\x63\x64"
21504 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21505 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21506 "\x01\x02\x02\x01",
21507 .rlen = 52,
21508 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
Herbert Xu85375442015-07-09 07:17:25 +080021509 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
21510 "\x67\x65\x74\x6D",
21511 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021512 .input = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
21513 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
21514 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
21515 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
21516 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
21517 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
21518 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
21519 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
21520 "\x9F\xB4\xC0\x53",
21521 .ilen = 68,
21522 }, {
21523 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21524 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21525 "\x57\x69\x0E\x43",
21526 .klen = 20,
21527 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21528 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21529 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21530 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21531 "\x02\x00\x07\x00\x61\x62\x63\x64"
21532 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21533 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21534 "\x01\x02\x02\x01",
21535 .rlen = 52,
21536 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021537 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21538 "\xA2\xFC\xA1\xA3",
21539 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021540 .input = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
21541 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
21542 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
21543 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
21544 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21545 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21546 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
21547 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
21548 "\x40\xD7\xCB\x05",
21549 .ilen = 68,
21550 }, {
21551 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21552 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21553 "\x22\x43\x3C\x64",
21554 .klen = 20,
21555 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
21556 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
21557 "\x61\x62\x63\x64\x65\x66\x67\x68"
21558 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
21559 "\x71\x72\x73\x74\x01\x02\x02\x01",
21560 .rlen = 32,
21561 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080021562 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
21563 "\x3A\x23\x4B\xFD",
21564 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021565 .input = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
21566 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
21567 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
21568 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
21569 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
21570 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
21571 .ilen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040021572 }
21573};
21574
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021575static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = {
21576 { /* From draft-mcgrew-gcm-test-01 */
21577 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21578 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21579 "\x22\x43\x3c\x64",
21580 .klen = 20,
21581 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021582 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21583 "\x00\x00\x00\x00\x00\x00\x00\x00",
21584 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021585 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21586 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21587 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21588 "\x02\x00\x07\x00\x61\x62\x63\x64"
21589 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21590 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21591 "\x01\x02\x02\x01",
21592 .ilen = 52,
21593 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21594 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21595 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21596 "\x02\x00\x07\x00\x61\x62\x63\x64"
21597 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21598 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21599 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21600 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21601 "\xe4\x09\x9a\xaa",
21602 .rlen = 68,
21603 }
21604};
21605
21606static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = {
21607 { /* From draft-mcgrew-gcm-test-01 */
21608 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21609 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21610 "\x22\x43\x3c\x64",
21611 .klen = 20,
21612 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021613 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21614 "\x00\x00\x00\x00\x00\x00\x00\x00",
21615 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021616 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21617 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21618 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21619 "\x02\x00\x07\x00\x61\x62\x63\x64"
21620 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21621 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21622 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21623 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21624 "\xe4\x09\x9a\xaa",
21625 .ilen = 68,
21626 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21627 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21628 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21629 "\x02\x00\x07\x00\x61\x62\x63\x64"
21630 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21631 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21632 "\x01\x02\x02\x01",
21633 .rlen = 52,
21634 }, { /* nearly same as previous, but should fail */
21635 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21636 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21637 "\x22\x43\x3c\x64",
21638 .klen = 20,
21639 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021640 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21641 "\x00\x00\x00\x00\x00\x00\x00\x00",
21642 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021643 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21644 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21645 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21646 "\x02\x00\x07\x00\x61\x62\x63\x64"
21647 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21648 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21649 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21650 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21651 "\x00\x00\x00\x00",
21652 .ilen = 68,
21653 .novrfy = 1,
21654 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21655 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21656 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21657 "\x02\x00\x07\x00\x61\x62\x63\x64"
21658 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21659 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21660 "\x01\x02\x02\x01",
21661 .rlen = 52,
21662 },
21663};
21664
Herbert Xuda7f0332008-07-31 17:08:25 +080021665static struct aead_testvec aes_ccm_enc_tv_template[] = {
21666 { /* From RFC 3610 */
21667 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21668 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21669 .klen = 16,
21670 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21671 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21672 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21673 .alen = 8,
21674 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21675 "\x10\x11\x12\x13\x14\x15\x16\x17"
21676 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21677 .ilen = 23,
21678 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21679 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21680 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21681 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21682 .rlen = 31,
21683 }, {
21684 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21685 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21686 .klen = 16,
21687 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
21688 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21689 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21690 "\x08\x09\x0a\x0b",
21691 .alen = 12,
21692 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21693 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21694 "\x1c\x1d\x1e\x1f",
21695 .ilen = 20,
21696 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21697 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21698 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21699 "\x7d\x9c\x2d\x93",
21700 .rlen = 28,
21701 }, {
21702 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21703 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21704 .klen = 16,
21705 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21706 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21707 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21708 .alen = 8,
21709 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21710 "\x10\x11\x12\x13\x14\x15\x16\x17"
21711 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21712 "\x20",
21713 .ilen = 25,
21714 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21715 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21716 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21717 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21718 "\x7e\x5f\x4e",
21719 .rlen = 35,
21720 }, {
21721 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21722 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21723 .klen = 16,
21724 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21725 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21726 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21727 "\x08\x09\x0a\x0b",
21728 .alen = 12,
21729 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21730 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21731 "\x1c\x1d\x1e",
21732 .ilen = 19,
21733 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
21734 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21735 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21736 "\x4d\x99\x99\x88\xdd",
21737 .rlen = 29,
21738 }, {
21739 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21740 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21741 .klen = 16,
21742 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21743 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21744 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21745 .alen = 8,
21746 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21747 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21748 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21749 .ilen = 24,
21750 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21751 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21752 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21753 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21754 .rlen = 32,
21755 }, {
21756 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21757 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21758 .klen = 16,
21759 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21760 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21761 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21762 "\x20\xea\x60\xc0",
21763 .alen = 12,
21764 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21765 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21766 "\x3a\x80\x3b\xa8\x7f",
21767 .ilen = 21,
21768 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21769 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21770 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21771 "\x5a\xe0\x70\x45\x51",
21772 .rlen = 29,
21773 }, {
21774 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21775 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21776 .klen = 16,
21777 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21778 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21779 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21780 .alen = 8,
21781 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21782 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21783 "\x98\x09\xd6\x7d\xbe\xdd\x18",
21784 .ilen = 23,
21785 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21786 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21787 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21788 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21789 "\xba",
21790 .rlen = 33,
Ard Biesheuvel45859882014-04-16 20:40:04 +080021791 }, {
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080021792 /* This is taken from FIPS CAVS. */
Ard Biesheuvel45859882014-04-16 20:40:04 +080021793 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
21794 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e",
21795 .klen = 16,
21796 .iv = "\x03\x96\xac\x59\x30\x07\xa1\xe2\xa2\xc7\x55\x24\0\0\0\0",
21797 .alen = 0,
21798 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
21799 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
21800 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
21801 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
21802 .ilen = 32,
21803 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
21804 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
21805 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
21806 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
21807 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
21808 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
21809 .rlen = 48,
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080021810 }, {
21811 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
21812 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3",
21813 .klen = 16,
21814 .iv = "\x03\x4f\xa3\x19\xd3\x01\x5a\xd8"
21815 "\x30\x60\x15\x56\x00\x00\x00\x00",
21816 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
21817 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
21818 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
21819 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
21820 .alen = 32,
21821 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
21822 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
21823 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
21824 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
21825 .ilen = 32,
21826 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
21827 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
21828 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
21829 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
21830 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
21831 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
21832 .rlen = 48,
21833 }, {
21834 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
21835 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
21836 "\x53\x14\x73\x66\x8d\x88\xf6\x80",
21837 .klen = 24,
21838 .iv = "\x03\xa0\x20\x35\x26\xf2\x21\x8d"
21839 "\x50\x20\xda\xe2\x00\x00\x00\x00",
21840 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
21841 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
21842 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
21843 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
21844 .alen = 32,
21845 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
21846 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
21847 .rlen = 16,
21848 }, {
21849 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
21850 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
21851 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01",
21852 .klen = 24,
21853 .iv = "\x03\xd6\x3c\x8c\x86\x84\xb6\xcd"
21854 "\xef\x09\x2e\x94\x00\x00\x00\x00",
21855 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
21856 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
21857 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
21858 "\xe3\x00\x73\x69\x84\x69\x87\x79",
21859 .alen = 32,
21860 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
21861 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
21862 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
21863 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
21864 .ilen = 32,
21865 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
21866 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
21867 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
21868 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
21869 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
21870 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
21871 .rlen = 48,
21872 }, {
21873 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
21874 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
21875 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
21876 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b",
21877 .klen = 32,
21878 .iv = "\x03\x1e\x29\x91\xad\x8e\xc1\x53"
21879 "\x0a\xcf\x2d\xbe\x00\x00\x00\x00",
21880 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
21881 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
21882 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
21883 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
21884 .alen = 32,
21885 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
21886 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
21887 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
21888 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
21889 .ilen = 32,
21890 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
21891 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
21892 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
21893 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
21894 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
21895 .rlen = 40,
21896 }, {
21897 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
21898 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
21899 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
21900 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39",
21901 .klen = 32,
21902 .iv = "\x03\xf9\xd9\x4e\x63\xb5\x3d\x9d"
21903 "\x43\xf6\x1e\x50",
21904 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
21905 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
21906 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
21907 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
21908 .alen = 32,
21909 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
21910 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
21911 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
21912 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
21913 .ilen = 32,
21914 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
21915 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
21916 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
21917 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
21918 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
21919 "\x7b\x72\x8a\xf7",
21920 .rlen = 44,
21921 }, {
21922 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
21923 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
21924 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
21925 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b",
21926 .klen = 32,
21927 .iv = "\x03\x24\xa7\x8b\x07\xcb\xcc\x0e"
21928 "\xe6\x33\xbf\xf5\x00\x00\x00\x00",
21929 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
21930 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
21931 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
21932 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
21933 .alen = 32,
21934 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
21935 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
21936 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
21937 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
21938 .ilen = 32,
21939 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
21940 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
21941 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
21942 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
21943 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
21944 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
21945 .rlen = 48,
Ard Biesheuvel45859882014-04-16 20:40:04 +080021946 }
Herbert Xuda7f0332008-07-31 17:08:25 +080021947};
21948
21949static struct aead_testvec aes_ccm_dec_tv_template[] = {
21950 { /* From RFC 3610 */
21951 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21952 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21953 .klen = 16,
21954 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21955 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21956 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21957 .alen = 8,
21958 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21959 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21960 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21961 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21962 .ilen = 31,
21963 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21964 "\x10\x11\x12\x13\x14\x15\x16\x17"
21965 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21966 .rlen = 23,
21967 }, {
21968 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21969 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21970 .klen = 16,
21971 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
21972 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21973 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21974 "\x08\x09\x0a\x0b",
21975 .alen = 12,
21976 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21977 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21978 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21979 "\x7d\x9c\x2d\x93",
21980 .ilen = 28,
21981 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21982 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21983 "\x1c\x1d\x1e\x1f",
21984 .rlen = 20,
21985 }, {
21986 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21987 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21988 .klen = 16,
21989 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21990 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21991 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21992 .alen = 8,
21993 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21994 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21995 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21996 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21997 "\x7e\x5f\x4e",
21998 .ilen = 35,
21999 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22000 "\x10\x11\x12\x13\x14\x15\x16\x17"
22001 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
22002 "\x20",
22003 .rlen = 25,
22004 }, {
22005 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22006 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
22007 .klen = 16,
22008 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
22009 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
22010 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
22011 "\x08\x09\x0a\x0b",
22012 .alen = 12,
22013 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
22014 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
22015 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
22016 "\x4d\x99\x99\x88\xdd",
22017 .ilen = 29,
22018 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
22019 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
22020 "\x1c\x1d\x1e",
22021 .rlen = 19,
22022 }, {
22023 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
22024 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
22025 .klen = 16,
22026 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
22027 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
22028 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
22029 .alen = 8,
22030 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
22031 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
22032 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
22033 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
22034 .ilen = 32,
22035 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
22036 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
22037 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
22038 .rlen = 24,
22039 }, {
22040 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
22041 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
22042 .klen = 16,
22043 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
22044 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
22045 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
22046 "\x20\xea\x60\xc0",
22047 .alen = 12,
22048 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
22049 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
22050 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
22051 "\x5a\xe0\x70\x45\x51",
22052 .ilen = 29,
22053 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
22054 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
22055 "\x3a\x80\x3b\xa8\x7f",
22056 .rlen = 21,
22057 }, {
22058 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
22059 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
22060 .klen = 16,
22061 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
22062 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
22063 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
22064 .alen = 8,
22065 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
22066 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
22067 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
22068 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
22069 "\xba",
22070 .ilen = 33,
22071 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
22072 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
22073 "\x98\x09\xd6\x7d\xbe\xdd\x18",
22074 .rlen = 23,
Jarod Wilson5d667322009-05-04 19:23:40 +080022075 }, {
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022076 /* This is taken from FIPS CAVS. */
Jarod Wilson5d667322009-05-04 19:23:40 +080022077 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022078 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9",
22079 .klen = 16,
22080 .iv = "\x03\xc6\xfb\x7d\x80\x0d\x13\xab"
22081 "\xd8\xa6\xb2\xd8\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022082 .alen = 0,
22083 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
22084 .ilen = 8,
22085 .result = "\x00",
22086 .rlen = 0,
22087 .novrfy = 1,
22088 }, {
22089 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022090 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9",
22091 .klen = 16,
22092 .iv = "\x03\xaf\x94\x87\x78\x35\x82\x81"
22093 "\x7f\x88\x94\x68\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022094 .alen = 0,
22095 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
22096 .ilen = 8,
22097 .result = "\x00",
22098 .rlen = 0,
22099 }, {
22100 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022101 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8",
22102 .klen = 16,
22103 .iv = "\x03\xc6\xfb\x7d\x80\x0d\x13\xab"
22104 "\xd8\xa6\xb2\xd8\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022105 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
22106 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
22107 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
22108 "\xd8\x94\x99\x91\x81\x54\x62\x57",
22109 .alen = 32,
22110 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
22111 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
22112 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
22113 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
22114 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
22115 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
22116 .ilen = 48,
22117 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
22118 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
22119 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
22120 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
22121 .rlen = 32,
22122 .novrfy = 1,
22123 }, {
22124 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022125 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8",
22126 .klen = 16,
22127 .iv = "\x03\x05\xe0\xc9\x0f\xed\x34\xea"
22128 "\x97\xd4\x3b\xdf\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022129 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
22130 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
22131 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
22132 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
22133 .alen = 32,
22134 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
22135 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
22136 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
22137 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
22138 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
22139 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
22140 .ilen = 48,
22141 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
22142 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
22143 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
22144 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
22145 .rlen = 32,
22146 }, {
22147 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
22148 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022149 "\xa4\x48\x93\x39\x26\x71\x4a\xc6",
22150 .klen = 24,
22151 .iv = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22152 "\x57\xba\xfd\x9e\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022153 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
22154 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
22155 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
22156 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
22157 .alen = 32,
22158 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
22159 .ilen = 8,
22160 .result = "\x00",
22161 .rlen = 0,
22162 }, {
22163 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22164 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022165 "\x29\xa0\xba\x9e\x48\x78\xd1\xba",
22166 .klen = 24,
22167 .iv = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22168 "\x57\xba\xfd\x9e\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022169 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
22170 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
22171 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
22172 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
22173 .alen = 32,
22174 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
22175 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
22176 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
22177 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
22178 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
22179 .ilen = 40,
22180 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
22181 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
22182 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
22183 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
22184 .rlen = 32,
22185 }, {
22186 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22187 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022188 "\x29\xa0\xba\x9e\x48\x78\xd1\xba",
22189 .klen = 24,
22190 .iv = "\x03\xd1\xfc\x57\x9c\xfe\xb8\x9c"
22191 "\xad\x71\xaa\x1f\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022192 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
22193 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
22194 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
22195 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
22196 .alen = 32,
22197 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
22198 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
22199 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
22200 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
22201 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
22202 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
22203 .ilen = 48,
22204 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
22205 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
22206 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
22207 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
22208 .rlen = 32,
22209 .novrfy = 1,
22210 }, {
22211 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
22212 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
22213 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022214 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff",
22215 .klen = 32,
22216 .iv = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22217 "\x57\xba\xfd\x9e\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022218 .alen = 0,
22219 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
22220 .ilen = 8,
22221 .result = "\x00",
22222 .rlen = 0,
22223 }, {
22224 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
22225 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
22226 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022227 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb",
22228 .klen = 32,
22229 .iv = "\x03\x85\x34\x66\x42\xc8\x92\x0f"
22230 "\x36\x58\xe0\x6b\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022231 .alen = 0,
22232 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
22233 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
22234 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
22235 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
22236 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
22237 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
22238 .ilen = 48,
22239 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
22240 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
22241 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
22242 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
22243 .rlen = 32,
22244 .novrfy = 1,
22245 }, {
22246 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22247 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
22248 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022249 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b",
22250 .klen = 32,
22251 .iv = "\x03\xcf\x76\x3f\xd9\x95\x75\x8f"
22252 "\x44\x89\x40\x7b\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022253 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
22254 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
22255 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
22256 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
22257 .alen = 32,
22258 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
22259 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
22260 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
22261 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
22262 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
22263 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
22264 .ilen = 48,
22265 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
22266 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
22267 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
22268 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
22269 .rlen = 32,
22270 },
22271};
22272
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080022273/*
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022274 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
22275 * use a 13-byte nonce, we only support an 11-byte nonce. Worse,
22276 * they use AD lengths which are not valid ESP header lengths.
22277 *
22278 * These vectors are copied/generated from the ones for rfc4106 with
22279 * the key truncated by one byte..
22280 */
22281static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
22282 { /* Generated using Crypto++ */
22283 .key = zeroed_string,
22284 .klen = 19,
22285 .iv = zeroed_string,
22286 .input = zeroed_string,
22287 .ilen = 16,
22288 .assoc = zeroed_string,
22289 .alen = 16,
22290 .result = "\x2E\x9A\xCA\x6B\xDA\x54\xFC\x6F"
22291 "\x12\x50\xE8\xDE\x81\x3C\x63\x08"
22292 "\x1A\x22\xBA\x75\xEE\xD4\xD5\xB5"
22293 "\x27\x50\x01\xAC\x03\x33\x39\xFB",
22294 .rlen = 32,
22295 },{
22296 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22297 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22298 "\x00\x00\x00",
22299 .klen = 19,
22300 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22301 .input = zeroed_string,
22302 .ilen = 16,
22303 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
22304 "\x00\x00\x00\x00\x00\x00\x00\x01",
22305 .alen = 16,
22306 .result = "\xCF\xB9\x99\x17\xC8\x86\x0E\x7F"
22307 "\x7E\x76\xF8\xE6\xF8\xCC\x1F\x17"
22308 "\x6A\xE0\x53\x9F\x4B\x73\x7E\xDA"
22309 "\x08\x09\x4E\xC4\x1E\xAD\xC6\xB0",
22310 .rlen = 32,
22311
22312 }, {
22313 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22314 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22315 "\x00\x00\x00",
22316 .klen = 19,
22317 .iv = zeroed_string,
22318 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22319 "\x01\x01\x01\x01\x01\x01\x01\x01",
22320 .ilen = 16,
22321 .assoc = zeroed_string,
22322 .alen = 16,
22323 .result = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22324 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22325 "\xA1\xE2\xC2\x42\x2B\x81\x70\x40"
22326 "\xFD\x7F\x76\xD1\x03\x07\xBB\x0C",
22327 .rlen = 32,
22328 }, {
22329 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22330 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22331 "\x00\x00\x00",
22332 .klen = 19,
22333 .iv = zeroed_string,
22334 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22335 "\x01\x01\x01\x01\x01\x01\x01\x01",
22336 .ilen = 16,
22337 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22338 "\x00\x00\x00\x00\x00\x00\x00\x00",
22339 .alen = 16,
22340 .result = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22341 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22342 "\x5B\xC0\x73\xE0\x2B\x73\x68\xC9"
22343 "\x2D\x8C\x58\xC2\x90\x3D\xB0\x3E",
22344 .rlen = 32,
22345 }, {
22346 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22347 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22348 "\x00\x00\x00",
22349 .klen = 19,
22350 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22351 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22352 "\x01\x01\x01\x01\x01\x01\x01\x01",
22353 .ilen = 16,
22354 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22355 "\x00\x00\x00\x00\x00\x00\x00\x01",
22356 .alen = 16,
22357 .result = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22358 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22359 "\x43\x8E\x76\x57\x3B\xB4\x05\xE8"
22360 "\xA9\x9B\xBF\x25\xE0\x4F\xC0\xED",
22361 .rlen = 32,
22362 }, {
22363 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22364 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22365 "\x00\x00\x00",
22366 .klen = 19,
22367 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22368 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22369 "\x01\x01\x01\x01\x01\x01\x01\x01"
22370 "\x01\x01\x01\x01\x01\x01\x01\x01"
22371 "\x01\x01\x01\x01\x01\x01\x01\x01"
22372 "\x01\x01\x01\x01\x01\x01\x01\x01"
22373 "\x01\x01\x01\x01\x01\x01\x01\x01"
22374 "\x01\x01\x01\x01\x01\x01\x01\x01"
22375 "\x01\x01\x01\x01\x01\x01\x01\x01",
22376 .ilen = 64,
22377 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22378 "\x00\x00\x00\x00\x00\x00\x00\x01",
22379 .alen = 16,
22380 .result = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22381 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22382 "\x9C\xA4\x97\x83\x3F\x01\xA5\xF4"
22383 "\x43\x09\xE7\xB8\xE9\xD1\xD7\x02"
22384 "\x9B\xAB\x39\x18\xEB\x94\x34\x36"
22385 "\xE6\xC5\xC8\x9B\x00\x81\x9E\x49"
22386 "\x1D\x78\xE1\x48\xE3\xE9\xEA\x8E"
22387 "\x3A\x2B\x67\x5D\x35\x6A\x0F\xDB"
22388 "\x02\x73\xDD\xE7\x30\x4A\x30\x54"
22389 "\x1A\x9D\x09\xCA\xC8\x1C\x32\x5F",
22390 .rlen = 80,
22391 }, {
22392 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
22393 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22394 "\x00\x00\x00",
22395 .klen = 19,
22396 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
22397 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
22398 "\xff\xff\xff\xff\xff\xff\xff\xff"
22399 "\xff\xff\xff\xff\xff\xff\xff\xff"
22400 "\xff\xff\xff\xff\xff\xff\xff\xff"
22401 "\xff\xff\xff\xff\xff\xff\xff\xff"
22402 "\xff\xff\xff\xff\xff\xff\xff\xff"
22403 "\xff\xff\xff\xff\xff\xff\xff\xff"
22404 "\xff\xff\xff\xff\xff\xff\xff\xff"
22405 "\xff\xff\xff\xff\xff\xff\xff\xff"
22406 "\xff\xff\xff\xff\xff\xff\xff\xff"
22407 "\xff\xff\xff\xff\xff\xff\xff\xff"
22408 "\xff\xff\xff\xff\xff\xff\xff\xff"
22409 "\xff\xff\xff\xff\xff\xff\xff\xff"
22410 "\xff\xff\xff\xff\xff\xff\xff\xff"
22411 "\xff\xff\xff\xff\xff\xff\xff\xff"
22412 "\xff\xff\xff\xff\xff\xff\xff\xff"
22413 "\xff\xff\xff\xff\xff\xff\xff\xff"
22414 "\xff\xff\xff\xff\xff\xff\xff\xff"
22415 "\xff\xff\xff\xff\xff\xff\xff\xff"
22416 "\xff\xff\xff\xff\xff\xff\xff\xff"
22417 "\xff\xff\xff\xff\xff\xff\xff\xff"
22418 "\xff\xff\xff\xff\xff\xff\xff\xff"
22419 "\xff\xff\xff\xff\xff\xff\xff\xff"
22420 "\xff\xff\xff\xff\xff\xff\xff\xff",
22421 .ilen = 192,
22422 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
22423 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
22424 "\x89\xab\xcd\xef",
22425 .alen = 20,
22426 .result = "\x64\x17\xDC\x24\x9D\x92\xBA\x5E"
22427 "\x7C\x64\x6D\x33\x46\x77\xAC\xB1"
22428 "\x5C\x9E\xE2\xC7\x27\x11\x3E\x95"
22429 "\x7D\xBE\x28\xC8\xC1\xCA\x5E\x8C"
22430 "\xB4\xE2\xDE\x9F\x53\x59\x26\xDB"
22431 "\x0C\xD4\xE4\x07\x9A\xE6\x3E\x01"
22432 "\x58\x0D\x3E\x3D\xD5\x21\xEB\x04"
22433 "\x06\x9D\x5F\xB9\x02\x49\x1A\x2B"
22434 "\xBA\xF0\x4E\x3B\x85\x50\x5B\x09"
22435 "\xFE\xEC\xFC\x54\xEC\x0C\xE2\x79"
22436 "\x8A\x2F\x5F\xD7\x05\x5D\xF1\x6D"
22437 "\x22\xEB\xD1\x09\x80\x3F\x5A\x70"
22438 "\xB2\xB9\xD3\x63\x99\xC2\x4D\x1B"
22439 "\x36\x12\x00\x89\xAA\x5D\x55\xDA"
22440 "\x1D\x5B\xD8\x3C\x5F\x09\xD2\xE6"
22441 "\x39\x41\x5C\xF0\xBE\x26\x4E\x5F"
22442 "\x2B\x50\x44\x52\xC2\x10\x7D\x38"
22443 "\x82\x64\x83\x0C\xAE\x49\xD0\xE5"
22444 "\x4F\xE5\x66\x4C\x58\x7A\xEE\x43"
22445 "\x3B\x51\xFE\xBA\x24\x8A\xFE\xDC"
22446 "\x19\x6D\x60\x66\x61\xF9\x9A\x3F"
22447 "\x75\xFC\x38\x53\x5B\xB5\xCD\x52"
22448 "\x4F\xE5\xE4\xC9\xFE\x10\xCB\x98"
22449 "\xF0\x06\x5B\x07\xAB\xBB\xF4\x0E"
22450 "\x2D\xC2\xDD\x5D\xDD\x22\x9A\xCC"
22451 "\x39\xAB\x63\xA5\x3D\x9C\x51\x8A",
22452 .rlen = 208,
22453 }, { /* From draft-mcgrew-gcm-test-01 */
22454 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
22455 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
22456 "\x2E\x44\x3B",
22457 .klen = 19,
22458 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
22459 .input = "\x45\x00\x00\x48\x69\x9A\x00\x00"
22460 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
22461 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
22462 "\x38\xD3\x01\x00\x00\x01\x00\x00"
22463 "\x00\x00\x00\x00\x04\x5F\x73\x69"
22464 "\x70\x04\x5F\x75\x64\x70\x03\x73"
22465 "\x69\x70\x09\x63\x79\x62\x65\x72"
22466 "\x63\x69\x74\x79\x02\x64\x6B\x00"
22467 "\x00\x21\x00\x01\x01\x02\x02\x01",
22468 .ilen = 72,
22469 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
22470 "\x00\x00\x00\x00\x49\x56\xED\x7E"
22471 "\x3B\x24\x4C\xFE",
22472 .alen = 20,
22473 .result = "\x89\xBA\x3E\xEF\xE6\xD6\xCF\xDB"
22474 "\x83\x60\xF5\xBA\x3A\x56\x79\xE6"
22475 "\x7E\x0C\x53\xCF\x9E\x87\xE0\x4E"
22476 "\x1A\x26\x01\x24\xC7\x2E\x3D\xBF"
22477 "\x29\x2C\x91\xC1\xB8\xA8\xCF\xE0"
22478 "\x39\xF8\x53\x6D\x31\x22\x2B\xBF"
22479 "\x98\x81\xFC\x34\xEE\x85\x36\xCD"
22480 "\x26\xDB\x6C\x7A\x0C\x77\x8A\x35"
22481 "\x18\x85\x54\xB2\xBC\xDD\x3F\x43"
22482 "\x61\x06\x8A\xDF\x86\x3F\xB4\xAC"
22483 "\x97\xDC\xBD\xFD\x92\x10\xC5\xFF",
22484 .rlen = 88,
22485 }, {
22486 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22487 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
22488 "\xCA\xFE\xBA",
22489 .klen = 19,
22490 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22491 .input = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
22492 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
22493 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
22494 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
22495 "\x00\x01\x00\x00\x00\x00\x00\x00"
22496 "\x03\x73\x69\x70\x09\x63\x79\x62"
22497 "\x65\x72\x63\x69\x74\x79\x02\x64"
22498 "\x6B\x00\x00\x01\x00\x01\x00\x01",
22499 .ilen = 64,
22500 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
22501 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22502 .alen = 16,
22503 .result = "\x4B\xC2\x70\x60\x64\xD2\xF3\xC8"
22504 "\xE5\x26\x8A\xDE\xB8\x7E\x7D\x16"
22505 "\x56\xC7\xD2\x88\xBA\x8D\x58\xAF"
22506 "\xF5\x71\xB6\x37\x84\xA7\xB1\x99"
22507 "\x51\x5C\x0D\xA0\x27\xDE\xE7\x2D"
22508 "\xEF\x25\x88\x1F\x1D\x77\x11\xFF"
22509 "\xDB\xED\xEE\x56\x16\xC5\x5C\x9B"
22510 "\x00\x62\x1F\x68\x4E\x7C\xA0\x97"
22511 "\x10\x72\x7E\x53\x13\x3B\x68\xE4"
22512 "\x30\x99\x91\x79\x09\xEA\xFF\x6A",
22513 .rlen = 80,
22514 }, {
22515 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22516 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22517 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22518 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22519 "\x11\x22\x33",
22520 .klen = 35,
22521 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
22522 .input = "\x45\x00\x00\x30\x69\xA6\x40\x00"
22523 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
22524 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
22525 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
22526 "\x70\x02\x40\x00\x20\xBF\x00\x00"
22527 "\x02\x04\x05\xB4\x01\x01\x04\x02"
22528 "\x01\x02\x02\x01",
22529 .ilen = 52,
22530 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
22531 "\x01\x02\x03\x04\x05\x06\x07\x08",
22532 .alen = 16,
22533 .result = "\xD6\x31\x0D\x2B\x3D\x6F\xBD\x2F"
22534 "\x58\x41\x7E\xFF\x9A\x9E\x09\xB4"
22535 "\x1A\xF7\xF6\x42\x31\xCD\xBF\xAD"
22536 "\x27\x0E\x2C\xF2\xDB\x10\xDF\x55"
22537 "\x8F\x0D\xD7\xAC\x23\xBD\x42\x10"
22538 "\xD0\xB2\xAF\xD8\x37\xAC\x6B\x0B"
22539 "\x11\xD4\x0B\x12\xEC\xB4\xB1\x92"
22540 "\x23\xA6\x10\xB0\x26\xD6\xD9\x26"
22541 "\x5A\x48\x6A\x3E",
22542 .rlen = 68,
22543 }, {
22544 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
22545 "\x00\x00\x00\x00\x00\x00\x00\x00"
22546 "\x00\x00\x00",
22547 .klen = 19,
22548 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
22549 .input = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
22550 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
22551 "\x01\x01\x01\x01\x08\x00\x07\x5C"
22552 "\x02\x00\x44\x00\x61\x62\x63\x64"
22553 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22554 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22555 "\x75\x76\x77\x61\x62\x63\x64\x65"
22556 "\x66\x67\x68\x69\x01\x02\x02\x01",
22557 .ilen = 64,
22558 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
22559 "\x00\x00\x00\x00\x00\x00\x00\x00",
22560 .alen = 16,
22561 .result = "\x6B\x9A\xCA\x57\x43\x91\xFC\x6F"
22562 "\x92\x51\x23\xA4\xC1\x5B\xF0\x10"
22563 "\xF3\x13\xF4\xF8\xA1\x9A\xB4\xDC"
22564 "\x89\xC8\xF8\x42\x62\x95\xB7\xCB"
22565 "\xB8\xF5\x0F\x1B\x2E\x94\xA2\xA7"
22566 "\xBF\xFB\x8A\x92\x13\x63\xD1\x3C"
22567 "\x08\xF5\xE8\xA6\xAA\xF6\x34\xF9"
22568 "\x42\x05\xAF\xB3\xE7\x9A\xFC\xEE"
22569 "\x36\x25\xC1\x10\x12\x1C\xCA\x82"
22570 "\xEA\xE6\x63\x5A\x57\x28\xA9\x9A",
22571 .rlen = 80,
22572 }, {
22573 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22574 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22575 "\x57\x69\x0E",
22576 .klen = 19,
22577 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22578 .input = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
22579 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
22580 "\x01\x01\x01\x01\x08\x00\x08\x5C"
22581 "\x02\x00\x43\x00\x61\x62\x63\x64"
22582 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22583 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22584 "\x75\x76\x77\x61\x62\x63\x64\x65"
22585 "\x66\x67\x68\x69\x01\x02\x02\x01",
22586 .ilen = 64,
22587 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22588 "\x10\x10\x10\x10\x4E\x28\x00\x00"
22589 "\xA2\xFC\xA1\xA3",
22590 .alen = 20,
22591 .result = "\x6A\x6B\x45\x2B\x7C\x67\x52\xF6"
22592 "\x10\x60\x40\x62\x6B\x4F\x97\x8E"
22593 "\x0B\xB2\x22\x97\xCB\x21\xE0\x90"
22594 "\xA2\xE7\xD1\x41\x30\xE4\x4B\x1B"
22595 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
22596 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
22597 "\x30\xB8\xE5\xDF\xD7\x12\x56\x75"
22598 "\xD0\x95\xB7\xB8\x91\x42\xF7\xFD"
22599 "\x97\x57\xCA\xC1\x20\xD0\x86\xB9"
22600 "\x66\x9D\xB4\x2B\x96\x22\xAC\x67",
22601 .rlen = 80,
22602 }, {
22603 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22604 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22605 "\x57\x69\x0E",
22606 .klen = 19,
22607 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22608 .input = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
22609 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
22610 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
22611 "\x01\x02\x02\x01",
22612 .ilen = 28,
22613 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22614 "\x10\x10\x10\x10\x4E\x28\x00\x00"
22615 "\xA2\xFC\xA1\xA3",
22616 .alen = 20,
22617 .result = "\x6A\x6B\x45\x0B\xA7\x06\x52\xF6"
22618 "\x10\x60\xCF\x01\x6B\x4F\x97\x20"
22619 "\xEA\xB3\x23\x94\xC9\x21\x1D\x33"
22620 "\xA1\xE5\x90\x40\x05\x37\x45\x70"
22621 "\xB5\xD6\x09\x0A\x23\x73\x33\xF9"
22622 "\x08\xB4\x22\xE4",
22623 .rlen = 44,
22624 }, {
22625 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22626 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
22627 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22628 "\xCA\xFE\xBA",
22629 .klen = 27,
22630 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22631 .input = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
22632 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
22633 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
22634 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
22635 "\x50\x10\x16\xD0\x75\x68\x00\x01",
22636 .ilen = 40,
22637 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
22638 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22639 .alen = 16,
22640 .result = "\x05\x22\x15\xD1\x52\x56\x85\x04"
22641 "\xA8\x5C\x5D\x6D\x7E\x6E\xF5\xFA"
22642 "\xEA\x16\x37\x50\xF3\xDF\x84\x3B"
22643 "\x2F\x32\x18\x57\x34\x2A\x8C\x23"
22644 "\x67\xDF\x6D\x35\x7B\x54\x0D\xFB"
22645 "\x34\xA5\x9F\x6C\x48\x30\x1E\x22"
22646 "\xFE\xB1\x22\x17\x17\x8A\xB9\x5B",
22647 .rlen = 56,
22648 }, {
22649 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22650 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22651 "\xDE\xCA\xF8",
22652 .klen = 19,
22653 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
22654 .input = "\x45\x00\x00\x49\x33\xBA\x00\x00"
22655 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
22656 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
22657 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
22658 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
22659 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
22660 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
22661 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
22662 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
22663 "\x23\x01\x01\x01",
22664 .ilen = 76,
22665 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
22666 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
22667 "\xCE\xFA\xCE\x74",
22668 .alen = 20,
22669 .result = "\x92\xD0\x53\x79\x33\x38\xD5\xF3"
22670 "\x7D\xE4\x7A\x8E\x86\x03\xC9\x90"
22671 "\x96\x35\xAB\x9C\xFB\xE8\xA3\x76"
22672 "\xE9\xE9\xE2\xD1\x2E\x11\x0E\x00"
22673 "\xFA\xCE\xB5\x9E\x02\xA7\x7B\xEA"
22674 "\x71\x9A\x58\xFB\xA5\x8A\xE1\xB7"
22675 "\x9C\x39\x9D\xE3\xB5\x6E\x69\xE6"
22676 "\x63\xC9\xDB\x05\x69\x51\x12\xAD"
22677 "\x3E\x00\x32\x73\x86\xF2\xEE\xF5"
22678 "\x0F\xE8\x81\x7E\x84\xD3\xC0\x0D"
22679 "\x76\xD6\x55\xC6\xB4\xC2\x34\xC7"
22680 "\x12\x25\x0B\xF9",
22681 .rlen = 92,
22682 }, {
22683 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22684 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22685 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22686 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22687 "\x73\x61\x6C",
22688 .klen = 35,
22689 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
22690 .input = "\x45\x08\x00\x28\x73\x2C\x00\x00"
22691 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
22692 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
22693 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
22694 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
22695 .ilen = 40,
22696 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
22697 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
22698 "\x69\x76\x65\x63",
22699 .alen = 20,
22700 .result = "\xCC\x74\xB7\xD3\xB0\x38\x50\x42"
22701 "\x2C\x64\x87\x46\x1E\x34\x10\x05"
22702 "\x29\x6B\xBB\x36\xE9\x69\xAD\x92"
22703 "\x82\xA1\x10\x6A\xEB\x0F\xDC\x7D"
22704 "\x08\xBA\xF3\x91\xCA\xAA\x61\xDA"
22705 "\x62\xF4\x14\x61\x5C\x9D\xB5\xA7"
22706 "\xEE\xD7\xB9\x7E\x87\x99\x9B\x7D",
22707 .rlen = 56,
22708 }, {
22709 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22710 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22711 "\x57\x69\x0E",
22712 .klen = 19,
22713 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22714 .input = "\x45\x00\x00\x49\x33\x3E\x00\x00"
22715 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
22716 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
22717 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
22718 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
22719 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
22720 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
22721 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
22722 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
22723 "\x15\x01\x01\x01",
22724 .ilen = 76,
22725 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22726 "\x10\x10\x10\x10\x4E\x28\x00\x00"
22727 "\xA2\xFC\xA1\xA3",
22728 .alen = 20,
22729 .result = "\x6A\x6B\x45\x5E\xD6\x9A\x52\xF6"
22730 "\xEF\x70\x1A\x9C\xE8\xD3\x19\x86"
22731 "\xC8\x02\xF0\xB0\x03\x09\xD9\x02"
22732 "\xA0\xD2\x59\x04\xD1\x85\x2A\x24"
22733 "\x1C\x67\x3E\xD8\x68\x72\x06\x94"
22734 "\x97\xBA\x4F\x76\x8D\xB0\x44\x5B"
22735 "\x69\xBF\xD5\xE2\x3D\xF1\x0B\x0C"
22736 "\xC0\xBF\xB1\x8F\x70\x09\x9E\xCE"
22737 "\xA5\xF2\x55\x58\x84\xFA\xF9\xB5"
22738 "\x23\xF4\x84\x40\x74\x14\x8A\x6B"
22739 "\xDB\xD7\x67\xED\xA4\x93\xF3\x47"
22740 "\xCC\xF7\x46\x6F",
22741 .rlen = 92,
22742 }, {
22743 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22744 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22745 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22746 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22747 "\x73\x61\x6C",
22748 .klen = 35,
22749 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
22750 .input = "\x63\x69\x73\x63\x6F\x01\x72\x75"
22751 "\x6C\x65\x73\x01\x74\x68\x65\x01"
22752 "\x6E\x65\x74\x77\x65\x01\x64\x65"
22753 "\x66\x69\x6E\x65\x01\x74\x68\x65"
22754 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
22755 "\x67\x69\x65\x73\x01\x74\x68\x61"
22756 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
22757 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
22758 "\x72\x72\x6F\x77\x01\x02\x02\x01",
22759 .ilen = 72,
22760 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
22761 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
22762 "\x69\x76\x65\x63",
22763 .alen = 20,
22764 .result = "\xEA\x15\xC4\x98\xAC\x15\x22\x37"
22765 "\x00\x07\x1D\xBE\x60\x5D\x73\x16"
22766 "\x4D\x0F\xCC\xCE\x8A\xD0\x49\xD4"
22767 "\x39\xA3\xD1\xB1\x21\x0A\x92\x1A"
22768 "\x2C\xCF\x8F\x9D\xC9\x91\x0D\xB4"
22769 "\x15\xFC\xBC\xA5\xC5\xBF\x54\xE5"
22770 "\x1C\xC7\x32\x41\x07\x7B\x2C\xB6"
22771 "\x5C\x23\x7C\x93\xEA\xEF\x23\x1C"
22772 "\x73\xF4\xE7\x12\x84\x4C\x37\x0A"
22773 "\x4A\x8F\x06\x37\x48\xF9\xF9\x05"
22774 "\x55\x13\x40\xC3\xD5\x55\x3A\x3D",
22775 .rlen = 88,
22776 }, {
22777 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
22778 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
22779 "\xD9\x66\x42",
22780 .klen = 19,
22781 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
22782 .input = "\x01\x02\x02\x01",
22783 .ilen = 4,
22784 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
22785 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
22786 .alen = 16,
22787 .result = "\x4C\x72\x63\x30\x2F\xE6\x56\xDD"
22788 "\xD0\xD8\x60\x9D\x8B\xEF\x85\x90"
22789 "\xF7\x61\x24\x62",
22790 .rlen = 20,
22791 }, {
22792 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22793 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22794 "\xDE\xCA\xF8",
22795 .klen = 19,
22796 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
22797 .input = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
22798 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
22799 "\x62\x65\x00\x01",
22800 .ilen = 20,
22801 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
22802 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
22803 "\xCE\xFA\xCE\x74",
22804 .alen = 20,
22805 .result = "\xA3\xBF\x52\x52\x65\x83\xBA\x81"
22806 "\x03\x9B\x84\xFC\x44\x8C\xBB\x81"
22807 "\x36\xE1\x78\xBB\xA5\x49\x3A\xD0"
22808 "\xF0\x6B\x21\xAF\x98\xC0\x34\xDC"
22809 "\x17\x17\x65\xAD",
22810 .rlen = 36,
22811 }, {
22812 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
22813 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
22814 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
22815 "\x62\x65\x66\x6F\x72\x65\x69\x61"
22816 "\x74\x75\x72",
22817 .klen = 35,
22818 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
22819 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
22820 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
22821 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
22822 "\x02\x00\x07\x00\x61\x62\x63\x64"
22823 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22824 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22825 "\x01\x02\x02\x01",
22826 .ilen = 52,
22827 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
22828 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
22829 "\x67\x65\x74\x6D",
22830 .alen = 20,
22831 .result = "\x96\xFD\x86\xF8\xD1\x98\xFF\x10"
22832 "\xAB\x8C\xDA\x8A\x5A\x08\x38\x1A"
22833 "\x48\x59\x80\x18\x1A\x18\x1A\x04"
22834 "\xC9\x0D\xE3\xE7\x0E\xA4\x0B\x75"
22835 "\x92\x9C\x52\x5C\x0B\xFB\xF8\xAF"
22836 "\x16\xC3\x35\xA8\xE7\xCE\x84\x04"
22837 "\xEB\x40\x6B\x7A\x8E\x75\xBB\x42"
22838 "\xE0\x63\x4B\x21\x44\xA2\x2B\x2B"
22839 "\x39\xDB\xC8\xDC",
22840 .rlen = 68,
22841 }, {
22842 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22843 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22844 "\x57\x69\x0E",
22845 .klen = 19,
22846 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22847 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
22848 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
22849 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
22850 "\x02\x00\x07\x00\x61\x62\x63\x64"
22851 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22852 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22853 "\x01\x02\x02\x01",
22854 .ilen = 52,
22855 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
22856 "\x10\x10\x10\x10\x4E\x28\x00\x00"
22857 "\xA2\xFC\xA1\xA3",
22858 .alen = 20,
22859 .result = "\x6A\x6B\x45\x27\x3F\x9E\x52\xF6"
22860 "\x10\x60\x54\x25\xEB\x80\x04\x93"
22861 "\xCA\x1B\x23\x97\xCB\x21\x2E\x01"
22862 "\xA2\xE7\x95\x41\x30\xE4\x4B\x1B"
22863 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
22864 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
22865 "\x44\xCC\x90\xBF\x00\x94\x94\x92"
22866 "\x20\x17\x0C\x1B\x55\xDE\x7E\x68"
22867 "\xF4\x95\x5D\x4F",
22868 .rlen = 68,
22869 }, {
22870 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
22871 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
22872 "\x22\x43\x3C",
22873 .klen = 19,
22874 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
22875 .input = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
22876 "\x61\x62\x63\x64\x65\x66\x67\x68"
22877 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
22878 "\x71\x72\x73\x74\x01\x02\x02\x01",
22879 .ilen = 32,
22880 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
22881 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
22882 "\x3A\x23\x4B\xFD",
22883 .alen = 20,
22884 .result = "\x67\xE9\x28\xB3\x1C\xA4\x6D\x02"
22885 "\xF0\xB5\x37\xB6\x6B\x2F\xF5\x4F"
22886 "\xF8\xA3\x4C\x53\xB8\x12\x09\xBF"
22887 "\x58\x7D\xCF\x29\xA3\x41\x68\x6B"
22888 "\xCE\xE8\x79\x85\x3C\xB0\x3A\x8F"
22889 "\x16\xB0\xA1\x26\xC9\xBC\xBC\xA6",
22890 .rlen = 48,
22891 }
22892};
22893
22894static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
22895 { /* Generated using Crypto++ */
22896 .key = zeroed_string,
22897 .klen = 19,
22898 .iv = zeroed_string,
22899 .result = zeroed_string,
22900 .rlen = 16,
22901 .assoc = zeroed_string,
22902 .alen = 16,
22903 .input = "\x2E\x9A\xCA\x6B\xDA\x54\xFC\x6F"
22904 "\x12\x50\xE8\xDE\x81\x3C\x63\x08"
22905 "\x1A\x22\xBA\x75\xEE\xD4\xD5\xB5"
22906 "\x27\x50\x01\xAC\x03\x33\x39\xFB",
22907 .ilen = 32,
22908 },{
22909 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22910 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22911 "\x00\x00\x00",
22912 .klen = 19,
22913 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22914 .result = zeroed_string,
22915 .rlen = 16,
22916 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
22917 "\x00\x00\x00\x00\x00\x00\x00\x01",
22918 .alen = 16,
22919 .input = "\xCF\xB9\x99\x17\xC8\x86\x0E\x7F"
22920 "\x7E\x76\xF8\xE6\xF8\xCC\x1F\x17"
22921 "\x6A\xE0\x53\x9F\x4B\x73\x7E\xDA"
22922 "\x08\x09\x4E\xC4\x1E\xAD\xC6\xB0",
22923 .ilen = 32,
22924
22925 }, {
22926 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22927 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22928 "\x00\x00\x00",
22929 .klen = 19,
22930 .iv = zeroed_string,
22931 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22932 "\x01\x01\x01\x01\x01\x01\x01\x01",
22933 .rlen = 16,
22934 .assoc = zeroed_string,
22935 .alen = 16,
22936 .input = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22937 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22938 "\xA1\xE2\xC2\x42\x2B\x81\x70\x40"
22939 "\xFD\x7F\x76\xD1\x03\x07\xBB\x0C",
22940 .ilen = 32,
22941 }, {
22942 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22943 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22944 "\x00\x00\x00",
22945 .klen = 19,
22946 .iv = zeroed_string,
22947 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22948 "\x01\x01\x01\x01\x01\x01\x01\x01",
22949 .rlen = 16,
22950 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22951 "\x00\x00\x00\x00\x00\x00\x00\x00",
22952 .alen = 16,
22953 .input = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22954 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22955 "\x5B\xC0\x73\xE0\x2B\x73\x68\xC9"
22956 "\x2D\x8C\x58\xC2\x90\x3D\xB0\x3E",
22957 .ilen = 32,
22958 }, {
22959 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22960 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22961 "\x00\x00\x00",
22962 .klen = 19,
22963 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22964 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22965 "\x01\x01\x01\x01\x01\x01\x01\x01",
22966 .rlen = 16,
22967 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22968 "\x00\x00\x00\x00\x00\x00\x00\x01",
22969 .alen = 16,
22970 .input = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22971 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22972 "\x43\x8E\x76\x57\x3B\xB4\x05\xE8"
22973 "\xA9\x9B\xBF\x25\xE0\x4F\xC0\xED",
22974 .ilen = 32,
22975 }, {
22976 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22977 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22978 "\x00\x00\x00",
22979 .klen = 19,
22980 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22981 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22982 "\x01\x01\x01\x01\x01\x01\x01\x01"
22983 "\x01\x01\x01\x01\x01\x01\x01\x01"
22984 "\x01\x01\x01\x01\x01\x01\x01\x01"
22985 "\x01\x01\x01\x01\x01\x01\x01\x01"
22986 "\x01\x01\x01\x01\x01\x01\x01\x01"
22987 "\x01\x01\x01\x01\x01\x01\x01\x01"
22988 "\x01\x01\x01\x01\x01\x01\x01\x01",
22989 .rlen = 64,
22990 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22991 "\x00\x00\x00\x00\x00\x00\x00\x01",
22992 .alen = 16,
22993 .input = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22994 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22995 "\x9C\xA4\x97\x83\x3F\x01\xA5\xF4"
22996 "\x43\x09\xE7\xB8\xE9\xD1\xD7\x02"
22997 "\x9B\xAB\x39\x18\xEB\x94\x34\x36"
22998 "\xE6\xC5\xC8\x9B\x00\x81\x9E\x49"
22999 "\x1D\x78\xE1\x48\xE3\xE9\xEA\x8E"
23000 "\x3A\x2B\x67\x5D\x35\x6A\x0F\xDB"
23001 "\x02\x73\xDD\xE7\x30\x4A\x30\x54"
23002 "\x1A\x9D\x09\xCA\xC8\x1C\x32\x5F",
23003 .ilen = 80,
23004 }, {
23005 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
23006 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
23007 "\x00\x00\x00",
23008 .klen = 19,
23009 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
23010 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
23011 "\xff\xff\xff\xff\xff\xff\xff\xff"
23012 "\xff\xff\xff\xff\xff\xff\xff\xff"
23013 "\xff\xff\xff\xff\xff\xff\xff\xff"
23014 "\xff\xff\xff\xff\xff\xff\xff\xff"
23015 "\xff\xff\xff\xff\xff\xff\xff\xff"
23016 "\xff\xff\xff\xff\xff\xff\xff\xff"
23017 "\xff\xff\xff\xff\xff\xff\xff\xff"
23018 "\xff\xff\xff\xff\xff\xff\xff\xff"
23019 "\xff\xff\xff\xff\xff\xff\xff\xff"
23020 "\xff\xff\xff\xff\xff\xff\xff\xff"
23021 "\xff\xff\xff\xff\xff\xff\xff\xff"
23022 "\xff\xff\xff\xff\xff\xff\xff\xff"
23023 "\xff\xff\xff\xff\xff\xff\xff\xff"
23024 "\xff\xff\xff\xff\xff\xff\xff\xff"
23025 "\xff\xff\xff\xff\xff\xff\xff\xff"
23026 "\xff\xff\xff\xff\xff\xff\xff\xff"
23027 "\xff\xff\xff\xff\xff\xff\xff\xff"
23028 "\xff\xff\xff\xff\xff\xff\xff\xff"
23029 "\xff\xff\xff\xff\xff\xff\xff\xff"
23030 "\xff\xff\xff\xff\xff\xff\xff\xff"
23031 "\xff\xff\xff\xff\xff\xff\xff\xff"
23032 "\xff\xff\xff\xff\xff\xff\xff\xff"
23033 "\xff\xff\xff\xff\xff\xff\xff\xff",
23034 .rlen = 192,
23035 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
23036 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
23037 "\x89\xab\xcd\xef",
23038 .alen = 20,
23039 .input = "\x64\x17\xDC\x24\x9D\x92\xBA\x5E"
23040 "\x7C\x64\x6D\x33\x46\x77\xAC\xB1"
23041 "\x5C\x9E\xE2\xC7\x27\x11\x3E\x95"
23042 "\x7D\xBE\x28\xC8\xC1\xCA\x5E\x8C"
23043 "\xB4\xE2\xDE\x9F\x53\x59\x26\xDB"
23044 "\x0C\xD4\xE4\x07\x9A\xE6\x3E\x01"
23045 "\x58\x0D\x3E\x3D\xD5\x21\xEB\x04"
23046 "\x06\x9D\x5F\xB9\x02\x49\x1A\x2B"
23047 "\xBA\xF0\x4E\x3B\x85\x50\x5B\x09"
23048 "\xFE\xEC\xFC\x54\xEC\x0C\xE2\x79"
23049 "\x8A\x2F\x5F\xD7\x05\x5D\xF1\x6D"
23050 "\x22\xEB\xD1\x09\x80\x3F\x5A\x70"
23051 "\xB2\xB9\xD3\x63\x99\xC2\x4D\x1B"
23052 "\x36\x12\x00\x89\xAA\x5D\x55\xDA"
23053 "\x1D\x5B\xD8\x3C\x5F\x09\xD2\xE6"
23054 "\x39\x41\x5C\xF0\xBE\x26\x4E\x5F"
23055 "\x2B\x50\x44\x52\xC2\x10\x7D\x38"
23056 "\x82\x64\x83\x0C\xAE\x49\xD0\xE5"
23057 "\x4F\xE5\x66\x4C\x58\x7A\xEE\x43"
23058 "\x3B\x51\xFE\xBA\x24\x8A\xFE\xDC"
23059 "\x19\x6D\x60\x66\x61\xF9\x9A\x3F"
23060 "\x75\xFC\x38\x53\x5B\xB5\xCD\x52"
23061 "\x4F\xE5\xE4\xC9\xFE\x10\xCB\x98"
23062 "\xF0\x06\x5B\x07\xAB\xBB\xF4\x0E"
23063 "\x2D\xC2\xDD\x5D\xDD\x22\x9A\xCC"
23064 "\x39\xAB\x63\xA5\x3D\x9C\x51\x8A",
23065 .ilen = 208,
23066 }, { /* From draft-mcgrew-gcm-test-01 */
23067 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
23068 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
23069 "\x2E\x44\x3B",
23070 .klen = 19,
23071 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
23072 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
23073 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
23074 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
23075 "\x38\xD3\x01\x00\x00\x01\x00\x00"
23076 "\x00\x00\x00\x00\x04\x5F\x73\x69"
23077 "\x70\x04\x5F\x75\x64\x70\x03\x73"
23078 "\x69\x70\x09\x63\x79\x62\x65\x72"
23079 "\x63\x69\x74\x79\x02\x64\x6B\x00"
23080 "\x00\x21\x00\x01\x01\x02\x02\x01",
23081 .rlen = 72,
23082 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
23083 "\x00\x00\x00\x00\x49\x56\xED\x7E"
23084 "\x3B\x24\x4C\xFE",
23085 .alen = 20,
23086 .input = "\x89\xBA\x3E\xEF\xE6\xD6\xCF\xDB"
23087 "\x83\x60\xF5\xBA\x3A\x56\x79\xE6"
23088 "\x7E\x0C\x53\xCF\x9E\x87\xE0\x4E"
23089 "\x1A\x26\x01\x24\xC7\x2E\x3D\xBF"
23090 "\x29\x2C\x91\xC1\xB8\xA8\xCF\xE0"
23091 "\x39\xF8\x53\x6D\x31\x22\x2B\xBF"
23092 "\x98\x81\xFC\x34\xEE\x85\x36\xCD"
23093 "\x26\xDB\x6C\x7A\x0C\x77\x8A\x35"
23094 "\x18\x85\x54\xB2\xBC\xDD\x3F\x43"
23095 "\x61\x06\x8A\xDF\x86\x3F\xB4\xAC"
23096 "\x97\xDC\xBD\xFD\x92\x10\xC5\xFF",
23097 .ilen = 88,
23098 }, {
23099 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
23100 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
23101 "\xCA\xFE\xBA",
23102 .klen = 19,
23103 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23104 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
23105 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
23106 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
23107 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
23108 "\x00\x01\x00\x00\x00\x00\x00\x00"
23109 "\x03\x73\x69\x70\x09\x63\x79\x62"
23110 "\x65\x72\x63\x69\x74\x79\x02\x64"
23111 "\x6B\x00\x00\x01\x00\x01\x00\x01",
23112 .rlen = 64,
23113 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
23114 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23115 .alen = 16,
23116 .input = "\x4B\xC2\x70\x60\x64\xD2\xF3\xC8"
23117 "\xE5\x26\x8A\xDE\xB8\x7E\x7D\x16"
23118 "\x56\xC7\xD2\x88\xBA\x8D\x58\xAF"
23119 "\xF5\x71\xB6\x37\x84\xA7\xB1\x99"
23120 "\x51\x5C\x0D\xA0\x27\xDE\xE7\x2D"
23121 "\xEF\x25\x88\x1F\x1D\x77\x11\xFF"
23122 "\xDB\xED\xEE\x56\x16\xC5\x5C\x9B"
23123 "\x00\x62\x1F\x68\x4E\x7C\xA0\x97"
23124 "\x10\x72\x7E\x53\x13\x3B\x68\xE4"
23125 "\x30\x99\x91\x79\x09\xEA\xFF\x6A",
23126 .ilen = 80,
23127 }, {
23128 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23129 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23130 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23131 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23132 "\x11\x22\x33",
23133 .klen = 35,
23134 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
23135 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
23136 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
23137 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
23138 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
23139 "\x70\x02\x40\x00\x20\xBF\x00\x00"
23140 "\x02\x04\x05\xB4\x01\x01\x04\x02"
23141 "\x01\x02\x02\x01",
23142 .rlen = 52,
23143 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
23144 "\x01\x02\x03\x04\x05\x06\x07\x08",
23145 .alen = 16,
23146 .input = "\xD6\x31\x0D\x2B\x3D\x6F\xBD\x2F"
23147 "\x58\x41\x7E\xFF\x9A\x9E\x09\xB4"
23148 "\x1A\xF7\xF6\x42\x31\xCD\xBF\xAD"
23149 "\x27\x0E\x2C\xF2\xDB\x10\xDF\x55"
23150 "\x8F\x0D\xD7\xAC\x23\xBD\x42\x10"
23151 "\xD0\xB2\xAF\xD8\x37\xAC\x6B\x0B"
23152 "\x11\xD4\x0B\x12\xEC\xB4\xB1\x92"
23153 "\x23\xA6\x10\xB0\x26\xD6\xD9\x26"
23154 "\x5A\x48\x6A\x3E",
23155 .ilen = 68,
23156 }, {
23157 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
23158 "\x00\x00\x00\x00\x00\x00\x00\x00"
23159 "\x00\x00\x00",
23160 .klen = 19,
23161 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
23162 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
23163 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
23164 "\x01\x01\x01\x01\x08\x00\x07\x5C"
23165 "\x02\x00\x44\x00\x61\x62\x63\x64"
23166 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23167 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23168 "\x75\x76\x77\x61\x62\x63\x64\x65"
23169 "\x66\x67\x68\x69\x01\x02\x02\x01",
23170 .rlen = 64,
23171 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
23172 "\x00\x00\x00\x00\x00\x00\x00\x00",
23173 .alen = 16,
23174 .input = "\x6B\x9A\xCA\x57\x43\x91\xFC\x6F"
23175 "\x92\x51\x23\xA4\xC1\x5B\xF0\x10"
23176 "\xF3\x13\xF4\xF8\xA1\x9A\xB4\xDC"
23177 "\x89\xC8\xF8\x42\x62\x95\xB7\xCB"
23178 "\xB8\xF5\x0F\x1B\x2E\x94\xA2\xA7"
23179 "\xBF\xFB\x8A\x92\x13\x63\xD1\x3C"
23180 "\x08\xF5\xE8\xA6\xAA\xF6\x34\xF9"
23181 "\x42\x05\xAF\xB3\xE7\x9A\xFC\xEE"
23182 "\x36\x25\xC1\x10\x12\x1C\xCA\x82"
23183 "\xEA\xE6\x63\x5A\x57\x28\xA9\x9A",
23184 .ilen = 80,
23185 }, {
23186 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23187 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23188 "\x57\x69\x0E",
23189 .klen = 19,
23190 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23191 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
23192 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
23193 "\x01\x01\x01\x01\x08\x00\x08\x5C"
23194 "\x02\x00\x43\x00\x61\x62\x63\x64"
23195 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23196 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23197 "\x75\x76\x77\x61\x62\x63\x64\x65"
23198 "\x66\x67\x68\x69\x01\x02\x02\x01",
23199 .rlen = 64,
23200 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23201 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23202 "\xA2\xFC\xA1\xA3",
23203 .alen = 20,
23204 .input = "\x6A\x6B\x45\x2B\x7C\x67\x52\xF6"
23205 "\x10\x60\x40\x62\x6B\x4F\x97\x8E"
23206 "\x0B\xB2\x22\x97\xCB\x21\xE0\x90"
23207 "\xA2\xE7\xD1\x41\x30\xE4\x4B\x1B"
23208 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
23209 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
23210 "\x30\xB8\xE5\xDF\xD7\x12\x56\x75"
23211 "\xD0\x95\xB7\xB8\x91\x42\xF7\xFD"
23212 "\x97\x57\xCA\xC1\x20\xD0\x86\xB9"
23213 "\x66\x9D\xB4\x2B\x96\x22\xAC\x67",
23214 .ilen = 80,
23215 }, {
23216 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23217 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23218 "\x57\x69\x0E",
23219 .klen = 19,
23220 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23221 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
23222 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
23223 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
23224 "\x01\x02\x02\x01",
23225 .rlen = 28,
23226 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23227 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23228 "\xA2\xFC\xA1\xA3",
23229 .alen = 20,
23230 .input = "\x6A\x6B\x45\x0B\xA7\x06\x52\xF6"
23231 "\x10\x60\xCF\x01\x6B\x4F\x97\x20"
23232 "\xEA\xB3\x23\x94\xC9\x21\x1D\x33"
23233 "\xA1\xE5\x90\x40\x05\x37\x45\x70"
23234 "\xB5\xD6\x09\x0A\x23\x73\x33\xF9"
23235 "\x08\xB4\x22\xE4",
23236 .ilen = 44,
23237 }, {
23238 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
23239 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
23240 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
23241 "\xCA\xFE\xBA",
23242 .klen = 27,
23243 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23244 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
23245 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
23246 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
23247 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
23248 "\x50\x10\x16\xD0\x75\x68\x00\x01",
23249 .rlen = 40,
23250 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
23251 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23252 .alen = 16,
23253 .input = "\x05\x22\x15\xD1\x52\x56\x85\x04"
23254 "\xA8\x5C\x5D\x6D\x7E\x6E\xF5\xFA"
23255 "\xEA\x16\x37\x50\xF3\xDF\x84\x3B"
23256 "\x2F\x32\x18\x57\x34\x2A\x8C\x23"
23257 "\x67\xDF\x6D\x35\x7B\x54\x0D\xFB"
23258 "\x34\xA5\x9F\x6C\x48\x30\x1E\x22"
23259 "\xFE\xB1\x22\x17\x17\x8A\xB9\x5B",
23260 .ilen = 56,
23261 }, {
23262 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23263 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23264 "\xDE\xCA\xF8",
23265 .klen = 19,
23266 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
23267 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
23268 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
23269 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
23270 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
23271 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
23272 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
23273 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
23274 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
23275 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
23276 "\x23\x01\x01\x01",
23277 .rlen = 76,
23278 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
23279 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
23280 "\xCE\xFA\xCE\x74",
23281 .alen = 20,
23282 .input = "\x92\xD0\x53\x79\x33\x38\xD5\xF3"
23283 "\x7D\xE4\x7A\x8E\x86\x03\xC9\x90"
23284 "\x96\x35\xAB\x9C\xFB\xE8\xA3\x76"
23285 "\xE9\xE9\xE2\xD1\x2E\x11\x0E\x00"
23286 "\xFA\xCE\xB5\x9E\x02\xA7\x7B\xEA"
23287 "\x71\x9A\x58\xFB\xA5\x8A\xE1\xB7"
23288 "\x9C\x39\x9D\xE3\xB5\x6E\x69\xE6"
23289 "\x63\xC9\xDB\x05\x69\x51\x12\xAD"
23290 "\x3E\x00\x32\x73\x86\xF2\xEE\xF5"
23291 "\x0F\xE8\x81\x7E\x84\xD3\xC0\x0D"
23292 "\x76\xD6\x55\xC6\xB4\xC2\x34\xC7"
23293 "\x12\x25\x0B\xF9",
23294 .ilen = 92,
23295 }, {
23296 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23297 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23298 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23299 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23300 "\x73\x61\x6C",
23301 .klen = 35,
23302 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
23303 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
23304 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
23305 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
23306 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
23307 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
23308 .rlen = 40,
23309 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
23310 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
23311 "\x69\x76\x65\x63",
23312 .alen = 20,
23313 .input = "\xCC\x74\xB7\xD3\xB0\x38\x50\x42"
23314 "\x2C\x64\x87\x46\x1E\x34\x10\x05"
23315 "\x29\x6B\xBB\x36\xE9\x69\xAD\x92"
23316 "\x82\xA1\x10\x6A\xEB\x0F\xDC\x7D"
23317 "\x08\xBA\xF3\x91\xCA\xAA\x61\xDA"
23318 "\x62\xF4\x14\x61\x5C\x9D\xB5\xA7"
23319 "\xEE\xD7\xB9\x7E\x87\x99\x9B\x7D",
23320 .ilen = 56,
23321 }, {
23322 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23323 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23324 "\x57\x69\x0E",
23325 .klen = 19,
23326 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23327 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
23328 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
23329 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
23330 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
23331 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
23332 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
23333 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
23334 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
23335 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
23336 "\x15\x01\x01\x01",
23337 .rlen = 76,
23338 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23339 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23340 "\xA2\xFC\xA1\xA3",
23341 .alen = 20,
23342 .input = "\x6A\x6B\x45\x5E\xD6\x9A\x52\xF6"
23343 "\xEF\x70\x1A\x9C\xE8\xD3\x19\x86"
23344 "\xC8\x02\xF0\xB0\x03\x09\xD9\x02"
23345 "\xA0\xD2\x59\x04\xD1\x85\x2A\x24"
23346 "\x1C\x67\x3E\xD8\x68\x72\x06\x94"
23347 "\x97\xBA\x4F\x76\x8D\xB0\x44\x5B"
23348 "\x69\xBF\xD5\xE2\x3D\xF1\x0B\x0C"
23349 "\xC0\xBF\xB1\x8F\x70\x09\x9E\xCE"
23350 "\xA5\xF2\x55\x58\x84\xFA\xF9\xB5"
23351 "\x23\xF4\x84\x40\x74\x14\x8A\x6B"
23352 "\xDB\xD7\x67\xED\xA4\x93\xF3\x47"
23353 "\xCC\xF7\x46\x6F",
23354 .ilen = 92,
23355 }, {
23356 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23357 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23358 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23359 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23360 "\x73\x61\x6C",
23361 .klen = 35,
23362 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
23363 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
23364 "\x6C\x65\x73\x01\x74\x68\x65\x01"
23365 "\x6E\x65\x74\x77\x65\x01\x64\x65"
23366 "\x66\x69\x6E\x65\x01\x74\x68\x65"
23367 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
23368 "\x67\x69\x65\x73\x01\x74\x68\x61"
23369 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
23370 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
23371 "\x72\x72\x6F\x77\x01\x02\x02\x01",
23372 .rlen = 72,
23373 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
23374 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
23375 "\x69\x76\x65\x63",
23376 .alen = 20,
23377 .input = "\xEA\x15\xC4\x98\xAC\x15\x22\x37"
23378 "\x00\x07\x1D\xBE\x60\x5D\x73\x16"
23379 "\x4D\x0F\xCC\xCE\x8A\xD0\x49\xD4"
23380 "\x39\xA3\xD1\xB1\x21\x0A\x92\x1A"
23381 "\x2C\xCF\x8F\x9D\xC9\x91\x0D\xB4"
23382 "\x15\xFC\xBC\xA5\xC5\xBF\x54\xE5"
23383 "\x1C\xC7\x32\x41\x07\x7B\x2C\xB6"
23384 "\x5C\x23\x7C\x93\xEA\xEF\x23\x1C"
23385 "\x73\xF4\xE7\x12\x84\x4C\x37\x0A"
23386 "\x4A\x8F\x06\x37\x48\xF9\xF9\x05"
23387 "\x55\x13\x40\xC3\xD5\x55\x3A\x3D",
23388 .ilen = 88,
23389 }, {
23390 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
23391 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
23392 "\xD9\x66\x42",
23393 .klen = 19,
23394 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
23395 .result = "\x01\x02\x02\x01",
23396 .rlen = 4,
23397 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
23398 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
23399 .alen = 16,
23400 .input = "\x4C\x72\x63\x30\x2F\xE6\x56\xDD"
23401 "\xD0\xD8\x60\x9D\x8B\xEF\x85\x90"
23402 "\xF7\x61\x24\x62",
23403 .ilen = 20,
23404 }, {
23405 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23406 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23407 "\xDE\xCA\xF8",
23408 .klen = 19,
23409 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
23410 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
23411 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
23412 "\x62\x65\x00\x01",
23413 .rlen = 20,
23414 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
23415 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
23416 "\xCE\xFA\xCE\x74",
23417 .alen = 20,
23418 .input = "\xA3\xBF\x52\x52\x65\x83\xBA\x81"
23419 "\x03\x9B\x84\xFC\x44\x8C\xBB\x81"
23420 "\x36\xE1\x78\xBB\xA5\x49\x3A\xD0"
23421 "\xF0\x6B\x21\xAF\x98\xC0\x34\xDC"
23422 "\x17\x17\x65\xAD",
23423 .ilen = 36,
23424 }, {
23425 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
23426 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
23427 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
23428 "\x62\x65\x66\x6F\x72\x65\x69\x61"
23429 "\x74\x75\x72",
23430 .klen = 35,
23431 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
23432 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
23433 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
23434 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
23435 "\x02\x00\x07\x00\x61\x62\x63\x64"
23436 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23437 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23438 "\x01\x02\x02\x01",
23439 .rlen = 52,
23440 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
23441 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
23442 "\x67\x65\x74\x6D",
23443 .alen = 20,
23444 .input = "\x96\xFD\x86\xF8\xD1\x98\xFF\x10"
23445 "\xAB\x8C\xDA\x8A\x5A\x08\x38\x1A"
23446 "\x48\x59\x80\x18\x1A\x18\x1A\x04"
23447 "\xC9\x0D\xE3\xE7\x0E\xA4\x0B\x75"
23448 "\x92\x9C\x52\x5C\x0B\xFB\xF8\xAF"
23449 "\x16\xC3\x35\xA8\xE7\xCE\x84\x04"
23450 "\xEB\x40\x6B\x7A\x8E\x75\xBB\x42"
23451 "\xE0\x63\x4B\x21\x44\xA2\x2B\x2B"
23452 "\x39\xDB\xC8\xDC",
23453 .ilen = 68,
23454 }, {
23455 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23456 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23457 "\x57\x69\x0E",
23458 .klen = 19,
23459 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23460 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
23461 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
23462 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
23463 "\x02\x00\x07\x00\x61\x62\x63\x64"
23464 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23465 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23466 "\x01\x02\x02\x01",
23467 .rlen = 52,
23468 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
23469 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23470 "\xA2\xFC\xA1\xA3",
23471 .alen = 20,
23472 .input = "\x6A\x6B\x45\x27\x3F\x9E\x52\xF6"
23473 "\x10\x60\x54\x25\xEB\x80\x04\x93"
23474 "\xCA\x1B\x23\x97\xCB\x21\x2E\x01"
23475 "\xA2\xE7\x95\x41\x30\xE4\x4B\x1B"
23476 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
23477 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
23478 "\x44\xCC\x90\xBF\x00\x94\x94\x92"
23479 "\x20\x17\x0C\x1B\x55\xDE\x7E\x68"
23480 "\xF4\x95\x5D\x4F",
23481 .ilen = 68,
23482 }, {
23483 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
23484 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
23485 "\x22\x43\x3C",
23486 .klen = 19,
23487 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
23488 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
23489 "\x61\x62\x63\x64\x65\x66\x67\x68"
23490 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
23491 "\x71\x72\x73\x74\x01\x02\x02\x01",
23492 .rlen = 32,
23493 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
23494 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
23495 "\x3A\x23\x4B\xFD",
23496 .alen = 20,
23497 .input = "\x67\xE9\x28\xB3\x1C\xA4\x6D\x02"
23498 "\xF0\xB5\x37\xB6\x6B\x2F\xF5\x4F"
23499 "\xF8\xA3\x4C\x53\xB8\x12\x09\xBF"
23500 "\x58\x7D\xCF\x29\xA3\x41\x68\x6B"
23501 "\xCE\xE8\x79\x85\x3C\xB0\x3A\x8F"
23502 "\x16\xB0\xA1\x26\xC9\xBC\xBC\xA6",
23503 .ilen = 48,
23504 }
23505};
23506
23507/*
Martin Williaf2b76b2015-06-01 13:44:01 +020023508 * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5.
23509 */
23510#define RFC7539_ENC_TEST_VECTORS 2
23511#define RFC7539_DEC_TEST_VECTORS 2
23512static struct aead_testvec rfc7539_enc_tv_template[] = {
23513 {
23514 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
23515 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23516 "\x90\x91\x92\x93\x94\x95\x96\x97"
23517 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
23518 .klen = 32,
23519 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
23520 "\x44\x45\x46\x47",
23521 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
23522 "\xc4\xc5\xc6\xc7",
23523 .alen = 12,
23524 .input = "\x4c\x61\x64\x69\x65\x73\x20\x61"
23525 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
23526 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
23527 "\x74\x68\x65\x20\x63\x6c\x61\x73"
23528 "\x73\x20\x6f\x66\x20\x27\x39\x39"
23529 "\x3a\x20\x49\x66\x20\x49\x20\x63"
23530 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
23531 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
23532 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
23533 "\x74\x69\x70\x20\x66\x6f\x72\x20"
23534 "\x74\x68\x65\x20\x66\x75\x74\x75"
23535 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
23536 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
23537 "\x75\x6c\x64\x20\x62\x65\x20\x69"
23538 "\x74\x2e",
23539 .ilen = 114,
23540 .result = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
23541 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
23542 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
23543 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
23544 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
23545 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
23546 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
23547 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
23548 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
23549 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
23550 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
23551 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
23552 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
23553 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
23554 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
23555 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
23556 "\x06\x91",
23557 .rlen = 130,
23558 }, {
23559 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23560 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23561 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23562 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
23563 .klen = 32,
23564 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
23565 "\x05\x06\x07\x08",
23566 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
23567 "\x00\x00\x4e\x91",
23568 .alen = 12,
23569 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23570 "\x2d\x44\x72\x61\x66\x74\x73\x20"
23571 "\x61\x72\x65\x20\x64\x72\x61\x66"
23572 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23573 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23574 "\x64\x20\x66\x6f\x72\x20\x61\x20"
23575 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23576 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23577 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23578 "\x64\x20\x6d\x61\x79\x20\x62\x65"
23579 "\x20\x75\x70\x64\x61\x74\x65\x64"
23580 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23581 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23582 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23583 "\x20\x62\x79\x20\x6f\x74\x68\x65"
23584 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23585 "\x6e\x74\x73\x20\x61\x74\x20\x61"
23586 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23587 "\x20\x49\x74\x20\x69\x73\x20\x69"
23588 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23589 "\x69\x61\x74\x65\x20\x74\x6f\x20"
23590 "\x75\x73\x65\x20\x49\x6e\x74\x65"
23591 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23592 "\x66\x74\x73\x20\x61\x73\x20\x72"
23593 "\x65\x66\x65\x72\x65\x6e\x63\x65"
23594 "\x20\x6d\x61\x74\x65\x72\x69\x61"
23595 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23596 "\x63\x69\x74\x65\x20\x74\x68\x65"
23597 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23598 "\x74\x68\x61\x6e\x20\x61\x73\x20"
23599 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23600 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23601 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23602 "\x9d",
23603 .ilen = 265,
23604 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23605 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23606 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23607 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23608 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23609 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23610 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23611 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23612 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23613 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23614 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23615 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23616 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23617 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23618 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23619 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23620 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23621 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23622 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23623 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23624 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23625 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23626 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23627 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23628 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23629 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23630 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23631 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23632 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23633 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23634 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23635 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23636 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23637 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23638 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23639 "\x38",
23640 .rlen = 281,
23641 },
23642};
23643
23644static struct aead_testvec rfc7539_dec_tv_template[] = {
23645 {
23646 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
23647 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23648 "\x90\x91\x92\x93\x94\x95\x96\x97"
23649 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
23650 .klen = 32,
23651 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
23652 "\x44\x45\x46\x47",
23653 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
23654 "\xc4\xc5\xc6\xc7",
23655 .alen = 12,
23656 .input = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
23657 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
23658 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
23659 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
23660 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
23661 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
23662 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
23663 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
23664 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
23665 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
23666 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
23667 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
23668 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
23669 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
23670 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
23671 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
23672 "\x06\x91",
23673 .ilen = 130,
23674 .result = "\x4c\x61\x64\x69\x65\x73\x20\x61"
23675 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
23676 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
23677 "\x74\x68\x65\x20\x63\x6c\x61\x73"
23678 "\x73\x20\x6f\x66\x20\x27\x39\x39"
23679 "\x3a\x20\x49\x66\x20\x49\x20\x63"
23680 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
23681 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
23682 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
23683 "\x74\x69\x70\x20\x66\x6f\x72\x20"
23684 "\x74\x68\x65\x20\x66\x75\x74\x75"
23685 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
23686 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
23687 "\x75\x6c\x64\x20\x62\x65\x20\x69"
23688 "\x74\x2e",
23689 .rlen = 114,
23690 }, {
23691 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23692 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23693 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23694 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
23695 .klen = 32,
23696 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
23697 "\x05\x06\x07\x08",
23698 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
23699 "\x00\x00\x4e\x91",
23700 .alen = 12,
23701 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23702 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23703 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23704 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23705 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23706 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23707 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23708 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23709 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23710 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23711 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23712 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23713 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23714 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23715 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23716 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23717 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23718 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23719 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23720 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23721 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23722 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23723 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23724 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23725 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23726 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23727 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23728 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23729 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23730 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23731 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23732 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23733 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23734 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23735 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23736 "\x38",
23737 .ilen = 281,
23738 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23739 "\x2d\x44\x72\x61\x66\x74\x73\x20"
23740 "\x61\x72\x65\x20\x64\x72\x61\x66"
23741 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23742 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23743 "\x64\x20\x66\x6f\x72\x20\x61\x20"
23744 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23745 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23746 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23747 "\x64\x20\x6d\x61\x79\x20\x62\x65"
23748 "\x20\x75\x70\x64\x61\x74\x65\x64"
23749 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23750 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23751 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23752 "\x20\x62\x79\x20\x6f\x74\x68\x65"
23753 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23754 "\x6e\x74\x73\x20\x61\x74\x20\x61"
23755 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23756 "\x20\x49\x74\x20\x69\x73\x20\x69"
23757 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23758 "\x69\x61\x74\x65\x20\x74\x6f\x20"
23759 "\x75\x73\x65\x20\x49\x6e\x74\x65"
23760 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23761 "\x66\x74\x73\x20\x61\x73\x20\x72"
23762 "\x65\x66\x65\x72\x65\x6e\x63\x65"
23763 "\x20\x6d\x61\x74\x65\x72\x69\x61"
23764 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23765 "\x63\x69\x74\x65\x20\x74\x68\x65"
23766 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23767 "\x74\x68\x61\x6e\x20\x61\x73\x20"
23768 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23769 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23770 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23771 "\x9d",
23772 .rlen = 265,
23773 },
23774};
23775
23776/*
Martin Willi59007582015-06-01 13:44:03 +020023777 * draft-irtf-cfrg-chacha20-poly1305
23778 */
23779#define RFC7539ESP_DEC_TEST_VECTORS 1
23780#define RFC7539ESP_ENC_TEST_VECTORS 1
23781static struct aead_testvec rfc7539esp_enc_tv_template[] = {
23782 {
23783 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23784 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23785 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23786 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
23787 "\x00\x00\x00\x00",
23788 .klen = 36,
23789 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
23790 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
Herbert Xu74790922015-07-16 12:35:08 +080023791 "\x00\x00\x4e\x91\x01\x02\x03\x04"
23792 "\x05\x06\x07\x08",
23793 .alen = 20,
Martin Willi59007582015-06-01 13:44:03 +020023794 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23795 "\x2d\x44\x72\x61\x66\x74\x73\x20"
23796 "\x61\x72\x65\x20\x64\x72\x61\x66"
23797 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23798 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23799 "\x64\x20\x66\x6f\x72\x20\x61\x20"
23800 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23801 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23802 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23803 "\x64\x20\x6d\x61\x79\x20\x62\x65"
23804 "\x20\x75\x70\x64\x61\x74\x65\x64"
23805 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23806 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23807 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23808 "\x20\x62\x79\x20\x6f\x74\x68\x65"
23809 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23810 "\x6e\x74\x73\x20\x61\x74\x20\x61"
23811 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23812 "\x20\x49\x74\x20\x69\x73\x20\x69"
23813 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23814 "\x69\x61\x74\x65\x20\x74\x6f\x20"
23815 "\x75\x73\x65\x20\x49\x6e\x74\x65"
23816 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23817 "\x66\x74\x73\x20\x61\x73\x20\x72"
23818 "\x65\x66\x65\x72\x65\x6e\x63\x65"
23819 "\x20\x6d\x61\x74\x65\x72\x69\x61"
23820 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23821 "\x63\x69\x74\x65\x20\x74\x68\x65"
23822 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23823 "\x74\x68\x61\x6e\x20\x61\x73\x20"
23824 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23825 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23826 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23827 "\x9d",
23828 .ilen = 265,
23829 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23830 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23831 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23832 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23833 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23834 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23835 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23836 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23837 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23838 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23839 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23840 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23841 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23842 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23843 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23844 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23845 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23846 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23847 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23848 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23849 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23850 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23851 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23852 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23853 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23854 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23855 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23856 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23857 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23858 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23859 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23860 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23861 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23862 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23863 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23864 "\x38",
23865 .rlen = 281,
23866 },
23867};
23868
23869static struct aead_testvec rfc7539esp_dec_tv_template[] = {
23870 {
23871 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23872 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23873 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23874 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
23875 "\x00\x00\x00\x00",
23876 .klen = 36,
23877 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
23878 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
Herbert Xu74790922015-07-16 12:35:08 +080023879 "\x00\x00\x4e\x91\x01\x02\x03\x04"
23880 "\x05\x06\x07\x08",
23881 .alen = 20,
Martin Willi59007582015-06-01 13:44:03 +020023882 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23883 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23884 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23885 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23886 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23887 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23888 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23889 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23890 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23891 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23892 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23893 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23894 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23895 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23896 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23897 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23898 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23899 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23900 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23901 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23902 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23903 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23904 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23905 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23906 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23907 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23908 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23909 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23910 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23911 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23912 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23913 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23914 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23915 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23916 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23917 "\x38",
23918 .ilen = 281,
23919 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23920 "\x2d\x44\x72\x61\x66\x74\x73\x20"
23921 "\x61\x72\x65\x20\x64\x72\x61\x66"
23922 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23923 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23924 "\x64\x20\x66\x6f\x72\x20\x61\x20"
23925 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23926 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23927 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23928 "\x64\x20\x6d\x61\x79\x20\x62\x65"
23929 "\x20\x75\x70\x64\x61\x74\x65\x64"
23930 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23931 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23932 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23933 "\x20\x62\x79\x20\x6f\x74\x68\x65"
23934 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23935 "\x6e\x74\x73\x20\x61\x74\x20\x61"
23936 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23937 "\x20\x49\x74\x20\x69\x73\x20\x69"
23938 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23939 "\x69\x61\x74\x65\x20\x74\x6f\x20"
23940 "\x75\x73\x65\x20\x49\x6e\x74\x65"
23941 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23942 "\x66\x74\x73\x20\x61\x73\x20\x72"
23943 "\x65\x66\x65\x72\x65\x6e\x63\x65"
23944 "\x20\x6d\x61\x74\x65\x72\x69\x61"
23945 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23946 "\x63\x69\x74\x65\x20\x74\x68\x65"
23947 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23948 "\x74\x68\x61\x6e\x20\x61\x73\x20"
23949 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23950 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23951 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23952 "\x9d",
23953 .rlen = 265,
23954 },
23955};
23956
23957/*
Stephan Mueller35351982015-09-21 20:59:56 +020023958 * All key wrapping test vectors taken from
23959 * http://csrc.nist.gov/groups/STM/cavp/documents/mac/kwtestvectors.zip
23960 *
23961 * Note: as documented in keywrap.c, the ivout for encryption is the first
23962 * semiblock of the ciphertext from the test vector. For decryption, iv is
23963 * the first semiblock of the ciphertext.
23964 */
23965static struct cipher_testvec aes_kw_enc_tv_template[] = {
23966 {
23967 .key = "\x75\x75\xda\x3a\x93\x60\x7c\xc2"
23968 "\xbf\xd8\xce\xc7\xaa\xdf\xd9\xa6",
23969 .klen = 16,
23970 .input = "\x42\x13\x6d\x3c\x38\x4a\x3e\xea"
23971 "\xc9\x5a\x06\x6f\xd2\x8f\xed\x3f",
23972 .ilen = 16,
23973 .result = "\xf6\x85\x94\x81\x6f\x64\xca\xa3"
23974 "\xf5\x6f\xab\xea\x25\x48\xf5\xfb",
23975 .rlen = 16,
23976 .iv_out = "\x03\x1f\x6b\xd7\xe6\x1e\x64\x3d",
23977 },
23978};
23979
23980static struct cipher_testvec aes_kw_dec_tv_template[] = {
23981 {
23982 .key = "\x80\xaa\x99\x73\x27\xa4\x80\x6b"
23983 "\x6a\x7a\x41\xa5\x2b\x86\xc3\x71"
23984 "\x03\x86\xf9\x32\x78\x6e\xf7\x96"
23985 "\x76\xfa\xfb\x90\xb8\x26\x3c\x5f",
23986 .klen = 32,
23987 .input = "\xd3\x3d\x3d\x97\x7b\xf0\xa9\x15"
23988 "\x59\xf9\x9c\x8a\xcd\x29\x3d\x43",
23989 .ilen = 16,
23990 .result = "\x0a\x25\x6b\xa7\x5c\xfa\x03\xaa"
23991 "\xa0\x2b\xa9\x42\x03\xf1\x5b\xaa",
23992 .rlen = 16,
23993 .iv = "\x42\x3c\x96\x0d\x8a\x2a\xc4\xc1",
23994 },
23995};
23996
23997/*
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080023998 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
23999 * test vectors, taken from Appendix B.2.9 and B.2.10:
24000 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
24001 * Only AES-128 is supported at this time.
24002 */
24003#define ANSI_CPRNG_AES_TEST_VECTORS 6
24004
24005static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
24006 {
24007 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
24008 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
24009 .klen = 16,
24010 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
24011 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
24012 .dtlen = 16,
24013 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
24014 "\x00\x00\x00\x00\x00\x00\x00\x00",
24015 .vlen = 16,
24016 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
24017 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
24018 .rlen = 16,
24019 .loops = 1,
24020 }, {
24021 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
24022 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
24023 .klen = 16,
24024 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
24025 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
24026 .dtlen = 16,
24027 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
24028 "\x00\x00\x00\x00\x00\x00\x00\x00",
24029 .vlen = 16,
24030 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
24031 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
24032 .rlen = 16,
24033 .loops = 1,
24034 }, {
24035 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
24036 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
24037 .klen = 16,
24038 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
24039 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
24040 .dtlen = 16,
24041 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
24042 "\x00\x00\x00\x00\x00\x00\x00\x00",
24043 .vlen = 16,
24044 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
24045 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
24046 .rlen = 16,
24047 .loops = 1,
24048 }, {
24049 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
24050 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
24051 .klen = 16,
24052 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
24053 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
24054 .dtlen = 16,
24055 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
24056 "\x00\x00\x00\x00\x00\x00\x00\x00",
24057 .vlen = 16,
24058 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
24059 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
24060 .rlen = 16,
24061 .loops = 1,
24062 }, {
24063 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
24064 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
24065 .klen = 16,
24066 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
24067 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
24068 .dtlen = 16,
24069 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
24070 "\x00\x00\x00\x00\x00\x00\x00\x00",
24071 .vlen = 16,
24072 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
24073 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
24074 .rlen = 16,
24075 .loops = 1,
24076 }, { /* Monte Carlo Test */
24077 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
24078 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
24079 .klen = 16,
24080 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
24081 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
24082 .dtlen = 16,
24083 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
24084 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
24085 .vlen = 16,
24086 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
24087 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
24088 .rlen = 16,
24089 .loops = 10000,
24090 },
24091};
24092
Stephan Mueller3332ee22014-05-31 17:24:38 +020024093/*
24094 * SP800-90A DRBG Test vectors from
24095 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
24096 *
24097 * Test vectors for DRBG with prediction resistance. All types of DRBGs
24098 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
24099 * w/o personalization string, w/ and w/o additional input string).
24100 */
24101static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
24102 {
24103 .entropy = (unsigned char *)
24104 "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
24105 "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
24106 "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
24107 "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
24108 .entropylen = 48,
24109 .entpra = (unsigned char *)
24110 "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
24111 "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
24112 "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
24113 .entprb = (unsigned char *)
24114 "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
24115 "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
24116 "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
24117 .entprlen = 32,
24118 .expected = (unsigned char *)
24119 "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
24120 "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
24121 "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
24122 "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
24123 "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
24124 "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
24125 "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
24126 "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
24127 "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
24128 "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
24129 "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
24130 .expectedlen = 128,
24131 .addtla = NULL,
24132 .addtlb = NULL,
24133 .addtllen = 0,
24134 .pers = NULL,
24135 .perslen = 0,
24136 }, {
24137 .entropy = (unsigned char *)
24138 "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
24139 "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
24140 "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
24141 "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
24142 .entropylen = 48,
24143 .entpra = (unsigned char *)
24144 "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
24145 "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
24146 "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
24147 .entprb = (unsigned char *)
24148 "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
24149 "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
24150 "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
24151 .entprlen = 32,
24152 .expected = (unsigned char *)
24153 "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
24154 "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
24155 "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
24156 "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
24157 "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
24158 "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
24159 "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
24160 "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
24161 "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
24162 "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
24163 "\x50\x47\xa3\x63\x81\x16\xaf\x19",
24164 .expectedlen = 128,
24165 .addtla = (unsigned char *)
24166 "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
24167 "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
24168 "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
24169 .addtlb = (unsigned char *)
24170 "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
24171 "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
24172 "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
24173 .addtllen = 32,
24174 .pers = NULL,
24175 .perslen = 0,
24176 }, {
24177 .entropy = (unsigned char *)
24178 "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
24179 "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
24180 "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
24181 "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
24182 .entropylen = 48,
24183 .entpra = (unsigned char *)
24184 "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
24185 "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
24186 "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
24187 .entprb = (unsigned char *)
24188 "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
24189 "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
24190 "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
24191 .entprlen = 32,
24192 .expected = (unsigned char *)
24193 "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
24194 "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
24195 "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
24196 "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
24197 "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
24198 "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
24199 "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
24200 "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
24201 "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
24202 "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
24203 "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
24204 .expectedlen = 128,
24205 .addtla = NULL,
24206 .addtlb = NULL,
24207 .addtllen = 0,
24208 .pers = (unsigned char *)
24209 "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
24210 "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
24211 "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
24212 .perslen = 32,
24213 }, {
24214 .entropy = (unsigned char *)
24215 "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
24216 "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
24217 "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
24218 "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
24219 .entropylen = 48,
24220 .entpra = (unsigned char *)
24221 "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
24222 "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
24223 "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
24224 .entprb = (unsigned char *)
24225 "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
24226 "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
24227 "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
24228 .entprlen = 32,
24229 .expected = (unsigned char *)
24230 "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
24231 "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
24232 "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
24233 "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
24234 "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
24235 "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
24236 "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
24237 "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
24238 "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
24239 "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
24240 "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
24241 .expectedlen = 128,
24242 .addtla = (unsigned char *)
24243 "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
24244 "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
24245 "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
24246 .addtlb = (unsigned char *)
24247 "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
24248 "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
24249 "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
24250 .addtllen = 32,
24251 .pers = (unsigned char *)
24252 "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
24253 "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
24254 "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
24255 .perslen = 32,
24256 },
24257};
24258
24259static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
24260 {
24261 .entropy = (unsigned char *)
24262 "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
24263 "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
24264 "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
24265 "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
24266 .entropylen = 48,
24267 .entpra = (unsigned char *)
24268 "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
24269 "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
24270 "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
24271 .entprb = (unsigned char *)
24272 "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
24273 "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
24274 "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
24275 .entprlen = 32,
24276 .expected = (unsigned char *)
24277 "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
24278 "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
24279 "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
24280 "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
24281 "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
24282 "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
24283 "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
24284 "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
24285 "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
24286 "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
24287 "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
24288 .expectedlen = 128,
24289 .addtla = NULL,
24290 .addtlb = NULL,
24291 .addtllen = 0,
24292 .pers = NULL,
24293 .perslen = 0,
24294 }, {
24295 .entropy = (unsigned char *)
24296 "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
24297 "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
24298 "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
24299 "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
24300 .entropylen = 48,
24301 .entpra = (unsigned char *)
24302 "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
24303 "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
24304 "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
24305 .entprb = (unsigned char *)
24306 "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
24307 "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
24308 "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
24309 .entprlen = 32,
24310 .expected = (unsigned char *)
24311 "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
24312 "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
24313 "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
24314 "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
24315 "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
24316 "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
24317 "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
24318 "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
24319 "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
24320 "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
24321 "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
24322 .expectedlen = 128,
24323 .addtla = (unsigned char *)
24324 "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
24325 "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
24326 "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
24327 .addtlb = (unsigned char *)
24328 "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
24329 "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
24330 "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
24331 .addtllen = 32,
24332 .pers = NULL,
24333 .perslen = 0,
24334 }, {
24335 .entropy = (unsigned char *)
24336 "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
24337 "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
24338 "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
24339 "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
24340 .entropylen = 48,
24341 .entpra = (unsigned char *)
24342 "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
24343 "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
24344 "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
24345 .entprb = (unsigned char *)
24346 "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
24347 "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
24348 "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
24349 .entprlen = 32,
24350 .expected = (unsigned char *)
24351 "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
24352 "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
24353 "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
24354 "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
24355 "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
24356 "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
24357 "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
24358 "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
24359 "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
24360 "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
24361 "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
24362 .expectedlen = 128,
24363 .addtla = NULL,
24364 .addtlb = NULL,
24365 .addtllen = 0,
24366 .pers = (unsigned char *)
24367 "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
24368 "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
24369 "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
24370 .perslen = 32,
24371 }, {
24372 .entropy = (unsigned char *)
24373 "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
24374 "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
24375 "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
24376 "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
24377 .entropylen = 48,
24378 .entpra = (unsigned char *)
24379 "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
24380 "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
24381 "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
24382 .entprb = (unsigned char *)
24383 "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
24384 "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
24385 "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
24386 .entprlen = 32,
24387 .expected = (unsigned char *)
24388 "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
24389 "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
24390 "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
24391 "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
24392 "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
24393 "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
24394 "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
24395 "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
24396 "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
24397 "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
24398 "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
24399 .expectedlen = 128,
24400 .addtla = (unsigned char *)
24401 "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
24402 "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
24403 "\x86\x88\x55\x28\xc1\x69\xdd\x76",
24404 .addtlb = (unsigned char *)
24405 "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
24406 "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
24407 "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
24408 .addtllen = 32,
24409 .pers = (unsigned char *)
24410 "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
24411 "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
24412 "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
24413 .perslen = 32,
24414 },
24415};
24416
24417static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
24418 {
24419 .entropy = (unsigned char *)
24420 "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
24421 "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
24422 .entropylen = 24,
24423 .entpra = (unsigned char *)
24424 "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
24425 "\xb4\xec\x80\xb1",
24426 .entprb = (unsigned char *)
24427 "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
24428 "\x28\x07\xeb\xc2",
24429 .entprlen = 16,
24430 .expected = (unsigned char *)
24431 "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
24432 "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
24433 "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
24434 "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
24435 "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
24436 "\x8a\xf1\x23\xa8",
24437 .expectedlen = 64,
24438 .addtla = NULL,
24439 .addtlb = NULL,
24440 .addtllen = 0,
24441 .pers = NULL,
24442 .perslen = 0,
24443 }, {
24444 .entropy = (unsigned char *)
24445 "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
24446 "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
24447 .entropylen = 24,
24448 .entpra = (unsigned char *)
24449 "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
24450 "\x67\xd1\x08\xf8",
24451 .entprb = (unsigned char *)
24452 "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
24453 "\xd4\xba\x04\x58",
24454 .entprlen = 16,
24455 .expected = (unsigned char *)
24456 "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
24457 "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
24458 "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
24459 "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
24460 "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
24461 "\xc1\x02\x41\x82",
24462 .expectedlen = 64,
24463 .addtla = (unsigned char *)
24464 "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
24465 "\xeb\xb3\x01\x76",
24466 .addtlb = (unsigned char *)
24467 "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
24468 "\xd0\x7f\xcc\x43",
24469 .addtllen = 16,
24470 .pers = NULL,
24471 .perslen = 0,
24472 }, {
24473 .entropy = (unsigned char *)
24474 "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
24475 "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
24476 .entropylen = 24,
24477 .entpra = (unsigned char *)
24478 "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
24479 "\xc3\x0f\xe3\xb0",
24480 .entprb = (unsigned char *)
24481 "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
24482 "\xd6\x9c\x9d\xe8",
24483 .entprlen = 16,
24484 .expected = (unsigned char *)
24485 "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
24486 "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
24487 "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
24488 "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
24489 "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
24490 "\x72\x82\x0c\xcf",
24491 .expectedlen = 64,
24492 .addtla = NULL,
24493 .addtlb = NULL,
24494 .addtllen = 0,
24495 .pers = (unsigned char *)
24496 "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
24497 "\x21\x52\xb3\xad",
24498 .perslen = 16,
24499 }, {
24500 .entropy = (unsigned char *)
24501 "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
24502 "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
24503 .entropylen = 24,
24504 .entpra = (unsigned char *)
24505 "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
24506 "\xc4\x2c\xe8\x10",
24507 .entprb = (unsigned char *)
24508 "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
24509 "\x08\xf7\xa5\x01",
24510 .entprlen = 16,
24511 .expected = (unsigned char *)
24512 "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
24513 "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
24514 "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
24515 "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
24516 "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
24517 "\x23\xc5\x1f\x68",
24518 .expectedlen = 64,
24519 .addtla = (unsigned char *)
24520 "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
24521 "\x23\x6d\xad\x1d",
24522 .addtlb = (unsigned char *)
24523 "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
24524 "\xbc\x59\x31\x8c",
24525 .addtllen = 16,
24526 .pers = (unsigned char *)
24527 "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
24528 "\x37\x3c\x5c\x0b",
24529 .perslen = 16,
24530 },
24531};
24532
24533/*
24534 * SP800-90A DRBG Test vectors from
24535 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
24536 *
24537 * Test vectors for DRBG without prediction resistance. All types of DRBGs
24538 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
24539 * w/o personalization string, w/ and w/o additional input string).
24540 */
24541static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
24542 {
24543 .entropy = (unsigned char *)
24544 "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
24545 "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
24546 "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
24547 "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
24548 .entropylen = 48,
24549 .expected = (unsigned char *)
24550 "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
24551 "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
24552 "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
24553 "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
24554 "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
24555 "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
24556 "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
24557 "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
24558 "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
24559 "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
24560 "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
24561 .expectedlen = 128,
24562 .addtla = NULL,
24563 .addtlb = NULL,
24564 .addtllen = 0,
24565 .pers = NULL,
24566 .perslen = 0,
24567 }, {
24568 .entropy = (unsigned char *)
24569 "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
24570 "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
24571 "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
24572 "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
24573 .entropylen = 48,
24574 .expected = (unsigned char *)
24575 "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
24576 "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
24577 "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
24578 "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
24579 "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
24580 "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
24581 "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
24582 "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
24583 "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
24584 "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
24585 "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
24586 .expectedlen = 128,
24587 .addtla = (unsigned char *)
24588 "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
24589 "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
24590 "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
24591 .addtlb = (unsigned char *)
24592 "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
24593 "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
24594 "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
24595 .addtllen = 32,
24596 .pers = NULL,
24597 .perslen = 0,
24598 }, {
24599 .entropy = (unsigned char *)
24600 "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
24601 "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
24602 "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
24603 "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
24604 .entropylen = 48,
24605 .expected = (unsigned char *)
24606 "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
24607 "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
24608 "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
24609 "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
24610 "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
24611 "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
24612 "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
24613 "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
24614 "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
24615 "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
24616 "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
24617 .expectedlen = 128,
24618 .addtla = NULL,
24619 .addtlb = NULL,
24620 .addtllen = 0,
24621 .pers = (unsigned char *)
24622 "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
24623 "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
24624 "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
24625 .perslen = 32,
24626 }, {
24627 .entropy = (unsigned char *)
24628 "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
24629 "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
24630 "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
24631 "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
24632 .entropylen = 48,
24633 .expected = (unsigned char *)
24634 "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
24635 "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
24636 "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
24637 "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
24638 "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
24639 "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
24640 "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
24641 "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
24642 "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
24643 "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
24644 "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
24645 .expectedlen = 128,
24646 .addtla = (unsigned char *)
24647 "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
24648 "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
24649 "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
24650 .addtlb = (unsigned char *)
24651 "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
24652 "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
24653 "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
24654 .addtllen = 32,
24655 .pers = (unsigned char *)
24656 "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
24657 "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
24658 "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
24659 .perslen = 32,
24660 },
24661};
24662
24663static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
24664 {
24665 .entropy = (unsigned char *)
24666 "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
24667 "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
24668 "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
24669 "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
24670 .entropylen = 48,
24671 .expected = (unsigned char *)
24672 "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
24673 "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
24674 "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
24675 "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
24676 "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
24677 "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
24678 "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
24679 "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
24680 "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
24681 "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
24682 "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
24683 .expectedlen = 128,
24684 .addtla = NULL,
24685 .addtlb = NULL,
24686 .addtllen = 0,
24687 .pers = NULL,
24688 .perslen = 0,
24689 }, {
24690 .entropy = (unsigned char *)
24691 "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
24692 "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
24693 "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
24694 "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
24695 .entropylen = 48,
24696 .expected = (unsigned char *)
24697 "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
24698 "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
24699 "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
24700 "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
24701 "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
24702 "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
24703 "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
24704 "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
24705 "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
24706 "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
24707 "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
24708 .expectedlen = 128,
24709 .addtla = (unsigned char *)
24710 "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
24711 "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
24712 "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
24713 .addtlb = (unsigned char *)
24714 "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
24715 "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
24716 "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
24717 .addtllen = 32,
24718 .pers = NULL,
24719 .perslen = 0,
24720 }, {
24721 .entropy = (unsigned char *)
24722 "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
24723 "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
24724 "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
24725 "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
24726 .entropylen = 48,
24727 .expected = (unsigned char *)
24728 "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
24729 "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
24730 "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
24731 "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
24732 "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
24733 "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
24734 "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
24735 "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
24736 "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
24737 "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
24738 "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
24739 .expectedlen = 128,
24740 .addtla = NULL,
24741 .addtlb = NULL,
24742 .addtllen = 0,
24743 .pers = (unsigned char *)
24744 "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
24745 "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
24746 "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
24747 .perslen = 32,
24748 }, {
24749 .entropy = (unsigned char *)
24750 "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
24751 "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
24752 "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
24753 "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
24754 .entropylen = 48,
24755 .expected = (unsigned char *)
24756 "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
24757 "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
24758 "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
24759 "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
24760 "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
24761 "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
24762 "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
24763 "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
24764 "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
24765 "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
24766 "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
24767 .expectedlen = 128,
24768 .addtla = (unsigned char *)
24769 "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
24770 "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
24771 "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
24772 .addtlb = (unsigned char *)
24773 "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
24774 "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
24775 "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
24776 .addtllen = 32,
24777 .pers = (unsigned char *)
24778 "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
24779 "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
24780 "\x36\x60\x3b\xca\x37\xc9\xee\x29",
24781 .perslen = 32,
24782 },
24783};
24784
24785static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
24786 {
24787 .entropy = (unsigned char *)
24788 "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
24789 "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
24790 "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
24791 "\xac\x9b\xbb\x00",
24792 .entropylen = 40,
24793 .expected = (unsigned char *)
24794 "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
24795 "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
24796 "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
24797 "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
24798 "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
24799 "\x9a\x9d\xf1\x0d",
24800 .expectedlen = 64,
24801 .addtla = NULL,
24802 .addtlb = NULL,
24803 .addtllen = 0,
24804 .pers = NULL,
24805 .perslen = 0,
24806 },
24807};
24808
24809static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
24810 {
24811 .entropy = (unsigned char *)
24812 "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
24813 "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
24814 "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
24815 "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
24816 .entropylen = 48,
24817 .expected = (unsigned char *)
24818 "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
24819 "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
24820 "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
24821 "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
24822 "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
24823 "\xb4\xf0\x7e\x1d",
24824 .expectedlen = 64,
24825 .addtla = NULL,
24826 .addtlb = NULL,
24827 .addtllen = 0,
24828 .pers = NULL,
24829 .perslen = 0,
24830 },
24831};
24832
24833static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
24834 {
24835 .entropy = (unsigned char *)
24836 "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
24837 "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
24838 .entropylen = 24,
24839 .expected = (unsigned char *)
24840 "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
24841 "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
24842 "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
24843 "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
24844 "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
24845 "\xcb\x2d\xd6\xb0",
24846 .expectedlen = 64,
24847 .addtla = NULL,
24848 .addtlb = NULL,
24849 .addtllen = 0,
24850 .pers = NULL,
24851 .perslen = 0,
24852 }, {
24853 .entropy = (unsigned char *)
24854 "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
24855 "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
24856 .entropylen = 24,
24857 .expected = (unsigned char *)
24858 "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
24859 "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
24860 "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
24861 "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
24862 "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
24863 "\xc3\xdf\xb3\x81",
24864 .expectedlen = 64,
24865 .addtla = (unsigned char *)
24866 "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
24867 "\x91\x4d\x81\x56",
24868 .addtlb = (unsigned char *)
24869 "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
24870 "\x4a\x55\xd1\xc6",
24871 .addtllen = 16,
24872 .pers = NULL,
24873 .perslen = 0,
24874 }, {
24875 .entropy = (unsigned char *)
24876 "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
24877 "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
24878 .entropylen = 24,
24879 .expected = (unsigned char *)
24880 "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
24881 "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
24882 "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
24883 "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
24884 "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
24885 "\x34\x30\x0c\x3d",
24886 .expectedlen = 64,
24887 .addtla = NULL,
24888 .addtlb = NULL,
24889 .addtllen = 0,
24890 .pers = (unsigned char *)
24891 "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
24892 "\x0b\xc6\x97\x54",
24893 .perslen = 16,
24894 }, {
24895 .entropy = (unsigned char *)
24896 "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
24897 "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
24898 .entropylen = 24,
24899 .expected = (unsigned char *)
24900 "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
24901 "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
24902 "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
24903 "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
24904 "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
24905 "\x2b\x49\x1e\x5c",
24906 .expectedlen = 64,
24907 .addtla = (unsigned char *)
24908 "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
24909 "\x44\x85\xe7\xfe",
24910 .addtlb = (unsigned char *)
24911 "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
24912 "\x82\x16\x62\x7f",
24913 .addtllen = 16,
24914 .pers = (unsigned char *)
24915 "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
24916 "\x8e\xcf\xe0\x02",
24917 .perslen = 16,
24918 },
24919};
24920
Herbert Xuda7f0332008-07-31 17:08:25 +080024921/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024922#define CAST5_ENC_TEST_VECTORS 4
24923#define CAST5_DEC_TEST_VECTORS 4
24924#define CAST5_CBC_ENC_TEST_VECTORS 1
24925#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030024926#define CAST5_CTR_ENC_TEST_VECTORS 2
24927#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080024928
24929static struct cipher_testvec cast5_enc_tv_template[] = {
24930 {
24931 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
24932 "\x23\x45\x67\x89\x34\x56\x78\x9a",
24933 .klen = 16,
24934 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24935 .ilen = 8,
24936 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
24937 .rlen = 8,
24938 }, {
24939 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
24940 "\x23\x45",
24941 .klen = 10,
24942 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24943 .ilen = 8,
24944 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
24945 .rlen = 8,
24946 }, {
24947 .key = "\x01\x23\x45\x67\x12",
24948 .klen = 5,
24949 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24950 .ilen = 8,
24951 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
24952 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024953 }, { /* Generated from TF test vectors */
24954 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24955 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24956 .klen = 16,
24957 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24958 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24959 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24960 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24961 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24962 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
24963 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24964 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24965 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24966 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24967 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24968 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24969 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24970 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24971 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24972 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24973 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24974 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24975 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24976 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24977 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24978 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24979 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24980 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24981 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24982 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24983 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24984 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24985 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24986 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24987 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24988 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24989 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24990 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24991 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24992 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24993 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24994 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24995 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24996 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24997 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24998 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24999 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25000 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25001 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25002 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25003 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25004 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25005 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25006 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25007 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25008 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25009 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25010 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25011 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25012 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25013 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25014 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25015 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25016 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25017 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25018 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25019 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25020 .ilen = 496,
25021 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
25022 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
25023 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
25024 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
25025 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
25026 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
25027 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
25028 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
25029 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
25030 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
25031 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
25032 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
25033 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
25034 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
25035 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
25036 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
25037 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
25038 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
25039 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
25040 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
25041 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
25042 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
25043 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
25044 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
25045 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
25046 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
25047 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
25048 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
25049 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
25050 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
25051 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
25052 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
25053 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
25054 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
25055 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
25056 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
25057 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
25058 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
25059 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
25060 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
25061 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
25062 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
25063 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
25064 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
25065 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
25066 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
25067 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
25068 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
25069 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
25070 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
25071 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
25072 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
25073 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
25074 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
25075 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
25076 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
25077 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
25078 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
25079 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
25080 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
25081 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
25082 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
25083 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025084 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025085 .np = 3,
25086 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025087 },
25088};
25089
25090static struct cipher_testvec cast5_dec_tv_template[] = {
25091 {
25092 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
25093 "\x23\x45\x67\x89\x34\x56\x78\x9a",
25094 .klen = 16,
25095 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
25096 .ilen = 8,
25097 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25098 .rlen = 8,
25099 }, {
25100 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
25101 "\x23\x45",
25102 .klen = 10,
25103 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
25104 .ilen = 8,
25105 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25106 .rlen = 8,
25107 }, {
25108 .key = "\x01\x23\x45\x67\x12",
25109 .klen = 5,
25110 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
25111 .ilen = 8,
25112 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25113 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025114 }, { /* Generated from TF test vectors */
25115 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25116 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25117 .klen = 16,
25118 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25119 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
25120 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
25121 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
25122 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
25123 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
25124 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
25125 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
25126 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
25127 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
25128 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
25129 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
25130 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
25131 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
25132 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
25133 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
25134 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
25135 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
25136 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
25137 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
25138 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
25139 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
25140 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
25141 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
25142 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
25143 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
25144 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
25145 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
25146 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
25147 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
25148 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
25149 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
25150 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
25151 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
25152 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
25153 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
25154 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
25155 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
25156 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
25157 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
25158 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
25159 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
25160 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
25161 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
25162 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
25163 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
25164 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
25165 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
25166 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
25167 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
25168 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
25169 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
25170 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
25171 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
25172 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
25173 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
25174 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
25175 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
25176 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
25177 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
25178 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
25179 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
25180 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
25181 .ilen = 496,
25182 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25183 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25184 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25185 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25186 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25187 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25188 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25189 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25190 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25191 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25192 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25193 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25194 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25195 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25196 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25197 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25198 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25199 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25200 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25201 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25202 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25203 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25204 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25205 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25206 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25207 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25208 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25209 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25210 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25211 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25212 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25213 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25214 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25215 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25216 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25217 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25218 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25219 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25220 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25221 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25222 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25223 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25224 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25225 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25226 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25227 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25228 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25229 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25230 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25231 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25232 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25233 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25234 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25235 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25236 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25237 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25238 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25239 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25240 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25241 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25242 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25243 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25244 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025245 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025246 .np = 3,
25247 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025248 },
25249};
25250
25251static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
25252 { /* Generated from TF test vectors */
25253 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25254 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25255 .klen = 16,
25256 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25257 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25258 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25259 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25260 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25261 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25262 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25263 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25264 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25265 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25266 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25267 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25268 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25269 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25270 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25271 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25272 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25273 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25274 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25275 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25276 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25277 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25278 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25279 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25280 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25281 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25282 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25283 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25284 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25285 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25286 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25287 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25288 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25289 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25290 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25291 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25292 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25293 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25294 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25295 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25296 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25297 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25298 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25299 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25300 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25301 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25302 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25303 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25304 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25305 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25306 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25307 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25308 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25309 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25310 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25311 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25312 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25313 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25314 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25315 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25316 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25317 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25318 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25319 .ilen = 496,
25320 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
25321 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
25322 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
25323 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
25324 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
25325 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
25326 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
25327 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
25328 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
25329 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
25330 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
25331 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
25332 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
25333 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
25334 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
25335 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
25336 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
25337 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
25338 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
25339 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
25340 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
25341 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
25342 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
25343 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
25344 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
25345 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
25346 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
25347 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
25348 "\x90\x12\x37\x49\x27\x98\x69\x18"
25349 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
25350 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
25351 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
25352 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
25353 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
25354 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
25355 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
25356 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
25357 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
25358 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
25359 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
25360 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
25361 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
25362 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
25363 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
25364 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
25365 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
25366 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
25367 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
25368 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
25369 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
25370 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
25371 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
25372 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
25373 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
25374 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
25375 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
25376 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
25377 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
25378 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
25379 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
25380 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
25381 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
25382 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025383 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025384 .np = 3,
25385 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025386 },
25387};
25388
25389static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
25390 { /* Generated from TF test vectors */
25391 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25392 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25393 .klen = 16,
25394 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25395 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
25396 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
25397 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
25398 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
25399 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
25400 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
25401 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
25402 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
25403 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
25404 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
25405 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
25406 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
25407 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
25408 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
25409 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
25410 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
25411 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
25412 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
25413 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
25414 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
25415 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
25416 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
25417 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
25418 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
25419 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
25420 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
25421 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
25422 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
25423 "\x90\x12\x37\x49\x27\x98\x69\x18"
25424 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
25425 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
25426 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
25427 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
25428 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
25429 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
25430 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
25431 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
25432 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
25433 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
25434 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
25435 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
25436 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
25437 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
25438 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
25439 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
25440 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
25441 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
25442 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
25443 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
25444 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
25445 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
25446 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
25447 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
25448 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
25449 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
25450 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
25451 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
25452 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
25453 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
25454 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
25455 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
25456 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
25457 .ilen = 496,
25458 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25459 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25460 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25461 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25462 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25463 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25464 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25465 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25466 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25467 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25468 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25469 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25470 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25471 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25472 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25473 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25474 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25475 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25476 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25477 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25478 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25479 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25480 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25481 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25482 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25483 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25484 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25485 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25486 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25487 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25488 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25489 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25490 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25491 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25492 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25493 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25494 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25495 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25496 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25497 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25498 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25499 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25500 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25501 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25502 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25503 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25504 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25505 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25506 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25507 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25508 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25509 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25510 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25511 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25512 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25513 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25514 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25515 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25516 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25517 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25518 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25519 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25520 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025521 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025522 .np = 3,
25523 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025524 },
25525};
25526
25527static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
25528 { /* Generated from TF test vectors */
25529 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25530 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25531 .klen = 16,
25532 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25533 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25534 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030025535 "\x3A",
25536 .ilen = 17,
25537 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25538 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
25539 "\x0C",
25540 .rlen = 17,
25541 }, { /* Generated from TF test vectors */
25542 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25543 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25544 .klen = 16,
25545 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25546 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25547 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025548 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25549 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25550 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25551 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25552 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25553 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25554 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25555 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25556 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25557 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25558 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25559 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25560 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25561 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25562 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25563 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25564 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25565 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25566 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25567 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25568 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25569 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25570 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25571 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25572 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25573 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25574 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25575 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25576 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25577 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25578 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25579 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25580 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25581 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25582 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25583 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25584 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25585 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25586 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25587 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25588 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25589 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25590 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25591 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25592 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25593 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25594 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25595 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25596 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25597 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25598 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25599 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25600 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25601 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25602 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25603 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25604 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25605 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25606 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25607 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25608 .ilen = 496,
25609 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25610 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
25611 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
25612 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
25613 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
25614 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
25615 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
25616 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
25617 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
25618 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
25619 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
25620 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
25621 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
25622 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
25623 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
25624 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
25625 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
25626 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
25627 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
25628 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
25629 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
25630 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
25631 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
25632 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
25633 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
25634 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
25635 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
25636 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
25637 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
25638 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
25639 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
25640 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
25641 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
25642 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
25643 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
25644 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
25645 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
25646 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
25647 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
25648 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
25649 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
25650 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
25651 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
25652 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
25653 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
25654 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
25655 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
25656 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
25657 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
25658 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
25659 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
25660 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
25661 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
25662 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
25663 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
25664 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
25665 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
25666 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
25667 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
25668 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
25669 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
25670 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
25671 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025672 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025673 .np = 3,
25674 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025675 },
25676};
25677
25678static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
25679 { /* Generated from TF test vectors */
25680 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25681 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25682 .klen = 16,
25683 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25684 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25685 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030025686 "\x0C",
25687 .ilen = 17,
25688 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25689 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25690 "\x3A",
25691 .rlen = 17,
25692 }, { /* Generated from TF test vectors */
25693 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25694 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25695 .klen = 16,
25696 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25697 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25698 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025699 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
25700 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
25701 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
25702 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
25703 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
25704 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
25705 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
25706 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
25707 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
25708 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
25709 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
25710 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
25711 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
25712 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
25713 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
25714 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
25715 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
25716 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
25717 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
25718 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
25719 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
25720 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
25721 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
25722 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
25723 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
25724 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
25725 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
25726 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
25727 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
25728 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
25729 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
25730 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
25731 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
25732 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
25733 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
25734 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
25735 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
25736 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
25737 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
25738 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
25739 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
25740 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
25741 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
25742 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
25743 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
25744 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
25745 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
25746 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
25747 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
25748 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
25749 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
25750 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
25751 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
25752 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
25753 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
25754 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
25755 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
25756 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
25757 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
25758 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
25759 .ilen = 496,
25760 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25761 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25762 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25763 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25764 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25765 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25766 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25767 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25768 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25769 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25770 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25771 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25772 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25773 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25774 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25775 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25776 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25777 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25778 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25779 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25780 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25781 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25782 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25783 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25784 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25785 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25786 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25787 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25788 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25789 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25790 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25791 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25792 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25793 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25794 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25795 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25796 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25797 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25798 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25799 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25800 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25801 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25802 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25803 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25804 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25805 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25806 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25807 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25808 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25809 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25810 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25811 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25812 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25813 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25814 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25815 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25816 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25817 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25818 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25819 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25820 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25821 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25822 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025823 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025824 .np = 3,
25825 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025826 },
25827};
25828
25829/*
25830 * ARC4 test vectors from OpenSSL
25831 */
25832#define ARC4_ENC_TEST_VECTORS 7
25833#define ARC4_DEC_TEST_VECTORS 7
25834
25835static struct cipher_testvec arc4_enc_tv_template[] = {
25836 {
25837 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25838 .klen = 8,
25839 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25840 .ilen = 8,
25841 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
25842 .rlen = 8,
25843 }, {
25844 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25845 .klen = 8,
25846 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
25847 .ilen = 8,
25848 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
25849 .rlen = 8,
25850 }, {
25851 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
25852 .klen = 8,
25853 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
25854 .ilen = 8,
25855 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
25856 .rlen = 8,
25857 }, {
25858 .key = "\xef\x01\x23\x45",
25859 .klen = 4,
25860 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
25861 "\x00\x00\x00\x00\x00\x00\x00\x00"
25862 "\x00\x00\x00\x00",
25863 .ilen = 20,
25864 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25865 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
25866 "\x36\xb6\x78\x58",
25867 .rlen = 20,
25868 }, {
25869 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25870 .klen = 8,
25871 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25872 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25873 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25874 "\x12\x34\x56\x78",
25875 .ilen = 28,
25876 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
25877 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
25878 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
25879 "\x40\x01\x1e\xcf",
25880 .rlen = 28,
25881 }, {
25882 .key = "\xef\x01\x23\x45",
25883 .klen = 4,
25884 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
25885 "\x00\x00",
25886 .ilen = 10,
25887 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25888 "\xbd\x61",
25889 .rlen = 10,
25890 }, {
25891 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
25892 "\x00\x00\x00\x00\x00\x00\x00\x00",
25893 .klen = 16,
25894 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
25895 .ilen = 8,
25896 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
25897 .rlen = 8,
25898 },
25899};
25900
25901static struct cipher_testvec arc4_dec_tv_template[] = {
25902 {
25903 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25904 .klen = 8,
25905 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
25906 .ilen = 8,
25907 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25908 .rlen = 8,
25909 }, {
25910 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25911 .klen = 8,
25912 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
25913 .ilen = 8,
25914 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
25915 .rlen = 8,
25916 }, {
25917 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
25918 .klen = 8,
25919 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
25920 .ilen = 8,
25921 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
25922 .rlen = 8,
25923 }, {
25924 .key = "\xef\x01\x23\x45",
25925 .klen = 4,
25926 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25927 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
25928 "\x36\xb6\x78\x58",
25929 .ilen = 20,
25930 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
25931 "\x00\x00\x00\x00\x00\x00\x00\x00"
25932 "\x00\x00\x00\x00",
25933 .rlen = 20,
25934 }, {
25935 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25936 .klen = 8,
25937 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
25938 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
25939 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
25940 "\x40\x01\x1e\xcf",
25941 .ilen = 28,
25942 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25943 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25944 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25945 "\x12\x34\x56\x78",
25946 .rlen = 28,
25947 }, {
25948 .key = "\xef\x01\x23\x45",
25949 .klen = 4,
25950 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25951 "\xbd\x61",
25952 .ilen = 10,
25953 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
25954 "\x00\x00",
25955 .rlen = 10,
25956 }, {
25957 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
25958 "\x00\x00\x00\x00\x00\x00\x00\x00",
25959 .klen = 16,
25960 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
25961 .ilen = 8,
25962 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
25963 .rlen = 8,
25964 },
25965};
25966
25967/*
25968 * TEA test vectors
25969 */
25970#define TEA_ENC_TEST_VECTORS 4
25971#define TEA_DEC_TEST_VECTORS 4
25972
25973static struct cipher_testvec tea_enc_tv_template[] = {
25974 {
25975 .key = zeroed_string,
25976 .klen = 16,
25977 .input = zeroed_string,
25978 .ilen = 8,
25979 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
25980 .rlen = 8,
25981 }, {
25982 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25983 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25984 .klen = 16,
25985 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25986 .ilen = 8,
25987 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
25988 .rlen = 8,
25989 }, {
25990 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
25991 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25992 .klen = 16,
25993 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25994 "\x65\x73\x74\x5f\x76\x65\x63\x74",
25995 .ilen = 16,
25996 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
25997 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
25998 .rlen = 16,
25999 }, {
26000 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26001 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26002 .klen = 16,
26003 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
26004 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26005 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26006 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26007 .ilen = 32,
26008 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
26009 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
26010 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
26011 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
26012 .rlen = 32,
26013 }
26014};
26015
26016static struct cipher_testvec tea_dec_tv_template[] = {
26017 {
26018 .key = zeroed_string,
26019 .klen = 16,
26020 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
26021 .ilen = 8,
26022 .result = zeroed_string,
26023 .rlen = 8,
26024 }, {
26025 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26026 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26027 .klen = 16,
26028 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
26029 .ilen = 8,
26030 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26031 .rlen = 8,
26032 }, {
26033 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26034 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26035 .klen = 16,
26036 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
26037 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
26038 .ilen = 16,
26039 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26040 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26041 .rlen = 16,
26042 }, {
26043 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26044 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26045 .klen = 16,
26046 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
26047 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
26048 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
26049 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
26050 .ilen = 32,
26051 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
26052 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26053 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26054 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26055 .rlen = 32,
26056 }
26057};
26058
26059/*
26060 * XTEA test vectors
26061 */
26062#define XTEA_ENC_TEST_VECTORS 4
26063#define XTEA_DEC_TEST_VECTORS 4
26064
26065static struct cipher_testvec xtea_enc_tv_template[] = {
26066 {
26067 .key = zeroed_string,
26068 .klen = 16,
26069 .input = zeroed_string,
26070 .ilen = 8,
26071 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
26072 .rlen = 8,
26073 }, {
26074 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26075 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26076 .klen = 16,
26077 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26078 .ilen = 8,
26079 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
26080 .rlen = 8,
26081 }, {
26082 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26083 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26084 .klen = 16,
26085 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26086 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26087 .ilen = 16,
26088 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
26089 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
26090 .rlen = 16,
26091 }, {
26092 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26093 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26094 .klen = 16,
26095 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
26096 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26097 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26098 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26099 .ilen = 32,
26100 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
26101 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
26102 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
26103 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
26104 .rlen = 32,
26105 }
26106};
26107
26108static struct cipher_testvec xtea_dec_tv_template[] = {
26109 {
26110 .key = zeroed_string,
26111 .klen = 16,
26112 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
26113 .ilen = 8,
26114 .result = zeroed_string,
26115 .rlen = 8,
26116 }, {
26117 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26118 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26119 .klen = 16,
26120 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
26121 .ilen = 8,
26122 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26123 .rlen = 8,
26124 }, {
26125 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26126 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26127 .klen = 16,
26128 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
26129 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
26130 .ilen = 16,
26131 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26132 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26133 .rlen = 16,
26134 }, {
26135 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26136 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26137 .klen = 16,
26138 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
26139 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
26140 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
26141 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
26142 .ilen = 32,
26143 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
26144 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26145 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26146 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26147 .rlen = 32,
26148 }
26149};
26150
26151/*
26152 * KHAZAD test vectors.
26153 */
26154#define KHAZAD_ENC_TEST_VECTORS 5
26155#define KHAZAD_DEC_TEST_VECTORS 5
26156
26157static struct cipher_testvec khazad_enc_tv_template[] = {
26158 {
26159 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
26160 "\x00\x00\x00\x00\x00\x00\x00\x00",
26161 .klen = 16,
26162 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
26163 .ilen = 8,
26164 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
26165 .rlen = 8,
26166 }, {
26167 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
26168 "\x38\x38\x38\x38\x38\x38\x38\x38",
26169 .klen = 16,
26170 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
26171 .ilen = 8,
26172 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
26173 .rlen = 8,
26174 }, {
26175 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
26176 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26177 .klen = 16,
26178 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26179 .ilen = 8,
26180 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
26181 .rlen = 8,
26182 }, {
26183 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26184 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26185 .klen = 16,
26186 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26187 .ilen = 8,
26188 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26189 .rlen = 8,
26190 }, {
26191 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26192 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26193 .klen = 16,
26194 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26195 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26196 .ilen = 16,
26197 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
26198 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26199 .rlen = 16,
26200 },
26201};
26202
26203static struct cipher_testvec khazad_dec_tv_template[] = {
26204 {
26205 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
26206 "\x00\x00\x00\x00\x00\x00\x00\x00",
26207 .klen = 16,
26208 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
26209 .ilen = 8,
26210 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
26211 .rlen = 8,
26212 }, {
26213 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
26214 "\x38\x38\x38\x38\x38\x38\x38\x38",
26215 .klen = 16,
26216 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
26217 .ilen = 8,
26218 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
26219 .rlen = 8,
26220 }, {
26221 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
26222 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26223 .klen = 16,
26224 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
26225 .ilen = 8,
26226 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26227 .rlen = 8,
26228 }, {
26229 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26230 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26231 .klen = 16,
26232 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26233 .ilen = 8,
26234 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26235 .rlen = 8,
26236 }, {
26237 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26238 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26239 .klen = 16,
26240 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
26241 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26242 .ilen = 16,
26243 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26244 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26245 .rlen = 16,
26246 },
26247};
26248
26249/*
26250 * Anubis test vectors.
26251 */
26252
26253#define ANUBIS_ENC_TEST_VECTORS 5
26254#define ANUBIS_DEC_TEST_VECTORS 5
26255#define ANUBIS_CBC_ENC_TEST_VECTORS 2
26256#define ANUBIS_CBC_DEC_TEST_VECTORS 2
26257
26258static struct cipher_testvec anubis_enc_tv_template[] = {
26259 {
26260 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26261 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26262 .klen = 16,
26263 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26264 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26265 .ilen = 16,
26266 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26267 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
26268 .rlen = 16,
26269 }, {
26270
26271 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
26272 "\x03\x03\x03\x03\x03\x03\x03\x03"
26273 "\x03\x03\x03\x03",
26274 .klen = 20,
26275 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
26276 "\x03\x03\x03\x03\x03\x03\x03\x03",
26277 .ilen = 16,
26278 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
26279 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
26280 .rlen = 16,
26281 }, {
26282 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
26283 "\x24\x24\x24\x24\x24\x24\x24\x24"
26284 "\x24\x24\x24\x24\x24\x24\x24\x24"
26285 "\x24\x24\x24\x24",
26286 .klen = 28,
26287 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
26288 "\x24\x24\x24\x24\x24\x24\x24\x24",
26289 .ilen = 16,
26290 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
26291 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
26292 .rlen = 16,
26293 }, {
26294 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
26295 "\x25\x25\x25\x25\x25\x25\x25\x25"
26296 "\x25\x25\x25\x25\x25\x25\x25\x25"
26297 "\x25\x25\x25\x25\x25\x25\x25\x25",
26298 .klen = 32,
26299 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
26300 "\x25\x25\x25\x25\x25\x25\x25\x25",
26301 .ilen = 16,
26302 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
26303 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
26304 .rlen = 16,
26305 }, {
26306 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26307 "\x35\x35\x35\x35\x35\x35\x35\x35"
26308 "\x35\x35\x35\x35\x35\x35\x35\x35"
26309 "\x35\x35\x35\x35\x35\x35\x35\x35"
26310 "\x35\x35\x35\x35\x35\x35\x35\x35",
26311 .klen = 40,
26312 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
26313 "\x35\x35\x35\x35\x35\x35\x35\x35",
26314 .ilen = 16,
26315 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26316 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
26317 .rlen = 16,
26318 },
26319};
26320
26321static struct cipher_testvec anubis_dec_tv_template[] = {
26322 {
26323 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26324 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26325 .klen = 16,
26326 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26327 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
26328 .ilen = 16,
26329 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26330 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26331 .rlen = 16,
26332 }, {
26333
26334 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
26335 "\x03\x03\x03\x03\x03\x03\x03\x03"
26336 "\x03\x03\x03\x03",
26337 .klen = 20,
26338 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
26339 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
26340 .ilen = 16,
26341 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
26342 "\x03\x03\x03\x03\x03\x03\x03\x03",
26343 .rlen = 16,
26344 }, {
26345 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
26346 "\x24\x24\x24\x24\x24\x24\x24\x24"
26347 "\x24\x24\x24\x24\x24\x24\x24\x24"
26348 "\x24\x24\x24\x24",
26349 .klen = 28,
26350 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
26351 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
26352 .ilen = 16,
26353 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
26354 "\x24\x24\x24\x24\x24\x24\x24\x24",
26355 .rlen = 16,
26356 }, {
26357 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
26358 "\x25\x25\x25\x25\x25\x25\x25\x25"
26359 "\x25\x25\x25\x25\x25\x25\x25\x25"
26360 "\x25\x25\x25\x25\x25\x25\x25\x25",
26361 .klen = 32,
26362 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
26363 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
26364 .ilen = 16,
26365 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
26366 "\x25\x25\x25\x25\x25\x25\x25\x25",
26367 .rlen = 16,
26368 }, {
26369 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26370 "\x35\x35\x35\x35\x35\x35\x35\x35"
26371 "\x35\x35\x35\x35\x35\x35\x35\x35"
26372 "\x35\x35\x35\x35\x35\x35\x35\x35"
26373 "\x35\x35\x35\x35\x35\x35\x35\x35",
26374 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26375 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
26376 .klen = 40,
26377 .ilen = 16,
26378 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
26379 "\x35\x35\x35\x35\x35\x35\x35\x35",
26380 .rlen = 16,
26381 },
26382};
26383
26384static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
26385 {
26386 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26387 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26388 .klen = 16,
26389 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26390 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26391 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26392 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26393 .ilen = 32,
26394 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26395 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
26396 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
26397 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
26398 .rlen = 32,
26399 }, {
26400 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26401 "\x35\x35\x35\x35\x35\x35\x35\x35"
26402 "\x35\x35\x35\x35\x35\x35\x35\x35"
26403 "\x35\x35\x35\x35\x35\x35\x35\x35"
26404 "\x35\x35\x35\x35\x35\x35\x35\x35",
26405 .klen = 40,
26406 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
26407 "\x35\x35\x35\x35\x35\x35\x35\x35"
26408 "\x35\x35\x35\x35\x35\x35\x35\x35"
26409 "\x35\x35\x35\x35\x35\x35\x35\x35",
26410 .ilen = 32,
26411 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26412 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
26413 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
26414 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
26415 .rlen = 32,
26416 },
26417};
26418
26419static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
26420 {
26421 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26422 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26423 .klen = 16,
26424 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26425 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
26426 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
26427 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
26428 .ilen = 32,
26429 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26430 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26431 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26432 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26433 .rlen = 32,
26434 }, {
26435 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26436 "\x35\x35\x35\x35\x35\x35\x35\x35"
26437 "\x35\x35\x35\x35\x35\x35\x35\x35"
26438 "\x35\x35\x35\x35\x35\x35\x35\x35"
26439 "\x35\x35\x35\x35\x35\x35\x35\x35",
26440 .klen = 40,
26441 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26442 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
26443 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
26444 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
26445 .ilen = 32,
26446 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
26447 "\x35\x35\x35\x35\x35\x35\x35\x35"
26448 "\x35\x35\x35\x35\x35\x35\x35\x35"
26449 "\x35\x35\x35\x35\x35\x35\x35\x35",
26450 .rlen = 32,
26451 },
26452};
26453
26454/*
26455 * XETA test vectors
26456 */
26457#define XETA_ENC_TEST_VECTORS 4
26458#define XETA_DEC_TEST_VECTORS 4
26459
26460static struct cipher_testvec xeta_enc_tv_template[] = {
26461 {
26462 .key = zeroed_string,
26463 .klen = 16,
26464 .input = zeroed_string,
26465 .ilen = 8,
26466 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
26467 .rlen = 8,
26468 }, {
26469 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26470 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26471 .klen = 16,
26472 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26473 .ilen = 8,
26474 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
26475 .rlen = 8,
26476 }, {
26477 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26478 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26479 .klen = 16,
26480 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26481 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26482 .ilen = 16,
26483 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
26484 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
26485 .rlen = 16,
26486 }, {
26487 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26488 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26489 .klen = 16,
26490 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
26491 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26492 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26493 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26494 .ilen = 32,
26495 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
26496 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
26497 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
26498 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
26499 .rlen = 32,
26500 }
26501};
26502
26503static struct cipher_testvec xeta_dec_tv_template[] = {
26504 {
26505 .key = zeroed_string,
26506 .klen = 16,
26507 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
26508 .ilen = 8,
26509 .result = zeroed_string,
26510 .rlen = 8,
26511 }, {
26512 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26513 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26514 .klen = 16,
26515 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
26516 .ilen = 8,
26517 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26518 .rlen = 8,
26519 }, {
26520 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26521 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26522 .klen = 16,
26523 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
26524 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
26525 .ilen = 16,
26526 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26527 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26528 .rlen = 16,
26529 }, {
26530 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26531 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26532 .klen = 16,
26533 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
26534 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
26535 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
26536 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
26537 .ilen = 32,
26538 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
26539 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26540 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26541 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26542 .rlen = 32,
26543 }
26544};
26545
26546/*
26547 * FCrypt test vectors
26548 */
26549#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
26550#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
26551
26552static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
26553 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
26554 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
26555 .klen = 8,
26556 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26557 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
26558 .ilen = 8,
26559 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
26560 .rlen = 8,
26561 }, {
26562 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
26563 .klen = 8,
26564 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26565 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
26566 .ilen = 8,
26567 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
26568 .rlen = 8,
26569 }, { /* From Arla */
26570 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26571 .klen = 8,
26572 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26573 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
26574 .ilen = 48,
26575 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
26576 "\xee\xac\x98\x62\x44\x51\xe4\x84"
26577 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
26578 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
26579 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
26580 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
26581 .rlen = 48,
26582 }, {
26583 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26584 .klen = 8,
26585 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26586 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
26587 .ilen = 48,
26588 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26589 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26590 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26591 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26592 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26593 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26594 .rlen = 48,
26595 }, { /* split-page version */
26596 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26597 .klen = 8,
26598 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26599 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
26600 .ilen = 48,
26601 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26602 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26603 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26604 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26605 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26606 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26607 .rlen = 48,
26608 .np = 2,
26609 .tap = { 20, 28 },
26610 }
26611};
26612
26613static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
26614 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
26615 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
26616 .klen = 8,
26617 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26618 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
26619 .ilen = 8,
26620 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
26621 .rlen = 8,
26622 }, {
26623 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
26624 .klen = 8,
26625 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26626 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
26627 .ilen = 8,
26628 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
26629 .rlen = 8,
26630 }, { /* From Arla */
26631 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26632 .klen = 8,
26633 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26634 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
26635 "\xee\xac\x98\x62\x44\x51\xe4\x84"
26636 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
26637 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
26638 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
26639 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
26640 .ilen = 48,
26641 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26642 .rlen = 48,
26643 }, {
26644 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26645 .klen = 8,
26646 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26647 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26648 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26649 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26650 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26651 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26652 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26653 .ilen = 48,
26654 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26655 .rlen = 48,
26656 }, { /* split-page version */
26657 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26658 .klen = 8,
26659 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26660 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26661 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26662 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26663 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26664 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26665 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26666 .ilen = 48,
26667 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26668 .rlen = 48,
26669 .np = 2,
26670 .tap = { 20, 28 },
26671 }
26672};
26673
26674/*
26675 * CAMELLIA test vectors.
26676 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026677#define CAMELLIA_ENC_TEST_VECTORS 4
26678#define CAMELLIA_DEC_TEST_VECTORS 4
26679#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
26680#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
26681#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
26682#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
26683#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
26684#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
26685#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
26686#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080026687
26688static struct cipher_testvec camellia_enc_tv_template[] = {
26689 {
26690 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26691 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26692 .klen = 16,
26693 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26694 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26695 .ilen = 16,
26696 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
26697 "\x08\x57\x06\x56\x48\xea\xbe\x43",
26698 .rlen = 16,
26699 }, {
26700 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26701 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
26702 "\x00\x11\x22\x33\x44\x55\x66\x77",
26703 .klen = 24,
26704 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26705 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26706 .ilen = 16,
26707 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
26708 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
26709 .rlen = 16,
26710 }, {
26711 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26712 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
26713 "\x00\x11\x22\x33\x44\x55\x66\x77"
26714 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
26715 .klen = 32,
26716 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26717 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26718 .ilen = 16,
26719 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
26720 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
26721 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026722 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026723 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
26724 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
26725 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
26726 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
26727 .klen = 32,
26728 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26729 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26730 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26731 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26732 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026733 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26734 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26735 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26736 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26737 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26738 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26739 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26740 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26741 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26742 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26743 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26744 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26745 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26746 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26747 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26748 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26749 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26750 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26751 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26752 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26753 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26754 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26755 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26756 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26757 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26758 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26759 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26760 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26761 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26762 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26763 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26764 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26765 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26766 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26767 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26768 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26769 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26770 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26771 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26772 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26773 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26774 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26775 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26776 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26777 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26778 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26779 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26780 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26781 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26782 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26783 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26784 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26785 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26786 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26787 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26788 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026789 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26790 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26791 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26792 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26793 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26794 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26795 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26796 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26797 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26798 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26799 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26800 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26801 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26802 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26803 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26804 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26805 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26806 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26807 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26808 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26809 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26810 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26811 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26812 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26813 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26814 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26815 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26816 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26817 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26818 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26819 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26820 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26821 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26822 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26823 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26824 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26825 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26826 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26827 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26828 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26829 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26830 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26831 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26832 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26833 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26834 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26835 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26836 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26837 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26838 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26839 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26840 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26841 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26842 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26843 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26844 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26845 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26846 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26847 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26848 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26849 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26850 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26851 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26852 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26853 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26854 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026855 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
26856 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
26857 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
26858 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
26859 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026860 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
26861 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
26862 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
26863 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
26864 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
26865 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
26866 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
26867 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
26868 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
26869 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
26870 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
26871 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
26872 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
26873 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
26874 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
26875 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
26876 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
26877 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
26878 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
26879 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
26880 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
26881 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
26882 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
26883 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
26884 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
26885 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
26886 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
26887 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
26888 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
26889 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
26890 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
26891 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
26892 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
26893 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
26894 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
26895 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
26896 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
26897 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
26898 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
26899 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
26900 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
26901 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
26902 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
26903 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
26904 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
26905 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
26906 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
26907 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
26908 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
26909 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
26910 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
26911 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
26912 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
26913 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
26914 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
26915 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026916 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
26917 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
26918 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
26919 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
26920 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
26921 "\xED\x28\x39\xE9\x63\xED\x41\x70"
26922 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
26923 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
26924 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
26925 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
26926 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
26927 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
26928 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
26929 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
26930 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
26931 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
26932 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
26933 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
26934 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
26935 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
26936 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
26937 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
26938 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
26939 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
26940 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
26941 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
26942 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
26943 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
26944 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
26945 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
26946 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
26947 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
26948 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
26949 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
26950 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
26951 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
26952 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
26953 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
26954 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
26955 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
26956 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
26957 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
26958 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
26959 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
26960 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
26961 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
26962 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
26963 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
26964 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
26965 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
26966 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
26967 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
26968 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
26969 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
26970 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
26971 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
26972 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
26973 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
26974 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
26975 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
26976 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
26977 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
26978 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
26979 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
26980 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
26981 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026982 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020026983 .np = 3,
26984 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026985 },
Herbert Xuda7f0332008-07-31 17:08:25 +080026986};
26987
26988static struct cipher_testvec camellia_dec_tv_template[] = {
26989 {
26990 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26991 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26992 .klen = 16,
26993 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
26994 "\x08\x57\x06\x56\x48\xea\xbe\x43",
26995 .ilen = 16,
26996 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26997 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26998 .rlen = 16,
26999 }, {
27000 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27001 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
27002 "\x00\x11\x22\x33\x44\x55\x66\x77",
27003 .klen = 24,
27004 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
27005 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
27006 .ilen = 16,
27007 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27008 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
27009 .rlen = 16,
27010 }, {
27011 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27012 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
27013 "\x00\x11\x22\x33\x44\x55\x66\x77"
27014 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
27015 .klen = 32,
27016 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
27017 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
27018 .ilen = 16,
27019 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27020 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
27021 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027022 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027023 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
27024 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
27025 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
27026 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
27027 .klen = 32,
27028 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
27029 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
27030 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
27031 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
27032 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027033 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
27034 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
27035 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
27036 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
27037 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
27038 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
27039 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
27040 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
27041 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
27042 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
27043 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
27044 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
27045 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
27046 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
27047 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
27048 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
27049 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
27050 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
27051 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
27052 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
27053 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
27054 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
27055 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
27056 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
27057 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
27058 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
27059 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
27060 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
27061 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
27062 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
27063 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
27064 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
27065 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
27066 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
27067 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
27068 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
27069 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
27070 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
27071 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
27072 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
27073 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
27074 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
27075 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
27076 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
27077 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
27078 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
27079 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
27080 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
27081 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
27082 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
27083 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
27084 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
27085 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
27086 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
27087 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
27088 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027089 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
27090 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
27091 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
27092 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
27093 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
27094 "\xED\x28\x39\xE9\x63\xED\x41\x70"
27095 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
27096 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
27097 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
27098 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
27099 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
27100 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
27101 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
27102 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
27103 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
27104 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
27105 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
27106 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
27107 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
27108 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
27109 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
27110 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
27111 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
27112 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
27113 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
27114 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
27115 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
27116 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
27117 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
27118 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
27119 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
27120 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
27121 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
27122 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
27123 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
27124 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
27125 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
27126 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
27127 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
27128 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
27129 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
27130 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
27131 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
27132 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
27133 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
27134 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
27135 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
27136 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
27137 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
27138 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
27139 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
27140 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
27141 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
27142 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
27143 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
27144 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
27145 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
27146 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
27147 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
27148 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
27149 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
27150 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
27151 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
27152 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
27153 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
27154 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027155 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27156 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27157 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27158 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27159 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027160 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27161 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27162 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27163 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27164 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27165 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27166 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27167 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27168 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27169 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27170 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27171 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27172 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27173 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27174 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27175 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27176 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27177 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27178 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27179 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27180 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27181 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27182 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27183 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27184 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27185 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27186 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27187 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27188 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27189 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27190 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27191 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27192 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27193 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27194 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27195 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27196 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27197 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27198 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27199 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27200 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27201 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27202 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27203 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27204 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27205 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27206 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27207 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27208 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27209 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27210 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27211 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27212 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27213 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27214 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27215 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027216 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27217 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27218 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27219 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27220 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27221 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27222 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27223 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27224 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27225 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27226 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27227 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27228 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27229 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27230 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27231 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27232 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27233 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27234 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27235 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27236 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27237 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27238 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27239 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27240 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27241 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27242 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27243 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27244 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27245 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27246 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27247 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27248 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27249 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27250 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27251 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27252 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27253 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27254 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27255 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27256 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27257 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27258 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27259 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27260 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27261 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27262 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27263 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27264 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27265 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27266 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27267 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27268 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27269 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27270 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27271 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27272 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27273 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27274 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27275 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27276 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27277 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27278 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27279 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27280 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27281 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027282 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027283 .np = 3,
27284 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027285 },
Herbert Xuda7f0332008-07-31 17:08:25 +080027286};
27287
27288static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
27289 {
27290 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
27291 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
27292 .klen = 16,
27293 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
27294 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
27295 .input = "Single block msg",
27296 .ilen = 16,
27297 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
27298 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
27299 .rlen = 16,
27300 }, {
27301 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
27302 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
27303 .klen = 16,
27304 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
27305 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
27306 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
27307 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27308 "\x10\x11\x12\x13\x14\x15\x16\x17"
27309 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
27310 .ilen = 32,
27311 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
27312 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
27313 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
27314 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
27315 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027316 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027317 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27318 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27319 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27320 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27321 .klen = 32,
27322 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27323 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27324 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27325 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27326 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27327 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27328 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027329 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27330 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27331 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27332 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27333 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27334 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27335 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27336 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27337 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27338 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27339 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27340 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27341 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27342 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27343 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27344 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27345 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27346 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27347 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27348 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27349 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27350 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27351 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27352 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27353 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27354 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27355 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27356 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27357 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27358 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27359 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27360 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27361 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27362 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27363 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27364 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27365 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27366 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27367 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27368 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27369 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27370 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27371 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27372 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27373 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27374 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27375 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27376 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27377 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27378 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27379 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27380 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27381 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27382 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27383 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27384 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027385 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27386 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27387 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27388 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27389 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27390 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27391 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27392 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27393 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27394 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27395 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27396 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27397 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27398 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27399 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27400 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27401 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27402 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27403 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27404 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27405 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27406 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27407 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27408 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27409 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27410 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27411 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27412 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27413 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27414 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27415 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27416 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27417 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27418 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27419 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27420 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27421 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27422 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27423 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27424 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27425 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27426 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27427 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27428 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27429 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27430 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27431 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27432 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27433 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27434 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27435 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27436 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27437 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27438 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27439 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27440 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27441 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27442 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27443 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27444 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27445 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27446 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27447 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27448 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27449 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27450 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027451 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
27452 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
27453 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
27454 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
27455 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027456 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
27457 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
27458 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
27459 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
27460 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
27461 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
27462 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
27463 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
27464 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
27465 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
27466 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
27467 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
27468 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
27469 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
27470 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
27471 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
27472 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
27473 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
27474 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
27475 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
27476 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
27477 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
27478 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
27479 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
27480 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
27481 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
27482 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
27483 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
27484 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
27485 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
27486 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
27487 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
27488 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
27489 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
27490 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
27491 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
27492 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
27493 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
27494 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
27495 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
27496 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
27497 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
27498 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
27499 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
27500 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
27501 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
27502 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
27503 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
27504 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
27505 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
27506 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
27507 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
27508 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
27509 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
27510 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
27511 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027512 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
27513 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
27514 "\x21\x41\x56\x72\x13\xE1\x86\x07"
27515 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
27516 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
27517 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
27518 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
27519 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
27520 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
27521 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
27522 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
27523 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
27524 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
27525 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
27526 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
27527 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
27528 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
27529 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
27530 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
27531 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
27532 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
27533 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
27534 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
27535 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
27536 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
27537 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
27538 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
27539 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
27540 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
27541 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
27542 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
27543 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
27544 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
27545 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
27546 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
27547 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
27548 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
27549 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
27550 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
27551 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
27552 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
27553 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
27554 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
27555 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
27556 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
27557 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
27558 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
27559 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
27560 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
27561 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
27562 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
27563 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
27564 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
27565 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
27566 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
27567 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
27568 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
27569 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
27570 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
27571 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
27572 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
27573 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
27574 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
27575 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
27576 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
27577 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027578 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027579 .np = 3,
27580 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027581 },
Herbert Xuda7f0332008-07-31 17:08:25 +080027582};
27583
27584static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
27585 {
27586 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
27587 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
27588 .klen = 16,
27589 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
27590 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
27591 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
27592 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
27593 .ilen = 16,
27594 .result = "Single block msg",
27595 .rlen = 16,
27596 }, {
27597 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
27598 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
27599 .klen = 16,
27600 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
27601 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
27602 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
27603 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
27604 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
27605 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
27606 .ilen = 32,
27607 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
27608 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27609 "\x10\x11\x12\x13\x14\x15\x16\x17"
27610 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
27611 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027612 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027613 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27614 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27615 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27616 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27617 .klen = 32,
27618 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27619 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27620 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
27621 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
27622 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
27623 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
27624 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027625 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
27626 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
27627 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
27628 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
27629 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
27630 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
27631 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
27632 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
27633 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
27634 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
27635 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
27636 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
27637 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
27638 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
27639 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
27640 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
27641 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
27642 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
27643 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
27644 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
27645 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
27646 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
27647 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
27648 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
27649 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
27650 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
27651 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
27652 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
27653 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
27654 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
27655 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
27656 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
27657 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
27658 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
27659 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
27660 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
27661 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
27662 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
27663 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
27664 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
27665 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
27666 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
27667 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
27668 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
27669 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
27670 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
27671 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
27672 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
27673 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
27674 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
27675 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
27676 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
27677 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
27678 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
27679 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
27680 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027681 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
27682 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
27683 "\x21\x41\x56\x72\x13\xE1\x86\x07"
27684 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
27685 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
27686 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
27687 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
27688 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
27689 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
27690 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
27691 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
27692 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
27693 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
27694 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
27695 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
27696 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
27697 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
27698 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
27699 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
27700 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
27701 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
27702 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
27703 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
27704 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
27705 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
27706 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
27707 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
27708 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
27709 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
27710 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
27711 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
27712 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
27713 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
27714 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
27715 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
27716 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
27717 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
27718 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
27719 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
27720 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
27721 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
27722 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
27723 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
27724 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
27725 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
27726 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
27727 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
27728 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
27729 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
27730 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
27731 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
27732 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
27733 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
27734 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
27735 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
27736 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
27737 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
27738 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
27739 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
27740 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
27741 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
27742 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
27743 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
27744 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
27745 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
27746 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027747 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27748 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27749 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27750 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27751 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027752 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27753 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27754 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27755 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27756 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27757 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27758 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27759 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27760 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27761 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27762 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27763 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27764 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27765 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27766 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27767 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27768 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27769 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27770 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27771 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27772 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27773 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27774 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27775 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27776 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27777 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27778 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27779 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27780 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27781 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27782 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27783 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27784 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27785 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27786 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27787 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27788 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27789 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27790 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27791 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27792 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27793 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27794 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27795 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27796 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27797 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27798 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27799 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27800 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27801 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27802 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27803 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27804 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27805 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27806 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27807 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027808 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27809 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27810 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27811 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27812 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27813 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27814 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27815 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27816 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27817 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27818 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27819 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27820 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27821 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27822 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27823 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27824 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27825 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27826 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27827 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27828 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27829 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27830 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27831 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27832 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27833 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27834 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27835 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27836 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27837 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27838 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27839 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27840 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27841 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27842 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27843 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27844 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27845 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27846 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27847 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27848 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27849 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27850 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27851 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27852 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27853 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27854 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27855 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27856 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27857 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27858 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27859 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27860 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27861 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27862 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27863 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27864 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27865 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27866 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27867 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27868 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27869 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27870 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27871 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27872 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27873 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027874 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027875 .np = 3,
27876 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027877 },
27878};
27879
27880static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
27881 { /* Generated with Crypto++ */
27882 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27883 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27884 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27885 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27886 .klen = 32,
27887 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27888 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27889 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27890 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27891 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27892 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27893 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027894 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27895 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27896 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27897 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27898 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27899 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27900 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27901 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27902 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27903 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27904 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27905 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27906 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27907 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27908 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27909 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27910 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27911 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27912 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27913 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27914 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27915 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27916 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27917 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27918 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27919 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27920 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27921 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27922 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27923 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27924 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27925 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27926 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27927 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27928 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27929 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27930 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27931 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27932 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27933 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27934 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27935 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27936 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27937 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27938 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27939 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27940 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27941 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27942 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27943 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27944 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27945 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27946 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27947 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27948 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27949 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27950 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
27951 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027952 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
27953 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
27954 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
27955 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
27956 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027957 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
27958 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
27959 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
27960 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
27961 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
27962 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
27963 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
27964 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
27965 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
27966 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
27967 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
27968 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
27969 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
27970 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
27971 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
27972 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
27973 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
27974 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
27975 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
27976 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
27977 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
27978 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
27979 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
27980 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
27981 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
27982 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
27983 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
27984 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
27985 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
27986 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
27987 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
27988 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
27989 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
27990 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
27991 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
27992 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
27993 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
27994 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
27995 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
27996 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
27997 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
27998 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
27999 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28000 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28001 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28002 "\x76\x44\x45\xF3\x24\x11\x57\x98"
28003 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28004 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28005 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28006 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28007 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28008 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28009 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28010 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28011 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28012 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28013 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
28014 .rlen = 496,
28015 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020028016 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28017 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28018 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28019 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28020 .klen = 32,
28021 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
28022 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
28023 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28024 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28025 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28026 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28027 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28028 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028029 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28030 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28031 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28032 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28033 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28034 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28035 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28036 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28037 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28038 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28039 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28040 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28041 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28042 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28043 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28044 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28045 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28046 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28047 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28048 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28049 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28050 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28051 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28052 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28053 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28054 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28055 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28056 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28057 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28058 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28059 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28060 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28061 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28062 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28063 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28064 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28065 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28066 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28067 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28068 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28069 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28070 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28071 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28072 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28073 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28074 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28075 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28076 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28077 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28078 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28079 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28080 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28081 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28082 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28083 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28084 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028085 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28086 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28087 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28088 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28089 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28090 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28091 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28092 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28093 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28094 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28095 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28096 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28097 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28098 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28099 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28100 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28101 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28102 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28103 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28104 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28105 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28106 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28107 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28108 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28109 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28110 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28111 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28112 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28113 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28114 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28115 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28116 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28117 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28118 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28119 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
28120 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
28121 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
28122 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
28123 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
28124 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28125 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28126 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28127 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28128 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28129 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28130 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28131 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28132 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28133 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28134 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28135 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28136 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28137 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28138 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28139 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28140 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28141 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28142 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28143 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28144 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28145 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28146 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28147 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28148 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
28149 "\xE4\x7B\x12",
28150 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028151 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28152 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28153 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28154 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28155 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
28156 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028157 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28158 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28159 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28160 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28161 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28162 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28163 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28164 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28165 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28166 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28167 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28168 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28169 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28170 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28171 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28172 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28173 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28174 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28175 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28176 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28177 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28178 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28179 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28180 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28181 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28182 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28183 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28184 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28185 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28186 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28187 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28188 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28189 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28190 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28191 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28192 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28193 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28194 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28195 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28196 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28197 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28198 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28199 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28200 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28201 "\x76\x44\x45\xF3\x24\x11\x57\x98"
28202 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28203 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28204 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28205 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28206 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28207 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28208 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28209 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28210 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28211 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28212 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028213 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
28214 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
28215 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
28216 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
28217 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
28218 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
28219 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
28220 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
28221 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
28222 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
28223 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
28224 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
28225 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
28226 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
28227 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
28228 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
28229 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
28230 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
28231 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
28232 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
28233 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
28234 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
28235 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
28236 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
28237 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
28238 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
28239 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
28240 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
28241 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
28242 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
28243 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
28244 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
28245 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
28246 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
28247 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
28248 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
28249 "\x00\x70\x12\x56\x56\x50\xAD\x14"
28250 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
28251 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
28252 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
28253 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
28254 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
28255 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
28256 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
28257 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
28258 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
28259 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
28260 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
28261 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
28262 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
28263 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
28264 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
28265 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
28266 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
28267 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
28268 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
28269 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
28270 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
28271 "\x74\x28\x9D\x05\x30\x20\x62\x41"
28272 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
28273 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
28274 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
28275 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
28276 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
28277 "\xF1\x6B\xD9",
28278 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028279 .also_non_np = 1,
28280 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028281 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030028282 }, { /* Generated with Crypto++ */
28283 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28284 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28285 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28286 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28287 .klen = 32,
28288 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
28289 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
28290 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28291 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28292 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28293 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28294 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28295 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28296 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28297 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28298 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28299 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28300 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28301 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28302 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28303 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28304 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28305 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28306 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28307 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28308 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28309 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28310 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28311 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28312 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28313 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28314 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28315 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28316 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28317 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28318 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28319 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28320 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28321 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28322 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28323 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28324 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28325 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28326 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28327 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28328 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28329 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28330 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28331 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28332 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28333 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28334 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28335 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28336 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28337 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28338 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28339 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28340 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28341 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28342 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28343 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28344 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28345 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28346 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28347 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28348 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28349 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28350 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028351 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
28352 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28353 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28354 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28355 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28356 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28357 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28358 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28359 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28360 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28361 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28362 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28363 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28364 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28365 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28366 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28367 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28368 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28369 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28370 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28371 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28372 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28373 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28374 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28375 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28376 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28377 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28378 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28379 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28380 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28381 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28382 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28383 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28384 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28385 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28386 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
28387 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
28388 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
28389 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
28390 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
28391 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28392 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28393 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28394 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28395 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28396 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28397 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28398 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28399 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28400 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28401 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28402 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28403 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28404 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28405 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28406 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28407 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28408 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28409 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28410 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28411 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28412 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28413 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28414 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28415 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
28416 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030028417 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
28418 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
28419 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
28420 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
28421 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
28422 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
28423 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
28424 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
28425 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
28426 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
28427 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
28428 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
28429 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
28430 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
28431 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
28432 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
28433 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
28434 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
28435 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
28436 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
28437 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
28438 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
28439 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
28440 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
28441 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
28442 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
28443 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
28444 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
28445 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
28446 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
28447 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
28448 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
28449 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
28450 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
28451 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
28452 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
28453 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
28454 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
28455 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
28456 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
28457 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
28458 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
28459 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
28460 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
28461 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
28462 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
28463 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
28464 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
28465 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
28466 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
28467 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
28468 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
28469 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
28470 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
28471 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
28472 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
28473 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
28474 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
28475 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
28476 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
28477 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028478 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
28479 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
28480 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
28481 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
28482 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
28483 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
28484 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
28485 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
28486 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
28487 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
28488 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
28489 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
28490 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
28491 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
28492 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
28493 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
28494 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
28495 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
28496 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
28497 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
28498 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
28499 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
28500 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
28501 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
28502 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
28503 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
28504 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
28505 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
28506 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
28507 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
28508 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
28509 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
28510 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
28511 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
28512 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
28513 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
28514 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
28515 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
28516 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
28517 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
28518 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
28519 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
28520 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
28521 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
28522 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
28523 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
28524 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
28525 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
28526 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
28527 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
28528 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
28529 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
28530 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
28531 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
28532 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
28533 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
28534 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
28535 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
28536 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
28537 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
28538 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
28539 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
28540 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
28541 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
28542 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
28543 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028544 },
28545};
28546
28547static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
28548 { /* Generated with Crypto++ */
28549 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28550 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28551 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28552 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28553 .klen = 32,
28554 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
28555 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
28556 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28557 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28558 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28559 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28560 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028561 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
28562 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28563 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28564 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28565 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28566 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28567 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28568 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28569 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28570 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28571 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28572 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28573 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28574 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28575 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28576 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28577 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28578 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28579 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28580 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28581 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28582 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28583 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28584 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28585 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28586 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28587 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28588 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28589 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28590 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28591 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28592 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28593 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28594 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28595 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28596 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28597 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28598 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28599 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28600 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28601 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28602 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28603 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28604 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28605 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28606 "\x76\x44\x45\xF3\x24\x11\x57\x98"
28607 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28608 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28609 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28610 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28611 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28612 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28613 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28614 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28615 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28616 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28617 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
28618 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028619 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28620 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28621 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28622 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28623 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028624 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28625 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28626 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28627 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28628 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28629 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28630 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28631 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28632 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28633 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28634 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28635 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28636 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28637 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28638 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28639 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28640 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28641 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28642 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28643 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28644 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28645 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28646 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28647 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28648 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28649 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28650 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28651 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28652 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28653 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28654 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28655 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28656 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28657 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28658 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28659 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28660 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28661 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28662 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28663 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28664 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28665 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28666 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28667 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28668 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28669 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28670 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28671 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28672 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28673 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28674 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28675 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28676 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28677 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28678 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28679 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28680 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
28681 .rlen = 496,
28682 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020028683 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28684 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28685 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28686 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28687 .klen = 32,
28688 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
28689 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
28690 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28691 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28692 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28693 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28694 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
28695 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028696 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28697 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28698 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28699 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28700 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28701 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28702 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28703 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28704 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28705 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28706 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28707 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28708 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28709 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28710 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28711 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28712 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28713 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28714 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28715 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28716 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28717 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28718 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28719 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28720 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28721 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28722 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28723 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28724 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28725 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28726 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28727 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28728 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28729 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28730 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28731 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28732 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28733 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28734 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28735 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28736 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28737 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28738 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28739 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28740 "\x76\x44\x45\xF3\x24\x11\x57\x98"
28741 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28742 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28743 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28744 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28745 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28746 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28747 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28748 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28749 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28750 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28751 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028752 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
28753 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
28754 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
28755 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
28756 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
28757 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
28758 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
28759 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
28760 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
28761 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
28762 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
28763 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
28764 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
28765 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
28766 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
28767 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
28768 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
28769 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
28770 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
28771 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
28772 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
28773 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
28774 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
28775 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
28776 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
28777 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
28778 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
28779 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
28780 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
28781 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
28782 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
28783 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
28784 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
28785 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
28786 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
28787 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
28788 "\x00\x70\x12\x56\x56\x50\xAD\x14"
28789 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
28790 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
28791 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
28792 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
28793 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
28794 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
28795 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
28796 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
28797 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
28798 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
28799 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
28800 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
28801 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
28802 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
28803 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
28804 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
28805 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
28806 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
28807 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
28808 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
28809 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
28810 "\x74\x28\x9D\x05\x30\x20\x62\x41"
28811 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
28812 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
28813 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
28814 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
28815 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
28816 "\xF1\x6B\xD9",
28817 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028818 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28819 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28820 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28821 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28822 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28823 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028824 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28825 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28826 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28827 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28828 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28829 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28830 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28831 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28832 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28833 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28834 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28835 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28836 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28837 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28838 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28839 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28840 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28841 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28842 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28843 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28844 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28845 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28846 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28847 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28848 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28849 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28850 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28851 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28852 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28853 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28854 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28855 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28856 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28857 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28858 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28859 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28860 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28861 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28862 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28863 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28864 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28865 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28866 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28867 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28868 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28869 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28870 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28871 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28872 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28873 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28874 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28875 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28876 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28877 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28878 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28879 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028880 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28881 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28882 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28883 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28884 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28885 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28886 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28887 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28888 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28889 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28890 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28891 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28892 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28893 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28894 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28895 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28896 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28897 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28898 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28899 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28900 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28901 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28902 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28903 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28904 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28905 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28906 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28907 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28908 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28909 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28910 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28911 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28912 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28913 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28914 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
28915 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
28916 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
28917 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
28918 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
28919 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28920 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28921 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28922 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28923 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28924 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28925 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28926 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28927 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28928 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28929 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28930 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28931 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28932 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28933 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28934 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28935 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28936 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28937 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28938 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28939 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28940 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28941 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28942 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28943 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
28944 "\xE4\x7B\x12",
28945 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028946 .also_non_np = 1,
28947 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028948 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030028949 }, { /* Generated with Crypto++ */
28950 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28951 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28952 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28953 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28954 .klen = 32,
28955 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
28956 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
28957 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
28958 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
28959 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
28960 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
28961 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
28962 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
28963 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
28964 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
28965 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
28966 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
28967 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
28968 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
28969 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
28970 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
28971 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
28972 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
28973 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
28974 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
28975 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
28976 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
28977 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
28978 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
28979 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
28980 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
28981 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
28982 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
28983 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
28984 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
28985 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
28986 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
28987 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
28988 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
28989 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
28990 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
28991 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
28992 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
28993 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
28994 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
28995 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
28996 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
28997 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
28998 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
28999 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
29000 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
29001 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
29002 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
29003 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
29004 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
29005 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
29006 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
29007 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
29008 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
29009 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
29010 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
29011 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
29012 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
29013 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
29014 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
29015 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
29016 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
29017 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030029018 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
29019 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
29020 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
29021 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
29022 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
29023 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
29024 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
29025 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
29026 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
29027 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
29028 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
29029 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
29030 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
29031 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
29032 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
29033 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
29034 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
29035 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
29036 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
29037 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
29038 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
29039 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
29040 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
29041 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
29042 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
29043 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
29044 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
29045 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
29046 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
29047 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
29048 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
29049 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
29050 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
29051 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
29052 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
29053 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
29054 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
29055 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
29056 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
29057 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
29058 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
29059 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
29060 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
29061 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
29062 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
29063 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
29064 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
29065 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
29066 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
29067 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
29068 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
29069 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
29070 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
29071 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
29072 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
29073 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
29074 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
29075 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
29076 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
29077 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
29078 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
29079 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
29080 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
29081 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
29082 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
29083 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030029084 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
29085 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
29086 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
29087 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
29088 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
29089 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
29090 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
29091 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
29092 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
29093 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
29094 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
29095 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
29096 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
29097 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
29098 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
29099 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
29100 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
29101 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
29102 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
29103 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
29104 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
29105 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
29106 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
29107 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
29108 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
29109 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
29110 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
29111 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
29112 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
29113 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
29114 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
29115 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
29116 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
29117 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
29118 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
29119 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
29120 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
29121 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
29122 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
29123 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
29124 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
29125 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
29126 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
29127 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
29128 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
29129 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
29130 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
29131 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
29132 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
29133 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
29134 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
29135 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
29136 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
29137 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
29138 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
29139 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
29140 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
29141 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
29142 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
29143 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
29144 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030029145 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
29146 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
29147 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
29148 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
29149 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
29150 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
29151 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
29152 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
29153 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
29154 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
29155 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
29156 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
29157 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
29158 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
29159 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
29160 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
29161 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
29162 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
29163 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
29164 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
29165 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
29166 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
29167 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
29168 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
29169 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
29170 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
29171 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
29172 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
29173 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
29174 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
29175 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
29176 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
29177 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
29178 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
29179 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
29180 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
29181 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
29182 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
29183 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
29184 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
29185 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
29186 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
29187 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
29188 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
29189 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
29190 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
29191 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
29192 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
29193 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
29194 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
29195 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
29196 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
29197 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
29198 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
29199 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
29200 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
29201 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
29202 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
29203 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
29204 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
29205 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
29206 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
29207 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
29208 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
29209 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
29210 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020029211 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020029212};
29213
29214static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
29215 /* Generated from AES-LRW test vectors */
29216 {
29217 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
29218 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
29219 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
29220 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
29221 .klen = 32,
29222 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29223 "\x00\x00\x00\x00\x00\x00\x00\x01",
29224 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29225 "\x38\x39\x41\x42\x43\x44\x45\x46",
29226 .ilen = 16,
29227 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
29228 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
29229 .rlen = 16,
29230 }, {
29231 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
29232 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
29233 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
29234 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
29235 .klen = 32,
29236 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29237 "\x00\x00\x00\x00\x00\x00\x00\x02",
29238 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29239 "\x38\x39\x41\x42\x43\x44\x45\x46",
29240 .ilen = 16,
29241 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
29242 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
29243 .rlen = 16,
29244 }, {
29245 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
29246 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
29247 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
29248 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
29249 .klen = 32,
29250 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29251 "\x00\x00\x00\x02\x00\x00\x00\x00",
29252 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29253 "\x38\x39\x41\x42\x43\x44\x45\x46",
29254 .ilen = 16,
29255 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
29256 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
29257 .rlen = 16,
29258 }, {
29259 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
29260 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
29261 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
29262 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
29263 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
29264 .klen = 40,
29265 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29266 "\x00\x00\x00\x00\x00\x00\x00\x01",
29267 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29268 "\x38\x39\x41\x42\x43\x44\x45\x46",
29269 .ilen = 16,
29270 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
29271 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
29272 .rlen = 16,
29273 }, {
29274 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
29275 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
29276 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
29277 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
29278 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
29279 .klen = 40,
29280 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29281 "\x00\x00\x00\x02\x00\x00\x00\x00",
29282 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29283 "\x38\x39\x41\x42\x43\x44\x45\x46",
29284 .ilen = 16,
29285 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
29286 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
29287 .rlen = 16,
29288 }, {
29289 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29290 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29291 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29292 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29293 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29294 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29295 .klen = 48,
29296 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29297 "\x00\x00\x00\x00\x00\x00\x00\x01",
29298 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29299 "\x38\x39\x41\x42\x43\x44\x45\x46",
29300 .ilen = 16,
29301 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
29302 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
29303 .rlen = 16,
29304 }, {
29305 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
29306 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
29307 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
29308 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
29309 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
29310 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
29311 .klen = 48,
29312 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29313 "\x00\x00\x00\x02\x00\x00\x00\x00",
29314 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29315 "\x38\x39\x41\x42\x43\x44\x45\x46",
29316 .ilen = 16,
29317 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
29318 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
29319 .rlen = 16,
29320 }, {
29321 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29322 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29323 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29324 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29325 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29326 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29327 .klen = 48,
29328 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29329 "\x00\x00\x00\x00\x00\x00\x00\x01",
29330 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
29331 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
29332 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
29333 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
29334 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
29335 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
29336 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
29337 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
29338 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
29339 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
29340 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
29341 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
29342 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
29343 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
29344 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
29345 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
29346 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
29347 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
29348 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
29349 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
29350 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
29351 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
29352 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
29353 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
29354 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
29355 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
29356 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
29357 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
29358 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
29359 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
29360 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
29361 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
29362 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
29363 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
29364 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
29365 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
29366 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
29367 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
29368 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
29369 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
29370 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
29371 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
29372 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
29373 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
29374 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
29375 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
29376 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
29377 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
29378 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
29379 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
29380 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
29381 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
29382 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
29383 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
29384 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
29385 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
29386 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
29387 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
29388 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
29389 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
29390 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
29391 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
29392 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
29393 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
29394 .ilen = 512,
29395 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
29396 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
29397 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
29398 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
29399 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
29400 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
29401 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
29402 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
29403 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
29404 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
29405 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
29406 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
29407 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
29408 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
29409 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
29410 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
29411 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
29412 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
29413 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
29414 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
29415 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
29416 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
29417 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
29418 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
29419 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
29420 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
29421 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
29422 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
29423 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
29424 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
29425 "\xed\x14\xa9\x57\x19\x63\x40\x04"
29426 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
29427 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
29428 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
29429 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
29430 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
29431 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
29432 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
29433 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
29434 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
29435 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
29436 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
29437 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
29438 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
29439 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
29440 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
29441 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
29442 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
29443 "\x35\xa5\x83\x04\x84\x01\x99\x56"
29444 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
29445 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
29446 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
29447 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
29448 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
29449 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
29450 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
29451 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
29452 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
29453 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
29454 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
29455 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
29456 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
29457 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
29458 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
29459 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030029460 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020029461 .np = 3,
29462 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020029463 },
29464};
29465
29466static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
29467 /* Generated from AES-LRW test vectors */
29468 /* same as enc vectors with input and result reversed */
29469 {
29470 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
29471 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
29472 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
29473 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
29474 .klen = 32,
29475 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29476 "\x00\x00\x00\x00\x00\x00\x00\x01",
29477 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
29478 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
29479 .ilen = 16,
29480 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29481 "\x38\x39\x41\x42\x43\x44\x45\x46",
29482 .rlen = 16,
29483 }, {
29484 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
29485 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
29486 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
29487 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
29488 .klen = 32,
29489 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29490 "\x00\x00\x00\x00\x00\x00\x00\x02",
29491 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
29492 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
29493 .ilen = 16,
29494 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29495 "\x38\x39\x41\x42\x43\x44\x45\x46",
29496 .rlen = 16,
29497 }, {
29498 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
29499 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
29500 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
29501 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
29502 .klen = 32,
29503 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29504 "\x00\x00\x00\x02\x00\x00\x00\x00",
29505 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
29506 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
29507 .ilen = 16,
29508 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29509 "\x38\x39\x41\x42\x43\x44\x45\x46",
29510 .rlen = 16,
29511 }, {
29512 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
29513 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
29514 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
29515 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
29516 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
29517 .klen = 40,
29518 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29519 "\x00\x00\x00\x00\x00\x00\x00\x01",
29520 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
29521 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
29522 .ilen = 16,
29523 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29524 "\x38\x39\x41\x42\x43\x44\x45\x46",
29525 .rlen = 16,
29526 }, {
29527 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
29528 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
29529 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
29530 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
29531 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
29532 .klen = 40,
29533 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29534 "\x00\x00\x00\x02\x00\x00\x00\x00",
29535 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
29536 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
29537 .ilen = 16,
29538 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29539 "\x38\x39\x41\x42\x43\x44\x45\x46",
29540 .rlen = 16,
29541 }, {
29542 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29543 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29544 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29545 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29546 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29547 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29548 .klen = 48,
29549 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29550 "\x00\x00\x00\x00\x00\x00\x00\x01",
29551 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
29552 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
29553 .ilen = 16,
29554 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29555 "\x38\x39\x41\x42\x43\x44\x45\x46",
29556 .rlen = 16,
29557 }, {
29558 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
29559 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
29560 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
29561 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
29562 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
29563 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
29564 .klen = 48,
29565 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29566 "\x00\x00\x00\x02\x00\x00\x00\x00",
29567 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
29568 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
29569 .ilen = 16,
29570 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29571 "\x38\x39\x41\x42\x43\x44\x45\x46",
29572 .rlen = 16,
29573 }, {
29574 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29575 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29576 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29577 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29578 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29579 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29580 .klen = 48,
29581 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29582 "\x00\x00\x00\x00\x00\x00\x00\x01",
29583 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
29584 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
29585 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
29586 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
29587 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
29588 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
29589 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
29590 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
29591 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
29592 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
29593 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
29594 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
29595 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
29596 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
29597 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
29598 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
29599 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
29600 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
29601 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
29602 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
29603 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
29604 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
29605 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
29606 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
29607 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
29608 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
29609 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
29610 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
29611 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
29612 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
29613 "\xed\x14\xa9\x57\x19\x63\x40\x04"
29614 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
29615 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
29616 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
29617 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
29618 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
29619 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
29620 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
29621 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
29622 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
29623 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
29624 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
29625 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
29626 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
29627 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
29628 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
29629 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
29630 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
29631 "\x35\xa5\x83\x04\x84\x01\x99\x56"
29632 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
29633 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
29634 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
29635 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
29636 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
29637 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
29638 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
29639 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
29640 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
29641 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
29642 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
29643 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
29644 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
29645 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
29646 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
29647 .ilen = 512,
29648 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
29649 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
29650 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
29651 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
29652 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
29653 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
29654 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
29655 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
29656 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
29657 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
29658 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
29659 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
29660 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
29661 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
29662 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
29663 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
29664 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
29665 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
29666 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
29667 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
29668 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
29669 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
29670 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
29671 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
29672 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
29673 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
29674 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
29675 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
29676 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
29677 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
29678 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
29679 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
29680 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
29681 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
29682 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
29683 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
29684 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
29685 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
29686 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
29687 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
29688 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
29689 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
29690 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
29691 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
29692 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
29693 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
29694 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
29695 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
29696 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
29697 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
29698 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
29699 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
29700 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
29701 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
29702 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
29703 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
29704 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
29705 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
29706 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
29707 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
29708 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
29709 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
29710 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
29711 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
29712 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030029713 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020029714 .np = 3,
29715 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020029716 },
29717};
29718
29719static struct cipher_testvec camellia_xts_enc_tv_template[] = {
29720 /* Generated from AES-XTS test vectors */
29721 {
29722 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29723 "\x00\x00\x00\x00\x00\x00\x00\x00"
29724 "\x00\x00\x00\x00\x00\x00\x00\x00"
29725 "\x00\x00\x00\x00\x00\x00\x00\x00",
29726 .klen = 32,
29727 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29728 "\x00\x00\x00\x00\x00\x00\x00\x00",
29729 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29730 "\x00\x00\x00\x00\x00\x00\x00\x00"
29731 "\x00\x00\x00\x00\x00\x00\x00\x00"
29732 "\x00\x00\x00\x00\x00\x00\x00\x00",
29733 .ilen = 32,
29734 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
29735 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
29736 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
29737 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
29738 .rlen = 32,
29739 }, {
29740 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
29741 "\x11\x11\x11\x11\x11\x11\x11\x11"
29742 "\x22\x22\x22\x22\x22\x22\x22\x22"
29743 "\x22\x22\x22\x22\x22\x22\x22\x22",
29744 .klen = 32,
29745 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
29746 "\x00\x00\x00\x00\x00\x00\x00\x00",
29747 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
29748 "\x44\x44\x44\x44\x44\x44\x44\x44"
29749 "\x44\x44\x44\x44\x44\x44\x44\x44"
29750 "\x44\x44\x44\x44\x44\x44\x44\x44",
29751 .ilen = 32,
29752 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
29753 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
29754 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
29755 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
29756 .rlen = 32,
29757 }, {
29758 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
29759 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
29760 "\x22\x22\x22\x22\x22\x22\x22\x22"
29761 "\x22\x22\x22\x22\x22\x22\x22\x22",
29762 .klen = 32,
29763 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
29764 "\x00\x00\x00\x00\x00\x00\x00\x00",
29765 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
29766 "\x44\x44\x44\x44\x44\x44\x44\x44"
29767 "\x44\x44\x44\x44\x44\x44\x44\x44"
29768 "\x44\x44\x44\x44\x44\x44\x44\x44",
29769 .ilen = 32,
29770 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
29771 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
29772 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
29773 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
29774 .rlen = 32,
29775 }, {
29776 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
29777 "\x23\x53\x60\x28\x74\x71\x35\x26"
29778 "\x31\x41\x59\x26\x53\x58\x97\x93"
29779 "\x23\x84\x62\x64\x33\x83\x27\x95",
29780 .klen = 32,
29781 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29782 "\x00\x00\x00\x00\x00\x00\x00\x00",
29783 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
29784 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29785 "\x10\x11\x12\x13\x14\x15\x16\x17"
29786 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29787 "\x20\x21\x22\x23\x24\x25\x26\x27"
29788 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29789 "\x30\x31\x32\x33\x34\x35\x36\x37"
29790 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29791 "\x40\x41\x42\x43\x44\x45\x46\x47"
29792 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29793 "\x50\x51\x52\x53\x54\x55\x56\x57"
29794 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29795 "\x60\x61\x62\x63\x64\x65\x66\x67"
29796 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29797 "\x70\x71\x72\x73\x74\x75\x76\x77"
29798 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29799 "\x80\x81\x82\x83\x84\x85\x86\x87"
29800 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29801 "\x90\x91\x92\x93\x94\x95\x96\x97"
29802 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29803 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29804 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29805 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29806 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29807 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29808 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29809 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29810 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29811 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29812 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29813 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29814 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
29815 "\x00\x01\x02\x03\x04\x05\x06\x07"
29816 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29817 "\x10\x11\x12\x13\x14\x15\x16\x17"
29818 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29819 "\x20\x21\x22\x23\x24\x25\x26\x27"
29820 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29821 "\x30\x31\x32\x33\x34\x35\x36\x37"
29822 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29823 "\x40\x41\x42\x43\x44\x45\x46\x47"
29824 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29825 "\x50\x51\x52\x53\x54\x55\x56\x57"
29826 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29827 "\x60\x61\x62\x63\x64\x65\x66\x67"
29828 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29829 "\x70\x71\x72\x73\x74\x75\x76\x77"
29830 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29831 "\x80\x81\x82\x83\x84\x85\x86\x87"
29832 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29833 "\x90\x91\x92\x93\x94\x95\x96\x97"
29834 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29835 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29836 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29837 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29838 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29839 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29840 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29841 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29842 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29843 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29844 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29845 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29846 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
29847 .ilen = 512,
29848 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
29849 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
29850 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
29851 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
29852 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
29853 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
29854 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
29855 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
29856 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
29857 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
29858 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
29859 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
29860 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
29861 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
29862 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
29863 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
29864 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
29865 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
29866 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
29867 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
29868 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
29869 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
29870 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
29871 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
29872 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
29873 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
29874 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
29875 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
29876 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
29877 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
29878 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
29879 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
29880 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
29881 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
29882 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
29883 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
29884 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
29885 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
29886 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
29887 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
29888 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
29889 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
29890 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
29891 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
29892 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
29893 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
29894 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
29895 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
29896 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
29897 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
29898 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
29899 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
29900 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
29901 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
29902 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
29903 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
29904 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
29905 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
29906 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
29907 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
29908 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
29909 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
29910 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
29911 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
29912 .rlen = 512,
29913 }, {
29914 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
29915 "\x23\x53\x60\x28\x74\x71\x35\x26"
29916 "\x62\x49\x77\x57\x24\x70\x93\x69"
29917 "\x99\x59\x57\x49\x66\x96\x76\x27"
29918 "\x31\x41\x59\x26\x53\x58\x97\x93"
29919 "\x23\x84\x62\x64\x33\x83\x27\x95"
29920 "\x02\x88\x41\x97\x16\x93\x99\x37"
29921 "\x51\x05\x82\x09\x74\x94\x45\x92",
29922 .klen = 64,
29923 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
29924 "\x00\x00\x00\x00\x00\x00\x00\x00",
29925 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
29926 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29927 "\x10\x11\x12\x13\x14\x15\x16\x17"
29928 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29929 "\x20\x21\x22\x23\x24\x25\x26\x27"
29930 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29931 "\x30\x31\x32\x33\x34\x35\x36\x37"
29932 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29933 "\x40\x41\x42\x43\x44\x45\x46\x47"
29934 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29935 "\x50\x51\x52\x53\x54\x55\x56\x57"
29936 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29937 "\x60\x61\x62\x63\x64\x65\x66\x67"
29938 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29939 "\x70\x71\x72\x73\x74\x75\x76\x77"
29940 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29941 "\x80\x81\x82\x83\x84\x85\x86\x87"
29942 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29943 "\x90\x91\x92\x93\x94\x95\x96\x97"
29944 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29945 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29946 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29947 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29948 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29949 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29950 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29951 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29952 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29953 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29954 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29955 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29956 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
29957 "\x00\x01\x02\x03\x04\x05\x06\x07"
29958 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29959 "\x10\x11\x12\x13\x14\x15\x16\x17"
29960 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29961 "\x20\x21\x22\x23\x24\x25\x26\x27"
29962 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29963 "\x30\x31\x32\x33\x34\x35\x36\x37"
29964 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29965 "\x40\x41\x42\x43\x44\x45\x46\x47"
29966 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29967 "\x50\x51\x52\x53\x54\x55\x56\x57"
29968 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29969 "\x60\x61\x62\x63\x64\x65\x66\x67"
29970 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29971 "\x70\x71\x72\x73\x74\x75\x76\x77"
29972 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29973 "\x80\x81\x82\x83\x84\x85\x86\x87"
29974 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29975 "\x90\x91\x92\x93\x94\x95\x96\x97"
29976 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29977 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29978 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29979 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29980 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29981 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29982 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29983 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29984 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29985 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29986 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29987 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29988 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
29989 .ilen = 512,
29990 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
29991 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
29992 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
29993 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
29994 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
29995 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
29996 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
29997 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
29998 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
29999 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
30000 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
30001 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
30002 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
30003 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
30004 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
30005 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
30006 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
30007 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
30008 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
30009 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
30010 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
30011 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
30012 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
30013 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
30014 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
30015 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
30016 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
30017 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
30018 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
30019 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
30020 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
30021 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
30022 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
30023 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
30024 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
30025 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
30026 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
30027 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
30028 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
30029 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
30030 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
30031 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
30032 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
30033 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
30034 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
30035 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
30036 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
30037 "\x21\x17\xf8\x59\x15\x24\x64\x22"
30038 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
30039 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
30040 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
30041 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
30042 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
30043 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
30044 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
30045 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
30046 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
30047 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
30048 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
30049 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
30050 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
30051 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
30052 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
30053 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
30054 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030030055 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020030056 .np = 3,
30057 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020030058 },
30059};
30060
30061static struct cipher_testvec camellia_xts_dec_tv_template[] = {
30062 /* Generated from AES-XTS test vectors */
30063 /* same as enc vectors with input and result reversed */
30064 {
30065 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30066 "\x00\x00\x00\x00\x00\x00\x00\x00"
30067 "\x00\x00\x00\x00\x00\x00\x00\x00"
30068 "\x00\x00\x00\x00\x00\x00\x00\x00",
30069 .klen = 32,
30070 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30071 "\x00\x00\x00\x00\x00\x00\x00\x00",
30072 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
30073 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
30074 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
30075 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
30076 .ilen = 32,
30077 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
30078 "\x00\x00\x00\x00\x00\x00\x00\x00"
30079 "\x00\x00\x00\x00\x00\x00\x00\x00"
30080 "\x00\x00\x00\x00\x00\x00\x00\x00",
30081 .rlen = 32,
30082 }, {
30083 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
30084 "\x11\x11\x11\x11\x11\x11\x11\x11"
30085 "\x22\x22\x22\x22\x22\x22\x22\x22"
30086 "\x22\x22\x22\x22\x22\x22\x22\x22",
30087 .klen = 32,
30088 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
30089 "\x00\x00\x00\x00\x00\x00\x00\x00",
30090 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
30091 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
30092 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
30093 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
30094 .ilen = 32,
30095 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
30096 "\x44\x44\x44\x44\x44\x44\x44\x44"
30097 "\x44\x44\x44\x44\x44\x44\x44\x44"
30098 "\x44\x44\x44\x44\x44\x44\x44\x44",
30099 .rlen = 32,
30100 }, {
30101 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
30102 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
30103 "\x22\x22\x22\x22\x22\x22\x22\x22"
30104 "\x22\x22\x22\x22\x22\x22\x22\x22",
30105 .klen = 32,
30106 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
30107 "\x00\x00\x00\x00\x00\x00\x00\x00",
30108 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
30109 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
30110 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
30111 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
30112 .ilen = 32,
30113 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
30114 "\x44\x44\x44\x44\x44\x44\x44\x44"
30115 "\x44\x44\x44\x44\x44\x44\x44\x44"
30116 "\x44\x44\x44\x44\x44\x44\x44\x44",
30117 .rlen = 32,
30118 }, {
30119 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
30120 "\x23\x53\x60\x28\x74\x71\x35\x26"
30121 "\x31\x41\x59\x26\x53\x58\x97\x93"
30122 "\x23\x84\x62\x64\x33\x83\x27\x95",
30123 .klen = 32,
30124 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30125 "\x00\x00\x00\x00\x00\x00\x00\x00",
30126 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
30127 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
30128 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
30129 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
30130 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
30131 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
30132 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
30133 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
30134 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
30135 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
30136 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
30137 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
30138 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
30139 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
30140 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
30141 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
30142 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
30143 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
30144 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
30145 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
30146 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
30147 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
30148 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
30149 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
30150 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
30151 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
30152 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
30153 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
30154 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
30155 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
30156 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
30157 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
30158 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
30159 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
30160 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
30161 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
30162 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
30163 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
30164 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
30165 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
30166 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
30167 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
30168 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
30169 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
30170 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
30171 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
30172 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
30173 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
30174 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
30175 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
30176 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
30177 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
30178 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
30179 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
30180 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
30181 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
30182 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
30183 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
30184 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
30185 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
30186 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
30187 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
30188 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
30189 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
30190 .ilen = 512,
30191 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30192 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30193 "\x10\x11\x12\x13\x14\x15\x16\x17"
30194 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30195 "\x20\x21\x22\x23\x24\x25\x26\x27"
30196 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30197 "\x30\x31\x32\x33\x34\x35\x36\x37"
30198 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30199 "\x40\x41\x42\x43\x44\x45\x46\x47"
30200 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30201 "\x50\x51\x52\x53\x54\x55\x56\x57"
30202 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30203 "\x60\x61\x62\x63\x64\x65\x66\x67"
30204 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30205 "\x70\x71\x72\x73\x74\x75\x76\x77"
30206 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30207 "\x80\x81\x82\x83\x84\x85\x86\x87"
30208 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30209 "\x90\x91\x92\x93\x94\x95\x96\x97"
30210 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30211 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30212 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30213 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30214 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30215 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30216 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30217 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30218 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30219 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30220 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30221 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30222 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30223 "\x00\x01\x02\x03\x04\x05\x06\x07"
30224 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30225 "\x10\x11\x12\x13\x14\x15\x16\x17"
30226 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30227 "\x20\x21\x22\x23\x24\x25\x26\x27"
30228 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30229 "\x30\x31\x32\x33\x34\x35\x36\x37"
30230 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30231 "\x40\x41\x42\x43\x44\x45\x46\x47"
30232 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30233 "\x50\x51\x52\x53\x54\x55\x56\x57"
30234 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30235 "\x60\x61\x62\x63\x64\x65\x66\x67"
30236 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30237 "\x70\x71\x72\x73\x74\x75\x76\x77"
30238 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30239 "\x80\x81\x82\x83\x84\x85\x86\x87"
30240 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30241 "\x90\x91\x92\x93\x94\x95\x96\x97"
30242 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30243 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30244 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30245 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30246 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30247 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30248 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30249 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30250 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30251 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30252 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30253 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30254 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
30255 .rlen = 512,
30256 }, {
30257 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
30258 "\x23\x53\x60\x28\x74\x71\x35\x26"
30259 "\x62\x49\x77\x57\x24\x70\x93\x69"
30260 "\x99\x59\x57\x49\x66\x96\x76\x27"
30261 "\x31\x41\x59\x26\x53\x58\x97\x93"
30262 "\x23\x84\x62\x64\x33\x83\x27\x95"
30263 "\x02\x88\x41\x97\x16\x93\x99\x37"
30264 "\x51\x05\x82\x09\x74\x94\x45\x92",
30265 .klen = 64,
30266 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
30267 "\x00\x00\x00\x00\x00\x00\x00\x00",
30268 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
30269 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
30270 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
30271 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
30272 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
30273 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
30274 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
30275 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
30276 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
30277 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
30278 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
30279 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
30280 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
30281 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
30282 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
30283 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
30284 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
30285 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
30286 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
30287 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
30288 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
30289 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
30290 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
30291 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
30292 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
30293 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
30294 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
30295 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
30296 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
30297 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
30298 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
30299 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
30300 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
30301 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
30302 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
30303 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
30304 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
30305 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
30306 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
30307 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
30308 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
30309 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
30310 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
30311 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
30312 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
30313 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
30314 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
30315 "\x21\x17\xf8\x59\x15\x24\x64\x22"
30316 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
30317 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
30318 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
30319 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
30320 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
30321 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
30322 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
30323 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
30324 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
30325 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
30326 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
30327 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
30328 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
30329 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
30330 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
30331 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
30332 .ilen = 512,
30333 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30334 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30335 "\x10\x11\x12\x13\x14\x15\x16\x17"
30336 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30337 "\x20\x21\x22\x23\x24\x25\x26\x27"
30338 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30339 "\x30\x31\x32\x33\x34\x35\x36\x37"
30340 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30341 "\x40\x41\x42\x43\x44\x45\x46\x47"
30342 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30343 "\x50\x51\x52\x53\x54\x55\x56\x57"
30344 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30345 "\x60\x61\x62\x63\x64\x65\x66\x67"
30346 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30347 "\x70\x71\x72\x73\x74\x75\x76\x77"
30348 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30349 "\x80\x81\x82\x83\x84\x85\x86\x87"
30350 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30351 "\x90\x91\x92\x93\x94\x95\x96\x97"
30352 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30353 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30354 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30355 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30356 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30357 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30358 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30359 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30360 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30361 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30362 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30363 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30364 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30365 "\x00\x01\x02\x03\x04\x05\x06\x07"
30366 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30367 "\x10\x11\x12\x13\x14\x15\x16\x17"
30368 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30369 "\x20\x21\x22\x23\x24\x25\x26\x27"
30370 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30371 "\x30\x31\x32\x33\x34\x35\x36\x37"
30372 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30373 "\x40\x41\x42\x43\x44\x45\x46\x47"
30374 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30375 "\x50\x51\x52\x53\x54\x55\x56\x57"
30376 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30377 "\x60\x61\x62\x63\x64\x65\x66\x67"
30378 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30379 "\x70\x71\x72\x73\x74\x75\x76\x77"
30380 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30381 "\x80\x81\x82\x83\x84\x85\x86\x87"
30382 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30383 "\x90\x91\x92\x93\x94\x95\x96\x97"
30384 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30385 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30386 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30387 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30388 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30389 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30390 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30391 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30392 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30393 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30394 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30395 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30396 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
30397 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030030398 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020030399 .np = 3,
30400 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020030401 },
Herbert Xuda7f0332008-07-31 17:08:25 +080030402};
30403
30404/*
30405 * SEED test vectors
30406 */
30407#define SEED_ENC_TEST_VECTORS 4
30408#define SEED_DEC_TEST_VECTORS 4
30409
30410static struct cipher_testvec seed_enc_tv_template[] = {
30411 {
30412 .key = zeroed_string,
30413 .klen = 16,
30414 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
30415 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30416 .ilen = 16,
30417 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
30418 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
30419 .rlen = 16,
30420 }, {
30421 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30422 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30423 .klen = 16,
30424 .input = zeroed_string,
30425 .ilen = 16,
30426 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
30427 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
30428 .rlen = 16,
30429 }, {
30430 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
30431 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
30432 .klen = 16,
30433 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
30434 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
30435 .ilen = 16,
30436 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
30437 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
30438 .rlen = 16,
30439 }, {
30440 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
30441 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
30442 .klen = 16,
30443 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
30444 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
30445 .ilen = 16,
30446 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
30447 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
30448 .rlen = 16,
30449 }
30450};
30451
30452static struct cipher_testvec seed_dec_tv_template[] = {
30453 {
30454 .key = zeroed_string,
30455 .klen = 16,
30456 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
30457 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
30458 .ilen = 16,
30459 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30460 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30461 .rlen = 16,
30462 }, {
30463 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30464 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30465 .klen = 16,
30466 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
30467 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
30468 .ilen = 16,
30469 .result = zeroed_string,
30470 .rlen = 16,
30471 }, {
30472 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
30473 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
30474 .klen = 16,
30475 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
30476 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
30477 .ilen = 16,
30478 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
30479 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
30480 .rlen = 16,
30481 }, {
30482 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
30483 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
30484 .klen = 16,
30485 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
30486 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
30487 .ilen = 16,
30488 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
30489 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
30490 .rlen = 16,
30491 }
30492};
30493
30494#define SALSA20_STREAM_ENC_TEST_VECTORS 5
30495static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
30496 /*
30497 * Testvectors from verified.test-vectors submitted to ECRYPT.
30498 * They are truncated to size 39, 64, 111, 129 to test a variety
30499 * of input length.
30500 */
30501 { /* Set 3, vector 0 */
30502 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30503 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
30504 .klen = 16,
30505 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
30506 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30507 "\x00\x00\x00\x00\x00\x00\x00\x00"
30508 "\x00\x00\x00\x00\x00\x00\x00\x00"
30509 "\x00\x00\x00\x00\x00\x00\x00\x00"
30510 "\x00\x00\x00\x00\x00\x00\x00",
30511 .ilen = 39,
30512 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
30513 "\x68\x02\x41\x0C\x68\x86\x88\x89"
30514 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
30515 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
30516 "\x58\x3F\x52\x79\x70\xEB\xC1",
30517 .rlen = 39,
30518 }, { /* Set 5, vector 0 */
30519 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30520 "\x00\x00\x00\x00\x00\x00\x00\x00",
30521 .klen = 16,
30522 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
30523 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30524 "\x00\x00\x00\x00\x00\x00\x00\x00"
30525 "\x00\x00\x00\x00\x00\x00\x00\x00"
30526 "\x00\x00\x00\x00\x00\x00\x00\x00"
30527 "\x00\x00\x00\x00\x00\x00\x00\x00"
30528 "\x00\x00\x00\x00\x00\x00\x00\x00"
30529 "\x00\x00\x00\x00\x00\x00\x00\x00"
30530 "\x00\x00\x00\x00\x00\x00\x00\x00",
30531 .ilen = 64,
30532 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
30533 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
30534 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
30535 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
30536 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
30537 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
30538 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
30539 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
30540 .rlen = 64,
30541 }, { /* Set 3, vector 27 */
30542 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
30543 "\x23\x24\x25\x26\x27\x28\x29\x2A"
30544 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
30545 "\x33\x34\x35\x36\x37\x38\x39\x3A",
30546 .klen = 32,
30547 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
30548 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30549 "\x00\x00\x00\x00\x00\x00\x00\x00"
30550 "\x00\x00\x00\x00\x00\x00\x00\x00"
30551 "\x00\x00\x00\x00\x00\x00\x00\x00"
30552 "\x00\x00\x00\x00\x00\x00\x00\x00"
30553 "\x00\x00\x00\x00\x00\x00\x00\x00"
30554 "\x00\x00\x00\x00\x00\x00\x00\x00"
30555 "\x00\x00\x00\x00\x00\x00\x00\x00"
30556 "\x00\x00\x00\x00\x00\x00\x00\x00"
30557 "\x00\x00\x00\x00\x00\x00\x00\x00"
30558 "\x00\x00\x00\x00\x00\x00\x00\x00"
30559 "\x00\x00\x00\x00\x00\x00\x00\x00"
30560 "\x00\x00\x00\x00\x00\x00\x00\x00"
30561 "\x00\x00\x00\x00\x00\x00\x00",
30562 .ilen = 111,
30563 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
30564 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
30565 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
30566 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
30567 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
30568 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
30569 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
30570 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
30571 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
30572 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
30573 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
30574 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
30575 "\x95\x46\x45\x54\xE9\x75\x03\x08"
30576 "\x44\xAF\xE5\x8A\x81\x12\x09",
30577 .rlen = 111,
30578 }, { /* Set 5, vector 27 */
30579 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30580 "\x00\x00\x00\x00\x00\x00\x00\x00"
30581 "\x00\x00\x00\x00\x00\x00\x00\x00"
30582 "\x00\x00\x00\x00\x00\x00\x00\x00",
30583 .klen = 32,
30584 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
30585 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30586 "\x00\x00\x00\x00\x00\x00\x00\x00"
30587 "\x00\x00\x00\x00\x00\x00\x00\x00"
30588 "\x00\x00\x00\x00\x00\x00\x00\x00"
30589 "\x00\x00\x00\x00\x00\x00\x00\x00"
30590 "\x00\x00\x00\x00\x00\x00\x00\x00"
30591 "\x00\x00\x00\x00\x00\x00\x00\x00"
30592 "\x00\x00\x00\x00\x00\x00\x00\x00"
30593 "\x00\x00\x00\x00\x00\x00\x00\x00"
30594 "\x00\x00\x00\x00\x00\x00\x00\x00"
30595 "\x00\x00\x00\x00\x00\x00\x00\x00"
30596 "\x00\x00\x00\x00\x00\x00\x00\x00"
30597 "\x00\x00\x00\x00\x00\x00\x00\x00"
30598 "\x00\x00\x00\x00\x00\x00\x00\x00"
30599 "\x00\x00\x00\x00\x00\x00\x00\x00"
30600 "\x00\x00\x00\x00\x00\x00\x00\x00"
30601 "\x00",
30602 .ilen = 129,
30603 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
30604 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
30605 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
30606 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
30607 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
30608 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
30609 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
30610 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
30611 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
30612 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
30613 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
30614 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
30615 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
30616 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
30617 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
30618 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
30619 "\x5A",
30620 .rlen = 129,
30621 }, { /* large test vector generated using Crypto++ */
30622 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30623 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30624 "\x10\x11\x12\x13\x14\x15\x16\x17"
30625 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
30626 .klen = 32,
30627 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30628 "\x00\x00\x00\x00\x00\x00\x00\x00",
30629 .input =
30630 "\x00\x01\x02\x03\x04\x05\x06\x07"
30631 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30632 "\x10\x11\x12\x13\x14\x15\x16\x17"
30633 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30634 "\x20\x21\x22\x23\x24\x25\x26\x27"
30635 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30636 "\x30\x31\x32\x33\x34\x35\x36\x37"
30637 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30638 "\x40\x41\x42\x43\x44\x45\x46\x47"
30639 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30640 "\x50\x51\x52\x53\x54\x55\x56\x57"
30641 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30642 "\x60\x61\x62\x63\x64\x65\x66\x67"
30643 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30644 "\x70\x71\x72\x73\x74\x75\x76\x77"
30645 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30646 "\x80\x81\x82\x83\x84\x85\x86\x87"
30647 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30648 "\x90\x91\x92\x93\x94\x95\x96\x97"
30649 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30650 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30651 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30652 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30653 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30654 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30655 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30656 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30657 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30658 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30659 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30660 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30661 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30662 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
30663 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
30664 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
30665 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
30666 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
30667 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
30668 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
30669 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
30670 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
30671 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
30672 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
30673 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
30674 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
30675 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
30676 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
30677 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
30678 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
30679 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
30680 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
30681 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
30682 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
30683 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
30684 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
30685 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
30686 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
30687 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
30688 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
30689 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
30690 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
30691 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
30692 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
30693 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
30694 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
30695 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
30696 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
30697 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
30698 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
30699 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
30700 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
30701 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
30702 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
30703 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
30704 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
30705 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
30706 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
30707 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
30708 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
30709 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
30710 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
30711 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
30712 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
30713 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
30714 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
30715 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
30716 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
30717 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
30718 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
30719 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
30720 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
30721 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
30722 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
30723 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
30724 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
30725 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
30726 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
30727 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
30728 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
30729 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
30730 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
30731 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
30732 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
30733 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
30734 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
30735 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
30736 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
30737 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
30738 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
30739 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
30740 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
30741 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
30742 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
30743 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
30744 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
30745 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
30746 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
30747 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
30748 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
30749 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
30750 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
30751 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
30752 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
30753 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
30754 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
30755 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
30756 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
30757 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
30758 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
30759 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
30760 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
30761 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
30762 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
30763 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
30764 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
30765 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
30766 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
30767 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
30768 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
30769 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
30770 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
30771 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
30772 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
30773 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
30774 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
30775 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
30776 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
30777 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
30778 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
30779 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
30780 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
30781 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
30782 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
30783 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
30784 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
30785 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
30786 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
30787 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
30788 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
30789 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
30790 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
30791 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
30792 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
30793 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
30794 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
30795 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
30796 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
30797 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
30798 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
30799 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
30800 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
30801 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
30802 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
30803 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
30804 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
30805 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
30806 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
30807 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
30808 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
30809 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
30810 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
30811 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
30812 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
30813 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
30814 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
30815 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
30816 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
30817 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
30818 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
30819 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
30820 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
30821 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
30822 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
30823 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
30824 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
30825 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
30826 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
30827 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
30828 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
30829 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
30830 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
30831 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
30832 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
30833 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
30834 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
30835 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
30836 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
30837 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
30838 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
30839 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
30840 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
30841 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
30842 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
30843 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
30844 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
30845 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
30846 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
30847 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
30848 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
30849 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
30850 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
30851 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
30852 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
30853 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
30854 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
30855 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
30856 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
30857 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
30858 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
30859 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
30860 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
30861 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
30862 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
30863 "\x38\x47\x56\x65\x74\x83\x92\xa1"
30864 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
30865 "\x28\x37\x46\x55\x64\x73\x82\x91"
30866 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
30867 "\x18\x27\x36\x45\x54\x63\x72\x81"
30868 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
30869 "\x08\x17\x26\x35\x44\x53\x62\x71"
30870 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
30871 "\xf8\x07\x16\x25\x34\x43\x52\x61"
30872 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
30873 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
30874 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
30875 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
30876 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
30877 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
30878 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
30879 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
30880 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
30881 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
30882 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
30883 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
30884 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
30885 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
30886 "\x00\x11\x22\x33\x44\x55\x66\x77"
30887 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
30888 "\x10\x21\x32\x43\x54\x65\x76\x87"
30889 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
30890 "\x20\x31\x42\x53\x64\x75\x86\x97"
30891 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
30892 "\x30\x41\x52\x63\x74\x85\x96\xa7"
30893 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
30894 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
30895 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
30896 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
30897 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
30898 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
30899 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
30900 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
30901 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
30902 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
30903 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
30904 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
30905 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
30906 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
30907 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
30908 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
30909 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
30910 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
30911 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
30912 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
30913 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
30914 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
30915 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
30916 "\xf0\x01\x12\x23\x34\x45\x56\x67"
30917 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
30918 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
30919 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
30920 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
30921 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
30922 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
30923 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
30924 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
30925 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
30926 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
30927 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
30928 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
30929 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
30930 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
30931 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
30932 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
30933 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
30934 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
30935 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
30936 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
30937 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
30938 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
30939 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
30940 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
30941 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
30942 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
30943 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
30944 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
30945 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
30946 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
30947 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
30948 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
30949 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
30950 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
30951 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
30952 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
30953 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
30954 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
30955 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
30956 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
30957 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
30958 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
30959 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
30960 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
30961 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
30962 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
30963 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
30964 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
30965 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
30966 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
30967 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
30968 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
30969 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
30970 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
30971 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
30972 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
30973 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
30974 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
30975 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
30976 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
30977 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
30978 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
30979 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
30980 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
30981 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
30982 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
30983 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
30984 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
30985 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
30986 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
30987 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
30988 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
30989 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
30990 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
30991 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
30992 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
30993 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
30994 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
30995 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
30996 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
30997 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
30998 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
30999 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
31000 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
31001 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
31002 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
31003 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
31004 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
31005 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
31006 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
31007 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
31008 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
31009 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
31010 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
31011 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
31012 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
31013 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
31014 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
31015 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
31016 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
31017 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
31018 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
31019 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
31020 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
31021 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
31022 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
31023 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
31024 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
31025 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
31026 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
31027 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
31028 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
31029 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
31030 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
31031 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
31032 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
31033 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
31034 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
31035 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
31036 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
31037 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
31038 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
31039 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
31040 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
31041 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
31042 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
31043 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
31044 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
31045 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
31046 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
31047 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
31048 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
31049 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
31050 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
31051 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
31052 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
31053 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
31054 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
31055 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
31056 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
31057 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
31058 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
31059 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
31060 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
31061 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
31062 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
31063 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
31064 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
31065 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
31066 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
31067 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
31068 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
31069 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
31070 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
31071 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
31072 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
31073 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
31074 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
31075 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
31076 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
31077 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
31078 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
31079 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
31080 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
31081 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
31082 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
31083 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
31084 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
31085 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
31086 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
31087 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
31088 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
31089 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
31090 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
31091 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
31092 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
31093 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
31094 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
31095 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
31096 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
31097 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
31098 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
31099 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
31100 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
31101 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
31102 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
31103 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
31104 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
31105 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
31106 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
31107 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
31108 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
31109 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
31110 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
31111 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
31112 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
31113 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
31114 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
31115 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
31116 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
31117 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
31118 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
31119 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
31120 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
31121 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
31122 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
31123 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
31124 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
31125 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
31126 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
31127 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
31128 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
31129 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
31130 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
31131 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
31132 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
31133 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
31134 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
31135 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
31136 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
31137 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
31138 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
31139 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
31140 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
31141 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
31142 "\x00\x21\x42\x63",
31143 .ilen = 4100,
31144 .result =
31145 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
31146 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
31147 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
31148 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
31149 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
31150 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
31151 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
31152 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
31153 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
31154 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
31155 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
31156 "\xbb\xde\x56\x86\xab\x65\x21\x30"
31157 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
31158 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
31159 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
31160 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
31161 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
31162 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
31163 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
31164 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
31165 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
31166 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
31167 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
31168 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
31169 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
31170 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
31171 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
31172 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
31173 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
31174 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
31175 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
31176 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
31177 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
31178 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
31179 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
31180 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
31181 "\x62\x08\x18\x7a\x25\x49\x28\xac"
31182 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
31183 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
31184 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
31185 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
31186 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
31187 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
31188 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
31189 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
31190 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
31191 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
31192 "\x33\xee\x14\x19\x22\x52\x89\xa7"
31193 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
31194 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
31195 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
31196 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
31197 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
31198 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
31199 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
31200 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
31201 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
31202 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
31203 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
31204 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
31205 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
31206 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
31207 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
31208 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
31209 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
31210 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
31211 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
31212 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
31213 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
31214 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
31215 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
31216 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
31217 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
31218 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
31219 "\x49\x97\x33\xab\x36\x14\x0a\x70"
31220 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
31221 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
31222 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
31223 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
31224 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
31225 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
31226 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
31227 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
31228 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
31229 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
31230 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
31231 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
31232 "\xad\x04\x07\xae\x22\x90\x4a\x93"
31233 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
31234 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
31235 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
31236 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
31237 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
31238 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
31239 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
31240 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
31241 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
31242 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
31243 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
31244 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
31245 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
31246 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
31247 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
31248 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
31249 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
31250 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
31251 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
31252 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
31253 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
31254 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
31255 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
31256 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
31257 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
31258 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
31259 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
31260 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
31261 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
31262 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
31263 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
31264 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
31265 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
31266 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
31267 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
31268 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
31269 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
31270 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
31271 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
31272 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
31273 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
31274 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
31275 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
31276 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
31277 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
31278 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
31279 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
31280 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
31281 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
31282 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
31283 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
31284 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
31285 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
31286 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
31287 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
31288 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
31289 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
31290 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
31291 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
31292 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
31293 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
31294 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
31295 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
31296 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
31297 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
31298 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
31299 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
31300 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
31301 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
31302 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
31303 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
31304 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
31305 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
31306 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
31307 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
31308 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
31309 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
31310 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
31311 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
31312 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
31313 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
31314 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
31315 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
31316 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
31317 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
31318 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
31319 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
31320 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
31321 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
31322 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
31323 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
31324 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
31325 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
31326 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
31327 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
31328 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
31329 "\x2e\x53\x49\x97\x94\x33\xae\x40"
31330 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
31331 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
31332 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
31333 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
31334 "\xce\x87\xad\xcc\x72\x05\x00\x29"
31335 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
31336 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
31337 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
31338 "\xac\xc0\x79\x50\x69\xca\x59\x32"
31339 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
31340 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
31341 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
31342 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
31343 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
31344 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
31345 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
31346 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
31347 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
31348 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
31349 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
31350 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
31351 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
31352 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
31353 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
31354 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
31355 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
31356 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
31357 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
31358 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
31359 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
31360 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
31361 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
31362 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
31363 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
31364 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
31365 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
31366 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
31367 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
31368 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
31369 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
31370 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
31371 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
31372 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
31373 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
31374 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
31375 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
31376 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
31377 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
31378 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
31379 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
31380 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
31381 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
31382 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
31383 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
31384 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
31385 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
31386 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
31387 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
31388 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
31389 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
31390 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
31391 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
31392 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
31393 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
31394 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
31395 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
31396 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
31397 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
31398 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
31399 "\x38\x55\xab\x33\x26\xef\x9f\x43"
31400 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
31401 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
31402 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
31403 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
31404 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
31405 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
31406 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
31407 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
31408 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
31409 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
31410 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
31411 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
31412 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
31413 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
31414 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
31415 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
31416 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
31417 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
31418 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
31419 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
31420 "\x62\x36\x43\xb2\x82\x15\x75\x50"
31421 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
31422 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
31423 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
31424 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
31425 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
31426 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
31427 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
31428 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
31429 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
31430 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
31431 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
31432 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
31433 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
31434 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
31435 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
31436 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
31437 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
31438 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
31439 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
31440 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
31441 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
31442 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
31443 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
31444 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
31445 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
31446 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
31447 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
31448 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
31449 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
31450 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
31451 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
31452 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
31453 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
31454 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
31455 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
31456 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
31457 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
31458 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
31459 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
31460 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
31461 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
31462 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
31463 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
31464 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
31465 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
31466 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
31467 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
31468 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
31469 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
31470 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
31471 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
31472 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
31473 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
31474 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
31475 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
31476 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
31477 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
31478 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
31479 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
31480 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
31481 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
31482 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
31483 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
31484 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
31485 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
31486 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
31487 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
31488 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
31489 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
31490 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
31491 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
31492 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
31493 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
31494 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
31495 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
31496 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
31497 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
31498 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
31499 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
31500 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
31501 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
31502 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
31503 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
31504 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
31505 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
31506 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
31507 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
31508 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
31509 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
31510 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
31511 "\x73\x2e\x71\x79\x16\x06\x63\x28"
31512 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
31513 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
31514 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
31515 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
31516 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
31517 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
31518 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
31519 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
31520 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
31521 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
31522 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
31523 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
31524 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
31525 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
31526 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
31527 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
31528 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
31529 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
31530 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
31531 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
31532 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
31533 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
31534 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
31535 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
31536 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
31537 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
31538 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
31539 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
31540 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
31541 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
31542 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
31543 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
31544 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
31545 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
31546 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
31547 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
31548 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
31549 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
31550 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
31551 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
31552 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
31553 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
31554 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
31555 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
31556 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
31557 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
31558 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
31559 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
31560 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
31561 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
31562 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
31563 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
31564 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
31565 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
31566 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
31567 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
31568 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
31569 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
31570 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
31571 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
31572 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
31573 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
31574 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
31575 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
31576 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
31577 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
31578 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
31579 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
31580 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
31581 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
31582 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
31583 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
31584 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
31585 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
31586 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
31587 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
31588 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
31589 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
31590 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
31591 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
31592 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
31593 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
31594 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
31595 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
31596 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
31597 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
31598 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
31599 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
31600 "\x85\x73\x78\x45\x20\x7f\xae\x13"
31601 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
31602 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
31603 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
31604 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
31605 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
31606 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
31607 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
31608 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
31609 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
31610 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
31611 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
31612 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
31613 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
31614 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
31615 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
31616 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
31617 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
31618 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
31619 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
31620 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
31621 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
31622 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
31623 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
31624 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
31625 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
31626 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
31627 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
31628 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
31629 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
31630 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
31631 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
31632 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
31633 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
31634 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
31635 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
31636 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
31637 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
31638 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
31639 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
31640 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
31641 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
31642 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
31643 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
31644 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
31645 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
31646 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
31647 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
31648 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
31649 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
31650 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
31651 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
31652 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
31653 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
31654 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
31655 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
31656 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
31657 "\xaf\xdf\x11\x95",
31658 .rlen = 4100,
31659 .np = 2,
31660 .tap = { 4064, 36 },
31661 },
31662};
31663
Martin Willi6692cbc22015-07-16 19:14:04 +020031664#define CHACHA20_ENC_TEST_VECTORS 4
Martin Willi3590ebf2015-06-01 13:43:57 +020031665static struct cipher_testvec chacha20_enc_tv_template[] = {
31666 { /* RFC7539 A.2. Test Vector #1 */
31667 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
31668 "\x00\x00\x00\x00\x00\x00\x00\x00"
31669 "\x00\x00\x00\x00\x00\x00\x00\x00"
31670 "\x00\x00\x00\x00\x00\x00\x00\x00",
31671 .klen = 32,
31672 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
31673 "\x00\x00\x00\x00\x00\x00\x00\x00",
31674 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
31675 "\x00\x00\x00\x00\x00\x00\x00\x00"
31676 "\x00\x00\x00\x00\x00\x00\x00\x00"
31677 "\x00\x00\x00\x00\x00\x00\x00\x00"
31678 "\x00\x00\x00\x00\x00\x00\x00\x00"
31679 "\x00\x00\x00\x00\x00\x00\x00\x00"
31680 "\x00\x00\x00\x00\x00\x00\x00\x00"
31681 "\x00\x00\x00\x00\x00\x00\x00\x00",
31682 .ilen = 64,
31683 .result = "\x76\xb8\xe0\xad\xa0\xf1\x3d\x90"
31684 "\x40\x5d\x6a\xe5\x53\x86\xbd\x28"
31685 "\xbd\xd2\x19\xb8\xa0\x8d\xed\x1a"
31686 "\xa8\x36\xef\xcc\x8b\x77\x0d\xc7"
31687 "\xda\x41\x59\x7c\x51\x57\x48\x8d"
31688 "\x77\x24\xe0\x3f\xb8\xd8\x4a\x37"
31689 "\x6a\x43\xb8\xf4\x15\x18\xa1\x1c"
31690 "\xc3\x87\xb6\x69\xb2\xee\x65\x86",
31691 .rlen = 64,
31692 }, { /* RFC7539 A.2. Test Vector #2 */
31693 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
31694 "\x00\x00\x00\x00\x00\x00\x00\x00"
31695 "\x00\x00\x00\x00\x00\x00\x00\x00"
31696 "\x00\x00\x00\x00\x00\x00\x00\x01",
31697 .klen = 32,
31698 .iv = "\x01\x00\x00\x00\x00\x00\x00\x00"
31699 "\x00\x00\x00\x00\x00\x00\x00\x02",
31700 .input = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
31701 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
31702 "\x6f\x20\x74\x68\x65\x20\x49\x45"
31703 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
31704 "\x64\x65\x64\x20\x62\x79\x20\x74"
31705 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
31706 "\x69\x62\x75\x74\x6f\x72\x20\x66"
31707 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
31708 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
31709 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
31710 "\x20\x70\x61\x72\x74\x20\x6f\x66"
31711 "\x20\x61\x6e\x20\x49\x45\x54\x46"
31712 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
31713 "\x74\x2d\x44\x72\x61\x66\x74\x20"
31714 "\x6f\x72\x20\x52\x46\x43\x20\x61"
31715 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
31716 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
31717 "\x20\x6d\x61\x64\x65\x20\x77\x69"
31718 "\x74\x68\x69\x6e\x20\x74\x68\x65"
31719 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
31720 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
31721 "\x45\x54\x46\x20\x61\x63\x74\x69"
31722 "\x76\x69\x74\x79\x20\x69\x73\x20"
31723 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
31724 "\x65\x64\x20\x61\x6e\x20\x22\x49"
31725 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
31726 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
31727 "\x22\x2e\x20\x53\x75\x63\x68\x20"
31728 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
31729 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
31730 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
31731 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
31732 "\x74\x73\x20\x69\x6e\x20\x49\x45"
31733 "\x54\x46\x20\x73\x65\x73\x73\x69"
31734 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
31735 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
31736 "\x77\x72\x69\x74\x74\x65\x6e\x20"
31737 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
31738 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
31739 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
31740 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
31741 "\x64\x65\x20\x61\x74\x20\x61\x6e"
31742 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
31743 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
31744 "\x20\x77\x68\x69\x63\x68\x20\x61"
31745 "\x72\x65\x20\x61\x64\x64\x72\x65"
31746 "\x73\x73\x65\x64\x20\x74\x6f",
31747 .ilen = 375,
31748 .result = "\xa3\xfb\xf0\x7d\xf3\xfa\x2f\xde"
31749 "\x4f\x37\x6c\xa2\x3e\x82\x73\x70"
31750 "\x41\x60\x5d\x9f\x4f\x4f\x57\xbd"
31751 "\x8c\xff\x2c\x1d\x4b\x79\x55\xec"
31752 "\x2a\x97\x94\x8b\xd3\x72\x29\x15"
31753 "\xc8\xf3\xd3\x37\xf7\xd3\x70\x05"
31754 "\x0e\x9e\x96\xd6\x47\xb7\xc3\x9f"
31755 "\x56\xe0\x31\xca\x5e\xb6\x25\x0d"
31756 "\x40\x42\xe0\x27\x85\xec\xec\xfa"
31757 "\x4b\x4b\xb5\xe8\xea\xd0\x44\x0e"
31758 "\x20\xb6\xe8\xdb\x09\xd8\x81\xa7"
31759 "\xc6\x13\x2f\x42\x0e\x52\x79\x50"
31760 "\x42\xbd\xfa\x77\x73\xd8\xa9\x05"
31761 "\x14\x47\xb3\x29\x1c\xe1\x41\x1c"
31762 "\x68\x04\x65\x55\x2a\xa6\xc4\x05"
31763 "\xb7\x76\x4d\x5e\x87\xbe\xa8\x5a"
31764 "\xd0\x0f\x84\x49\xed\x8f\x72\xd0"
31765 "\xd6\x62\xab\x05\x26\x91\xca\x66"
31766 "\x42\x4b\xc8\x6d\x2d\xf8\x0e\xa4"
31767 "\x1f\x43\xab\xf9\x37\xd3\x25\x9d"
31768 "\xc4\xb2\xd0\xdf\xb4\x8a\x6c\x91"
31769 "\x39\xdd\xd7\xf7\x69\x66\xe9\x28"
31770 "\xe6\x35\x55\x3b\xa7\x6c\x5c\x87"
31771 "\x9d\x7b\x35\xd4\x9e\xb2\xe6\x2b"
31772 "\x08\x71\xcd\xac\x63\x89\x39\xe2"
31773 "\x5e\x8a\x1e\x0e\xf9\xd5\x28\x0f"
31774 "\xa8\xca\x32\x8b\x35\x1c\x3c\x76"
31775 "\x59\x89\xcb\xcf\x3d\xaa\x8b\x6c"
31776 "\xcc\x3a\xaf\x9f\x39\x79\xc9\x2b"
31777 "\x37\x20\xfc\x88\xdc\x95\xed\x84"
31778 "\xa1\xbe\x05\x9c\x64\x99\xb9\xfd"
31779 "\xa2\x36\xe7\xe8\x18\xb0\x4b\x0b"
31780 "\xc3\x9c\x1e\x87\x6b\x19\x3b\xfe"
31781 "\x55\x69\x75\x3f\x88\x12\x8c\xc0"
31782 "\x8a\xaa\x9b\x63\xd1\xa1\x6f\x80"
31783 "\xef\x25\x54\xd7\x18\x9c\x41\x1f"
31784 "\x58\x69\xca\x52\xc5\xb8\x3f\xa3"
31785 "\x6f\xf2\x16\xb9\xc1\xd3\x00\x62"
31786 "\xbe\xbc\xfd\x2d\xc5\xbc\xe0\x91"
31787 "\x19\x34\xfd\xa7\x9a\x86\xf6\xe6"
31788 "\x98\xce\xd7\x59\xc3\xff\x9b\x64"
31789 "\x77\x33\x8f\x3d\xa4\xf9\xcd\x85"
31790 "\x14\xea\x99\x82\xcc\xaf\xb3\x41"
31791 "\xb2\x38\x4d\xd9\x02\xf3\xd1\xab"
31792 "\x7a\xc6\x1d\xd2\x9c\x6f\x21\xba"
31793 "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
31794 "\xc4\xfd\x80\x6c\x22\xf2\x21",
31795 .rlen = 375,
31796 }, { /* RFC7539 A.2. Test Vector #3 */
31797 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
31798 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
31799 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
31800 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
31801 .klen = 32,
31802 .iv = "\x2a\x00\x00\x00\x00\x00\x00\x00"
31803 "\x00\x00\x00\x00\x00\x00\x00\x02",
31804 .input = "\x27\x54\x77\x61\x73\x20\x62\x72"
31805 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
31806 "\x6e\x64\x20\x74\x68\x65\x20\x73"
31807 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
31808 "\x76\x65\x73\x0a\x44\x69\x64\x20"
31809 "\x67\x79\x72\x65\x20\x61\x6e\x64"
31810 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
31811 "\x69\x6e\x20\x74\x68\x65\x20\x77"
31812 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
31813 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
31814 "\x65\x72\x65\x20\x74\x68\x65\x20"
31815 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
31816 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
31817 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
31818 "\x72\x61\x74\x68\x73\x20\x6f\x75"
31819 "\x74\x67\x72\x61\x62\x65\x2e",
31820 .ilen = 127,
31821 .result = "\x62\xe6\x34\x7f\x95\xed\x87\xa4"
31822 "\x5f\xfa\xe7\x42\x6f\x27\xa1\xdf"
31823 "\x5f\xb6\x91\x10\x04\x4c\x0d\x73"
31824 "\x11\x8e\xff\xa9\x5b\x01\xe5\xcf"
31825 "\x16\x6d\x3d\xf2\xd7\x21\xca\xf9"
31826 "\xb2\x1e\x5f\xb1\x4c\x61\x68\x71"
31827 "\xfd\x84\xc5\x4f\x9d\x65\xb2\x83"
31828 "\x19\x6c\x7f\xe4\xf6\x05\x53\xeb"
31829 "\xf3\x9c\x64\x02\xc4\x22\x34\xe3"
31830 "\x2a\x35\x6b\x3e\x76\x43\x12\xa6"
31831 "\x1a\x55\x32\x05\x57\x16\xea\xd6"
31832 "\x96\x25\x68\xf8\x7d\x3f\x3f\x77"
31833 "\x04\xc6\xa8\xd1\xbc\xd1\xbf\x4d"
31834 "\x50\xd6\x15\x4b\x6d\xa7\x31\xb1"
31835 "\x87\xb5\x8d\xfd\x72\x8a\xfa\x36"
31836 "\x75\x7a\x79\x7a\xc1\x88\xd1",
31837 .rlen = 127,
Martin Willi6692cbc22015-07-16 19:14:04 +020031838 }, { /* Self-made test vector for long data */
31839 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
31840 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
31841 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
31842 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
31843 .klen = 32,
31844 .iv = "\x1c\x00\x00\x00\x00\x00\x00\x00"
31845 "\x00\x00\x00\x00\x00\x00\x00\x01",
31846 .input = "\x49\xee\xe0\xdc\x24\x90\x40\xcd"
31847 "\xc5\x40\x8f\x47\x05\xbc\xdd\x81"
31848 "\x47\xc6\x8d\xe6\xb1\x8f\xd7\xcb"
31849 "\x09\x0e\x6e\x22\x48\x1f\xbf\xb8"
31850 "\x5c\xf7\x1e\x8a\xc1\x23\xf2\xd4"
31851 "\x19\x4b\x01\x0f\x4e\xa4\x43\xce"
31852 "\x01\xc6\x67\xda\x03\x91\x18\x90"
31853 "\xa5\xa4\x8e\x45\x03\xb3\x2d\xac"
31854 "\x74\x92\xd3\x53\x47\xc8\xdd\x25"
31855 "\x53\x6c\x02\x03\x87\x0d\x11\x0c"
31856 "\x58\xe3\x12\x18\xfd\x2a\x5b\x40"
31857 "\x0c\x30\xf0\xb8\x3f\x43\xce\xae"
31858 "\x65\x3a\x7d\x7c\xf4\x54\xaa\xcc"
31859 "\x33\x97\xc3\x77\xba\xc5\x70\xde"
31860 "\xd7\xd5\x13\xa5\x65\xc4\x5f\x0f"
31861 "\x46\x1a\x0d\x97\xb5\xf3\xbb\x3c"
31862 "\x84\x0f\x2b\xc5\xaa\xea\xf2\x6c"
31863 "\xc9\xb5\x0c\xee\x15\xf3\x7d\xbe"
31864 "\x9f\x7b\x5a\xa6\xae\x4f\x83\xb6"
31865 "\x79\x49\x41\xf4\x58\x18\xcb\x86"
31866 "\x7f\x30\x0e\xf8\x7d\x44\x36\xea"
31867 "\x75\xeb\x88\x84\x40\x3c\xad\x4f"
31868 "\x6f\x31\x6b\xaa\x5d\xe5\xa5\xc5"
31869 "\x21\x66\xe9\xa7\xe3\xb2\x15\x88"
31870 "\x78\xf6\x79\xa1\x59\x47\x12\x4e"
31871 "\x9f\x9f\x64\x1a\xa0\x22\x5b\x08"
31872 "\xbe\x7c\x36\xc2\x2b\x66\x33\x1b"
31873 "\xdd\x60\x71\xf7\x47\x8c\x61\xc3"
31874 "\xda\x8a\x78\x1e\x16\xfa\x1e\x86"
31875 "\x81\xa6\x17\x2a\xa7\xb5\xc2\xe7"
31876 "\xa4\xc7\x42\xf1\xcf\x6a\xca\xb4"
31877 "\x45\xcf\xf3\x93\xf0\xe7\xea\xf6"
31878 "\xf4\xe6\x33\x43\x84\x93\xa5\x67"
31879 "\x9b\x16\x58\x58\x80\x0f\x2b\x5c"
31880 "\x24\x74\x75\x7f\x95\x81\xb7\x30"
31881 "\x7a\x33\xa7\xf7\x94\x87\x32\x27"
31882 "\x10\x5d\x14\x4c\x43\x29\xdd\x26"
31883 "\xbd\x3e\x3c\x0e\xfe\x0e\xa5\x10"
31884 "\xea\x6b\x64\xfd\x73\xc6\xed\xec"
31885 "\xa8\xc9\xbf\xb3\xba\x0b\x4d\x07"
31886 "\x70\xfc\x16\xfd\x79\x1e\xd7\xc5"
31887 "\x49\x4e\x1c\x8b\x8d\x79\x1b\xb1"
31888 "\xec\xca\x60\x09\x4c\x6a\xd5\x09"
31889 "\x49\x46\x00\x88\x22\x8d\xce\xea"
31890 "\xb1\x17\x11\xde\x42\xd2\x23\xc1"
31891 "\x72\x11\xf5\x50\x73\x04\x40\x47"
31892 "\xf9\x5d\xe7\xa7\x26\xb1\x7e\xb0"
31893 "\x3f\x58\xc1\x52\xab\x12\x67\x9d"
31894 "\x3f\x43\x4b\x68\xd4\x9c\x68\x38"
31895 "\x07\x8a\x2d\x3e\xf3\xaf\x6a\x4b"
31896 "\xf9\xe5\x31\x69\x22\xf9\xa6\x69"
31897 "\xc6\x9c\x96\x9a\x12\x35\x95\x1d"
31898 "\x95\xd5\xdd\xbe\xbf\x93\x53\x24"
31899 "\xfd\xeb\xc2\x0a\x64\xb0\x77\x00"
31900 "\x6f\x88\xc4\x37\x18\x69\x7c\xd7"
31901 "\x41\x92\x55\x4c\x03\xa1\x9a\x4b"
31902 "\x15\xe5\xdf\x7f\x37\x33\x72\xc1"
31903 "\x8b\x10\x67\xa3\x01\x57\x94\x25"
31904 "\x7b\x38\x71\x7e\xdd\x1e\xcc\x73"
31905 "\x55\xd2\x8e\xeb\x07\xdd\xf1\xda"
31906 "\x58\xb1\x47\x90\xfe\x42\x21\x72"
31907 "\xa3\x54\x7a\xa0\x40\xec\x9f\xdd"
31908 "\xc6\x84\x6e\xca\xae\xe3\x68\xb4"
31909 "\x9d\xe4\x78\xff\x57\xf2\xf8\x1b"
31910 "\x03\xa1\x31\xd9\xde\x8d\xf5\x22"
31911 "\x9c\xdd\x20\xa4\x1e\x27\xb1\x76"
31912 "\x4f\x44\x55\xe2\x9b\xa1\x9c\xfe"
31913 "\x54\xf7\x27\x1b\xf4\xde\x02\xf5"
31914 "\x1b\x55\x48\x5c\xdc\x21\x4b\x9e"
31915 "\x4b\x6e\xed\x46\x23\xdc\x65\xb2"
31916 "\xcf\x79\x5f\x28\xe0\x9e\x8b\xe7"
31917 "\x4c\x9d\x8a\xff\xc1\xa6\x28\xb8"
31918 "\x65\x69\x8a\x45\x29\xef\x74\x85"
31919 "\xde\x79\xc7\x08\xae\x30\xb0\xf4"
31920 "\xa3\x1d\x51\x41\xab\xce\xcb\xf6"
31921 "\xb5\xd8\x6d\xe0\x85\xe1\x98\xb3"
31922 "\x43\xbb\x86\x83\x0a\xa0\xf5\xb7"
31923 "\x04\x0b\xfa\x71\x1f\xb0\xf6\xd9"
31924 "\x13\x00\x15\xf0\xc7\xeb\x0d\x5a"
31925 "\x9f\xd7\xb9\x6c\x65\x14\x22\x45"
31926 "\x6e\x45\x32\x3e\x7e\x60\x1a\x12"
31927 "\x97\x82\x14\xfb\xaa\x04\x22\xfa"
31928 "\xa0\xe5\x7e\x8c\x78\x02\x48\x5d"
31929 "\x78\x33\x5a\x7c\xad\xdb\x29\xce"
31930 "\xbb\x8b\x61\xa4\xb7\x42\xe2\xac"
31931 "\x8b\x1a\xd9\x2f\x0b\x8b\x62\x21"
31932 "\x83\x35\x7e\xad\x73\xc2\xb5\x6c"
31933 "\x10\x26\x38\x07\xe5\xc7\x36\x80"
31934 "\xe2\x23\x12\x61\xf5\x48\x4b\x2b"
31935 "\xc5\xdf\x15\xd9\x87\x01\xaa\xac"
31936 "\x1e\x7c\xad\x73\x78\x18\x63\xe0"
31937 "\x8b\x9f\x81\xd8\x12\x6a\x28\x10"
31938 "\xbe\x04\x68\x8a\x09\x7c\x1b\x1c"
31939 "\x83\x66\x80\x47\x80\xe8\xfd\x35"
31940 "\x1c\x97\x6f\xae\x49\x10\x66\xcc"
31941 "\xc6\xd8\xcc\x3a\x84\x91\x20\x77"
31942 "\x72\xe4\x24\xd2\x37\x9f\xc5\xc9"
31943 "\x25\x94\x10\x5f\x40\x00\x64\x99"
31944 "\xdc\xae\xd7\x21\x09\x78\x50\x15"
31945 "\xac\x5f\xc6\x2c\xa2\x0b\xa9\x39"
31946 "\x87\x6e\x6d\xab\xde\x08\x51\x16"
31947 "\xc7\x13\xe9\xea\xed\x06\x8e\x2c"
31948 "\xf8\x37\x8c\xf0\xa6\x96\x8d\x43"
31949 "\xb6\x98\x37\xb2\x43\xed\xde\xdf"
31950 "\x89\x1a\xe7\xeb\x9d\xa1\x7b\x0b"
31951 "\x77\xb0\xe2\x75\xc0\xf1\x98\xd9"
31952 "\x80\x55\xc9\x34\x91\xd1\x59\xe8"
31953 "\x4b\x0f\xc1\xa9\x4b\x7a\x84\x06"
31954 "\x20\xa8\x5d\xfa\xd1\xde\x70\x56"
31955 "\x2f\x9e\x91\x9c\x20\xb3\x24\xd8"
31956 "\x84\x3d\xe1\x8c\x7e\x62\x52\xe5"
31957 "\x44\x4b\x9f\xc2\x93\x03\xea\x2b"
31958 "\x59\xc5\xfa\x3f\x91\x2b\xbb\x23"
31959 "\xf5\xb2\x7b\xf5\x38\xaf\xb3\xee"
31960 "\x63\xdc\x7b\xd1\xff\xaa\x8b\xab"
31961 "\x82\x6b\x37\x04\xeb\x74\xbe\x79"
31962 "\xb9\x83\x90\xef\x20\x59\x46\xff"
31963 "\xe9\x97\x3e\x2f\xee\xb6\x64\x18"
31964 "\x38\x4c\x7a\x4a\xf9\x61\xe8\x9a"
31965 "\xa1\xb5\x01\xa6\x47\xd3\x11\xd4"
31966 "\xce\xd3\x91\x49\x88\xc7\xb8\x4d"
31967 "\xb1\xb9\x07\x6d\x16\x72\xae\x46"
31968 "\x5e\x03\xa1\x4b\xb6\x02\x30\xa8"
31969 "\x3d\xa9\x07\x2a\x7c\x19\xe7\x62"
31970 "\x87\xe3\x82\x2f\x6f\xe1\x09\xd9"
31971 "\x94\x97\xea\xdd\x58\x9e\xae\x76"
31972 "\x7e\x35\xe5\xb4\xda\x7e\xf4\xde"
31973 "\xf7\x32\x87\xcd\x93\xbf\x11\x56"
31974 "\x11\xbe\x08\x74\xe1\x69\xad\xe2"
31975 "\xd7\xf8\x86\x75\x8a\x3c\xa4\xbe"
31976 "\x70\xa7\x1b\xfc\x0b\x44\x2a\x76"
31977 "\x35\xea\x5d\x85\x81\xaf\x85\xeb"
31978 "\xa0\x1c\x61\xc2\xf7\x4f\xa5\xdc"
31979 "\x02\x7f\xf6\x95\x40\x6e\x8a\x9a"
31980 "\xf3\x5d\x25\x6e\x14\x3a\x22\xc9"
31981 "\x37\x1c\xeb\x46\x54\x3f\xa5\x91"
31982 "\xc2\xb5\x8c\xfe\x53\x08\x97\x32"
31983 "\x1b\xb2\x30\x27\xfe\x25\x5d\xdc"
31984 "\x08\x87\xd0\xe5\x94\x1a\xd4\xf1"
31985 "\xfe\xd6\xb4\xa3\xe6\x74\x81\x3c"
31986 "\x1b\xb7\x31\xa7\x22\xfd\xd4\xdd"
31987 "\x20\x4e\x7c\x51\xb0\x60\x73\xb8"
31988 "\x9c\xac\x91\x90\x7e\x01\xb0\xe1"
31989 "\x8a\x2f\x75\x1c\x53\x2a\x98\x2a"
31990 "\x06\x52\x95\x52\xb2\xe9\x25\x2e"
31991 "\x4c\xe2\x5a\x00\xb2\x13\x81\x03"
31992 "\x77\x66\x0d\xa5\x99\xda\x4e\x8c"
31993 "\xac\xf3\x13\x53\x27\x45\xaf\x64"
31994 "\x46\xdc\xea\x23\xda\x97\xd1\xab"
31995 "\x7d\x6c\x30\x96\x1f\xbc\x06\x34"
31996 "\x18\x0b\x5e\x21\x35\x11\x8d\x4c"
31997 "\xe0\x2d\xe9\x50\x16\x74\x81\xa8"
31998 "\xb4\x34\xb9\x72\x42\xa6\xcc\xbc"
31999 "\xca\x34\x83\x27\x10\x5b\x68\x45"
32000 "\x8f\x52\x22\x0c\x55\x3d\x29\x7c"
32001 "\xe3\xc0\x66\x05\x42\x91\x5f\x58"
32002 "\xfe\x4a\x62\xd9\x8c\xa9\x04\x19"
32003 "\x04\xa9\x08\x4b\x57\xfc\x67\x53"
32004 "\x08\x7c\xbc\x66\x8a\xb0\xb6\x9f"
32005 "\x92\xd6\x41\x7c\x5b\x2a\x00\x79"
32006 "\x72",
32007 .ilen = 1281,
32008 .result = "\x45\xe8\xe0\xb6\x9c\xca\xfd\x87"
32009 "\xe8\x1d\x37\x96\x8a\xe3\x40\x35"
32010 "\xcf\x5e\x3a\x46\x3d\xfb\xd0\x69"
32011 "\xde\xaf\x7a\xd5\x0d\xe9\x52\xec"
32012 "\xc2\x82\xe5\x3e\x7d\xb2\x4a\xd9"
32013 "\xbb\xc3\x9f\xc0\x5d\xac\x93\x8d"
32014 "\x0e\x6f\xd3\xd7\xfb\x6a\x0d\xce"
32015 "\x92\x2c\xf7\xbb\x93\x57\xcc\xee"
32016 "\x42\x72\x6f\xc8\x4b\xd2\x76\xbf"
32017 "\xa0\xe3\x7a\x39\xf9\x5c\x8e\xfd"
32018 "\xa1\x1d\x41\xe5\x08\xc1\x1c\x11"
32019 "\x92\xfd\x39\x5c\x51\xd0\x2f\x66"
32020 "\x33\x4a\x71\x15\xfe\xee\x12\x54"
32021 "\x8c\x8f\x34\xd8\x50\x3c\x18\xa6"
32022 "\xc5\xe1\x46\x8a\xfb\x5f\x7e\x25"
32023 "\x9b\xe2\xc3\x66\x41\x2b\xb3\xa5"
32024 "\x57\x0e\x94\x17\x26\x39\xbb\x54"
32025 "\xae\x2e\x6f\x42\xfb\x4d\x89\x6f"
32026 "\x9d\xf1\x16\x2e\xe3\xe7\xfc\xe3"
32027 "\xb2\x4b\x2b\xa6\x7c\x04\x69\x3a"
32028 "\x70\x5a\xa7\xf1\x31\x64\x19\xca"
32029 "\x45\x79\xd8\x58\x23\x61\xaf\xc2"
32030 "\x52\x05\xc3\x0b\xc1\x64\x7c\x81"
32031 "\xd9\x11\xcf\xff\x02\x3d\x51\x84"
32032 "\x01\xac\xc6\x2e\x34\x2b\x09\x3a"
32033 "\xa8\x5d\x98\x0e\x89\xd9\xef\x8f"
32034 "\xd9\xd7\x7d\xdd\x63\x47\x46\x7d"
32035 "\xa1\xda\x0b\x53\x7d\x79\xcd\xc9"
32036 "\x86\xdd\x6b\x13\xa1\x9a\x70\xdd"
32037 "\x5c\xa1\x69\x3c\xe4\x5d\xe3\x8c"
32038 "\xe5\xf4\x87\x9c\x10\xcf\x0f\x0b"
32039 "\xc8\x43\xdc\xf8\x1d\x62\x5e\x5b"
32040 "\xe2\x03\x06\xc5\x71\xb6\x48\xa5"
32041 "\xf0\x0f\x2d\xd5\xa2\x73\x55\x8f"
32042 "\x01\xa7\x59\x80\x5f\x11\x6c\x40"
32043 "\xff\xb1\xf2\xc6\x7e\x01\xbb\x1c"
32044 "\x69\x9c\xc9\x3f\x71\x5f\x07\x7e"
32045 "\xdf\x6f\x99\xca\x9c\xfd\xf9\xb9"
32046 "\x49\xe7\xcc\x91\xd5\x9b\x8f\x03"
32047 "\xae\xe7\x61\x32\xef\x41\x6c\x75"
32048 "\x84\x9b\x8c\xce\x1d\x6b\x93\x21"
32049 "\x41\xec\xc6\xad\x8e\x0c\x48\xa8"
32050 "\xe2\xf5\x57\xde\xf7\x38\xfd\x4a"
32051 "\x6f\xa7\x4a\xf9\xac\x7d\xb1\x85"
32052 "\x7d\x6c\x95\x0a\x5a\xcf\x68\xd2"
32053 "\xe0\x7a\x26\xd9\xc1\x6d\x3e\xc6"
32054 "\x37\xbd\xbe\x24\x36\x77\x9f\x1b"
32055 "\xc1\x22\xf3\x79\xae\x95\x78\x66"
32056 "\x97\x11\xc0\x1a\xf1\xe8\x0d\x38"
32057 "\x09\xc2\xee\xb7\xd3\x46\x7b\x59"
32058 "\x77\x23\xe8\xb4\x92\x3d\x78\xbe"
32059 "\xe2\x25\x63\xa5\x2a\x06\x70\x92"
32060 "\x32\x63\xf9\x19\x21\x68\xe1\x0b"
32061 "\x9a\xd0\xee\x21\xdb\x1f\xe0\xde"
32062 "\x3e\x64\x02\x4d\x0e\xe0\x0a\xa9"
32063 "\xed\x19\x8c\xa8\xbf\xe3\x2e\x75"
32064 "\x24\x2b\xb0\xe5\x82\x6a\x1e\x6f"
32065 "\x71\x2a\x3a\x60\xed\x06\x0d\x17"
32066 "\xa2\xdb\x29\x1d\xae\xb2\xc4\xfb"
32067 "\x94\x04\xd8\x58\xfc\xc4\x04\x4e"
32068 "\xee\xc7\xc1\x0f\xe9\x9b\x63\x2d"
32069 "\x02\x3e\x02\x67\xe5\xd8\xbb\x79"
32070 "\xdf\xd2\xeb\x50\xe9\x0a\x02\x46"
32071 "\xdf\x68\xcf\xe7\x2b\x0a\x56\xd6"
32072 "\xf7\xbc\x44\xad\xb8\xb5\x5f\xeb"
32073 "\xbc\x74\x6b\xe8\x7e\xb0\x60\xc6"
32074 "\x0d\x96\x09\xbb\x19\xba\xe0\x3c"
32075 "\xc4\x6c\xbf\x0f\x58\xc0\x55\x62"
32076 "\x23\xa0\xff\xb5\x1c\xfd\x18\xe1"
32077 "\xcf\x6d\xd3\x52\xb4\xce\xa6\xfa"
32078 "\xaa\xfb\x1b\x0b\x42\x6d\x79\x42"
32079 "\x48\x70\x5b\x0e\xdd\x3a\xc9\x69"
32080 "\x8b\x73\x67\xf6\x95\xdb\x8c\xfb"
32081 "\xfd\xb5\x08\x47\x42\x84\x9a\xfa"
32082 "\xcc\x67\xb2\x3c\xb6\xfd\xd8\x32"
32083 "\xd6\x04\xb6\x4a\xea\x53\x4b\xf5"
32084 "\x94\x16\xad\xf0\x10\x2e\x2d\xb4"
32085 "\x8b\xab\xe5\x89\xc7\x39\x12\xf3"
32086 "\x8d\xb5\x96\x0b\x87\x5d\xa7\x7c"
32087 "\xb0\xc2\xf6\x2e\x57\x97\x2c\xdc"
32088 "\x54\x1c\x34\x72\xde\x0c\x68\x39"
32089 "\x9d\x32\xa5\x75\x92\x13\x32\xea"
32090 "\x90\x27\xbd\x5b\x1d\xb9\x21\x02"
32091 "\x1c\xcc\xba\x97\x5e\x49\x58\xe8"
32092 "\xac\x8b\xf3\xce\x3c\xf0\x00\xe9"
32093 "\x6c\xae\xe9\x77\xdf\xf4\x02\xcd"
32094 "\x55\x25\x89\x9e\x90\xf3\x6b\x8f"
32095 "\xb7\xd6\x47\x98\x26\x2f\x31\x2f"
32096 "\x8d\xbf\x54\xcd\x99\xeb\x80\xd7"
32097 "\xac\xc3\x08\xc2\xa6\x32\xf1\x24"
32098 "\x76\x7c\x4f\x78\x53\x55\xfb\x00"
32099 "\x8a\xd6\x52\x53\x25\x45\xfb\x0a"
32100 "\x6b\xb9\xbe\x3c\x5e\x11\xcc\x6a"
32101 "\xdd\xfc\xa7\xc4\x79\x4d\xbd\xfb"
32102 "\xce\x3a\xf1\x7a\xda\xeb\xfe\x64"
32103 "\x28\x3d\x0f\xee\x80\xba\x0c\xf8"
32104 "\xe9\x5b\x3a\xd4\xae\xc9\xf3\x0e"
32105 "\xe8\x5d\xc5\x5c\x0b\x20\x20\xee"
32106 "\x40\x0d\xde\x07\xa7\x14\xb4\x90"
32107 "\xb6\xbd\x3b\xae\x7d\x2b\xa7\xc7"
32108 "\xdc\x0b\x4c\x5d\x65\xb0\xd2\xc5"
32109 "\x79\x61\x23\xe0\xa2\x99\x73\x55"
32110 "\xad\xc6\xfb\xc7\x54\xb5\x98\x1f"
32111 "\x8c\x86\xc2\x3f\xbe\x5e\xea\x64"
32112 "\xa3\x60\x18\x9f\x80\xaf\x52\x74"
32113 "\x1a\xfe\x22\xc2\x92\x67\x40\x02"
32114 "\x08\xee\x67\x5b\x67\xe0\x3d\xde"
32115 "\x7a\xaf\x8e\x28\xf3\x5e\x0e\xf4"
32116 "\x48\x56\xaa\x85\x22\xd8\x36\xed"
32117 "\x3b\x3d\x68\x69\x30\xbc\x71\x23"
32118 "\xb1\x6e\x61\x03\x89\x44\x03\xf4"
32119 "\x32\xaa\x4c\x40\x9f\x69\xfb\x70"
32120 "\x91\xcc\x1f\x11\xbd\x76\x67\xe6"
32121 "\x10\x8b\x29\x39\x68\xea\x4e\x6d"
32122 "\xae\xfb\x40\xcf\xe2\xd0\x0d\x8d"
32123 "\x6f\xed\x9b\x8d\x64\x7a\x94\x8e"
32124 "\x32\x38\x78\xeb\x7d\x5f\xf9\x4d"
32125 "\x13\xbe\x21\xea\x16\xe7\x5c\xee"
32126 "\xcd\xf6\x5f\xc6\x45\xb2\x8f\x2b"
32127 "\xb5\x93\x3e\x45\xdb\xfd\xa2\x6a"
32128 "\xec\x83\x92\x99\x87\x47\xe0\x7c"
32129 "\xa2\x7b\xc4\x2a\xcd\xc0\x81\x03"
32130 "\x98\xb0\x87\xb6\x86\x13\x64\x33"
32131 "\x4c\xd7\x99\xbf\xdb\x7b\x6e\xaa"
32132 "\x76\xcc\xa0\x74\x1b\xa3\x6e\x83"
32133 "\xd4\xba\x7a\x84\x9d\x91\x71\xcd"
32134 "\x60\x2d\x56\xfd\x26\x35\xcb\xeb"
32135 "\xac\xe9\xee\xa4\xfc\x18\x5b\x91"
32136 "\xd5\xfe\x84\x45\xe0\xc7\xfd\x11"
32137 "\xe9\x00\xb6\x54\xdf\xe1\x94\xde"
32138 "\x2b\x70\x9f\x94\x7f\x15\x0e\x83"
32139 "\x63\x10\xb3\xf5\xea\xd3\xe8\xd1"
32140 "\xa5\xfc\x17\x19\x68\x9a\xbc\x17"
32141 "\x30\x43\x0a\x1a\x33\x92\xd4\x2a"
32142 "\x2e\x68\x99\xbc\x49\xf0\x68\xe3"
32143 "\xf0\x1f\xcb\xcc\xfa\xbb\x05\x56"
32144 "\x46\x84\x8b\x69\x83\x64\xc5\xe0"
32145 "\xc5\x52\x99\x07\x3c\xa6\x5c\xaf"
32146 "\xa3\xde\xd7\xdb\x43\xe6\xb7\x76"
32147 "\x4e\x4d\xd6\x71\x60\x63\x4a\x0c"
32148 "\x5f\xae\x25\x84\x22\x90\x5f\x26"
32149 "\x61\x4d\x8f\xaf\xc9\x22\xf2\x05"
32150 "\xcf\xc1\xdc\x68\xe5\x57\x8e\x24"
32151 "\x1b\x30\x59\xca\xd7\x0d\xc3\xd3"
32152 "\x52\x9e\x09\x3e\x0e\xaf\xdb\x5f"
32153 "\xc7\x2b\xde\x3a\xfd\xad\x93\x04"
32154 "\x74\x06\x89\x0e\x90\xeb\x85\xff"
32155 "\xe6\x3c\x12\x42\xf4\xfa\x80\x75"
32156 "\x5e\x4e\xd7\x2f\x93\x0b\x34\x41"
32157 "\x02\x85\x68\xd0\x03\x12\xde\x92"
32158 "\x54\x7a\x7e\xfb\x55\xe7\x88\xfb"
32159 "\xa4\xa9\xf2\xd1\xc6\x70\x06\x37"
32160 "\x25\xee\xa7\x6e\xd9\x89\x86\x50"
32161 "\x2e\x07\xdb\xfb\x2a\x86\x45\x0e"
32162 "\x91\xf4\x7c\xbb\x12\x60\xe8\x3f"
32163 "\x71\xbe\x8f\x9d\x26\xef\xd9\x89"
32164 "\xc4\x8f\xd8\xc5\x73\xd8\x84\xaa"
32165 "\x2f\xad\x22\x1e\x7e\xcf\xa2\x08"
32166 "\x23\x45\x89\x42\xa0\x30\xeb\xbf"
32167 "\xa1\xed\xad\xd5\x76\xfa\x24\x8f"
32168 "\x98",
32169 .rlen = 1281,
Martin Willi3590ebf2015-06-01 13:43:57 +020032170 },
32171};
32172
Herbert Xuda7f0332008-07-31 17:08:25 +080032173/*
32174 * CTS (Cipher Text Stealing) mode tests
32175 */
32176#define CTS_MODE_ENC_TEST_VECTORS 6
32177#define CTS_MODE_DEC_TEST_VECTORS 6
32178static struct cipher_testvec cts_mode_enc_tv_template[] = {
32179 { /* from rfc3962 */
32180 .klen = 16,
32181 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32182 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32183 .ilen = 17,
32184 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32185 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32186 "\x20",
32187 .rlen = 17,
32188 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
32189 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
32190 "\x97",
32191 }, {
32192 .klen = 16,
32193 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32194 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32195 .ilen = 31,
32196 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32197 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32198 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32199 "\x20\x47\x61\x75\x27\x73\x20",
32200 .rlen = 31,
32201 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
32202 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
32203 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32204 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
32205 }, {
32206 .klen = 16,
32207 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32208 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32209 .ilen = 32,
32210 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32211 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32212 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32213 "\x20\x47\x61\x75\x27\x73\x20\x43",
32214 .rlen = 32,
32215 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32216 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32217 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32218 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
32219 }, {
32220 .klen = 16,
32221 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32222 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32223 .ilen = 47,
32224 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32225 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32226 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32227 "\x20\x47\x61\x75\x27\x73\x20\x43"
32228 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32229 "\x70\x6c\x65\x61\x73\x65\x2c",
32230 .rlen = 47,
32231 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32232 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32233 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
32234 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
32235 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32236 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
32237 }, {
32238 .klen = 16,
32239 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32240 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32241 .ilen = 48,
32242 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32243 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32244 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32245 "\x20\x47\x61\x75\x27\x73\x20\x43"
32246 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32247 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
32248 .rlen = 48,
32249 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32250 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32251 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32252 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
32253 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32254 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
32255 }, {
32256 .klen = 16,
32257 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32258 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32259 .ilen = 64,
32260 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32261 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32262 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32263 "\x20\x47\x61\x75\x27\x73\x20\x43"
32264 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32265 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
32266 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
32267 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
32268 .rlen = 64,
32269 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32270 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32271 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32272 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32273 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
32274 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
32275 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32276 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
32277 }
32278};
32279
32280static struct cipher_testvec cts_mode_dec_tv_template[] = {
32281 { /* from rfc3962 */
32282 .klen = 16,
32283 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32284 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32285 .rlen = 17,
32286 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32287 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32288 "\x20",
32289 .ilen = 17,
32290 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
32291 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
32292 "\x97",
32293 }, {
32294 .klen = 16,
32295 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32296 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32297 .rlen = 31,
32298 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32299 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32300 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32301 "\x20\x47\x61\x75\x27\x73\x20",
32302 .ilen = 31,
32303 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
32304 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
32305 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32306 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
32307 }, {
32308 .klen = 16,
32309 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32310 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32311 .rlen = 32,
32312 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32313 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32314 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32315 "\x20\x47\x61\x75\x27\x73\x20\x43",
32316 .ilen = 32,
32317 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32318 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32319 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32320 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
32321 }, {
32322 .klen = 16,
32323 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32324 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32325 .rlen = 47,
32326 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32327 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32328 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32329 "\x20\x47\x61\x75\x27\x73\x20\x43"
32330 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32331 "\x70\x6c\x65\x61\x73\x65\x2c",
32332 .ilen = 47,
32333 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32334 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32335 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
32336 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
32337 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32338 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
32339 }, {
32340 .klen = 16,
32341 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32342 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32343 .rlen = 48,
32344 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32345 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32346 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32347 "\x20\x47\x61\x75\x27\x73\x20\x43"
32348 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32349 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
32350 .ilen = 48,
32351 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32352 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32353 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32354 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
32355 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32356 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
32357 }, {
32358 .klen = 16,
32359 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32360 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32361 .rlen = 64,
32362 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32363 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32364 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32365 "\x20\x47\x61\x75\x27\x73\x20\x43"
32366 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32367 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
32368 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
32369 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
32370 .ilen = 64,
32371 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32372 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32373 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32374 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32375 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
32376 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
32377 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32378 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
32379 }
32380};
32381
32382/*
32383 * Compression stuff.
32384 */
32385#define COMP_BUF_SIZE 512
32386
32387struct comp_testvec {
32388 int inlen, outlen;
32389 char input[COMP_BUF_SIZE];
32390 char output[COMP_BUF_SIZE];
32391};
32392
32393/*
32394 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110032395 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080032396 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080032397
Herbert Xuda7f0332008-07-31 17:08:25 +080032398#define DEFLATE_COMP_TEST_VECTORS 2
32399#define DEFLATE_DECOMP_TEST_VECTORS 2
32400
32401static struct comp_testvec deflate_comp_tv_template[] = {
32402 {
32403 .inlen = 70,
32404 .outlen = 38,
32405 .input = "Join us now and share the software "
32406 "Join us now and share the software ",
32407 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
32408 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
32409 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
32410 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
32411 "\x71\xbc\x08\x2b\x01\x00",
32412 }, {
32413 .inlen = 191,
32414 .outlen = 122,
32415 .input = "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 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
32419 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
32420 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
32421 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
32422 "\x68\x12\x51\xae\x76\x67\xd6\x27"
32423 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
32424 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
32425 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
32426 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
32427 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
32428 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
32429 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
32430 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
32431 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
32432 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
32433 "\xfa\x02",
32434 },
32435};
32436
32437static struct comp_testvec deflate_decomp_tv_template[] = {
32438 {
32439 .inlen = 122,
32440 .outlen = 191,
32441 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
32442 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
32443 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
32444 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
32445 "\x68\x12\x51\xae\x76\x67\xd6\x27"
32446 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
32447 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
32448 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
32449 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
32450 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
32451 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
32452 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
32453 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
32454 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
32455 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
32456 "\xfa\x02",
32457 .output = "This document describes a compression method based on the DEFLATE"
32458 "compression algorithm. This document defines the application of "
32459 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
32460 }, {
32461 .inlen = 38,
32462 .outlen = 70,
32463 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
32464 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
32465 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
32466 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
32467 "\x71\xbc\x08\x2b\x01\x00",
32468 .output = "Join us now and share the software "
32469 "Join us now and share the software ",
32470 },
32471};
32472
Herbert Xuda7f0332008-07-31 17:08:25 +080032473/*
32474 * LZO test vectors (null-terminated strings).
32475 */
32476#define LZO_COMP_TEST_VECTORS 2
32477#define LZO_DECOMP_TEST_VECTORS 2
32478
32479static struct comp_testvec lzo_comp_tv_template[] = {
32480 {
32481 .inlen = 70,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032482 .outlen = 57,
Herbert Xuda7f0332008-07-31 17:08:25 +080032483 .input = "Join us now and share the software "
32484 "Join us now and share the software ",
32485 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032486 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
32487 "\x64\x20\x73\x68\x61\x72\x65\x20"
32488 "\x74\x68\x65\x20\x73\x6f\x66\x74"
32489 "\x77\x70\x01\x32\x88\x00\x0c\x65"
32490 "\x20\x74\x68\x65\x20\x73\x6f\x66"
32491 "\x74\x77\x61\x72\x65\x20\x11\x00"
32492 "\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080032493 }, {
32494 .inlen = 159,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032495 .outlen = 131,
Herbert Xuda7f0332008-07-31 17:08:25 +080032496 .input = "This document describes a compression method based on the LZO "
32497 "compression algorithm. This document defines the application of "
32498 "the LZO algorithm used in UBIFS.",
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032499 .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
Herbert Xuda7f0332008-07-31 17:08:25 +080032500 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
32501 "\x64\x65\x73\x63\x72\x69\x62\x65"
32502 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
32503 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
32504 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
32505 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032506 "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
32507 "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
32508 "\x72\x69\x74\x68\x6d\x2e\x20\x20"
32509 "\x2e\x54\x01\x03\x66\x69\x6e\x65"
32510 "\x73\x20\x74\x06\x05\x61\x70\x70"
32511 "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
32512 "\x66\x88\x02\x60\x09\x27\xf0\x00"
32513 "\x0c\x20\x75\x73\x65\x64\x20\x69"
32514 "\x6e\x20\x55\x42\x49\x46\x53\x2e"
32515 "\x11\x00\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080032516 },
32517};
32518
32519static struct comp_testvec lzo_decomp_tv_template[] = {
32520 {
32521 .inlen = 133,
32522 .outlen = 159,
32523 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
32524 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
32525 "\x64\x65\x73\x63\x72\x69\x62\x65"
32526 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
32527 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
32528 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
32529 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
32530 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
32531 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
32532 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
32533 "\x68\x69\x73\x2a\x54\x01\x02\x66"
32534 "\x69\x6e\x65\x73\x94\x06\x05\x61"
32535 "\x70\x70\x6c\x69\x63\x61\x74\x76"
32536 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
32537 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
32538 "\x20\x69\x6e\x20\x55\x42\x49\x46"
32539 "\x53\x2e\x11\x00\x00",
32540 .output = "This document describes a compression method based on the LZO "
32541 "compression algorithm. This document defines the application of "
32542 "the LZO algorithm used in UBIFS.",
32543 }, {
32544 .inlen = 46,
32545 .outlen = 70,
32546 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
32547 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
32548 "\x64\x20\x73\x68\x61\x72\x65\x20"
32549 "\x74\x68\x65\x20\x73\x6f\x66\x74"
32550 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
32551 "\x3d\x88\x00\x11\x00\x00",
32552 .output = "Join us now and share the software "
32553 "Join us now and share the software ",
32554 },
32555};
32556
32557/*
32558 * Michael MIC test vectors from IEEE 802.11i
32559 */
32560#define MICHAEL_MIC_TEST_VECTORS 6
32561
32562static struct hash_testvec michael_mic_tv_template[] = {
32563 {
32564 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
32565 .ksize = 8,
32566 .plaintext = zeroed_string,
32567 .psize = 0,
32568 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
32569 },
32570 {
32571 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
32572 .ksize = 8,
32573 .plaintext = "M",
32574 .psize = 1,
32575 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
32576 },
32577 {
32578 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
32579 .ksize = 8,
32580 .plaintext = "Mi",
32581 .psize = 2,
32582 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
32583 },
32584 {
32585 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
32586 .ksize = 8,
32587 .plaintext = "Mic",
32588 .psize = 3,
32589 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
32590 },
32591 {
32592 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
32593 .ksize = 8,
32594 .plaintext = "Mich",
32595 .psize = 4,
32596 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
32597 },
32598 {
32599 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
32600 .ksize = 8,
32601 .plaintext = "Michael",
32602 .psize = 7,
32603 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
32604 }
32605};
32606
32607/*
Ard Biesheuvelebb34722015-05-04 11:00:17 +020032608 * CRC32 test vectors
32609 */
32610#define CRC32_TEST_VECTORS 14
32611
32612static struct hash_testvec crc32_tv_template[] = {
32613 {
32614 .key = "\x87\xa9\xcb\xed",
32615 .ksize = 4,
32616 .psize = 0,
32617 .digest = "\x87\xa9\xcb\xed",
32618 },
32619 {
32620 .key = "\xff\xff\xff\xff",
32621 .ksize = 4,
32622 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
32623 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
32624 "\x11\x12\x13\x14\x15\x16\x17\x18"
32625 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
32626 "\x21\x22\x23\x24\x25\x26\x27\x28",
32627 .psize = 40,
32628 .digest = "\x3a\xdf\x4b\xb0",
32629 },
32630 {
32631 .key = "\xff\xff\xff\xff",
32632 .ksize = 4,
32633 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32634 "\x31\x32\x33\x34\x35\x36\x37\x38"
32635 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32636 "\x41\x42\x43\x44\x45\x46\x47\x48"
32637 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
32638 .psize = 40,
32639 .digest = "\xa9\x7a\x7f\x7b",
32640 },
32641 {
32642 .key = "\xff\xff\xff\xff",
32643 .ksize = 4,
32644 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
32645 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32646 "\x61\x62\x63\x64\x65\x66\x67\x68"
32647 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32648 "\x71\x72\x73\x74\x75\x76\x77\x78",
32649 .psize = 40,
32650 .digest = "\xba\xd3\xf8\x1c",
32651 },
32652 {
32653 .key = "\xff\xff\xff\xff",
32654 .ksize = 4,
32655 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32656 "\x81\x82\x83\x84\x85\x86\x87\x88"
32657 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32658 "\x91\x92\x93\x94\x95\x96\x97\x98"
32659 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
32660 .psize = 40,
32661 .digest = "\xa8\xa9\xc2\x02",
32662 },
32663 {
32664 .key = "\xff\xff\xff\xff",
32665 .ksize = 4,
32666 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32667 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32668 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32669 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32670 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
32671 .psize = 40,
32672 .digest = "\x27\xf0\x57\xe2",
32673 },
32674 {
32675 .key = "\xff\xff\xff\xff",
32676 .ksize = 4,
32677 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
32678 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
32679 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
32680 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
32681 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
32682 .psize = 40,
32683 .digest = "\x49\x78\x10\x08",
32684 },
32685 {
32686 .key = "\x80\xea\xd3\xf1",
32687 .ksize = 4,
32688 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32689 "\x31\x32\x33\x34\x35\x36\x37\x38"
32690 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32691 "\x41\x42\x43\x44\x45\x46\x47\x48"
32692 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
32693 .psize = 40,
32694 .digest = "\x9a\xb1\xdc\xf0",
32695 },
32696 {
32697 .key = "\xf3\x4a\x1d\x5d",
32698 .ksize = 4,
32699 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
32700 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32701 "\x61\x62\x63\x64\x65\x66\x67\x68"
32702 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32703 "\x71\x72\x73\x74\x75\x76\x77\x78",
32704 .psize = 40,
32705 .digest = "\xb4\x97\xcc\xd4",
32706 },
32707 {
32708 .key = "\x2e\x80\x04\x59",
32709 .ksize = 4,
32710 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32711 "\x81\x82\x83\x84\x85\x86\x87\x88"
32712 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32713 "\x91\x92\x93\x94\x95\x96\x97\x98"
32714 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
32715 .psize = 40,
32716 .digest = "\x67\x9b\xfa\x79",
32717 },
32718 {
32719 .key = "\xa6\xcc\x19\x85",
32720 .ksize = 4,
32721 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32722 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32723 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32724 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32725 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
32726 .psize = 40,
32727 .digest = "\x24\xb5\x16\xef",
32728 },
32729 {
32730 .key = "\x41\xfc\xfe\x2d",
32731 .ksize = 4,
32732 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
32733 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
32734 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
32735 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
32736 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
32737 .psize = 40,
32738 .digest = "\x15\x94\x80\x39",
32739 },
32740 {
32741 .key = "\xff\xff\xff\xff",
32742 .ksize = 4,
32743 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
32744 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
32745 "\x11\x12\x13\x14\x15\x16\x17\x18"
32746 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
32747 "\x21\x22\x23\x24\x25\x26\x27\x28"
32748 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32749 "\x31\x32\x33\x34\x35\x36\x37\x38"
32750 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32751 "\x41\x42\x43\x44\x45\x46\x47\x48"
32752 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
32753 "\x51\x52\x53\x54\x55\x56\x57\x58"
32754 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32755 "\x61\x62\x63\x64\x65\x66\x67\x68"
32756 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32757 "\x71\x72\x73\x74\x75\x76\x77\x78"
32758 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32759 "\x81\x82\x83\x84\x85\x86\x87\x88"
32760 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32761 "\x91\x92\x93\x94\x95\x96\x97\x98"
32762 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
32763 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32764 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32765 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32766 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32767 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
32768 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
32769 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
32770 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
32771 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
32772 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
32773 .psize = 240,
32774 .digest = "\x6c\xc6\x56\xde",
32775 .np = 2,
32776 .tap = { 31, 209 }
32777 }, {
32778 .key = "\xff\xff\xff\xff",
32779 .ksize = 4,
32780 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
32781 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
32782 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
32783 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
32784 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
32785 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
32786 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
32787 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
32788 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
32789 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
32790 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
32791 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
32792 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
32793 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
32794 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
32795 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
32796 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
32797 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
32798 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
32799 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
32800 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
32801 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
32802 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
32803 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
32804 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
32805 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
32806 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
32807 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
32808 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
32809 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
32810 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
32811 "\x47\xde\x75\x0c\x80\x17\xae\x22"
32812 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
32813 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
32814 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
32815 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
32816 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
32817 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
32818 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
32819 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
32820 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
32821 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
32822 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
32823 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
32824 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
32825 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
32826 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
32827 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
32828 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
32829 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
32830 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
32831 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
32832 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
32833 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
32834 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
32835 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
32836 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
32837 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
32838 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
32839 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
32840 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
32841 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
32842 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
32843 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
32844 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
32845 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
32846 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
32847 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
32848 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
32849 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
32850 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
32851 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
32852 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
32853 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
32854 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
32855 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
32856 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
32857 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
32858 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
32859 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
32860 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
32861 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
32862 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
32863 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
32864 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
32865 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
32866 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
32867 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
32868 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
32869 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
32870 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
32871 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
32872 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
32873 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
32874 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
32875 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
32876 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
32877 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
32878 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
32879 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
32880 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
32881 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
32882 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
32883 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
32884 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
32885 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
32886 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
32887 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
32888 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
32889 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
32890 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
32891 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
32892 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
32893 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
32894 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
32895 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
32896 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
32897 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
32898 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
32899 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
32900 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
32901 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
32902 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
32903 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
32904 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
32905 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
32906 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
32907 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
32908 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
32909 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
32910 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
32911 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
32912 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
32913 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
32914 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
32915 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
32916 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
32917 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
32918 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
32919 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
32920 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
32921 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
32922 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
32923 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
32924 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
32925 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
32926 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
32927 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
32928 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
32929 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
32930 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
32931 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
32932 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
32933 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
32934 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
32935 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
32936 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
32937 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
32938 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
32939 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
32940 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
32941 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
32942 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
32943 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
32944 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
32945 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
32946 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
32947 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
32948 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
32949 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
32950 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
32951 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
32952 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
32953 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
32954 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
32955 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
32956 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
32957 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
32958 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
32959 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
32960 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
32961 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
32962 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
32963 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
32964 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
32965 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
32966 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
32967 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
32968 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
32969 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
32970 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
32971 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
32972 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
32973 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
32974 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
32975 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
32976 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
32977 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
32978 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
32979 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
32980 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
32981 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
32982 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
32983 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
32984 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
32985 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
32986 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
32987 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
32988 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
32989 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
32990 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
32991 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
32992 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
32993 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
32994 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
32995 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
32996 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
32997 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
32998 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
32999 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
33000 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
33001 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
33002 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
33003 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
33004 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
33005 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
33006 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
33007 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
33008 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
33009 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
33010 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
33011 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
33012 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
33013 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
33014 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
33015 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
33016 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
33017 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
33018 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
33019 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
33020 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
33021 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
33022 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
33023 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
33024 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
33025 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
33026 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
33027 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
33028 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
33029 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
33030 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
33031 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
33032 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
33033 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
33034 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
33035 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
33036 .psize = 2048,
33037 .digest = "\xfb\x3a\x7a\xda",
33038 }
33039};
33040
33041/*
Herbert Xuda7f0332008-07-31 17:08:25 +080033042 * CRC32C test vectors
33043 */
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020033044#define CRC32C_TEST_VECTORS 15
Herbert Xuda7f0332008-07-31 17:08:25 +080033045
33046static struct hash_testvec crc32c_tv_template[] = {
33047 {
33048 .psize = 0,
33049 .digest = "\x00\x00\x00\x00",
33050 },
33051 {
33052 .key = "\x87\xa9\xcb\xed",
33053 .ksize = 4,
33054 .psize = 0,
33055 .digest = "\x78\x56\x34\x12",
33056 },
33057 {
33058 .key = "\xff\xff\xff\xff",
33059 .ksize = 4,
33060 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33061 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33062 "\x11\x12\x13\x14\x15\x16\x17\x18"
33063 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33064 "\x21\x22\x23\x24\x25\x26\x27\x28",
33065 .psize = 40,
33066 .digest = "\x7f\x15\x2c\x0e",
33067 },
33068 {
33069 .key = "\xff\xff\xff\xff",
33070 .ksize = 4,
33071 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33072 "\x31\x32\x33\x34\x35\x36\x37\x38"
33073 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33074 "\x41\x42\x43\x44\x45\x46\x47\x48"
33075 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
33076 .psize = 40,
33077 .digest = "\xf6\xeb\x80\xe9",
33078 },
33079 {
33080 .key = "\xff\xff\xff\xff",
33081 .ksize = 4,
33082 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
33083 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33084 "\x61\x62\x63\x64\x65\x66\x67\x68"
33085 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33086 "\x71\x72\x73\x74\x75\x76\x77\x78",
33087 .psize = 40,
33088 .digest = "\xed\xbd\x74\xde",
33089 },
33090 {
33091 .key = "\xff\xff\xff\xff",
33092 .ksize = 4,
33093 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33094 "\x81\x82\x83\x84\x85\x86\x87\x88"
33095 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33096 "\x91\x92\x93\x94\x95\x96\x97\x98"
33097 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
33098 .psize = 40,
33099 .digest = "\x62\xc8\x79\xd5",
33100 },
33101 {
33102 .key = "\xff\xff\xff\xff",
33103 .ksize = 4,
33104 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33105 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33106 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33107 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33108 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
33109 .psize = 40,
33110 .digest = "\xd0\x9a\x97\xba",
33111 },
33112 {
33113 .key = "\xff\xff\xff\xff",
33114 .ksize = 4,
33115 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33116 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33117 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33118 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33119 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33120 .psize = 40,
33121 .digest = "\x13\xd9\x29\x2b",
33122 },
33123 {
33124 .key = "\x80\xea\xd3\xf1",
33125 .ksize = 4,
33126 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33127 "\x31\x32\x33\x34\x35\x36\x37\x38"
33128 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33129 "\x41\x42\x43\x44\x45\x46\x47\x48"
33130 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
33131 .psize = 40,
33132 .digest = "\x0c\xb5\xe2\xa2",
33133 },
33134 {
33135 .key = "\xf3\x4a\x1d\x5d",
33136 .ksize = 4,
33137 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
33138 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33139 "\x61\x62\x63\x64\x65\x66\x67\x68"
33140 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33141 "\x71\x72\x73\x74\x75\x76\x77\x78",
33142 .psize = 40,
33143 .digest = "\xd1\x7f\xfb\xa6",
33144 },
33145 {
33146 .key = "\x2e\x80\x04\x59",
33147 .ksize = 4,
33148 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33149 "\x81\x82\x83\x84\x85\x86\x87\x88"
33150 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33151 "\x91\x92\x93\x94\x95\x96\x97\x98"
33152 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
33153 .psize = 40,
33154 .digest = "\x59\x33\xe6\x7a",
33155 },
33156 {
33157 .key = "\xa6\xcc\x19\x85",
33158 .ksize = 4,
33159 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33160 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33161 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33162 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33163 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
33164 .psize = 40,
33165 .digest = "\xbe\x03\x01\xd2",
33166 },
33167 {
33168 .key = "\x41\xfc\xfe\x2d",
33169 .ksize = 4,
33170 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33171 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33172 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33173 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33174 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33175 .psize = 40,
33176 .digest = "\x75\xd3\xc5\x24",
33177 },
33178 {
33179 .key = "\xff\xff\xff\xff",
33180 .ksize = 4,
33181 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33182 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33183 "\x11\x12\x13\x14\x15\x16\x17\x18"
33184 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33185 "\x21\x22\x23\x24\x25\x26\x27\x28"
33186 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33187 "\x31\x32\x33\x34\x35\x36\x37\x38"
33188 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33189 "\x41\x42\x43\x44\x45\x46\x47\x48"
33190 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
33191 "\x51\x52\x53\x54\x55\x56\x57\x58"
33192 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33193 "\x61\x62\x63\x64\x65\x66\x67\x68"
33194 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33195 "\x71\x72\x73\x74\x75\x76\x77\x78"
33196 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33197 "\x81\x82\x83\x84\x85\x86\x87\x88"
33198 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33199 "\x91\x92\x93\x94\x95\x96\x97\x98"
33200 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
33201 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33202 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33203 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33204 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33205 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
33206 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33207 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33208 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33209 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33210 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33211 .psize = 240,
33212 .digest = "\x75\xd3\xc5\x24",
33213 .np = 2,
33214 .tap = { 31, 209 }
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020033215 }, {
33216 .key = "\xff\xff\xff\xff",
33217 .ksize = 4,
33218 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
33219 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
33220 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
33221 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
33222 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
33223 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
33224 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
33225 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
33226 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
33227 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
33228 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
33229 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
33230 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
33231 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
33232 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
33233 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
33234 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
33235 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
33236 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
33237 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
33238 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
33239 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
33240 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
33241 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
33242 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
33243 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
33244 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
33245 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
33246 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
33247 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
33248 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
33249 "\x47\xde\x75\x0c\x80\x17\xae\x22"
33250 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
33251 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
33252 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
33253 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
33254 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
33255 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
33256 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
33257 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
33258 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
33259 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
33260 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
33261 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
33262 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
33263 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
33264 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
33265 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
33266 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
33267 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
33268 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
33269 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
33270 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
33271 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
33272 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
33273 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
33274 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
33275 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
33276 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
33277 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
33278 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
33279 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
33280 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
33281 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
33282 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
33283 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
33284 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
33285 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
33286 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
33287 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
33288 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
33289 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
33290 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
33291 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
33292 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
33293 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
33294 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
33295 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
33296 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
33297 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
33298 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
33299 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
33300 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
33301 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
33302 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
33303 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
33304 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
33305 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
33306 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
33307 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
33308 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
33309 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
33310 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
33311 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
33312 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
33313 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
33314 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
33315 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
33316 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
33317 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
33318 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
33319 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
33320 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
33321 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
33322 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
33323 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
33324 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
33325 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
33326 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
33327 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
33328 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
33329 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
33330 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
33331 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
33332 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
33333 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
33334 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
33335 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
33336 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
33337 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
33338 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
33339 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
33340 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
33341 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
33342 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
33343 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
33344 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
33345 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
33346 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
33347 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
33348 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
33349 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
33350 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
33351 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
33352 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
33353 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
33354 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
33355 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
33356 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
33357 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
33358 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
33359 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
33360 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
33361 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
33362 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
33363 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
33364 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
33365 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
33366 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
33367 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
33368 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
33369 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
33370 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
33371 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
33372 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
33373 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
33374 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
33375 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
33376 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
33377 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
33378 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
33379 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
33380 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
33381 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
33382 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
33383 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
33384 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
33385 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
33386 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
33387 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
33388 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
33389 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
33390 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
33391 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
33392 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
33393 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
33394 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
33395 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
33396 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
33397 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
33398 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
33399 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
33400 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
33401 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
33402 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
33403 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
33404 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
33405 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
33406 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
33407 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
33408 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
33409 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
33410 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
33411 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
33412 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
33413 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
33414 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
33415 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
33416 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
33417 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
33418 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
33419 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
33420 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
33421 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
33422 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
33423 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
33424 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
33425 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
33426 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
33427 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
33428 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
33429 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
33430 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
33431 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
33432 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
33433 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
33434 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
33435 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
33436 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
33437 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
33438 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
33439 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
33440 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
33441 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
33442 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
33443 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
33444 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
33445 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
33446 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
33447 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
33448 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
33449 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
33450 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
33451 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
33452 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
33453 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
33454 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
33455 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
33456 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
33457 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
33458 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
33459 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
33460 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
33461 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
33462 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
33463 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
33464 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
33465 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
33466 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
33467 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
33468 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
33469 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
33470 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
33471 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
33472 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
33473 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
33474 .psize = 2048,
33475 .digest = "\xec\x26\x4d\x95",
33476 }
Herbert Xuda7f0332008-07-31 17:08:25 +080033477};
33478
Sonic Zhanga482b082012-05-25 17:54:13 +080033479/*
33480 * Blakcifn CRC test vectors
33481 */
33482#define BFIN_CRC_TEST_VECTORS 6
33483
33484static struct hash_testvec bfin_crc_tv_template[] = {
33485 {
33486 .psize = 0,
33487 .digest = "\x00\x00\x00\x00",
33488 },
33489 {
33490 .key = "\x87\xa9\xcb\xed",
33491 .ksize = 4,
33492 .psize = 0,
33493 .digest = "\x87\xa9\xcb\xed",
33494 },
33495 {
33496 .key = "\xff\xff\xff\xff",
33497 .ksize = 4,
33498 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33499 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33500 "\x11\x12\x13\x14\x15\x16\x17\x18"
33501 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33502 "\x21\x22\x23\x24\x25\x26\x27\x28",
33503 .psize = 40,
33504 .digest = "\x84\x0c\x8d\xa2",
33505 },
33506 {
33507 .key = "\xff\xff\xff\xff",
33508 .ksize = 4,
33509 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33510 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33511 "\x11\x12\x13\x14\x15\x16\x17\x18"
33512 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33513 "\x21\x22\x23\x24\x25\x26",
33514 .psize = 38,
33515 .digest = "\x8c\x58\xec\xb7",
33516 },
33517 {
33518 .key = "\xff\xff\xff\xff",
33519 .ksize = 4,
33520 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33521 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33522 "\x11\x12\x13\x14\x15\x16\x17\x18"
33523 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33524 "\x21\x22\x23\x24\x25\x26\x27",
33525 .psize = 39,
33526 .digest = "\xdc\x50\x28\x7b",
33527 },
33528 {
33529 .key = "\xff\xff\xff\xff",
33530 .ksize = 4,
33531 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33532 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33533 "\x11\x12\x13\x14\x15\x16\x17\x18"
33534 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33535 "\x21\x22\x23\x24\x25\x26\x27\x28"
33536 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33537 "\x31\x32\x33\x34\x35\x36\x37\x38"
33538 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33539 "\x41\x42\x43\x44\x45\x46\x47\x48"
33540 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
33541 "\x51\x52\x53\x54\x55\x56\x57\x58"
33542 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33543 "\x61\x62\x63\x64\x65\x66\x67\x68"
33544 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33545 "\x71\x72\x73\x74\x75\x76\x77\x78"
33546 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33547 "\x81\x82\x83\x84\x85\x86\x87\x88"
33548 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33549 "\x91\x92\x93\x94\x95\x96\x97\x98"
33550 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
33551 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33552 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33553 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33554 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33555 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
33556 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33557 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33558 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33559 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33560 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33561 .psize = 240,
33562 .digest = "\x10\x19\x4a\x5c",
33563 .np = 2,
33564 .tap = { 31, 209 }
33565 },
33566
33567};
33568
KOVACS Krisztian1443cc92014-08-22 10:44:36 +020033569#define LZ4_COMP_TEST_VECTORS 1
33570#define LZ4_DECOMP_TEST_VECTORS 1
33571
33572static struct comp_testvec lz4_comp_tv_template[] = {
33573 {
33574 .inlen = 70,
33575 .outlen = 45,
33576 .input = "Join us now and share the software "
33577 "Join us now and share the software ",
33578 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33579 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33580 "\x64\x20\x73\x68\x61\x72\x65\x20"
33581 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33582 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33583 "\x77\x61\x72\x65\x20",
33584 },
33585};
33586
33587static struct comp_testvec lz4_decomp_tv_template[] = {
33588 {
33589 .inlen = 45,
33590 .outlen = 70,
33591 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33592 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33593 "\x64\x20\x73\x68\x61\x72\x65\x20"
33594 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33595 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33596 "\x77\x61\x72\x65\x20",
33597 .output = "Join us now and share the software "
33598 "Join us now and share the software ",
33599 },
33600};
33601
33602#define LZ4HC_COMP_TEST_VECTORS 1
33603#define LZ4HC_DECOMP_TEST_VECTORS 1
33604
33605static struct comp_testvec lz4hc_comp_tv_template[] = {
33606 {
33607 .inlen = 70,
33608 .outlen = 45,
33609 .input = "Join us now and share the software "
33610 "Join us now and share the software ",
33611 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33612 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33613 "\x64\x20\x73\x68\x61\x72\x65\x20"
33614 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33615 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33616 "\x77\x61\x72\x65\x20",
33617 },
33618};
33619
33620static struct comp_testvec lz4hc_decomp_tv_template[] = {
33621 {
33622 .inlen = 45,
33623 .outlen = 70,
33624 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33625 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33626 "\x64\x20\x73\x68\x61\x72\x65\x20"
33627 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33628 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33629 "\x77\x61\x72\x65\x20",
33630 .output = "Join us now and share the software "
33631 "Join us now and share the software ",
33632 },
33633};
33634
Herbert Xuda7f0332008-07-31 17:08:25 +080033635#endif /* _CRYPTO_TESTMGR_H */