blob: 487ec880e889c50659d9e033fb4b2261d593349d [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
379/*
380 * MD5 test vectors from RFC1321
381 */
382#define MD5_TEST_VECTORS 7
383
384static struct hash_testvec md5_tv_template[] = {
385 {
386 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
387 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
388 }, {
389 .plaintext = "a",
390 .psize = 1,
391 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
392 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
393 }, {
394 .plaintext = "abc",
395 .psize = 3,
396 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
397 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
398 }, {
399 .plaintext = "message digest",
400 .psize = 14,
401 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
402 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
403 }, {
404 .plaintext = "abcdefghijklmnopqrstuvwxyz",
405 .psize = 26,
406 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
407 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
408 .np = 2,
409 .tap = {13, 13}
410 }, {
411 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
412 .psize = 62,
413 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
414 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
415 }, {
416 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
417 "345678901234567890",
418 .psize = 80,
419 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
420 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
421 }
422
423};
424
425/*
426 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
427 */
428#define RMD128_TEST_VECTORS 10
429
430static struct hash_testvec rmd128_tv_template[] = {
431 {
432 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
433 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
434 }, {
435 .plaintext = "a",
436 .psize = 1,
437 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
438 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
439 }, {
440 .plaintext = "abc",
441 .psize = 3,
442 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
443 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
444 }, {
445 .plaintext = "message digest",
446 .psize = 14,
447 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
448 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
449 }, {
450 .plaintext = "abcdefghijklmnopqrstuvwxyz",
451 .psize = 26,
452 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
453 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
454 }, {
455 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
456 "fghijklmnopqrstuvwxyz0123456789",
457 .psize = 62,
458 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
459 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
460 }, {
461 .plaintext = "1234567890123456789012345678901234567890"
462 "1234567890123456789012345678901234567890",
463 .psize = 80,
464 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
465 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
466 }, {
467 .plaintext = "abcdbcdecdefdefgefghfghighij"
468 "hijkijkljklmklmnlmnomnopnopq",
469 .psize = 56,
470 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
471 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
472 .np = 2,
473 .tap = { 28, 28 },
474 }, {
475 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
476 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
477 "lmnopqrsmnopqrstnopqrstu",
478 .psize = 112,
479 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
480 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
481 }, {
482 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
483 .psize = 32,
484 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
485 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
486 }
487};
488
489/*
490 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
491 */
492#define RMD160_TEST_VECTORS 10
493
494static struct hash_testvec rmd160_tv_template[] = {
495 {
496 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
497 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
498 }, {
499 .plaintext = "a",
500 .psize = 1,
501 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
502 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
503 }, {
504 .plaintext = "abc",
505 .psize = 3,
506 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
507 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
508 }, {
509 .plaintext = "message digest",
510 .psize = 14,
511 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
512 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
513 }, {
514 .plaintext = "abcdefghijklmnopqrstuvwxyz",
515 .psize = 26,
516 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
517 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
518 }, {
519 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
520 "fghijklmnopqrstuvwxyz0123456789",
521 .psize = 62,
522 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
523 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
524 }, {
525 .plaintext = "1234567890123456789012345678901234567890"
526 "1234567890123456789012345678901234567890",
527 .psize = 80,
528 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
529 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
530 }, {
531 .plaintext = "abcdbcdecdefdefgefghfghighij"
532 "hijkijkljklmklmnlmnomnopnopq",
533 .psize = 56,
534 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
535 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
536 .np = 2,
537 .tap = { 28, 28 },
538 }, {
539 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
540 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
541 "lmnopqrsmnopqrstnopqrstu",
542 .psize = 112,
543 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
544 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
545 }, {
546 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
547 .psize = 32,
548 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
549 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
550 }
551};
552
553/*
554 * RIPEMD-256 test vectors
555 */
556#define RMD256_TEST_VECTORS 8
557
558static struct hash_testvec rmd256_tv_template[] = {
559 {
560 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
561 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
562 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
563 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
564 }, {
565 .plaintext = "a",
566 .psize = 1,
567 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
568 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
569 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
570 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
571 }, {
572 .plaintext = "abc",
573 .psize = 3,
574 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
575 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
576 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
577 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
578 }, {
579 .plaintext = "message digest",
580 .psize = 14,
581 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
582 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
583 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
584 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
585 }, {
586 .plaintext = "abcdefghijklmnopqrstuvwxyz",
587 .psize = 26,
588 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
589 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
590 "\x78\x96\x11\x8a\x51\x97\x96\x87"
591 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
592 }, {
593 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
594 "fghijklmnopqrstuvwxyz0123456789",
595 .psize = 62,
596 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
597 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
598 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
599 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
600 }, {
601 .plaintext = "1234567890123456789012345678901234567890"
602 "1234567890123456789012345678901234567890",
603 .psize = 80,
604 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
605 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
606 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
607 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
608 }, {
609 .plaintext = "abcdbcdecdefdefgefghfghighij"
610 "hijkijkljklmklmnlmnomnopnopq",
611 .psize = 56,
612 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
613 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
614 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
615 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
616 .np = 2,
617 .tap = { 28, 28 },
618 }
619};
620
621/*
622 * RIPEMD-320 test vectors
623 */
624#define RMD320_TEST_VECTORS 8
625
626static struct hash_testvec rmd320_tv_template[] = {
627 {
628 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
629 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
630 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
631 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
632 }, {
633 .plaintext = "a",
634 .psize = 1,
635 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
636 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
637 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
638 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
639 }, {
640 .plaintext = "abc",
641 .psize = 3,
642 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
643 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
644 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
645 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
646 }, {
647 .plaintext = "message digest",
648 .psize = 14,
649 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
650 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
651 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
652 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
653 }, {
654 .plaintext = "abcdefghijklmnopqrstuvwxyz",
655 .psize = 26,
656 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
657 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
658 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
659 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
660 }, {
661 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
662 "fghijklmnopqrstuvwxyz0123456789",
663 .psize = 62,
664 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
665 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
666 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
667 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
668 }, {
669 .plaintext = "1234567890123456789012345678901234567890"
670 "1234567890123456789012345678901234567890",
671 .psize = 80,
672 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
673 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
674 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
675 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
676 }, {
677 .plaintext = "abcdbcdecdefdefgefghfghighij"
678 "hijkijkljklmklmnlmnomnopnopq",
679 .psize = 56,
680 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
681 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
682 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
683 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
684 .np = 2,
685 .tap = { 28, 28 },
686 }
687};
688
Herbert Xu684115212013-09-07 12:56:26 +1000689#define CRCT10DIF_TEST_VECTORS 3
690static struct hash_testvec crct10dif_tv_template[] = {
691 {
692 .plaintext = "abc",
693 .psize = 3,
694#ifdef __LITTLE_ENDIAN
695 .digest = "\x3b\x44",
696#else
697 .digest = "\x44\x3b",
698#endif
699 }, {
700 .plaintext = "1234567890123456789012345678901234567890"
701 "123456789012345678901234567890123456789",
702 .psize = 79,
703#ifdef __LITTLE_ENDIAN
704 .digest = "\x70\x4b",
705#else
706 .digest = "\x4b\x70",
707#endif
708 }, {
709 .plaintext =
710 "abcddddddddddddddddddddddddddddddddddddddddddddddddddddd",
711 .psize = 56,
712#ifdef __LITTLE_ENDIAN
713 .digest = "\xe3\x9c",
714#else
715 .digest = "\x9c\xe3",
716#endif
717 .np = 2,
718 .tap = { 28, 28 }
719 }
720};
721
Herbert Xuda7f0332008-07-31 17:08:25 +0800722/*
723 * SHA1 test vectors from from FIPS PUB 180-1
Herbert Xubd1f2992011-02-17 14:24:45 +1100724 * Long vector from CAVS 5.0
Herbert Xuda7f0332008-07-31 17:08:25 +0800725 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300726#define SHA1_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +0800727
728static struct hash_testvec sha1_tv_template[] = {
729 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300730 .plaintext = "",
731 .psize = 0,
732 .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55"
733 "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09",
734 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800735 .plaintext = "abc",
736 .psize = 3,
737 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
738 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
739 }, {
740 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
741 .psize = 56,
742 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
743 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
744 .np = 2,
745 .tap = { 28, 28 }
Herbert Xubd1f2992011-02-17 14:24:45 +1100746 }, {
747 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
748 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
749 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
750 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
751 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
752 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
753 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
754 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
755 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
756 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
757 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
758 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
759 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
760 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
761 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
762 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
763 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
764 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
765 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
766 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
767 "\x5a\x90\x11",
768 .psize = 163,
769 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
770 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
771 .np = 4,
772 .tap = { 63, 64, 31, 5 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800773 }, {
774 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
775 .psize = 64,
776 .digest = "\xc8\x71\xf6\x9a\x63\xcc\xa9\x84\x84\x82"
777 "\x64\xe7\x79\x95\x5d\xd7\x19\x41\x7c\x91",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300778 }, {
779 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
780 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
781 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
782 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
783 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
784 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
785 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
786 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
787 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
788 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
789 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
790 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
791 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
792 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
793 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
794 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
795 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
796 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
797 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
798 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
799 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
800 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
801 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
802 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
803 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
804 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
805 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
806 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
807 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
808 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
809 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
810 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
811 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
812 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
813 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
814 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
815 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
816 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
817 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
818 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
819 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
820 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
821 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
822 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
823 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
824 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
825 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
826 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
827 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
828 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
829 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
830 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
831 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
832 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
833 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
834 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
835 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
836 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
837 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
838 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
839 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
840 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
841 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
842 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
843 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
844 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
845 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
846 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
847 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
848 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
849 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
850 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
851 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
852 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
853 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
854 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
855 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
856 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
857 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
858 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
859 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
860 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
861 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
862 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
863 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
864 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
865 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
866 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
867 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
868 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
869 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
870 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
871 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
872 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
873 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
874 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
875 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
876 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
877 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
878 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
879 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
880 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
881 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
882 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
883 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
884 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
885 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
886 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
887 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
888 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
889 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
890 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
891 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
892 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
893 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
894 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
895 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
896 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
897 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
898 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
899 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
900 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
901 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
902 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
903 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
904 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
905 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
906 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
907 .psize = 1023,
908 .digest = "\xb8\xe3\x54\xed\xc5\xfc\xef\xa4"
909 "\x55\x73\x4a\x81\x99\xe4\x47\x2a"
910 "\x30\xd6\xc9\x85",
Herbert Xuda7f0332008-07-31 17:08:25 +0800911 }
912};
913
914
915/*
916 * SHA224 test vectors from from FIPS PUB 180-2
917 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300918#define SHA224_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +0800919
920static struct hash_testvec sha224_tv_template[] = {
921 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300922 .plaintext = "",
923 .psize = 0,
924 .digest = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9"
925 "\x47\x61\x02\xbb\x28\x82\x34\xc4"
926 "\x15\xa2\xb0\x1f\x82\x8e\xa6\x2a"
927 "\xc5\xb3\xe4\x2f",
928 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800929 .plaintext = "abc",
930 .psize = 3,
931 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
932 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
933 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
934 "\xE3\x6C\x9D\xA7",
935 }, {
936 .plaintext =
937 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
938 .psize = 56,
939 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
940 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
941 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
942 "\x52\x52\x25\x25",
943 .np = 2,
944 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800945 }, {
946 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
947 .psize = 64,
948 .digest = "\xc4\xdb\x2b\x3a\x58\xc3\x99\x01"
949 "\x42\xfd\x10\x92\xaa\x4e\x04\x08"
950 "\x58\xbb\xbb\xe8\xf8\x14\xa7\x0c"
951 "\xef\x3b\xcb\x0e",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300952 }, {
953 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
954 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
955 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
956 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
957 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
958 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
959 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
960 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
961 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
962 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
963 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
964 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
965 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
966 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
967 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
968 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
969 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
970 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
971 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
972 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
973 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
974 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
975 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
976 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
977 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
978 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
979 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
980 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
981 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
982 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
983 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
984 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
985 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
986 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
987 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
988 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
989 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
990 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
991 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
992 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
993 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
994 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
995 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
996 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
997 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
998 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
999 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1000 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1001 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1002 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1003 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1004 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1005 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1006 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1007 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1008 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1009 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1010 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1011 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1012 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1013 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1014 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1015 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1016 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1017 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1018 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1019 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1020 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1021 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1022 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1023 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1024 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1025 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1026 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1027 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1028 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1029 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1030 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1031 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1032 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1033 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1034 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1035 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1036 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1037 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1038 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1039 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1040 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1041 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1042 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1043 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1044 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1045 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1046 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1047 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1048 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1049 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1050 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1051 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1052 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1053 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1054 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1055 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1056 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1057 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1058 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1059 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1060 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1061 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1062 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1063 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1064 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1065 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1066 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1067 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1068 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1069 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1070 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1071 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1072 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1073 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1074 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1075 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1076 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1077 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1078 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1079 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1080 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1081 .psize = 1023,
1082 .digest = "\x98\x43\x07\x63\x75\xe0\xa7\x1c"
1083 "\x78\xb1\x8b\xfd\x04\xf5\x2d\x91"
1084 "\x20\x48\xa4\x28\xff\x55\xb1\xd3"
1085 "\xe6\xf9\x4f\xcc",
Herbert Xuda7f0332008-07-31 17:08:25 +08001086 }
1087};
1088
1089/*
1090 * SHA256 test vectors from from NIST
1091 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001092#define SHA256_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08001093
1094static struct hash_testvec sha256_tv_template[] = {
1095 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001096 .plaintext = "",
1097 .psize = 0,
1098 .digest = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14"
1099 "\x9a\xfb\xf4\xc8\x99\x6f\xb9\x24"
1100 "\x27\xae\x41\xe4\x64\x9b\x93\x4c"
1101 "\xa4\x95\x99\x1b\x78\x52\xb8\x55",
1102 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001103 .plaintext = "abc",
1104 .psize = 3,
1105 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
1106 "\x41\x41\x40\xde\x5d\xae\x22\x23"
1107 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
1108 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
1109 }, {
1110 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1111 .psize = 56,
1112 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
1113 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
1114 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
1115 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
1116 .np = 2,
1117 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +08001118 }, {
1119 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1120 .psize = 64,
1121 .digest = "\xb5\xfe\xad\x56\x7d\xff\xcb\xa4"
1122 "\x2c\x32\x29\x32\x19\xbb\xfb\xfa"
1123 "\xd6\xff\x94\xa3\x72\x91\x85\x66"
1124 "\x3b\xa7\x87\x77\x58\xa3\x40\x3a",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001125 }, {
1126 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1127 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1128 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1129 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1130 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1131 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1132 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1133 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1134 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1135 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1136 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1137 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1138 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1139 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1140 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1141 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1142 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1143 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1144 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1145 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1146 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1147 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1148 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1149 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1150 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1151 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1152 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1153 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1154 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1155 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1156 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1157 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1158 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1159 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1160 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1161 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1162 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1163 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1164 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1165 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1166 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1167 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1168 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1169 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1170 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1171 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1172 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1173 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1174 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1175 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1176 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1177 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1178 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1179 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1180 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1181 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1182 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1183 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1184 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1185 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1186 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1187 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1188 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1189 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1190 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1191 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1192 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1193 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1194 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1195 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1196 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1197 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1198 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1199 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1200 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1201 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1202 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1203 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1204 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1205 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1206 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1207 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1208 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1209 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1210 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1211 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1212 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1213 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1214 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1215 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1216 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1217 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1218 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1219 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1220 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1221 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1222 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1223 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1224 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1225 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1226 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1227 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1228 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1229 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1230 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1231 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1232 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1233 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1234 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1235 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1236 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1237 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1238 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1239 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1240 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1241 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1242 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1243 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1244 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1245 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1246 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1247 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1248 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1249 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1250 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1251 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1252 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1253 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1254 .psize = 1023,
1255 .digest = "\xc5\xce\x0c\xca\x01\x4f\x53\x3a"
1256 "\x32\x32\x17\xcc\xd4\x6a\x71\xa9"
1257 "\xf3\xed\x50\x10\x64\x8e\x06\xbe"
1258 "\x9b\x4a\xa6\xbb\x05\x89\x59\x51",
Ard Biesheuvel45859882014-04-16 20:40:04 +08001259 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001260};
1261
1262/*
1263 * SHA384 test vectors from from NIST and kerneli
1264 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001265#define SHA384_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001266
1267static struct hash_testvec sha384_tv_template[] = {
1268 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001269 .plaintext = "",
1270 .psize = 0,
1271 .digest = "\x38\xb0\x60\xa7\x51\xac\x96\x38"
1272 "\x4c\xd9\x32\x7e\xb1\xb1\xe3\x6a"
1273 "\x21\xfd\xb7\x11\x14\xbe\x07\x43"
1274 "\x4c\x0c\xc7\xbf\x63\xf6\xe1\xda"
1275 "\x27\x4e\xde\xbf\xe7\x6f\x65\xfb"
1276 "\xd5\x1a\xd2\xf1\x48\x98\xb9\x5b",
1277 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001278 .plaintext= "abc",
1279 .psize = 3,
1280 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
1281 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
1282 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
1283 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
1284 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
1285 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
1286 }, {
1287 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1288 .psize = 56,
1289 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
1290 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
1291 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
1292 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
1293 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
1294 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
1295 }, {
1296 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1297 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1298 .psize = 112,
1299 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
1300 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
1301 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
1302 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
1303 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
1304 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
1305 }, {
1306 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1307 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1308 .psize = 104,
1309 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
1310 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
1311 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
1312 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
1313 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
1314 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
1315 .np = 4,
1316 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001317 }, {
1318 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1319 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1320 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1321 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1322 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1323 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1324 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1325 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1326 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1327 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1328 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1329 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1330 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1331 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1332 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1333 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1334 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1335 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1336 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1337 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1338 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1339 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1340 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1341 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1342 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1343 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1344 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1345 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1346 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1347 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1348 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1349 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1350 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1351 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1352 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1353 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1354 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1355 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1356 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1357 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1358 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1359 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1360 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1361 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1362 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1363 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1364 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1365 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1366 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1367 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1368 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1369 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1370 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1371 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1372 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1373 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1374 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1375 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1376 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1377 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1378 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1379 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1380 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1381 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1382 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1383 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1384 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1385 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1386 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1387 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1388 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1389 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1390 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1391 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1392 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1393 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1394 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1395 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1396 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1397 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1398 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1399 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1400 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1401 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1402 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1403 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1404 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1405 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1406 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1407 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1408 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1409 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1410 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1411 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1412 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1413 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1414 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1415 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1416 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1417 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1418 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1419 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1420 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1421 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1422 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1423 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1424 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1425 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1426 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1427 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1428 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1429 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1430 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1431 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1432 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1433 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1434 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1435 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1436 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1437 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1438 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1439 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1440 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1441 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1442 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1443 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1444 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1445 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1446 .psize = 1023,
1447 .digest = "\x4d\x97\x23\xc8\xea\x7a\x7c\x15"
1448 "\xb8\xff\x97\x9c\xf5\x13\x4f\x31"
1449 "\xde\x67\xf7\x24\x73\xcd\x70\x1c"
1450 "\x03\x4a\xba\x8a\x87\x49\xfe\xdc"
1451 "\x75\x29\x62\x83\xae\x3f\x17\xab"
1452 "\xfd\x10\x4d\x8e\x17\x1c\x1f\xca",
1453 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001454};
1455
1456/*
1457 * SHA512 test vectors from from NIST and kerneli
1458 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001459#define SHA512_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001460
1461static struct hash_testvec sha512_tv_template[] = {
1462 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001463 .plaintext = "",
1464 .psize = 0,
1465 .digest = "\xcf\x83\xe1\x35\x7e\xef\xb8\xbd"
1466 "\xf1\x54\x28\x50\xd6\x6d\x80\x07"
1467 "\xd6\x20\xe4\x05\x0b\x57\x15\xdc"
1468 "\x83\xf4\xa9\x21\xd3\x6c\xe9\xce"
1469 "\x47\xd0\xd1\x3c\x5d\x85\xf2\xb0"
1470 "\xff\x83\x18\xd2\x87\x7e\xec\x2f"
1471 "\x63\xb9\x31\xbd\x47\x41\x7a\x81"
1472 "\xa5\x38\x32\x7a\xf9\x27\xda\x3e",
1473 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001474 .plaintext = "abc",
1475 .psize = 3,
1476 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
1477 "\xcc\x41\x73\x49\xae\x20\x41\x31"
1478 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
1479 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
1480 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
1481 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
1482 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
1483 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
1484 }, {
1485 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1486 .psize = 56,
1487 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
1488 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
1489 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
1490 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
1491 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
1492 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
1493 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
1494 "\x54\xec\x63\x12\x38\xca\x34\x45",
1495 }, {
1496 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1497 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1498 .psize = 112,
1499 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
1500 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
1501 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
1502 "\x72\x99\xae\xad\xb6\x88\x90\x18"
1503 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
1504 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
1505 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
1506 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
1507 }, {
1508 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1509 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1510 .psize = 104,
1511 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
1512 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
1513 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
1514 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
1515 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
1516 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
1517 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
1518 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
1519 .np = 4,
1520 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001521 }, {
1522 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1523 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1524 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1525 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1526 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1527 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1528 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1529 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1530 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1531 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1532 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1533 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1534 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1535 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1536 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1537 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1538 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1539 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1540 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1541 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1542 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1543 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1544 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1545 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1546 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1547 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1548 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1549 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1550 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1551 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1552 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1553 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1554 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1555 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1556 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1557 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1558 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1559 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1560 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1561 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1562 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1563 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1564 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1565 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1566 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1567 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1568 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1569 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1570 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1571 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1572 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1573 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1574 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1575 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1576 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1577 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1578 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1579 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1580 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1581 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1582 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1583 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1584 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1585 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1586 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1587 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1588 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1589 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1590 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1591 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1592 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1593 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1594 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1595 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1596 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1597 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1598 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1599 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1600 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1601 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1602 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1603 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1604 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1605 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1606 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1607 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1608 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1609 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1610 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1611 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1612 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1613 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1614 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1615 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1616 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1617 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1618 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1619 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1620 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1621 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1622 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1623 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1624 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1625 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1626 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1627 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1628 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1629 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1630 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1631 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1632 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1633 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1634 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1635 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1636 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1637 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1638 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1639 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1640 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1641 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1642 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1643 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1644 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1645 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1646 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1647 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1648 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1649 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1650 .psize = 1023,
1651 .digest = "\x76\xc9\xd4\x91\x7a\x5f\x0f\xaa"
1652 "\x13\x39\xf3\x01\x7a\xfa\xe5\x41"
1653 "\x5f\x0b\xf8\xeb\x32\xfc\xbf\xb0"
1654 "\xfa\x8c\xcd\x17\x83\xe2\xfa\xeb"
1655 "\x1c\x19\xde\xe2\x75\xdc\x34\x64"
1656 "\x5f\x35\x9c\x61\x2f\x10\xf9\xec"
1657 "\x59\xca\x9d\xcc\x25\x0c\x43\xba"
1658 "\x85\xa8\xf8\xfe\xb5\x24\xb2\xee",
1659 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001660};
1661
1662
1663/*
1664 * WHIRLPOOL test vectors from Whirlpool package
1665 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
1666 * submission
1667 */
1668#define WP512_TEST_VECTORS 8
1669
1670static struct hash_testvec wp512_tv_template[] = {
1671 {
1672 .plaintext = "",
1673 .psize = 0,
1674 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1675 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1676 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1677 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1678 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1679 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
1680 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
1681 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
1682
1683
1684 }, {
1685 .plaintext = "a",
1686 .psize = 1,
1687 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1688 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1689 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1690 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1691 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1692 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
1693 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
1694 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
1695 }, {
1696 .plaintext = "abc",
1697 .psize = 3,
1698 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1699 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1700 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1701 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1702 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1703 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
1704 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
1705 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
1706 }, {
1707 .plaintext = "message digest",
1708 .psize = 14,
1709 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1710 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1711 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1712 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1713 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1714 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
1715 "\x92\xED\x92\x00\x52\x83\x8F\x33"
1716 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
1717 }, {
1718 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1719 .psize = 26,
1720 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1721 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1722 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1723 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1724 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1725 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
1726 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
1727 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
1728 }, {
1729 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1730 "abcdefghijklmnopqrstuvwxyz0123456789",
1731 .psize = 62,
1732 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1733 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1734 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1735 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1736 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1737 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
1738 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
1739 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
1740 }, {
1741 .plaintext = "1234567890123456789012345678901234567890"
1742 "1234567890123456789012345678901234567890",
1743 .psize = 80,
1744 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1745 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1746 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1747 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1748 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1749 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
1750 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
1751 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
1752 }, {
1753 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1754 .psize = 32,
1755 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1756 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1757 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1758 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1759 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1760 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
1761 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
1762 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
1763 },
1764};
1765
1766#define WP384_TEST_VECTORS 8
1767
1768static struct hash_testvec wp384_tv_template[] = {
1769 {
1770 .plaintext = "",
1771 .psize = 0,
1772 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1773 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1774 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1775 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1776 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1777 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
1778
1779
1780 }, {
1781 .plaintext = "a",
1782 .psize = 1,
1783 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1784 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1785 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1786 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1787 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1788 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
1789 }, {
1790 .plaintext = "abc",
1791 .psize = 3,
1792 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1793 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1794 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1795 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1796 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1797 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
1798 }, {
1799 .plaintext = "message digest",
1800 .psize = 14,
1801 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1802 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1803 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1804 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1805 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1806 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
1807 }, {
1808 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1809 .psize = 26,
1810 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1811 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1812 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1813 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1814 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1815 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
1816 }, {
1817 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1818 "abcdefghijklmnopqrstuvwxyz0123456789",
1819 .psize = 62,
1820 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1821 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1822 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1823 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1824 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1825 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
1826 }, {
1827 .plaintext = "1234567890123456789012345678901234567890"
1828 "1234567890123456789012345678901234567890",
1829 .psize = 80,
1830 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1831 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1832 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1833 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1834 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1835 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
1836 }, {
1837 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1838 .psize = 32,
1839 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1840 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1841 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1842 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1843 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1844 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
1845 },
1846};
1847
1848#define WP256_TEST_VECTORS 8
1849
1850static struct hash_testvec wp256_tv_template[] = {
1851 {
1852 .plaintext = "",
1853 .psize = 0,
1854 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1855 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1856 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1857 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
1858
1859
1860 }, {
1861 .plaintext = "a",
1862 .psize = 1,
1863 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1864 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1865 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1866 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
1867 }, {
1868 .plaintext = "abc",
1869 .psize = 3,
1870 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1871 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1872 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1873 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
1874 }, {
1875 .plaintext = "message digest",
1876 .psize = 14,
1877 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1878 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1879 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1880 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
1881 }, {
1882 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1883 .psize = 26,
1884 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1885 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1886 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1887 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
1888 }, {
1889 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1890 "abcdefghijklmnopqrstuvwxyz0123456789",
1891 .psize = 62,
1892 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1893 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1894 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1895 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
1896 }, {
1897 .plaintext = "1234567890123456789012345678901234567890"
1898 "1234567890123456789012345678901234567890",
1899 .psize = 80,
1900 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1901 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1902 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1903 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
1904 }, {
1905 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1906 .psize = 32,
1907 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1908 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1909 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1910 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
1911 },
1912};
1913
1914/*
1915 * TIGER test vectors from Tiger website
1916 */
1917#define TGR192_TEST_VECTORS 6
1918
1919static struct hash_testvec tgr192_tv_template[] = {
1920 {
1921 .plaintext = "",
1922 .psize = 0,
1923 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1924 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1925 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
1926 }, {
1927 .plaintext = "abc",
1928 .psize = 3,
1929 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1930 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1931 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
1932 }, {
1933 .plaintext = "Tiger",
1934 .psize = 5,
1935 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1936 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1937 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
1938 }, {
1939 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1940 .psize = 64,
1941 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1942 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1943 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
1944 }, {
1945 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1946 .psize = 64,
1947 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1948 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1949 "\x57\x89\x65\x65\x97\x5f\x91\x97",
1950 }, {
1951 .plaintext = "Tiger - A Fast New Hash Function, "
1952 "by Ross Anderson and Eli Biham, "
1953 "proceedings of Fast Software Encryption 3, "
1954 "Cambridge, 1996.",
1955 .psize = 125,
1956 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1957 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1958 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
1959 },
1960};
1961
1962#define TGR160_TEST_VECTORS 6
1963
1964static struct hash_testvec tgr160_tv_template[] = {
1965 {
1966 .plaintext = "",
1967 .psize = 0,
1968 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1969 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1970 "\xf3\x73\xde\x2d",
1971 }, {
1972 .plaintext = "abc",
1973 .psize = 3,
1974 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1975 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1976 "\x93\x5f\x7b\x95",
1977 }, {
1978 .plaintext = "Tiger",
1979 .psize = 5,
1980 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1981 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1982 "\x37\x79\x0c\x11",
1983 }, {
1984 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1985 .psize = 64,
1986 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1987 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1988 "\xb5\x86\x44\x50",
1989 }, {
1990 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1991 .psize = 64,
1992 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1993 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1994 "\x57\x89\x65\x65",
1995 }, {
1996 .plaintext = "Tiger - A Fast New Hash Function, "
1997 "by Ross Anderson and Eli Biham, "
1998 "proceedings of Fast Software Encryption 3, "
1999 "Cambridge, 1996.",
2000 .psize = 125,
2001 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
2002 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
2003 "\xdd\x68\x15\x1d",
2004 },
2005};
2006
2007#define TGR128_TEST_VECTORS 6
2008
2009static struct hash_testvec tgr128_tv_template[] = {
2010 {
2011 .plaintext = "",
2012 .psize = 0,
2013 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
2014 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
2015 }, {
2016 .plaintext = "abc",
2017 .psize = 3,
2018 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
2019 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
2020 }, {
2021 .plaintext = "Tiger",
2022 .psize = 5,
2023 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
2024 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
2025 }, {
2026 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
2027 .psize = 64,
2028 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
2029 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
2030 }, {
2031 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
2032 .psize = 64,
2033 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
2034 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
2035 }, {
2036 .plaintext = "Tiger - A Fast New Hash Function, "
2037 "by Ross Anderson and Eli Biham, "
2038 "proceedings of Fast Software Encryption 3, "
2039 "Cambridge, 1996.",
2040 .psize = 125,
2041 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
2042 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
2043 },
2044};
2045
Harald Freudenberger445a8e02015-05-21 17:34:31 +02002046#define GHASH_TEST_VECTORS 6
Youquan, Song507069c2009-11-23 20:23:04 +08002047
2048static struct hash_testvec ghash_tv_template[] =
2049{
2050 {
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002051 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03"
2052 "\xff\xca\xff\x95\xf8\x30\xf0\x61",
Youquan, Song507069c2009-11-23 20:23:04 +08002053 .ksize = 16,
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002054 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
2055 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
Youquan, Song507069c2009-11-23 20:23:04 +08002056 .psize = 16,
2057 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
2058 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002059 }, {
2060 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2061 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2062 .ksize = 16,
2063 .plaintext = "what do ya want for nothing?",
2064 .psize = 28,
2065 .digest = "\x3e\x1f\x5c\x4d\x65\xf0\xef\xce"
2066 "\x0d\x61\x06\x27\x66\x51\xd5\xe2",
2067 .np = 2,
2068 .tap = {14, 14}
2069 }, {
2070 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2071 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2072 .ksize = 16,
2073 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2074 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2075 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2076 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2077 .psize = 50,
2078 .digest = "\xfb\x49\x8a\x36\xe1\x96\xe1\x96"
2079 "\xe1\x96\xe1\x96\xe1\x96\xe1\x96",
2080 }, {
2081 .key = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
2082 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
2083 .ksize = 16,
2084 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2085 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2086 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2087 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2088 .psize = 50,
2089 .digest = "\x2b\x5c\x0c\x7f\x52\xd1\x60\xc2"
2090 "\x49\xed\x6e\x32\x7a\xa9\xbe\x08",
2091 }, {
2092 .key = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
2093 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
2094 .ksize = 16,
2095 .plaintext = "Test With Truncation",
2096 .psize = 20,
2097 .digest = "\xf8\x94\x87\x2a\x4b\x63\x99\x28"
2098 "\x23\xf7\x93\xf7\x19\xf5\x96\xd9",
Harald Freudenberger445a8e02015-05-21 17:34:31 +02002099 }, {
2100 .key = "\x0a\x1b\x2c\x3d\x4e\x5f\x64\x71"
2101 "\x82\x93\xa4\xb5\xc6\xd7\xe8\xf9",
2102 .ksize = 16,
2103 .plaintext = "\x56\x6f\x72\x20\x6c\x61\x75\x74"
2104 "\x65\x72\x20\x4c\x61\x75\x73\x63"
2105 "\x68\x65\x6e\x20\x75\x6e\x64\x20"
2106 "\x53\x74\x61\x75\x6e\x65\x6e\x20"
2107 "\x73\x65\x69\x20\x73\x74\x69\x6c"
2108 "\x6c\x2c\x0a\x64\x75\x20\x6d\x65"
2109 "\x69\x6e\x20\x74\x69\x65\x66\x74"
2110 "\x69\x65\x66\x65\x73\x20\x4c\x65"
2111 "\x62\x65\x6e\x3b\x0a\x64\x61\x73"
2112 "\x73\x20\x64\x75\x20\x77\x65\x69"
2113 "\xc3\x9f\x74\x20\x77\x61\x73\x20"
2114 "\x64\x65\x72\x20\x57\x69\x6e\x64"
2115 "\x20\x64\x69\x72\x20\x77\x69\x6c"
2116 "\x6c\x2c\x0a\x65\x68\x20\x6e\x6f"
2117 "\x63\x68\x20\x64\x69\x65\x20\x42"
2118 "\x69\x72\x6b\x65\x6e\x20\x62\x65"
2119 "\x62\x65\x6e\x2e\x0a\x0a\x55\x6e"
2120 "\x64\x20\x77\x65\x6e\x6e\x20\x64"
2121 "\x69\x72\x20\x65\x69\x6e\x6d\x61"
2122 "\x6c\x20\x64\x61\x73\x20\x53\x63"
2123 "\x68\x77\x65\x69\x67\x65\x6e\x20"
2124 "\x73\x70\x72\x61\x63\x68\x2c\x0a"
2125 "\x6c\x61\x73\x73\x20\x64\x65\x69"
2126 "\x6e\x65\x20\x53\x69\x6e\x6e\x65"
2127 "\x20\x62\x65\x73\x69\x65\x67\x65"
2128 "\x6e\x2e\x0a\x4a\x65\x64\x65\x6d"
2129 "\x20\x48\x61\x75\x63\x68\x65\x20"
2130 "\x67\x69\x62\x74\x20\x64\x69\x63"
2131 "\x68\x2c\x20\x67\x69\x62\x20\x6e"
2132 "\x61\x63\x68\x2c\x0a\x65\x72\x20"
2133 "\x77\x69\x72\x64\x20\x64\x69\x63"
2134 "\x68\x20\x6c\x69\x65\x62\x65\x6e"
2135 "\x20\x75\x6e\x64\x20\x77\x69\x65"
2136 "\x67\x65\x6e\x2e\x0a\x0a\x55\x6e"
2137 "\x64\x20\x64\x61\x6e\x6e\x20\x6d"
2138 "\x65\x69\x6e\x65\x20\x53\x65\x65"
2139 "\x6c\x65\x20\x73\x65\x69\x74\x20"
2140 "\x77\x65\x69\x74\x2c\x20\x73\x65"
2141 "\x69\x20\x77\x65\x69\x74\x2c\x0a"
2142 "\x64\x61\x73\x73\x20\x64\x69\x72"
2143 "\x20\x64\x61\x73\x20\x4c\x65\x62"
2144 "\x65\x6e\x20\x67\x65\x6c\x69\x6e"
2145 "\x67\x65\x2c\x0a\x62\x72\x65\x69"
2146 "\x74\x65\x20\x64\x69\x63\x68\x20"
2147 "\x77\x69\x65\x20\x65\x69\x6e\x20"
2148 "\x46\x65\x69\x65\x72\x6b\x6c\x65"
2149 "\x69\x64\x0a\xc3\xbc\x62\x65\x72"
2150 "\x20\x64\x69\x65\x20\x73\x69\x6e"
2151 "\x6e\x65\x6e\x64\x65\x6e\x20\x44"
2152 "\x69\x6e\x67\x65\x2e\x2e\x2e\x0a",
2153 .psize = 400,
2154 .digest = "\xad\xb1\xc1\xe9\x56\x70\x31\x1d"
2155 "\xbb\x5b\xdf\x5e\x70\x72\x1a\x57",
Youquan, Song507069c2009-11-23 20:23:04 +08002156 },
2157};
2158
Herbert Xuda7f0332008-07-31 17:08:25 +08002159/*
2160 * HMAC-MD5 test vectors from RFC2202
2161 * (These need to be fixed to not use strlen).
2162 */
2163#define HMAC_MD5_TEST_VECTORS 7
2164
2165static struct hash_testvec hmac_md5_tv_template[] =
2166{
2167 {
2168 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2169 .ksize = 16,
2170 .plaintext = "Hi There",
2171 .psize = 8,
2172 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
2173 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
2174 }, {
2175 .key = "Jefe",
2176 .ksize = 4,
2177 .plaintext = "what do ya want for nothing?",
2178 .psize = 28,
2179 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
2180 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
2181 .np = 2,
2182 .tap = {14, 14}
2183 }, {
2184 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2185 .ksize = 16,
2186 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2187 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2188 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2189 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2190 .psize = 50,
2191 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
2192 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
2193 }, {
2194 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2195 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2196 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2197 .ksize = 25,
2198 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2199 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2200 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2201 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2202 .psize = 50,
2203 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
2204 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
2205 }, {
2206 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2207 .ksize = 16,
2208 .plaintext = "Test With Truncation",
2209 .psize = 20,
2210 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
2211 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
2212 }, {
2213 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2214 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2215 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2216 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2217 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2218 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2219 "\xaa\xaa",
2220 .ksize = 80,
2221 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2222 .psize = 54,
2223 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
2224 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
2225 }, {
2226 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2227 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2228 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2229 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2230 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2231 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2232 "\xaa\xaa",
2233 .ksize = 80,
2234 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2235 "Block-Size Data",
2236 .psize = 73,
2237 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
2238 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
2239 },
2240};
2241
2242/*
2243 * HMAC-RIPEMD128 test vectors from RFC2286
2244 */
2245#define HMAC_RMD128_TEST_VECTORS 7
2246
2247static struct hash_testvec hmac_rmd128_tv_template[] = {
2248 {
2249 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2250 .ksize = 16,
2251 .plaintext = "Hi There",
2252 .psize = 8,
2253 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
2254 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
2255 }, {
2256 .key = "Jefe",
2257 .ksize = 4,
2258 .plaintext = "what do ya want for nothing?",
2259 .psize = 28,
2260 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
2261 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
2262 .np = 2,
2263 .tap = { 14, 14 },
2264 }, {
2265 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2266 .ksize = 16,
2267 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2268 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2269 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2270 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2271 .psize = 50,
2272 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
2273 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
2274 }, {
2275 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2276 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2277 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2278 .ksize = 25,
2279 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2280 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2281 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2282 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2283 .psize = 50,
2284 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
2285 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
2286 }, {
2287 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2288 .ksize = 16,
2289 .plaintext = "Test With Truncation",
2290 .psize = 20,
2291 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
2292 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
2293 }, {
2294 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2295 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2296 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2297 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2298 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2299 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2300 "\xaa\xaa",
2301 .ksize = 80,
2302 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2303 .psize = 54,
2304 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
2305 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
2306 }, {
2307 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2308 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2309 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2310 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2311 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2312 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2313 "\xaa\xaa",
2314 .ksize = 80,
2315 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2316 "Block-Size Data",
2317 .psize = 73,
2318 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
2319 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
2320 },
2321};
2322
2323/*
2324 * HMAC-RIPEMD160 test vectors from RFC2286
2325 */
2326#define HMAC_RMD160_TEST_VECTORS 7
2327
2328static struct hash_testvec hmac_rmd160_tv_template[] = {
2329 {
2330 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2331 .ksize = 20,
2332 .plaintext = "Hi There",
2333 .psize = 8,
2334 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
2335 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
2336 }, {
2337 .key = "Jefe",
2338 .ksize = 4,
2339 .plaintext = "what do ya want for nothing?",
2340 .psize = 28,
2341 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
2342 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
2343 .np = 2,
2344 .tap = { 14, 14 },
2345 }, {
2346 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2347 .ksize = 20,
2348 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2349 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2350 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2351 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2352 .psize = 50,
2353 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
2354 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
2355 }, {
2356 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2357 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2358 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2359 .ksize = 25,
2360 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2361 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2362 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2363 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2364 .psize = 50,
2365 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
2366 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
2367 }, {
2368 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2369 .ksize = 20,
2370 .plaintext = "Test With Truncation",
2371 .psize = 20,
2372 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
2373 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
2374 }, {
2375 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2376 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2377 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2378 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2379 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2380 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2381 "\xaa\xaa",
2382 .ksize = 80,
2383 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2384 .psize = 54,
2385 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
2386 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
2387 }, {
2388 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2389 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2390 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2391 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2392 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2393 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2394 "\xaa\xaa",
2395 .ksize = 80,
2396 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2397 "Block-Size Data",
2398 .psize = 73,
2399 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
2400 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
2401 },
2402};
2403
2404/*
2405 * HMAC-SHA1 test vectors from RFC2202
2406 */
2407#define HMAC_SHA1_TEST_VECTORS 7
2408
2409static struct hash_testvec hmac_sha1_tv_template[] = {
2410 {
2411 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2412 .ksize = 20,
2413 .plaintext = "Hi There",
2414 .psize = 8,
2415 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
2416 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
2417 "\x46\xbe",
2418 }, {
2419 .key = "Jefe",
2420 .ksize = 4,
2421 .plaintext = "what do ya want for nothing?",
2422 .psize = 28,
2423 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
2424 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
2425 .np = 2,
2426 .tap = { 14, 14 }
2427 }, {
2428 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2429 .ksize = 20,
2430 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2431 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2432 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2433 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2434 .psize = 50,
2435 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
2436 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
2437 }, {
2438 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2439 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2440 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2441 .ksize = 25,
2442 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2443 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2444 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2445 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2446 .psize = 50,
2447 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
2448 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
2449 }, {
2450 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2451 .ksize = 20,
2452 .plaintext = "Test With Truncation",
2453 .psize = 20,
2454 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
2455 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
2456 }, {
2457 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2458 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2459 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2460 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2461 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2462 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2463 "\xaa\xaa",
2464 .ksize = 80,
2465 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2466 .psize = 54,
2467 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
2468 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
2469 }, {
2470 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2471 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2472 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2473 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2474 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2475 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2476 "\xaa\xaa",
2477 .ksize = 80,
2478 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2479 "Block-Size Data",
2480 .psize = 73,
2481 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
2482 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
2483 },
2484};
2485
2486
2487/*
2488 * SHA224 HMAC test vectors from RFC4231
2489 */
2490#define HMAC_SHA224_TEST_VECTORS 4
2491
2492static struct hash_testvec hmac_sha224_tv_template[] = {
2493 {
2494 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2495 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2496 "\x0b\x0b\x0b\x0b",
2497 .ksize = 20,
2498 /* ("Hi There") */
2499 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
2500 .psize = 8,
2501 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
2502 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
2503 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
2504 "\x53\x68\x4b\x22",
2505 }, {
2506 .key = "Jefe",
2507 .ksize = 4,
2508 /* ("what do ya want for nothing?") */
2509 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
2510 "\x79\x61\x20\x77\x61\x6e\x74\x20"
2511 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
2512 "\x69\x6e\x67\x3f",
2513 .psize = 28,
2514 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
2515 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
2516 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
2517 "\x8f\xd0\x5e\x44",
2518 .np = 4,
2519 .tap = { 7, 7, 7, 7 }
2520 }, {
2521 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2522 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2523 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2524 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2525 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2526 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2527 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2528 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2529 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2530 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2531 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2532 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2533 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2534 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2535 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2536 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2537 "\xaa\xaa\xaa",
2538 .ksize = 131,
2539 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
2540 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
2541 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
2542 "\x72\x20\x54\x68\x61\x6e\x20\x42"
2543 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
2544 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
2545 "\x48\x61\x73\x68\x20\x4b\x65\x79"
2546 "\x20\x46\x69\x72\x73\x74",
2547 .psize = 54,
2548 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
2549 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
2550 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
2551 "\x3f\xa6\x87\x0e",
2552 }, {
2553 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2554 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2555 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2556 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2557 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2558 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2559 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2560 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2561 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2562 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2563 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2564 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2565 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2566 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2567 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2568 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2569 "\xaa\xaa\xaa",
2570 .ksize = 131,
2571 /* ("This is a test using a larger than block-size key and a")
2572 (" larger than block-size data. The key needs to be")
2573 (" hashed before being used by the HMAC algorithm.") */
2574 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
2575 "\x61\x20\x74\x65\x73\x74\x20\x75"
2576 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
2577 "\x61\x72\x67\x65\x72\x20\x74\x68"
2578 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
2579 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
2580 "\x79\x20\x61\x6e\x64\x20\x61\x20"
2581 "\x6c\x61\x72\x67\x65\x72\x20\x74"
2582 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
2583 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
2584 "\x61\x74\x61\x2e\x20\x54\x68\x65"
2585 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
2586 "\x64\x73\x20\x74\x6f\x20\x62\x65"
2587 "\x20\x68\x61\x73\x68\x65\x64\x20"
2588 "\x62\x65\x66\x6f\x72\x65\x20\x62"
2589 "\x65\x69\x6e\x67\x20\x75\x73\x65"
2590 "\x64\x20\x62\x79\x20\x74\x68\x65"
2591 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
2592 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
2593 .psize = 152,
2594 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
2595 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
2596 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
2597 "\xf6\xf5\x65\xd1",
2598 },
2599};
2600
2601/*
2602 * HMAC-SHA256 test vectors from
2603 * draft-ietf-ipsec-ciph-sha-256-01.txt
2604 */
2605#define HMAC_SHA256_TEST_VECTORS 10
2606
2607static struct hash_testvec hmac_sha256_tv_template[] = {
2608 {
2609 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2610 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2611 "\x11\x12\x13\x14\x15\x16\x17\x18"
2612 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2613 .ksize = 32,
2614 .plaintext = "abc",
2615 .psize = 3,
2616 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
2617 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
2618 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
2619 "\x92\x75\x90\x21\xcf\xab\x81\x81",
2620 }, {
2621 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2622 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2623 "\x11\x12\x13\x14\x15\x16\x17\x18"
2624 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2625 .ksize = 32,
2626 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2627 .psize = 56,
2628 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
2629 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
2630 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
2631 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
2632 }, {
2633 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2634 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2635 "\x11\x12\x13\x14\x15\x16\x17\x18"
2636 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2637 .ksize = 32,
2638 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
2639 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2640 .psize = 112,
2641 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
2642 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
2643 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
2644 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
2645 }, {
2646 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2647 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2648 "\x0b\x0b\x0b\x0b\x0b\x0b",
2649 .ksize = 32,
2650 .plaintext = "Hi There",
2651 .psize = 8,
2652 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
2653 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
2654 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
2655 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
2656 }, {
2657 .key = "Jefe",
2658 .ksize = 4,
2659 .plaintext = "what do ya want for nothing?",
2660 .psize = 28,
2661 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
2662 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
2663 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
2664 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
2665 .np = 2,
2666 .tap = { 14, 14 }
2667 }, {
2668 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2669 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2670 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2671 .ksize = 32,
2672 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2673 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2674 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2675 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2676 .psize = 50,
2677 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
2678 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
2679 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
2680 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
2681 }, {
2682 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2683 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2684 "\x11\x12\x13\x14\x15\x16\x17\x18"
2685 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
2686 "\x21\x22\x23\x24\x25",
2687 .ksize = 37,
2688 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2689 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2690 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2691 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2692 .psize = 50,
2693 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
2694 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
2695 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
2696 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
2697 }, {
2698 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2699 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2700 "\x0c\x0c\x0c\x0c\x0c\x0c",
2701 .ksize = 32,
2702 .plaintext = "Test With Truncation",
2703 .psize = 20,
2704 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
2705 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
2706 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
2707 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
2708 }, {
2709 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2710 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2711 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2712 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2713 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2714 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2715 "\xaa\xaa",
2716 .ksize = 80,
2717 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2718 .psize = 54,
2719 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
2720 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
2721 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
2722 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
2723 }, {
2724 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2725 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2726 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2727 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2728 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2729 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2730 "\xaa\xaa",
2731 .ksize = 80,
2732 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
2733 "One Block-Size Data",
2734 .psize = 73,
2735 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
2736 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
2737 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
2738 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
2739 },
2740};
2741
Jussi Kivilinna93b5e862013-04-08 10:48:44 +03002742#define CMAC_AES_TEST_VECTORS 6
2743
2744static struct hash_testvec aes_cmac128_tv_template[] = {
2745 { /* From NIST Special Publication 800-38B, AES-128 */
2746 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2747 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2748 .plaintext = zeroed_string,
2749 .digest = "\xbb\x1d\x69\x29\xe9\x59\x37\x28"
2750 "\x7f\xa3\x7d\x12\x9b\x75\x67\x46",
2751 .psize = 0,
2752 .ksize = 16,
2753 }, {
2754 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2755 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2756 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2757 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a",
2758 .digest = "\x07\x0a\x16\xb4\x6b\x4d\x41\x44"
2759 "\xf7\x9b\xdd\x9d\xd0\x4a\x28\x7c",
2760 .psize = 16,
2761 .ksize = 16,
2762 }, {
2763 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2764 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2765 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2766 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2767 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2768 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2769 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11",
2770 .digest = "\xdf\xa6\x67\x47\xde\x9a\xe6\x30"
2771 "\x30\xca\x32\x61\x14\x97\xc8\x27",
2772 .psize = 40,
2773 .ksize = 16,
2774 }, {
2775 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2776 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2777 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2778 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2779 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2780 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2781 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2782 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2783 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2784 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2785 .digest = "\x51\xf0\xbe\xbf\x7e\x3b\x9d\x92"
2786 "\xfc\x49\x74\x17\x79\x36\x3c\xfe",
2787 .psize = 64,
2788 .ksize = 16,
2789 }, { /* From NIST Special Publication 800-38B, AES-256 */
2790 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2791 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2792 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2793 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2794 .plaintext = zeroed_string,
2795 .digest = "\x02\x89\x62\xf6\x1b\x7b\xf8\x9e"
2796 "\xfc\x6b\x55\x1f\x46\x67\xd9\x83",
2797 .psize = 0,
2798 .ksize = 32,
2799 }, {
2800 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2801 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2802 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2803 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2804 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2805 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2806 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2807 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2808 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2809 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2810 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2811 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2812 .digest = "\xe1\x99\x21\x90\x54\x9f\x6e\xd5"
2813 "\x69\x6a\x2c\x05\x6c\x31\x54\x10",
2814 .psize = 64,
2815 .ksize = 32,
2816 }
2817};
2818
2819#define CMAC_DES3_EDE_TEST_VECTORS 4
2820
2821static struct hash_testvec des3_ede_cmac64_tv_template[] = {
2822/*
2823 * From NIST Special Publication 800-38B, Three Key TDEA
2824 * Corrected test vectors from:
2825 * http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf
2826 */
2827 {
2828 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2829 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2830 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2831 .plaintext = zeroed_string,
2832 .digest = "\xb7\xa6\x88\xe1\x22\xff\xaf\x95",
2833 .psize = 0,
2834 .ksize = 24,
2835 }, {
2836 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2837 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2838 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2839 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96",
2840 .digest = "\x8e\x8f\x29\x31\x36\x28\x37\x97",
2841 .psize = 8,
2842 .ksize = 24,
2843 }, {
2844 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2845 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2846 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2847 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2848 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2849 "\xae\x2d\x8a\x57",
2850 .digest = "\x74\x3d\xdb\xe0\xce\x2d\xc2\xed",
2851 .psize = 20,
2852 .ksize = 24,
2853 }, {
2854 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2855 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2856 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2857 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2858 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2859 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2860 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51",
2861 .digest = "\x33\xe6\xb1\x09\x24\x00\xea\xe5",
2862 .psize = 32,
2863 .ksize = 24,
2864 }
2865};
2866
Herbert Xuda7f0332008-07-31 17:08:25 +08002867#define XCBC_AES_TEST_VECTORS 6
2868
2869static struct hash_testvec aes_xcbc128_tv_template[] = {
2870 {
2871 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2872 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2873 .plaintext = zeroed_string,
2874 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
2875 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
2876 .psize = 0,
2877 .ksize = 16,
2878 }, {
2879 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2880 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2881 .plaintext = "\x00\x01\x02",
2882 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
2883 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
2884 .psize = 3,
2885 .ksize = 16,
2886 } , {
2887 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2888 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2889 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2890 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2891 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
2892 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
2893 .psize = 16,
2894 .ksize = 16,
2895 }, {
2896 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2897 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2898 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2899 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2900 "\x10\x11\x12\x13",
2901 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
2902 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
2903 .tap = { 10, 10 },
2904 .psize = 20,
2905 .np = 2,
2906 .ksize = 16,
2907 }, {
2908 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2909 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2910 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2911 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2912 "\x10\x11\x12\x13\x14\x15\x16\x17"
2913 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
2914 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
2915 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
2916 .psize = 32,
2917 .ksize = 16,
2918 }, {
2919 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2920 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2921 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2922 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2923 "\x10\x11\x12\x13\x14\x15\x16\x17"
2924 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
2925 "\x20\x21",
2926 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
2927 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
2928 .tap = { 17, 17 },
2929 .psize = 34,
2930 .np = 2,
2931 .ksize = 16,
2932 }
2933};
2934
Salman Qaziba1ee072012-10-05 14:24:14 -07002935#define VMAC_AES_TEST_VECTORS 11
Shane Wang304a2042010-03-18 20:22:55 +08002936static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
Shane Wangf1939f72009-09-02 20:05:22 +10002937 '\x02', '\x03', '\x02', '\x02',
2938 '\x02', '\x04', '\x01', '\x07',
2939 '\x04', '\x01', '\x04', '\x03',};
Shane Wang304a2042010-03-18 20:22:55 +08002940static char vmac_string2[128] = {'a', 'b', 'c',};
2941static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
2942 'a', 'b', 'c', 'a', 'b', 'c',
2943 'a', 'b', 'c', 'a', 'b', 'c',
2944 'a', 'b', 'c', 'a', 'b', 'c',
2945 'a', 'b', 'c', 'a', 'b', 'c',
2946 'a', 'b', 'c', 'a', 'b', 'c',
2947 'a', 'b', 'c', 'a', 'b', 'c',
2948 'a', 'b', 'c', 'a', 'b', 'c',
2949 };
2950
Salman Qaziba1ee072012-10-05 14:24:14 -07002951static char vmac_string4[17] = {'b', 'c', 'e', 'f',
2952 'i', 'j', 'l', 'm',
2953 'o', 'p', 'r', 's',
2954 't', 'u', 'w', 'x', 'z'};
2955
2956static char vmac_string5[127] = {'r', 'm', 'b', 't', 'c',
2957 'o', 'l', 'k', ']', '%',
2958 '9', '2', '7', '!', 'A'};
2959
2960static char vmac_string6[129] = {'p', 't', '*', '7', 'l',
2961 'i', '!', '#', 'w', '0',
2962 'z', '/', '4', 'A', 'n'};
2963
Shane Wangf1939f72009-09-02 20:05:22 +10002964static struct hash_testvec aes_vmac128_tv_template[] = {
2965 {
Shane Wang304a2042010-03-18 20:22:55 +08002966 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2967 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2968 .plaintext = NULL,
2969 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
2970 .psize = 0,
2971 .ksize = 16,
2972 }, {
Shane Wangf1939f72009-09-02 20:05:22 +10002973 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2974 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Shane Wang304a2042010-03-18 20:22:55 +08002975 .plaintext = vmac_string1,
2976 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
2977 .psize = 128,
2978 .ksize = 16,
2979 }, {
2980 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2981 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2982 .plaintext = vmac_string2,
2983 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
2984 .psize = 128,
2985 .ksize = 16,
2986 }, {
2987 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2988 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2989 .plaintext = vmac_string3,
2990 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
2991 .psize = 128,
2992 .ksize = 16,
2993 }, {
2994 .key = "abcdefghijklmnop",
2995 .plaintext = NULL,
2996 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
2997 .psize = 0,
2998 .ksize = 16,
2999 }, {
3000 .key = "abcdefghijklmnop",
3001 .plaintext = vmac_string1,
3002 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
3003 .psize = 128,
3004 .ksize = 16,
3005 }, {
3006 .key = "abcdefghijklmnop",
3007 .plaintext = vmac_string2,
3008 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
3009 .psize = 128,
3010 .ksize = 16,
3011 }, {
3012 .key = "abcdefghijklmnop",
3013 .plaintext = vmac_string3,
3014 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
Shane Wangf1939f72009-09-02 20:05:22 +10003015 .psize = 128,
3016 .ksize = 16,
Salman Qaziba1ee072012-10-05 14:24:14 -07003017 }, {
3018 .key = "a09b5cd!f#07K\x00\x00\x00",
3019 .plaintext = vmac_string4,
3020 .digest = "\xab\xa5\x0f\xea\x42\x4e\xa1\x5f",
3021 .psize = sizeof(vmac_string4),
3022 .ksize = 16,
3023 }, {
3024 .key = "a09b5cd!f#07K\x00\x00\x00",
3025 .plaintext = vmac_string5,
3026 .digest = "\x25\x31\x98\xbc\x1d\xe8\x67\x60",
3027 .psize = sizeof(vmac_string5),
3028 .ksize = 16,
3029 }, {
3030 .key = "a09b5cd!f#07K\x00\x00\x00",
3031 .plaintext = vmac_string6,
3032 .digest = "\xc4\xae\x9b\x47\x95\x65\xeb\x41",
3033 .psize = sizeof(vmac_string6),
3034 .ksize = 16,
Shane Wangf1939f72009-09-02 20:05:22 +10003035 },
3036};
3037
Herbert Xuda7f0332008-07-31 17:08:25 +08003038/*
3039 * SHA384 HMAC test vectors from RFC4231
3040 */
3041
3042#define HMAC_SHA384_TEST_VECTORS 4
3043
3044static struct hash_testvec hmac_sha384_tv_template[] = {
3045 {
3046 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3047 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3048 "\x0b\x0b\x0b\x0b",
3049 .ksize = 20,
3050 .plaintext = "Hi There",
3051 .psize = 8,
3052 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
3053 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
3054 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
3055 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
3056 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
3057 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
3058 }, {
3059 .key = "Jefe",
3060 .ksize = 4,
3061 .plaintext = "what do ya want for nothing?",
3062 .psize = 28,
3063 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
3064 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
3065 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
3066 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
3067 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
3068 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
3069 .np = 4,
3070 .tap = { 7, 7, 7, 7 }
3071 }, {
3072 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3073 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3074 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3075 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3076 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3077 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3078 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3079 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3080 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3081 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3082 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3083 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3084 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3085 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3086 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3087 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3088 "\xaa\xaa\xaa",
3089 .ksize = 131,
3090 .plaintext = "Test Using Larger Than Block-Siz"
3091 "e Key - Hash Key First",
3092 .psize = 54,
3093 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
3094 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
3095 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
3096 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
3097 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
3098 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
3099 }, {
3100 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3101 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3102 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3103 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3104 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3105 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3106 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3107 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3108 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3109 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3110 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3111 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3112 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3113 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3114 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3115 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3116 "\xaa\xaa\xaa",
3117 .ksize = 131,
3118 .plaintext = "This is a test u"
3119 "sing a larger th"
3120 "an block-size ke"
3121 "y and a larger t"
3122 "han block-size d"
3123 "ata. The key nee"
3124 "ds to be hashed "
3125 "before being use"
3126 "d by the HMAC al"
3127 "gorithm.",
3128 .psize = 152,
3129 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
3130 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
3131 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
3132 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
3133 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
3134 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
3135 },
3136};
3137
3138/*
3139 * SHA512 HMAC test vectors from RFC4231
3140 */
3141
3142#define HMAC_SHA512_TEST_VECTORS 4
3143
3144static struct hash_testvec hmac_sha512_tv_template[] = {
3145 {
3146 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3147 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3148 "\x0b\x0b\x0b\x0b",
3149 .ksize = 20,
3150 .plaintext = "Hi There",
3151 .psize = 8,
3152 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
3153 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
3154 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
3155 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
3156 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
3157 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
3158 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
3159 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
3160 }, {
3161 .key = "Jefe",
3162 .ksize = 4,
3163 .plaintext = "what do ya want for nothing?",
3164 .psize = 28,
3165 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
3166 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
3167 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
3168 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
3169 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
3170 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
3171 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
3172 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
3173 .np = 4,
3174 .tap = { 7, 7, 7, 7 }
3175 }, {
3176 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3177 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3178 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3179 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3180 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3181 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3182 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3183 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3184 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3185 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3186 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3187 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3188 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3189 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3190 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3191 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3192 "\xaa\xaa\xaa",
3193 .ksize = 131,
3194 .plaintext = "Test Using Large"
3195 "r Than Block-Siz"
3196 "e Key - Hash Key"
3197 " First",
3198 .psize = 54,
3199 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
3200 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
3201 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
3202 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
3203 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
3204 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
3205 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
3206 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
3207 }, {
3208 .key = "\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\xaa\xaa\xaa\xaa\xaa"
3214 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3215 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3216 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3217 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3218 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3219 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3220 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3221 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3222 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3223 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3224 "\xaa\xaa\xaa",
3225 .ksize = 131,
3226 .plaintext =
3227 "This is a test u"
3228 "sing a larger th"
3229 "an block-size ke"
3230 "y and a larger t"
3231 "han block-size d"
3232 "ata. The key nee"
3233 "ds to be hashed "
3234 "before being use"
3235 "d by the HMAC al"
3236 "gorithm.",
3237 .psize = 152,
3238 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
3239 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
3240 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
3241 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
3242 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
3243 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
3244 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
3245 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
3246 },
3247};
3248
3249/*
Martin Willieee9dc62015-06-01 13:43:59 +02003250 * Poly1305 test vectors from RFC7539 A.3.
3251 */
3252
3253#define POLY1305_TEST_VECTORS 11
3254
3255static struct hash_testvec poly1305_tv_template[] = {
3256 { /* Test Vector #1 */
Martin Willieee9dc62015-06-01 13:43:59 +02003257 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
3258 "\x00\x00\x00\x00\x00\x00\x00\x00"
3259 "\x00\x00\x00\x00\x00\x00\x00\x00"
3260 "\x00\x00\x00\x00\x00\x00\x00\x00"
3261 "\x00\x00\x00\x00\x00\x00\x00\x00"
3262 "\x00\x00\x00\x00\x00\x00\x00\x00"
3263 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003264 "\x00\x00\x00\x00\x00\x00\x00\x00"
3265 "\x00\x00\x00\x00\x00\x00\x00\x00"
3266 "\x00\x00\x00\x00\x00\x00\x00\x00"
3267 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003268 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003269 .psize = 96,
Martin Willieee9dc62015-06-01 13:43:59 +02003270 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3271 "\x00\x00\x00\x00\x00\x00\x00\x00",
3272 }, { /* Test Vector #2 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003273 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003274 "\x00\x00\x00\x00\x00\x00\x00\x00"
3275 "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003276 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3277 "\x41\x6e\x79\x20\x73\x75\x62\x6d"
Martin Willieee9dc62015-06-01 13:43:59 +02003278 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3279 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3280 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3281 "\x64\x65\x64\x20\x62\x79\x20\x74"
3282 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3283 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3284 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3285 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3286 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3287 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3288 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3289 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3290 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3291 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3292 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3293 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3294 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3295 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3296 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3297 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3298 "\x45\x54\x46\x20\x61\x63\x74\x69"
3299 "\x76\x69\x74\x79\x20\x69\x73\x20"
3300 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3301 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3302 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3303 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3304 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3305 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3306 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3307 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3308 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3309 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3310 "\x54\x46\x20\x73\x65\x73\x73\x69"
3311 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3312 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3313 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3314 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3315 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3316 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3317 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3318 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3319 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3320 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3321 "\x20\x77\x68\x69\x63\x68\x20\x61"
3322 "\x72\x65\x20\x61\x64\x64\x72\x65"
3323 "\x73\x73\x65\x64\x20\x74\x6f",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003324 .psize = 407,
Martin Willieee9dc62015-06-01 13:43:59 +02003325 .digest = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3326 "\xf0\xef\xca\x96\x22\x7a\x86\x3e",
3327 }, { /* Test Vector #3 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003328 .plaintext = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
Martin Willieee9dc62015-06-01 13:43:59 +02003329 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3330 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003331 "\x00\x00\x00\x00\x00\x00\x00\x00"
3332 "\x41\x6e\x79\x20\x73\x75\x62\x6d"
Martin Willieee9dc62015-06-01 13:43:59 +02003333 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3334 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3335 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3336 "\x64\x65\x64\x20\x62\x79\x20\x74"
3337 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3338 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3339 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3340 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3341 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3342 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3343 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3344 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3345 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3346 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3347 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3348 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3349 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3350 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3351 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3352 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3353 "\x45\x54\x46\x20\x61\x63\x74\x69"
3354 "\x76\x69\x74\x79\x20\x69\x73\x20"
3355 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3356 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3357 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3358 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3359 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3360 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3361 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3362 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3363 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3364 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3365 "\x54\x46\x20\x73\x65\x73\x73\x69"
3366 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3367 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3368 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3369 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3370 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3371 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3372 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3373 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3374 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3375 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3376 "\x20\x77\x68\x69\x63\x68\x20\x61"
3377 "\x72\x65\x20\x61\x64\x64\x72\x65"
3378 "\x73\x73\x65\x64\x20\x74\x6f",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003379 .psize = 407,
Martin Willieee9dc62015-06-01 13:43:59 +02003380 .digest = "\xf3\x47\x7e\x7c\xd9\x54\x17\xaf"
3381 "\x89\xa6\xb8\x79\x4c\x31\x0c\xf0",
3382 }, { /* Test Vector #4 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003383 .plaintext = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
Martin Willieee9dc62015-06-01 13:43:59 +02003384 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
3385 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003386 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
3387 "\x27\x54\x77\x61\x73\x20\x62\x72"
Martin Willieee9dc62015-06-01 13:43:59 +02003388 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
3389 "\x6e\x64\x20\x74\x68\x65\x20\x73"
3390 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
3391 "\x76\x65\x73\x0a\x44\x69\x64\x20"
3392 "\x67\x79\x72\x65\x20\x61\x6e\x64"
3393 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
3394 "\x69\x6e\x20\x74\x68\x65\x20\x77"
3395 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
3396 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
3397 "\x65\x72\x65\x20\x74\x68\x65\x20"
3398 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
3399 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
3400 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
3401 "\x72\x61\x74\x68\x73\x20\x6f\x75"
3402 "\x74\x67\x72\x61\x62\x65\x2e",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003403 .psize = 159,
Martin Willieee9dc62015-06-01 13:43:59 +02003404 .digest = "\x45\x41\x66\x9a\x7e\xaa\xee\x61"
3405 "\xe7\x08\xdc\x7c\xbc\xc5\xeb\x62",
3406 }, { /* Test Vector #5 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003407 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003408 "\x00\x00\x00\x00\x00\x00\x00\x00"
3409 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003410 "\x00\x00\x00\x00\x00\x00\x00\x00"
3411 "\xff\xff\xff\xff\xff\xff\xff\xff"
3412 "\xff\xff\xff\xff\xff\xff\xff\xff",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003413 .psize = 48,
3414 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003415 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003416 }, { /* Test Vector #6 */
3417 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
3418 "\x00\x00\x00\x00\x00\x00\x00\x00"
3419 "\xff\xff\xff\xff\xff\xff\xff\xff"
3420 "\xff\xff\xff\xff\xff\xff\xff\xff"
3421 "\x02\x00\x00\x00\x00\x00\x00\x00"
3422 "\x00\x00\x00\x00\x00\x00\x00\x00",
3423 .psize = 48,
Martin Willieee9dc62015-06-01 13:43:59 +02003424 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
3425 "\x00\x00\x00\x00\x00\x00\x00\x00",
3426 }, { /* Test Vector #7 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003427 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003428 "\x00\x00\x00\x00\x00\x00\x00\x00"
3429 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003430 "\x00\x00\x00\x00\x00\x00\x00\x00"
3431 "\xff\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003432 "\xff\xff\xff\xff\xff\xff\xff\xff"
3433 "\xf0\xff\xff\xff\xff\xff\xff\xff"
3434 "\xff\xff\xff\xff\xff\xff\xff\xff"
3435 "\x11\x00\x00\x00\x00\x00\x00\x00"
3436 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003437 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003438 .digest = "\x05\x00\x00\x00\x00\x00\x00\x00"
3439 "\x00\x00\x00\x00\x00\x00\x00\x00",
3440 }, { /* Test Vector #8 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003441 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003442 "\x00\x00\x00\x00\x00\x00\x00\x00"
3443 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003444 "\x00\x00\x00\x00\x00\x00\x00\x00"
3445 "\xff\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003446 "\xff\xff\xff\xff\xff\xff\xff\xff"
3447 "\xfb\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3448 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3449 "\x01\x01\x01\x01\x01\x01\x01\x01"
3450 "\x01\x01\x01\x01\x01\x01\x01\x01",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003451 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003452 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3453 "\x00\x00\x00\x00\x00\x00\x00\x00",
3454 }, { /* Test Vector #9 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003455 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003456 "\x00\x00\x00\x00\x00\x00\x00\x00"
3457 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003458 "\x00\x00\x00\x00\x00\x00\x00\x00"
3459 "\xfd\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003460 "\xff\xff\xff\xff\xff\xff\xff\xff",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003461 .psize = 48,
Martin Willieee9dc62015-06-01 13:43:59 +02003462 .digest = "\xfa\xff\xff\xff\xff\xff\xff\xff"
3463 "\xff\xff\xff\xff\xff\xff\xff\xff",
3464 }, { /* Test Vector #10 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003465 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003466 "\x04\x00\x00\x00\x00\x00\x00\x00"
3467 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003468 "\x00\x00\x00\x00\x00\x00\x00\x00"
3469 "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
Martin Willieee9dc62015-06-01 13:43:59 +02003470 "\x00\x00\x00\x00\x00\x00\x00\x00"
3471 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3472 "\x01\x00\x00\x00\x00\x00\x00\x00"
3473 "\x00\x00\x00\x00\x00\x00\x00\x00"
3474 "\x00\x00\x00\x00\x00\x00\x00\x00"
3475 "\x01\x00\x00\x00\x00\x00\x00\x00"
3476 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003477 .psize = 96,
Martin Willieee9dc62015-06-01 13:43:59 +02003478 .digest = "\x14\x00\x00\x00\x00\x00\x00\x00"
3479 "\x55\x00\x00\x00\x00\x00\x00\x00",
3480 }, { /* Test Vector #11 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003481 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003482 "\x04\x00\x00\x00\x00\x00\x00\x00"
3483 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003484 "\x00\x00\x00\x00\x00\x00\x00\x00"
3485 "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
Martin Willieee9dc62015-06-01 13:43:59 +02003486 "\x00\x00\x00\x00\x00\x00\x00\x00"
3487 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3488 "\x01\x00\x00\x00\x00\x00\x00\x00"
3489 "\x00\x00\x00\x00\x00\x00\x00\x00"
3490 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003491 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003492 .digest = "\x13\x00\x00\x00\x00\x00\x00\x00"
3493 "\x00\x00\x00\x00\x00\x00\x00\x00",
3494 },
3495};
3496
3497/*
Herbert Xuda7f0332008-07-31 17:08:25 +08003498 * DES test vectors.
3499 */
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003500#define DES_ENC_TEST_VECTORS 11
3501#define DES_DEC_TEST_VECTORS 5
3502#define DES_CBC_ENC_TEST_VECTORS 6
3503#define DES_CBC_DEC_TEST_VECTORS 5
3504#define DES_CTR_ENC_TEST_VECTORS 2
3505#define DES_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003506#define DES3_EDE_ENC_TEST_VECTORS 4
3507#define DES3_EDE_DEC_TEST_VECTORS 4
3508#define DES3_EDE_CBC_ENC_TEST_VECTORS 2
3509#define DES3_EDE_CBC_DEC_TEST_VECTORS 2
3510#define DES3_EDE_CTR_ENC_TEST_VECTORS 2
3511#define DES3_EDE_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08003512
3513static struct cipher_testvec des_enc_tv_template[] = {
3514 { /* From Applied Cryptography */
3515 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3516 .klen = 8,
3517 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3518 .ilen = 8,
3519 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3520 .rlen = 8,
3521 }, { /* Same key, different plaintext block */
3522 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3523 .klen = 8,
3524 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
3525 .ilen = 8,
3526 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3527 .rlen = 8,
3528 }, { /* Sbox test from NBS */
3529 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3530 .klen = 8,
3531 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3532 .ilen = 8,
3533 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3534 .rlen = 8,
3535 }, { /* Three blocks */
3536 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3537 .klen = 8,
3538 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3539 "\x22\x33\x44\x55\x66\x77\x88\x99"
3540 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3541 .ilen = 24,
3542 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3543 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3544 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3545 .rlen = 24,
3546 }, { /* Weak key */
David Howells09e21782015-04-28 15:36:36 +01003547 .fail = true,
Herbert Xuda7f0332008-07-31 17:08:25 +08003548 .wk = 1,
3549 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
3550 .klen = 8,
3551 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3552 .ilen = 8,
3553 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3554 .rlen = 8,
3555 }, { /* Two blocks -- for testing encryption across pages */
3556 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3557 .klen = 8,
3558 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3559 "\x22\x33\x44\x55\x66\x77\x88\x99",
3560 .ilen = 16,
3561 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3562 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3563 .rlen = 16,
3564 .np = 2,
3565 .tap = { 8, 8 }
3566 }, { /* Four blocks -- for testing encryption with chunking */
3567 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3568 .klen = 8,
3569 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3570 "\x22\x33\x44\x55\x66\x77\x88\x99"
3571 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
3572 "\x22\x33\x44\x55\x66\x77\x88\x99",
3573 .ilen = 32,
3574 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3575 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3576 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
3577 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3578 .rlen = 32,
3579 .np = 3,
3580 .tap = { 14, 10, 8 }
3581 }, {
3582 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3583 .klen = 8,
3584 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3585 "\x22\x33\x44\x55\x66\x77\x88\x99"
3586 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3587 .ilen = 24,
3588 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3589 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3590 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3591 .rlen = 24,
3592 .np = 4,
3593 .tap = { 2, 1, 3, 18 }
3594 }, {
3595 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3596 .klen = 8,
3597 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3598 "\x22\x33\x44\x55\x66\x77\x88\x99",
3599 .ilen = 16,
3600 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3601 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3602 .rlen = 16,
3603 .np = 5,
3604 .tap = { 2, 2, 2, 2, 8 }
3605 }, {
3606 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3607 .klen = 8,
3608 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3609 .ilen = 8,
3610 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3611 .rlen = 8,
3612 .np = 8,
3613 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003614 }, { /* Generated with Crypto++ */
3615 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3616 .klen = 8,
3617 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3618 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3619 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3620 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3621 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3622 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3623 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3624 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3625 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3626 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3627 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3628 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3629 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3630 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3631 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3632 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3633 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3634 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3635 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3636 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3637 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3638 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3639 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3640 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3641 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3642 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3643 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3644 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3645 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3646 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3647 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3648 .ilen = 248,
3649 .result = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3650 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3651 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3652 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3653 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3654 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3655 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3656 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3657 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3658 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3659 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3660 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3661 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3662 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3663 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3664 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3665 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3666 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3667 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3668 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3669 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3670 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3671 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3672 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3673 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3674 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3675 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3676 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3677 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3678 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3679 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3680 .rlen = 248,
3681 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003682 .np = 3,
3683 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003684 },
3685};
3686
3687static struct cipher_testvec des_dec_tv_template[] = {
3688 { /* From Applied Cryptography */
3689 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3690 .klen = 8,
3691 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3692 .ilen = 8,
3693 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3694 .rlen = 8,
3695 }, { /* Sbox test from NBS */
3696 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3697 .klen = 8,
3698 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3699 .ilen = 8,
3700 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3701 .rlen = 8,
3702 }, { /* Two blocks, for chunking test */
3703 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3704 .klen = 8,
3705 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3706 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3707 .ilen = 16,
3708 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3709 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3710 .rlen = 16,
3711 .np = 2,
3712 .tap = { 8, 8 }
3713 }, {
3714 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3715 .klen = 8,
3716 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3717 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3718 .ilen = 16,
3719 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3720 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3721 .rlen = 16,
3722 .np = 3,
3723 .tap = { 3, 12, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003724 }, { /* Generated with Crypto++ */
3725 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3726 .klen = 8,
3727 .input = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3728 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3729 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3730 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3731 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3732 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3733 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3734 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3735 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3736 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3737 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3738 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3739 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3740 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3741 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3742 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3743 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3744 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3745 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3746 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3747 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3748 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3749 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3750 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3751 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3752 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3753 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3754 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3755 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3756 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3757 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3758 .ilen = 248,
3759 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3760 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3761 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3762 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3763 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3764 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3765 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3766 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3767 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3768 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3769 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3770 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3771 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3772 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3773 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3774 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3775 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3776 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3777 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3778 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3779 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3780 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3781 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3782 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3783 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3784 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3785 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3786 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3787 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3788 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3789 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3790 .rlen = 248,
3791 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003792 .np = 3,
3793 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003794 },
3795};
3796
3797static struct cipher_testvec des_cbc_enc_tv_template[] = {
3798 { /* From OpenSSL */
3799 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3800 .klen = 8,
3801 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3802 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3803 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3804 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3805 .ilen = 24,
3806 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3807 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3808 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3809 .rlen = 24,
3810 }, { /* FIPS Pub 81 */
3811 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3812 .klen = 8,
3813 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3814 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3815 .ilen = 8,
3816 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3817 .rlen = 8,
3818 }, {
3819 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3820 .klen = 8,
3821 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3822 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3823 .ilen = 8,
3824 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3825 .rlen = 8,
3826 }, {
3827 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3828 .klen = 8,
3829 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3830 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3831 .ilen = 8,
3832 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3833 .rlen = 8,
3834 }, { /* Copy of openssl vector for chunk testing */
3835 /* From OpenSSL */
3836 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3837 .klen = 8,
3838 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3839 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3840 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3841 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3842 .ilen = 24,
3843 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3844 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3845 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3846 .rlen = 24,
3847 .np = 2,
3848 .tap = { 13, 11 }
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 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3853 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3854 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3855 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3856 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3857 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3858 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3859 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3860 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3861 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3862 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3863 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3864 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3865 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3866 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3867 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3868 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3869 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3870 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3871 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3872 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3873 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3874 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3875 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3876 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3877 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3878 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3879 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3880 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3881 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3882 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3883 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3884 .ilen = 248,
3885 .result = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3886 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3887 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3888 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3889 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3890 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3891 "\x81\x72\x74\xDE\x30\x19\x69\x49"
3892 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3893 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3894 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3895 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3896 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3897 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3898 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3899 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3900 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3901 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3902 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3903 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3904 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3905 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3906 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3907 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3908 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3909 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3910 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3911 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3912 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3913 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3914 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3915 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3916 .rlen = 248,
3917 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003918 .np = 3,
3919 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003920 },
3921};
3922
3923static struct cipher_testvec des_cbc_dec_tv_template[] = {
3924 { /* FIPS Pub 81 */
3925 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3926 .klen = 8,
3927 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3928 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3929 .ilen = 8,
3930 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3931 .rlen = 8,
3932 }, {
3933 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3934 .klen = 8,
3935 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3936 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3937 .ilen = 8,
3938 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3939 .rlen = 8,
3940 }, {
3941 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3942 .klen = 8,
3943 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3944 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3945 .ilen = 8,
3946 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3947 .rlen = 8,
3948 }, { /* Copy of above, for chunk testing */
3949 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3950 .klen = 8,
3951 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3952 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3953 .ilen = 8,
3954 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3955 .rlen = 8,
3956 .np = 2,
3957 .tap = { 4, 4 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003958 }, { /* Generated with Crypto++ */
3959 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3960 .klen = 8,
3961 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3962 .input = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3963 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3964 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3965 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3966 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3967 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3968 "\x81\x72\x74\xDE\x30\x19\x69\x49"
3969 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3970 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3971 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3972 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3973 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3974 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3975 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3976 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3977 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3978 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3979 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3980 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3981 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3982 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3983 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3984 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3985 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3986 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3987 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3988 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3989 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3990 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3991 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3992 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3993 .ilen = 248,
3994 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3995 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3996 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3997 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3998 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3999 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4000 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4001 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4002 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4003 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4004 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4005 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4006 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4007 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4008 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4009 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4010 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4011 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4012 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4013 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4014 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4015 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4016 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4017 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4018 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4019 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4020 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4021 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4022 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4023 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4024 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4025 .rlen = 248,
4026 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004027 .np = 3,
4028 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004029 },
4030};
4031
4032static struct cipher_testvec des_ctr_enc_tv_template[] = {
4033 { /* Generated with Crypto++ */
4034 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4035 .klen = 8,
4036 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4037 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4038 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4039 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4040 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4041 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4042 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4043 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4044 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4045 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4046 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4047 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4048 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4049 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4050 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4051 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4052 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4053 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4054 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4055 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4056 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4057 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4058 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4059 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4060 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4061 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4062 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4063 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4064 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4065 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4066 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4067 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4068 .ilen = 248,
4069 .result = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
4070 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
4071 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
4072 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
4073 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
4074 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
4075 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
4076 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
4077 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4078 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4079 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4080 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4081 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4082 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4083 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4084 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4085 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4086 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4087 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4088 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4089 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4090 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4091 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4092 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4093 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4094 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4095 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4096 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4097 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4098 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4099 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4100 .rlen = 248,
4101 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004102 .np = 3,
4103 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004104 }, { /* Generated with Crypto++ */
4105 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4106 .klen = 8,
4107 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4108 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4109 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4110 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4111 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4112 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4113 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4114 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4115 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4116 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4117 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4118 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4119 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4120 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4121 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4122 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4123 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4124 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4125 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4126 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4127 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4128 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4129 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4130 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4131 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4132 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4133 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4134 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4135 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4136 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4137 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4138 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4139 .ilen = 247,
4140 .result = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4141 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4142 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4143 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4144 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4145 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4146 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4147 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4148 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4149 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4150 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4151 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4152 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4153 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4154 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4155 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4156 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4157 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4158 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4159 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4160 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4161 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4162 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4163 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4164 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4165 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4166 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4167 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4168 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4169 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4170 "\x91\x45\x05\x3E\x58\xBF\x32",
4171 .rlen = 247,
4172 .also_non_np = 1,
4173 .np = 2,
4174 .tap = { 247 - 8, 8 },
4175 },
4176};
4177
4178static struct cipher_testvec des_ctr_dec_tv_template[] = {
4179 { /* Generated with Crypto++ */
4180 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4181 .klen = 8,
4182 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4183 .input = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
4184 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
4185 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
4186 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
4187 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
4188 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
4189 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
4190 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
4191 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4192 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4193 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4194 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4195 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4196 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4197 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4198 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4199 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4200 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4201 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4202 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4203 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4204 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4205 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4206 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4207 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4208 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4209 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4210 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4211 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4212 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4213 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4214 .ilen = 248,
4215 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4216 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4217 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4218 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4219 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4220 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4221 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4222 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4223 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4224 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4225 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4226 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4227 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4228 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4229 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4230 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4231 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4232 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4233 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4234 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4235 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4236 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4237 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4238 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4239 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4240 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4241 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4242 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4243 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4244 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4245 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4246 .rlen = 248,
4247 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004248 .np = 3,
4249 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004250 }, { /* Generated with Crypto++ */
4251 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4252 .klen = 8,
4253 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4254 .input = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4255 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4256 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4257 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4258 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4259 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4260 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4261 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4262 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4263 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4264 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4265 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4266 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4267 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4268 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4269 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4270 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4271 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4272 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4273 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4274 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4275 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4276 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4277 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4278 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4279 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4280 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4281 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4282 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4283 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4284 "\x91\x45\x05\x3E\x58\xBF\x32",
4285 .ilen = 247,
4286 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4287 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4288 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4289 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4290 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4291 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4292 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4293 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4294 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4295 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4296 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4297 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4298 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4299 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4300 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4301 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4302 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4303 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4304 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4305 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4306 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4307 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4308 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4309 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4310 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4311 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4312 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4313 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4314 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4315 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4316 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4317 .rlen = 247,
4318 .also_non_np = 1,
4319 .np = 2,
4320 .tap = { 247 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004321 },
4322};
4323
4324static struct cipher_testvec des3_ede_enc_tv_template[] = {
4325 { /* These are from openssl */
4326 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4327 "\x55\x55\x55\x55\x55\x55\x55\x55"
4328 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4329 .klen = 24,
4330 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4331 .ilen = 8,
4332 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4333 .rlen = 8,
4334 }, {
4335 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4336 "\x86\x02\x87\x66\x59\x08\x21\x98"
4337 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4338 .klen = 24,
4339 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4340 .ilen = 8,
4341 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4342 .rlen = 8,
4343 }, {
4344 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4345 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4346 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4347 .klen = 24,
4348 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
4349 .ilen = 8,
4350 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4351 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004352 }, { /* Generated with Crypto++ */
4353 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4354 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4355 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4356 .klen = 24,
4357 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4358 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4359 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4360 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4361 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4362 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4363 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4364 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4365 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4366 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4367 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4368 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4369 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4370 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4371 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4372 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4373 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4374 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4375 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4376 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4377 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4378 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4379 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4380 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4381 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4382 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4383 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4384 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4385 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4386 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4387 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4388 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4389 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4390 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4391 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4392 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4393 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4394 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4395 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4396 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4397 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4398 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4399 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4400 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4401 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4402 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4403 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4404 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4405 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4406 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4407 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4408 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4409 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4410 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4411 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4412 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4413 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4414 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4415 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4416 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4417 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4418 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4419 .ilen = 496,
4420 .result = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4421 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4422 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4423 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4424 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4425 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4426 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4427 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4428 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4429 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4430 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4431 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4432 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4433 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4434 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4435 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4436 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4437 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4438 "\x45\x86\x50\x01\x70\x35\x99\x92"
4439 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4440 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4441 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4442 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4443 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4444 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4445 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4446 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4447 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4448 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4449 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4450 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4451 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4452 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4453 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4454 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4455 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4456 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4457 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4458 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4459 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4460 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4461 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4462 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4463 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4464 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4465 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4466 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4467 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4468 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4469 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4470 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4471 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4472 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4473 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4474 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4475 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4476 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4477 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4478 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4479 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4480 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4481 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4482 .rlen = 496,
4483 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004484 .np = 3,
4485 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004486 },
4487};
4488
4489static struct cipher_testvec des3_ede_dec_tv_template[] = {
4490 { /* These are from openssl */
4491 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4492 "\x55\x55\x55\x55\x55\x55\x55\x55"
4493 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4494 .klen = 24,
4495 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4496 .ilen = 8,
4497 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4498 .rlen = 8,
4499 }, {
4500 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4501 "\x86\x02\x87\x66\x59\x08\x21\x98"
4502 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4503 .klen = 24,
4504 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4505 .ilen = 8,
4506 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4507 .rlen = 8,
4508 }, {
4509 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4510 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4511 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4512 .klen = 24,
4513 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4514 .ilen = 8,
4515 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
4516 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004517 }, { /* Generated with Crypto++ */
4518 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4519 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4520 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4521 .klen = 24,
4522 .input = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4523 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4524 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4525 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4526 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4527 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4528 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4529 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4530 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4531 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4532 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4533 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4534 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4535 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4536 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4537 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4538 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4539 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4540 "\x45\x86\x50\x01\x70\x35\x99\x92"
4541 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4542 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4543 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4544 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4545 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4546 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4547 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4548 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4549 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4550 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4551 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4552 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4553 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4554 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4555 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4556 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4557 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4558 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4559 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4560 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4561 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4562 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4563 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4564 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4565 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4566 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4567 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4568 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4569 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4570 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4571 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4572 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4573 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4574 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4575 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4576 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4577 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4578 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4579 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4580 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4581 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4582 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4583 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4584 .ilen = 496,
4585 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4586 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4587 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4588 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4589 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4590 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4591 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4592 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4593 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4594 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4595 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4596 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4597 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4598 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4599 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4600 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4601 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4602 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4603 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4604 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4605 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4606 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4607 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4608 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4609 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4610 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4611 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4612 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4613 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4614 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4615 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4616 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4617 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4618 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4619 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4620 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4621 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4622 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4623 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4624 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4625 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4626 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4627 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4628 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4629 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4630 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4631 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4632 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4633 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4634 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4635 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4636 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4637 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4638 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4639 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4640 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4641 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4642 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4643 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4644 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4645 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4646 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4647 .rlen = 496,
4648 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004649 .np = 3,
4650 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004651 },
4652};
4653
4654static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
4655 { /* Generated from openssl */
4656 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4657 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4658 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4659 .klen = 24,
4660 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4661 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4662 "\x53\x20\x63\x65\x65\x72\x73\x74"
4663 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4664 "\x20\x79\x65\x53\x72\x63\x74\x65"
4665 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4666 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4667 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4668 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4669 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4670 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4671 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4672 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4673 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4674 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4675 "\x63\x65\x65\x72\x73\x74\x54\x20"
4676 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4677 .ilen = 128,
4678 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4679 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4680 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4681 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4682 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4683 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4684 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4685 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4686 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4687 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4688 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4689 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4690 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4691 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4692 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4693 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4694 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004695 }, { /* Generated with Crypto++ */
4696 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4697 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4698 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4699 .klen = 24,
4700 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4701 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4702 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4703 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4704 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4705 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4706 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4707 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4708 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4709 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4710 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4711 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4712 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4713 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4714 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4715 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4716 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4717 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4718 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4719 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4720 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4721 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4722 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4723 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4724 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4725 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4726 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4727 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4728 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4729 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4730 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4731 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4732 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4733 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4734 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4735 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4736 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4737 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4738 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4739 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4740 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4741 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4742 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4743 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4744 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4745 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4746 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4747 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4748 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4749 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4750 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4751 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4752 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4753 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4754 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4755 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4756 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4757 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4758 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4759 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4760 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4761 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4762 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4763 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4764 .ilen = 496,
4765 .result = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4766 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4767 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4768 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4769 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4770 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4771 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4772 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4773 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4774 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4775 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4776 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4777 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4778 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4779 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4780 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4781 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4782 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4783 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4784 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4785 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4786 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4787 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4788 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4789 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4790 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4791 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4792 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4793 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4794 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4795 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4796 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4797 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4798 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4799 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4800 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4801 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4802 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4803 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4804 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4805 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4806 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4807 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4808 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4809 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4810 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4811 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4812 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4813 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4814 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4815 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4816 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4817 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4818 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4819 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4820 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4821 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4822 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4823 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4824 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4825 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4826 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4827 .rlen = 496,
4828 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004829 .np = 3,
4830 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004831 },
4832};
4833
4834static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
4835 { /* Generated from openssl */
4836 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4837 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4838 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4839 .klen = 24,
4840 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4841 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4842 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4843 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4844 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4845 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4846 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4847 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4848 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4849 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4850 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4851 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4852 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4853 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4854 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4855 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4856 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4857 .ilen = 128,
4858 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4859 "\x53\x20\x63\x65\x65\x72\x73\x74"
4860 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4861 "\x20\x79\x65\x53\x72\x63\x74\x65"
4862 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4863 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4864 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4865 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4866 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4867 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4868 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4869 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4870 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4871 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4872 "\x63\x65\x65\x72\x73\x74\x54\x20"
4873 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4874 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004875 }, { /* Generated with Crypto++ */
4876 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4877 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4878 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4879 .klen = 24,
4880 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4881 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4882 .input = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4883 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4884 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4885 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4886 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4887 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4888 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4889 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4890 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4891 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4892 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4893 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4894 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4895 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4896 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4897 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4898 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4899 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4900 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4901 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4902 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4903 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4904 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4905 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4906 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4907 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4908 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4909 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4910 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4911 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4912 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4913 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4914 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4915 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4916 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4917 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4918 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4919 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4920 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4921 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4922 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4923 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4924 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4925 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4926 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4927 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4928 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4929 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4930 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4931 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4932 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4933 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4934 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4935 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4936 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4937 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4938 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4939 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4940 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4941 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4942 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4943 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4944 .ilen = 496,
4945 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4946 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4947 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4948 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4949 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4950 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4951 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4952 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4953 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4954 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4955 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4956 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4957 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4958 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4959 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4960 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4961 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4962 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4963 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4964 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4965 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4966 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4967 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4968 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4969 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4970 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4971 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4972 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4973 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4974 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4975 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4976 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4977 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4978 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4979 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4980 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4981 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4982 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4983 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4984 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4985 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4986 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4987 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4988 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4989 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4990 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4991 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4992 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4993 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4994 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4995 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4996 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4997 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4998 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4999 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5000 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5001 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5002 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5003 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5004 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5005 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5006 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5007 .rlen = 496,
5008 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005009 .np = 3,
5010 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005011 },
5012};
5013
5014static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
5015 { /* Generated with Crypto++ */
5016 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5017 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5018 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5019 .klen = 24,
5020 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5021 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5022 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5023 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5024 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5025 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5026 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5027 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5028 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5029 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5030 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5031 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5032 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5033 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5034 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5035 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5036 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5037 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5038 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5039 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5040 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5041 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5042 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5043 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5044 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5045 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5046 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5047 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5048 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5049 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5050 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5051 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5052 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5053 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5054 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5055 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5056 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5057 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5058 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5059 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5060 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5061 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5062 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5063 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5064 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5065 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5066 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5067 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5068 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5069 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5070 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5071 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5072 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5073 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5074 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5075 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5076 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5077 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5078 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5079 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5080 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5081 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5082 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5083 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5084 .ilen = 496,
5085 .result = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5086 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5087 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5088 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5089 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5090 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5091 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5092 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5093 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5094 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5095 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5096 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5097 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5098 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5099 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5100 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5101 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5102 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5103 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5104 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5105 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5106 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5107 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5108 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5109 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5110 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5111 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5112 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5113 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5114 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5115 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5116 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5117 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5118 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5119 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5120 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5121 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5122 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5123 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5124 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5125 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5126 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5127 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5128 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5129 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5130 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5131 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5132 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5133 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5134 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5135 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5136 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5137 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5138 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5139 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5140 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5141 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5142 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5143 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5144 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5145 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5146 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5147 .rlen = 496,
5148 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005149 .np = 3,
5150 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005151 }, { /* Generated with Crypto++ */
5152 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5153 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5154 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5155 .klen = 24,
5156 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5157 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5158 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5159 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5160 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5161 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5162 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5163 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5164 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5165 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5166 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5167 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5168 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5169 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5170 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5171 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5172 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5173 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5174 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5175 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5176 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5177 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5178 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5179 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5180 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5181 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5182 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5183 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5184 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5185 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5186 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5187 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5188 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5189 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5190 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5191 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5192 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5193 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5194 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5195 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5196 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5197 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5198 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5199 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5200 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5201 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5202 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5203 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5204 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5205 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5206 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5207 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5208 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5209 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5210 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5211 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5212 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5213 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5214 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5215 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5216 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5217 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5218 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5219 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5220 "\x2E\xB1\x18",
5221 .ilen = 499,
5222 .result = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5223 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5224 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5225 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5226 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5227 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5228 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5229 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5230 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5231 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5232 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5233 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5234 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5235 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5236 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5237 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5238 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5239 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5240 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5241 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5242 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5243 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5244 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5245 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5246 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5247 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5248 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5249 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5250 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5251 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5252 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5253 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5254 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5255 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5256 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5257 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5258 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5259 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5260 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5261 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5262 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5263 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5264 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5265 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5266 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5267 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5268 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5269 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5270 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5271 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5272 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5273 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5274 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5275 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5276 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5277 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5278 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5279 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5280 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5281 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5282 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5283 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5284 "\xF2\x79\xD9",
5285 .rlen = 499,
5286 .also_non_np = 1,
5287 .np = 2,
5288 .tap = { 499 - 16, 16 },
5289 },
5290};
5291
5292static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
5293 { /* Generated with Crypto++ */
5294 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5295 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5296 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5297 .klen = 24,
5298 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5299 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5300 .input = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5301 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5302 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5303 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5304 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5305 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5306 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5307 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5308 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5309 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5310 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5311 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5312 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5313 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5314 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5315 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5316 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5317 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5318 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5319 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5320 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5321 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5322 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5323 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5324 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5325 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5326 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5327 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5328 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5329 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5330 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5331 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5332 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5333 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5334 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5335 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5336 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5337 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5338 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5339 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5340 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5341 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5342 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5343 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5344 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5345 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5346 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5347 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5348 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5349 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5350 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5351 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5352 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5353 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5354 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5355 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5356 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5357 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5358 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5359 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5360 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5361 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5362 .ilen = 496,
5363 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5364 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5365 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5366 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5367 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5368 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5369 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5370 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5371 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5372 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5373 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5374 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5375 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5376 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5377 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5378 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5379 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5380 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5381 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5382 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5383 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5384 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5385 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5386 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5387 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5388 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5389 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5390 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5391 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5392 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5393 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5394 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5395 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5396 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5397 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5398 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5399 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5400 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5401 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5402 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5403 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5404 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5405 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5406 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5407 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5408 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5409 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5410 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5411 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5412 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5413 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5414 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5415 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5416 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5417 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5418 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5419 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5420 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5421 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5422 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5423 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5424 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5425 .rlen = 496,
5426 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005427 .np = 3,
5428 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005429 }, { /* Generated with Crypto++ */
5430 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5431 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5432 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5433 .klen = 24,
5434 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5435 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5436 .input = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5437 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5438 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5439 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5440 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5441 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5442 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5443 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5444 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5445 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5446 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5447 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5448 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5449 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5450 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5451 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5452 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5453 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5454 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5455 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5456 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5457 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5458 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5459 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5460 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5461 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5462 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5463 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5464 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5465 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5466 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5467 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5468 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5469 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5470 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5471 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5472 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5473 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5474 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5475 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5476 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5477 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5478 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5479 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5480 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5481 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5482 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5483 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5484 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5485 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5486 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5487 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5488 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5489 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5490 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5491 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5492 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5493 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5494 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5495 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5496 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5497 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5498 "\xF2\x79\xD9",
5499 .ilen = 499,
5500 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5501 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5502 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5503 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5504 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5505 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5506 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5507 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5508 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5509 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5510 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5511 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5512 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5513 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5514 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5515 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5516 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5517 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5518 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5519 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5520 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5521 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5522 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5523 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5524 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5525 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5526 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5527 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5528 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5529 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5530 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5531 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5532 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5533 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5534 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5535 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5536 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5537 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5538 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5539 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5540 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5541 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5542 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5543 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5544 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5545 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5546 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5547 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5548 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5549 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5550 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5551 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5552 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5553 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5554 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5555 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5556 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5557 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5558 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5559 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5560 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5561 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5562 "\x2E\xB1\x18",
5563 .rlen = 499,
5564 .also_non_np = 1,
5565 .np = 2,
5566 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005567 },
5568};
5569
5570/*
5571 * Blowfish test vectors.
5572 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005573#define BF_ENC_TEST_VECTORS 7
5574#define BF_DEC_TEST_VECTORS 7
5575#define BF_CBC_ENC_TEST_VECTORS 2
5576#define BF_CBC_DEC_TEST_VECTORS 2
5577#define BF_CTR_ENC_TEST_VECTORS 2
5578#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08005579
5580static struct cipher_testvec bf_enc_tv_template[] = {
5581 { /* DES test vectors from OpenSSL */
5582 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5583 .klen = 8,
5584 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
5585 .ilen = 8,
5586 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5587 .rlen = 8,
5588 }, {
5589 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5590 .klen = 8,
5591 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5592 .ilen = 8,
5593 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5594 .rlen = 8,
5595 }, {
5596 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5597 .klen = 8,
5598 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5599 .ilen = 8,
5600 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5601 .rlen = 8,
5602 }, { /* Vary the keylength... */
5603 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5604 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5605 .klen = 16,
5606 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5607 .ilen = 8,
5608 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5609 .rlen = 8,
5610 }, {
5611 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5612 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5613 "\x00\x11\x22\x33\x44",
5614 .klen = 21,
5615 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5616 .ilen = 8,
5617 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5618 .rlen = 8,
5619 }, { /* Generated with bf488 */
5620 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5621 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5622 "\x00\x11\x22\x33\x44\x55\x66\x77"
5623 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5624 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5625 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5626 "\xff\xff\xff\xff\xff\xff\xff\xff",
5627 .klen = 56,
5628 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5629 .ilen = 8,
5630 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5631 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005632 }, { /* Generated with Crypto++ */
5633 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5634 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5635 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5636 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5637 .klen = 32,
5638 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5639 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5640 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5641 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005642 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5643 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5644 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5645 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5646 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5647 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5648 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5649 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5650 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5651 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5652 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5653 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5654 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5655 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5656 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5657 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5658 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5659 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5660 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5661 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5662 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5663 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5664 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5665 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5666 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5667 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5668 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5669 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5670 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5671 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5672 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5673 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5674 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5675 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5676 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5677 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5678 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5679 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5680 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5681 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5682 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5683 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5684 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5685 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5686 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5687 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5688 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5689 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5690 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5691 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5692 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5693 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5694 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5695 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5696 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5697 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5698 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5699 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5700 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5701 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005702 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5703 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5704 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5705 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005706 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5707 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5708 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5709 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5710 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5711 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5712 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5713 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5714 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5715 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5716 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5717 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5718 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5719 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5720 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5721 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5722 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5723 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5724 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5725 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5726 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5727 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5728 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5729 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5730 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5731 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5732 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5733 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5734 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5735 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5736 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5737 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5738 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5739 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5740 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5741 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5742 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5743 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5744 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5745 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5746 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5747 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5748 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5749 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5750 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5751 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5752 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5753 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5754 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5755 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5756 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5757 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5758 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5759 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5760 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5761 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5762 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5763 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5764 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5765 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005766 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005767 .np = 3,
5768 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005769 },
5770};
5771
5772static struct cipher_testvec bf_dec_tv_template[] = {
5773 { /* DES test vectors from OpenSSL */
5774 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5775 .klen = 8,
5776 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5777 .ilen = 8,
5778 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
5779 .rlen = 8,
5780 }, {
5781 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5782 .klen = 8,
5783 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5784 .ilen = 8,
5785 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5786 .rlen = 8,
5787 }, {
5788 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5789 .klen = 8,
5790 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5791 .ilen = 8,
5792 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5793 .rlen = 8,
5794 }, { /* Vary the keylength... */
5795 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5796 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5797 .klen = 16,
5798 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5799 .ilen = 8,
5800 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5801 .rlen = 8,
5802 }, {
5803 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5804 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5805 "\x00\x11\x22\x33\x44",
5806 .klen = 21,
5807 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5808 .ilen = 8,
5809 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5810 .rlen = 8,
5811 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
5812 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5813 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5814 "\x00\x11\x22\x33\x44\x55\x66\x77"
5815 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5816 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5817 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5818 "\xff\xff\xff\xff\xff\xff\xff\xff",
5819 .klen = 56,
5820 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5821 .ilen = 8,
5822 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5823 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005824 }, { /* Generated with Crypto++ */
5825 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5826 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5827 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5828 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5829 .klen = 32,
5830 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5831 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5832 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5833 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005834 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5835 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5836 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5837 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5838 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5839 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5840 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5841 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5842 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5843 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5844 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5845 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5846 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5847 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5848 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5849 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5850 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5851 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5852 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5853 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5854 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5855 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5856 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5857 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5858 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5859 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5860 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5861 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5862 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5863 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5864 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5865 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5866 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5867 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5868 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5869 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5870 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5871 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5872 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5873 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5874 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5875 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5876 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5877 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5878 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5879 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5880 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5881 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5882 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5883 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5884 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5885 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5886 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5887 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5888 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5889 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5890 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5891 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5892 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5893 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005894 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5895 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5896 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5897 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005898 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5899 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5900 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5901 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5902 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5903 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5904 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5905 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5906 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5907 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5908 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5909 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5910 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5911 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5912 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5913 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5914 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5915 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5916 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5917 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5918 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5919 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5920 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5921 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5922 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5923 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5924 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5925 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5926 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5927 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5928 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5929 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5930 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5931 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5932 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5933 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5934 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5935 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5936 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5937 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5938 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5939 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5940 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5941 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5942 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5943 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5944 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5945 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5946 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5947 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5948 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5949 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5950 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5951 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5952 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5953 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5954 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5955 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5956 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5957 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005958 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005959 .np = 3,
5960 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005961 },
5962};
5963
5964static struct cipher_testvec bf_cbc_enc_tv_template[] = {
5965 { /* From OpenSSL */
5966 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5967 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5968 .klen = 16,
5969 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5970 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
5971 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
5972 "\x68\x65\x20\x74\x69\x6d\x65\x20"
5973 "\x66\x6f\x72\x20\x00\x00\x00\x00",
5974 .ilen = 32,
5975 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
5976 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
5977 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
5978 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
5979 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005980 }, { /* Generated with Crypto++ */
5981 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5982 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5983 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5984 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5985 .klen = 32,
5986 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5987 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5988 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5989 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5990 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005991 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5992 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5993 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5994 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5995 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5996 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5997 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5998 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5999 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6000 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6001 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6002 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6003 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6004 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6005 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6006 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6007 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6008 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6009 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6010 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6011 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6012 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6013 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6014 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6015 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6016 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6017 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6018 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6019 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6020 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6021 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6022 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6023 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6024 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6025 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6026 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6027 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6028 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6029 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6030 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6031 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6032 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6033 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6034 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6035 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6036 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6037 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6038 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6039 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6040 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6041 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6042 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6043 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6044 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6045 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6046 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6047 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6048 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6049 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6050 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006051 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
6052 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
6053 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
6054 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006055 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
6056 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
6057 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
6058 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
6059 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
6060 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
6061 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
6062 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
6063 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
6064 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
6065 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
6066 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
6067 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
6068 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
6069 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
6070 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
6071 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
6072 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
6073 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
6074 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
6075 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
6076 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
6077 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
6078 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
6079 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
6080 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
6081 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
6082 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
6083 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
6084 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
6085 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
6086 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
6087 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
6088 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
6089 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
6090 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
6091 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
6092 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
6093 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
6094 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
6095 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
6096 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
6097 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
6098 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6099 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6100 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6101 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6102 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6103 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6104 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6105 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6106 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6107 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6108 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6109 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6110 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6111 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6112 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6113 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6114 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006115 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006116 .np = 3,
6117 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006118 },
6119};
6120
6121static struct cipher_testvec bf_cbc_dec_tv_template[] = {
6122 { /* From OpenSSL */
6123 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6124 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6125 .klen = 16,
6126 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6127 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
6128 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
6129 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
6130 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
6131 .ilen = 32,
6132 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
6133 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
6134 "\x68\x65\x20\x74\x69\x6d\x65\x20"
6135 "\x66\x6f\x72\x20\x00\x00\x00\x00",
6136 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006137 }, { /* Generated with Crypto++ */
6138 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6139 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6140 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6141 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6142 .klen = 32,
6143 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6144 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
6145 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
6146 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
6147 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006148 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
6149 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
6150 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
6151 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
6152 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
6153 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
6154 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
6155 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
6156 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
6157 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
6158 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
6159 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
6160 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
6161 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
6162 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
6163 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
6164 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
6165 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
6166 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
6167 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
6168 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
6169 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
6170 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
6171 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
6172 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
6173 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
6174 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
6175 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
6176 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
6177 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
6178 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
6179 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
6180 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
6181 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
6182 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
6183 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
6184 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
6185 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
6186 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
6187 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
6188 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
6189 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
6190 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
6191 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6192 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6193 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6194 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6195 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6196 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6197 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6198 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6199 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6200 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6201 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6202 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6203 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6204 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6205 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6206 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6207 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006208 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6209 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6210 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6211 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006212 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6213 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6214 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6215 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6216 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6217 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6218 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6219 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6220 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6221 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6222 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6223 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6224 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6225 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6226 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6227 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6228 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6229 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6230 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6231 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6232 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6233 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6234 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6235 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6236 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6237 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6238 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6239 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6240 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6241 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6242 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6243 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6244 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6245 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6246 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6247 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6248 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6249 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6250 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6251 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6252 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6253 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6254 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6255 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6256 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6257 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6258 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6259 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6260 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6261 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6262 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6263 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6264 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6265 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6266 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6267 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6268 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6269 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6270 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6271 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006272 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006273 .np = 3,
6274 .tap = { 504 - 10, 2, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006275 },
6276};
6277
6278static struct cipher_testvec bf_ctr_enc_tv_template[] = {
6279 { /* Generated with Crypto++ */
6280 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6281 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6282 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6283 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6284 .klen = 32,
6285 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6286 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6287 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6288 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6289 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006290 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6291 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6292 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6293 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6294 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6295 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6296 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6297 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6298 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6299 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6300 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6301 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6302 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6303 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6304 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6305 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6306 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6307 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6308 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6309 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6310 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6311 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6312 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6313 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6314 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6315 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6316 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6317 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6318 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6319 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6320 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6321 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6322 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6323 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6324 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6325 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6326 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6327 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6328 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6329 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6330 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6331 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6332 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6333 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6334 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6335 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6336 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6337 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6338 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6339 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6340 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6341 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6342 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6343 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6344 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6345 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6346 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6347 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6348 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6349 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006350 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6351 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6352 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6353 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006354 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6355 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6356 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6357 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6358 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6359 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6360 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6361 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6362 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6363 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6364 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6365 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6366 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6367 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6368 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6369 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6370 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6371 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6372 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6373 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6374 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6375 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6376 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6377 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6378 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6379 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6380 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6381 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6382 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6383 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6384 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6385 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6386 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6387 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6388 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6389 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6390 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6391 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6392 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6393 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6394 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6395 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6396 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6397 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6398 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6399 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6400 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6401 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6402 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6403 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6404 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6405 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6406 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6407 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6408 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6409 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6410 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6411 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6412 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6413 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006414 }, { /* Generated with Crypto++ */
6415 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6416 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6417 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6418 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6419 .klen = 32,
6420 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6421 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6422 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6423 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6424 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6425 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006426 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6427 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6428 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6429 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6430 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6431 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6432 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6433 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6434 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6435 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6436 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6437 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6438 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6439 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6440 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6441 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6442 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6443 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6444 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6445 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6446 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6447 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6448 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6449 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6450 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6451 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6452 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6453 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6454 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6455 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6456 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6457 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6458 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6459 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6460 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6461 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6462 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6463 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6464 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6465 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6466 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6467 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6468 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6469 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6470 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6471 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6472 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6473 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6474 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6475 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6476 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6477 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6478 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6479 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6480 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6481 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6482 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6483 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6484 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006485 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6486 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6487 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6488 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6489 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006490 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6491 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6492 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6493 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6494 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6495 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6496 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6497 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6498 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6499 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6500 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6501 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6502 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6503 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6504 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6505 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6506 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6507 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6508 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6509 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6510 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6511 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6512 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6513 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6514 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6515 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6516 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6517 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6518 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6519 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6520 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6521 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6522 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6523 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6524 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6525 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6526 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6527 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6528 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6529 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6530 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6531 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6532 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6533 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6534 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6535 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6536 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6537 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6538 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6539 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6540 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6541 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6542 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6543 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6544 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6545 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6546 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6547 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6548 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006549 .also_non_np = 1,
6550 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006551 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006552 }, { /* Generated with Crypto++ */
6553 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6554 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6555 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6556 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6557 .klen = 32,
6558 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6559 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6560 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6561 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6562 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6563 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6564 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6565 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6566 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6567 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6568 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6569 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6570 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6571 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6572 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6573 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6574 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6575 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6576 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6577 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6578 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6579 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6580 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6581 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6582 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6583 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6584 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6585 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6586 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6587 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6588 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6589 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6590 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6591 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6592 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6593 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6594 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6595 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6596 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6597 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6598 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6599 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6600 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6601 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6602 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6603 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6604 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6605 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6606 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6607 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6608 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6609 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6610 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6611 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6612 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6613 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6614 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6615 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6616 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6617 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6618 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6619 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6620 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6621 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6622 .ilen = 504,
6623 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6624 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6625 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6626 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6627 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6628 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6629 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6630 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6631 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6632 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6633 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6634 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6635 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6636 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6637 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6638 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6639 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6640 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6641 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6642 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6643 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6644 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6645 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6646 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6647 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6648 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6649 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6650 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6651 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6652 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6653 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6654 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6655 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6656 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6657 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6658 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6659 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6660 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6661 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6662 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6663 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6664 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6665 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6666 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6667 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
6668 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
6669 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
6670 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
6671 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
6672 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
6673 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
6674 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
6675 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
6676 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
6677 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
6678 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
6679 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
6680 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
6681 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
6682 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
6683 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
6684 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
6685 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
6686 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006687 },
6688};
6689
6690static struct cipher_testvec bf_ctr_dec_tv_template[] = {
6691 { /* Generated with Crypto++ */
6692 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6693 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6694 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6695 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6696 .klen = 32,
6697 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6698 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6699 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6700 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6701 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006702 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6703 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6704 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6705 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6706 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6707 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6708 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6709 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6710 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6711 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6712 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6713 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6714 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6715 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6716 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6717 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6718 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6719 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6720 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6721 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6722 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6723 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6724 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6725 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6726 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6727 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6728 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6729 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6730 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6731 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6732 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6733 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6734 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6735 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6736 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6737 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6738 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6739 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6740 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6741 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6742 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6743 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6744 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6745 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6746 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6747 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6748 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6749 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6750 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6751 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6752 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6753 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6754 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6755 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6756 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6757 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6758 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6759 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6760 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6761 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006762 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6763 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6764 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6765 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006766 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6767 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6768 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6769 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6770 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6771 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6772 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6773 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6774 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6775 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6776 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6777 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6778 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6779 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6780 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6781 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6782 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6783 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6784 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6785 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6786 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6787 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6788 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6789 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6790 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6791 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6792 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6793 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6794 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6795 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6796 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6797 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6798 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6799 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6800 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6801 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6802 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6803 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6804 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6805 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6806 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6807 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6808 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6809 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6810 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6811 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6812 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6813 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6814 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6815 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6816 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6817 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6818 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6819 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6820 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6821 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6822 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6823 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6824 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6825 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006826 }, { /* Generated with Crypto++ */
6827 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6828 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6829 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6830 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6831 .klen = 32,
6832 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6833 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6834 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6835 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6836 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6837 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006838 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6839 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6840 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6841 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6842 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6843 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6844 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6845 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6846 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6847 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6848 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6849 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6850 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6851 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6852 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6853 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6854 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6855 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6856 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6857 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6858 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6859 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6860 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6861 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6862 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6863 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6864 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6865 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6866 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6867 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6868 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6869 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6870 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6871 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6872 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6873 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6874 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6875 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6876 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6877 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6878 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6879 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6880 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6881 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6882 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6883 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6884 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6885 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6886 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6887 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6888 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6889 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6890 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6891 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6892 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6893 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6894 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6895 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6896 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006897 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6898 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6899 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6900 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6901 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006902 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6903 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6904 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6905 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6906 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6907 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6908 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6909 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6910 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6911 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6912 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6913 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6914 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6915 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6916 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6917 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6918 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6919 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6920 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6921 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6922 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6923 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6924 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6925 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6926 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6927 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6928 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6929 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6930 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6931 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6932 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6933 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6934 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6935 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6936 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6937 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6938 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6939 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6940 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6941 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6942 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6943 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6944 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6945 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6946 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6947 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6948 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6949 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6950 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6951 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6952 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6953 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6954 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6955 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6956 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6957 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6958 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6959 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6960 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006961 .also_non_np = 1,
6962 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006963 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006964 }, { /* Generated with Crypto++ */
6965 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6966 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6967 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6968 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6969 .klen = 32,
6970 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6971 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6972 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6973 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6974 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6975 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6976 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6977 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6978 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6979 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6980 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6981 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6982 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6983 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6984 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6985 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6986 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6987 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6988 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6989 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6990 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6991 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6992 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6993 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6994 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6995 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6996 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6997 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6998 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6999 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
7000 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
7001 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
7002 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
7003 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
7004 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
7005 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
7006 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
7007 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
7008 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
7009 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
7010 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
7011 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
7012 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
7013 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
7014 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
7015 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
7016 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
7017 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
7018 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
7019 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
7020 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
7021 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
7022 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
7023 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
7024 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
7025 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
7026 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
7027 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
7028 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
7029 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
7030 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
7031 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
7032 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
7033 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
7034 .ilen = 504,
7035 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7036 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7037 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7038 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7039 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7040 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7041 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7042 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7043 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7044 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7045 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7046 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7047 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7048 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7049 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7050 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7051 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7052 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7053 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7054 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7055 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7056 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7057 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7058 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7059 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7060 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7061 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7062 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7063 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7064 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7065 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7066 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7067 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7068 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7069 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7070 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7071 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7072 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7073 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7074 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7075 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7076 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7077 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7078 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7079 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7080 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7081 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7082 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7083 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7084 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7085 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7086 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7087 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7088 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7089 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7090 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7091 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7092 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7093 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7094 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7095 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7096 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7097 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
7098 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08007099 },
7100};
7101
7102/*
7103 * Twofish test vectors.
7104 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03007105#define TF_ENC_TEST_VECTORS 4
7106#define TF_DEC_TEST_VECTORS 4
7107#define TF_CBC_ENC_TEST_VECTORS 5
7108#define TF_CBC_DEC_TEST_VECTORS 5
7109#define TF_CTR_ENC_TEST_VECTORS 2
7110#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03007111#define TF_LRW_ENC_TEST_VECTORS 8
7112#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03007113#define TF_XTS_ENC_TEST_VECTORS 5
7114#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08007115
7116static struct cipher_testvec tf_enc_tv_template[] = {
7117 {
7118 .key = zeroed_string,
7119 .klen = 16,
7120 .input = zeroed_string,
7121 .ilen = 16,
7122 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7123 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7124 .rlen = 16,
7125 }, {
7126 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7127 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7128 "\x00\x11\x22\x33\x44\x55\x66\x77",
7129 .klen = 24,
7130 .input = zeroed_string,
7131 .ilen = 16,
7132 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7133 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7134 .rlen = 16,
7135 }, {
7136 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7137 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7138 "\x00\x11\x22\x33\x44\x55\x66\x77"
7139 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7140 .klen = 32,
7141 .input = zeroed_string,
7142 .ilen = 16,
7143 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7144 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7145 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007146 }, { /* Generated with Crypto++ */
7147 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7148 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7149 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7150 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7151 .klen = 32,
7152 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7153 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7154 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7155 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7156 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7157 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7158 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007159 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7160 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7161 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7162 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7163 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7164 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7165 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7166 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7167 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7168 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7169 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7170 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7171 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7172 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7173 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7174 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7175 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7176 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7177 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7178 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7179 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7180 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7181 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7182 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7183 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7184 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7185 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7186 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7187 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7188 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7189 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7190 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7191 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7192 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7193 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7194 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7195 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7196 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7197 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7198 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7199 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7200 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7201 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7202 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7203 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7204 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7205 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7206 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7207 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7208 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7209 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7210 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7211 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7212 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7213 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7214 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007215 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7216 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7217 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7218 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7219 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7220 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7221 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007222 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7223 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7224 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7225 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7226 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7227 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7228 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7229 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7230 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7231 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7232 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7233 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7234 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7235 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7236 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7237 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7238 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7239 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7240 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7241 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7242 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7243 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7244 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7245 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7246 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7247 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7248 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7249 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7250 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7251 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7252 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7253 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7254 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7255 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7256 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7257 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7258 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7259 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7260 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7261 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7262 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7263 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7264 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7265 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7266 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7267 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7268 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7269 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7270 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7271 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7272 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7273 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7274 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7275 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7276 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7277 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007278 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007279 .np = 3,
7280 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007281 },
7282};
7283
7284static struct cipher_testvec tf_dec_tv_template[] = {
7285 {
7286 .key = zeroed_string,
7287 .klen = 16,
7288 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7289 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7290 .ilen = 16,
7291 .result = zeroed_string,
7292 .rlen = 16,
7293 }, {
7294 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7295 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7296 "\x00\x11\x22\x33\x44\x55\x66\x77",
7297 .klen = 24,
7298 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7299 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7300 .ilen = 16,
7301 .result = zeroed_string,
7302 .rlen = 16,
7303 }, {
7304 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7305 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7306 "\x00\x11\x22\x33\x44\x55\x66\x77"
7307 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7308 .klen = 32,
7309 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7310 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7311 .ilen = 16,
7312 .result = zeroed_string,
7313 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007314 }, { /* Generated with Crypto++ */
7315 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7316 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7317 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7318 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7319 .klen = 32,
7320 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7321 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7322 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7323 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7324 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7325 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7326 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007327 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7328 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7329 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7330 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7331 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7332 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7333 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7334 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7335 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7336 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7337 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7338 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7339 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7340 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7341 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7342 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7343 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7344 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7345 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7346 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7347 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7348 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7349 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7350 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7351 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7352 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7353 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7354 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7355 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7356 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7357 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7358 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7359 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7360 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7361 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7362 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7363 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7364 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7365 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7366 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7367 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7368 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7369 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7370 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7371 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7372 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7373 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7374 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7375 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7376 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7377 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7378 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7379 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7380 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7381 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7382 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007383 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7384 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7385 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7386 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7387 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7388 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7389 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007390 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7391 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7392 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7393 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7394 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7395 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7396 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7397 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7398 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7399 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7400 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7401 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7402 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7403 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7404 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7405 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7406 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7407 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7408 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7409 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7410 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7411 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7412 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7413 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7414 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7415 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7416 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7417 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7418 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7419 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7420 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7421 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7422 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7423 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7424 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7425 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7426 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7427 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7428 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7429 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7430 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7431 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7432 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7433 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7434 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7435 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7436 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7437 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7438 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7439 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7440 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7441 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7442 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7443 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7444 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7445 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007446 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007447 .np = 3,
7448 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007449 },
7450};
7451
7452static struct cipher_testvec tf_cbc_enc_tv_template[] = {
7453 { /* Generated with Nettle */
7454 .key = zeroed_string,
7455 .klen = 16,
7456 .iv = zeroed_string,
7457 .input = zeroed_string,
7458 .ilen = 16,
7459 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7460 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7461 .rlen = 16,
7462 }, {
7463 .key = zeroed_string,
7464 .klen = 16,
7465 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7466 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7467 .input = zeroed_string,
7468 .ilen = 16,
7469 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7470 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7471 .rlen = 16,
7472 }, {
7473 .key = zeroed_string,
7474 .klen = 16,
7475 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7476 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7477 .input = zeroed_string,
7478 .ilen = 16,
7479 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7480 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7481 .rlen = 16,
7482 }, {
7483 .key = zeroed_string,
7484 .klen = 16,
7485 .iv = zeroed_string,
7486 .input = zeroed_string,
7487 .ilen = 48,
7488 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7489 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7490 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7491 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7492 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7493 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7494 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007495 }, { /* Generated with Crypto++ */
7496 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7497 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7498 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7499 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7500 .klen = 32,
7501 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7502 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7503 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7504 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7505 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7506 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7507 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7508 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7509 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007510 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7511 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7512 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7513 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7514 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7515 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7516 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7517 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7518 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7519 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7520 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7521 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7522 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7523 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7524 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7525 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7526 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7527 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7528 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7529 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7530 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7531 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7532 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7533 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7534 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7535 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7536 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7537 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7538 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7539 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7540 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7541 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7542 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7543 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7544 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7545 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7546 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7547 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7548 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7549 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7550 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7551 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7552 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7553 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7554 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7555 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7556 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7557 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7558 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7559 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7560 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7561 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7562 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7563 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7564 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7565 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007566 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7567 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7568 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7569 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7570 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7571 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7572 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007573 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7574 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7575 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7576 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7577 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7578 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7579 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7580 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7581 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7582 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7583 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7584 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7585 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7586 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7587 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7588 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7589 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7590 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7591 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7592 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7593 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7594 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7595 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7596 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7597 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7598 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7599 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7600 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7601 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7602 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7603 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7604 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7605 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7606 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7607 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7608 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7609 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7610 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7611 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7612 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7613 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7614 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7615 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7616 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7617 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7618 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7619 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7620 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7621 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7622 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7623 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7624 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7625 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7626 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7627 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7628 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007629 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007630 .np = 3,
7631 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007632 },
7633};
7634
7635static struct cipher_testvec tf_cbc_dec_tv_template[] = {
7636 { /* Reverse of the first four above */
7637 .key = zeroed_string,
7638 .klen = 16,
7639 .iv = zeroed_string,
7640 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7641 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7642 .ilen = 16,
7643 .result = zeroed_string,
7644 .rlen = 16,
7645 }, {
7646 .key = zeroed_string,
7647 .klen = 16,
7648 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7649 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7650 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7651 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7652 .ilen = 16,
7653 .result = zeroed_string,
7654 .rlen = 16,
7655 }, {
7656 .key = zeroed_string,
7657 .klen = 16,
7658 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7659 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7660 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7661 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7662 .ilen = 16,
7663 .result = zeroed_string,
7664 .rlen = 16,
7665 }, {
7666 .key = zeroed_string,
7667 .klen = 16,
7668 .iv = zeroed_string,
7669 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7670 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7671 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7672 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7673 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7674 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7675 .ilen = 48,
7676 .result = zeroed_string,
7677 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007678 }, { /* Generated with Crypto++ */
7679 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7680 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7681 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7682 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7683 .klen = 32,
7684 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7685 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7686 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7687 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7688 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7689 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7690 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7691 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7692 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007693 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7694 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7695 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7696 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7697 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7698 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7699 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7700 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7701 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7702 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7703 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7704 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7705 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7706 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7707 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7708 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7709 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7710 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7711 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7712 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7713 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7714 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7715 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7716 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7717 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7718 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7719 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7720 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7721 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7722 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7723 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7724 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7725 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7726 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7727 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7728 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7729 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7730 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7731 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7732 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7733 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7734 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7735 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7736 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7737 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7738 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7739 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7740 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7741 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7742 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7743 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7744 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7745 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7746 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7747 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7748 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007749 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7750 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7751 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7752 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7753 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7754 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7755 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007756 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7757 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7758 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7759 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7760 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7761 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7762 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7763 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7764 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7765 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7766 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7767 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7768 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7769 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7770 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7771 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7772 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7773 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7774 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7775 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7776 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7777 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7778 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7779 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7780 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7781 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7782 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7783 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7784 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7785 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7786 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7787 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7788 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7789 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7790 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7791 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7792 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7793 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7794 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7795 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7796 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7797 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7798 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7799 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7800 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7801 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7802 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7803 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7804 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7805 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7806 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7807 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7808 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7809 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7810 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7811 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007812 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007813 .np = 3,
7814 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03007815 },
7816};
7817
7818static struct cipher_testvec tf_ctr_enc_tv_template[] = {
7819 { /* Generated with Crypto++ */
7820 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7821 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7822 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7823 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7824 .klen = 32,
7825 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7826 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7827 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7828 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7829 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7830 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7831 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7832 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7833 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007834 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7835 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7836 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7837 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7838 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7839 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7840 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7841 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7842 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7843 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7844 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7845 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7846 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7847 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7848 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7849 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7850 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7851 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7852 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7853 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7854 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7855 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7856 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7857 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7858 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7859 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7860 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7861 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7862 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7863 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7864 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7865 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7866 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7867 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7868 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7869 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7870 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7871 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7872 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7873 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7874 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7875 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7876 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7877 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7878 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7879 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7880 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7881 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7882 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7883 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7884 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7885 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7886 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7887 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7888 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7889 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007890 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7891 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7892 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7893 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7894 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7895 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7896 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007897 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
7898 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7899 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7900 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7901 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7902 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7903 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7904 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7905 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7906 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7907 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7908 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7909 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7910 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7911 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7912 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7913 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7914 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7915 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7916 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7917 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7918 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7919 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7920 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7921 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7922 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
7923 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
7924 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
7925 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
7926 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
7927 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
7928 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
7929 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
7930 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
7931 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
7932 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
7933 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
7934 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
7935 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
7936 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
7937 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
7938 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
7939 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
7940 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
7941 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
7942 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
7943 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
7944 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
7945 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
7946 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
7947 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
7948 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
7949 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
7950 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
7951 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
7952 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007953 }, { /* Generated with Crypto++ */
7954 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7955 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7956 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7957 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7958 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007959 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
7960 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7961 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7962 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7963 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7964 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7965 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7966 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7967 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7968 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7969 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7970 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7971 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7972 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7973 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7974 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7975 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7976 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7977 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7978 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7979 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7980 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7981 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7982 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7983 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7984 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7985 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7986 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7987 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7988 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7989 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7990 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7991 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7992 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7993 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7994 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7995 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7996 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7997 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7998 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7999 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8000 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8001 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8002 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8003 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8004 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8005 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8006 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8007 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8008 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8009 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8010 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8011 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8012 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8013 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8014 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8015 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8016 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8017 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8018 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8019 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8020 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8021 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8022 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8023 .ilen = 496,
8024 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8025 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8026 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8027 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8028 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8029 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8030 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8031 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8032 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8033 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8034 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8035 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8036 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8037 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8038 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8039 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8040 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8041 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8042 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8043 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8044 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8045 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8046 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8047 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8048 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8049 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8050 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8051 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8052 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8053 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8054 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8055 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8056 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8057 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8058 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8059 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8060 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8061 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8062 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8063 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8064 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8065 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8066 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8067 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8068 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8069 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8070 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8071 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8072 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8073 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8074 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8075 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8076 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8077 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8078 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8079 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8080 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8081 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8082 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8083 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8084 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8085 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8086 .rlen = 496,
8087 }, { /* Generated with Crypto++ */
8088 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8089 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8090 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8091 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8092 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008093 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8094 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8095 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8096 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8097 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8098 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8099 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8100 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8101 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8102 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008103 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8104 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8105 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8106 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8107 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8108 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8109 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8110 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8111 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8112 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8113 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8114 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8115 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8116 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8117 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8118 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8119 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8120 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8121 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8122 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8123 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8124 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8125 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8126 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8127 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8128 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8129 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8130 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8131 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8132 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8133 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8134 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8135 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8136 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8137 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8138 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8139 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8140 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8141 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8142 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8143 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8144 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8145 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8146 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8147 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8148 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8149 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8150 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8151 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8152 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8153 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8154 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8155 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8156 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8157 "\x2B\xC2\x59",
8158 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008159 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8160 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8161 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8162 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8163 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8164 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8165 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8166 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008167 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8168 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8169 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8170 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8171 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8172 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8173 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8174 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8175 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8176 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8177 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8178 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8179 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8180 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8181 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8182 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8183 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8184 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8185 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8186 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8187 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8188 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8189 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8190 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8191 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8192 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8193 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8194 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8195 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8196 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8197 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8198 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8199 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8200 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8201 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8202 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8203 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8204 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8205 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8206 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8207 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8208 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8209 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8210 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8211 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8212 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8213 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8214 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8215 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8216 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8217 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8218 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8219 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8220 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8221 "\x6C\x82\x9D",
8222 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008223 .also_non_np = 1,
8224 .np = 2,
8225 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03008226 },
8227};
8228
8229static struct cipher_testvec tf_ctr_dec_tv_template[] = {
8230 { /* Generated with Crypto++ */
8231 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8232 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8233 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8234 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8235 .klen = 32,
8236 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8237 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8238 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8239 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8240 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8241 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8242 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8243 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8244 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008245 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8246 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8247 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8248 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8249 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8250 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8251 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8252 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8253 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8254 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8255 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8256 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8257 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8258 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8259 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8260 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8261 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8262 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8263 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8264 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8265 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8266 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8267 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8268 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8269 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8270 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8271 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8272 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8273 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8274 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8275 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8276 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8277 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8278 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8279 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8280 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8281 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8282 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8283 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8284 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8285 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8286 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8287 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8288 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8289 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8290 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8291 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8292 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8293 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8294 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8295 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8296 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8297 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8298 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8299 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
8300 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008301 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8302 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8303 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8304 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8305 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8306 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8307 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008308 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8309 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8310 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8311 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8312 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8313 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8314 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8315 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8316 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8317 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8318 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8319 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8320 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8321 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8322 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8323 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8324 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8325 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8326 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8327 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8328 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8329 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8330 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8331 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8332 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8333 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8334 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8335 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8336 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8337 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8338 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8339 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8340 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8341 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8342 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8343 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8344 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8345 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8346 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8347 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8348 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8349 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8350 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8351 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8352 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8353 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8354 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8355 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8356 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8357 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8358 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8359 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8360 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8361 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8362 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8363 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008364 }, { /* Generated with Crypto++ */
8365 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8366 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8367 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8368 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8369 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03008370 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
8371 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
8372 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8373 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8374 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8375 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8376 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8377 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8378 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8379 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8380 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8381 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8382 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8383 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8384 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8385 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8386 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8387 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8388 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8389 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8390 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8391 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8392 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8393 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8394 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8395 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8396 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8397 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8398 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8399 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8400 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8401 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8402 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8403 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8404 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8405 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8406 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8407 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8408 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8409 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8410 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8411 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8412 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8413 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8414 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8415 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8416 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8417 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8418 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8419 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8420 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8421 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8422 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8423 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8424 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8425 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8426 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8427 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8428 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8429 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8430 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8431 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8432 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8433 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8434 .ilen = 496,
8435 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8436 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8437 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8438 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8439 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8440 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8441 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8442 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8443 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8444 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8445 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8446 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8447 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8448 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8449 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8450 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8451 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8452 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8453 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8454 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8455 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8456 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8457 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8458 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8459 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8460 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8461 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8462 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8463 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8464 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8465 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8466 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8467 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8468 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8469 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8470 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8471 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8472 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8473 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8474 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8475 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8476 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8477 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8478 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8479 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8480 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8481 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8482 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8483 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8484 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8485 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8486 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8487 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8488 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8489 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8490 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8491 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8492 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8493 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8494 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8495 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8496 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8497 .rlen = 496,
8498 }, { /* Generated with Crypto++ */
8499 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8500 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8501 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8502 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8503 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008504 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8505 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8506 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8507 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8508 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8509 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8510 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8511 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8512 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8513 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008514 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8515 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8516 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8517 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8518 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8519 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8520 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8521 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8522 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8523 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8524 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8525 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8526 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8527 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8528 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8529 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8530 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8531 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8532 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8533 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8534 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8535 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8536 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8537 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8538 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8539 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8540 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8541 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8542 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8543 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8544 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8545 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8546 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8547 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8548 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8549 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8550 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8551 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8552 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8553 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8554 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8555 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8556 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8557 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8558 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8559 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8560 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8561 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8562 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8563 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8564 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8565 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8566 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8567 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8568 "\x6C\x82\x9D",
8569 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008570 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8571 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8572 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8573 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8574 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8575 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8576 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8577 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008578 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8579 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8580 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8581 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8582 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8583 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8584 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8585 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8586 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8587 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8588 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8589 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8590 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8591 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8592 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8593 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8594 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8595 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8596 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8597 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8598 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8599 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8600 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8601 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8602 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8603 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8604 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8605 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8606 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8607 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8608 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8609 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8610 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8611 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8612 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8613 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8614 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8615 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8616 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8617 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8618 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8619 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8620 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8621 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8622 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8623 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8624 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8625 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8626 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8627 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8628 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8629 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8630 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8631 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8632 "\x2B\xC2\x59",
8633 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008634 .also_non_np = 1,
8635 .np = 2,
8636 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008637 },
8638};
8639
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008640static struct cipher_testvec tf_lrw_enc_tv_template[] = {
8641 /* Generated from AES-LRW test vectors */
8642 {
8643 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8644 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8645 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8646 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8647 .klen = 32,
8648 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8649 "\x00\x00\x00\x00\x00\x00\x00\x01",
8650 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8651 "\x38\x39\x41\x42\x43\x44\x45\x46",
8652 .ilen = 16,
8653 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8654 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8655 .rlen = 16,
8656 }, {
8657 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8658 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8659 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8660 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8661 .klen = 32,
8662 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8663 "\x00\x00\x00\x00\x00\x00\x00\x02",
8664 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8665 "\x38\x39\x41\x42\x43\x44\x45\x46",
8666 .ilen = 16,
8667 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8668 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8669 .rlen = 16,
8670 }, {
8671 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8672 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8673 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8674 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8675 .klen = 32,
8676 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8677 "\x00\x00\x00\x02\x00\x00\x00\x00",
8678 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8679 "\x38\x39\x41\x42\x43\x44\x45\x46",
8680 .ilen = 16,
8681 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8682 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8683 .rlen = 16,
8684 }, {
8685 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8686 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8687 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8688 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8689 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8690 .klen = 40,
8691 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8692 "\x00\x00\x00\x00\x00\x00\x00\x01",
8693 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8694 "\x38\x39\x41\x42\x43\x44\x45\x46",
8695 .ilen = 16,
8696 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8697 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8698 .rlen = 16,
8699 }, {
8700 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8701 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8702 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8703 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8704 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8705 .klen = 40,
8706 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8707 "\x00\x00\x00\x02\x00\x00\x00\x00",
8708 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8709 "\x38\x39\x41\x42\x43\x44\x45\x46",
8710 .ilen = 16,
8711 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8712 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8713 .rlen = 16,
8714 }, {
8715 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8716 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8717 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8718 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8719 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8720 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8721 .klen = 48,
8722 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8723 "\x00\x00\x00\x00\x00\x00\x00\x01",
8724 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8725 "\x38\x39\x41\x42\x43\x44\x45\x46",
8726 .ilen = 16,
8727 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8728 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8729 .rlen = 16,
8730 }, {
8731 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8732 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8733 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8734 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8735 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8736 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8737 .klen = 48,
8738 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8739 "\x00\x00\x00\x02\x00\x00\x00\x00",
8740 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8741 "\x38\x39\x41\x42\x43\x44\x45\x46",
8742 .ilen = 16,
8743 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8744 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8745 .rlen = 16,
8746 }, {
8747 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8748 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8749 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8750 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8751 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8752 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8753 .klen = 48,
8754 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8755 "\x00\x00\x00\x00\x00\x00\x00\x01",
8756 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8757 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8758 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8759 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8760 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8761 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8762 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8763 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8764 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8765 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8766 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8767 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8768 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8769 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8770 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8771 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8772 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8773 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8774 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8775 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8776 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8777 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8778 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8779 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8780 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8781 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8782 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8783 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8784 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8785 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8786 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8787 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8788 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8789 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8790 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8791 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8792 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8793 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8794 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8795 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8796 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8797 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8798 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8799 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8800 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8801 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8802 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8803 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8804 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8805 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8806 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8807 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8808 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8809 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8810 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8811 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8812 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8813 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8814 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8815 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8816 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8817 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8818 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8819 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8820 .ilen = 512,
8821 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8822 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8823 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8824 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8825 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8826 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8827 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
8828 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
8829 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
8830 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
8831 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
8832 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
8833 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
8834 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
8835 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
8836 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
8837 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
8838 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
8839 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
8840 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
8841 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
8842 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
8843 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
8844 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
8845 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
8846 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
8847 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
8848 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
8849 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
8850 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
8851 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
8852 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
8853 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
8854 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
8855 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
8856 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
8857 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
8858 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
8859 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
8860 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
8861 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
8862 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
8863 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
8864 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
8865 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
8866 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
8867 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
8868 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
8869 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
8870 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
8871 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
8872 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
8873 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
8874 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
8875 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
8876 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
8877 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
8878 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
8879 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
8880 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
8881 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
8882 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
8883 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
8884 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
8885 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008886 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02008887 .np = 3,
8888 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008889 },
8890};
8891
8892static struct cipher_testvec tf_lrw_dec_tv_template[] = {
8893 /* Generated from AES-LRW test vectors */
8894 /* same as enc vectors with input and result reversed */
8895 {
8896 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8897 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8898 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8899 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8900 .klen = 32,
8901 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8902 "\x00\x00\x00\x00\x00\x00\x00\x01",
8903 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8904 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8905 .ilen = 16,
8906 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8907 "\x38\x39\x41\x42\x43\x44\x45\x46",
8908 .rlen = 16,
8909 }, {
8910 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8911 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8912 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8913 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8914 .klen = 32,
8915 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8916 "\x00\x00\x00\x00\x00\x00\x00\x02",
8917 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8918 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8919 .ilen = 16,
8920 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8921 "\x38\x39\x41\x42\x43\x44\x45\x46",
8922 .rlen = 16,
8923 }, {
8924 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8925 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8926 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8927 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8928 .klen = 32,
8929 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8930 "\x00\x00\x00\x02\x00\x00\x00\x00",
8931 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8932 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8933 .ilen = 16,
8934 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8935 "\x38\x39\x41\x42\x43\x44\x45\x46",
8936 .rlen = 16,
8937 }, {
8938 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8939 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8940 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8941 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8942 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8943 .klen = 40,
8944 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8945 "\x00\x00\x00\x00\x00\x00\x00\x01",
8946 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8947 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8948 .ilen = 16,
8949 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8950 "\x38\x39\x41\x42\x43\x44\x45\x46",
8951 .rlen = 16,
8952 }, {
8953 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8954 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8955 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8956 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8957 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8958 .klen = 40,
8959 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8960 "\x00\x00\x00\x02\x00\x00\x00\x00",
8961 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8962 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8963 .ilen = 16,
8964 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8965 "\x38\x39\x41\x42\x43\x44\x45\x46",
8966 .rlen = 16,
8967 }, {
8968 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8969 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8970 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8971 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8972 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8973 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8974 .klen = 48,
8975 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8976 "\x00\x00\x00\x00\x00\x00\x00\x01",
8977 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8978 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8979 .ilen = 16,
8980 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8981 "\x38\x39\x41\x42\x43\x44\x45\x46",
8982 .rlen = 16,
8983 }, {
8984 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8985 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8986 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8987 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8988 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8989 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8990 .klen = 48,
8991 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8992 "\x00\x00\x00\x02\x00\x00\x00\x00",
8993 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8994 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8995 .ilen = 16,
8996 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8997 "\x38\x39\x41\x42\x43\x44\x45\x46",
8998 .rlen = 16,
8999 }, {
9000 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9001 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9002 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9003 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9004 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9005 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9006 .klen = 48,
9007 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9008 "\x00\x00\x00\x00\x00\x00\x00\x01",
9009 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
9010 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
9011 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
9012 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
9013 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
9014 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
9015 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
9016 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
9017 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
9018 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
9019 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
9020 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
9021 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
9022 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
9023 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
9024 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
9025 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
9026 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
9027 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
9028 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
9029 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
9030 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
9031 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
9032 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
9033 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
9034 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
9035 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
9036 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
9037 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
9038 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
9039 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
9040 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
9041 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
9042 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
9043 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
9044 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
9045 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
9046 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
9047 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
9048 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
9049 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
9050 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
9051 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
9052 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
9053 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
9054 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
9055 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
9056 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
9057 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
9058 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
9059 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
9060 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
9061 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
9062 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
9063 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
9064 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
9065 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
9066 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
9067 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
9068 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
9069 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
9070 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
9071 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
9072 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
9073 .ilen = 512,
9074 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
9075 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
9076 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
9077 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
9078 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
9079 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
9080 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
9081 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
9082 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
9083 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
9084 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
9085 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
9086 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
9087 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
9088 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
9089 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
9090 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
9091 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
9092 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
9093 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
9094 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
9095 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
9096 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
9097 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
9098 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
9099 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
9100 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
9101 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
9102 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
9103 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
9104 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
9105 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
9106 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
9107 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
9108 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
9109 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
9110 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
9111 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
9112 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
9113 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
9114 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
9115 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
9116 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
9117 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9118 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9119 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9120 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9121 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9122 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9123 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9124 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9125 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9126 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9127 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9128 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9129 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9130 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9131 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9132 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9133 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9134 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9135 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9136 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9137 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9138 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009139 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009140 .np = 3,
9141 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03009142 },
9143};
9144
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009145static struct cipher_testvec tf_xts_enc_tv_template[] = {
9146 /* Generated from AES-XTS test vectors */
9147{
9148 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9149 "\x00\x00\x00\x00\x00\x00\x00\x00"
9150 "\x00\x00\x00\x00\x00\x00\x00\x00"
9151 "\x00\x00\x00\x00\x00\x00\x00\x00",
9152 .klen = 32,
9153 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9154 "\x00\x00\x00\x00\x00\x00\x00\x00",
9155 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9156 "\x00\x00\x00\x00\x00\x00\x00\x00"
9157 "\x00\x00\x00\x00\x00\x00\x00\x00"
9158 "\x00\x00\x00\x00\x00\x00\x00\x00",
9159 .ilen = 32,
9160 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9161 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9162 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9163 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9164 .rlen = 32,
9165 }, {
9166 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9167 "\x11\x11\x11\x11\x11\x11\x11\x11"
9168 "\x22\x22\x22\x22\x22\x22\x22\x22"
9169 "\x22\x22\x22\x22\x22\x22\x22\x22",
9170 .klen = 32,
9171 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9172 "\x00\x00\x00\x00\x00\x00\x00\x00",
9173 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
9174 "\x44\x44\x44\x44\x44\x44\x44\x44"
9175 "\x44\x44\x44\x44\x44\x44\x44\x44"
9176 "\x44\x44\x44\x44\x44\x44\x44\x44",
9177 .ilen = 32,
9178 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9179 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9180 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9181 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9182 .rlen = 32,
9183 }, {
9184 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9185 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9186 "\x22\x22\x22\x22\x22\x22\x22\x22"
9187 "\x22\x22\x22\x22\x22\x22\x22\x22",
9188 .klen = 32,
9189 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9190 "\x00\x00\x00\x00\x00\x00\x00\x00",
9191 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
9192 "\x44\x44\x44\x44\x44\x44\x44\x44"
9193 "\x44\x44\x44\x44\x44\x44\x44\x44"
9194 "\x44\x44\x44\x44\x44\x44\x44\x44",
9195 .ilen = 32,
9196 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9197 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9198 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9199 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9200 .rlen = 32,
9201 }, {
9202 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9203 "\x23\x53\x60\x28\x74\x71\x35\x26"
9204 "\x31\x41\x59\x26\x53\x58\x97\x93"
9205 "\x23\x84\x62\x64\x33\x83\x27\x95",
9206 .klen = 32,
9207 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9208 "\x00\x00\x00\x00\x00\x00\x00\x00",
9209 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9210 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9211 "\x10\x11\x12\x13\x14\x15\x16\x17"
9212 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9213 "\x20\x21\x22\x23\x24\x25\x26\x27"
9214 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9215 "\x30\x31\x32\x33\x34\x35\x36\x37"
9216 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9217 "\x40\x41\x42\x43\x44\x45\x46\x47"
9218 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9219 "\x50\x51\x52\x53\x54\x55\x56\x57"
9220 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9221 "\x60\x61\x62\x63\x64\x65\x66\x67"
9222 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9223 "\x70\x71\x72\x73\x74\x75\x76\x77"
9224 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9225 "\x80\x81\x82\x83\x84\x85\x86\x87"
9226 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9227 "\x90\x91\x92\x93\x94\x95\x96\x97"
9228 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9229 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9230 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9231 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9232 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9233 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9234 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9235 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9236 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9237 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9238 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9239 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9240 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9241 "\x00\x01\x02\x03\x04\x05\x06\x07"
9242 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9243 "\x10\x11\x12\x13\x14\x15\x16\x17"
9244 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9245 "\x20\x21\x22\x23\x24\x25\x26\x27"
9246 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9247 "\x30\x31\x32\x33\x34\x35\x36\x37"
9248 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9249 "\x40\x41\x42\x43\x44\x45\x46\x47"
9250 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9251 "\x50\x51\x52\x53\x54\x55\x56\x57"
9252 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9253 "\x60\x61\x62\x63\x64\x65\x66\x67"
9254 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9255 "\x70\x71\x72\x73\x74\x75\x76\x77"
9256 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9257 "\x80\x81\x82\x83\x84\x85\x86\x87"
9258 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9259 "\x90\x91\x92\x93\x94\x95\x96\x97"
9260 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9261 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9262 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9263 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9264 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9265 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9266 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9267 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9268 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9269 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9270 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9271 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9272 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9273 .ilen = 512,
9274 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9275 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9276 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9277 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9278 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9279 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9280 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9281 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9282 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9283 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9284 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9285 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9286 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9287 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9288 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9289 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9290 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9291 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9292 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9293 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9294 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9295 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9296 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9297 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9298 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9299 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9300 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9301 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9302 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9303 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9304 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9305 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9306 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9307 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9308 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9309 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9310 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9311 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9312 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9313 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9314 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9315 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9316 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9317 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9318 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9319 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9320 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9321 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9322 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9323 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9324 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9325 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9326 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9327 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9328 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9329 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9330 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9331 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9332 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9333 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9334 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9335 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9336 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9337 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9338 .rlen = 512,
9339 }, {
9340 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9341 "\x23\x53\x60\x28\x74\x71\x35\x26"
9342 "\x62\x49\x77\x57\x24\x70\x93\x69"
9343 "\x99\x59\x57\x49\x66\x96\x76\x27"
9344 "\x31\x41\x59\x26\x53\x58\x97\x93"
9345 "\x23\x84\x62\x64\x33\x83\x27\x95"
9346 "\x02\x88\x41\x97\x16\x93\x99\x37"
9347 "\x51\x05\x82\x09\x74\x94\x45\x92",
9348 .klen = 64,
9349 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9350 "\x00\x00\x00\x00\x00\x00\x00\x00",
9351 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9352 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9353 "\x10\x11\x12\x13\x14\x15\x16\x17"
9354 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9355 "\x20\x21\x22\x23\x24\x25\x26\x27"
9356 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9357 "\x30\x31\x32\x33\x34\x35\x36\x37"
9358 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9359 "\x40\x41\x42\x43\x44\x45\x46\x47"
9360 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9361 "\x50\x51\x52\x53\x54\x55\x56\x57"
9362 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9363 "\x60\x61\x62\x63\x64\x65\x66\x67"
9364 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9365 "\x70\x71\x72\x73\x74\x75\x76\x77"
9366 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9367 "\x80\x81\x82\x83\x84\x85\x86\x87"
9368 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9369 "\x90\x91\x92\x93\x94\x95\x96\x97"
9370 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9371 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9372 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9373 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9374 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9375 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9376 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9377 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9378 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9379 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9380 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9381 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9382 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9383 "\x00\x01\x02\x03\x04\x05\x06\x07"
9384 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9385 "\x10\x11\x12\x13\x14\x15\x16\x17"
9386 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9387 "\x20\x21\x22\x23\x24\x25\x26\x27"
9388 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9389 "\x30\x31\x32\x33\x34\x35\x36\x37"
9390 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9391 "\x40\x41\x42\x43\x44\x45\x46\x47"
9392 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9393 "\x50\x51\x52\x53\x54\x55\x56\x57"
9394 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9395 "\x60\x61\x62\x63\x64\x65\x66\x67"
9396 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9397 "\x70\x71\x72\x73\x74\x75\x76\x77"
9398 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9399 "\x80\x81\x82\x83\x84\x85\x86\x87"
9400 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9401 "\x90\x91\x92\x93\x94\x95\x96\x97"
9402 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9403 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9404 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9405 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9406 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9407 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9408 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9409 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9410 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9411 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9412 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9413 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9414 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9415 .ilen = 512,
9416 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9417 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9418 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9419 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9420 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9421 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9422 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9423 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9424 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9425 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9426 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9427 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9428 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9429 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9430 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9431 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9432 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9433 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9434 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9435 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9436 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9437 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9438 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9439 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9440 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9441 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9442 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9443 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9444 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9445 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9446 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9447 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9448 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9449 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9450 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9451 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9452 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9453 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9454 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9455 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9456 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9457 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9458 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9459 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9460 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9461 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9462 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9463 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9464 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9465 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9466 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9467 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9468 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9469 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9470 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9471 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9472 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9473 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9474 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9475 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9476 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9477 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9478 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9479 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9480 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009481 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009482 .np = 3,
9483 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009484 },
9485};
9486
9487static struct cipher_testvec tf_xts_dec_tv_template[] = {
9488 /* Generated from AES-XTS test vectors */
9489 /* same as enc vectors with input and result reversed */
9490 {
9491 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9492 "\x00\x00\x00\x00\x00\x00\x00\x00"
9493 "\x00\x00\x00\x00\x00\x00\x00\x00"
9494 "\x00\x00\x00\x00\x00\x00\x00\x00",
9495 .klen = 32,
9496 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9497 "\x00\x00\x00\x00\x00\x00\x00\x00",
9498 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9499 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9500 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9501 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9502 .ilen = 32,
9503 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
9504 "\x00\x00\x00\x00\x00\x00\x00\x00"
9505 "\x00\x00\x00\x00\x00\x00\x00\x00"
9506 "\x00\x00\x00\x00\x00\x00\x00\x00",
9507 .rlen = 32,
9508 }, {
9509 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9510 "\x11\x11\x11\x11\x11\x11\x11\x11"
9511 "\x22\x22\x22\x22\x22\x22\x22\x22"
9512 "\x22\x22\x22\x22\x22\x22\x22\x22",
9513 .klen = 32,
9514 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9515 "\x00\x00\x00\x00\x00\x00\x00\x00",
9516 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9517 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9518 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9519 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9520 .ilen = 32,
9521 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9522 "\x44\x44\x44\x44\x44\x44\x44\x44"
9523 "\x44\x44\x44\x44\x44\x44\x44\x44"
9524 "\x44\x44\x44\x44\x44\x44\x44\x44",
9525 .rlen = 32,
9526 }, {
9527 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9528 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9529 "\x22\x22\x22\x22\x22\x22\x22\x22"
9530 "\x22\x22\x22\x22\x22\x22\x22\x22",
9531 .klen = 32,
9532 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9533 "\x00\x00\x00\x00\x00\x00\x00\x00",
9534 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9535 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9536 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9537 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9538 .ilen = 32,
9539 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9540 "\x44\x44\x44\x44\x44\x44\x44\x44"
9541 "\x44\x44\x44\x44\x44\x44\x44\x44"
9542 "\x44\x44\x44\x44\x44\x44\x44\x44",
9543 .rlen = 32,
9544 }, {
9545 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9546 "\x23\x53\x60\x28\x74\x71\x35\x26"
9547 "\x31\x41\x59\x26\x53\x58\x97\x93"
9548 "\x23\x84\x62\x64\x33\x83\x27\x95",
9549 .klen = 32,
9550 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9551 "\x00\x00\x00\x00\x00\x00\x00\x00",
9552 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9553 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9554 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9555 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9556 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9557 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9558 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9559 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9560 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9561 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9562 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9563 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9564 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9565 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9566 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9567 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9568 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9569 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9570 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9571 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9572 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9573 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9574 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9575 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9576 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9577 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9578 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9579 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9580 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9581 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9582 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9583 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9584 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9585 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9586 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9587 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9588 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9589 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9590 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9591 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9592 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9593 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9594 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9595 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9596 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9597 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9598 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9599 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9600 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9601 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9602 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9603 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9604 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9605 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9606 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9607 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9608 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9609 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9610 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9611 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9612 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9613 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9614 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9615 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9616 .ilen = 512,
9617 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9618 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9619 "\x10\x11\x12\x13\x14\x15\x16\x17"
9620 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9621 "\x20\x21\x22\x23\x24\x25\x26\x27"
9622 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9623 "\x30\x31\x32\x33\x34\x35\x36\x37"
9624 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9625 "\x40\x41\x42\x43\x44\x45\x46\x47"
9626 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9627 "\x50\x51\x52\x53\x54\x55\x56\x57"
9628 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9629 "\x60\x61\x62\x63\x64\x65\x66\x67"
9630 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9631 "\x70\x71\x72\x73\x74\x75\x76\x77"
9632 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9633 "\x80\x81\x82\x83\x84\x85\x86\x87"
9634 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9635 "\x90\x91\x92\x93\x94\x95\x96\x97"
9636 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9637 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9638 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9639 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9640 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9641 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9642 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9643 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9644 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9645 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9646 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9647 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9648 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9649 "\x00\x01\x02\x03\x04\x05\x06\x07"
9650 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9651 "\x10\x11\x12\x13\x14\x15\x16\x17"
9652 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9653 "\x20\x21\x22\x23\x24\x25\x26\x27"
9654 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9655 "\x30\x31\x32\x33\x34\x35\x36\x37"
9656 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9657 "\x40\x41\x42\x43\x44\x45\x46\x47"
9658 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9659 "\x50\x51\x52\x53\x54\x55\x56\x57"
9660 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9661 "\x60\x61\x62\x63\x64\x65\x66\x67"
9662 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9663 "\x70\x71\x72\x73\x74\x75\x76\x77"
9664 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9665 "\x80\x81\x82\x83\x84\x85\x86\x87"
9666 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9667 "\x90\x91\x92\x93\x94\x95\x96\x97"
9668 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9669 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9670 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9671 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9672 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9673 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9674 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9675 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9676 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9677 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9678 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9679 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9680 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9681 .rlen = 512,
9682 }, {
9683 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9684 "\x23\x53\x60\x28\x74\x71\x35\x26"
9685 "\x62\x49\x77\x57\x24\x70\x93\x69"
9686 "\x99\x59\x57\x49\x66\x96\x76\x27"
9687 "\x31\x41\x59\x26\x53\x58\x97\x93"
9688 "\x23\x84\x62\x64\x33\x83\x27\x95"
9689 "\x02\x88\x41\x97\x16\x93\x99\x37"
9690 "\x51\x05\x82\x09\x74\x94\x45\x92",
9691 .klen = 64,
9692 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9693 "\x00\x00\x00\x00\x00\x00\x00\x00",
9694 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9695 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9696 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9697 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9698 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9699 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9700 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9701 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9702 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9703 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9704 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9705 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9706 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9707 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9708 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9709 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9710 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9711 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9712 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9713 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9714 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9715 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9716 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9717 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9718 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9719 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9720 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9721 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9722 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9723 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9724 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9725 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9726 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9727 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9728 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9729 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9730 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9731 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9732 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9733 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9734 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9735 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9736 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9737 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9738 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9739 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9740 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9741 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9742 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9743 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9744 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9745 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9746 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9747 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9748 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9749 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9750 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9751 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9752 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9753 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9754 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9755 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9756 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9757 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9758 .ilen = 512,
9759 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9760 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9761 "\x10\x11\x12\x13\x14\x15\x16\x17"
9762 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9763 "\x20\x21\x22\x23\x24\x25\x26\x27"
9764 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9765 "\x30\x31\x32\x33\x34\x35\x36\x37"
9766 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9767 "\x40\x41\x42\x43\x44\x45\x46\x47"
9768 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9769 "\x50\x51\x52\x53\x54\x55\x56\x57"
9770 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9771 "\x60\x61\x62\x63\x64\x65\x66\x67"
9772 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9773 "\x70\x71\x72\x73\x74\x75\x76\x77"
9774 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9775 "\x80\x81\x82\x83\x84\x85\x86\x87"
9776 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9777 "\x90\x91\x92\x93\x94\x95\x96\x97"
9778 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9779 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9780 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9781 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9782 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9783 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9784 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9785 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9786 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9787 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9788 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9789 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9790 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9791 "\x00\x01\x02\x03\x04\x05\x06\x07"
9792 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9793 "\x10\x11\x12\x13\x14\x15\x16\x17"
9794 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9795 "\x20\x21\x22\x23\x24\x25\x26\x27"
9796 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9797 "\x30\x31\x32\x33\x34\x35\x36\x37"
9798 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9799 "\x40\x41\x42\x43\x44\x45\x46\x47"
9800 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9801 "\x50\x51\x52\x53\x54\x55\x56\x57"
9802 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9803 "\x60\x61\x62\x63\x64\x65\x66\x67"
9804 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9805 "\x70\x71\x72\x73\x74\x75\x76\x77"
9806 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9807 "\x80\x81\x82\x83\x84\x85\x86\x87"
9808 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9809 "\x90\x91\x92\x93\x94\x95\x96\x97"
9810 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9811 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9812 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9813 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9814 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9815 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9816 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9817 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9818 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9819 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9820 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9821 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9822 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9823 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009824 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009825 .np = 3,
9826 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009827 },
9828};
9829
Herbert Xuda7f0332008-07-31 17:08:25 +08009830/*
9831 * Serpent test vectors. These are backwards because Serpent writes
9832 * octet sequences in right-to-left mode.
9833 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009834#define SERPENT_ENC_TEST_VECTORS 5
9835#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08009836
9837#define TNEPRES_ENC_TEST_VECTORS 4
9838#define TNEPRES_DEC_TEST_VECTORS 4
9839
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009840#define SERPENT_CBC_ENC_TEST_VECTORS 1
9841#define SERPENT_CBC_DEC_TEST_VECTORS 1
9842
9843#define SERPENT_CTR_ENC_TEST_VECTORS 2
9844#define SERPENT_CTR_DEC_TEST_VECTORS 2
9845
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03009846#define SERPENT_LRW_ENC_TEST_VECTORS 8
9847#define SERPENT_LRW_DEC_TEST_VECTORS 8
9848
Jussi Kivilinna18be20b2011-10-18 13:33:17 +03009849#define SERPENT_XTS_ENC_TEST_VECTORS 5
9850#define SERPENT_XTS_DEC_TEST_VECTORS 5
9851
Herbert Xuda7f0332008-07-31 17:08:25 +08009852static struct cipher_testvec serpent_enc_tv_template[] = {
9853 {
9854 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9855 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9856 .ilen = 16,
9857 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
9858 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
9859 .rlen = 16,
9860 }, {
9861 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9862 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9863 .klen = 16,
9864 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9865 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9866 .ilen = 16,
9867 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
9868 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
9869 .rlen = 16,
9870 }, {
9871 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9872 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9873 "\x10\x11\x12\x13\x14\x15\x16\x17"
9874 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9875 .klen = 32,
9876 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9877 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9878 .ilen = 16,
9879 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
9880 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
9881 .rlen = 16,
9882 }, {
9883 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
9884 .klen = 16,
9885 .input = zeroed_string,
9886 .ilen = 16,
9887 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
9888 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
9889 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009890 }, { /* Generated with Crypto++ */
9891 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9892 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9893 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9894 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9895 .klen = 32,
9896 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9897 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9898 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9899 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9900 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9901 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9902 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9903 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9904 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9905 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9906 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9907 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9908 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9909 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9910 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9911 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9912 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009913 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9914 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9915 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9916 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9917 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9918 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9919 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9920 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9921 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9922 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9923 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9924 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9925 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9926 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9927 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9928 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9929 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9930 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9931 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9932 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9933 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9934 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9935 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9936 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9937 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9938 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9939 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9940 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9941 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9942 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9943 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9944 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9945 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9946 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9947 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9948 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9949 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9950 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9951 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9952 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9953 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9954 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9955 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9956 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9957 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9958 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009959 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
9960 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
9961 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
9962 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
9963 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
9964 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
9965 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
9966 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
9967 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
9968 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
9969 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
9970 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
9971 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
9972 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
9973 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
9974 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
9975 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009976 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
9977 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
9978 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
9979 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
9980 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
9981 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
9982 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
9983 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
9984 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
9985 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
9986 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
9987 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
9988 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
9989 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
9990 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
9991 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
9992 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
9993 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
9994 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
9995 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
9996 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
9997 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
9998 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
9999 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
10000 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
10001 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
10002 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
10003 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
10004 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
10005 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
10006 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
10007 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
10008 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
10009 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
10010 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
10011 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
10012 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
10013 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
10014 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
10015 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
10016 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
10017 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
10018 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
10019 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10020 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10021 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010022 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010023 .np = 3,
10024 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010025 },
10026};
10027
10028static struct cipher_testvec tnepres_enc_tv_template[] = {
10029 { /* KeySize=128, PT=0, I=1 */
10030 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10031 "\x00\x00\x00\x00\x00\x00\x00\x00",
10032 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10033 "\x00\x00\x00\x00\x00\x00\x00\x00",
10034 .klen = 16,
10035 .ilen = 16,
10036 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
10037 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
10038 .rlen = 16,
10039 }, { /* KeySize=192, PT=0, I=1 */
10040 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10041 "\x00\x00\x00\x00\x00\x00\x00\x00"
10042 "\x00\x00\x00\x00\x00\x00\x00\x00",
10043 .klen = 24,
10044 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10045 "\x00\x00\x00\x00\x00\x00\x00\x00",
10046 .ilen = 16,
10047 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
10048 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
10049 .rlen = 16,
10050 }, { /* KeySize=256, PT=0, I=1 */
10051 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10052 "\x00\x00\x00\x00\x00\x00\x00\x00"
10053 "\x00\x00\x00\x00\x00\x00\x00\x00"
10054 "\x00\x00\x00\x00\x00\x00\x00\x00",
10055 .klen = 32,
10056 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10057 "\x00\x00\x00\x00\x00\x00\x00\x00",
10058 .ilen = 16,
10059 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
10060 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
10061 .rlen = 16,
10062 }, { /* KeySize=256, I=257 */
10063 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
10064 "\x17\x16\x15\x14\x13\x12\x11\x10"
10065 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
10066 "\x07\x06\x05\x04\x03\x02\x01\x00",
10067 .klen = 32,
10068 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
10069 "\x07\x06\x05\x04\x03\x02\x01\x00",
10070 .ilen = 16,
10071 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
10072 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
10073 .rlen = 16,
10074 },
10075};
10076
10077
10078static struct cipher_testvec serpent_dec_tv_template[] = {
10079 {
10080 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
10081 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
10082 .ilen = 16,
10083 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10084 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10085 .rlen = 16,
10086 }, {
10087 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10088 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10089 .klen = 16,
10090 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
10091 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
10092 .ilen = 16,
10093 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10094 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10095 .rlen = 16,
10096 }, {
10097 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10098 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10099 "\x10\x11\x12\x13\x14\x15\x16\x17"
10100 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10101 .klen = 32,
10102 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
10103 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
10104 .ilen = 16,
10105 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10106 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10107 .rlen = 16,
10108 }, {
10109 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10110 .klen = 16,
10111 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
10112 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
10113 .ilen = 16,
10114 .result = zeroed_string,
10115 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010116 }, { /* Generated with Crypto++ */
10117 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10118 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10119 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10120 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10121 .klen = 32,
10122 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
10123 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
10124 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
10125 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
10126 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
10127 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
10128 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
10129 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
10130 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
10131 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
10132 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
10133 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
10134 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
10135 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
10136 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
10137 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
10138 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010139 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
10140 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
10141 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
10142 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
10143 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
10144 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
10145 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
10146 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
10147 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
10148 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
10149 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
10150 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
10151 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
10152 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
10153 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
10154 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
10155 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
10156 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
10157 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
10158 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
10159 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
10160 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
10161 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
10162 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
10163 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
10164 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
10165 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
10166 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
10167 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
10168 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
10169 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
10170 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
10171 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
10172 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
10173 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
10174 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
10175 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
10176 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
10177 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
10178 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
10179 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
10180 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
10181 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
10182 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10183 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10184 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010185 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10186 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10187 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10188 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10189 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10190 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10191 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10192 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10193 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10194 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10195 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10196 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10197 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10198 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10199 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10200 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10201 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010202 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10203 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10204 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10205 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10206 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10207 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10208 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10209 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10210 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10211 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10212 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10213 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10214 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10215 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10216 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10217 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10218 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10219 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10220 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10221 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10222 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10223 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10224 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10225 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10226 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10227 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10228 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10229 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10230 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10231 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10232 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10233 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10234 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10235 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10236 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10237 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10238 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10239 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10240 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10241 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10242 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10243 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10244 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10245 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10246 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10247 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010248 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010249 .np = 3,
10250 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010251 },
10252};
10253
10254static struct cipher_testvec tnepres_dec_tv_template[] = {
10255 {
10256 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
10257 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
10258 .ilen = 16,
10259 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10260 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10261 .rlen = 16,
10262 }, {
10263 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10264 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10265 .klen = 16,
10266 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
10267 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
10268 .ilen = 16,
10269 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10270 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10271 .rlen = 16,
10272 }, {
10273 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10274 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10275 "\x10\x11\x12\x13\x14\x15\x16\x17"
10276 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10277 .klen = 32,
10278 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
10279 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
10280 .ilen = 16,
10281 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10282 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10283 .rlen = 16,
10284 }, { /* KeySize=128, I=121 */
10285 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10286 .klen = 16,
10287 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
10288 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
10289 .ilen = 16,
10290 .result = zeroed_string,
10291 .rlen = 16,
10292 },
10293};
10294
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010295static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
10296 { /* Generated with Crypto++ */
10297 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10298 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10299 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10300 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10301 .klen = 32,
10302 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10303 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10304 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10305 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10306 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10307 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10308 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10309 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10310 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10311 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10312 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10313 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10314 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10315 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10316 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10317 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10318 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10319 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10320 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010321 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10322 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10323 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10324 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10325 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10326 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10327 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10328 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10329 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10330 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10331 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10332 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10333 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10334 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10335 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10336 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10337 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10338 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10339 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10340 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10341 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10342 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10343 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10344 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10345 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10346 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10347 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10348 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10349 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10350 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10351 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10352 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10353 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10354 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10355 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10356 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10357 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10358 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10359 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10360 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10361 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10362 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10363 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10364 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10365 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10366 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010367 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10368 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10369 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10370 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10371 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10372 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10373 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10374 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10375 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10376 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10377 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10378 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10379 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10380 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10381 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10382 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10383 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010384 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10385 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10386 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10387 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10388 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10389 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10390 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10391 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10392 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10393 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10394 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10395 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10396 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10397 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10398 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10399 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10400 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10401 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10402 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10403 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10404 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10405 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10406 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10407 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10408 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10409 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10410 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10411 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10412 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10413 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10414 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10415 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10416 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10417 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10418 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10419 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10420 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10421 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10422 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10423 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10424 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10425 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10426 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10427 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10428 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10429 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010430 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010431 .np = 3,
10432 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010433 },
10434};
10435
10436static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
10437 { /* Generated with Crypto++ */
10438 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10439 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10440 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10441 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10442 .klen = 32,
10443 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10444 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10445 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10446 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10447 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10448 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10449 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10450 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10451 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10452 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10453 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10454 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10455 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10456 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10457 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10458 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10459 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10460 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10461 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010462 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10463 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10464 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10465 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10466 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10467 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10468 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10469 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10470 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10471 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10472 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10473 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10474 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10475 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10476 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10477 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10478 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10479 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10480 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10481 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10482 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10483 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10484 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10485 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10486 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10487 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10488 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10489 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10490 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10491 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10492 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10493 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10494 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10495 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10496 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10497 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10498 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10499 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10500 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10501 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10502 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10503 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10504 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10505 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10506 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10507 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010508 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10509 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10510 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10511 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10512 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10513 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10514 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10515 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10516 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10517 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10518 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10519 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10520 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10521 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10522 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10523 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10524 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010525 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10526 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10527 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10528 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10529 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10530 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10531 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10532 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10533 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10534 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10535 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10536 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10537 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10538 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10539 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10540 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10541 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10542 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10543 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10544 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10545 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10546 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10547 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10548 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10549 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10550 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10551 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10552 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10553 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10554 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10555 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10556 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10557 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10558 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10559 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10560 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10561 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10562 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10563 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10564 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10565 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10566 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10567 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10568 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10569 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10570 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010571 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010572 .np = 3,
10573 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010574 },
10575};
10576
10577static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
10578 { /* Generated with Crypto++ */
10579 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10580 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10581 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10582 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10583 .klen = 32,
10584 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10585 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10586 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10587 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10588 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10589 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10590 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10591 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10592 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10593 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10594 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10595 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10596 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10597 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10598 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10599 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10600 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10601 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10602 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010603 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10604 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10605 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10606 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10607 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10608 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10609 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10610 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10611 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10612 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10613 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10614 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10615 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10616 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10617 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10618 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10619 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10620 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10621 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10622 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10623 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10624 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10625 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10626 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10627 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10628 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10629 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10630 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10631 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10632 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10633 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10634 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10635 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10636 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10637 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10638 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10639 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10640 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10641 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10642 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10643 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10644 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10645 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10646 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10647 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10648 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010649 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10650 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10651 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10652 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10653 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10654 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10655 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10656 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10657 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10658 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10659 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10660 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10661 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10662 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10663 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10664 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10665 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010666 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10667 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10668 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10669 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10670 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10671 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10672 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10673 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10674 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10675 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10676 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10677 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10678 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10679 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10680 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10681 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10682 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10683 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10684 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10685 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10686 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10687 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10688 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10689 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10690 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10691 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10692 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10693 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10694 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10695 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10696 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10697 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10698 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10699 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10700 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10701 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10702 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10703 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10704 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10705 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10706 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10707 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10708 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10709 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10710 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
10711 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010712 }, { /* Generated with Crypto++ */
10713 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10714 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10715 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10716 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10717 .klen = 32,
10718 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10719 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10720 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10721 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10722 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10723 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10724 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10725 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10726 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10727 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10728 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10729 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10730 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10731 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10732 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10733 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10734 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10735 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10736 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10737 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010738 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10739 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10740 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10741 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10742 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10743 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10744 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10745 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10746 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10747 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10748 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10749 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10750 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10751 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10752 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10753 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10754 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10755 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10756 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10757 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10758 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10759 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10760 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10761 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10762 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10763 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10764 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10765 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10766 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10767 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10768 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10769 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10770 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10771 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10772 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10773 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10774 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10775 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10776 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10777 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10778 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10779 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10780 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10781 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
10782 "\x2B\xC2\x59",
10783 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010784 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10785 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10786 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10787 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10788 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10789 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10790 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10791 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10792 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10793 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10794 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10795 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10796 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10797 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10798 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10799 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10800 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10801 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010802 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10803 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10804 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10805 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10806 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10807 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10808 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10809 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10810 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10811 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10812 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10813 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10814 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10815 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10816 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10817 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10818 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10819 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10820 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10821 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10822 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10823 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10824 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10825 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10826 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10827 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10828 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10829 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10830 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10831 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10832 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10833 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10834 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10835 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10836 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10837 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10838 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10839 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10840 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10841 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10842 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10843 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10844 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10845 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
10846 "\x38\xE2\xE5",
10847 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010848 .also_non_np = 1,
10849 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010850 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030010851 }, { /* Generated with Crypto++ */
10852 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10853 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10854 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10855 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10856 .klen = 32,
10857 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
10858 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
10859 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10860 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10861 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10862 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10863 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10864 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10865 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10866 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10867 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10868 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10869 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10870 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10871 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10872 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10873 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10874 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10875 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10876 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10877 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10878 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10879 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10880 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10881 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10882 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10883 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10884 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10885 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10886 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10887 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10888 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10889 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10890 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10891 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10892 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10893 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10894 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10895 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10896 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10897 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10898 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10899 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10900 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10901 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10902 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10903 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10904 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10905 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10906 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10907 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10908 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10909 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10910 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10911 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10912 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10913 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10914 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10915 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10916 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10917 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10918 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10919 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10920 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10921 .ilen = 496,
10922 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
10923 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
10924 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
10925 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
10926 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
10927 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
10928 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
10929 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
10930 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
10931 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
10932 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
10933 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
10934 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
10935 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
10936 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
10937 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
10938 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
10939 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
10940 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
10941 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
10942 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
10943 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
10944 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
10945 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
10946 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
10947 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
10948 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
10949 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
10950 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
10951 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
10952 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
10953 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
10954 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
10955 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
10956 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
10957 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
10958 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
10959 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
10960 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
10961 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
10962 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
10963 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
10964 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
10965 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
10966 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
10967 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
10968 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
10969 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
10970 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
10971 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
10972 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
10973 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
10974 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
10975 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
10976 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
10977 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
10978 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
10979 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
10980 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
10981 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
10982 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
10983 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
10984 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010985 },
10986};
10987
10988static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
10989 { /* Generated with Crypto++ */
10990 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10991 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10992 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10993 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10994 .klen = 32,
10995 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10996 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10997 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10998 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10999 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
11000 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
11001 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
11002 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
11003 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
11004 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
11005 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
11006 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
11007 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
11008 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
11009 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
11010 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
11011 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
11012 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
11013 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011014 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
11015 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11016 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11017 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11018 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11019 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11020 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11021 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11022 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11023 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11024 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11025 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11026 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11027 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11028 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11029 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11030 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11031 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11032 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11033 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11034 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11035 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11036 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11037 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11038 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11039 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11040 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11041 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11042 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11043 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11044 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11045 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11046 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11047 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11048 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11049 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11050 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11051 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11052 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11053 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11054 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11055 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11056 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11057 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11058 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
11059 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011060 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11061 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11062 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11063 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11064 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11065 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11066 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11067 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11068 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11069 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11070 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11071 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11072 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11073 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11074 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11075 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11076 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011077 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11078 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11079 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11080 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11081 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11082 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11083 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11084 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11085 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11086 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11087 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11088 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11089 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11090 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11091 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11092 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11093 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11094 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11095 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11096 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11097 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11098 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11099 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11100 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11101 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11102 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11103 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11104 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11105 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11106 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11107 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11108 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11109 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11110 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11111 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11112 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11113 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11114 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11115 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11116 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11117 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11118 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11119 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11120 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11121 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11122 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011123 }, { /* Generated with Crypto++ */
11124 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11125 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11126 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11127 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11128 .klen = 32,
11129 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11130 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11131 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
11132 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
11133 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
11134 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
11135 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
11136 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
11137 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
11138 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
11139 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
11140 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
11141 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
11142 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
11143 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
11144 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
11145 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
11146 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
11147 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
11148 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011149 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11150 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11151 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11152 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11153 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11154 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11155 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11156 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11157 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11158 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11159 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11160 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11161 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11162 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11163 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11164 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11165 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11166 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11167 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11168 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11169 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11170 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11171 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11172 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11173 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11174 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11175 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11176 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11177 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11178 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11179 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11180 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11181 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11182 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11183 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11184 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11185 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11186 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11187 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11188 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11189 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11190 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11191 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11192 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
11193 "\x38\xE2\xE5",
11194 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011195 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11196 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11197 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11198 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11199 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11200 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11201 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11202 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11203 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11204 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11205 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11206 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11207 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11208 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11209 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11210 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11211 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11212 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011213 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11214 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11215 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11216 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11217 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11218 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11219 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11220 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11221 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11222 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11223 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11224 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11225 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11226 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11227 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11228 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11229 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11230 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11231 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11232 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11233 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11234 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11235 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11236 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11237 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11238 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11239 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11240 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11241 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11242 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11243 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11244 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11245 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11246 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11247 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11248 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11249 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11250 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11251 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11252 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11253 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11254 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11255 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11256 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
11257 "\x2B\xC2\x59",
11258 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011259 .also_non_np = 1,
11260 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011261 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030011262 }, { /* Generated with Crypto++ */
11263 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11264 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11265 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11266 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11267 .klen = 32,
11268 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
11269 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
11270 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
11271 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
11272 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
11273 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
11274 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
11275 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
11276 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
11277 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
11278 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
11279 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
11280 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
11281 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
11282 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
11283 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
11284 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
11285 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
11286 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
11287 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
11288 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
11289 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
11290 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
11291 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
11292 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
11293 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
11294 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
11295 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
11296 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
11297 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
11298 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
11299 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
11300 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
11301 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
11302 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
11303 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
11304 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
11305 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
11306 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
11307 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
11308 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
11309 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
11310 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
11311 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
11312 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
11313 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
11314 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
11315 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
11316 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
11317 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
11318 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
11319 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
11320 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
11321 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
11322 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
11323 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
11324 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
11325 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
11326 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
11327 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
11328 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
11329 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
11330 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
11331 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
11332 .ilen = 496,
11333 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11334 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11335 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11336 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11337 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11338 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11339 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11340 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11341 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11342 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11343 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11344 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11345 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11346 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11347 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11348 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11349 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11350 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11351 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11352 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11353 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11354 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11355 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11356 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11357 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11358 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11359 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11360 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11361 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11362 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11363 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11364 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11365 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11366 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11367 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11368 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11369 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11370 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11371 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11372 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11373 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11374 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11375 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11376 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11377 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11378 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11379 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11380 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11381 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11382 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11383 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11384 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11385 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11386 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11387 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11388 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11389 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11390 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11391 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11392 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11393 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11394 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11395 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011396 },
11397};
Herbert Xuda7f0332008-07-31 17:08:25 +080011398
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011399static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
11400 /* Generated from AES-LRW test vectors */
11401 {
11402 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11403 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11404 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11405 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11406 .klen = 32,
11407 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11408 "\x00\x00\x00\x00\x00\x00\x00\x01",
11409 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11410 "\x38\x39\x41\x42\x43\x44\x45\x46",
11411 .ilen = 16,
11412 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11413 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11414 .rlen = 16,
11415 }, {
11416 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11417 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11418 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11419 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11420 .klen = 32,
11421 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11422 "\x00\x00\x00\x00\x00\x00\x00\x02",
11423 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11424 "\x38\x39\x41\x42\x43\x44\x45\x46",
11425 .ilen = 16,
11426 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11427 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11428 .rlen = 16,
11429 }, {
11430 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11431 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11432 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11433 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11434 .klen = 32,
11435 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11436 "\x00\x00\x00\x02\x00\x00\x00\x00",
11437 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11438 "\x38\x39\x41\x42\x43\x44\x45\x46",
11439 .ilen = 16,
11440 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11441 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11442 .rlen = 16,
11443 }, {
11444 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11445 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11446 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11447 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11448 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11449 .klen = 40,
11450 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11451 "\x00\x00\x00\x00\x00\x00\x00\x01",
11452 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11453 "\x38\x39\x41\x42\x43\x44\x45\x46",
11454 .ilen = 16,
11455 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11456 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11457 .rlen = 16,
11458 }, {
11459 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11460 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11461 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11462 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11463 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11464 .klen = 40,
11465 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11466 "\x00\x00\x00\x02\x00\x00\x00\x00",
11467 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11468 "\x38\x39\x41\x42\x43\x44\x45\x46",
11469 .ilen = 16,
11470 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11471 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11472 .rlen = 16,
11473 }, {
11474 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11475 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11476 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11477 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11478 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11479 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11480 .klen = 48,
11481 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11482 "\x00\x00\x00\x00\x00\x00\x00\x01",
11483 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11484 "\x38\x39\x41\x42\x43\x44\x45\x46",
11485 .ilen = 16,
11486 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11487 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11488 .rlen = 16,
11489 }, {
11490 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11491 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11492 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11493 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11494 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11495 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11496 .klen = 48,
11497 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11498 "\x00\x00\x00\x02\x00\x00\x00\x00",
11499 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11500 "\x38\x39\x41\x42\x43\x44\x45\x46",
11501 .ilen = 16,
11502 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11503 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11504 .rlen = 16,
11505 }, {
11506 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11507 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11508 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11509 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11510 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11511 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11512 .klen = 48,
11513 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11514 "\x00\x00\x00\x00\x00\x00\x00\x01",
11515 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11516 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11517 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11518 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11519 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11520 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11521 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11522 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11523 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11524 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11525 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11526 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11527 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11528 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11529 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11530 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11531 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11532 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11533 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11534 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11535 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11536 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11537 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11538 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11539 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11540 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11541 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11542 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11543 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11544 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11545 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11546 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11547 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11548 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11549 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11550 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11551 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11552 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11553 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11554 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11555 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11556 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11557 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11558 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11559 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11560 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11561 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11562 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11563 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11564 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11565 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11566 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11567 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11568 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11569 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11570 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11571 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11572 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11573 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11574 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11575 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11576 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11577 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11578 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11579 .ilen = 512,
11580 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11581 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11582 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11583 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11584 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11585 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11586 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11587 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11588 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11589 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11590 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11591 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11592 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11593 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11594 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11595 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11596 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11597 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11598 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11599 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11600 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11601 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11602 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11603 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11604 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11605 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11606 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11607 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11608 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11609 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11610 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11611 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11612 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11613 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11614 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11615 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11616 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11617 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11618 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11619 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11620 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11621 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11622 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11623 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11624 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11625 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11626 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11627 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11628 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11629 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11630 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11631 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11632 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11633 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11634 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11635 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11636 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11637 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11638 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11639 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11640 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11641 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11642 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11643 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11644 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011645 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011646 .np = 3,
11647 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011648 },
11649};
11650
11651static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
11652 /* Generated from AES-LRW test vectors */
11653 /* same as enc vectors with input and result reversed */
11654 {
11655 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11656 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11657 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11658 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11659 .klen = 32,
11660 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11661 "\x00\x00\x00\x00\x00\x00\x00\x01",
11662 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11663 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11664 .ilen = 16,
11665 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11666 "\x38\x39\x41\x42\x43\x44\x45\x46",
11667 .rlen = 16,
11668 }, {
11669 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11670 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11671 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11672 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11673 .klen = 32,
11674 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11675 "\x00\x00\x00\x00\x00\x00\x00\x02",
11676 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11677 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11678 .ilen = 16,
11679 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11680 "\x38\x39\x41\x42\x43\x44\x45\x46",
11681 .rlen = 16,
11682 }, {
11683 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11684 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11685 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11686 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11687 .klen = 32,
11688 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11689 "\x00\x00\x00\x02\x00\x00\x00\x00",
11690 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11691 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11692 .ilen = 16,
11693 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11694 "\x38\x39\x41\x42\x43\x44\x45\x46",
11695 .rlen = 16,
11696 }, {
11697 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11698 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11699 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11700 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11701 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11702 .klen = 40,
11703 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11704 "\x00\x00\x00\x00\x00\x00\x00\x01",
11705 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11706 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11707 .ilen = 16,
11708 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11709 "\x38\x39\x41\x42\x43\x44\x45\x46",
11710 .rlen = 16,
11711 }, {
11712 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11713 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11714 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11715 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11716 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11717 .klen = 40,
11718 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11719 "\x00\x00\x00\x02\x00\x00\x00\x00",
11720 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11721 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11722 .ilen = 16,
11723 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11724 "\x38\x39\x41\x42\x43\x44\x45\x46",
11725 .rlen = 16,
11726 }, {
11727 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11728 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11729 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11730 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11731 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11732 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11733 .klen = 48,
11734 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11735 "\x00\x00\x00\x00\x00\x00\x00\x01",
11736 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11737 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11738 .ilen = 16,
11739 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11740 "\x38\x39\x41\x42\x43\x44\x45\x46",
11741 .rlen = 16,
11742 }, {
11743 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11744 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11745 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11746 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11747 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11748 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11749 .klen = 48,
11750 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11751 "\x00\x00\x00\x02\x00\x00\x00\x00",
11752 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11753 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11754 .ilen = 16,
11755 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11756 "\x38\x39\x41\x42\x43\x44\x45\x46",
11757 .rlen = 16,
11758 }, {
11759 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11760 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11761 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11762 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11763 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11764 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11765 .klen = 48,
11766 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11767 "\x00\x00\x00\x00\x00\x00\x00\x01",
11768 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11769 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11770 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11771 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11772 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11773 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11774 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11775 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11776 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11777 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11778 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11779 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11780 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11781 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11782 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11783 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11784 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11785 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11786 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11787 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11788 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11789 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11790 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11791 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11792 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11793 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11794 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11795 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11796 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11797 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11798 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11799 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11800 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11801 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11802 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11803 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11804 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11805 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11806 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11807 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11808 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11809 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11810 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11811 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11812 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11813 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11814 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11815 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11816 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11817 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11818 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11819 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11820 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11821 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11822 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11823 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11824 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11825 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11826 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11827 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11828 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11829 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11830 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11831 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11832 .ilen = 512,
11833 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11834 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11835 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11836 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11837 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11838 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11839 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11840 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11841 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11842 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11843 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11844 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11845 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11846 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11847 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11848 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11849 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11850 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11851 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11852 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11853 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11854 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11855 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11856 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11857 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11858 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11859 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11860 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11861 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11862 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11863 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11864 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11865 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11866 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11867 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11868 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11869 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11870 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11871 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11872 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11873 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11874 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11875 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11876 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11877 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11878 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11879 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11880 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11881 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11882 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11883 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11884 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11885 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11886 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11887 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11888 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11889 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11890 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11891 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11892 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11893 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11894 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11895 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11896 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11897 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011898 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011899 .np = 3,
11900 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011901 },
11902};
11903
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030011904static struct cipher_testvec serpent_xts_enc_tv_template[] = {
11905 /* Generated from AES-XTS test vectors */
11906 {
11907 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
11908 "\x00\x00\x00\x00\x00\x00\x00\x00"
11909 "\x00\x00\x00\x00\x00\x00\x00\x00"
11910 "\x00\x00\x00\x00\x00\x00\x00\x00",
11911 .klen = 32,
11912 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11913 "\x00\x00\x00\x00\x00\x00\x00\x00",
11914 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
11915 "\x00\x00\x00\x00\x00\x00\x00\x00"
11916 "\x00\x00\x00\x00\x00\x00\x00\x00"
11917 "\x00\x00\x00\x00\x00\x00\x00\x00",
11918 .ilen = 32,
11919 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
11920 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
11921 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
11922 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
11923 .rlen = 32,
11924 }, {
11925 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
11926 "\x11\x11\x11\x11\x11\x11\x11\x11"
11927 "\x22\x22\x22\x22\x22\x22\x22\x22"
11928 "\x22\x22\x22\x22\x22\x22\x22\x22",
11929 .klen = 32,
11930 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11931 "\x00\x00\x00\x00\x00\x00\x00\x00",
11932 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11933 "\x44\x44\x44\x44\x44\x44\x44\x44"
11934 "\x44\x44\x44\x44\x44\x44\x44\x44"
11935 "\x44\x44\x44\x44\x44\x44\x44\x44",
11936 .ilen = 32,
11937 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
11938 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
11939 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
11940 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
11941 .rlen = 32,
11942 }, {
11943 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
11944 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
11945 "\x22\x22\x22\x22\x22\x22\x22\x22"
11946 "\x22\x22\x22\x22\x22\x22\x22\x22",
11947 .klen = 32,
11948 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11949 "\x00\x00\x00\x00\x00\x00\x00\x00",
11950 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11951 "\x44\x44\x44\x44\x44\x44\x44\x44"
11952 "\x44\x44\x44\x44\x44\x44\x44\x44"
11953 "\x44\x44\x44\x44\x44\x44\x44\x44",
11954 .ilen = 32,
11955 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
11956 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
11957 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
11958 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
11959 .rlen = 32,
11960 }, {
11961 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11962 "\x23\x53\x60\x28\x74\x71\x35\x26"
11963 "\x31\x41\x59\x26\x53\x58\x97\x93"
11964 "\x23\x84\x62\x64\x33\x83\x27\x95",
11965 .klen = 32,
11966 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11967 "\x00\x00\x00\x00\x00\x00\x00\x00",
11968 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11969 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11970 "\x10\x11\x12\x13\x14\x15\x16\x17"
11971 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11972 "\x20\x21\x22\x23\x24\x25\x26\x27"
11973 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11974 "\x30\x31\x32\x33\x34\x35\x36\x37"
11975 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11976 "\x40\x41\x42\x43\x44\x45\x46\x47"
11977 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11978 "\x50\x51\x52\x53\x54\x55\x56\x57"
11979 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11980 "\x60\x61\x62\x63\x64\x65\x66\x67"
11981 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11982 "\x70\x71\x72\x73\x74\x75\x76\x77"
11983 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11984 "\x80\x81\x82\x83\x84\x85\x86\x87"
11985 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11986 "\x90\x91\x92\x93\x94\x95\x96\x97"
11987 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11988 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11989 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11990 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11991 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11992 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11993 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11994 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11995 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11996 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11997 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11998 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11999 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12000 "\x00\x01\x02\x03\x04\x05\x06\x07"
12001 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12002 "\x10\x11\x12\x13\x14\x15\x16\x17"
12003 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12004 "\x20\x21\x22\x23\x24\x25\x26\x27"
12005 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12006 "\x30\x31\x32\x33\x34\x35\x36\x37"
12007 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12008 "\x40\x41\x42\x43\x44\x45\x46\x47"
12009 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12010 "\x50\x51\x52\x53\x54\x55\x56\x57"
12011 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12012 "\x60\x61\x62\x63\x64\x65\x66\x67"
12013 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12014 "\x70\x71\x72\x73\x74\x75\x76\x77"
12015 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12016 "\x80\x81\x82\x83\x84\x85\x86\x87"
12017 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12018 "\x90\x91\x92\x93\x94\x95\x96\x97"
12019 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12020 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12021 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12022 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12023 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12024 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12025 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12026 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12027 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12028 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12029 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12030 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12031 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12032 .ilen = 512,
12033 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12034 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12035 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12036 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12037 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12038 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12039 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12040 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12041 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12042 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12043 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12044 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12045 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12046 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12047 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12048 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12049 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12050 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12051 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12052 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12053 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12054 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12055 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12056 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12057 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12058 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12059 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12060 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12061 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12062 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12063 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12064 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12065 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12066 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12067 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12068 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12069 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12070 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12071 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12072 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12073 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12074 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12075 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12076 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12077 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12078 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12079 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12080 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12081 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12082 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12083 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12084 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12085 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12086 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12087 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12088 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12089 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12090 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12091 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12092 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12093 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12094 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12095 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12096 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12097 .rlen = 512,
12098 }, {
12099 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12100 "\x23\x53\x60\x28\x74\x71\x35\x26"
12101 "\x62\x49\x77\x57\x24\x70\x93\x69"
12102 "\x99\x59\x57\x49\x66\x96\x76\x27"
12103 "\x31\x41\x59\x26\x53\x58\x97\x93"
12104 "\x23\x84\x62\x64\x33\x83\x27\x95"
12105 "\x02\x88\x41\x97\x16\x93\x99\x37"
12106 "\x51\x05\x82\x09\x74\x94\x45\x92",
12107 .klen = 64,
12108 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12109 "\x00\x00\x00\x00\x00\x00\x00\x00",
12110 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12111 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12112 "\x10\x11\x12\x13\x14\x15\x16\x17"
12113 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12114 "\x20\x21\x22\x23\x24\x25\x26\x27"
12115 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12116 "\x30\x31\x32\x33\x34\x35\x36\x37"
12117 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12118 "\x40\x41\x42\x43\x44\x45\x46\x47"
12119 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12120 "\x50\x51\x52\x53\x54\x55\x56\x57"
12121 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12122 "\x60\x61\x62\x63\x64\x65\x66\x67"
12123 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12124 "\x70\x71\x72\x73\x74\x75\x76\x77"
12125 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12126 "\x80\x81\x82\x83\x84\x85\x86\x87"
12127 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12128 "\x90\x91\x92\x93\x94\x95\x96\x97"
12129 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12130 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12131 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12132 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12133 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12134 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12135 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12136 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12137 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12138 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12139 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12140 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12141 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12142 "\x00\x01\x02\x03\x04\x05\x06\x07"
12143 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12144 "\x10\x11\x12\x13\x14\x15\x16\x17"
12145 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12146 "\x20\x21\x22\x23\x24\x25\x26\x27"
12147 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12148 "\x30\x31\x32\x33\x34\x35\x36\x37"
12149 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12150 "\x40\x41\x42\x43\x44\x45\x46\x47"
12151 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12152 "\x50\x51\x52\x53\x54\x55\x56\x57"
12153 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12154 "\x60\x61\x62\x63\x64\x65\x66\x67"
12155 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12156 "\x70\x71\x72\x73\x74\x75\x76\x77"
12157 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12158 "\x80\x81\x82\x83\x84\x85\x86\x87"
12159 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12160 "\x90\x91\x92\x93\x94\x95\x96\x97"
12161 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12162 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12163 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12164 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12165 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12166 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12167 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12168 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12169 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12170 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12171 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12172 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12173 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12174 .ilen = 512,
12175 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12176 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12177 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12178 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12179 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12180 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12181 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12182 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12183 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12184 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12185 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12186 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12187 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12188 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12189 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12190 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12191 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12192 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12193 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12194 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12195 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12196 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12197 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12198 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12199 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12200 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12201 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12202 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12203 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12204 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12205 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12206 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12207 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12208 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12209 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12210 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12211 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12212 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12213 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12214 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12215 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12216 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12217 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12218 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12219 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12220 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12221 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12222 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12223 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12224 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12225 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12226 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12227 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12228 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12229 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12230 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12231 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12232 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12233 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12234 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12235 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12236 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12237 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12238 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12239 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012240 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012241 .np = 3,
12242 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030012243 },
12244};
12245
12246static struct cipher_testvec serpent_xts_dec_tv_template[] = {
12247 /* Generated from AES-XTS test vectors */
12248 /* same as enc vectors with input and result reversed */
12249 {
12250 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
12251 "\x00\x00\x00\x00\x00\x00\x00\x00"
12252 "\x00\x00\x00\x00\x00\x00\x00\x00"
12253 "\x00\x00\x00\x00\x00\x00\x00\x00",
12254 .klen = 32,
12255 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12256 "\x00\x00\x00\x00\x00\x00\x00\x00",
12257 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
12258 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
12259 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
12260 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
12261 .ilen = 32,
12262 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
12263 "\x00\x00\x00\x00\x00\x00\x00\x00"
12264 "\x00\x00\x00\x00\x00\x00\x00\x00"
12265 "\x00\x00\x00\x00\x00\x00\x00\x00",
12266 .rlen = 32,
12267 }, {
12268 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
12269 "\x11\x11\x11\x11\x11\x11\x11\x11"
12270 "\x22\x22\x22\x22\x22\x22\x22\x22"
12271 "\x22\x22\x22\x22\x22\x22\x22\x22",
12272 .klen = 32,
12273 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12274 "\x00\x00\x00\x00\x00\x00\x00\x00",
12275 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
12276 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
12277 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
12278 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
12279 .ilen = 32,
12280 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12281 "\x44\x44\x44\x44\x44\x44\x44\x44"
12282 "\x44\x44\x44\x44\x44\x44\x44\x44"
12283 "\x44\x44\x44\x44\x44\x44\x44\x44",
12284 .rlen = 32,
12285 }, {
12286 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12287 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12288 "\x22\x22\x22\x22\x22\x22\x22\x22"
12289 "\x22\x22\x22\x22\x22\x22\x22\x22",
12290 .klen = 32,
12291 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12292 "\x00\x00\x00\x00\x00\x00\x00\x00",
12293 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
12294 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
12295 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
12296 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
12297 .ilen = 32,
12298 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12299 "\x44\x44\x44\x44\x44\x44\x44\x44"
12300 "\x44\x44\x44\x44\x44\x44\x44\x44"
12301 "\x44\x44\x44\x44\x44\x44\x44\x44",
12302 .rlen = 32,
12303 }, {
12304 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12305 "\x23\x53\x60\x28\x74\x71\x35\x26"
12306 "\x31\x41\x59\x26\x53\x58\x97\x93"
12307 "\x23\x84\x62\x64\x33\x83\x27\x95",
12308 .klen = 32,
12309 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12310 "\x00\x00\x00\x00\x00\x00\x00\x00",
12311 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12312 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12313 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12314 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12315 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12316 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12317 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12318 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12319 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12320 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12321 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12322 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12323 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12324 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12325 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12326 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12327 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12328 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12329 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12330 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12331 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12332 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12333 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12334 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12335 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12336 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12337 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12338 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12339 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12340 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12341 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12342 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12343 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12344 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12345 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12346 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12347 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12348 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12349 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12350 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12351 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12352 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12353 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12354 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12355 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12356 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12357 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12358 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12359 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12360 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12361 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12362 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12363 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12364 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12365 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12366 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12367 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12368 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12369 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12370 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12371 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12372 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12373 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12374 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12375 .ilen = 512,
12376 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12377 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12378 "\x10\x11\x12\x13\x14\x15\x16\x17"
12379 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12380 "\x20\x21\x22\x23\x24\x25\x26\x27"
12381 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12382 "\x30\x31\x32\x33\x34\x35\x36\x37"
12383 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12384 "\x40\x41\x42\x43\x44\x45\x46\x47"
12385 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12386 "\x50\x51\x52\x53\x54\x55\x56\x57"
12387 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12388 "\x60\x61\x62\x63\x64\x65\x66\x67"
12389 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12390 "\x70\x71\x72\x73\x74\x75\x76\x77"
12391 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12392 "\x80\x81\x82\x83\x84\x85\x86\x87"
12393 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12394 "\x90\x91\x92\x93\x94\x95\x96\x97"
12395 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12396 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12397 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12398 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12399 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12400 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12401 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12402 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12403 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12404 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12405 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12406 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12407 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12408 "\x00\x01\x02\x03\x04\x05\x06\x07"
12409 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12410 "\x10\x11\x12\x13\x14\x15\x16\x17"
12411 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12412 "\x20\x21\x22\x23\x24\x25\x26\x27"
12413 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12414 "\x30\x31\x32\x33\x34\x35\x36\x37"
12415 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12416 "\x40\x41\x42\x43\x44\x45\x46\x47"
12417 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12418 "\x50\x51\x52\x53\x54\x55\x56\x57"
12419 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12420 "\x60\x61\x62\x63\x64\x65\x66\x67"
12421 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12422 "\x70\x71\x72\x73\x74\x75\x76\x77"
12423 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12424 "\x80\x81\x82\x83\x84\x85\x86\x87"
12425 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12426 "\x90\x91\x92\x93\x94\x95\x96\x97"
12427 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12428 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12429 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12430 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12431 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12432 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12433 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12434 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12435 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12436 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12437 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12438 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12439 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12440 .rlen = 512,
12441 }, {
12442 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12443 "\x23\x53\x60\x28\x74\x71\x35\x26"
12444 "\x62\x49\x77\x57\x24\x70\x93\x69"
12445 "\x99\x59\x57\x49\x66\x96\x76\x27"
12446 "\x31\x41\x59\x26\x53\x58\x97\x93"
12447 "\x23\x84\x62\x64\x33\x83\x27\x95"
12448 "\x02\x88\x41\x97\x16\x93\x99\x37"
12449 "\x51\x05\x82\x09\x74\x94\x45\x92",
12450 .klen = 64,
12451 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12452 "\x00\x00\x00\x00\x00\x00\x00\x00",
12453 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12454 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12455 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12456 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12457 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12458 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12459 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12460 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12461 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12462 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12463 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12464 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12465 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12466 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12467 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12468 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12469 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12470 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12471 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12472 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12473 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12474 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12475 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12476 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12477 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12478 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12479 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12480 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12481 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12482 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12483 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12484 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12485 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12486 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12487 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12488 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12489 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12490 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12491 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12492 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12493 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12494 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12495 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12496 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12497 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12498 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12499 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12500 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12501 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12502 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12503 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12504 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12505 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12506 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12507 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12508 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12509 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12510 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12511 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12512 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12513 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12514 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12515 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12516 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12517 .ilen = 512,
12518 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12519 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12520 "\x10\x11\x12\x13\x14\x15\x16\x17"
12521 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12522 "\x20\x21\x22\x23\x24\x25\x26\x27"
12523 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12524 "\x30\x31\x32\x33\x34\x35\x36\x37"
12525 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12526 "\x40\x41\x42\x43\x44\x45\x46\x47"
12527 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12528 "\x50\x51\x52\x53\x54\x55\x56\x57"
12529 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12530 "\x60\x61\x62\x63\x64\x65\x66\x67"
12531 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12532 "\x70\x71\x72\x73\x74\x75\x76\x77"
12533 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12534 "\x80\x81\x82\x83\x84\x85\x86\x87"
12535 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12536 "\x90\x91\x92\x93\x94\x95\x96\x97"
12537 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12538 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12539 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12540 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12541 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12542 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12543 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12544 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12545 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12546 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12547 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12548 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12549 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12550 "\x00\x01\x02\x03\x04\x05\x06\x07"
12551 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12552 "\x10\x11\x12\x13\x14\x15\x16\x17"
12553 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12554 "\x20\x21\x22\x23\x24\x25\x26\x27"
12555 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12556 "\x30\x31\x32\x33\x34\x35\x36\x37"
12557 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12558 "\x40\x41\x42\x43\x44\x45\x46\x47"
12559 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12560 "\x50\x51\x52\x53\x54\x55\x56\x57"
12561 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12562 "\x60\x61\x62\x63\x64\x65\x66\x67"
12563 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12564 "\x70\x71\x72\x73\x74\x75\x76\x77"
12565 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12566 "\x80\x81\x82\x83\x84\x85\x86\x87"
12567 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12568 "\x90\x91\x92\x93\x94\x95\x96\x97"
12569 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12570 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12571 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12572 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12573 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12574 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12575 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12576 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12577 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12578 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12579 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12580 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12581 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12582 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012583 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012584 .np = 3,
12585 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030012586 },
12587};
12588
Herbert Xuda7f0332008-07-31 17:08:25 +080012589/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012590#define CAST6_ENC_TEST_VECTORS 4
12591#define CAST6_DEC_TEST_VECTORS 4
12592#define CAST6_CBC_ENC_TEST_VECTORS 1
12593#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030012594#define CAST6_CTR_ENC_TEST_VECTORS 2
12595#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012596#define CAST6_LRW_ENC_TEST_VECTORS 1
12597#define CAST6_LRW_DEC_TEST_VECTORS 1
12598#define CAST6_XTS_ENC_TEST_VECTORS 1
12599#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +080012600
12601static struct cipher_testvec cast6_enc_tv_template[] = {
12602 {
12603 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12604 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12605 .klen = 16,
12606 .input = zeroed_string,
12607 .ilen = 16,
12608 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12609 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12610 .rlen = 16,
12611 }, {
12612 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12613 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12614 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12615 .klen = 24,
12616 .input = zeroed_string,
12617 .ilen = 16,
12618 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12619 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12620 .rlen = 16,
12621 }, {
12622 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12623 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12624 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12625 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12626 .klen = 32,
12627 .input = zeroed_string,
12628 .ilen = 16,
12629 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12630 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12631 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012632 }, { /* Generated from TF test vectors */
12633 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12634 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12635 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12636 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12637 .klen = 32,
12638 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12639 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12640 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12641 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12642 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12643 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12644 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12645 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12646 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12647 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12648 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12649 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12650 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12651 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12652 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12653 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12654 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12655 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12656 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12657 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12658 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12659 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12660 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12661 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12662 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12663 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12664 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12665 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12666 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12667 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12668 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12669 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12670 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12671 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12672 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12673 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12674 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12675 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12676 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12677 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12678 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12679 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12680 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12681 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12682 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12683 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12684 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12685 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12686 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12687 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12688 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12689 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12690 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12691 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12692 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12693 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12694 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12695 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12696 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12697 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12698 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12699 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12700 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12701 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12702 .ilen = 496,
12703 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12704 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12705 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12706 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12707 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12708 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12709 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12710 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12711 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12712 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12713 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12714 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12715 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12716 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12717 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12718 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12719 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12720 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12721 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12722 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12723 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12724 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12725 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12726 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12727 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12728 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12729 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12730 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12731 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12732 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12733 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12734 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12735 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12736 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12737 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12738 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12739 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12740 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12741 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12742 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12743 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12744 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12745 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12746 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12747 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12748 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12749 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12750 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12751 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12752 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12753 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12754 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12755 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12756 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12757 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12758 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12759 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12760 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12761 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12762 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12763 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12764 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12765 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012766 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012767 .np = 3,
12768 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012769 },
12770};
12771
12772static struct cipher_testvec cast6_dec_tv_template[] = {
12773 {
12774 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12775 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12776 .klen = 16,
12777 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12778 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12779 .ilen = 16,
12780 .result = zeroed_string,
12781 .rlen = 16,
12782 }, {
12783 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12784 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12785 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12786 .klen = 24,
12787 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12788 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12789 .ilen = 16,
12790 .result = zeroed_string,
12791 .rlen = 16,
12792 }, {
12793 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12794 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12795 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12796 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12797 .klen = 32,
12798 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12799 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12800 .ilen = 16,
12801 .result = zeroed_string,
12802 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012803 }, { /* Generated from TF test vectors */
12804 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12805 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12806 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12807 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12808 .klen = 32,
12809 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12810 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12811 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12812 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12813 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12814 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12815 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12816 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12817 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12818 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12819 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12820 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12821 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12822 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12823 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12824 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12825 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12826 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12827 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12828 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12829 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12830 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12831 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12832 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12833 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12834 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12835 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12836 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12837 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12838 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12839 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12840 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12841 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12842 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12843 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12844 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12845 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12846 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12847 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12848 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12849 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12850 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12851 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12852 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12853 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12854 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12855 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12856 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12857 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12858 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12859 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12860 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12861 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12862 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12863 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12864 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12865 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12866 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12867 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12868 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12869 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12870 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12871 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12872 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12873 .ilen = 496,
12874 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12875 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12876 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12877 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12878 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12879 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12880 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12881 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12882 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12883 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12884 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12885 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12886 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12887 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12888 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12889 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12890 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12891 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12892 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12893 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12894 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12895 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12896 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12897 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12898 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12899 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12900 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12901 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12902 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12903 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12904 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12905 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12906 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12907 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12908 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12909 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12910 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12911 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12912 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12913 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12914 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12915 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12916 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12917 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12918 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12919 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12920 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12921 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12922 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12923 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12924 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12925 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12926 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12927 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12928 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12929 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12930 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12931 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12932 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12933 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12934 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12935 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12936 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012937 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012938 .np = 3,
12939 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012940 },
12941};
12942
12943static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
12944 { /* Generated from TF test vectors */
12945 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12946 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12947 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12948 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12949 .klen = 32,
12950 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12951 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12952 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12953 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12954 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12955 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12956 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12957 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12958 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12959 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12960 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12961 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12962 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12963 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12964 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12965 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12966 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12967 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12968 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12969 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12970 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12971 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12972 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12973 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12974 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12975 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12976 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12977 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12978 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12979 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12980 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12981 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12982 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12983 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12984 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12985 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12986 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12987 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12988 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12989 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12990 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12991 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12992 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12993 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12994 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12995 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12996 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12997 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12998 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12999 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13000 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13001 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13002 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13003 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13004 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13005 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13006 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13007 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13008 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13009 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13010 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13011 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13012 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13013 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13014 .ilen = 496,
13015 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
13016 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
13017 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
13018 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
13019 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
13020 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
13021 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
13022 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
13023 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
13024 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
13025 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
13026 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
13027 "\x23\x16\x47\x72\x81\x13\x3A\x72"
13028 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
13029 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
13030 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
13031 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
13032 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
13033 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
13034 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
13035 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
13036 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
13037 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
13038 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
13039 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
13040 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
13041 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
13042 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
13043 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
13044 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
13045 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
13046 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
13047 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
13048 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
13049 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
13050 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
13051 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
13052 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
13053 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
13054 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
13055 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
13056 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
13057 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
13058 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
13059 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
13060 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
13061 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
13062 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
13063 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
13064 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
13065 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
13066 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
13067 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
13068 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
13069 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
13070 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
13071 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
13072 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
13073 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
13074 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
13075 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
13076 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
13077 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013078 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013079 .np = 3,
13080 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013081 },
13082};
13083
13084static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
13085 { /* Generated from TF test vectors */
13086 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13087 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13088 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13089 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13090 .klen = 32,
13091 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13092 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13093 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
13094 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
13095 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
13096 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
13097 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
13098 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
13099 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
13100 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
13101 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
13102 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
13103 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
13104 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
13105 "\x23\x16\x47\x72\x81\x13\x3A\x72"
13106 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
13107 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
13108 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
13109 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
13110 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
13111 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
13112 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
13113 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
13114 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
13115 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
13116 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
13117 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
13118 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
13119 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
13120 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
13121 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
13122 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
13123 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
13124 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
13125 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
13126 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
13127 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
13128 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
13129 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
13130 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
13131 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
13132 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
13133 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
13134 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
13135 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
13136 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
13137 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
13138 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
13139 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
13140 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
13141 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
13142 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
13143 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
13144 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
13145 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
13146 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
13147 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
13148 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
13149 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
13150 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
13151 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
13152 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
13153 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
13154 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
13155 .ilen = 496,
13156 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13157 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13158 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13159 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13160 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13161 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13162 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13163 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13164 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13165 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13166 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13167 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13168 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13169 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13170 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13171 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13172 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13173 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13174 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13175 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13176 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13177 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13178 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13179 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13180 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13181 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13182 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13183 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13184 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13185 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13186 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13187 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13188 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13189 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13190 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13191 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13192 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13193 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13194 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13195 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13196 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13197 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13198 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13199 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13200 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13201 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13202 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13203 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13204 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13205 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13206 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13207 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13208 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13209 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13210 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13211 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13212 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13213 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13214 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13215 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13216 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13217 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13218 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013219 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013220 .np = 3,
13221 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013222 },
13223};
13224
13225static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
13226 { /* Generated from TF test vectors */
13227 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13228 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13229 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13230 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13231 .klen = 32,
13232 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13233 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13234 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13235 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013236 "\x3A",
13237 .ilen = 17,
13238 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13239 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13240 "\x57",
13241 .rlen = 17,
13242 }, { /* Generated from TF test vectors */
13243 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13244 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13245 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13246 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13247 .klen = 32,
13248 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13249 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13250 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13251 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013252 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13253 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13254 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13255 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13256 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13257 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13258 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13259 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13260 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13261 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13262 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13263 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13264 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13265 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13266 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13267 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13268 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13269 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13270 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13271 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13272 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13273 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13274 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13275 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13276 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13277 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13278 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13279 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13280 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13281 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13282 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13283 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13284 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13285 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13286 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13287 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13288 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13289 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13290 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13291 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13292 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13293 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13294 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13295 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13296 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13297 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13298 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13299 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13300 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13301 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13302 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13303 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13304 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13305 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13306 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13307 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13308 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13309 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13310 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13311 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13312 .ilen = 496,
13313 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13314 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13315 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13316 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13317 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13318 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13319 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13320 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13321 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13322 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13323 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13324 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13325 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13326 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13327 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13328 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13329 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13330 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13331 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13332 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13333 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13334 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13335 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13336 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13337 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13338 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13339 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13340 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13341 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13342 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13343 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13344 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13345 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13346 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13347 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13348 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13349 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13350 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13351 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13352 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13353 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13354 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13355 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13356 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13357 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13358 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13359 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13360 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13361 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13362 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13363 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13364 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13365 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13366 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13367 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13368 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13369 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13370 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13371 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13372 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13373 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13374 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13375 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013376 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013377 .np = 3,
13378 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013379 },
13380};
13381
13382static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
13383 { /* Generated from TF test vectors */
13384 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13385 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13386 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13387 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13388 .klen = 32,
13389 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13390 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13391 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13392 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013393 "\x57",
13394 .ilen = 17,
13395 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13396 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13397 "\x3A",
13398 .rlen = 17,
13399 }, { /* Generated from TF test vectors */
13400 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13401 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13402 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13403 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13404 .klen = 32,
13405 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13406 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13407 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13408 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013409 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13410 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13411 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13412 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13413 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13414 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13415 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13416 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13417 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13418 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13419 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13420 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13421 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13422 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13423 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13424 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13425 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13426 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13427 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13428 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13429 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13430 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13431 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13432 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13433 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13434 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13435 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13436 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13437 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13438 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13439 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13440 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13441 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13442 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13443 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13444 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13445 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13446 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13447 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13448 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13449 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13450 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13451 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13452 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13453 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13454 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13455 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13456 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13457 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13458 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13459 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13460 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13461 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13462 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13463 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13464 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13465 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13466 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13467 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13468 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13469 .ilen = 496,
13470 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13471 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13472 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13473 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13474 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13475 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13476 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13477 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13478 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13479 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13480 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13481 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13482 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13483 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13484 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13485 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13486 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13487 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13488 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13489 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13490 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13491 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13492 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13493 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13494 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13495 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13496 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13497 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13498 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13499 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13500 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13501 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13502 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13503 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13504 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13505 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13506 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13507 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13508 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13509 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13510 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13511 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13512 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13513 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13514 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13515 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13516 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13517 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13518 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13519 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13520 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13521 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13522 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13523 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13524 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13525 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13526 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13527 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13528 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13529 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13530 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13531 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13532 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013533 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013534 .np = 3,
13535 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013536 },
13537};
13538
13539static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
13540 { /* Generated from TF test vectors */
13541 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13542 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13543 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13544 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13545 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13546 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13547 .klen = 48,
13548 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13549 "\x00\x00\x00\x00\x00\x00\x00\x01",
13550 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13551 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13552 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13553 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13554 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13555 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13556 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13557 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13558 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13559 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13560 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13561 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13562 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13563 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13564 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13565 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13566 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13567 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13568 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13569 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13570 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13571 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13572 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13573 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13574 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13575 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13576 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13577 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13578 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13579 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13580 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13581 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13582 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13583 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13584 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13585 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13586 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13587 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13588 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13589 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13590 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13591 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13592 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13593 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13594 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13595 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13596 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13597 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13598 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13599 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13600 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13601 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13602 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13603 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13604 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13605 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13606 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13607 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13608 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13609 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13610 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13611 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13612 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13613 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13614 .ilen = 512,
13615 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13616 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13617 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13618 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13619 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13620 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13621 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13622 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13623 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13624 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13625 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13626 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13627 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13628 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13629 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13630 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13631 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13632 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13633 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13634 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13635 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13636 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13637 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13638 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13639 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13640 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13641 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13642 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13643 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13644 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13645 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13646 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13647 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13648 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13649 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13650 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13651 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13652 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13653 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13654 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13655 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13656 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13657 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13658 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13659 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13660 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13661 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13662 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13663 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13664 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13665 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13666 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13667 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13668 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13669 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13670 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13671 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13672 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13673 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13674 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13675 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13676 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13677 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13678 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13679 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013680 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013681 .np = 3,
13682 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013683 },
13684};
13685
13686static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
13687 { /* Generated from TF test vectors */
13688 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13689 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13690 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13691 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13692 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13693 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13694 .klen = 48,
13695 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13696 "\x00\x00\x00\x00\x00\x00\x00\x01",
13697 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13698 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13699 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13700 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13701 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13702 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13703 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13704 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13705 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13706 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13707 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13708 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13709 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13710 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13711 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13712 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13713 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13714 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13715 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13716 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13717 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13718 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13719 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13720 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13721 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13722 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13723 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13724 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13725 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13726 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13727 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13728 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13729 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13730 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13731 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13732 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13733 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13734 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13735 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13736 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13737 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13738 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13739 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13740 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13741 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13742 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13743 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13744 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13745 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13746 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13747 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13748 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13749 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13750 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13751 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13752 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13753 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13754 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13755 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13756 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13757 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13758 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13759 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13760 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13761 .ilen = 512,
13762 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13763 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13764 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13765 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13766 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13767 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13768 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13769 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13770 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13771 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13772 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13773 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13774 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13775 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13776 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13777 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13778 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13779 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13780 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13781 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13782 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13783 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13784 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13785 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13786 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13787 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13788 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13789 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13790 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13791 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13792 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13793 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13794 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13795 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13796 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13797 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13798 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13799 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13800 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13801 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13802 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13803 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13804 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13805 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13806 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13807 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13808 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13809 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13810 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13811 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13812 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13813 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13814 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13815 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13816 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13817 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13818 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13819 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13820 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13821 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13822 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13823 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13824 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13825 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13826 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013827 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013828 .np = 3,
13829 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013830 },
13831};
13832
13833static struct cipher_testvec cast6_xts_enc_tv_template[] = {
13834 { /* Generated from TF test vectors */
13835 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13836 "\x23\x53\x60\x28\x74\x71\x35\x26"
13837 "\x62\x49\x77\x57\x24\x70\x93\x69"
13838 "\x99\x59\x57\x49\x66\x96\x76\x27"
13839 "\x31\x41\x59\x26\x53\x58\x97\x93"
13840 "\x23\x84\x62\x64\x33\x83\x27\x95"
13841 "\x02\x88\x41\x97\x16\x93\x99\x37"
13842 "\x51\x05\x82\x09\x74\x94\x45\x92",
13843 .klen = 64,
13844 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13845 "\x00\x00\x00\x00\x00\x00\x00\x00",
13846 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13847 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13848 "\x10\x11\x12\x13\x14\x15\x16\x17"
13849 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13850 "\x20\x21\x22\x23\x24\x25\x26\x27"
13851 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13852 "\x30\x31\x32\x33\x34\x35\x36\x37"
13853 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13854 "\x40\x41\x42\x43\x44\x45\x46\x47"
13855 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13856 "\x50\x51\x52\x53\x54\x55\x56\x57"
13857 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13858 "\x60\x61\x62\x63\x64\x65\x66\x67"
13859 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13860 "\x70\x71\x72\x73\x74\x75\x76\x77"
13861 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13862 "\x80\x81\x82\x83\x84\x85\x86\x87"
13863 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13864 "\x90\x91\x92\x93\x94\x95\x96\x97"
13865 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13866 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13867 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13868 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13869 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13870 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13871 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13872 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13873 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13874 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13875 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13876 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13877 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
13878 "\x00\x01\x02\x03\x04\x05\x06\x07"
13879 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13880 "\x10\x11\x12\x13\x14\x15\x16\x17"
13881 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13882 "\x20\x21\x22\x23\x24\x25\x26\x27"
13883 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13884 "\x30\x31\x32\x33\x34\x35\x36\x37"
13885 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13886 "\x40\x41\x42\x43\x44\x45\x46\x47"
13887 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13888 "\x50\x51\x52\x53\x54\x55\x56\x57"
13889 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13890 "\x60\x61\x62\x63\x64\x65\x66\x67"
13891 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13892 "\x70\x71\x72\x73\x74\x75\x76\x77"
13893 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13894 "\x80\x81\x82\x83\x84\x85\x86\x87"
13895 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13896 "\x90\x91\x92\x93\x94\x95\x96\x97"
13897 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13898 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13899 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13900 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13901 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13902 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13903 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13904 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13905 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13906 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13907 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13908 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13909 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
13910 .ilen = 512,
13911 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13912 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13913 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13914 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13915 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13916 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13917 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13918 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13919 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13920 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13921 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13922 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13923 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13924 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13925 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13926 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13927 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13928 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13929 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13930 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13931 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
13932 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
13933 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
13934 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
13935 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
13936 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
13937 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
13938 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
13939 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
13940 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
13941 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
13942 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
13943 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
13944 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
13945 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
13946 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
13947 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
13948 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
13949 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
13950 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
13951 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
13952 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
13953 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
13954 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
13955 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
13956 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
13957 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
13958 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
13959 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
13960 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
13961 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
13962 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
13963 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
13964 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
13965 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
13966 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
13967 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
13968 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
13969 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
13970 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
13971 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
13972 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
13973 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
13974 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
13975 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013976 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013977 .np = 3,
13978 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013979 },
13980};
13981
13982static struct cipher_testvec cast6_xts_dec_tv_template[] = {
13983 { /* Generated from TF test vectors */
13984 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13985 "\x23\x53\x60\x28\x74\x71\x35\x26"
13986 "\x62\x49\x77\x57\x24\x70\x93\x69"
13987 "\x99\x59\x57\x49\x66\x96\x76\x27"
13988 "\x31\x41\x59\x26\x53\x58\x97\x93"
13989 "\x23\x84\x62\x64\x33\x83\x27\x95"
13990 "\x02\x88\x41\x97\x16\x93\x99\x37"
13991 "\x51\x05\x82\x09\x74\x94\x45\x92",
13992 .klen = 64,
13993 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13994 "\x00\x00\x00\x00\x00\x00\x00\x00",
13995 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13996 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13997 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13998 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13999 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
14000 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
14001 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
14002 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
14003 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
14004 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
14005 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
14006 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
14007 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
14008 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
14009 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
14010 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
14011 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
14012 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
14013 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
14014 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
14015 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
14016 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
14017 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
14018 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
14019 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
14020 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
14021 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
14022 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
14023 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
14024 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
14025 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
14026 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
14027 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
14028 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
14029 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
14030 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
14031 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
14032 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
14033 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
14034 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
14035 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
14036 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
14037 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
14038 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
14039 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
14040 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
14041 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
14042 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
14043 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
14044 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
14045 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
14046 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
14047 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
14048 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
14049 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
14050 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
14051 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
14052 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
14053 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
14054 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
14055 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
14056 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
14057 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
14058 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
14059 .ilen = 512,
14060 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14061 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14062 "\x10\x11\x12\x13\x14\x15\x16\x17"
14063 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14064 "\x20\x21\x22\x23\x24\x25\x26\x27"
14065 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14066 "\x30\x31\x32\x33\x34\x35\x36\x37"
14067 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14068 "\x40\x41\x42\x43\x44\x45\x46\x47"
14069 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14070 "\x50\x51\x52\x53\x54\x55\x56\x57"
14071 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14072 "\x60\x61\x62\x63\x64\x65\x66\x67"
14073 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14074 "\x70\x71\x72\x73\x74\x75\x76\x77"
14075 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14076 "\x80\x81\x82\x83\x84\x85\x86\x87"
14077 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14078 "\x90\x91\x92\x93\x94\x95\x96\x97"
14079 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14080 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14081 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14082 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14083 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14084 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14085 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14086 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14087 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14088 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14089 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14090 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14091 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
14092 "\x00\x01\x02\x03\x04\x05\x06\x07"
14093 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14094 "\x10\x11\x12\x13\x14\x15\x16\x17"
14095 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14096 "\x20\x21\x22\x23\x24\x25\x26\x27"
14097 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14098 "\x30\x31\x32\x33\x34\x35\x36\x37"
14099 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14100 "\x40\x41\x42\x43\x44\x45\x46\x47"
14101 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14102 "\x50\x51\x52\x53\x54\x55\x56\x57"
14103 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14104 "\x60\x61\x62\x63\x64\x65\x66\x67"
14105 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14106 "\x70\x71\x72\x73\x74\x75\x76\x77"
14107 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14108 "\x80\x81\x82\x83\x84\x85\x86\x87"
14109 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14110 "\x90\x91\x92\x93\x94\x95\x96\x97"
14111 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14112 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14113 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14114 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14115 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14116 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14117 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14118 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14119 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14120 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14121 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14122 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14123 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
14124 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014125 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014126 .np = 3,
14127 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014128 },
14129};
14130
14131
14132/*
14133 * AES test vectors.
14134 */
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014135#define AES_ENC_TEST_VECTORS 4
14136#define AES_DEC_TEST_VECTORS 4
14137#define AES_CBC_ENC_TEST_VECTORS 5
14138#define AES_CBC_DEC_TEST_VECTORS 5
Horia Geantabca4feb2014-03-14 17:46:51 +020014139#define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
14140#define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
Nitesh Lal5208ed22014-05-21 17:09:08 +053014141#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2
14142#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2
14143#define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7
14144#define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7
14145#define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7
Herbert Xuda7f0332008-07-31 17:08:25 +080014146#define AES_LRW_ENC_TEST_VECTORS 8
14147#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +100014148#define AES_XTS_ENC_TEST_VECTORS 5
14149#define AES_XTS_DEC_TEST_VECTORS 5
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014150#define AES_CTR_ENC_TEST_VECTORS 5
14151#define AES_CTR_DEC_TEST_VECTORS 5
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100014152#define AES_OFB_ENC_TEST_VECTORS 1
14153#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080014154#define AES_CTR_3686_ENC_TEST_VECTORS 7
14155#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +080014156#define AES_GCM_ENC_TEST_VECTORS 9
14157#define AES_GCM_DEC_TEST_VECTORS 8
Herbert Xu8f69b762015-06-16 13:54:26 +080014158#define AES_GCM_4106_ENC_TEST_VECTORS 23
14159#define AES_GCM_4106_DEC_TEST_VECTORS 23
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030014160#define AES_GCM_4543_ENC_TEST_VECTORS 1
14161#define AES_GCM_4543_DEC_TEST_VECTORS 2
Ard Biesheuvel45859882014-04-16 20:40:04 +080014162#define AES_CCM_ENC_TEST_VECTORS 8
Herbert Xuda7f0332008-07-31 17:08:25 +080014163#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +080014164#define AES_CCM_4309_ENC_TEST_VECTORS 7
14165#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +080014166
14167static struct cipher_testvec aes_enc_tv_template[] = {
14168 { /* From FIPS-197 */
14169 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14170 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14171 .klen = 16,
14172 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14173 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14174 .ilen = 16,
14175 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14176 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14177 .rlen = 16,
14178 }, {
14179 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14180 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14181 "\x10\x11\x12\x13\x14\x15\x16\x17",
14182 .klen = 24,
14183 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14184 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14185 .ilen = 16,
14186 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14187 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14188 .rlen = 16,
14189 }, {
14190 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14191 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14192 "\x10\x11\x12\x13\x14\x15\x16\x17"
14193 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14194 .klen = 32,
14195 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14196 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14197 .ilen = 16,
14198 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14199 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14200 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014201 }, { /* Generated with Crypto++ */
14202 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14203 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14204 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14205 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14206 .klen = 32,
14207 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14208 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14209 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14210 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14211 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14212 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14213 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14214 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14215 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14216 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14217 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14218 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14219 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14220 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14221 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14222 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14223 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14224 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14225 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14226 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14227 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14228 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14229 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14230 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14231 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14232 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14233 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14234 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14235 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14236 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14237 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14238 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14239 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14240 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14241 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14242 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14243 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14244 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14245 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14246 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14247 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14248 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14249 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14250 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14251 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14252 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14253 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14254 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14255 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14256 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14257 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14258 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14259 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14260 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14261 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14262 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14263 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14264 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14265 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14266 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14267 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14268 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14269 .ilen = 496,
14270 .result = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14271 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14272 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14273 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14274 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14275 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14276 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14277 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14278 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14279 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14280 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14281 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14282 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14283 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14284 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14285 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14286 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14287 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14288 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14289 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14290 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14291 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14292 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14293 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14294 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14295 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14296 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14297 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14298 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14299 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14300 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14301 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14302 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14303 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14304 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14305 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14306 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14307 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14308 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14309 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14310 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14311 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14312 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14313 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14314 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14315 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14316 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14317 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14318 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14319 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14320 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14321 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14322 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14323 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14324 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14325 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14326 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14327 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14328 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14329 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14330 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14331 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14332 .rlen = 496,
14333 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014334 .np = 3,
14335 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014336 },
14337};
14338
14339static struct cipher_testvec aes_dec_tv_template[] = {
14340 { /* From FIPS-197 */
14341 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14342 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14343 .klen = 16,
14344 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14345 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14346 .ilen = 16,
14347 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14348 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14349 .rlen = 16,
14350 }, {
14351 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14352 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14353 "\x10\x11\x12\x13\x14\x15\x16\x17",
14354 .klen = 24,
14355 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14356 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14357 .ilen = 16,
14358 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14359 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14360 .rlen = 16,
14361 }, {
14362 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14363 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14364 "\x10\x11\x12\x13\x14\x15\x16\x17"
14365 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14366 .klen = 32,
14367 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14368 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14369 .ilen = 16,
14370 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14371 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14372 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014373 }, { /* Generated with Crypto++ */
14374 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14375 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14376 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14377 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14378 .klen = 32,
14379 .input = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14380 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14381 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14382 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14383 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14384 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14385 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14386 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14387 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14388 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14389 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14390 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14391 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14392 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14393 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14394 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14395 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14396 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14397 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14398 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14399 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14400 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14401 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14402 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14403 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14404 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14405 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14406 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14407 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14408 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14409 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14410 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14411 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14412 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14413 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14414 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14415 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14416 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14417 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14418 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14419 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14420 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14421 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14422 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14423 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14424 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14425 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14426 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14427 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14428 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14429 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14430 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14431 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14432 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14433 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14434 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14435 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14436 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14437 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14438 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14439 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14440 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14441 .ilen = 496,
14442 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14443 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14444 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14445 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14446 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14447 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14448 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14449 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14450 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14451 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14452 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14453 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14454 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14455 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14456 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14457 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14458 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14459 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14460 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14461 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14462 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14463 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14464 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14465 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14466 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14467 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14468 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14469 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14470 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14471 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14472 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14473 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14474 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14475 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14476 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14477 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14478 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14479 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14480 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14481 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14482 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14483 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14484 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14485 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14486 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14487 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14488 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14489 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14490 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14491 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14492 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14493 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14494 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14495 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14496 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14497 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14498 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14499 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14500 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14501 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14502 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14503 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14504 .rlen = 496,
14505 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014506 .np = 3,
14507 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014508 },
14509};
14510
14511static struct cipher_testvec aes_cbc_enc_tv_template[] = {
14512 { /* From RFC 3602 */
14513 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14514 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14515 .klen = 16,
14516 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14517 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14518 .input = "Single block msg",
14519 .ilen = 16,
14520 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14521 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14522 .rlen = 16,
LABBE Corentin0d8dc962015-07-06 13:37:33 +020014523 .also_non_np = 1,
14524 .np = 8,
14525 .tap = { 3, 2, 3, 2, 3, 1, 1, 1 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014526 }, {
14527 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14528 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14529 .klen = 16,
14530 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14531 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14532 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14533 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14534 "\x10\x11\x12\x13\x14\x15\x16\x17"
14535 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14536 .ilen = 32,
14537 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14538 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14539 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14540 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14541 .rlen = 32,
14542 }, { /* From NIST SP800-38A */
14543 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14544 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14545 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14546 .klen = 24,
14547 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14548 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14549 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14550 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14551 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14552 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14553 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14554 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14555 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14556 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14557 .ilen = 64,
14558 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14559 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14560 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14561 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14562 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14563 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14564 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14565 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14566 .rlen = 64,
14567 }, {
14568 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14569 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14570 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14571 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14572 .klen = 32,
14573 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14574 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14575 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14576 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14577 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14578 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14579 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14580 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14581 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14582 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14583 .ilen = 64,
14584 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14585 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14586 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14587 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14588 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14589 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14590 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14591 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14592 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014593 }, { /* Generated with Crypto++ */
14594 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14595 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14596 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14597 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14598 .klen = 32,
14599 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14600 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14601 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14602 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14603 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14604 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14605 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14606 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14607 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14608 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14609 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14610 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14611 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14612 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14613 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14614 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14615 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14616 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14617 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14618 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14619 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14620 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14621 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14622 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14623 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14624 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14625 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14626 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14627 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14628 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14629 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14630 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14631 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14632 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14633 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14634 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14635 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14636 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14637 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14638 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14639 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14640 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14641 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14642 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14643 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14644 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14645 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14646 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14647 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14648 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14649 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14650 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14651 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14652 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14653 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14654 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14655 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14656 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14657 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14658 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14659 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14660 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14661 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14662 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14663 .ilen = 496,
14664 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14665 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14666 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14667 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14668 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14669 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14670 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14671 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14672 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14673 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14674 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14675 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14676 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14677 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14678 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14679 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14680 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14681 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14682 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14683 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14684 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14685 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14686 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14687 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14688 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14689 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14690 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14691 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14692 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14693 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14694 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14695 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14696 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14697 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14698 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14699 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14700 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14701 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14702 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14703 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14704 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14705 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14706 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14707 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14708 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14709 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14710 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14711 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14712 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14713 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14714 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14715 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14716 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14717 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14718 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14719 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14720 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14721 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14722 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14723 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14724 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14725 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14726 .rlen = 496,
14727 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014728 .np = 3,
14729 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014730 },
14731};
14732
14733static struct cipher_testvec aes_cbc_dec_tv_template[] = {
14734 { /* From RFC 3602 */
14735 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14736 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14737 .klen = 16,
14738 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14739 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14740 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14741 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14742 .ilen = 16,
14743 .result = "Single block msg",
14744 .rlen = 16,
LABBE Corentin0d8dc962015-07-06 13:37:33 +020014745 .also_non_np = 1,
14746 .np = 8,
14747 .tap = { 3, 2, 3, 2, 3, 1, 1, 1 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014748 }, {
14749 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14750 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14751 .klen = 16,
14752 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14753 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14754 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14755 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14756 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14757 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14758 .ilen = 32,
14759 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14760 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14761 "\x10\x11\x12\x13\x14\x15\x16\x17"
14762 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14763 .rlen = 32,
14764 }, { /* From NIST SP800-38A */
14765 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14766 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14767 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14768 .klen = 24,
14769 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14770 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14771 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14772 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14773 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14774 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14775 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14776 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14777 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14778 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14779 .ilen = 64,
14780 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14781 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14782 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14783 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14784 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14785 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14786 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14787 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14788 .rlen = 64,
14789 }, {
14790 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14791 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14792 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14793 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14794 .klen = 32,
14795 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14796 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14797 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14798 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14799 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14800 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14801 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14802 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14803 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14804 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14805 .ilen = 64,
14806 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14807 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14808 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14809 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14810 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14811 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14812 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14813 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14814 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014815 }, { /* Generated with Crypto++ */
14816 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14817 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14818 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14819 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14820 .klen = 32,
14821 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14822 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14823 .input = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14824 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14825 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14826 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14827 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14828 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14829 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14830 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14831 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14832 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14833 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14834 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14835 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14836 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14837 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14838 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14839 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14840 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14841 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14842 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14843 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14844 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14845 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14846 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14847 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14848 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14849 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14850 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14851 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14852 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14853 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14854 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14855 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14856 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14857 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14858 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14859 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14860 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14861 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14862 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14863 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14864 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14865 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14866 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14867 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14868 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14869 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14870 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14871 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14872 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14873 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14874 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14875 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14876 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14877 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14878 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14879 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14880 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14881 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14882 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14883 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14884 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14885 .ilen = 496,
14886 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14887 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14888 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14889 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14890 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14891 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14892 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14893 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14894 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14895 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14896 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14897 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14898 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14899 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14900 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14901 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14902 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14903 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14904 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14905 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14906 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14907 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14908 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14909 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14910 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14911 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14912 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14913 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14914 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14915 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14916 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14917 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14918 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14919 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14920 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14921 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14922 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14923 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14924 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14925 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14926 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14927 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14928 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14929 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14930 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14931 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14932 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14933 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14934 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14935 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14936 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14937 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14938 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14939 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14940 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14941 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14942 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14943 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14944 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14945 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14946 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14947 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14948 .rlen = 496,
14949 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014950 .np = 3,
14951 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014952 },
14953};
14954
Horia Geantabca4feb2014-03-14 17:46:51 +020014955static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
14956 { /* Input data from RFC 2410 Case 1 */
14957#ifdef __LITTLE_ENDIAN
14958 .key = "\x08\x00" /* rta length */
14959 "\x01\x00" /* rta type */
14960#else
14961 .key = "\x00\x08" /* rta length */
14962 "\x00\x01" /* rta type */
14963#endif
14964 "\x00\x00\x00\x00" /* enc key length */
14965 "\x00\x00\x00\x00\x00\x00\x00\x00"
14966 "\x00\x00\x00\x00\x00\x00\x00\x00",
14967 .klen = 8 + 16 + 0,
14968 .iv = "",
14969 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14970 .ilen = 8,
14971 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14972 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14973 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14974 .rlen = 8 + 16,
14975 }, { /* Input data from RFC 2410 Case 2 */
14976#ifdef __LITTLE_ENDIAN
14977 .key = "\x08\x00" /* rta length */
14978 "\x01\x00" /* rta type */
14979#else
14980 .key = "\x00\x08" /* rta length */
14981 "\x00\x01" /* rta type */
14982#endif
14983 "\x00\x00\x00\x00" /* enc key length */
14984 "\x00\x00\x00\x00\x00\x00\x00\x00"
14985 "\x00\x00\x00\x00\x00\x00\x00\x00",
14986 .klen = 8 + 16 + 0,
14987 .iv = "",
14988 .input = "Network Security People Have A Strange Sense Of Humor",
14989 .ilen = 53,
14990 .result = "Network Security People Have A Strange Sense Of Humor"
14991 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
14992 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
14993 .rlen = 53 + 16,
14994 },
14995};
14996
14997static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
14998 {
14999#ifdef __LITTLE_ENDIAN
15000 .key = "\x08\x00" /* rta length */
15001 "\x01\x00" /* rta type */
15002#else
15003 .key = "\x00\x08" /* rta length */
15004 "\x00\x01" /* rta type */
15005#endif
15006 "\x00\x00\x00\x00" /* enc key length */
15007 "\x00\x00\x00\x00\x00\x00\x00\x00"
15008 "\x00\x00\x00\x00\x00\x00\x00\x00",
15009 .klen = 8 + 16 + 0,
15010 .iv = "",
15011 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15012 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
15013 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
15014 .ilen = 8 + 16,
15015 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15016 .rlen = 8,
15017 }, {
15018#ifdef __LITTLE_ENDIAN
15019 .key = "\x08\x00" /* rta length */
15020 "\x01\x00" /* rta type */
15021#else
15022 .key = "\x00\x08" /* rta length */
15023 "\x00\x01" /* rta type */
15024#endif
15025 "\x00\x00\x00\x00" /* enc key length */
15026 "\x00\x00\x00\x00\x00\x00\x00\x00"
15027 "\x00\x00\x00\x00\x00\x00\x00\x00",
15028 .klen = 8 + 16 + 0,
15029 .iv = "",
15030 .input = "Network Security People Have A Strange Sense Of Humor"
15031 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
15032 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
15033 .ilen = 53 + 16,
15034 .result = "Network Security People Have A Strange Sense Of Humor",
15035 .rlen = 53,
15036 },
15037};
15038
Nitesh Lal5208ed22014-05-21 17:09:08 +053015039static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015040 { /* RFC 3602 Case 1 */
15041#ifdef __LITTLE_ENDIAN
15042 .key = "\x08\x00" /* rta length */
15043 "\x01\x00" /* rta type */
15044#else
15045 .key = "\x00\x08" /* rta length */
15046 "\x00\x01" /* rta type */
15047#endif
15048 "\x00\x00\x00\x10" /* enc key length */
15049 "\x00\x00\x00\x00\x00\x00\x00\x00"
15050 "\x00\x00\x00\x00\x00\x00\x00\x00"
15051 "\x00\x00\x00\x00"
15052 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15053 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15054 .klen = 8 + 20 + 16,
15055 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15056 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
Herbert Xu7079ce62015-07-30 17:53:14 +080015057 .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15058 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15059 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015060 .input = "Single block msg",
15061 .ilen = 16,
15062 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15063 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15064 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
15065 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
15066 "\x03\x71\xa2\x06",
15067 .rlen = 16 + 20,
15068 }, { /* RFC 3602 Case 2 */
15069#ifdef __LITTLE_ENDIAN
15070 .key = "\x08\x00" /* rta length */
15071 "\x01\x00" /* rta type */
15072#else
15073 .key = "\x00\x08" /* rta length */
15074 "\x00\x01" /* rta type */
15075#endif
15076 "\x00\x00\x00\x10" /* enc key length */
15077 "\x20\x21\x22\x23\x24\x25\x26\x27"
15078 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15079 "\x30\x31\x32\x33"
15080 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15081 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15082 .klen = 8 + 20 + 16,
15083 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15084 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
Herbert Xu7079ce62015-07-30 17:53:14 +080015085 .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15086 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15087 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015088 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15089 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15090 "\x10\x11\x12\x13\x14\x15\x16\x17"
15091 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15092 .ilen = 32,
15093 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15094 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15095 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15096 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15097 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
15098 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
15099 "\x65\x39\xf8\xde",
15100 .rlen = 32 + 20,
15101 }, { /* RFC 3602 Case 3 */
15102#ifdef __LITTLE_ENDIAN
15103 .key = "\x08\x00" /* rta length */
15104 "\x01\x00" /* rta type */
15105#else
15106 .key = "\x00\x08" /* rta length */
15107 "\x00\x01" /* rta type */
15108#endif
15109 "\x00\x00\x00\x10" /* enc key length */
15110 "\x11\x22\x33\x44\x55\x66\x77\x88"
15111 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15112 "\x22\x33\x44\x55"
15113 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15114 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15115 .klen = 8 + 20 + 16,
15116 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15117 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
Herbert Xu7079ce62015-07-30 17:53:14 +080015118 .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15119 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15120 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015121 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15122 .ilen = 48,
15123 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15124 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15125 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15126 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15127 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15128 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15129 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
15130 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
15131 "\x8d\x62\xf2\x1e",
15132 .rlen = 48 + 20,
15133 }, { /* RFC 3602 Case 4 */
15134#ifdef __LITTLE_ENDIAN
15135 .key = "\x08\x00" /* rta length */
15136 "\x01\x00" /* rta type */
15137#else
15138 .key = "\x00\x08" /* rta length */
15139 "\x00\x01" /* rta type */
15140#endif
15141 "\x00\x00\x00\x10" /* enc key length */
15142 "\x11\x22\x33\x44\x55\x66\x77\x88"
15143 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15144 "\x22\x33\x44\x55"
15145 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15146 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15147 .klen = 8 + 20 + 16,
15148 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15149 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
Herbert Xu7079ce62015-07-30 17:53:14 +080015150 .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15151 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15152 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015153 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15154 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15155 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15156 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15157 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15158 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15159 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15160 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15161 .ilen = 64,
15162 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15163 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15164 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15165 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15166 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15167 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15168 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15169 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15170 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
15171 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
15172 "\x1d\xbe\xc6\xe9",
15173 .rlen = 64 + 20,
15174 }, { /* RFC 3602 Case 5 */
15175#ifdef __LITTLE_ENDIAN
15176 .key = "\x08\x00" /* rta length */
15177 "\x01\x00" /* rta type */
15178#else
15179 .key = "\x00\x08" /* rta length */
15180 "\x00\x01" /* rta type */
15181#endif
15182 "\x00\x00\x00\x10" /* enc key length */
15183 "\x11\x22\x33\x44\x55\x66\x77\x88"
15184 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15185 "\x22\x33\x44\x55"
15186 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15187 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15188 .klen = 8 + 20 + 16,
15189 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15190 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
Herbert Xu7079ce62015-07-30 17:53:14 +080015191 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
15192 "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15193 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15194 .alen = 24,
Horia Geantae46e9a42012-07-03 19:16:54 +030015195 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15196 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15197 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15198 "\x10\x11\x12\x13\x14\x15\x16\x17"
15199 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15200 "\x20\x21\x22\x23\x24\x25\x26\x27"
15201 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15202 "\x30\x31\x32\x33\x34\x35\x36\x37"
15203 "\x01\x02\x03\x04\x05\x06\x07\x08"
15204 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15205 .ilen = 80,
15206 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15207 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15208 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15209 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15210 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15211 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15212 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15213 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15214 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15215 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15216 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
15217 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
15218 "\x85\xe1\x59\xf7",
15219 .rlen = 80 + 20,
15220 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15221#ifdef __LITTLE_ENDIAN
15222 .key = "\x08\x00" /* rta length */
15223 "\x01\x00" /* rta type */
15224#else
15225 .key = "\x00\x08" /* rta length */
15226 "\x00\x01" /* rta type */
15227#endif
15228 "\x00\x00\x00\x18" /* enc key length */
15229 "\x11\x22\x33\x44\x55\x66\x77\x88"
15230 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15231 "\x22\x33\x44\x55"
15232 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15233 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15234 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15235 .klen = 8 + 20 + 24,
15236 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15237 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015238 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15239 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15240 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015241 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15242 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15243 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15244 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15245 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15246 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15247 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15248 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15249 .ilen = 64,
15250 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15251 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15252 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15253 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15254 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15255 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15256 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15257 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15258 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
15259 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
15260 "\x47\x4c\xfc\x36",
15261 .rlen = 64 + 20,
15262 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15263#ifdef __LITTLE_ENDIAN
15264 .key = "\x08\x00" /* rta length */
15265 "\x01\x00" /* rta type */
15266#else
15267 .key = "\x00\x08" /* rta length */
15268 "\x00\x01" /* rta type */
15269#endif
15270 "\x00\x00\x00\x20" /* enc key length */
15271 "\x11\x22\x33\x44\x55\x66\x77\x88"
15272 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15273 "\x22\x33\x44\x55"
15274 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15275 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15276 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15277 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15278 .klen = 8 + 20 + 32,
15279 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15280 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015281 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15282 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15283 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015284 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15285 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15286 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15287 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15288 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15289 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15290 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15291 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15292 .ilen = 64,
15293 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15294 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15295 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15296 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15297 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15298 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15299 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15300 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15301 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
15302 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
15303 "\x51\xee\xd6\x4e",
15304 .rlen = 64 + 20,
15305 },
15306};
15307
Nitesh Lal5208ed22014-05-21 17:09:08 +053015308static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015309 { /* Input data from RFC 2410 Case 1 */
15310#ifdef __LITTLE_ENDIAN
15311 .key = "\x08\x00" /* rta length */
15312 "\x01\x00" /* rta type */
15313#else
15314 .key = "\x00\x08" /* rta length */
15315 "\x00\x01" /* rta type */
15316#endif
15317 "\x00\x00\x00\x00" /* enc key length */
15318 "\x00\x00\x00\x00\x00\x00\x00\x00"
15319 "\x00\x00\x00\x00\x00\x00\x00\x00"
15320 "\x00\x00\x00\x00",
15321 .klen = 8 + 20 + 0,
15322 .iv = "",
15323 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15324 .ilen = 8,
15325 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15326 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15327 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15328 "\x8c\x5e\xe4\x08",
15329 .rlen = 8 + 20,
15330 }, { /* Input data from RFC 2410 Case 2 */
15331#ifdef __LITTLE_ENDIAN
15332 .key = "\x08\x00" /* rta length */
15333 "\x01\x00" /* rta type */
15334#else
15335 .key = "\x00\x08" /* rta length */
15336 "\x00\x01" /* rta type */
15337#endif
15338 "\x00\x00\x00\x00" /* enc key length */
15339 "\x00\x00\x00\x00\x00\x00\x00\x00"
15340 "\x00\x00\x00\x00\x00\x00\x00\x00"
15341 "\x00\x00\x00\x00",
15342 .klen = 8 + 20 + 0,
15343 .iv = "",
15344 .input = "Network Security People Have A Strange Sense Of Humor",
15345 .ilen = 53,
15346 .result = "Network Security People Have A Strange Sense Of Humor"
15347 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15348 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15349 "\x91\x56\xe4\xd6",
15350 .rlen = 53 + 20,
15351 },
15352};
15353
Nitesh Lal5208ed22014-05-21 17:09:08 +053015354static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015355 {
15356#ifdef __LITTLE_ENDIAN
15357 .key = "\x08\x00" /* rta length */
15358 "\x01\x00" /* rta type */
15359#else
15360 .key = "\x00\x08" /* rta length */
15361 "\x00\x01" /* rta type */
15362#endif
15363 "\x00\x00\x00\x00" /* enc key length */
15364 "\x00\x00\x00\x00\x00\x00\x00\x00"
15365 "\x00\x00\x00\x00\x00\x00\x00\x00"
15366 "\x00\x00\x00\x00",
15367 .klen = 8 + 20 + 0,
15368 .iv = "",
15369 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15370 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15371 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15372 "\x8c\x5e\xe4\x08",
15373 .ilen = 8 + 20,
15374 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15375 .rlen = 8,
15376 }, {
15377#ifdef __LITTLE_ENDIAN
15378 .key = "\x08\x00" /* rta length */
15379 "\x01\x00" /* rta type */
15380#else
15381 .key = "\x00\x08" /* rta length */
15382 "\x00\x01" /* rta type */
15383#endif
15384 "\x00\x00\x00\x00" /* enc key length */
15385 "\x00\x00\x00\x00\x00\x00\x00\x00"
15386 "\x00\x00\x00\x00\x00\x00\x00\x00"
15387 "\x00\x00\x00\x00",
15388 .klen = 8 + 20 + 0,
15389 .iv = "",
15390 .input = "Network Security People Have A Strange Sense Of Humor"
15391 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15392 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15393 "\x91\x56\xe4\xd6",
15394 .ilen = 53 + 20,
15395 .result = "Network Security People Have A Strange Sense Of Humor",
15396 .rlen = 53,
15397 },
15398};
15399
Nitesh Lal5208ed22014-05-21 17:09:08 +053015400static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015401 { /* RFC 3602 Case 1 */
15402#ifdef __LITTLE_ENDIAN
15403 .key = "\x08\x00" /* rta length */
15404 "\x01\x00" /* rta type */
15405#else
15406 .key = "\x00\x08" /* rta length */
15407 "\x00\x01" /* rta type */
15408#endif
15409 "\x00\x00\x00\x10" /* enc key length */
15410 "\x00\x00\x00\x00\x00\x00\x00\x00"
15411 "\x00\x00\x00\x00\x00\x00\x00\x00"
15412 "\x00\x00\x00\x00\x00\x00\x00\x00"
15413 "\x00\x00\x00\x00\x00\x00\x00\x00"
15414 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15415 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15416 .klen = 8 + 32 + 16,
15417 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15418 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
Herbert Xu7079ce62015-07-30 17:53:14 +080015419 .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15420 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15421 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015422 .input = "Single block msg",
15423 .ilen = 16,
15424 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15425 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15426 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
15427 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
15428 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
15429 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
15430 .rlen = 16 + 32,
15431 }, { /* RFC 3602 Case 2 */
15432#ifdef __LITTLE_ENDIAN
15433 .key = "\x08\x00" /* rta length */
15434 "\x01\x00" /* rta type */
15435#else
15436 .key = "\x00\x08" /* rta length */
15437 "\x00\x01" /* rta type */
15438#endif
15439 "\x00\x00\x00\x10" /* enc key length */
15440 "\x20\x21\x22\x23\x24\x25\x26\x27"
15441 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15442 "\x30\x31\x32\x33\x34\x35\x36\x37"
15443 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15444 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15445 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15446 .klen = 8 + 32 + 16,
15447 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15448 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
Herbert Xu7079ce62015-07-30 17:53:14 +080015449 .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15450 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15451 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015452 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15453 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15454 "\x10\x11\x12\x13\x14\x15\x16\x17"
15455 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15456 .ilen = 32,
15457 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15458 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15459 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15460 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15461 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
15462 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
15463 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
15464 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
15465 .rlen = 32 + 32,
15466 }, { /* RFC 3602 Case 3 */
15467#ifdef __LITTLE_ENDIAN
15468 .key = "\x08\x00" /* rta length */
15469 "\x01\x00" /* rta type */
15470#else
15471 .key = "\x00\x08" /* rta length */
15472 "\x00\x01" /* rta type */
15473#endif
15474 "\x00\x00\x00\x10" /* enc key length */
15475 "\x11\x22\x33\x44\x55\x66\x77\x88"
15476 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15477 "\x22\x33\x44\x55\x66\x77\x88\x99"
15478 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15479 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15480 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15481 .klen = 8 + 32 + 16,
15482 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15483 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
Herbert Xu7079ce62015-07-30 17:53:14 +080015484 .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15485 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15486 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015487 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15488 .ilen = 48,
15489 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15490 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15491 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15492 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15493 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15494 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15495 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
15496 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
15497 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
15498 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
15499 .rlen = 48 + 32,
15500 }, { /* RFC 3602 Case 4 */
15501#ifdef __LITTLE_ENDIAN
15502 .key = "\x08\x00" /* rta length */
15503 "\x01\x00" /* rta type */
15504#else
15505 .key = "\x00\x08" /* rta length */
15506 "\x00\x01" /* rta type */
15507#endif
15508 "\x00\x00\x00\x10" /* enc key length */
15509 "\x11\x22\x33\x44\x55\x66\x77\x88"
15510 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15511 "\x22\x33\x44\x55\x66\x77\x88\x99"
15512 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15513 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15514 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15515 .klen = 8 + 32 + 16,
15516 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15517 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
Herbert Xu7079ce62015-07-30 17:53:14 +080015518 .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15519 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15520 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015521 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15522 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15523 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15524 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15525 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15526 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15527 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15528 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15529 .ilen = 64,
15530 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15531 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15532 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15533 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15534 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15535 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15536 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15537 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15538 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
15539 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
15540 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
15541 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
15542 .rlen = 64 + 32,
15543 }, { /* RFC 3602 Case 5 */
15544#ifdef __LITTLE_ENDIAN
15545 .key = "\x08\x00" /* rta length */
15546 "\x01\x00" /* rta type */
15547#else
15548 .key = "\x00\x08" /* rta length */
15549 "\x00\x01" /* rta type */
15550#endif
15551 "\x00\x00\x00\x10" /* enc key length */
15552 "\x11\x22\x33\x44\x55\x66\x77\x88"
15553 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15554 "\x22\x33\x44\x55\x66\x77\x88\x99"
15555 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15556 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15557 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15558 .klen = 8 + 32 + 16,
15559 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15560 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
Herbert Xu7079ce62015-07-30 17:53:14 +080015561 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
15562 "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15563 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15564 .alen = 24,
Horia Geantae46e9a42012-07-03 19:16:54 +030015565 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15566 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15567 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15568 "\x10\x11\x12\x13\x14\x15\x16\x17"
15569 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15570 "\x20\x21\x22\x23\x24\x25\x26\x27"
15571 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15572 "\x30\x31\x32\x33\x34\x35\x36\x37"
15573 "\x01\x02\x03\x04\x05\x06\x07\x08"
15574 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15575 .ilen = 80,
15576 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15577 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15578 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15579 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15580 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15581 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15582 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15583 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15584 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15585 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15586 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
15587 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
15588 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
15589 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
15590 .rlen = 80 + 32,
15591 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
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\x18" /* 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 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15605 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15606 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15607 .klen = 8 + 32 + 24,
15608 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15609 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015610 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15611 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15612 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015613 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15614 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15615 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15616 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15617 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15618 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15619 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15620 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15621 .ilen = 64,
15622 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15623 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15624 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15625 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15626 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15627 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15628 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15629 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15630 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
15631 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
15632 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
15633 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
15634 .rlen = 64 + 32,
15635 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15636#ifdef __LITTLE_ENDIAN
15637 .key = "\x08\x00" /* rta length */
15638 "\x01\x00" /* rta type */
15639#else
15640 .key = "\x00\x08" /* rta length */
15641 "\x00\x01" /* rta type */
15642#endif
15643 "\x00\x00\x00\x20" /* enc key length */
15644 "\x11\x22\x33\x44\x55\x66\x77\x88"
15645 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15646 "\x22\x33\x44\x55\x66\x77\x88\x99"
15647 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15648 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15649 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15650 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15651 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15652 .klen = 8 + 32 + 32,
15653 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15654 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015655 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15656 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15657 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015658 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15659 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15660 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15661 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15662 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15663 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15664 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15665 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15666 .ilen = 64,
15667 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15668 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15669 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15670 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15671 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15672 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15673 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15674 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15675 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
15676 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
15677 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
15678 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
15679 .rlen = 64 + 32,
15680 },
15681};
15682
Nitesh Lal5208ed22014-05-21 17:09:08 +053015683static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015684 { /* RFC 3602 Case 1 */
15685#ifdef __LITTLE_ENDIAN
15686 .key = "\x08\x00" /* rta length */
15687 "\x01\x00" /* rta type */
15688#else
15689 .key = "\x00\x08" /* rta length */
15690 "\x00\x01" /* rta type */
15691#endif
15692 "\x00\x00\x00\x10" /* enc key length */
15693 "\x00\x00\x00\x00\x00\x00\x00\x00"
15694 "\x00\x00\x00\x00\x00\x00\x00\x00"
15695 "\x00\x00\x00\x00\x00\x00\x00\x00"
15696 "\x00\x00\x00\x00\x00\x00\x00\x00"
15697 "\x00\x00\x00\x00\x00\x00\x00\x00"
15698 "\x00\x00\x00\x00\x00\x00\x00\x00"
15699 "\x00\x00\x00\x00\x00\x00\x00\x00"
15700 "\x00\x00\x00\x00\x00\x00\x00\x00"
15701 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15702 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15703 .klen = 8 + 64 + 16,
15704 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15705 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
Herbert Xu7079ce62015-07-30 17:53:14 +080015706 .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15707 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15708 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015709 .input = "Single block msg",
15710 .ilen = 16,
15711 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15712 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15713 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
15714 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
15715 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
15716 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
15717 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
15718 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
15719 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
15720 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
15721 .rlen = 16 + 64,
15722 }, { /* RFC 3602 Case 2 */
15723#ifdef __LITTLE_ENDIAN
15724 .key = "\x08\x00" /* rta length */
15725 "\x01\x00" /* rta type */
15726#else
15727 .key = "\x00\x08" /* rta length */
15728 "\x00\x01" /* rta type */
15729#endif
15730 "\x00\x00\x00\x10" /* enc key length */
15731 "\x20\x21\x22\x23\x24\x25\x26\x27"
15732 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15733 "\x30\x31\x32\x33\x34\x35\x36\x37"
15734 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15735 "\x40\x41\x42\x43\x44\x45\x46\x47"
15736 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15737 "\x50\x51\x52\x53\x54\x55\x56\x57"
15738 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15739 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15740 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15741 .klen = 8 + 64 + 16,
15742 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15743 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
Herbert Xu7079ce62015-07-30 17:53:14 +080015744 .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15745 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15746 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015747 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15748 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15749 "\x10\x11\x12\x13\x14\x15\x16\x17"
15750 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15751 .ilen = 32,
15752 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15753 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15754 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15755 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15756 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
15757 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
15758 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
15759 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
15760 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
15761 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
15762 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
15763 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
15764 .rlen = 32 + 64,
15765 }, { /* RFC 3602 Case 3 */
15766#ifdef __LITTLE_ENDIAN
15767 .key = "\x08\x00" /* rta length */
15768 "\x01\x00" /* rta type */
15769#else
15770 .key = "\x00\x08" /* rta length */
15771 "\x00\x01" /* rta type */
15772#endif
15773 "\x00\x00\x00\x10" /* enc key length */
15774 "\x11\x22\x33\x44\x55\x66\x77\x88"
15775 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15776 "\x22\x33\x44\x55\x66\x77\x88\x99"
15777 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15778 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15779 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15780 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15781 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15782 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15783 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15784 .klen = 8 + 64 + 16,
15785 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15786 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
Herbert Xu7079ce62015-07-30 17:53:14 +080015787 .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15788 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15789 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015790 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15791 .ilen = 48,
15792 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15793 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15794 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15795 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15796 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15797 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15798 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
15799 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
15800 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
15801 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
15802 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
15803 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
15804 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
15805 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
15806 .rlen = 48 + 64,
15807 }, { /* RFC 3602 Case 4 */
15808#ifdef __LITTLE_ENDIAN
15809 .key = "\x08\x00" /* rta length */
15810 "\x01\x00" /* rta type */
15811#else
15812 .key = "\x00\x08" /* rta length */
15813 "\x00\x01" /* rta type */
15814#endif
15815 "\x00\x00\x00\x10" /* enc key length */
15816 "\x11\x22\x33\x44\x55\x66\x77\x88"
15817 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15818 "\x22\x33\x44\x55\x66\x77\x88\x99"
15819 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15820 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15821 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15822 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15823 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15824 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15825 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15826 .klen = 8 + 64 + 16,
15827 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15828 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
Herbert Xu7079ce62015-07-30 17:53:14 +080015829 .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15830 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15831 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015832 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15833 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15834 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15835 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15836 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15837 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15838 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15839 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15840 .ilen = 64,
15841 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15842 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15843 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15844 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15845 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15846 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15847 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15848 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15849 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
15850 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
15851 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
15852 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
15853 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
15854 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
15855 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
15856 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
15857 .rlen = 64 + 64,
15858 }, { /* RFC 3602 Case 5 */
15859#ifdef __LITTLE_ENDIAN
15860 .key = "\x08\x00" /* rta length */
15861 "\x01\x00" /* rta type */
15862#else
15863 .key = "\x00\x08" /* rta length */
15864 "\x00\x01" /* rta type */
15865#endif
15866 "\x00\x00\x00\x10" /* enc key length */
15867 "\x11\x22\x33\x44\x55\x66\x77\x88"
15868 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15869 "\x22\x33\x44\x55\x66\x77\x88\x99"
15870 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15871 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15872 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15873 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15874 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15875 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15876 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15877 .klen = 8 + 64 + 16,
15878 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15879 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
Herbert Xu7079ce62015-07-30 17:53:14 +080015880 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
15881 "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15882 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15883 .alen = 24,
Horia Geantae46e9a42012-07-03 19:16:54 +030015884 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15885 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15886 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15887 "\x10\x11\x12\x13\x14\x15\x16\x17"
15888 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15889 "\x20\x21\x22\x23\x24\x25\x26\x27"
15890 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15891 "\x30\x31\x32\x33\x34\x35\x36\x37"
15892 "\x01\x02\x03\x04\x05\x06\x07\x08"
15893 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15894 .ilen = 80,
15895 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15896 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15897 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15898 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15899 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15900 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15901 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15902 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15903 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15904 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15905 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
15906 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
15907 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
15908 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
15909 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
15910 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
15911 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
15912 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
15913 .rlen = 80 + 64,
15914 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15915#ifdef __LITTLE_ENDIAN
15916 .key = "\x08\x00" /* rta length */
15917 "\x01\x00" /* rta type */
15918#else
15919 .key = "\x00\x08" /* rta length */
15920 "\x00\x01" /* rta type */
15921#endif
15922 "\x00\x00\x00\x18" /* enc key length */
15923 "\x11\x22\x33\x44\x55\x66\x77\x88"
15924 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15925 "\x22\x33\x44\x55\x66\x77\x88\x99"
15926 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15927 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15928 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15929 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15930 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15931 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15932 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15933 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15934 .klen = 8 + 64 + 24,
15935 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15936 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015937 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15938 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15939 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015940 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15941 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15942 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15943 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15944 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15945 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15946 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15947 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15948 .ilen = 64,
15949 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15950 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15951 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15952 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15953 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15954 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15955 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15956 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15957 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
15958 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
15959 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
15960 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
15961 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
15962 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
15963 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
15964 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
15965 .rlen = 64 + 64,
15966 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15967#ifdef __LITTLE_ENDIAN
15968 .key = "\x08\x00" /* rta length */
15969 "\x01\x00" /* rta type */
15970#else
15971 .key = "\x00\x08" /* rta length */
15972 "\x00\x01" /* rta type */
15973#endif
15974 "\x00\x00\x00\x20" /* enc key length */
15975 "\x11\x22\x33\x44\x55\x66\x77\x88"
15976 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15977 "\x22\x33\x44\x55\x66\x77\x88\x99"
15978 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15979 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15980 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15981 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15982 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15983 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15984 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15985 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15986 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15987 .klen = 8 + 64 + 32,
15988 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15989 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015990 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15991 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15992 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015993 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15994 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15995 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15996 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15997 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15998 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15999 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
16000 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
16001 .ilen = 64,
16002 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
16003 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
16004 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
16005 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
16006 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
16007 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
16008 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
16009 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
16010 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
16011 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
16012 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
16013 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
16014 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
16015 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
16016 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
16017 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
16018 .rlen = 64 + 64,
16019 },
16020};
16021
Nitesh Lal5208ed22014-05-21 17:09:08 +053016022#define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1
16023
16024static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = {
16025 { /*Generated with cryptopp*/
16026#ifdef __LITTLE_ENDIAN
16027 .key = "\x08\x00" /* rta length */
16028 "\x01\x00" /* rta type */
16029#else
16030 .key = "\x00\x08" /* rta length */
16031 "\x00\x01" /* rta type */
16032#endif
16033 "\x00\x00\x00\x08" /* enc key length */
16034 "\x11\x22\x33\x44\x55\x66\x77\x88"
16035 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16036 "\x22\x33\x44\x55"
16037 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16038 .klen = 8 + 20 + 8,
16039 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016040 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16041 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16042 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016043 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16044 "\x53\x20\x63\x65\x65\x72\x73\x74"
16045 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16046 "\x20\x79\x65\x53\x72\x63\x74\x65"
16047 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16048 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16049 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16050 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16051 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16052 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16053 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16054 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16055 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16056 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16057 "\x63\x65\x65\x72\x73\x74\x54\x20"
16058 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16059 .ilen = 128,
16060 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16061 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16062 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16063 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16064 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16065 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16066 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16067 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16068 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16069 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16070 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16071 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16072 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16073 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16074 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16075 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16076 "\x95\x16\x20\x09\xf5\x95\x19\xfd"
16077 "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa"
16078 "\x5c\x44\xa9\x37",
16079 .rlen = 128 + 20,
16080 },
16081};
16082
16083#define HMAC_SHA224_DES_CBC_ENC_TEST_VEC 1
16084
16085static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = {
16086 { /*Generated with cryptopp*/
16087#ifdef __LITTLE_ENDIAN
16088 .key = "\x08\x00" /* rta length */
16089 "\x01\x00" /* rta type */
16090#else
16091 .key = "\x00\x08" /* rta length */
16092 "\x00\x01" /* rta type */
16093#endif
16094 "\x00\x00\x00\x08" /* enc key length */
16095 "\x11\x22\x33\x44\x55\x66\x77\x88"
16096 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16097 "\x22\x33\x44\x55\x66\x77\x88\x99"
16098 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16099 .klen = 8 + 24 + 8,
16100 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016101 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16102 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16103 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016104 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16105 "\x53\x20\x63\x65\x65\x72\x73\x74"
16106 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16107 "\x20\x79\x65\x53\x72\x63\x74\x65"
16108 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16109 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16110 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16111 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16112 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16113 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16114 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16115 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16116 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16117 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16118 "\x63\x65\x65\x72\x73\x74\x54\x20"
16119 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16120 .ilen = 128,
16121 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16122 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16123 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16124 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16125 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16126 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16127 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16128 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16129 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16130 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16131 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16132 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16133 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16134 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16135 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16136 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16137 "\x9c\x2d\x7e\xee\x20\x34\x55\x0a"
16138 "\xce\xb5\x4e\x64\x53\xe7\xbf\x91"
16139 "\xab\xd4\xd9\xda\xc9\x12\xae\xf7",
16140 .rlen = 128 + 24,
16141 },
16142};
16143
16144#define HMAC_SHA256_DES_CBC_ENC_TEST_VEC 1
16145
16146static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = {
16147 { /*Generated with cryptopp*/
16148#ifdef __LITTLE_ENDIAN
16149 .key = "\x08\x00" /* rta length */
16150 "\x01\x00" /* rta type */
16151#else
16152 .key = "\x00\x08" /* rta length */
16153 "\x00\x01" /* rta type */
16154#endif
16155 "\x00\x00\x00\x08" /* enc key length */
16156 "\x11\x22\x33\x44\x55\x66\x77\x88"
16157 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16158 "\x22\x33\x44\x55\x66\x77\x88\x99"
16159 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16160 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16161 .klen = 8 + 32 + 8,
16162 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016163 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16164 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16165 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016166 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16167 "\x53\x20\x63\x65\x65\x72\x73\x74"
16168 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16169 "\x20\x79\x65\x53\x72\x63\x74\x65"
16170 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16171 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16172 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16173 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16174 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16175 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16176 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16177 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16178 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16179 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16180 "\x63\x65\x65\x72\x73\x74\x54\x20"
16181 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16182 .ilen = 128,
16183 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16184 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16185 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16186 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16187 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16188 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16189 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16190 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16191 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16192 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16193 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16194 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16195 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16196 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16197 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16198 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16199 "\xc6\x58\xa1\x60\x70\x91\x39\x36"
16200 "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e"
16201 "\xde\x63\xde\x76\x52\xde\x9f\xba"
16202 "\x90\xcf\x15\xf2\xbb\x6e\x84\x00",
16203 .rlen = 128 + 32,
16204 },
16205};
16206
16207#define HMAC_SHA384_DES_CBC_ENC_TEST_VEC 1
16208
16209static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = {
16210 { /*Generated with cryptopp*/
16211#ifdef __LITTLE_ENDIAN
16212 .key = "\x08\x00" /* rta length */
16213 "\x01\x00" /* rta type */
16214#else
16215 .key = "\x00\x08" /* rta length */
16216 "\x00\x01" /* rta type */
16217#endif
16218 "\x00\x00\x00\x08" /* enc key length */
16219 "\x11\x22\x33\x44\x55\x66\x77\x88"
16220 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16221 "\x22\x33\x44\x55\x66\x77\x88\x99"
16222 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16223 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16224 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16225 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16226 .klen = 8 + 48 + 8,
16227 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016228 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16229 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16230 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016231 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16232 "\x53\x20\x63\x65\x65\x72\x73\x74"
16233 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16234 "\x20\x79\x65\x53\x72\x63\x74\x65"
16235 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16236 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16237 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16238 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16239 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16240 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16241 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16242 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16243 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16244 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16245 "\x63\x65\x65\x72\x73\x74\x54\x20"
16246 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16247 .ilen = 128,
16248 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16249 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16250 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16251 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16252 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16253 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16254 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16255 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16256 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16257 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16258 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16259 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16260 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16261 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16262 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16263 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16264 "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0"
16265 "\xc8\x8c\xef\x25\x07\x83\x11\x3a"
16266 "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe"
16267 "\x5e\x67\xb5\x74\xe7\xe7\x85\x61"
16268 "\x6a\x95\x26\x75\xcc\x53\x89\xf3"
16269 "\x74\xc9\x2a\x76\x20\xa2\x64\x62",
16270 .rlen = 128 + 48,
16271 },
16272};
16273
16274#define HMAC_SHA512_DES_CBC_ENC_TEST_VEC 1
16275
16276static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = {
16277 { /*Generated with cryptopp*/
16278#ifdef __LITTLE_ENDIAN
16279 .key = "\x08\x00" /* rta length */
16280 "\x01\x00" /* rta type */
16281#else
16282 .key = "\x00\x08" /* rta length */
16283 "\x00\x01" /* rta type */
16284#endif
16285 "\x00\x00\x00\x08" /* enc key length */
16286 "\x11\x22\x33\x44\x55\x66\x77\x88"
16287 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16288 "\x22\x33\x44\x55\x66\x77\x88\x99"
16289 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16290 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16291 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16292 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16293 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16294 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16295 .klen = 8 + 64 + 8,
16296 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016297 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16298 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16299 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016300 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16301 "\x53\x20\x63\x65\x65\x72\x73\x74"
16302 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16303 "\x20\x79\x65\x53\x72\x63\x74\x65"
16304 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16305 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16306 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16307 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16308 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16309 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16310 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16311 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16312 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16313 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16314 "\x63\x65\x65\x72\x73\x74\x54\x20"
16315 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16316 .ilen = 128,
16317 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16318 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16319 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16320 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16321 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16322 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16323 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16324 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16325 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16326 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16327 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16328 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16329 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16330 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16331 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16332 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16333 "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e"
16334 "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb"
16335 "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb"
16336 "\x58\x83\xda\x67\xfb\x21\x24\xa2"
16337 "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93"
16338 "\x97\xe2\xe3\xb8\xaa\x48\x85\xee"
16339 "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96"
16340 "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b",
16341 .rlen = 128 + 64,
16342 },
16343};
16344
16345#define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC 1
16346
16347static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = {
16348 { /*Generated with cryptopp*/
16349#ifdef __LITTLE_ENDIAN
16350 .key = "\x08\x00" /* rta length */
16351 "\x01\x00" /* rta type */
16352#else
16353 .key = "\x00\x08" /* rta length */
16354 "\x00\x01" /* rta type */
16355#endif
16356 "\x00\x00\x00\x18" /* enc key length */
16357 "\x11\x22\x33\x44\x55\x66\x77\x88"
16358 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16359 "\x22\x33\x44\x55"
16360 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16361 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16362 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16363 .klen = 8 + 20 + 24,
16364 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016365 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16366 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16367 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016368 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16369 "\x53\x20\x63\x65\x65\x72\x73\x74"
16370 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16371 "\x20\x79\x65\x53\x72\x63\x74\x65"
16372 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16373 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16374 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16375 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16376 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16377 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16378 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16379 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16380 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16381 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16382 "\x63\x65\x65\x72\x73\x74\x54\x20"
16383 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16384 .ilen = 128,
16385 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16386 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16387 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16388 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16389 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16390 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16391 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16392 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16393 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16394 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16395 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16396 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16397 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16398 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16399 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16400 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16401 "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6"
16402 "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf"
16403 "\xd1\x60\x91\xb3",
16404 .rlen = 128 + 20,
16405 },
16406};
16407
16408#define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC 1
16409
16410static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = {
16411 { /*Generated with cryptopp*/
16412#ifdef __LITTLE_ENDIAN
16413 .key = "\x08\x00" /* rta length */
16414 "\x01\x00" /* rta type */
16415#else
16416 .key = "\x00\x08" /* rta length */
16417 "\x00\x01" /* rta type */
16418#endif
16419 "\x00\x00\x00\x18" /* enc key length */
16420 "\x11\x22\x33\x44\x55\x66\x77\x88"
16421 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16422 "\x22\x33\x44\x55\x66\x77\x88\x99"
16423 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16424 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16425 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16426 .klen = 8 + 24 + 24,
16427 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016428 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16429 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16430 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016431 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16432 "\x53\x20\x63\x65\x65\x72\x73\x74"
16433 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16434 "\x20\x79\x65\x53\x72\x63\x74\x65"
16435 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16436 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16437 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16438 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16439 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16440 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16441 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16442 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16443 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16444 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16445 "\x63\x65\x65\x72\x73\x74\x54\x20"
16446 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16447 .ilen = 128,
16448 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16449 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16450 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16451 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16452 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16453 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16454 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16455 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16456 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16457 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16458 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16459 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16460 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16461 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16462 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16463 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16464 "\x15\x24\x7f\x5a\x45\x4a\x66\xce"
16465 "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c"
16466 "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0",
16467 .rlen = 128 + 24,
16468 },
16469};
16470
16471#define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC 1
16472
16473static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = {
16474 { /*Generated with cryptopp*/
16475#ifdef __LITTLE_ENDIAN
16476 .key = "\x08\x00" /* rta length */
16477 "\x01\x00" /* rta type */
16478#else
16479 .key = "\x00\x08" /* rta length */
16480 "\x00\x01" /* rta type */
16481#endif
16482 "\x00\x00\x00\x18" /* enc key length */
16483 "\x11\x22\x33\x44\x55\x66\x77\x88"
16484 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16485 "\x22\x33\x44\x55\x66\x77\x88\x99"
16486 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16487 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16488 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16489 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16490 .klen = 8 + 32 + 24,
16491 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016492 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16493 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16494 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016495 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16496 "\x53\x20\x63\x65\x65\x72\x73\x74"
16497 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16498 "\x20\x79\x65\x53\x72\x63\x74\x65"
16499 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16500 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16501 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16502 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16503 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16504 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16505 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16506 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16507 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16508 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16509 "\x63\x65\x65\x72\x73\x74\x54\x20"
16510 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16511 .ilen = 128,
16512 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16513 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16514 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16515 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16516 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16517 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16518 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16519 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16520 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16521 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16522 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16523 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16524 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16525 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16526 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16527 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16528 "\x73\xb0\xea\x9f\xe8\x18\x80\xd6"
16529 "\x56\x38\x44\xc0\xdb\xe3\x4f\x71"
16530 "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f"
16531 "\xca\x43\x95\xdf\x80\x61\x81\xa9",
16532 .rlen = 128 + 32,
16533 },
16534};
16535
16536#define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC 1
16537
16538static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = {
16539 { /*Generated with cryptopp*/
16540#ifdef __LITTLE_ENDIAN
16541 .key = "\x08\x00" /* rta length */
16542 "\x01\x00" /* rta type */
16543#else
16544 .key = "\x00\x08" /* rta length */
16545 "\x00\x01" /* rta type */
16546#endif
16547 "\x00\x00\x00\x18" /* enc key length */
16548 "\x11\x22\x33\x44\x55\x66\x77\x88"
16549 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16550 "\x22\x33\x44\x55\x66\x77\x88\x99"
16551 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16552 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16553 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16554 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16555 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16556 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16557 .klen = 8 + 48 + 24,
16558 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016559 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16560 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16561 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016562 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16563 "\x53\x20\x63\x65\x65\x72\x73\x74"
16564 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16565 "\x20\x79\x65\x53\x72\x63\x74\x65"
16566 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16567 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16568 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16569 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16570 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16571 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16572 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16573 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16574 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16575 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16576 "\x63\x65\x65\x72\x73\x74\x54\x20"
16577 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16578 .ilen = 128,
16579 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16580 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16581 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16582 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16583 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16584 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16585 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16586 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16587 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16588 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16589 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16590 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16591 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16592 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16593 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16594 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16595 "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7"
16596 "\x70\xe7\x93\xbf\x73\xe6\x9f\x83"
16597 "\x99\x62\x23\xe6\x5b\xd0\xda\x18"
16598 "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39"
16599 "\x36\x5d\x13\x2f\x86\x10\x78\xd6"
16600 "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b",
16601 .rlen = 128 + 48,
16602 },
16603};
16604
16605#define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC 1
16606
16607static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = {
16608 { /*Generated with cryptopp*/
16609#ifdef __LITTLE_ENDIAN
16610 .key = "\x08\x00" /* rta length */
16611 "\x01\x00" /* rta type */
16612#else
16613 .key = "\x00\x08" /* rta length */
16614 "\x00\x01" /* rta type */
16615#endif
16616 "\x00\x00\x00\x18" /* enc key length */
16617 "\x11\x22\x33\x44\x55\x66\x77\x88"
16618 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16619 "\x22\x33\x44\x55\x66\x77\x88\x99"
16620 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16621 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16622 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16623 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16624 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16625 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16626 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16627 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16628 .klen = 8 + 64 + 24,
16629 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016630 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16631 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16632 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016633 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16634 "\x53\x20\x63\x65\x65\x72\x73\x74"
16635 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16636 "\x20\x79\x65\x53\x72\x63\x74\x65"
16637 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16638 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16639 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16640 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16641 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16642 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16643 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16644 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16645 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16646 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16647 "\x63\x65\x65\x72\x73\x74\x54\x20"
16648 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16649 .ilen = 128,
16650 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16651 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16652 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16653 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16654 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16655 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16656 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16657 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16658 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16659 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16660 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16661 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16662 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16663 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16664 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16665 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16666 "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32"
16667 "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e"
16668 "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b"
16669 "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60"
16670 "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0"
16671 "\x2a\x74\xd4\x65\x12\xcb\x55\xf2"
16672 "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2"
16673 "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb",
16674 .rlen = 128 + 64,
16675 },
16676};
16677
Herbert Xuda7f0332008-07-31 17:08:25 +080016678static struct cipher_testvec aes_lrw_enc_tv_template[] = {
16679 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16680 { /* LRW-32-AES 1 */
16681 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16682 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16683 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16684 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16685 .klen = 32,
16686 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16687 "\x00\x00\x00\x00\x00\x00\x00\x01",
16688 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16689 "\x38\x39\x41\x42\x43\x44\x45\x46",
16690 .ilen = 16,
16691 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16692 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16693 .rlen = 16,
16694 }, { /* LRW-32-AES 2 */
16695 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16696 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16697 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16698 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16699 .klen = 32,
16700 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16701 "\x00\x00\x00\x00\x00\x00\x00\x02",
16702 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16703 "\x38\x39\x41\x42\x43\x44\x45\x46",
16704 .ilen = 16,
16705 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16706 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16707 .rlen = 16,
16708 }, { /* LRW-32-AES 3 */
16709 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16710 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16711 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16712 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16713 .klen = 32,
16714 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16715 "\x00\x00\x00\x02\x00\x00\x00\x00",
16716 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16717 "\x38\x39\x41\x42\x43\x44\x45\x46",
16718 .ilen = 16,
16719 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16720 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16721 .rlen = 16,
16722 }, { /* LRW-32-AES 4 */
16723 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16724 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16725 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16726 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16727 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16728 .klen = 40,
16729 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16730 "\x00\x00\x00\x00\x00\x00\x00\x01",
16731 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16732 "\x38\x39\x41\x42\x43\x44\x45\x46",
16733 .ilen = 16,
16734 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16735 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16736 .rlen = 16,
16737 }, { /* LRW-32-AES 5 */
16738 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16739 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16740 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16741 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16742 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16743 .klen = 40,
16744 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16745 "\x00\x00\x00\x02\x00\x00\x00\x00",
16746 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16747 "\x38\x39\x41\x42\x43\x44\x45\x46",
16748 .ilen = 16,
16749 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16750 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16751 .rlen = 16,
16752 }, { /* LRW-32-AES 6 */
16753 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16754 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16755 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16756 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16757 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16758 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16759 .klen = 48,
16760 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16761 "\x00\x00\x00\x00\x00\x00\x00\x01",
16762 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16763 "\x38\x39\x41\x42\x43\x44\x45\x46",
16764 .ilen = 16,
16765 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16766 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16767 .rlen = 16,
16768 }, { /* LRW-32-AES 7 */
16769 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16770 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16771 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16772 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16773 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16774 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16775 .klen = 48,
16776 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16777 "\x00\x00\x00\x02\x00\x00\x00\x00",
16778 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16779 "\x38\x39\x41\x42\x43\x44\x45\x46",
16780 .ilen = 16,
16781 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16782 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16783 .rlen = 16,
16784 }, {
16785/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16786 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16787 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16788 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16789 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16790 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16791 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16792 .klen = 48,
16793 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16794 "\x00\x00\x00\x00\x00\x00\x00\x01",
16795 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16796 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16797 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16798 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16799 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16800 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16801 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16802 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16803 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16804 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16805 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16806 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16807 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16808 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16809 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16810 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16811 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16812 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16813 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16814 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16815 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16816 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16817 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16818 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16819 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16820 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16821 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16822 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16823 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16824 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16825 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16826 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16827 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16828 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16829 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16830 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16831 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16832 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16833 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16834 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16835 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16836 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16837 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16838 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16839 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16840 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16841 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16842 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16843 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16844 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16845 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16846 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16847 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16848 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16849 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16850 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16851 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16852 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16853 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16854 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16855 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16856 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16857 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16858 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16859 .ilen = 512,
16860 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16861 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16862 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16863 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16864 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16865 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16866 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16867 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16868 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16869 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16870 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16871 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16872 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16873 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16874 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16875 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16876 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16877 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16878 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16879 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16880 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16881 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16882 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16883 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16884 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16885 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16886 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16887 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16888 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16889 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16890 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16891 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16892 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16893 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16894 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16895 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16896 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16897 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16898 "\xb8\x79\x78\x97\x94\xff\x72\x13"
16899 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16900 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16901 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16902 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
16903 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
16904 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
16905 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
16906 "\x1e\x86\x53\x11\x53\x94\x00\xee"
16907 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
16908 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
16909 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
16910 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
16911 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
16912 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
16913 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
16914 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
16915 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
16916 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
16917 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
16918 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
16919 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
16920 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
16921 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
16922 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
16923 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
16924 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016925 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020016926 .np = 3,
16927 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016928 }
16929};
16930
16931static struct cipher_testvec aes_lrw_dec_tv_template[] = {
16932 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16933 /* same as enc vectors with input and result reversed */
16934 { /* LRW-32-AES 1 */
16935 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16936 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16937 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16938 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16939 .klen = 32,
16940 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16941 "\x00\x00\x00\x00\x00\x00\x00\x01",
16942 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16943 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16944 .ilen = 16,
16945 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16946 "\x38\x39\x41\x42\x43\x44\x45\x46",
16947 .rlen = 16,
16948 }, { /* LRW-32-AES 2 */
16949 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16950 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16951 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16952 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16953 .klen = 32,
16954 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16955 "\x00\x00\x00\x00\x00\x00\x00\x02",
16956 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16957 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16958 .ilen = 16,
16959 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16960 "\x38\x39\x41\x42\x43\x44\x45\x46",
16961 .rlen = 16,
16962 }, { /* LRW-32-AES 3 */
16963 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16964 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16965 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16966 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16967 .klen = 32,
16968 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16969 "\x00\x00\x00\x02\x00\x00\x00\x00",
16970 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16971 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16972 .ilen = 16,
16973 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16974 "\x38\x39\x41\x42\x43\x44\x45\x46",
16975 .rlen = 16,
16976 }, { /* LRW-32-AES 4 */
16977 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16978 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16979 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16980 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16981 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16982 .klen = 40,
16983 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16984 "\x00\x00\x00\x00\x00\x00\x00\x01",
16985 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16986 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16987 .ilen = 16,
16988 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16989 "\x38\x39\x41\x42\x43\x44\x45\x46",
16990 .rlen = 16,
16991 }, { /* LRW-32-AES 5 */
16992 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16993 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16994 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16995 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16996 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16997 .klen = 40,
16998 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16999 "\x00\x00\x00\x02\x00\x00\x00\x00",
17000 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
17001 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
17002 .ilen = 16,
17003 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17004 "\x38\x39\x41\x42\x43\x44\x45\x46",
17005 .rlen = 16,
17006 }, { /* LRW-32-AES 6 */
17007 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17008 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17009 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17010 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17011 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17012 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17013 .klen = 48,
17014 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17015 "\x00\x00\x00\x00\x00\x00\x00\x01",
17016 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
17017 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
17018 .ilen = 16,
17019 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17020 "\x38\x39\x41\x42\x43\x44\x45\x46",
17021 .rlen = 16,
17022 }, { /* LRW-32-AES 7 */
17023 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
17024 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
17025 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
17026 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
17027 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
17028 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
17029 .klen = 48,
17030 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17031 "\x00\x00\x00\x02\x00\x00\x00\x00",
17032 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
17033 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
17034 .ilen = 16,
17035 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17036 "\x38\x39\x41\x42\x43\x44\x45\x46",
17037 .rlen = 16,
17038 }, {
17039/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
17040 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17041 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17042 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17043 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17044 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17045 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17046 .klen = 48,
17047 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17048 "\x00\x00\x00\x00\x00\x00\x00\x01",
17049 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
17050 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
17051 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
17052 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
17053 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
17054 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
17055 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
17056 "\xe8\x58\x46\x97\x39\x51\x07\xde"
17057 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
17058 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
17059 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
17060 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
17061 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
17062 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
17063 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
17064 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
17065 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
17066 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
17067 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
17068 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
17069 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
17070 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
17071 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
17072 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
17073 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
17074 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
17075 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
17076 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
17077 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
17078 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
17079 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
17080 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
17081 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
17082 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
17083 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
17084 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
17085 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
17086 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
17087 "\xb8\x79\x78\x97\x94\xff\x72\x13"
17088 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
17089 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
17090 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
17091 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
17092 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
17093 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
17094 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
17095 "\x1e\x86\x53\x11\x53\x94\x00\xee"
17096 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
17097 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
17098 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
17099 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
17100 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
17101 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
17102 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
17103 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
17104 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
17105 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
17106 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
17107 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
17108 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
17109 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
17110 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
17111 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
17112 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
17113 .ilen = 512,
17114 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
17115 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
17116 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
17117 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
17118 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
17119 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
17120 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
17121 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
17122 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
17123 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
17124 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
17125 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
17126 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
17127 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
17128 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
17129 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
17130 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
17131 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
17132 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
17133 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
17134 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
17135 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
17136 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
17137 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
17138 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
17139 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
17140 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
17141 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
17142 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
17143 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
17144 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
17145 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
17146 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
17147 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
17148 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
17149 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
17150 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
17151 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
17152 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
17153 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
17154 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
17155 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
17156 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
17157 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
17158 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
17159 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
17160 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
17161 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
17162 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
17163 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
17164 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
17165 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
17166 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
17167 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
17168 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
17169 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
17170 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
17171 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
17172 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
17173 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
17174 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
17175 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
17176 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
17177 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
17178 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017179 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017180 .np = 3,
17181 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017182 }
17183};
17184
17185static struct cipher_testvec aes_xts_enc_tv_template[] = {
17186 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17187 { /* XTS-AES 1 */
17188 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17189 "\x00\x00\x00\x00\x00\x00\x00\x00"
17190 "\x00\x00\x00\x00\x00\x00\x00\x00"
17191 "\x00\x00\x00\x00\x00\x00\x00\x00",
17192 .klen = 32,
17193 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17194 "\x00\x00\x00\x00\x00\x00\x00\x00",
17195 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
17196 "\x00\x00\x00\x00\x00\x00\x00\x00"
17197 "\x00\x00\x00\x00\x00\x00\x00\x00"
17198 "\x00\x00\x00\x00\x00\x00\x00\x00",
17199 .ilen = 32,
17200 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17201 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17202 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17203 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17204 .rlen = 32,
17205 }, { /* XTS-AES 2 */
17206 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17207 "\x11\x11\x11\x11\x11\x11\x11\x11"
17208 "\x22\x22\x22\x22\x22\x22\x22\x22"
17209 "\x22\x22\x22\x22\x22\x22\x22\x22",
17210 .klen = 32,
17211 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17212 "\x00\x00\x00\x00\x00\x00\x00\x00",
17213 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
17214 "\x44\x44\x44\x44\x44\x44\x44\x44"
17215 "\x44\x44\x44\x44\x44\x44\x44\x44"
17216 "\x44\x44\x44\x44\x44\x44\x44\x44",
17217 .ilen = 32,
17218 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17219 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17220 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17221 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17222 .rlen = 32,
17223 }, { /* XTS-AES 3 */
17224 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17225 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17226 "\x22\x22\x22\x22\x22\x22\x22\x22"
17227 "\x22\x22\x22\x22\x22\x22\x22\x22",
17228 .klen = 32,
17229 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17230 "\x00\x00\x00\x00\x00\x00\x00\x00",
17231 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
17232 "\x44\x44\x44\x44\x44\x44\x44\x44"
17233 "\x44\x44\x44\x44\x44\x44\x44\x44"
17234 "\x44\x44\x44\x44\x44\x44\x44\x44",
17235 .ilen = 32,
17236 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17237 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17238 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17239 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17240 .rlen = 32,
17241 }, { /* XTS-AES 4 */
17242 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17243 "\x23\x53\x60\x28\x74\x71\x35\x26"
17244 "\x31\x41\x59\x26\x53\x58\x97\x93"
17245 "\x23\x84\x62\x64\x33\x83\x27\x95",
17246 .klen = 32,
17247 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17248 "\x00\x00\x00\x00\x00\x00\x00\x00",
17249 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17250 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17251 "\x10\x11\x12\x13\x14\x15\x16\x17"
17252 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17253 "\x20\x21\x22\x23\x24\x25\x26\x27"
17254 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17255 "\x30\x31\x32\x33\x34\x35\x36\x37"
17256 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17257 "\x40\x41\x42\x43\x44\x45\x46\x47"
17258 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17259 "\x50\x51\x52\x53\x54\x55\x56\x57"
17260 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17261 "\x60\x61\x62\x63\x64\x65\x66\x67"
17262 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17263 "\x70\x71\x72\x73\x74\x75\x76\x77"
17264 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17265 "\x80\x81\x82\x83\x84\x85\x86\x87"
17266 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17267 "\x90\x91\x92\x93\x94\x95\x96\x97"
17268 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17269 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17270 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17271 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17272 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17273 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17274 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17275 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17276 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17277 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17278 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17279 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17280 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17281 "\x00\x01\x02\x03\x04\x05\x06\x07"
17282 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17283 "\x10\x11\x12\x13\x14\x15\x16\x17"
17284 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17285 "\x20\x21\x22\x23\x24\x25\x26\x27"
17286 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17287 "\x30\x31\x32\x33\x34\x35\x36\x37"
17288 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17289 "\x40\x41\x42\x43\x44\x45\x46\x47"
17290 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17291 "\x50\x51\x52\x53\x54\x55\x56\x57"
17292 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17293 "\x60\x61\x62\x63\x64\x65\x66\x67"
17294 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17295 "\x70\x71\x72\x73\x74\x75\x76\x77"
17296 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17297 "\x80\x81\x82\x83\x84\x85\x86\x87"
17298 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17299 "\x90\x91\x92\x93\x94\x95\x96\x97"
17300 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17301 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17302 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17303 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17304 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17305 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17306 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17307 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17308 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17309 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17310 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17311 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17312 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17313 .ilen = 512,
17314 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17315 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17316 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17317 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17318 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17319 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17320 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17321 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17322 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17323 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17324 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17325 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17326 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17327 "\x22\x97\x61\x46\xae\x20\xce\x84"
17328 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17329 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17330 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17331 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17332 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17333 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17334 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17335 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17336 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17337 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17338 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17339 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17340 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17341 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17342 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17343 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17344 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17345 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17346 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17347 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17348 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17349 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17350 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17351 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17352 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17353 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17354 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17355 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17356 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17357 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17358 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17359 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17360 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17361 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17362 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17363 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17364 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17365 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17366 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17367 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17368 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17369 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17370 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17371 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17372 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17373 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17374 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17375 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17376 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17377 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17378 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017379 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17380 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17381 "\x23\x53\x60\x28\x74\x71\x35\x26"
17382 "\x62\x49\x77\x57\x24\x70\x93\x69"
17383 "\x99\x59\x57\x49\x66\x96\x76\x27"
17384 "\x31\x41\x59\x26\x53\x58\x97\x93"
17385 "\x23\x84\x62\x64\x33\x83\x27\x95"
17386 "\x02\x88\x41\x97\x16\x93\x99\x37"
17387 "\x51\x05\x82\x09\x74\x94\x45\x92",
17388 .klen = 64,
17389 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17390 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017391 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17392 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17393 "\x10\x11\x12\x13\x14\x15\x16\x17"
17394 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17395 "\x20\x21\x22\x23\x24\x25\x26\x27"
17396 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17397 "\x30\x31\x32\x33\x34\x35\x36\x37"
17398 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17399 "\x40\x41\x42\x43\x44\x45\x46\x47"
17400 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17401 "\x50\x51\x52\x53\x54\x55\x56\x57"
17402 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17403 "\x60\x61\x62\x63\x64\x65\x66\x67"
17404 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17405 "\x70\x71\x72\x73\x74\x75\x76\x77"
17406 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17407 "\x80\x81\x82\x83\x84\x85\x86\x87"
17408 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17409 "\x90\x91\x92\x93\x94\x95\x96\x97"
17410 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17411 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17412 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17413 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17414 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17415 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17416 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17417 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17418 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17419 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17420 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17421 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17422 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17423 "\x00\x01\x02\x03\x04\x05\x06\x07"
17424 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17425 "\x10\x11\x12\x13\x14\x15\x16\x17"
17426 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17427 "\x20\x21\x22\x23\x24\x25\x26\x27"
17428 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17429 "\x30\x31\x32\x33\x34\x35\x36\x37"
17430 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17431 "\x40\x41\x42\x43\x44\x45\x46\x47"
17432 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17433 "\x50\x51\x52\x53\x54\x55\x56\x57"
17434 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17435 "\x60\x61\x62\x63\x64\x65\x66\x67"
17436 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17437 "\x70\x71\x72\x73\x74\x75\x76\x77"
17438 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17439 "\x80\x81\x82\x83\x84\x85\x86\x87"
17440 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17441 "\x90\x91\x92\x93\x94\x95\x96\x97"
17442 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17443 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17444 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17445 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17446 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17447 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17448 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17449 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17450 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17451 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17452 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17453 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17454 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17455 .ilen = 512,
17456 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17457 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17458 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17459 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17460 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17461 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17462 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17463 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17464 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17465 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17466 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17467 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17468 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17469 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17470 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17471 "\x00\x02\x08\x87\x89\x14\x29\xca"
17472 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17473 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17474 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17475 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17476 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17477 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17478 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17479 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17480 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17481 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17482 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17483 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17484 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17485 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17486 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17487 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17488 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17489 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17490 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17491 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17492 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17493 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17494 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17495 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17496 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17497 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17498 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17499 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17500 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17501 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17502 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17503 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17504 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17505 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17506 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17507 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17508 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17509 "\x94\x30\x54\xff\x84\x01\x14\x93"
17510 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17511 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17512 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17513 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17514 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17515 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17516 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17517 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17518 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17519 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17520 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017521 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017522 .np = 3,
17523 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017524 }
17525};
17526
17527static struct cipher_testvec aes_xts_dec_tv_template[] = {
17528 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17529 { /* XTS-AES 1 */
17530 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17531 "\x00\x00\x00\x00\x00\x00\x00\x00"
17532 "\x00\x00\x00\x00\x00\x00\x00\x00"
17533 "\x00\x00\x00\x00\x00\x00\x00\x00",
17534 .klen = 32,
17535 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17536 "\x00\x00\x00\x00\x00\x00\x00\x00",
17537 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17538 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17539 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17540 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17541 .ilen = 32,
17542 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
17543 "\x00\x00\x00\x00\x00\x00\x00\x00"
17544 "\x00\x00\x00\x00\x00\x00\x00\x00"
17545 "\x00\x00\x00\x00\x00\x00\x00\x00",
17546 .rlen = 32,
17547 }, { /* XTS-AES 2 */
17548 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17549 "\x11\x11\x11\x11\x11\x11\x11\x11"
17550 "\x22\x22\x22\x22\x22\x22\x22\x22"
17551 "\x22\x22\x22\x22\x22\x22\x22\x22",
17552 .klen = 32,
17553 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17554 "\x00\x00\x00\x00\x00\x00\x00\x00",
17555 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17556 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17557 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17558 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17559 .ilen = 32,
17560 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17561 "\x44\x44\x44\x44\x44\x44\x44\x44"
17562 "\x44\x44\x44\x44\x44\x44\x44\x44"
17563 "\x44\x44\x44\x44\x44\x44\x44\x44",
17564 .rlen = 32,
17565 }, { /* XTS-AES 3 */
17566 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17567 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17568 "\x22\x22\x22\x22\x22\x22\x22\x22"
17569 "\x22\x22\x22\x22\x22\x22\x22\x22",
17570 .klen = 32,
17571 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17572 "\x00\x00\x00\x00\x00\x00\x00\x00",
17573 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17574 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17575 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17576 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17577 .ilen = 32,
17578 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17579 "\x44\x44\x44\x44\x44\x44\x44\x44"
17580 "\x44\x44\x44\x44\x44\x44\x44\x44"
17581 "\x44\x44\x44\x44\x44\x44\x44\x44",
17582 .rlen = 32,
17583 }, { /* XTS-AES 4 */
17584 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17585 "\x23\x53\x60\x28\x74\x71\x35\x26"
17586 "\x31\x41\x59\x26\x53\x58\x97\x93"
17587 "\x23\x84\x62\x64\x33\x83\x27\x95",
17588 .klen = 32,
17589 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17590 "\x00\x00\x00\x00\x00\x00\x00\x00",
17591 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17592 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17593 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17594 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17595 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17596 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17597 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17598 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17599 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17600 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17601 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17602 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17603 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17604 "\x22\x97\x61\x46\xae\x20\xce\x84"
17605 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17606 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17607 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17608 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17609 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17610 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17611 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17612 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17613 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17614 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17615 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17616 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17617 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17618 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17619 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17620 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17621 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17622 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17623 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17624 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17625 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17626 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17627 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17628 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17629 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17630 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17631 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17632 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17633 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17634 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17635 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17636 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17637 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17638 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17639 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17640 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17641 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17642 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17643 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17644 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17645 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17646 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17647 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17648 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17649 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17650 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17651 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17652 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17653 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17654 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17655 .ilen = 512,
17656 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17657 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17658 "\x10\x11\x12\x13\x14\x15\x16\x17"
17659 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17660 "\x20\x21\x22\x23\x24\x25\x26\x27"
17661 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17662 "\x30\x31\x32\x33\x34\x35\x36\x37"
17663 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17664 "\x40\x41\x42\x43\x44\x45\x46\x47"
17665 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17666 "\x50\x51\x52\x53\x54\x55\x56\x57"
17667 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17668 "\x60\x61\x62\x63\x64\x65\x66\x67"
17669 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17670 "\x70\x71\x72\x73\x74\x75\x76\x77"
17671 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17672 "\x80\x81\x82\x83\x84\x85\x86\x87"
17673 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17674 "\x90\x91\x92\x93\x94\x95\x96\x97"
17675 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17676 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17677 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17678 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17679 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17680 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17681 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17682 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17683 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17684 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17685 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17686 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17687 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17688 "\x00\x01\x02\x03\x04\x05\x06\x07"
17689 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17690 "\x10\x11\x12\x13\x14\x15\x16\x17"
17691 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17692 "\x20\x21\x22\x23\x24\x25\x26\x27"
17693 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17694 "\x30\x31\x32\x33\x34\x35\x36\x37"
17695 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17696 "\x40\x41\x42\x43\x44\x45\x46\x47"
17697 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17698 "\x50\x51\x52\x53\x54\x55\x56\x57"
17699 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17700 "\x60\x61\x62\x63\x64\x65\x66\x67"
17701 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17702 "\x70\x71\x72\x73\x74\x75\x76\x77"
17703 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17704 "\x80\x81\x82\x83\x84\x85\x86\x87"
17705 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17706 "\x90\x91\x92\x93\x94\x95\x96\x97"
17707 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17708 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17709 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17710 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17711 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17712 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17713 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17714 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17715 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17716 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17717 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17718 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17719 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17720 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017721 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17722 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17723 "\x23\x53\x60\x28\x74\x71\x35\x26"
17724 "\x62\x49\x77\x57\x24\x70\x93\x69"
17725 "\x99\x59\x57\x49\x66\x96\x76\x27"
17726 "\x31\x41\x59\x26\x53\x58\x97\x93"
17727 "\x23\x84\x62\x64\x33\x83\x27\x95"
17728 "\x02\x88\x41\x97\x16\x93\x99\x37"
17729 "\x51\x05\x82\x09\x74\x94\x45\x92",
17730 .klen = 64,
17731 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17732 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017733 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17734 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17735 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17736 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17737 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17738 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17739 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17740 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17741 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17742 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17743 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17744 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17745 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17746 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17747 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17748 "\x00\x02\x08\x87\x89\x14\x29\xca"
17749 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17750 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17751 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17752 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17753 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17754 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17755 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17756 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17757 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17758 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17759 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17760 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17761 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17762 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17763 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17764 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17765 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17766 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17767 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17768 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17769 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17770 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17771 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17772 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17773 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17774 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17775 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17776 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17777 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17778 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17779 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17780 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17781 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17782 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17783 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17784 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17785 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17786 "\x94\x30\x54\xff\x84\x01\x14\x93"
17787 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17788 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17789 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17790 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17791 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17792 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17793 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17794 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17795 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17796 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17797 .ilen = 512,
17798 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17799 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17800 "\x10\x11\x12\x13\x14\x15\x16\x17"
17801 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17802 "\x20\x21\x22\x23\x24\x25\x26\x27"
17803 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17804 "\x30\x31\x32\x33\x34\x35\x36\x37"
17805 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17806 "\x40\x41\x42\x43\x44\x45\x46\x47"
17807 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17808 "\x50\x51\x52\x53\x54\x55\x56\x57"
17809 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17810 "\x60\x61\x62\x63\x64\x65\x66\x67"
17811 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17812 "\x70\x71\x72\x73\x74\x75\x76\x77"
17813 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17814 "\x80\x81\x82\x83\x84\x85\x86\x87"
17815 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17816 "\x90\x91\x92\x93\x94\x95\x96\x97"
17817 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17818 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17819 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17820 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17821 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17822 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17823 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17824 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17825 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17826 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17827 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17828 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17829 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17830 "\x00\x01\x02\x03\x04\x05\x06\x07"
17831 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17832 "\x10\x11\x12\x13\x14\x15\x16\x17"
17833 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17834 "\x20\x21\x22\x23\x24\x25\x26\x27"
17835 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17836 "\x30\x31\x32\x33\x34\x35\x36\x37"
17837 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17838 "\x40\x41\x42\x43\x44\x45\x46\x47"
17839 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17840 "\x50\x51\x52\x53\x54\x55\x56\x57"
17841 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17842 "\x60\x61\x62\x63\x64\x65\x66\x67"
17843 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17844 "\x70\x71\x72\x73\x74\x75\x76\x77"
17845 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17846 "\x80\x81\x82\x83\x84\x85\x86\x87"
17847 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17848 "\x90\x91\x92\x93\x94\x95\x96\x97"
17849 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17850 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17851 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17852 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17853 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17854 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17855 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17856 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17857 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17858 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17859 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17860 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17861 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17862 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017863 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017864 .np = 3,
17865 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017866 }
17867};
17868
17869
17870static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017871 { /* From NIST Special Publication 800-38A, Appendix F.5 */
17872 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17873 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17874 .klen = 16,
17875 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17876 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17877 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17878 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17879 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17880 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17881 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17882 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17883 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17884 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17885 .ilen = 64,
17886 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
17887 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
17888 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
17889 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
17890 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
17891 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
17892 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
17893 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
17894 .rlen = 64,
17895 }, {
17896 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
17897 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
17898 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
17899 .klen = 24,
17900 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17901 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17902 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17903 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17904 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17905 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17906 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17907 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17908 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17909 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17910 .ilen = 64,
17911 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
17912 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
17913 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
17914 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
17915 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
17916 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
17917 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
17918 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
17919 .rlen = 64,
17920 }, {
17921 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
17922 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
17923 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
17924 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
17925 .klen = 32,
17926 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17927 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17928 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17929 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17930 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17931 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17932 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17933 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17934 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17935 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17936 .ilen = 64,
17937 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
17938 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
17939 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
17940 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
17941 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
17942 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
17943 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
17944 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
17945 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017946 }, { /* Generated with Crypto++ */
17947 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17948 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17949 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17950 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17951 .klen = 32,
17952 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
17953 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
17954 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
17955 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
17956 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
17957 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
17958 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
17959 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
17960 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
17961 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
17962 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
17963 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
17964 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
17965 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
17966 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
17967 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
17968 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
17969 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
17970 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
17971 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
17972 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
17973 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
17974 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
17975 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
17976 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
17977 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
17978 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
17979 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
17980 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
17981 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
17982 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
17983 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
17984 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
17985 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
17986 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
17987 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
17988 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
17989 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
17990 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
17991 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
17992 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
17993 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
17994 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
17995 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
17996 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
17997 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
17998 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
17999 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18000 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18001 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18002 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18003 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18004 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18005 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18006 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18007 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18008 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18009 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18010 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18011 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18012 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18013 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18014 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18015 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18016 .ilen = 496,
18017 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18018 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18019 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18020 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18021 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18022 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18023 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18024 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18025 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18026 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18027 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18028 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18029 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18030 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18031 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18032 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18033 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18034 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18035 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18036 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18037 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18038 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18039 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18040 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18041 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18042 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18043 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18044 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18045 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18046 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18047 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18048 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18049 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18050 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18051 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18052 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18053 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18054 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18055 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18056 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18057 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18058 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18059 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18060 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18061 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18062 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18063 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18064 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18065 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18066 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18067 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18068 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18069 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18070 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18071 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18072 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18073 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18074 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18075 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18076 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18077 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18078 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18079 .rlen = 496,
18080 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018081 .np = 3,
18082 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018083 }, { /* Generated with Crypto++ */
18084 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18085 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18086 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18087 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18088 .klen = 32,
18089 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18090 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18091 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18092 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18093 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18094 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18095 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18096 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18097 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18098 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18099 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18100 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18101 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18102 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18103 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18104 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18105 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18106 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18107 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18108 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18109 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18110 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18111 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18112 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18113 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18114 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18115 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18116 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18117 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18118 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18119 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18120 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18121 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18122 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18123 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18124 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18125 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18126 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18127 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18128 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18129 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18130 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18131 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18132 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18133 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18134 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18135 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18136 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18137 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18138 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18139 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18140 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18141 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18142 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18143 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18144 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18145 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18146 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18147 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18148 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18149 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18150 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18151 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18152 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18153 "\x7B\xE4\x4D",
18154 .ilen = 499,
18155 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18156 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18157 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18158 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18159 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18160 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18161 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18162 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18163 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18164 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18165 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18166 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18167 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18168 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18169 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18170 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18171 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18172 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18173 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18174 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18175 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18176 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18177 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18178 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18179 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18180 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18181 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18182 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18183 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18184 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18185 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18186 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18187 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18188 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18189 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18190 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18191 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18192 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18193 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18194 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18195 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18196 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18197 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18198 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18199 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18200 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18201 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18202 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18203 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18204 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18205 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18206 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18207 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18208 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18209 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18210 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18211 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18212 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18213 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18214 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18215 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18216 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18217 "\xFB\xF2\x3F",
18218 .rlen = 499,
18219 .also_non_np = 1,
18220 .np = 2,
18221 .tap = { 499 - 16, 16 },
18222 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018223};
18224
18225static struct cipher_testvec aes_ctr_dec_tv_template[] = {
18226 { /* From NIST Special Publication 800-38A, Appendix F.5 */
18227 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
18228 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
18229 .klen = 16,
18230 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18231 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18232 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
18233 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
18234 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
18235 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
18236 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
18237 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
18238 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
18239 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
18240 .ilen = 64,
18241 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18242 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18243 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18244 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18245 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18246 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18247 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18248 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18249 .rlen = 64,
18250 }, {
18251 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
18252 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
18253 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
18254 .klen = 24,
18255 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18256 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18257 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
18258 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
18259 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
18260 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
18261 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
18262 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
18263 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
18264 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
18265 .ilen = 64,
18266 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18267 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18268 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18269 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18270 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18271 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18272 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18273 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18274 .rlen = 64,
18275 }, {
18276 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
18277 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
18278 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
18279 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
18280 .klen = 32,
18281 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18282 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18283 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
18284 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
18285 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18286 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18287 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18288 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18289 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18290 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18291 .ilen = 64,
18292 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18293 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18294 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18295 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18296 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18297 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18298 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18299 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18300 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018301 }, { /* Generated with Crypto++ */
18302 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18303 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18304 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18305 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18306 .klen = 32,
18307 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18308 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18309 .input = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18310 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18311 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18312 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18313 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18314 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18315 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18316 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18317 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18318 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18319 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18320 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18321 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18322 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18323 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18324 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18325 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18326 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18327 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18328 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18329 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18330 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18331 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18332 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18333 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18334 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18335 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18336 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18337 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18338 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18339 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18340 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18341 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18342 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18343 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18344 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18345 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18346 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18347 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18348 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18349 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18350 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18351 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18352 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18353 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18354 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18355 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18356 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18357 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18358 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18359 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18360 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18361 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18362 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18363 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18364 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18365 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18366 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18367 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18368 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18369 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18370 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18371 .ilen = 496,
18372 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18373 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18374 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18375 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18376 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18377 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18378 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18379 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18380 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18381 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18382 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18383 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18384 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18385 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18386 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18387 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18388 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18389 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18390 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18391 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18392 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18393 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18394 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18395 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18396 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18397 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18398 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18399 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18400 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18401 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18402 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18403 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18404 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18405 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18406 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18407 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18408 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18409 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18410 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18411 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18412 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18413 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18414 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18415 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18416 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18417 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18418 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18419 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18420 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18421 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18422 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18423 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18424 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18425 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18426 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18427 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18428 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18429 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18430 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18431 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18432 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18433 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18434 .rlen = 496,
18435 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018436 .np = 3,
18437 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018438 }, { /* Generated with Crypto++ */
18439 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18440 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18441 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18442 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18443 .klen = 32,
18444 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18445 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18446 .input = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18447 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18448 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18449 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18450 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18451 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18452 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18453 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18454 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18455 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18456 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18457 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18458 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18459 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18460 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18461 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18462 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18463 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18464 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18465 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18466 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18467 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18468 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18469 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18470 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18471 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18472 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18473 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18474 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18475 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18476 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18477 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18478 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18479 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18480 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18481 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18482 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18483 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18484 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18485 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18486 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18487 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18488 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18489 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18490 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18491 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18492 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18493 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18494 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18495 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18496 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18497 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18498 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18499 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18500 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18501 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18502 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18503 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18504 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18505 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18506 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18507 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18508 "\xFB\xF2\x3F",
18509 .ilen = 499,
18510 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18511 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18512 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18513 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18514 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18515 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18516 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18517 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18518 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18519 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18520 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18521 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18522 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18523 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18524 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18525 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18526 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18527 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18528 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18529 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18530 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18531 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18532 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18533 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18534 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18535 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18536 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18537 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18538 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18539 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18540 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18541 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18542 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18543 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18544 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18545 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18546 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18547 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18548 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18549 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18550 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18551 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18552 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18553 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18554 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18555 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18556 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18557 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18558 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18559 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18560 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18561 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18562 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18563 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18564 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18565 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18566 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18567 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18568 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18569 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18570 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18571 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18572 "\x7B\xE4\x4D",
18573 .rlen = 499,
18574 .also_non_np = 1,
18575 .np = 2,
18576 .tap = { 499 - 16, 16 },
18577 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018578};
18579
18580static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080018581 { /* From RFC 3686 */
18582 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
18583 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
18584 "\x00\x00\x00\x30",
18585 .klen = 20,
18586 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18587 .input = "Single block msg",
18588 .ilen = 16,
18589 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
18590 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
18591 .rlen = 16,
18592 }, {
18593 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
18594 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
18595 "\x00\x6c\xb6\xdb",
18596 .klen = 20,
18597 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
18598 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18599 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18600 "\x10\x11\x12\x13\x14\x15\x16\x17"
18601 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18602 .ilen = 32,
18603 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
18604 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
18605 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
18606 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
18607 .rlen = 32,
18608 }, {
18609 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
18610 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
18611 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
18612 "\x00\x00\x00\x48",
18613 .klen = 28,
18614 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
18615 .input = "Single block msg",
18616 .ilen = 16,
18617 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
18618 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
18619 .rlen = 16,
18620 }, {
18621 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
18622 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
18623 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
18624 "\x00\x96\xb0\x3b",
18625 .klen = 28,
18626 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
18627 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18628 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18629 "\x10\x11\x12\x13\x14\x15\x16\x17"
18630 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18631 .ilen = 32,
18632 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
18633 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
18634 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
18635 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
18636 .rlen = 32,
18637 }, {
18638 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
18639 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
18640 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
18641 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
18642 "\x00\x00\x00\x60",
18643 .klen = 36,
18644 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
18645 .input = "Single block msg",
18646 .ilen = 16,
18647 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
18648 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
18649 .rlen = 16,
18650 }, {
18651 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
18652 "\x07\x96\x36\x58\x79\xef\xf8\x86"
18653 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
18654 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
18655 "\x00\xfa\xac\x24",
18656 .klen = 36,
18657 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
18658 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18659 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18660 "\x10\x11\x12\x13\x14\x15\x16\x17"
18661 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18662 .ilen = 32,
18663 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
18664 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
18665 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
18666 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
18667 .rlen = 32,
18668 }, {
18669 // generated using Crypto++
18670 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18671 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18672 "\x10\x11\x12\x13\x14\x15\x16\x17"
18673 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18674 "\x00\x00\x00\x00",
18675 .klen = 32 + 4,
18676 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18677 .input =
18678 "\x00\x01\x02\x03\x04\x05\x06\x07"
18679 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18680 "\x10\x11\x12\x13\x14\x15\x16\x17"
18681 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18682 "\x20\x21\x22\x23\x24\x25\x26\x27"
18683 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18684 "\x30\x31\x32\x33\x34\x35\x36\x37"
18685 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18686 "\x40\x41\x42\x43\x44\x45\x46\x47"
18687 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18688 "\x50\x51\x52\x53\x54\x55\x56\x57"
18689 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18690 "\x60\x61\x62\x63\x64\x65\x66\x67"
18691 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18692 "\x70\x71\x72\x73\x74\x75\x76\x77"
18693 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18694 "\x80\x81\x82\x83\x84\x85\x86\x87"
18695 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18696 "\x90\x91\x92\x93\x94\x95\x96\x97"
18697 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18698 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18699 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18700 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18701 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18702 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18703 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18704 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18705 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18706 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18707 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18708 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18709 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18710 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
18711 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
18712 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
18713 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
18714 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
18715 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
18716 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
18717 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
18718 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
18719 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
18720 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
18721 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
18722 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
18723 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
18724 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
18725 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
18726 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
18727 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
18728 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
18729 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
18730 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
18731 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
18732 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
18733 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
18734 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
18735 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
18736 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
18737 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
18738 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
18739 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
18740 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
18741 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
18742 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
18743 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
18744 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
18745 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
18746 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
18747 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
18748 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
18749 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
18750 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
18751 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
18752 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
18753 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
18754 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
18755 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
18756 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
18757 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
18758 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
18759 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
18760 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
18761 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
18762 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
18763 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
18764 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
18765 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
18766 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
18767 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
18768 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
18769 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
18770 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
18771 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
18772 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
18773 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
18774 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
18775 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
18776 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
18777 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
18778 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
18779 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
18780 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
18781 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
18782 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
18783 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
18784 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
18785 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
18786 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
18787 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
18788 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
18789 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
18790 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
18791 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
18792 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
18793 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
18794 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
18795 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
18796 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
18797 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
18798 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
18799 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
18800 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
18801 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
18802 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
18803 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
18804 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
18805 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
18806 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
18807 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
18808 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
18809 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
18810 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
18811 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
18812 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
18813 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
18814 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
18815 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
18816 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
18817 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
18818 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
18819 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
18820 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
18821 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
18822 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
18823 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
18824 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
18825 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
18826 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
18827 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
18828 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
18829 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
18830 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
18831 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
18832 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
18833 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
18834 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
18835 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
18836 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
18837 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
18838 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
18839 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
18840 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
18841 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
18842 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
18843 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
18844 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
18845 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
18846 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
18847 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
18848 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
18849 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
18850 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
18851 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
18852 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
18853 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
18854 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
18855 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
18856 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
18857 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
18858 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
18859 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
18860 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
18861 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
18862 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
18863 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
18864 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
18865 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
18866 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
18867 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
18868 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
18869 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
18870 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
18871 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
18872 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
18873 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
18874 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
18875 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
18876 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
18877 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
18878 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
18879 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
18880 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
18881 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
18882 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
18883 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
18884 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
18885 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
18886 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
18887 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
18888 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
18889 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
18890 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
18891 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
18892 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
18893 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
18894 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
18895 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
18896 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
18897 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
18898 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
18899 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
18900 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
18901 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
18902 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
18903 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
18904 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
18905 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
18906 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
18907 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
18908 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
18909 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
18910 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
18911 "\x38\x47\x56\x65\x74\x83\x92\xa1"
18912 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
18913 "\x28\x37\x46\x55\x64\x73\x82\x91"
18914 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
18915 "\x18\x27\x36\x45\x54\x63\x72\x81"
18916 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
18917 "\x08\x17\x26\x35\x44\x53\x62\x71"
18918 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
18919 "\xf8\x07\x16\x25\x34\x43\x52\x61"
18920 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
18921 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
18922 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
18923 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
18924 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
18925 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
18926 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
18927 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
18928 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
18929 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
18930 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
18931 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
18932 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
18933 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
18934 "\x00\x11\x22\x33\x44\x55\x66\x77"
18935 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
18936 "\x10\x21\x32\x43\x54\x65\x76\x87"
18937 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
18938 "\x20\x31\x42\x53\x64\x75\x86\x97"
18939 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
18940 "\x30\x41\x52\x63\x74\x85\x96\xa7"
18941 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
18942 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
18943 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
18944 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
18945 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
18946 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
18947 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
18948 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
18949 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
18950 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
18951 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
18952 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
18953 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
18954 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
18955 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
18956 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
18957 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
18958 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
18959 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
18960 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
18961 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
18962 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
18963 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
18964 "\xf0\x01\x12\x23\x34\x45\x56\x67"
18965 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
18966 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
18967 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
18968 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
18969 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
18970 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
18971 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
18972 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
18973 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
18974 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
18975 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
18976 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
18977 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
18978 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
18979 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
18980 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
18981 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
18982 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
18983 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
18984 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
18985 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
18986 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
18987 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
18988 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
18989 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
18990 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
18991 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
18992 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
18993 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
18994 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
18995 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
18996 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
18997 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
18998 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
18999 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
19000 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
19001 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
19002 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
19003 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
19004 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
19005 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
19006 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
19007 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
19008 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
19009 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
19010 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
19011 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
19012 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
19013 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
19014 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
19015 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
19016 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
19017 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
19018 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
19019 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
19020 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
19021 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
19022 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
19023 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
19024 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
19025 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
19026 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
19027 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
19028 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
19029 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
19030 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
19031 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
19032 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
19033 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
19034 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
19035 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
19036 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
19037 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
19038 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
19039 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
19040 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
19041 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
19042 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
19043 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
19044 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
19045 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
19046 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
19047 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
19048 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
19049 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
19050 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
19051 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
19052 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
19053 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
19054 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
19055 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
19056 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
19057 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
19058 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
19059 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
19060 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
19061 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
19062 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
19063 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
19064 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
19065 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
19066 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
19067 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
19068 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
19069 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
19070 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
19071 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
19072 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
19073 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
19074 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
19075 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
19076 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
19077 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
19078 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
19079 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
19080 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
19081 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
19082 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
19083 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
19084 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
19085 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
19086 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
19087 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
19088 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
19089 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
19090 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
19091 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
19092 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
19093 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
19094 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
19095 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
19096 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
19097 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
19098 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
19099 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
19100 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
19101 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
19102 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
19103 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
19104 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
19105 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
19106 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
19107 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
19108 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
19109 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
19110 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
19111 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
19112 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
19113 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
19114 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
19115 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
19116 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
19117 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
19118 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
19119 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
19120 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
19121 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
19122 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
19123 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
19124 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
19125 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
19126 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
19127 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
19128 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
19129 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
19130 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
19131 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
19132 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
19133 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
19134 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
19135 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
19136 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
19137 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
19138 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
19139 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
19140 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
19141 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
19142 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
19143 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
19144 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
19145 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
19146 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
19147 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
19148 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
19149 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
19150 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
19151 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
19152 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
19153 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
19154 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
19155 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
19156 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
19157 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
19158 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
19159 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
19160 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
19161 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
19162 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
19163 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
19164 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
19165 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
19166 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
19167 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
19168 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
19169 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
19170 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
19171 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
19172 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
19173 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
19174 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
19175 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
19176 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
19177 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
19178 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
19179 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
19180 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
19181 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
19182 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
19183 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
19184 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
19185 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
19186 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
19187 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
19188 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
19189 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
19190 "\x00\x21\x42\x63",
19191 .ilen = 4100,
19192 .result =
19193 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
19194 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
19195 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
19196 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
19197 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
19198 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
19199 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
19200 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
19201 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
19202 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
19203 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
19204 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
19205 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
19206 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
19207 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
19208 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
19209 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
19210 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
19211 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
19212 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
19213 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
19214 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
19215 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
19216 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
19217 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
19218 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
19219 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
19220 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
19221 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
19222 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
19223 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
19224 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
19225 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
19226 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
19227 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
19228 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
19229 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
19230 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
19231 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
19232 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
19233 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
19234 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
19235 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
19236 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
19237 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
19238 "\x04\x02\xef\xd3\x44\xde\x76\x31"
19239 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
19240 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
19241 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
19242 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
19243 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
19244 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
19245 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
19246 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
19247 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
19248 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
19249 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
19250 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
19251 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
19252 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
19253 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
19254 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
19255 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
19256 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
19257 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
19258 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
19259 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
19260 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
19261 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
19262 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
19263 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
19264 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
19265 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
19266 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
19267 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
19268 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
19269 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
19270 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
19271 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
19272 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
19273 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
19274 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
19275 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
19276 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
19277 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
19278 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
19279 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
19280 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
19281 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
19282 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
19283 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
19284 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
19285 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
19286 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
19287 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
19288 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
19289 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
19290 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
19291 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
19292 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
19293 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
19294 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
19295 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
19296 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
19297 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
19298 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
19299 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
19300 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
19301 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
19302 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
19303 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
19304 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
19305 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
19306 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
19307 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
19308 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
19309 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
19310 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
19311 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
19312 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
19313 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
19314 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
19315 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
19316 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
19317 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
19318 "\x26\x39\x83\x94\xef\x27\xd8\x53"
19319 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
19320 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
19321 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
19322 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
19323 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
19324 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
19325 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
19326 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
19327 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
19328 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
19329 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
19330 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
19331 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
19332 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
19333 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
19334 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
19335 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
19336 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
19337 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
19338 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
19339 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
19340 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
19341 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
19342 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
19343 "\x35\x12\xe3\x36\x28\x27\x36\x58"
19344 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
19345 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
19346 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
19347 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
19348 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
19349 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
19350 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
19351 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
19352 "\x89\xf3\x78\x35\x44\x62\x78\x72"
19353 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
19354 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
19355 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
19356 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
19357 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
19358 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
19359 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
19360 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
19361 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
19362 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
19363 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
19364 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
19365 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
19366 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
19367 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
19368 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
19369 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
19370 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
19371 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
19372 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
19373 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
19374 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
19375 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
19376 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
19377 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
19378 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
19379 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
19380 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
19381 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
19382 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
19383 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
19384 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
19385 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
19386 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
19387 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
19388 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
19389 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
19390 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
19391 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
19392 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
19393 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
19394 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
19395 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
19396 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
19397 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
19398 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
19399 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
19400 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
19401 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
19402 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
19403 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
19404 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
19405 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
19406 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
19407 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
19408 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
19409 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
19410 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
19411 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
19412 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
19413 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
19414 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
19415 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
19416 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
19417 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
19418 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
19419 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
19420 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
19421 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
19422 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
19423 "\x29\x90\x46\x30\x92\x69\x7d\x13"
19424 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
19425 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
19426 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
19427 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
19428 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
19429 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
19430 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
19431 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
19432 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
19433 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
19434 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
19435 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
19436 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
19437 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
19438 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
19439 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
19440 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
19441 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
19442 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
19443 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
19444 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
19445 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
19446 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
19447 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
19448 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
19449 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
19450 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
19451 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
19452 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
19453 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
19454 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
19455 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
19456 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
19457 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
19458 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
19459 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
19460 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
19461 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
19462 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
19463 "\x73\x02\x3b\x78\x21\x72\x43\x00"
19464 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
19465 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
19466 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
19467 "\x11\x94\x13\x69\x51\x09\x28\xde"
19468 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
19469 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
19470 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
19471 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
19472 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
19473 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
19474 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
19475 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
19476 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
19477 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
19478 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
19479 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
19480 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
19481 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
19482 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
19483 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
19484 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
19485 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
19486 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
19487 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
19488 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
19489 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
19490 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
19491 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
19492 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
19493 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
19494 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
19495 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
19496 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
19497 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
19498 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
19499 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
19500 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
19501 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
19502 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
19503 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
19504 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
19505 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
19506 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
19507 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
19508 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
19509 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
19510 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
19511 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
19512 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
19513 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
19514 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
19515 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
19516 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
19517 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
19518 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
19519 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
19520 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
19521 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
19522 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
19523 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
19524 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
19525 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
19526 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
19527 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
19528 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
19529 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
19530 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
19531 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
19532 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
19533 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
19534 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
19535 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
19536 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
19537 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
19538 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
19539 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
19540 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
19541 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
19542 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
19543 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
19544 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
19545 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
19546 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
19547 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
19548 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
19549 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
19550 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
19551 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
19552 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
19553 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
19554 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
19555 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
19556 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
19557 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
19558 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
19559 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
19560 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
19561 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
19562 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
19563 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
19564 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
19565 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
19566 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
19567 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
19568 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
19569 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
19570 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
19571 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
19572 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
19573 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
19574 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
19575 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
19576 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
19577 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
19578 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
19579 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
19580 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
19581 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
19582 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
19583 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
19584 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
19585 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
19586 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
19587 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
19588 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
19589 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
19590 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
19591 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
19592 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
19593 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
19594 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
19595 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
19596 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
19597 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
19598 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
19599 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
19600 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
19601 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
19602 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
19603 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
19604 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
19605 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
19606 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
19607 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
19608 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
19609 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
19610 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
19611 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
19612 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
19613 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
19614 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
19615 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
19616 "\xae\xed\x39\x88\x42\x11\x3c\xed"
19617 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
19618 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
19619 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
19620 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
19621 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
19622 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
19623 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
19624 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
19625 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
19626 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
19627 "\x34\x17\xde\xba\x47\xf1\x06\x18"
19628 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
19629 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
19630 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
19631 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
19632 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
19633 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
19634 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
19635 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
19636 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
19637 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
19638 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
19639 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
19640 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
19641 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
19642 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
19643 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
19644 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
19645 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
19646 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
19647 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
19648 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
19649 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
19650 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
19651 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
19652 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
19653 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
19654 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
19655 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
19656 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
19657 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
19658 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
19659 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
19660 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
19661 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
19662 "\x74\x56\x58\x40\x02\x37\x52\x2c"
19663 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
19664 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
19665 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
19666 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
19667 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
19668 "\xed\x38\x80\x36\x72\x43\x27\x49"
19669 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
19670 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
19671 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
19672 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
19673 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
19674 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
19675 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
19676 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
19677 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
19678 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
19679 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
19680 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
19681 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
19682 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
19683 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
19684 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
19685 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
19686 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
19687 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
19688 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
19689 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
19690 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
19691 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
19692 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
19693 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
19694 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
19695 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
19696 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
19697 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
19698 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
19699 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
19700 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
19701 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
19702 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
19703 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
19704 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
19705 "\x21\xed\xda\x86",
19706 .rlen = 4100,
19707 .np = 2,
19708 .tap = { 4064, 36 },
19709 },
19710};
19711
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080019712static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080019713 { /* From RFC 3686 */
19714 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
19715 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
19716 "\x00\x00\x00\x30",
19717 .klen = 20,
19718 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19719 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
19720 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
19721 .ilen = 16,
19722 .result = "Single block msg",
19723 .rlen = 16,
19724 }, {
19725 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
19726 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
19727 "\x00\x6c\xb6\xdb",
19728 .klen = 20,
19729 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
19730 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
19731 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
19732 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
19733 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
19734 .ilen = 32,
19735 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19736 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19737 "\x10\x11\x12\x13\x14\x15\x16\x17"
19738 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19739 .rlen = 32,
19740 }, {
19741 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
19742 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
19743 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
19744 "\x00\x00\x00\x48",
19745 .klen = 28,
19746 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
19747 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
19748 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
19749 .ilen = 16,
19750 .result = "Single block msg",
19751 .rlen = 16,
19752 }, {
19753 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
19754 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
19755 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
19756 "\x00\x96\xb0\x3b",
19757 .klen = 28,
19758 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
19759 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
19760 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
19761 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
19762 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
19763 .ilen = 32,
19764 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19765 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19766 "\x10\x11\x12\x13\x14\x15\x16\x17"
19767 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19768 .rlen = 32,
19769 }, {
19770 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
19771 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
19772 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
19773 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
19774 "\x00\x00\x00\x60",
19775 .klen = 36,
19776 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
19777 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
19778 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
19779 .ilen = 16,
19780 .result = "Single block msg",
19781 .rlen = 16,
19782 }, {
19783 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
19784 "\x07\x96\x36\x58\x79\xef\xf8\x86"
19785 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
19786 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
19787 "\x00\xfa\xac\x24",
19788 .klen = 36,
19789 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
19790 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
19791 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
19792 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
19793 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
19794 .ilen = 32,
19795 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19796 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19797 "\x10\x11\x12\x13\x14\x15\x16\x17"
19798 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19799 .rlen = 32,
19800 },
19801};
19802
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100019803static struct cipher_testvec aes_ofb_enc_tv_template[] = {
19804 /* From NIST Special Publication 800-38A, Appendix F.5 */
19805 {
19806 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19807 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19808 .klen = 16,
19809 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19810 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19811 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19812 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19813 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19814 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19815 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19816 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19817 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19818 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19819 .ilen = 64,
19820 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19821 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19822 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19823 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19824 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19825 "\x44\xf7\xa8\x22\x60\xed\xcc"
19826 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19827 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19828 .rlen = 64,
19829 }
19830};
19831
19832static struct cipher_testvec aes_ofb_dec_tv_template[] = {
19833 /* From NIST Special Publication 800-38A, Appendix F.5 */
19834 {
19835 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19836 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19837 .klen = 16,
19838 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19839 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19840 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19841 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19842 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19843 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19844 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19845 "\x44\xf7\xa8\x22\x60\xed\xcc"
19846 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19847 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19848 .ilen = 64,
19849 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19850 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19851 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19852 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19853 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19854 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19855 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19856 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19857 .rlen = 64,
19858 }
19859};
19860
Herbert Xuda7f0332008-07-31 17:08:25 +080019861static struct aead_testvec aes_gcm_enc_tv_template[] = {
19862 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19863 .key = zeroed_string,
19864 .klen = 16,
19865 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
19866 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
19867 .rlen = 16,
19868 }, {
19869 .key = zeroed_string,
19870 .klen = 16,
19871 .input = zeroed_string,
19872 .ilen = 16,
19873 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
19874 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
19875 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
19876 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
19877 .rlen = 32,
19878 }, {
19879 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19880 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19881 .klen = 16,
19882 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19883 "\xde\xca\xf8\x88",
19884 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19885 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19886 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19887 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19888 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19889 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19890 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19891 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19892 .ilen = 64,
19893 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19894 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19895 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19896 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19897 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19898 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19899 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19900 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
19901 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
19902 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
19903 .rlen = 80,
19904 }, {
19905 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19906 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19907 .klen = 16,
19908 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19909 "\xde\xca\xf8\x88",
19910 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19911 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19912 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19913 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19914 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19915 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19916 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19917 "\xba\x63\x7b\x39",
19918 .ilen = 60,
19919 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19920 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19921 "\xab\xad\xda\xd2",
19922 .alen = 20,
19923 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19924 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19925 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19926 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19927 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19928 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19929 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19930 "\x3d\x58\xe0\x91"
19931 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
19932 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
19933 .rlen = 76,
19934 }, {
19935 .key = zeroed_string,
19936 .klen = 24,
19937 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
19938 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
19939 .rlen = 16,
19940 }, {
19941 .key = zeroed_string,
19942 .klen = 24,
19943 .input = zeroed_string,
19944 .ilen = 16,
19945 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
19946 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
19947 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
19948 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
19949 .rlen = 32,
19950 }, {
19951 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19952 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19953 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19954 .klen = 24,
19955 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19956 "\xde\xca\xf8\x88",
19957 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19958 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19959 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19960 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19961 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19962 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19963 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19964 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19965 .ilen = 64,
19966 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19967 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19968 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19969 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19970 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19971 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19972 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19973 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
19974 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
19975 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
19976 .rlen = 80,
19977 }, {
19978 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19979 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19980 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19981 .klen = 24,
19982 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19983 "\xde\xca\xf8\x88",
19984 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19985 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19986 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19987 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19988 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19989 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19990 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19991 "\xba\x63\x7b\x39",
19992 .ilen = 60,
19993 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19994 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19995 "\xab\xad\xda\xd2",
19996 .alen = 20,
19997 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19998 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19999 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20000 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20001 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20002 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20003 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20004 "\xcc\xda\x27\x10"
20005 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
20006 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
20007 .rlen = 76,
20008 .np = 2,
20009 .tap = { 32, 28 },
20010 .anp = 2,
20011 .atap = { 8, 12 }
20012 }, {
20013 .key = zeroed_string,
20014 .klen = 32,
20015 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
20016 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
20017 .rlen = 16,
20018 }
20019};
20020
20021static struct aead_testvec aes_gcm_dec_tv_template[] = {
20022 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
20023 .key = zeroed_string,
20024 .klen = 32,
20025 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
20026 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
20027 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
20028 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
20029 .ilen = 32,
20030 .result = zeroed_string,
20031 .rlen = 16,
20032 }, {
20033 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20034 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20035 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20036 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20037 .klen = 32,
20038 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20039 "\xde\xca\xf8\x88",
20040 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
20041 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
20042 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
20043 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
20044 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
20045 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
20046 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
20047 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
20048 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
20049 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
20050 .ilen = 80,
20051 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20052 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20053 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20054 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20055 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20056 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20057 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20058 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20059 .rlen = 64,
20060 }, {
20061 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20062 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20063 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20064 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20065 .klen = 32,
20066 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20067 "\xde\xca\xf8\x88",
20068 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
20069 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
20070 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
20071 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
20072 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
20073 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
20074 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
20075 "\xbc\xc9\xf6\x62"
20076 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
20077 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
20078 .ilen = 76,
20079 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20080 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20081 "\xab\xad\xda\xd2",
20082 .alen = 20,
20083 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20084 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20085 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20086 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20087 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20088 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20089 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20090 "\xba\x63\x7b\x39",
20091 .rlen = 60,
20092 .np = 2,
20093 .tap = { 48, 28 },
20094 .anp = 3,
20095 .atap = { 8, 8, 4 }
20096 }, {
20097 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20098 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20099 .klen = 16,
20100 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20101 "\xde\xca\xf8\x88",
20102 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20103 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20104 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20105 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20106 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20107 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20108 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20109 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
20110 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
20111 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
20112 .ilen = 80,
20113 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20114 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20115 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20116 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20117 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20118 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20119 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20120 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20121 .rlen = 64,
20122 }, {
20123 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20124 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20125 .klen = 16,
20126 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20127 "\xde\xca\xf8\x88",
20128 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20129 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20130 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20131 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20132 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20133 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20134 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20135 "\x3d\x58\xe0\x91"
20136 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
20137 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
20138 .ilen = 76,
20139 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20140 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20141 "\xab\xad\xda\xd2",
20142 .alen = 20,
20143 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20144 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20145 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20146 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20147 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20148 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20149 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20150 "\xba\x63\x7b\x39",
20151 .rlen = 60,
20152 }, {
20153 .key = zeroed_string,
20154 .klen = 24,
20155 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
20156 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
20157 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
20158 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
20159 .ilen = 32,
20160 .result = zeroed_string,
20161 .rlen = 16,
20162 }, {
20163 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20164 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20165 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20166 .klen = 24,
20167 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20168 "\xde\xca\xf8\x88",
20169 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20170 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20171 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20172 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20173 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20174 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20175 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20176 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
20177 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
20178 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
20179 .ilen = 80,
20180 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20181 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20182 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20183 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20184 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20185 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20186 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20187 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20188 .rlen = 64,
20189 }, {
20190 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20191 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20192 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20193 .klen = 24,
20194 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20195 "\xde\xca\xf8\x88",
20196 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20197 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20198 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20199 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20200 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20201 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20202 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20203 "\xcc\xda\x27\x10"
20204 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
20205 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
20206 .ilen = 76,
20207 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20208 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20209 "\xab\xad\xda\xd2",
20210 .alen = 20,
20211 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20212 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20213 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20214 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20215 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20216 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20217 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20218 "\xba\x63\x7b\x39",
20219 .rlen = 60,
20220 }
20221};
20222
Adrian Hoban69435b92010-11-04 15:02:04 -040020223static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
Herbert Xu85375442015-07-09 07:17:25 +080020224 { /* Generated using Crypto++ */
Adrian Hoban69435b92010-11-04 15:02:04 -040020225 .key = zeroed_string,
20226 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020227 .iv = zeroed_string,
20228 .input = zeroed_string,
20229 .ilen = 16,
20230 .assoc = zeroed_string,
20231 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020232 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
Herbert Xu85375442015-07-09 07:17:25 +080020233 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20234 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20235 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
Adrian Hoban69435b92010-11-04 15:02:04 -040020236 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020237 },{
Adrian Hoban69435b92010-11-04 15:02:04 -040020238 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20239 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020240 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020241 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020242 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20243 .input = zeroed_string,
20244 .ilen = 16,
20245 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
20246 "\x00\x00\x00\x00\x00\x00\x00\x01",
20247 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020248 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
Herbert Xu85375442015-07-09 07:17:25 +080020249 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20250 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20251 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
Adrian Hoban69435b92010-11-04 15:02:04 -040020252 .rlen = 32,
20253
Herbert Xu85375442015-07-09 07:17:25 +080020254 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020255 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20256 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020257 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020258 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020259 .iv = zeroed_string,
20260 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20261 "\x01\x01\x01\x01\x01\x01\x01\x01",
20262 .ilen = 16,
20263 .assoc = zeroed_string,
20264 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020265 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020266 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20267 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20268 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
Adrian Hoban69435b92010-11-04 15:02:04 -040020269 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020270 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020271 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20272 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020273 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020274 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020275 .iv = zeroed_string,
20276 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20277 "\x01\x01\x01\x01\x01\x01\x01\x01",
20278 .ilen = 16,
20279 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20280 "\x00\x00\x00\x00\x00\x00\x00\x00",
20281 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020282 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020283 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20284 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20285 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
Adrian Hoban69435b92010-11-04 15:02:04 -040020286 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020287 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020288 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20289 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020290 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020291 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020292 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20293 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20294 "\x01\x01\x01\x01\x01\x01\x01\x01",
20295 .ilen = 16,
20296 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20297 "\x00\x00\x00\x00\x00\x00\x00\x01",
20298 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020299 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020300 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20301 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20302 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
Adrian Hoban69435b92010-11-04 15:02:04 -040020303 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020304 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020305 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20306 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020307 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020308 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020309 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20310 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20311 "\x01\x01\x01\x01\x01\x01\x01\x01"
20312 "\x01\x01\x01\x01\x01\x01\x01\x01"
20313 "\x01\x01\x01\x01\x01\x01\x01\x01"
20314 "\x01\x01\x01\x01\x01\x01\x01\x01"
20315 "\x01\x01\x01\x01\x01\x01\x01\x01"
20316 "\x01\x01\x01\x01\x01\x01\x01\x01"
20317 "\x01\x01\x01\x01\x01\x01\x01\x01",
20318 .ilen = 64,
20319 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20320 "\x00\x00\x00\x00\x00\x00\x00\x01",
20321 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020322 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020323 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20324 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20325 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20326 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20327 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20328 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20329 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20330 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20331 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
Adrian Hoban69435b92010-11-04 15:02:04 -040020332 .rlen = 80,
Herbert Xu85375442015-07-09 07:17:25 +080020333 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020334 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20335 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
Herbert Xu85375442015-07-09 07:17:25 +080020336 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020337 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020338 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
20339 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
20340 "\xff\xff\xff\xff\xff\xff\xff\xff"
20341 "\xff\xff\xff\xff\xff\xff\xff\xff"
20342 "\xff\xff\xff\xff\xff\xff\xff\xff"
20343 "\xff\xff\xff\xff\xff\xff\xff\xff"
20344 "\xff\xff\xff\xff\xff\xff\xff\xff"
20345 "\xff\xff\xff\xff\xff\xff\xff\xff"
20346 "\xff\xff\xff\xff\xff\xff\xff\xff"
20347 "\xff\xff\xff\xff\xff\xff\xff\xff"
20348 "\xff\xff\xff\xff\xff\xff\xff\xff"
20349 "\xff\xff\xff\xff\xff\xff\xff\xff"
20350 "\xff\xff\xff\xff\xff\xff\xff\xff"
20351 "\xff\xff\xff\xff\xff\xff\xff\xff"
20352 "\xff\xff\xff\xff\xff\xff\xff\xff"
20353 "\xff\xff\xff\xff\xff\xff\xff\xff"
20354 "\xff\xff\xff\xff\xff\xff\xff\xff"
20355 "\xff\xff\xff\xff\xff\xff\xff\xff"
20356 "\xff\xff\xff\xff\xff\xff\xff\xff"
20357 "\xff\xff\xff\xff\xff\xff\xff\xff"
20358 "\xff\xff\xff\xff\xff\xff\xff\xff"
20359 "\xff\xff\xff\xff\xff\xff\xff\xff"
20360 "\xff\xff\xff\xff\xff\xff\xff\xff"
20361 "\xff\xff\xff\xff\xff\xff\xff\xff"
20362 "\xff\xff\xff\xff\xff\xff\xff\xff",
20363 .ilen = 192,
20364 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20365 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
20366 "\x89\xab\xcd\xef",
20367 .alen = 20,
Adrian Hoban69435b92010-11-04 15:02:04 -040020368 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20369 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20370 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20371 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20372 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20373 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20374 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20375 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20376 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20377 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20378 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20379 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20380 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20381 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20382 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20383 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20384 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20385 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20386 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20387 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20388 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20389 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20390 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20391 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20392 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20393 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20394 .rlen = 208,
Herbert Xu8f69b762015-06-16 13:54:26 +080020395 }, { /* From draft-mcgrew-gcm-test-01 */
20396 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20397 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20398 "\x2E\x44\x3B\x68",
20399 .klen = 20,
20400 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20401 .input = "\x45\x00\x00\x48\x69\x9A\x00\x00"
20402 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
20403 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
20404 "\x38\xD3\x01\x00\x00\x01\x00\x00"
20405 "\x00\x00\x00\x00\x04\x5F\x73\x69"
20406 "\x70\x04\x5F\x75\x64\x70\x03\x73"
20407 "\x69\x70\x09\x63\x79\x62\x65\x72"
20408 "\x63\x69\x74\x79\x02\x64\x6B\x00"
20409 "\x00\x21\x00\x01\x01\x02\x02\x01",
20410 .ilen = 72,
20411 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080020412 "\x00\x00\x00\x00\x49\x56\xED\x7E"
20413 "\x3B\x24\x4C\xFE",
20414 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020415 .result = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
20416 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
20417 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
20418 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
20419 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
20420 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
20421 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
20422 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
20423 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
20424 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
20425 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
20426 .rlen = 88,
20427 }, {
20428 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20429 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20430 "\xCA\xFE\xBA\xBE",
20431 .klen = 20,
20432 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20433 .input = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
20434 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
20435 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
20436 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
20437 "\x00\x01\x00\x00\x00\x00\x00\x00"
20438 "\x03\x73\x69\x70\x09\x63\x79\x62"
20439 "\x65\x72\x63\x69\x74\x79\x02\x64"
20440 "\x6B\x00\x00\x01\x00\x01\x00\x01",
20441 .ilen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080020442 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
20443 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20444 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020445 .result = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
20446 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
20447 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
20448 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
20449 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
20450 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
20451 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
20452 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
20453 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
20454 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
20455 .rlen = 80,
20456 }, {
20457 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20458 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20459 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20460 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20461 "\x11\x22\x33\x44",
20462 .klen = 36,
20463 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
20464 .input = "\x45\x00\x00\x30\x69\xA6\x40\x00"
20465 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
20466 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
20467 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
20468 "\x70\x02\x40\x00\x20\xBF\x00\x00"
20469 "\x02\x04\x05\xB4\x01\x01\x04\x02"
20470 "\x01\x02\x02\x01",
20471 .ilen = 52,
Herbert Xu85375442015-07-09 07:17:25 +080020472 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
20473 "\x01\x02\x03\x04\x05\x06\x07\x08",
20474 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020475 .result = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
20476 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
20477 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
20478 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
20479 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
20480 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
20481 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
20482 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
20483 "\x15\x95\x6C\x96",
20484 .rlen = 68,
20485 }, {
20486 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
20487 "\x00\x00\x00\x00\x00\x00\x00\x00"
20488 "\x00\x00\x00\x00",
20489 .klen = 20,
20490 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20491 .input = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
20492 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
20493 "\x01\x01\x01\x01\x08\x00\x07\x5C"
20494 "\x02\x00\x44\x00\x61\x62\x63\x64"
20495 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20496 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20497 "\x75\x76\x77\x61\x62\x63\x64\x65"
20498 "\x66\x67\x68\x69\x01\x02\x02\x01",
20499 .ilen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080020500 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
20501 "\x00\x00\x00\x00\x00\x00\x00\x00",
20502 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020503 .result = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
20504 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
20505 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
20506 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
20507 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
20508 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
20509 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
20510 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
20511 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
20512 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
20513 .rlen = 80,
20514 }, {
20515 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20516 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20517 "\x57\x69\x0E\x43",
20518 .klen = 20,
20519 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20520 .input = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
20521 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
20522 "\x01\x01\x01\x01\x08\x00\x08\x5C"
20523 "\x02\x00\x43\x00\x61\x62\x63\x64"
20524 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20525 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20526 "\x75\x76\x77\x61\x62\x63\x64\x65"
20527 "\x66\x67\x68\x69\x01\x02\x02\x01",
20528 .ilen = 64,
20529 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020530 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20531 "\xA2\xFC\xA1\xA3",
20532 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020533 .result = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
20534 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
20535 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
20536 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
20537 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20538 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20539 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
20540 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
20541 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
20542 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
20543 .rlen = 80,
20544 }, {
20545 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20546 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20547 "\x57\x69\x0E\x43",
20548 .klen = 20,
20549 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20550 .input = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
20551 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
20552 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
20553 "\x01\x02\x02\x01",
20554 .ilen = 28,
20555 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020556 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20557 "\xA2\xFC\xA1\xA3",
20558 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020559 .result = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
20560 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
20561 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
20562 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
20563 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
20564 "\xE7\xD0\x5D\x35",
20565 .rlen = 44,
20566 }, {
20567 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20568 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20569 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20570 "\xCA\xFE\xBA\xBE",
20571 .klen = 28,
20572 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20573 .input = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
20574 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
20575 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
20576 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
20577 "\x50\x10\x16\xD0\x75\x68\x00\x01",
20578 .ilen = 40,
Herbert Xu85375442015-07-09 07:17:25 +080020579 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
20580 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20581 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020582 .result = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
20583 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
20584 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
20585 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
20586 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
20587 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
20588 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
20589 .rlen = 56,
20590 }, {
20591 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20592 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20593 "\xDE\xCA\xF8\x88",
20594 .klen = 20,
20595 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20596 .input = "\x45\x00\x00\x49\x33\xBA\x00\x00"
20597 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
20598 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20599 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
20600 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
20601 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
20602 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
20603 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
20604 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
20605 "\x23\x01\x01\x01",
20606 .ilen = 76,
20607 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080020608 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
20609 "\xCE\xFA\xCE\x74",
20610 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020611 .result = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
20612 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
20613 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
20614 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
20615 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
20616 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
20617 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
20618 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
20619 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
20620 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
20621 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
20622 "\x69\x62\x34\x36",
20623 .rlen = 92,
20624 }, {
20625 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20626 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20627 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20628 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20629 "\x73\x61\x6C\x74",
20630 .klen = 36,
20631 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20632 .input = "\x45\x08\x00\x28\x73\x2C\x00\x00"
20633 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
20634 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
20635 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
20636 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
20637 .ilen = 40,
20638 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080020639 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
20640 "\x69\x76\x65\x63",
20641 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020642 .result = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
20643 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
20644 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
20645 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
20646 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
20647 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
20648 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
20649 .rlen = 56,
20650 }, {
20651 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20652 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20653 "\x57\x69\x0E\x43",
20654 .klen = 20,
20655 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20656 .input = "\x45\x00\x00\x49\x33\x3E\x00\x00"
20657 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
20658 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20659 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
20660 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
20661 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
20662 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
20663 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
20664 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
20665 "\x15\x01\x01\x01",
20666 .ilen = 76,
20667 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020668 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20669 "\xA2\xFC\xA1\xA3",
20670 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020671 .result = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
20672 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
20673 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
20674 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
20675 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
20676 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
20677 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
20678 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
20679 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
20680 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
20681 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
20682 "\x8C\xAA\x81\xE2",
20683 .rlen = 92,
20684 }, {
20685 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20686 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20687 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20688 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20689 "\x73\x61\x6C\x74",
20690 .klen = 36,
20691 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20692 .input = "\x63\x69\x73\x63\x6F\x01\x72\x75"
20693 "\x6C\x65\x73\x01\x74\x68\x65\x01"
20694 "\x6E\x65\x74\x77\x65\x01\x64\x65"
20695 "\x66\x69\x6E\x65\x01\x74\x68\x65"
20696 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
20697 "\x67\x69\x65\x73\x01\x74\x68\x61"
20698 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
20699 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
20700 "\x72\x72\x6F\x77\x01\x02\x02\x01",
20701 .ilen = 72,
20702 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080020703 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
20704 "\x69\x76\x65\x63",
20705 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020706 .result = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
20707 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
20708 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
20709 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
20710 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
20711 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
20712 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
20713 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
20714 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
20715 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
20716 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
20717 .rlen = 88,
20718 }, {
20719 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
20720 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
20721 "\xD9\x66\x42\x67",
20722 .klen = 20,
20723 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
20724 .input = "\x01\x02\x02\x01",
20725 .ilen = 4,
Herbert Xu85375442015-07-09 07:17:25 +080020726 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
20727 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
20728 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020729 .result = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
20730 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
20731 "\x04\xBE\xF2\x70",
20732 .rlen = 20,
20733 }, {
20734 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20735 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20736 "\xDE\xCA\xF8\x88",
20737 .klen = 20,
20738 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20739 .input = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
20740 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
20741 "\x62\x65\x00\x01",
20742 .ilen = 20,
20743 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080020744 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
20745 "\xCE\xFA\xCE\x74",
20746 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020747 .result = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
20748 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
20749 "\x43\x33\x21\x64\x41\x25\x03\x52"
20750 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
20751 "\x43\xAF\x8C\x3E",
20752 .rlen = 36,
20753 }, {
20754 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
20755 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
20756 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
20757 "\x62\x65\x66\x6F\x72\x65\x69\x61"
20758 "\x74\x75\x72\x6E",
20759 .klen = 36,
20760 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
20761 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20762 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20763 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20764 "\x02\x00\x07\x00\x61\x62\x63\x64"
20765 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20766 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20767 "\x01\x02\x02\x01",
20768 .ilen = 52,
20769 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
Herbert Xu85375442015-07-09 07:17:25 +080020770 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
20771 "\x67\x65\x74\x6D",
20772 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020773 .result = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
20774 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
20775 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
20776 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
20777 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
20778 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
20779 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
20780 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
20781 "\x9F\xB4\xC0\x53",
20782 .rlen = 68,
20783 }, {
20784 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20785 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20786 "\x57\x69\x0E\x43",
20787 .klen = 20,
20788 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20789 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20790 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20791 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20792 "\x02\x00\x07\x00\x61\x62\x63\x64"
20793 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20794 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20795 "\x01\x02\x02\x01",
20796 .ilen = 52,
20797 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020798 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20799 "\xA2\xFC\xA1\xA3",
20800 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020801 .result = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
20802 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
20803 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
20804 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
20805 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20806 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20807 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
20808 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
20809 "\x40\xD7\xCB\x05",
20810 .rlen = 68,
20811 }, {
20812 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20813 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20814 "\x22\x43\x3C\x64",
20815 .klen = 20,
20816 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
20817 .input = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
20818 "\x61\x62\x63\x64\x65\x66\x67\x68"
20819 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
20820 "\x71\x72\x73\x74\x01\x02\x02\x01",
20821 .ilen = 32,
20822 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080020823 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
20824 "\x3A\x23\x4B\xFD",
20825 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020826 .result = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
20827 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
20828 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
20829 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
20830 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
20831 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
20832 .rlen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040020833 }
20834};
20835
20836static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
Herbert Xu85375442015-07-09 07:17:25 +080020837 { /* Generated using Crypto++ */
Adrian Hoban69435b92010-11-04 15:02:04 -040020838 .key = zeroed_string,
20839 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020840 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040020841 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
Herbert Xu85375442015-07-09 07:17:25 +080020842 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20843 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20844 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
Adrian Hoban69435b92010-11-04 15:02:04 -040020845 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020846 .assoc = zeroed_string,
20847 .alen = 16,
20848 .result = zeroed_string,
20849 .rlen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020850
Herbert Xu85375442015-07-09 07:17:25 +080020851 },{
Adrian Hoban69435b92010-11-04 15:02:04 -040020852 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20853 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020854 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020855 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020856 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040020857 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
Herbert Xu85375442015-07-09 07:17:25 +080020858 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20859 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20860 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
Adrian Hoban69435b92010-11-04 15:02:04 -040020861 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020862 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
20863 "\x00\x00\x00\x00\x00\x00\x00\x01",
20864 .alen = 16,
20865 .result = zeroed_string,
20866 .rlen = 16,
20867 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020868 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20869 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020870 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020871 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020872 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040020873 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020874 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20875 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20876 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
Adrian Hoban69435b92010-11-04 15:02:04 -040020877 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020878 .assoc = zeroed_string,
20879 .alen = 16,
20880 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20881 "\x01\x01\x01\x01\x01\x01\x01\x01",
20882 .rlen = 16,
20883 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020884 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20885 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020886 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020887 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020888 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040020889 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020890 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20891 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20892 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
Adrian Hoban69435b92010-11-04 15:02:04 -040020893 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020894 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20895 "\x00\x00\x00\x00\x00\x00\x00\x00",
20896 .alen = 16,
20897 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20898 "\x01\x01\x01\x01\x01\x01\x01\x01",
20899 .rlen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020900
Herbert Xu85375442015-07-09 07:17:25 +080020901 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020902 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20903 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020904 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020905 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020906 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040020907 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020908 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20909 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20910 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
Adrian Hoban69435b92010-11-04 15:02:04 -040020911 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020912 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20913 "\x00\x00\x00\x00\x00\x00\x00\x01",
20914 .alen = 16,
20915 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20916 "\x01\x01\x01\x01\x01\x01\x01\x01",
20917 .rlen = 16,
20918 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020919 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20920 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020921 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020922 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020923 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040020924 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020925 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20926 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20927 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20928 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20929 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20930 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20931 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20932 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20933 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
Adrian Hoban69435b92010-11-04 15:02:04 -040020934 .ilen = 80,
Herbert Xu85375442015-07-09 07:17:25 +080020935 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20936 "\x00\x00\x00\x00\x00\x00\x00\x01",
20937 .alen = 16,
20938 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20939 "\x01\x01\x01\x01\x01\x01\x01\x01"
20940 "\x01\x01\x01\x01\x01\x01\x01\x01"
20941 "\x01\x01\x01\x01\x01\x01\x01\x01"
20942 "\x01\x01\x01\x01\x01\x01\x01\x01"
20943 "\x01\x01\x01\x01\x01\x01\x01\x01"
20944 "\x01\x01\x01\x01\x01\x01\x01\x01"
20945 "\x01\x01\x01\x01\x01\x01\x01\x01",
20946 .rlen = 64,
20947 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020948 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20949 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
Herbert Xu85375442015-07-09 07:17:25 +080020950 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020951 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020952 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
Adrian Hoban69435b92010-11-04 15:02:04 -040020953 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20954 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20955 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20956 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20957 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20958 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20959 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20960 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20961 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20962 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20963 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20964 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20965 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20966 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20967 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20968 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20969 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20970 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20971 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20972 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20973 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20974 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20975 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20976 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20977 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20978 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20979 .ilen = 208,
Herbert Xu85375442015-07-09 07:17:25 +080020980 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20981 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
20982 "\x89\xab\xcd\xef",
20983 .alen = 20,
20984 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
20985 "\xff\xff\xff\xff\xff\xff\xff\xff"
20986 "\xff\xff\xff\xff\xff\xff\xff\xff"
20987 "\xff\xff\xff\xff\xff\xff\xff\xff"
20988 "\xff\xff\xff\xff\xff\xff\xff\xff"
20989 "\xff\xff\xff\xff\xff\xff\xff\xff"
20990 "\xff\xff\xff\xff\xff\xff\xff\xff"
20991 "\xff\xff\xff\xff\xff\xff\xff\xff"
20992 "\xff\xff\xff\xff\xff\xff\xff\xff"
20993 "\xff\xff\xff\xff\xff\xff\xff\xff"
20994 "\xff\xff\xff\xff\xff\xff\xff\xff"
20995 "\xff\xff\xff\xff\xff\xff\xff\xff"
20996 "\xff\xff\xff\xff\xff\xff\xff\xff"
20997 "\xff\xff\xff\xff\xff\xff\xff\xff"
20998 "\xff\xff\xff\xff\xff\xff\xff\xff"
20999 "\xff\xff\xff\xff\xff\xff\xff\xff"
21000 "\xff\xff\xff\xff\xff\xff\xff\xff"
21001 "\xff\xff\xff\xff\xff\xff\xff\xff"
21002 "\xff\xff\xff\xff\xff\xff\xff\xff"
21003 "\xff\xff\xff\xff\xff\xff\xff\xff"
21004 "\xff\xff\xff\xff\xff\xff\xff\xff"
21005 "\xff\xff\xff\xff\xff\xff\xff\xff"
21006 "\xff\xff\xff\xff\xff\xff\xff\xff"
21007 "\xff\xff\xff\xff\xff\xff\xff\xff",
21008 .rlen = 192,
Herbert Xu8f69b762015-06-16 13:54:26 +080021009 }, {
21010 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21011 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21012 "\x2E\x44\x3B\x68",
21013 .klen = 20,
21014 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
21015 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
21016 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
21017 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
21018 "\x38\xD3\x01\x00\x00\x01\x00\x00"
21019 "\x00\x00\x00\x00\x04\x5F\x73\x69"
21020 "\x70\x04\x5F\x75\x64\x70\x03\x73"
21021 "\x69\x70\x09\x63\x79\x62\x65\x72"
21022 "\x63\x69\x74\x79\x02\x64\x6B\x00"
21023 "\x00\x21\x00\x01\x01\x02\x02\x01",
21024 .rlen = 72,
21025 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080021026 "\x00\x00\x00\x00\x49\x56\xED\x7E"
21027 "\x3B\x24\x4C\xFE",
21028 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021029 .input = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
21030 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
21031 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
21032 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
21033 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
21034 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
21035 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
21036 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
21037 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
21038 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
21039 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
21040 .ilen = 88,
21041 }, {
21042 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21043 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21044 "\xCA\xFE\xBA\xBE",
21045 .klen = 20,
21046 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21047 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
21048 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
21049 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
21050 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
21051 "\x00\x01\x00\x00\x00\x00\x00\x00"
21052 "\x03\x73\x69\x70\x09\x63\x79\x62"
21053 "\x65\x72\x63\x69\x74\x79\x02\x64"
21054 "\x6B\x00\x00\x01\x00\x01\x00\x01",
21055 .rlen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080021056 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
21057 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21058 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021059 .input = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
21060 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
21061 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
21062 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
21063 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
21064 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
21065 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
21066 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
21067 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
21068 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
21069 .ilen = 80,
21070 }, {
21071 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21072 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21073 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21074 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21075 "\x11\x22\x33\x44",
21076 .klen = 36,
21077 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
21078 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
21079 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
21080 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
21081 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
21082 "\x70\x02\x40\x00\x20\xBF\x00\x00"
21083 "\x02\x04\x05\xB4\x01\x01\x04\x02"
21084 "\x01\x02\x02\x01",
21085 .rlen = 52,
Herbert Xu85375442015-07-09 07:17:25 +080021086 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
21087 "\x01\x02\x03\x04\x05\x06\x07\x08",
21088 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021089 .input = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
21090 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
21091 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
21092 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
21093 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
21094 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
21095 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
21096 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
21097 "\x15\x95\x6C\x96",
21098 .ilen = 68,
21099 }, {
21100 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
21101 "\x00\x00\x00\x00\x00\x00\x00\x00"
21102 "\x00\x00\x00\x00",
21103 .klen = 20,
21104 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
21105 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
21106 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
21107 "\x01\x01\x01\x01\x08\x00\x07\x5C"
21108 "\x02\x00\x44\x00\x61\x62\x63\x64"
21109 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21110 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21111 "\x75\x76\x77\x61\x62\x63\x64\x65"
21112 "\x66\x67\x68\x69\x01\x02\x02\x01",
21113 .rlen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080021114 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
21115 "\x00\x00\x00\x00\x00\x00\x00\x00",
21116 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021117 .input = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
21118 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
21119 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
21120 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
21121 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
21122 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
21123 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
21124 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
21125 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
21126 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
21127 .ilen = 80,
21128 }, {
21129 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21130 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21131 "\x57\x69\x0E\x43",
21132 .klen = 20,
21133 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21134 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
21135 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
21136 "\x01\x01\x01\x01\x08\x00\x08\x5C"
21137 "\x02\x00\x43\x00\x61\x62\x63\x64"
21138 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21139 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21140 "\x75\x76\x77\x61\x62\x63\x64\x65"
21141 "\x66\x67\x68\x69\x01\x02\x02\x01",
21142 .rlen = 64,
21143 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021144 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21145 "\xA2\xFC\xA1\xA3",
21146 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021147 .input = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
21148 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
21149 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
21150 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
21151 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21152 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21153 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
21154 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
21155 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
21156 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
21157 .ilen = 80,
21158 }, {
21159 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21160 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21161 "\x57\x69\x0E\x43",
21162 .klen = 20,
21163 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21164 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
21165 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
21166 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
21167 "\x01\x02\x02\x01",
21168 .rlen = 28,
21169 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021170 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21171 "\xA2\xFC\xA1\xA3",
21172 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021173 .input = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
21174 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
21175 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
21176 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
21177 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
21178 "\xE7\xD0\x5D\x35",
21179 .ilen = 44,
21180 }, {
21181 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21182 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21183 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21184 "\xCA\xFE\xBA\xBE",
21185 .klen = 28,
21186 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21187 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
21188 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
21189 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
21190 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
21191 "\x50\x10\x16\xD0\x75\x68\x00\x01",
21192 .rlen = 40,
Herbert Xu85375442015-07-09 07:17:25 +080021193 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
21194 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21195 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021196 .input = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
21197 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
21198 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
21199 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
21200 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
21201 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
21202 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
21203 .ilen = 56,
21204 }, {
21205 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21206 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21207 "\xDE\xCA\xF8\x88",
21208 .klen = 20,
21209 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21210 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
21211 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
21212 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21213 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
21214 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
21215 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
21216 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
21217 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
21218 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
21219 "\x23\x01\x01\x01",
21220 .rlen = 76,
21221 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080021222 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21223 "\xCE\xFA\xCE\x74",
21224 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021225 .input = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
21226 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
21227 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
21228 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
21229 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
21230 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
21231 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
21232 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
21233 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
21234 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
21235 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
21236 "\x69\x62\x34\x36",
21237 .ilen = 92,
21238 }, {
21239 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21240 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21241 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21242 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21243 "\x73\x61\x6C\x74",
21244 .klen = 36,
21245 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21246 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
21247 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
21248 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
21249 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
21250 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
21251 .rlen = 40,
21252 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080021253 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21254 "\x69\x76\x65\x63",
21255 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021256 .input = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
21257 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
21258 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
21259 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
21260 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
21261 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
21262 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
21263 .ilen = 56,
21264 }, {
21265 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21266 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21267 "\x57\x69\x0E\x43",
21268 .klen = 20,
21269 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21270 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
21271 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
21272 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21273 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
21274 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
21275 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
21276 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
21277 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
21278 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
21279 "\x15\x01\x01\x01",
21280 .rlen = 76,
21281 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021282 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21283 "\xA2\xFC\xA1\xA3",
21284 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021285 .input = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
21286 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
21287 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
21288 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
21289 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
21290 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
21291 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
21292 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
21293 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
21294 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
21295 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
21296 "\x8C\xAA\x81\xE2",
21297 .ilen = 92,
21298 }, {
21299 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21300 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21301 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21302 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21303 "\x73\x61\x6C\x74",
21304 .klen = 36,
21305 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21306 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
21307 "\x6C\x65\x73\x01\x74\x68\x65\x01"
21308 "\x6E\x65\x74\x77\x65\x01\x64\x65"
21309 "\x66\x69\x6E\x65\x01\x74\x68\x65"
21310 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
21311 "\x67\x69\x65\x73\x01\x74\x68\x61"
21312 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
21313 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
21314 "\x72\x72\x6F\x77\x01\x02\x02\x01",
21315 .rlen = 72,
21316 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080021317 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21318 "\x69\x76\x65\x63",
21319 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021320 .input = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
21321 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
21322 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
21323 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
21324 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
21325 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
21326 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
21327 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
21328 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
21329 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
21330 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
21331 .ilen = 88,
21332 }, {
21333 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
21334 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
21335 "\xD9\x66\x42\x67",
21336 .klen = 20,
21337 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21338 .result = "\x01\x02\x02\x01",
21339 .rlen = 4,
Herbert Xu85375442015-07-09 07:17:25 +080021340 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
21341 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21342 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021343 .input = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
21344 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
21345 "\x04\xBE\xF2\x70",
21346 .ilen = 20,
21347 }, {
21348 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21349 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21350 "\xDE\xCA\xF8\x88",
21351 .klen = 20,
21352 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21353 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
21354 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
21355 "\x62\x65\x00\x01",
21356 .rlen = 20,
21357 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080021358 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21359 "\xCE\xFA\xCE\x74",
21360 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021361 .input = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
21362 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
21363 "\x43\x33\x21\x64\x41\x25\x03\x52"
21364 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
21365 "\x43\xAF\x8C\x3E",
21366 .ilen = 36,
21367 }, {
21368 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
21369 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
21370 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
21371 "\x62\x65\x66\x6F\x72\x65\x69\x61"
21372 "\x74\x75\x72\x6E",
21373 .klen = 36,
21374 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
21375 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21376 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21377 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21378 "\x02\x00\x07\x00\x61\x62\x63\x64"
21379 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21380 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21381 "\x01\x02\x02\x01",
21382 .rlen = 52,
21383 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
Herbert Xu85375442015-07-09 07:17:25 +080021384 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
21385 "\x67\x65\x74\x6D",
21386 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021387 .input = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
21388 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
21389 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
21390 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
21391 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
21392 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
21393 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
21394 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
21395 "\x9F\xB4\xC0\x53",
21396 .ilen = 68,
21397 }, {
21398 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21399 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21400 "\x57\x69\x0E\x43",
21401 .klen = 20,
21402 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21403 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21404 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21405 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21406 "\x02\x00\x07\x00\x61\x62\x63\x64"
21407 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21408 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21409 "\x01\x02\x02\x01",
21410 .rlen = 52,
21411 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021412 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21413 "\xA2\xFC\xA1\xA3",
21414 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021415 .input = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
21416 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
21417 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
21418 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
21419 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21420 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21421 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
21422 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
21423 "\x40\xD7\xCB\x05",
21424 .ilen = 68,
21425 }, {
21426 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21427 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21428 "\x22\x43\x3C\x64",
21429 .klen = 20,
21430 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
21431 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
21432 "\x61\x62\x63\x64\x65\x66\x67\x68"
21433 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
21434 "\x71\x72\x73\x74\x01\x02\x02\x01",
21435 .rlen = 32,
21436 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080021437 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
21438 "\x3A\x23\x4B\xFD",
21439 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021440 .input = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
21441 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
21442 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
21443 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
21444 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
21445 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
21446 .ilen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040021447 }
21448};
21449
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021450static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = {
21451 { /* From draft-mcgrew-gcm-test-01 */
21452 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21453 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21454 "\x22\x43\x3c\x64",
21455 .klen = 20,
21456 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021457 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21458 "\x00\x00\x00\x00\x00\x00\x00\x00",
21459 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021460 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21461 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21462 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21463 "\x02\x00\x07\x00\x61\x62\x63\x64"
21464 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21465 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21466 "\x01\x02\x02\x01",
21467 .ilen = 52,
21468 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21469 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21470 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21471 "\x02\x00\x07\x00\x61\x62\x63\x64"
21472 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21473 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21474 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21475 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21476 "\xe4\x09\x9a\xaa",
21477 .rlen = 68,
21478 }
21479};
21480
21481static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = {
21482 { /* From draft-mcgrew-gcm-test-01 */
21483 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21484 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21485 "\x22\x43\x3c\x64",
21486 .klen = 20,
21487 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021488 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21489 "\x00\x00\x00\x00\x00\x00\x00\x00",
21490 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021491 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21492 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21493 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21494 "\x02\x00\x07\x00\x61\x62\x63\x64"
21495 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21496 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21497 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21498 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21499 "\xe4\x09\x9a\xaa",
21500 .ilen = 68,
21501 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21502 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21503 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21504 "\x02\x00\x07\x00\x61\x62\x63\x64"
21505 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21506 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21507 "\x01\x02\x02\x01",
21508 .rlen = 52,
21509 }, { /* nearly same as previous, but should fail */
21510 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21511 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21512 "\x22\x43\x3c\x64",
21513 .klen = 20,
21514 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021515 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21516 "\x00\x00\x00\x00\x00\x00\x00\x00",
21517 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021518 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21519 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21520 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21521 "\x02\x00\x07\x00\x61\x62\x63\x64"
21522 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21523 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21524 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21525 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21526 "\x00\x00\x00\x00",
21527 .ilen = 68,
21528 .novrfy = 1,
21529 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21530 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21531 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21532 "\x02\x00\x07\x00\x61\x62\x63\x64"
21533 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21534 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21535 "\x01\x02\x02\x01",
21536 .rlen = 52,
21537 },
21538};
21539
Herbert Xuda7f0332008-07-31 17:08:25 +080021540static struct aead_testvec aes_ccm_enc_tv_template[] = {
21541 { /* From RFC 3610 */
21542 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21543 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21544 .klen = 16,
21545 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21546 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21547 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21548 .alen = 8,
21549 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21550 "\x10\x11\x12\x13\x14\x15\x16\x17"
21551 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21552 .ilen = 23,
21553 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21554 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21555 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21556 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21557 .rlen = 31,
21558 }, {
21559 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21560 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21561 .klen = 16,
21562 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
21563 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21564 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21565 "\x08\x09\x0a\x0b",
21566 .alen = 12,
21567 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21568 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21569 "\x1c\x1d\x1e\x1f",
21570 .ilen = 20,
21571 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21572 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21573 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21574 "\x7d\x9c\x2d\x93",
21575 .rlen = 28,
21576 }, {
21577 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21578 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21579 .klen = 16,
21580 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21581 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21582 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21583 .alen = 8,
21584 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21585 "\x10\x11\x12\x13\x14\x15\x16\x17"
21586 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21587 "\x20",
21588 .ilen = 25,
21589 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21590 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21591 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21592 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21593 "\x7e\x5f\x4e",
21594 .rlen = 35,
21595 }, {
21596 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21597 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21598 .klen = 16,
21599 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21600 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21601 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21602 "\x08\x09\x0a\x0b",
21603 .alen = 12,
21604 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21605 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21606 "\x1c\x1d\x1e",
21607 .ilen = 19,
21608 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
21609 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21610 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21611 "\x4d\x99\x99\x88\xdd",
21612 .rlen = 29,
21613 }, {
21614 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21615 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21616 .klen = 16,
21617 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21618 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21619 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21620 .alen = 8,
21621 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21622 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21623 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21624 .ilen = 24,
21625 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21626 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21627 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21628 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21629 .rlen = 32,
21630 }, {
21631 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21632 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21633 .klen = 16,
21634 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21635 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21636 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21637 "\x20\xea\x60\xc0",
21638 .alen = 12,
21639 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21640 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21641 "\x3a\x80\x3b\xa8\x7f",
21642 .ilen = 21,
21643 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21644 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21645 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21646 "\x5a\xe0\x70\x45\x51",
21647 .rlen = 29,
21648 }, {
21649 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21650 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21651 .klen = 16,
21652 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21653 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21654 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21655 .alen = 8,
21656 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21657 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21658 "\x98\x09\xd6\x7d\xbe\xdd\x18",
21659 .ilen = 23,
21660 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21661 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21662 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21663 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21664 "\xba",
21665 .rlen = 33,
Ard Biesheuvel45859882014-04-16 20:40:04 +080021666 }, {
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080021667 /* This is taken from FIPS CAVS. */
Ard Biesheuvel45859882014-04-16 20:40:04 +080021668 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
21669 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e",
21670 .klen = 16,
21671 .iv = "\x03\x96\xac\x59\x30\x07\xa1\xe2\xa2\xc7\x55\x24\0\0\0\0",
21672 .alen = 0,
21673 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
21674 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
21675 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
21676 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
21677 .ilen = 32,
21678 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
21679 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
21680 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
21681 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
21682 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
21683 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
21684 .rlen = 48,
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080021685 }, {
21686 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
21687 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3",
21688 .klen = 16,
21689 .iv = "\x03\x4f\xa3\x19\xd3\x01\x5a\xd8"
21690 "\x30\x60\x15\x56\x00\x00\x00\x00",
21691 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
21692 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
21693 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
21694 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
21695 .alen = 32,
21696 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
21697 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
21698 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
21699 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
21700 .ilen = 32,
21701 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
21702 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
21703 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
21704 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
21705 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
21706 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
21707 .rlen = 48,
21708 }, {
21709 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
21710 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
21711 "\x53\x14\x73\x66\x8d\x88\xf6\x80",
21712 .klen = 24,
21713 .iv = "\x03\xa0\x20\x35\x26\xf2\x21\x8d"
21714 "\x50\x20\xda\xe2\x00\x00\x00\x00",
21715 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
21716 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
21717 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
21718 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
21719 .alen = 32,
21720 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
21721 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
21722 .rlen = 16,
21723 }, {
21724 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
21725 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
21726 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01",
21727 .klen = 24,
21728 .iv = "\x03\xd6\x3c\x8c\x86\x84\xb6\xcd"
21729 "\xef\x09\x2e\x94\x00\x00\x00\x00",
21730 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
21731 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
21732 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
21733 "\xe3\x00\x73\x69\x84\x69\x87\x79",
21734 .alen = 32,
21735 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
21736 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
21737 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
21738 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
21739 .ilen = 32,
21740 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
21741 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
21742 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
21743 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
21744 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
21745 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
21746 .rlen = 48,
21747 }, {
21748 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
21749 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
21750 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
21751 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b",
21752 .klen = 32,
21753 .iv = "\x03\x1e\x29\x91\xad\x8e\xc1\x53"
21754 "\x0a\xcf\x2d\xbe\x00\x00\x00\x00",
21755 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
21756 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
21757 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
21758 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
21759 .alen = 32,
21760 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
21761 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
21762 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
21763 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
21764 .ilen = 32,
21765 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
21766 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
21767 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
21768 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
21769 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
21770 .rlen = 40,
21771 }, {
21772 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
21773 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
21774 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
21775 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39",
21776 .klen = 32,
21777 .iv = "\x03\xf9\xd9\x4e\x63\xb5\x3d\x9d"
21778 "\x43\xf6\x1e\x50",
21779 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
21780 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
21781 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
21782 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
21783 .alen = 32,
21784 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
21785 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
21786 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
21787 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
21788 .ilen = 32,
21789 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
21790 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
21791 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
21792 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
21793 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
21794 "\x7b\x72\x8a\xf7",
21795 .rlen = 44,
21796 }, {
21797 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
21798 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
21799 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
21800 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b",
21801 .klen = 32,
21802 .iv = "\x03\x24\xa7\x8b\x07\xcb\xcc\x0e"
21803 "\xe6\x33\xbf\xf5\x00\x00\x00\x00",
21804 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
21805 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
21806 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
21807 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
21808 .alen = 32,
21809 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
21810 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
21811 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
21812 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
21813 .ilen = 32,
21814 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
21815 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
21816 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
21817 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
21818 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
21819 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
21820 .rlen = 48,
Ard Biesheuvel45859882014-04-16 20:40:04 +080021821 }
Herbert Xuda7f0332008-07-31 17:08:25 +080021822};
21823
21824static struct aead_testvec aes_ccm_dec_tv_template[] = {
21825 { /* From RFC 3610 */
21826 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21827 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21828 .klen = 16,
21829 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21830 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21831 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21832 .alen = 8,
21833 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21834 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21835 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21836 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21837 .ilen = 31,
21838 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21839 "\x10\x11\x12\x13\x14\x15\x16\x17"
21840 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21841 .rlen = 23,
21842 }, {
21843 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21844 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21845 .klen = 16,
21846 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
21847 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21848 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21849 "\x08\x09\x0a\x0b",
21850 .alen = 12,
21851 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21852 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21853 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21854 "\x7d\x9c\x2d\x93",
21855 .ilen = 28,
21856 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21857 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21858 "\x1c\x1d\x1e\x1f",
21859 .rlen = 20,
21860 }, {
21861 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21862 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21863 .klen = 16,
21864 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21865 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21866 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21867 .alen = 8,
21868 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21869 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21870 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21871 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21872 "\x7e\x5f\x4e",
21873 .ilen = 35,
21874 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21875 "\x10\x11\x12\x13\x14\x15\x16\x17"
21876 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21877 "\x20",
21878 .rlen = 25,
21879 }, {
21880 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21881 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21882 .klen = 16,
21883 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21884 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21885 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21886 "\x08\x09\x0a\x0b",
21887 .alen = 12,
21888 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
21889 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21890 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21891 "\x4d\x99\x99\x88\xdd",
21892 .ilen = 29,
21893 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21894 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21895 "\x1c\x1d\x1e",
21896 .rlen = 19,
21897 }, {
21898 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21899 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21900 .klen = 16,
21901 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21902 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21903 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21904 .alen = 8,
21905 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21906 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21907 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21908 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21909 .ilen = 32,
21910 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21911 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21912 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21913 .rlen = 24,
21914 }, {
21915 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21916 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21917 .klen = 16,
21918 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21919 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21920 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21921 "\x20\xea\x60\xc0",
21922 .alen = 12,
21923 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21924 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21925 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21926 "\x5a\xe0\x70\x45\x51",
21927 .ilen = 29,
21928 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21929 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21930 "\x3a\x80\x3b\xa8\x7f",
21931 .rlen = 21,
21932 }, {
21933 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21934 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21935 .klen = 16,
21936 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21937 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21938 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21939 .alen = 8,
21940 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21941 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21942 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21943 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21944 "\xba",
21945 .ilen = 33,
21946 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21947 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21948 "\x98\x09\xd6\x7d\xbe\xdd\x18",
21949 .rlen = 23,
Jarod Wilson5d667322009-05-04 19:23:40 +080021950 }, {
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080021951 /* This is taken from FIPS CAVS. */
Jarod Wilson5d667322009-05-04 19:23:40 +080021952 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080021953 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9",
21954 .klen = 16,
21955 .iv = "\x03\xc6\xfb\x7d\x80\x0d\x13\xab"
21956 "\xd8\xa6\xb2\xd8\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080021957 .alen = 0,
21958 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
21959 .ilen = 8,
21960 .result = "\x00",
21961 .rlen = 0,
21962 .novrfy = 1,
21963 }, {
21964 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080021965 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9",
21966 .klen = 16,
21967 .iv = "\x03\xaf\x94\x87\x78\x35\x82\x81"
21968 "\x7f\x88\x94\x68\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080021969 .alen = 0,
21970 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
21971 .ilen = 8,
21972 .result = "\x00",
21973 .rlen = 0,
21974 }, {
21975 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080021976 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8",
21977 .klen = 16,
21978 .iv = "\x03\xc6\xfb\x7d\x80\x0d\x13\xab"
21979 "\xd8\xa6\xb2\xd8\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080021980 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
21981 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
21982 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
21983 "\xd8\x94\x99\x91\x81\x54\x62\x57",
21984 .alen = 32,
21985 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
21986 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
21987 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
21988 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
21989 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
21990 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
21991 .ilen = 48,
21992 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
21993 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
21994 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
21995 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
21996 .rlen = 32,
21997 .novrfy = 1,
21998 }, {
21999 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022000 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8",
22001 .klen = 16,
22002 .iv = "\x03\x05\xe0\xc9\x0f\xed\x34\xea"
22003 "\x97\xd4\x3b\xdf\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022004 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
22005 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
22006 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
22007 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
22008 .alen = 32,
22009 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
22010 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
22011 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
22012 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
22013 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
22014 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
22015 .ilen = 48,
22016 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
22017 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
22018 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
22019 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
22020 .rlen = 32,
22021 }, {
22022 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
22023 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022024 "\xa4\x48\x93\x39\x26\x71\x4a\xc6",
22025 .klen = 24,
22026 .iv = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22027 "\x57\xba\xfd\x9e\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022028 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
22029 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
22030 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
22031 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
22032 .alen = 32,
22033 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
22034 .ilen = 8,
22035 .result = "\x00",
22036 .rlen = 0,
22037 }, {
22038 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22039 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022040 "\x29\xa0\xba\x9e\x48\x78\xd1\xba",
22041 .klen = 24,
22042 .iv = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22043 "\x57\xba\xfd\x9e\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022044 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
22045 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
22046 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
22047 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
22048 .alen = 32,
22049 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
22050 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
22051 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
22052 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
22053 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
22054 .ilen = 40,
22055 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
22056 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
22057 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
22058 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
22059 .rlen = 32,
22060 }, {
22061 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22062 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022063 "\x29\xa0\xba\x9e\x48\x78\xd1\xba",
22064 .klen = 24,
22065 .iv = "\x03\xd1\xfc\x57\x9c\xfe\xb8\x9c"
22066 "\xad\x71\xaa\x1f\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022067 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
22068 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
22069 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
22070 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
22071 .alen = 32,
22072 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
22073 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
22074 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
22075 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
22076 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
22077 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
22078 .ilen = 48,
22079 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
22080 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
22081 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
22082 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
22083 .rlen = 32,
22084 .novrfy = 1,
22085 }, {
22086 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
22087 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
22088 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022089 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff",
22090 .klen = 32,
22091 .iv = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22092 "\x57\xba\xfd\x9e\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022093 .alen = 0,
22094 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
22095 .ilen = 8,
22096 .result = "\x00",
22097 .rlen = 0,
22098 }, {
22099 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
22100 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
22101 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022102 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb",
22103 .klen = 32,
22104 .iv = "\x03\x85\x34\x66\x42\xc8\x92\x0f"
22105 "\x36\x58\xe0\x6b\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022106 .alen = 0,
22107 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
22108 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
22109 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
22110 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
22111 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
22112 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
22113 .ilen = 48,
22114 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
22115 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
22116 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
22117 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
22118 .rlen = 32,
22119 .novrfy = 1,
22120 }, {
22121 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22122 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
22123 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022124 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b",
22125 .klen = 32,
22126 .iv = "\x03\xcf\x76\x3f\xd9\x95\x75\x8f"
22127 "\x44\x89\x40\x7b\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022128 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
22129 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
22130 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
22131 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
22132 .alen = 32,
22133 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
22134 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
22135 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
22136 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
22137 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
22138 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
22139 .ilen = 48,
22140 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
22141 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
22142 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
22143 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
22144 .rlen = 32,
22145 },
22146};
22147
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080022148/*
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022149 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
22150 * use a 13-byte nonce, we only support an 11-byte nonce. Worse,
22151 * they use AD lengths which are not valid ESP header lengths.
22152 *
22153 * These vectors are copied/generated from the ones for rfc4106 with
22154 * the key truncated by one byte..
22155 */
22156static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
22157 { /* Generated using Crypto++ */
22158 .key = zeroed_string,
22159 .klen = 19,
22160 .iv = zeroed_string,
22161 .input = zeroed_string,
22162 .ilen = 16,
22163 .assoc = zeroed_string,
22164 .alen = 16,
22165 .result = "\x2E\x9A\xCA\x6B\xDA\x54\xFC\x6F"
22166 "\x12\x50\xE8\xDE\x81\x3C\x63\x08"
22167 "\x1A\x22\xBA\x75\xEE\xD4\xD5\xB5"
22168 "\x27\x50\x01\xAC\x03\x33\x39\xFB",
22169 .rlen = 32,
22170 },{
22171 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22172 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22173 "\x00\x00\x00",
22174 .klen = 19,
22175 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22176 .input = zeroed_string,
22177 .ilen = 16,
22178 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
22179 "\x00\x00\x00\x00\x00\x00\x00\x01",
22180 .alen = 16,
22181 .result = "\xCF\xB9\x99\x17\xC8\x86\x0E\x7F"
22182 "\x7E\x76\xF8\xE6\xF8\xCC\x1F\x17"
22183 "\x6A\xE0\x53\x9F\x4B\x73\x7E\xDA"
22184 "\x08\x09\x4E\xC4\x1E\xAD\xC6\xB0",
22185 .rlen = 32,
22186
22187 }, {
22188 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22189 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22190 "\x00\x00\x00",
22191 .klen = 19,
22192 .iv = zeroed_string,
22193 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22194 "\x01\x01\x01\x01\x01\x01\x01\x01",
22195 .ilen = 16,
22196 .assoc = zeroed_string,
22197 .alen = 16,
22198 .result = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22199 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22200 "\xA1\xE2\xC2\x42\x2B\x81\x70\x40"
22201 "\xFD\x7F\x76\xD1\x03\x07\xBB\x0C",
22202 .rlen = 32,
22203 }, {
22204 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22205 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22206 "\x00\x00\x00",
22207 .klen = 19,
22208 .iv = zeroed_string,
22209 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22210 "\x01\x01\x01\x01\x01\x01\x01\x01",
22211 .ilen = 16,
22212 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22213 "\x00\x00\x00\x00\x00\x00\x00\x00",
22214 .alen = 16,
22215 .result = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22216 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22217 "\x5B\xC0\x73\xE0\x2B\x73\x68\xC9"
22218 "\x2D\x8C\x58\xC2\x90\x3D\xB0\x3E",
22219 .rlen = 32,
22220 }, {
22221 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22222 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22223 "\x00\x00\x00",
22224 .klen = 19,
22225 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22226 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22227 "\x01\x01\x01\x01\x01\x01\x01\x01",
22228 .ilen = 16,
22229 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22230 "\x00\x00\x00\x00\x00\x00\x00\x01",
22231 .alen = 16,
22232 .result = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22233 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22234 "\x43\x8E\x76\x57\x3B\xB4\x05\xE8"
22235 "\xA9\x9B\xBF\x25\xE0\x4F\xC0\xED",
22236 .rlen = 32,
22237 }, {
22238 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22239 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22240 "\x00\x00\x00",
22241 .klen = 19,
22242 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22243 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22244 "\x01\x01\x01\x01\x01\x01\x01\x01"
22245 "\x01\x01\x01\x01\x01\x01\x01\x01"
22246 "\x01\x01\x01\x01\x01\x01\x01\x01"
22247 "\x01\x01\x01\x01\x01\x01\x01\x01"
22248 "\x01\x01\x01\x01\x01\x01\x01\x01"
22249 "\x01\x01\x01\x01\x01\x01\x01\x01"
22250 "\x01\x01\x01\x01\x01\x01\x01\x01",
22251 .ilen = 64,
22252 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22253 "\x00\x00\x00\x00\x00\x00\x00\x01",
22254 .alen = 16,
22255 .result = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22256 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22257 "\x9C\xA4\x97\x83\x3F\x01\xA5\xF4"
22258 "\x43\x09\xE7\xB8\xE9\xD1\xD7\x02"
22259 "\x9B\xAB\x39\x18\xEB\x94\x34\x36"
22260 "\xE6\xC5\xC8\x9B\x00\x81\x9E\x49"
22261 "\x1D\x78\xE1\x48\xE3\xE9\xEA\x8E"
22262 "\x3A\x2B\x67\x5D\x35\x6A\x0F\xDB"
22263 "\x02\x73\xDD\xE7\x30\x4A\x30\x54"
22264 "\x1A\x9D\x09\xCA\xC8\x1C\x32\x5F",
22265 .rlen = 80,
22266 }, {
22267 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
22268 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22269 "\x00\x00\x00",
22270 .klen = 19,
22271 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
22272 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
22273 "\xff\xff\xff\xff\xff\xff\xff\xff"
22274 "\xff\xff\xff\xff\xff\xff\xff\xff"
22275 "\xff\xff\xff\xff\xff\xff\xff\xff"
22276 "\xff\xff\xff\xff\xff\xff\xff\xff"
22277 "\xff\xff\xff\xff\xff\xff\xff\xff"
22278 "\xff\xff\xff\xff\xff\xff\xff\xff"
22279 "\xff\xff\xff\xff\xff\xff\xff\xff"
22280 "\xff\xff\xff\xff\xff\xff\xff\xff"
22281 "\xff\xff\xff\xff\xff\xff\xff\xff"
22282 "\xff\xff\xff\xff\xff\xff\xff\xff"
22283 "\xff\xff\xff\xff\xff\xff\xff\xff"
22284 "\xff\xff\xff\xff\xff\xff\xff\xff"
22285 "\xff\xff\xff\xff\xff\xff\xff\xff"
22286 "\xff\xff\xff\xff\xff\xff\xff\xff"
22287 "\xff\xff\xff\xff\xff\xff\xff\xff"
22288 "\xff\xff\xff\xff\xff\xff\xff\xff"
22289 "\xff\xff\xff\xff\xff\xff\xff\xff"
22290 "\xff\xff\xff\xff\xff\xff\xff\xff"
22291 "\xff\xff\xff\xff\xff\xff\xff\xff"
22292 "\xff\xff\xff\xff\xff\xff\xff\xff"
22293 "\xff\xff\xff\xff\xff\xff\xff\xff"
22294 "\xff\xff\xff\xff\xff\xff\xff\xff"
22295 "\xff\xff\xff\xff\xff\xff\xff\xff",
22296 .ilen = 192,
22297 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
22298 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
22299 "\x89\xab\xcd\xef",
22300 .alen = 20,
22301 .result = "\x64\x17\xDC\x24\x9D\x92\xBA\x5E"
22302 "\x7C\x64\x6D\x33\x46\x77\xAC\xB1"
22303 "\x5C\x9E\xE2\xC7\x27\x11\x3E\x95"
22304 "\x7D\xBE\x28\xC8\xC1\xCA\x5E\x8C"
22305 "\xB4\xE2\xDE\x9F\x53\x59\x26\xDB"
22306 "\x0C\xD4\xE4\x07\x9A\xE6\x3E\x01"
22307 "\x58\x0D\x3E\x3D\xD5\x21\xEB\x04"
22308 "\x06\x9D\x5F\xB9\x02\x49\x1A\x2B"
22309 "\xBA\xF0\x4E\x3B\x85\x50\x5B\x09"
22310 "\xFE\xEC\xFC\x54\xEC\x0C\xE2\x79"
22311 "\x8A\x2F\x5F\xD7\x05\x5D\xF1\x6D"
22312 "\x22\xEB\xD1\x09\x80\x3F\x5A\x70"
22313 "\xB2\xB9\xD3\x63\x99\xC2\x4D\x1B"
22314 "\x36\x12\x00\x89\xAA\x5D\x55\xDA"
22315 "\x1D\x5B\xD8\x3C\x5F\x09\xD2\xE6"
22316 "\x39\x41\x5C\xF0\xBE\x26\x4E\x5F"
22317 "\x2B\x50\x44\x52\xC2\x10\x7D\x38"
22318 "\x82\x64\x83\x0C\xAE\x49\xD0\xE5"
22319 "\x4F\xE5\x66\x4C\x58\x7A\xEE\x43"
22320 "\x3B\x51\xFE\xBA\x24\x8A\xFE\xDC"
22321 "\x19\x6D\x60\x66\x61\xF9\x9A\x3F"
22322 "\x75\xFC\x38\x53\x5B\xB5\xCD\x52"
22323 "\x4F\xE5\xE4\xC9\xFE\x10\xCB\x98"
22324 "\xF0\x06\x5B\x07\xAB\xBB\xF4\x0E"
22325 "\x2D\xC2\xDD\x5D\xDD\x22\x9A\xCC"
22326 "\x39\xAB\x63\xA5\x3D\x9C\x51\x8A",
22327 .rlen = 208,
22328 }, { /* From draft-mcgrew-gcm-test-01 */
22329 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
22330 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
22331 "\x2E\x44\x3B",
22332 .klen = 19,
22333 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
22334 .input = "\x45\x00\x00\x48\x69\x9A\x00\x00"
22335 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
22336 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
22337 "\x38\xD3\x01\x00\x00\x01\x00\x00"
22338 "\x00\x00\x00\x00\x04\x5F\x73\x69"
22339 "\x70\x04\x5F\x75\x64\x70\x03\x73"
22340 "\x69\x70\x09\x63\x79\x62\x65\x72"
22341 "\x63\x69\x74\x79\x02\x64\x6B\x00"
22342 "\x00\x21\x00\x01\x01\x02\x02\x01",
22343 .ilen = 72,
22344 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
22345 "\x00\x00\x00\x00\x49\x56\xED\x7E"
22346 "\x3B\x24\x4C\xFE",
22347 .alen = 20,
22348 .result = "\x89\xBA\x3E\xEF\xE6\xD6\xCF\xDB"
22349 "\x83\x60\xF5\xBA\x3A\x56\x79\xE6"
22350 "\x7E\x0C\x53\xCF\x9E\x87\xE0\x4E"
22351 "\x1A\x26\x01\x24\xC7\x2E\x3D\xBF"
22352 "\x29\x2C\x91\xC1\xB8\xA8\xCF\xE0"
22353 "\x39\xF8\x53\x6D\x31\x22\x2B\xBF"
22354 "\x98\x81\xFC\x34\xEE\x85\x36\xCD"
22355 "\x26\xDB\x6C\x7A\x0C\x77\x8A\x35"
22356 "\x18\x85\x54\xB2\xBC\xDD\x3F\x43"
22357 "\x61\x06\x8A\xDF\x86\x3F\xB4\xAC"
22358 "\x97\xDC\xBD\xFD\x92\x10\xC5\xFF",
22359 .rlen = 88,
22360 }, {
22361 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22362 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
22363 "\xCA\xFE\xBA",
22364 .klen = 19,
22365 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22366 .input = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
22367 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
22368 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
22369 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
22370 "\x00\x01\x00\x00\x00\x00\x00\x00"
22371 "\x03\x73\x69\x70\x09\x63\x79\x62"
22372 "\x65\x72\x63\x69\x74\x79\x02\x64"
22373 "\x6B\x00\x00\x01\x00\x01\x00\x01",
22374 .ilen = 64,
22375 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
22376 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22377 .alen = 16,
22378 .result = "\x4B\xC2\x70\x60\x64\xD2\xF3\xC8"
22379 "\xE5\x26\x8A\xDE\xB8\x7E\x7D\x16"
22380 "\x56\xC7\xD2\x88\xBA\x8D\x58\xAF"
22381 "\xF5\x71\xB6\x37\x84\xA7\xB1\x99"
22382 "\x51\x5C\x0D\xA0\x27\xDE\xE7\x2D"
22383 "\xEF\x25\x88\x1F\x1D\x77\x11\xFF"
22384 "\xDB\xED\xEE\x56\x16\xC5\x5C\x9B"
22385 "\x00\x62\x1F\x68\x4E\x7C\xA0\x97"
22386 "\x10\x72\x7E\x53\x13\x3B\x68\xE4"
22387 "\x30\x99\x91\x79\x09\xEA\xFF\x6A",
22388 .rlen = 80,
22389 }, {
22390 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22391 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22392 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22393 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22394 "\x11\x22\x33",
22395 .klen = 35,
22396 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
22397 .input = "\x45\x00\x00\x30\x69\xA6\x40\x00"
22398 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
22399 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
22400 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
22401 "\x70\x02\x40\x00\x20\xBF\x00\x00"
22402 "\x02\x04\x05\xB4\x01\x01\x04\x02"
22403 "\x01\x02\x02\x01",
22404 .ilen = 52,
22405 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
22406 "\x01\x02\x03\x04\x05\x06\x07\x08",
22407 .alen = 16,
22408 .result = "\xD6\x31\x0D\x2B\x3D\x6F\xBD\x2F"
22409 "\x58\x41\x7E\xFF\x9A\x9E\x09\xB4"
22410 "\x1A\xF7\xF6\x42\x31\xCD\xBF\xAD"
22411 "\x27\x0E\x2C\xF2\xDB\x10\xDF\x55"
22412 "\x8F\x0D\xD7\xAC\x23\xBD\x42\x10"
22413 "\xD0\xB2\xAF\xD8\x37\xAC\x6B\x0B"
22414 "\x11\xD4\x0B\x12\xEC\xB4\xB1\x92"
22415 "\x23\xA6\x10\xB0\x26\xD6\xD9\x26"
22416 "\x5A\x48\x6A\x3E",
22417 .rlen = 68,
22418 }, {
22419 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
22420 "\x00\x00\x00\x00\x00\x00\x00\x00"
22421 "\x00\x00\x00",
22422 .klen = 19,
22423 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
22424 .input = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
22425 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
22426 "\x01\x01\x01\x01\x08\x00\x07\x5C"
22427 "\x02\x00\x44\x00\x61\x62\x63\x64"
22428 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22429 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22430 "\x75\x76\x77\x61\x62\x63\x64\x65"
22431 "\x66\x67\x68\x69\x01\x02\x02\x01",
22432 .ilen = 64,
22433 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
22434 "\x00\x00\x00\x00\x00\x00\x00\x00",
22435 .alen = 16,
22436 .result = "\x6B\x9A\xCA\x57\x43\x91\xFC\x6F"
22437 "\x92\x51\x23\xA4\xC1\x5B\xF0\x10"
22438 "\xF3\x13\xF4\xF8\xA1\x9A\xB4\xDC"
22439 "\x89\xC8\xF8\x42\x62\x95\xB7\xCB"
22440 "\xB8\xF5\x0F\x1B\x2E\x94\xA2\xA7"
22441 "\xBF\xFB\x8A\x92\x13\x63\xD1\x3C"
22442 "\x08\xF5\xE8\xA6\xAA\xF6\x34\xF9"
22443 "\x42\x05\xAF\xB3\xE7\x9A\xFC\xEE"
22444 "\x36\x25\xC1\x10\x12\x1C\xCA\x82"
22445 "\xEA\xE6\x63\x5A\x57\x28\xA9\x9A",
22446 .rlen = 80,
22447 }, {
22448 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22449 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22450 "\x57\x69\x0E",
22451 .klen = 19,
22452 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22453 .input = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
22454 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
22455 "\x01\x01\x01\x01\x08\x00\x08\x5C"
22456 "\x02\x00\x43\x00\x61\x62\x63\x64"
22457 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22458 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22459 "\x75\x76\x77\x61\x62\x63\x64\x65"
22460 "\x66\x67\x68\x69\x01\x02\x02\x01",
22461 .ilen = 64,
22462 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22463 "\x10\x10\x10\x10\x4E\x28\x00\x00"
22464 "\xA2\xFC\xA1\xA3",
22465 .alen = 20,
22466 .result = "\x6A\x6B\x45\x2B\x7C\x67\x52\xF6"
22467 "\x10\x60\x40\x62\x6B\x4F\x97\x8E"
22468 "\x0B\xB2\x22\x97\xCB\x21\xE0\x90"
22469 "\xA2\xE7\xD1\x41\x30\xE4\x4B\x1B"
22470 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
22471 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
22472 "\x30\xB8\xE5\xDF\xD7\x12\x56\x75"
22473 "\xD0\x95\xB7\xB8\x91\x42\xF7\xFD"
22474 "\x97\x57\xCA\xC1\x20\xD0\x86\xB9"
22475 "\x66\x9D\xB4\x2B\x96\x22\xAC\x67",
22476 .rlen = 80,
22477 }, {
22478 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22479 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22480 "\x57\x69\x0E",
22481 .klen = 19,
22482 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22483 .input = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
22484 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
22485 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
22486 "\x01\x02\x02\x01",
22487 .ilen = 28,
22488 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22489 "\x10\x10\x10\x10\x4E\x28\x00\x00"
22490 "\xA2\xFC\xA1\xA3",
22491 .alen = 20,
22492 .result = "\x6A\x6B\x45\x0B\xA7\x06\x52\xF6"
22493 "\x10\x60\xCF\x01\x6B\x4F\x97\x20"
22494 "\xEA\xB3\x23\x94\xC9\x21\x1D\x33"
22495 "\xA1\xE5\x90\x40\x05\x37\x45\x70"
22496 "\xB5\xD6\x09\x0A\x23\x73\x33\xF9"
22497 "\x08\xB4\x22\xE4",
22498 .rlen = 44,
22499 }, {
22500 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22501 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
22502 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22503 "\xCA\xFE\xBA",
22504 .klen = 27,
22505 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22506 .input = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
22507 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
22508 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
22509 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
22510 "\x50\x10\x16\xD0\x75\x68\x00\x01",
22511 .ilen = 40,
22512 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
22513 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22514 .alen = 16,
22515 .result = "\x05\x22\x15\xD1\x52\x56\x85\x04"
22516 "\xA8\x5C\x5D\x6D\x7E\x6E\xF5\xFA"
22517 "\xEA\x16\x37\x50\xF3\xDF\x84\x3B"
22518 "\x2F\x32\x18\x57\x34\x2A\x8C\x23"
22519 "\x67\xDF\x6D\x35\x7B\x54\x0D\xFB"
22520 "\x34\xA5\x9F\x6C\x48\x30\x1E\x22"
22521 "\xFE\xB1\x22\x17\x17\x8A\xB9\x5B",
22522 .rlen = 56,
22523 }, {
22524 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22525 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22526 "\xDE\xCA\xF8",
22527 .klen = 19,
22528 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
22529 .input = "\x45\x00\x00\x49\x33\xBA\x00\x00"
22530 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
22531 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
22532 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
22533 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
22534 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
22535 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
22536 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
22537 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
22538 "\x23\x01\x01\x01",
22539 .ilen = 76,
22540 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
22541 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
22542 "\xCE\xFA\xCE\x74",
22543 .alen = 20,
22544 .result = "\x92\xD0\x53\x79\x33\x38\xD5\xF3"
22545 "\x7D\xE4\x7A\x8E\x86\x03\xC9\x90"
22546 "\x96\x35\xAB\x9C\xFB\xE8\xA3\x76"
22547 "\xE9\xE9\xE2\xD1\x2E\x11\x0E\x00"
22548 "\xFA\xCE\xB5\x9E\x02\xA7\x7B\xEA"
22549 "\x71\x9A\x58\xFB\xA5\x8A\xE1\xB7"
22550 "\x9C\x39\x9D\xE3\xB5\x6E\x69\xE6"
22551 "\x63\xC9\xDB\x05\x69\x51\x12\xAD"
22552 "\x3E\x00\x32\x73\x86\xF2\xEE\xF5"
22553 "\x0F\xE8\x81\x7E\x84\xD3\xC0\x0D"
22554 "\x76\xD6\x55\xC6\xB4\xC2\x34\xC7"
22555 "\x12\x25\x0B\xF9",
22556 .rlen = 92,
22557 }, {
22558 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22559 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22560 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22561 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22562 "\x73\x61\x6C",
22563 .klen = 35,
22564 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
22565 .input = "\x45\x08\x00\x28\x73\x2C\x00\x00"
22566 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
22567 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
22568 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
22569 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
22570 .ilen = 40,
22571 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
22572 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
22573 "\x69\x76\x65\x63",
22574 .alen = 20,
22575 .result = "\xCC\x74\xB7\xD3\xB0\x38\x50\x42"
22576 "\x2C\x64\x87\x46\x1E\x34\x10\x05"
22577 "\x29\x6B\xBB\x36\xE9\x69\xAD\x92"
22578 "\x82\xA1\x10\x6A\xEB\x0F\xDC\x7D"
22579 "\x08\xBA\xF3\x91\xCA\xAA\x61\xDA"
22580 "\x62\xF4\x14\x61\x5C\x9D\xB5\xA7"
22581 "\xEE\xD7\xB9\x7E\x87\x99\x9B\x7D",
22582 .rlen = 56,
22583 }, {
22584 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22585 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22586 "\x57\x69\x0E",
22587 .klen = 19,
22588 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22589 .input = "\x45\x00\x00\x49\x33\x3E\x00\x00"
22590 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
22591 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
22592 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
22593 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
22594 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
22595 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
22596 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
22597 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
22598 "\x15\x01\x01\x01",
22599 .ilen = 76,
22600 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22601 "\x10\x10\x10\x10\x4E\x28\x00\x00"
22602 "\xA2\xFC\xA1\xA3",
22603 .alen = 20,
22604 .result = "\x6A\x6B\x45\x5E\xD6\x9A\x52\xF6"
22605 "\xEF\x70\x1A\x9C\xE8\xD3\x19\x86"
22606 "\xC8\x02\xF0\xB0\x03\x09\xD9\x02"
22607 "\xA0\xD2\x59\x04\xD1\x85\x2A\x24"
22608 "\x1C\x67\x3E\xD8\x68\x72\x06\x94"
22609 "\x97\xBA\x4F\x76\x8D\xB0\x44\x5B"
22610 "\x69\xBF\xD5\xE2\x3D\xF1\x0B\x0C"
22611 "\xC0\xBF\xB1\x8F\x70\x09\x9E\xCE"
22612 "\xA5\xF2\x55\x58\x84\xFA\xF9\xB5"
22613 "\x23\xF4\x84\x40\x74\x14\x8A\x6B"
22614 "\xDB\xD7\x67\xED\xA4\x93\xF3\x47"
22615 "\xCC\xF7\x46\x6F",
22616 .rlen = 92,
22617 }, {
22618 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22619 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22620 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22621 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22622 "\x73\x61\x6C",
22623 .klen = 35,
22624 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
22625 .input = "\x63\x69\x73\x63\x6F\x01\x72\x75"
22626 "\x6C\x65\x73\x01\x74\x68\x65\x01"
22627 "\x6E\x65\x74\x77\x65\x01\x64\x65"
22628 "\x66\x69\x6E\x65\x01\x74\x68\x65"
22629 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
22630 "\x67\x69\x65\x73\x01\x74\x68\x61"
22631 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
22632 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
22633 "\x72\x72\x6F\x77\x01\x02\x02\x01",
22634 .ilen = 72,
22635 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
22636 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
22637 "\x69\x76\x65\x63",
22638 .alen = 20,
22639 .result = "\xEA\x15\xC4\x98\xAC\x15\x22\x37"
22640 "\x00\x07\x1D\xBE\x60\x5D\x73\x16"
22641 "\x4D\x0F\xCC\xCE\x8A\xD0\x49\xD4"
22642 "\x39\xA3\xD1\xB1\x21\x0A\x92\x1A"
22643 "\x2C\xCF\x8F\x9D\xC9\x91\x0D\xB4"
22644 "\x15\xFC\xBC\xA5\xC5\xBF\x54\xE5"
22645 "\x1C\xC7\x32\x41\x07\x7B\x2C\xB6"
22646 "\x5C\x23\x7C\x93\xEA\xEF\x23\x1C"
22647 "\x73\xF4\xE7\x12\x84\x4C\x37\x0A"
22648 "\x4A\x8F\x06\x37\x48\xF9\xF9\x05"
22649 "\x55\x13\x40\xC3\xD5\x55\x3A\x3D",
22650 .rlen = 88,
22651 }, {
22652 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
22653 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
22654 "\xD9\x66\x42",
22655 .klen = 19,
22656 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
22657 .input = "\x01\x02\x02\x01",
22658 .ilen = 4,
22659 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
22660 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
22661 .alen = 16,
22662 .result = "\x4C\x72\x63\x30\x2F\xE6\x56\xDD"
22663 "\xD0\xD8\x60\x9D\x8B\xEF\x85\x90"
22664 "\xF7\x61\x24\x62",
22665 .rlen = 20,
22666 }, {
22667 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22668 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22669 "\xDE\xCA\xF8",
22670 .klen = 19,
22671 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
22672 .input = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
22673 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
22674 "\x62\x65\x00\x01",
22675 .ilen = 20,
22676 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
22677 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
22678 "\xCE\xFA\xCE\x74",
22679 .alen = 20,
22680 .result = "\xA3\xBF\x52\x52\x65\x83\xBA\x81"
22681 "\x03\x9B\x84\xFC\x44\x8C\xBB\x81"
22682 "\x36\xE1\x78\xBB\xA5\x49\x3A\xD0"
22683 "\xF0\x6B\x21\xAF\x98\xC0\x34\xDC"
22684 "\x17\x17\x65\xAD",
22685 .rlen = 36,
22686 }, {
22687 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
22688 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
22689 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
22690 "\x62\x65\x66\x6F\x72\x65\x69\x61"
22691 "\x74\x75\x72",
22692 .klen = 35,
22693 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
22694 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
22695 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
22696 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
22697 "\x02\x00\x07\x00\x61\x62\x63\x64"
22698 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22699 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22700 "\x01\x02\x02\x01",
22701 .ilen = 52,
22702 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
22703 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
22704 "\x67\x65\x74\x6D",
22705 .alen = 20,
22706 .result = "\x96\xFD\x86\xF8\xD1\x98\xFF\x10"
22707 "\xAB\x8C\xDA\x8A\x5A\x08\x38\x1A"
22708 "\x48\x59\x80\x18\x1A\x18\x1A\x04"
22709 "\xC9\x0D\xE3\xE7\x0E\xA4\x0B\x75"
22710 "\x92\x9C\x52\x5C\x0B\xFB\xF8\xAF"
22711 "\x16\xC3\x35\xA8\xE7\xCE\x84\x04"
22712 "\xEB\x40\x6B\x7A\x8E\x75\xBB\x42"
22713 "\xE0\x63\x4B\x21\x44\xA2\x2B\x2B"
22714 "\x39\xDB\xC8\xDC",
22715 .rlen = 68,
22716 }, {
22717 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22718 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22719 "\x57\x69\x0E",
22720 .klen = 19,
22721 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22722 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
22723 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
22724 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
22725 "\x02\x00\x07\x00\x61\x62\x63\x64"
22726 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22727 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22728 "\x01\x02\x02\x01",
22729 .ilen = 52,
22730 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
22731 "\x10\x10\x10\x10\x4E\x28\x00\x00"
22732 "\xA2\xFC\xA1\xA3",
22733 .alen = 20,
22734 .result = "\x6A\x6B\x45\x27\x3F\x9E\x52\xF6"
22735 "\x10\x60\x54\x25\xEB\x80\x04\x93"
22736 "\xCA\x1B\x23\x97\xCB\x21\x2E\x01"
22737 "\xA2\xE7\x95\x41\x30\xE4\x4B\x1B"
22738 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
22739 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
22740 "\x44\xCC\x90\xBF\x00\x94\x94\x92"
22741 "\x20\x17\x0C\x1B\x55\xDE\x7E\x68"
22742 "\xF4\x95\x5D\x4F",
22743 .rlen = 68,
22744 }, {
22745 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
22746 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
22747 "\x22\x43\x3C",
22748 .klen = 19,
22749 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
22750 .input = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
22751 "\x61\x62\x63\x64\x65\x66\x67\x68"
22752 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
22753 "\x71\x72\x73\x74\x01\x02\x02\x01",
22754 .ilen = 32,
22755 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
22756 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
22757 "\x3A\x23\x4B\xFD",
22758 .alen = 20,
22759 .result = "\x67\xE9\x28\xB3\x1C\xA4\x6D\x02"
22760 "\xF0\xB5\x37\xB6\x6B\x2F\xF5\x4F"
22761 "\xF8\xA3\x4C\x53\xB8\x12\x09\xBF"
22762 "\x58\x7D\xCF\x29\xA3\x41\x68\x6B"
22763 "\xCE\xE8\x79\x85\x3C\xB0\x3A\x8F"
22764 "\x16\xB0\xA1\x26\xC9\xBC\xBC\xA6",
22765 .rlen = 48,
22766 }
22767};
22768
22769static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
22770 { /* Generated using Crypto++ */
22771 .key = zeroed_string,
22772 .klen = 19,
22773 .iv = zeroed_string,
22774 .result = zeroed_string,
22775 .rlen = 16,
22776 .assoc = zeroed_string,
22777 .alen = 16,
22778 .input = "\x2E\x9A\xCA\x6B\xDA\x54\xFC\x6F"
22779 "\x12\x50\xE8\xDE\x81\x3C\x63\x08"
22780 "\x1A\x22\xBA\x75\xEE\xD4\xD5\xB5"
22781 "\x27\x50\x01\xAC\x03\x33\x39\xFB",
22782 .ilen = 32,
22783 },{
22784 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22785 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22786 "\x00\x00\x00",
22787 .klen = 19,
22788 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22789 .result = zeroed_string,
22790 .rlen = 16,
22791 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
22792 "\x00\x00\x00\x00\x00\x00\x00\x01",
22793 .alen = 16,
22794 .input = "\xCF\xB9\x99\x17\xC8\x86\x0E\x7F"
22795 "\x7E\x76\xF8\xE6\xF8\xCC\x1F\x17"
22796 "\x6A\xE0\x53\x9F\x4B\x73\x7E\xDA"
22797 "\x08\x09\x4E\xC4\x1E\xAD\xC6\xB0",
22798 .ilen = 32,
22799
22800 }, {
22801 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22802 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22803 "\x00\x00\x00",
22804 .klen = 19,
22805 .iv = zeroed_string,
22806 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22807 "\x01\x01\x01\x01\x01\x01\x01\x01",
22808 .rlen = 16,
22809 .assoc = zeroed_string,
22810 .alen = 16,
22811 .input = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22812 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22813 "\xA1\xE2\xC2\x42\x2B\x81\x70\x40"
22814 "\xFD\x7F\x76\xD1\x03\x07\xBB\x0C",
22815 .ilen = 32,
22816 }, {
22817 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22818 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22819 "\x00\x00\x00",
22820 .klen = 19,
22821 .iv = zeroed_string,
22822 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22823 "\x01\x01\x01\x01\x01\x01\x01\x01",
22824 .rlen = 16,
22825 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22826 "\x00\x00\x00\x00\x00\x00\x00\x00",
22827 .alen = 16,
22828 .input = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22829 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22830 "\x5B\xC0\x73\xE0\x2B\x73\x68\xC9"
22831 "\x2D\x8C\x58\xC2\x90\x3D\xB0\x3E",
22832 .ilen = 32,
22833 }, {
22834 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22835 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22836 "\x00\x00\x00",
22837 .klen = 19,
22838 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22839 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22840 "\x01\x01\x01\x01\x01\x01\x01\x01",
22841 .rlen = 16,
22842 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22843 "\x00\x00\x00\x00\x00\x00\x00\x01",
22844 .alen = 16,
22845 .input = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22846 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22847 "\x43\x8E\x76\x57\x3B\xB4\x05\xE8"
22848 "\xA9\x9B\xBF\x25\xE0\x4F\xC0\xED",
22849 .ilen = 32,
22850 }, {
22851 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22852 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22853 "\x00\x00\x00",
22854 .klen = 19,
22855 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22856 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22857 "\x01\x01\x01\x01\x01\x01\x01\x01"
22858 "\x01\x01\x01\x01\x01\x01\x01\x01"
22859 "\x01\x01\x01\x01\x01\x01\x01\x01"
22860 "\x01\x01\x01\x01\x01\x01\x01\x01"
22861 "\x01\x01\x01\x01\x01\x01\x01\x01"
22862 "\x01\x01\x01\x01\x01\x01\x01\x01"
22863 "\x01\x01\x01\x01\x01\x01\x01\x01",
22864 .rlen = 64,
22865 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22866 "\x00\x00\x00\x00\x00\x00\x00\x01",
22867 .alen = 16,
22868 .input = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22869 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22870 "\x9C\xA4\x97\x83\x3F\x01\xA5\xF4"
22871 "\x43\x09\xE7\xB8\xE9\xD1\xD7\x02"
22872 "\x9B\xAB\x39\x18\xEB\x94\x34\x36"
22873 "\xE6\xC5\xC8\x9B\x00\x81\x9E\x49"
22874 "\x1D\x78\xE1\x48\xE3\xE9\xEA\x8E"
22875 "\x3A\x2B\x67\x5D\x35\x6A\x0F\xDB"
22876 "\x02\x73\xDD\xE7\x30\x4A\x30\x54"
22877 "\x1A\x9D\x09\xCA\xC8\x1C\x32\x5F",
22878 .ilen = 80,
22879 }, {
22880 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
22881 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22882 "\x00\x00\x00",
22883 .klen = 19,
22884 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
22885 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
22886 "\xff\xff\xff\xff\xff\xff\xff\xff"
22887 "\xff\xff\xff\xff\xff\xff\xff\xff"
22888 "\xff\xff\xff\xff\xff\xff\xff\xff"
22889 "\xff\xff\xff\xff\xff\xff\xff\xff"
22890 "\xff\xff\xff\xff\xff\xff\xff\xff"
22891 "\xff\xff\xff\xff\xff\xff\xff\xff"
22892 "\xff\xff\xff\xff\xff\xff\xff\xff"
22893 "\xff\xff\xff\xff\xff\xff\xff\xff"
22894 "\xff\xff\xff\xff\xff\xff\xff\xff"
22895 "\xff\xff\xff\xff\xff\xff\xff\xff"
22896 "\xff\xff\xff\xff\xff\xff\xff\xff"
22897 "\xff\xff\xff\xff\xff\xff\xff\xff"
22898 "\xff\xff\xff\xff\xff\xff\xff\xff"
22899 "\xff\xff\xff\xff\xff\xff\xff\xff"
22900 "\xff\xff\xff\xff\xff\xff\xff\xff"
22901 "\xff\xff\xff\xff\xff\xff\xff\xff"
22902 "\xff\xff\xff\xff\xff\xff\xff\xff"
22903 "\xff\xff\xff\xff\xff\xff\xff\xff"
22904 "\xff\xff\xff\xff\xff\xff\xff\xff"
22905 "\xff\xff\xff\xff\xff\xff\xff\xff"
22906 "\xff\xff\xff\xff\xff\xff\xff\xff"
22907 "\xff\xff\xff\xff\xff\xff\xff\xff"
22908 "\xff\xff\xff\xff\xff\xff\xff\xff",
22909 .rlen = 192,
22910 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
22911 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
22912 "\x89\xab\xcd\xef",
22913 .alen = 20,
22914 .input = "\x64\x17\xDC\x24\x9D\x92\xBA\x5E"
22915 "\x7C\x64\x6D\x33\x46\x77\xAC\xB1"
22916 "\x5C\x9E\xE2\xC7\x27\x11\x3E\x95"
22917 "\x7D\xBE\x28\xC8\xC1\xCA\x5E\x8C"
22918 "\xB4\xE2\xDE\x9F\x53\x59\x26\xDB"
22919 "\x0C\xD4\xE4\x07\x9A\xE6\x3E\x01"
22920 "\x58\x0D\x3E\x3D\xD5\x21\xEB\x04"
22921 "\x06\x9D\x5F\xB9\x02\x49\x1A\x2B"
22922 "\xBA\xF0\x4E\x3B\x85\x50\x5B\x09"
22923 "\xFE\xEC\xFC\x54\xEC\x0C\xE2\x79"
22924 "\x8A\x2F\x5F\xD7\x05\x5D\xF1\x6D"
22925 "\x22\xEB\xD1\x09\x80\x3F\x5A\x70"
22926 "\xB2\xB9\xD3\x63\x99\xC2\x4D\x1B"
22927 "\x36\x12\x00\x89\xAA\x5D\x55\xDA"
22928 "\x1D\x5B\xD8\x3C\x5F\x09\xD2\xE6"
22929 "\x39\x41\x5C\xF0\xBE\x26\x4E\x5F"
22930 "\x2B\x50\x44\x52\xC2\x10\x7D\x38"
22931 "\x82\x64\x83\x0C\xAE\x49\xD0\xE5"
22932 "\x4F\xE5\x66\x4C\x58\x7A\xEE\x43"
22933 "\x3B\x51\xFE\xBA\x24\x8A\xFE\xDC"
22934 "\x19\x6D\x60\x66\x61\xF9\x9A\x3F"
22935 "\x75\xFC\x38\x53\x5B\xB5\xCD\x52"
22936 "\x4F\xE5\xE4\xC9\xFE\x10\xCB\x98"
22937 "\xF0\x06\x5B\x07\xAB\xBB\xF4\x0E"
22938 "\x2D\xC2\xDD\x5D\xDD\x22\x9A\xCC"
22939 "\x39\xAB\x63\xA5\x3D\x9C\x51\x8A",
22940 .ilen = 208,
22941 }, { /* From draft-mcgrew-gcm-test-01 */
22942 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
22943 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
22944 "\x2E\x44\x3B",
22945 .klen = 19,
22946 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
22947 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
22948 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
22949 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
22950 "\x38\xD3\x01\x00\x00\x01\x00\x00"
22951 "\x00\x00\x00\x00\x04\x5F\x73\x69"
22952 "\x70\x04\x5F\x75\x64\x70\x03\x73"
22953 "\x69\x70\x09\x63\x79\x62\x65\x72"
22954 "\x63\x69\x74\x79\x02\x64\x6B\x00"
22955 "\x00\x21\x00\x01\x01\x02\x02\x01",
22956 .rlen = 72,
22957 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
22958 "\x00\x00\x00\x00\x49\x56\xED\x7E"
22959 "\x3B\x24\x4C\xFE",
22960 .alen = 20,
22961 .input = "\x89\xBA\x3E\xEF\xE6\xD6\xCF\xDB"
22962 "\x83\x60\xF5\xBA\x3A\x56\x79\xE6"
22963 "\x7E\x0C\x53\xCF\x9E\x87\xE0\x4E"
22964 "\x1A\x26\x01\x24\xC7\x2E\x3D\xBF"
22965 "\x29\x2C\x91\xC1\xB8\xA8\xCF\xE0"
22966 "\x39\xF8\x53\x6D\x31\x22\x2B\xBF"
22967 "\x98\x81\xFC\x34\xEE\x85\x36\xCD"
22968 "\x26\xDB\x6C\x7A\x0C\x77\x8A\x35"
22969 "\x18\x85\x54\xB2\xBC\xDD\x3F\x43"
22970 "\x61\x06\x8A\xDF\x86\x3F\xB4\xAC"
22971 "\x97\xDC\xBD\xFD\x92\x10\xC5\xFF",
22972 .ilen = 88,
22973 }, {
22974 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22975 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
22976 "\xCA\xFE\xBA",
22977 .klen = 19,
22978 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22979 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
22980 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
22981 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
22982 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
22983 "\x00\x01\x00\x00\x00\x00\x00\x00"
22984 "\x03\x73\x69\x70\x09\x63\x79\x62"
22985 "\x65\x72\x63\x69\x74\x79\x02\x64"
22986 "\x6B\x00\x00\x01\x00\x01\x00\x01",
22987 .rlen = 64,
22988 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
22989 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22990 .alen = 16,
22991 .input = "\x4B\xC2\x70\x60\x64\xD2\xF3\xC8"
22992 "\xE5\x26\x8A\xDE\xB8\x7E\x7D\x16"
22993 "\x56\xC7\xD2\x88\xBA\x8D\x58\xAF"
22994 "\xF5\x71\xB6\x37\x84\xA7\xB1\x99"
22995 "\x51\x5C\x0D\xA0\x27\xDE\xE7\x2D"
22996 "\xEF\x25\x88\x1F\x1D\x77\x11\xFF"
22997 "\xDB\xED\xEE\x56\x16\xC5\x5C\x9B"
22998 "\x00\x62\x1F\x68\x4E\x7C\xA0\x97"
22999 "\x10\x72\x7E\x53\x13\x3B\x68\xE4"
23000 "\x30\x99\x91\x79\x09\xEA\xFF\x6A",
23001 .ilen = 80,
23002 }, {
23003 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23004 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23005 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23006 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23007 "\x11\x22\x33",
23008 .klen = 35,
23009 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
23010 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
23011 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
23012 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
23013 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
23014 "\x70\x02\x40\x00\x20\xBF\x00\x00"
23015 "\x02\x04\x05\xB4\x01\x01\x04\x02"
23016 "\x01\x02\x02\x01",
23017 .rlen = 52,
23018 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
23019 "\x01\x02\x03\x04\x05\x06\x07\x08",
23020 .alen = 16,
23021 .input = "\xD6\x31\x0D\x2B\x3D\x6F\xBD\x2F"
23022 "\x58\x41\x7E\xFF\x9A\x9E\x09\xB4"
23023 "\x1A\xF7\xF6\x42\x31\xCD\xBF\xAD"
23024 "\x27\x0E\x2C\xF2\xDB\x10\xDF\x55"
23025 "\x8F\x0D\xD7\xAC\x23\xBD\x42\x10"
23026 "\xD0\xB2\xAF\xD8\x37\xAC\x6B\x0B"
23027 "\x11\xD4\x0B\x12\xEC\xB4\xB1\x92"
23028 "\x23\xA6\x10\xB0\x26\xD6\xD9\x26"
23029 "\x5A\x48\x6A\x3E",
23030 .ilen = 68,
23031 }, {
23032 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
23033 "\x00\x00\x00\x00\x00\x00\x00\x00"
23034 "\x00\x00\x00",
23035 .klen = 19,
23036 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
23037 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
23038 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
23039 "\x01\x01\x01\x01\x08\x00\x07\x5C"
23040 "\x02\x00\x44\x00\x61\x62\x63\x64"
23041 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23042 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23043 "\x75\x76\x77\x61\x62\x63\x64\x65"
23044 "\x66\x67\x68\x69\x01\x02\x02\x01",
23045 .rlen = 64,
23046 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
23047 "\x00\x00\x00\x00\x00\x00\x00\x00",
23048 .alen = 16,
23049 .input = "\x6B\x9A\xCA\x57\x43\x91\xFC\x6F"
23050 "\x92\x51\x23\xA4\xC1\x5B\xF0\x10"
23051 "\xF3\x13\xF4\xF8\xA1\x9A\xB4\xDC"
23052 "\x89\xC8\xF8\x42\x62\x95\xB7\xCB"
23053 "\xB8\xF5\x0F\x1B\x2E\x94\xA2\xA7"
23054 "\xBF\xFB\x8A\x92\x13\x63\xD1\x3C"
23055 "\x08\xF5\xE8\xA6\xAA\xF6\x34\xF9"
23056 "\x42\x05\xAF\xB3\xE7\x9A\xFC\xEE"
23057 "\x36\x25\xC1\x10\x12\x1C\xCA\x82"
23058 "\xEA\xE6\x63\x5A\x57\x28\xA9\x9A",
23059 .ilen = 80,
23060 }, {
23061 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23062 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23063 "\x57\x69\x0E",
23064 .klen = 19,
23065 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23066 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
23067 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
23068 "\x01\x01\x01\x01\x08\x00\x08\x5C"
23069 "\x02\x00\x43\x00\x61\x62\x63\x64"
23070 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23071 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23072 "\x75\x76\x77\x61\x62\x63\x64\x65"
23073 "\x66\x67\x68\x69\x01\x02\x02\x01",
23074 .rlen = 64,
23075 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23076 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23077 "\xA2\xFC\xA1\xA3",
23078 .alen = 20,
23079 .input = "\x6A\x6B\x45\x2B\x7C\x67\x52\xF6"
23080 "\x10\x60\x40\x62\x6B\x4F\x97\x8E"
23081 "\x0B\xB2\x22\x97\xCB\x21\xE0\x90"
23082 "\xA2\xE7\xD1\x41\x30\xE4\x4B\x1B"
23083 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
23084 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
23085 "\x30\xB8\xE5\xDF\xD7\x12\x56\x75"
23086 "\xD0\x95\xB7\xB8\x91\x42\xF7\xFD"
23087 "\x97\x57\xCA\xC1\x20\xD0\x86\xB9"
23088 "\x66\x9D\xB4\x2B\x96\x22\xAC\x67",
23089 .ilen = 80,
23090 }, {
23091 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23092 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23093 "\x57\x69\x0E",
23094 .klen = 19,
23095 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23096 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
23097 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
23098 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
23099 "\x01\x02\x02\x01",
23100 .rlen = 28,
23101 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23102 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23103 "\xA2\xFC\xA1\xA3",
23104 .alen = 20,
23105 .input = "\x6A\x6B\x45\x0B\xA7\x06\x52\xF6"
23106 "\x10\x60\xCF\x01\x6B\x4F\x97\x20"
23107 "\xEA\xB3\x23\x94\xC9\x21\x1D\x33"
23108 "\xA1\xE5\x90\x40\x05\x37\x45\x70"
23109 "\xB5\xD6\x09\x0A\x23\x73\x33\xF9"
23110 "\x08\xB4\x22\xE4",
23111 .ilen = 44,
23112 }, {
23113 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
23114 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
23115 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
23116 "\xCA\xFE\xBA",
23117 .klen = 27,
23118 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23119 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
23120 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
23121 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
23122 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
23123 "\x50\x10\x16\xD0\x75\x68\x00\x01",
23124 .rlen = 40,
23125 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
23126 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23127 .alen = 16,
23128 .input = "\x05\x22\x15\xD1\x52\x56\x85\x04"
23129 "\xA8\x5C\x5D\x6D\x7E\x6E\xF5\xFA"
23130 "\xEA\x16\x37\x50\xF3\xDF\x84\x3B"
23131 "\x2F\x32\x18\x57\x34\x2A\x8C\x23"
23132 "\x67\xDF\x6D\x35\x7B\x54\x0D\xFB"
23133 "\x34\xA5\x9F\x6C\x48\x30\x1E\x22"
23134 "\xFE\xB1\x22\x17\x17\x8A\xB9\x5B",
23135 .ilen = 56,
23136 }, {
23137 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23138 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23139 "\xDE\xCA\xF8",
23140 .klen = 19,
23141 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
23142 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
23143 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
23144 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
23145 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
23146 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
23147 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
23148 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
23149 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
23150 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
23151 "\x23\x01\x01\x01",
23152 .rlen = 76,
23153 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
23154 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
23155 "\xCE\xFA\xCE\x74",
23156 .alen = 20,
23157 .input = "\x92\xD0\x53\x79\x33\x38\xD5\xF3"
23158 "\x7D\xE4\x7A\x8E\x86\x03\xC9\x90"
23159 "\x96\x35\xAB\x9C\xFB\xE8\xA3\x76"
23160 "\xE9\xE9\xE2\xD1\x2E\x11\x0E\x00"
23161 "\xFA\xCE\xB5\x9E\x02\xA7\x7B\xEA"
23162 "\x71\x9A\x58\xFB\xA5\x8A\xE1\xB7"
23163 "\x9C\x39\x9D\xE3\xB5\x6E\x69\xE6"
23164 "\x63\xC9\xDB\x05\x69\x51\x12\xAD"
23165 "\x3E\x00\x32\x73\x86\xF2\xEE\xF5"
23166 "\x0F\xE8\x81\x7E\x84\xD3\xC0\x0D"
23167 "\x76\xD6\x55\xC6\xB4\xC2\x34\xC7"
23168 "\x12\x25\x0B\xF9",
23169 .ilen = 92,
23170 }, {
23171 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23172 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23173 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23174 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23175 "\x73\x61\x6C",
23176 .klen = 35,
23177 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
23178 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
23179 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
23180 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
23181 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
23182 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
23183 .rlen = 40,
23184 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
23185 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
23186 "\x69\x76\x65\x63",
23187 .alen = 20,
23188 .input = "\xCC\x74\xB7\xD3\xB0\x38\x50\x42"
23189 "\x2C\x64\x87\x46\x1E\x34\x10\x05"
23190 "\x29\x6B\xBB\x36\xE9\x69\xAD\x92"
23191 "\x82\xA1\x10\x6A\xEB\x0F\xDC\x7D"
23192 "\x08\xBA\xF3\x91\xCA\xAA\x61\xDA"
23193 "\x62\xF4\x14\x61\x5C\x9D\xB5\xA7"
23194 "\xEE\xD7\xB9\x7E\x87\x99\x9B\x7D",
23195 .ilen = 56,
23196 }, {
23197 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23198 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23199 "\x57\x69\x0E",
23200 .klen = 19,
23201 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23202 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
23203 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
23204 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
23205 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
23206 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
23207 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
23208 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
23209 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
23210 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
23211 "\x15\x01\x01\x01",
23212 .rlen = 76,
23213 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23214 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23215 "\xA2\xFC\xA1\xA3",
23216 .alen = 20,
23217 .input = "\x6A\x6B\x45\x5E\xD6\x9A\x52\xF6"
23218 "\xEF\x70\x1A\x9C\xE8\xD3\x19\x86"
23219 "\xC8\x02\xF0\xB0\x03\x09\xD9\x02"
23220 "\xA0\xD2\x59\x04\xD1\x85\x2A\x24"
23221 "\x1C\x67\x3E\xD8\x68\x72\x06\x94"
23222 "\x97\xBA\x4F\x76\x8D\xB0\x44\x5B"
23223 "\x69\xBF\xD5\xE2\x3D\xF1\x0B\x0C"
23224 "\xC0\xBF\xB1\x8F\x70\x09\x9E\xCE"
23225 "\xA5\xF2\x55\x58\x84\xFA\xF9\xB5"
23226 "\x23\xF4\x84\x40\x74\x14\x8A\x6B"
23227 "\xDB\xD7\x67\xED\xA4\x93\xF3\x47"
23228 "\xCC\xF7\x46\x6F",
23229 .ilen = 92,
23230 }, {
23231 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23232 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23233 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23234 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23235 "\x73\x61\x6C",
23236 .klen = 35,
23237 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
23238 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
23239 "\x6C\x65\x73\x01\x74\x68\x65\x01"
23240 "\x6E\x65\x74\x77\x65\x01\x64\x65"
23241 "\x66\x69\x6E\x65\x01\x74\x68\x65"
23242 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
23243 "\x67\x69\x65\x73\x01\x74\x68\x61"
23244 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
23245 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
23246 "\x72\x72\x6F\x77\x01\x02\x02\x01",
23247 .rlen = 72,
23248 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
23249 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
23250 "\x69\x76\x65\x63",
23251 .alen = 20,
23252 .input = "\xEA\x15\xC4\x98\xAC\x15\x22\x37"
23253 "\x00\x07\x1D\xBE\x60\x5D\x73\x16"
23254 "\x4D\x0F\xCC\xCE\x8A\xD0\x49\xD4"
23255 "\x39\xA3\xD1\xB1\x21\x0A\x92\x1A"
23256 "\x2C\xCF\x8F\x9D\xC9\x91\x0D\xB4"
23257 "\x15\xFC\xBC\xA5\xC5\xBF\x54\xE5"
23258 "\x1C\xC7\x32\x41\x07\x7B\x2C\xB6"
23259 "\x5C\x23\x7C\x93\xEA\xEF\x23\x1C"
23260 "\x73\xF4\xE7\x12\x84\x4C\x37\x0A"
23261 "\x4A\x8F\x06\x37\x48\xF9\xF9\x05"
23262 "\x55\x13\x40\xC3\xD5\x55\x3A\x3D",
23263 .ilen = 88,
23264 }, {
23265 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
23266 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
23267 "\xD9\x66\x42",
23268 .klen = 19,
23269 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
23270 .result = "\x01\x02\x02\x01",
23271 .rlen = 4,
23272 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
23273 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
23274 .alen = 16,
23275 .input = "\x4C\x72\x63\x30\x2F\xE6\x56\xDD"
23276 "\xD0\xD8\x60\x9D\x8B\xEF\x85\x90"
23277 "\xF7\x61\x24\x62",
23278 .ilen = 20,
23279 }, {
23280 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23281 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23282 "\xDE\xCA\xF8",
23283 .klen = 19,
23284 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
23285 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
23286 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
23287 "\x62\x65\x00\x01",
23288 .rlen = 20,
23289 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
23290 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
23291 "\xCE\xFA\xCE\x74",
23292 .alen = 20,
23293 .input = "\xA3\xBF\x52\x52\x65\x83\xBA\x81"
23294 "\x03\x9B\x84\xFC\x44\x8C\xBB\x81"
23295 "\x36\xE1\x78\xBB\xA5\x49\x3A\xD0"
23296 "\xF0\x6B\x21\xAF\x98\xC0\x34\xDC"
23297 "\x17\x17\x65\xAD",
23298 .ilen = 36,
23299 }, {
23300 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
23301 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
23302 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
23303 "\x62\x65\x66\x6F\x72\x65\x69\x61"
23304 "\x74\x75\x72",
23305 .klen = 35,
23306 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
23307 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
23308 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
23309 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
23310 "\x02\x00\x07\x00\x61\x62\x63\x64"
23311 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23312 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23313 "\x01\x02\x02\x01",
23314 .rlen = 52,
23315 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
23316 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
23317 "\x67\x65\x74\x6D",
23318 .alen = 20,
23319 .input = "\x96\xFD\x86\xF8\xD1\x98\xFF\x10"
23320 "\xAB\x8C\xDA\x8A\x5A\x08\x38\x1A"
23321 "\x48\x59\x80\x18\x1A\x18\x1A\x04"
23322 "\xC9\x0D\xE3\xE7\x0E\xA4\x0B\x75"
23323 "\x92\x9C\x52\x5C\x0B\xFB\xF8\xAF"
23324 "\x16\xC3\x35\xA8\xE7\xCE\x84\x04"
23325 "\xEB\x40\x6B\x7A\x8E\x75\xBB\x42"
23326 "\xE0\x63\x4B\x21\x44\xA2\x2B\x2B"
23327 "\x39\xDB\xC8\xDC",
23328 .ilen = 68,
23329 }, {
23330 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23331 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23332 "\x57\x69\x0E",
23333 .klen = 19,
23334 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23335 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
23336 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
23337 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
23338 "\x02\x00\x07\x00\x61\x62\x63\x64"
23339 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23340 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23341 "\x01\x02\x02\x01",
23342 .rlen = 52,
23343 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
23344 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23345 "\xA2\xFC\xA1\xA3",
23346 .alen = 20,
23347 .input = "\x6A\x6B\x45\x27\x3F\x9E\x52\xF6"
23348 "\x10\x60\x54\x25\xEB\x80\x04\x93"
23349 "\xCA\x1B\x23\x97\xCB\x21\x2E\x01"
23350 "\xA2\xE7\x95\x41\x30\xE4\x4B\x1B"
23351 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
23352 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
23353 "\x44\xCC\x90\xBF\x00\x94\x94\x92"
23354 "\x20\x17\x0C\x1B\x55\xDE\x7E\x68"
23355 "\xF4\x95\x5D\x4F",
23356 .ilen = 68,
23357 }, {
23358 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
23359 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
23360 "\x22\x43\x3C",
23361 .klen = 19,
23362 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
23363 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
23364 "\x61\x62\x63\x64\x65\x66\x67\x68"
23365 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
23366 "\x71\x72\x73\x74\x01\x02\x02\x01",
23367 .rlen = 32,
23368 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
23369 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
23370 "\x3A\x23\x4B\xFD",
23371 .alen = 20,
23372 .input = "\x67\xE9\x28\xB3\x1C\xA4\x6D\x02"
23373 "\xF0\xB5\x37\xB6\x6B\x2F\xF5\x4F"
23374 "\xF8\xA3\x4C\x53\xB8\x12\x09\xBF"
23375 "\x58\x7D\xCF\x29\xA3\x41\x68\x6B"
23376 "\xCE\xE8\x79\x85\x3C\xB0\x3A\x8F"
23377 "\x16\xB0\xA1\x26\xC9\xBC\xBC\xA6",
23378 .ilen = 48,
23379 }
23380};
23381
23382/*
Martin Williaf2b76b2015-06-01 13:44:01 +020023383 * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5.
23384 */
23385#define RFC7539_ENC_TEST_VECTORS 2
23386#define RFC7539_DEC_TEST_VECTORS 2
23387static struct aead_testvec rfc7539_enc_tv_template[] = {
23388 {
23389 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
23390 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23391 "\x90\x91\x92\x93\x94\x95\x96\x97"
23392 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
23393 .klen = 32,
23394 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
23395 "\x44\x45\x46\x47",
23396 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
23397 "\xc4\xc5\xc6\xc7",
23398 .alen = 12,
23399 .input = "\x4c\x61\x64\x69\x65\x73\x20\x61"
23400 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
23401 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
23402 "\x74\x68\x65\x20\x63\x6c\x61\x73"
23403 "\x73\x20\x6f\x66\x20\x27\x39\x39"
23404 "\x3a\x20\x49\x66\x20\x49\x20\x63"
23405 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
23406 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
23407 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
23408 "\x74\x69\x70\x20\x66\x6f\x72\x20"
23409 "\x74\x68\x65\x20\x66\x75\x74\x75"
23410 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
23411 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
23412 "\x75\x6c\x64\x20\x62\x65\x20\x69"
23413 "\x74\x2e",
23414 .ilen = 114,
23415 .result = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
23416 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
23417 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
23418 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
23419 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
23420 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
23421 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
23422 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
23423 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
23424 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
23425 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
23426 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
23427 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
23428 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
23429 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
23430 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
23431 "\x06\x91",
23432 .rlen = 130,
23433 }, {
23434 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23435 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23436 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23437 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
23438 .klen = 32,
23439 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
23440 "\x05\x06\x07\x08",
23441 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
23442 "\x00\x00\x4e\x91",
23443 .alen = 12,
23444 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23445 "\x2d\x44\x72\x61\x66\x74\x73\x20"
23446 "\x61\x72\x65\x20\x64\x72\x61\x66"
23447 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23448 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23449 "\x64\x20\x66\x6f\x72\x20\x61\x20"
23450 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23451 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23452 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23453 "\x64\x20\x6d\x61\x79\x20\x62\x65"
23454 "\x20\x75\x70\x64\x61\x74\x65\x64"
23455 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23456 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23457 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23458 "\x20\x62\x79\x20\x6f\x74\x68\x65"
23459 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23460 "\x6e\x74\x73\x20\x61\x74\x20\x61"
23461 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23462 "\x20\x49\x74\x20\x69\x73\x20\x69"
23463 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23464 "\x69\x61\x74\x65\x20\x74\x6f\x20"
23465 "\x75\x73\x65\x20\x49\x6e\x74\x65"
23466 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23467 "\x66\x74\x73\x20\x61\x73\x20\x72"
23468 "\x65\x66\x65\x72\x65\x6e\x63\x65"
23469 "\x20\x6d\x61\x74\x65\x72\x69\x61"
23470 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23471 "\x63\x69\x74\x65\x20\x74\x68\x65"
23472 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23473 "\x74\x68\x61\x6e\x20\x61\x73\x20"
23474 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23475 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23476 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23477 "\x9d",
23478 .ilen = 265,
23479 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23480 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23481 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23482 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23483 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23484 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23485 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23486 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23487 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23488 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23489 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23490 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23491 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23492 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23493 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23494 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23495 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23496 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23497 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23498 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23499 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23500 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23501 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23502 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23503 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23504 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23505 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23506 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23507 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23508 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23509 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23510 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23511 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23512 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23513 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23514 "\x38",
23515 .rlen = 281,
23516 },
23517};
23518
23519static struct aead_testvec rfc7539_dec_tv_template[] = {
23520 {
23521 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
23522 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23523 "\x90\x91\x92\x93\x94\x95\x96\x97"
23524 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
23525 .klen = 32,
23526 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
23527 "\x44\x45\x46\x47",
23528 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
23529 "\xc4\xc5\xc6\xc7",
23530 .alen = 12,
23531 .input = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
23532 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
23533 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
23534 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
23535 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
23536 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
23537 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
23538 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
23539 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
23540 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
23541 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
23542 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
23543 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
23544 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
23545 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
23546 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
23547 "\x06\x91",
23548 .ilen = 130,
23549 .result = "\x4c\x61\x64\x69\x65\x73\x20\x61"
23550 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
23551 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
23552 "\x74\x68\x65\x20\x63\x6c\x61\x73"
23553 "\x73\x20\x6f\x66\x20\x27\x39\x39"
23554 "\x3a\x20\x49\x66\x20\x49\x20\x63"
23555 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
23556 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
23557 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
23558 "\x74\x69\x70\x20\x66\x6f\x72\x20"
23559 "\x74\x68\x65\x20\x66\x75\x74\x75"
23560 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
23561 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
23562 "\x75\x6c\x64\x20\x62\x65\x20\x69"
23563 "\x74\x2e",
23564 .rlen = 114,
23565 }, {
23566 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23567 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23568 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23569 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
23570 .klen = 32,
23571 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
23572 "\x05\x06\x07\x08",
23573 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
23574 "\x00\x00\x4e\x91",
23575 .alen = 12,
23576 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23577 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23578 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23579 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23580 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23581 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23582 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23583 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23584 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23585 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23586 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23587 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23588 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23589 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23590 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23591 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23592 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23593 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23594 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23595 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23596 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23597 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23598 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23599 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23600 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23601 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23602 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23603 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23604 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23605 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23606 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23607 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23608 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23609 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23610 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23611 "\x38",
23612 .ilen = 281,
23613 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23614 "\x2d\x44\x72\x61\x66\x74\x73\x20"
23615 "\x61\x72\x65\x20\x64\x72\x61\x66"
23616 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23617 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23618 "\x64\x20\x66\x6f\x72\x20\x61\x20"
23619 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23620 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23621 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23622 "\x64\x20\x6d\x61\x79\x20\x62\x65"
23623 "\x20\x75\x70\x64\x61\x74\x65\x64"
23624 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23625 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23626 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23627 "\x20\x62\x79\x20\x6f\x74\x68\x65"
23628 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23629 "\x6e\x74\x73\x20\x61\x74\x20\x61"
23630 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23631 "\x20\x49\x74\x20\x69\x73\x20\x69"
23632 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23633 "\x69\x61\x74\x65\x20\x74\x6f\x20"
23634 "\x75\x73\x65\x20\x49\x6e\x74\x65"
23635 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23636 "\x66\x74\x73\x20\x61\x73\x20\x72"
23637 "\x65\x66\x65\x72\x65\x6e\x63\x65"
23638 "\x20\x6d\x61\x74\x65\x72\x69\x61"
23639 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23640 "\x63\x69\x74\x65\x20\x74\x68\x65"
23641 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23642 "\x74\x68\x61\x6e\x20\x61\x73\x20"
23643 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23644 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23645 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23646 "\x9d",
23647 .rlen = 265,
23648 },
23649};
23650
23651/*
Martin Willi59007582015-06-01 13:44:03 +020023652 * draft-irtf-cfrg-chacha20-poly1305
23653 */
23654#define RFC7539ESP_DEC_TEST_VECTORS 1
23655#define RFC7539ESP_ENC_TEST_VECTORS 1
23656static struct aead_testvec rfc7539esp_enc_tv_template[] = {
23657 {
23658 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23659 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23660 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23661 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
23662 "\x00\x00\x00\x00",
23663 .klen = 36,
23664 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
23665 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
Herbert Xu74790922015-07-16 12:35:08 +080023666 "\x00\x00\x4e\x91\x01\x02\x03\x04"
23667 "\x05\x06\x07\x08",
23668 .alen = 20,
Martin Willi59007582015-06-01 13:44:03 +020023669 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23670 "\x2d\x44\x72\x61\x66\x74\x73\x20"
23671 "\x61\x72\x65\x20\x64\x72\x61\x66"
23672 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23673 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23674 "\x64\x20\x66\x6f\x72\x20\x61\x20"
23675 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23676 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23677 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23678 "\x64\x20\x6d\x61\x79\x20\x62\x65"
23679 "\x20\x75\x70\x64\x61\x74\x65\x64"
23680 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23681 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23682 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23683 "\x20\x62\x79\x20\x6f\x74\x68\x65"
23684 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23685 "\x6e\x74\x73\x20\x61\x74\x20\x61"
23686 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23687 "\x20\x49\x74\x20\x69\x73\x20\x69"
23688 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23689 "\x69\x61\x74\x65\x20\x74\x6f\x20"
23690 "\x75\x73\x65\x20\x49\x6e\x74\x65"
23691 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23692 "\x66\x74\x73\x20\x61\x73\x20\x72"
23693 "\x65\x66\x65\x72\x65\x6e\x63\x65"
23694 "\x20\x6d\x61\x74\x65\x72\x69\x61"
23695 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23696 "\x63\x69\x74\x65\x20\x74\x68\x65"
23697 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23698 "\x74\x68\x61\x6e\x20\x61\x73\x20"
23699 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23700 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23701 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23702 "\x9d",
23703 .ilen = 265,
23704 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23705 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23706 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23707 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23708 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23709 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23710 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23711 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23712 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23713 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23714 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23715 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23716 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23717 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23718 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23719 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23720 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23721 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23722 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23723 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23724 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23725 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23726 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23727 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23728 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23729 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23730 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23731 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23732 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23733 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23734 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23735 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23736 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23737 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23738 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23739 "\x38",
23740 .rlen = 281,
23741 },
23742};
23743
23744static struct aead_testvec rfc7539esp_dec_tv_template[] = {
23745 {
23746 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23747 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23748 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23749 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
23750 "\x00\x00\x00\x00",
23751 .klen = 36,
23752 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
23753 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
Herbert Xu74790922015-07-16 12:35:08 +080023754 "\x00\x00\x4e\x91\x01\x02\x03\x04"
23755 "\x05\x06\x07\x08",
23756 .alen = 20,
Martin Willi59007582015-06-01 13:44:03 +020023757 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23758 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23759 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23760 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23761 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23762 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23763 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23764 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23765 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23766 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23767 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23768 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23769 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23770 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23771 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23772 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23773 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23774 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23775 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23776 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23777 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23778 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23779 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23780 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23781 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23782 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23783 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23784 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23785 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23786 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23787 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23788 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23789 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23790 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23791 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23792 "\x38",
23793 .ilen = 281,
23794 .result = "\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 .rlen = 265,
23829 },
23830};
23831
23832/*
Stephan Mueller35351982015-09-21 20:59:56 +020023833 * All key wrapping test vectors taken from
23834 * http://csrc.nist.gov/groups/STM/cavp/documents/mac/kwtestvectors.zip
23835 *
23836 * Note: as documented in keywrap.c, the ivout for encryption is the first
23837 * semiblock of the ciphertext from the test vector. For decryption, iv is
23838 * the first semiblock of the ciphertext.
23839 */
23840static struct cipher_testvec aes_kw_enc_tv_template[] = {
23841 {
23842 .key = "\x75\x75\xda\x3a\x93\x60\x7c\xc2"
23843 "\xbf\xd8\xce\xc7\xaa\xdf\xd9\xa6",
23844 .klen = 16,
23845 .input = "\x42\x13\x6d\x3c\x38\x4a\x3e\xea"
23846 "\xc9\x5a\x06\x6f\xd2\x8f\xed\x3f",
23847 .ilen = 16,
23848 .result = "\xf6\x85\x94\x81\x6f\x64\xca\xa3"
23849 "\xf5\x6f\xab\xea\x25\x48\xf5\xfb",
23850 .rlen = 16,
23851 .iv_out = "\x03\x1f\x6b\xd7\xe6\x1e\x64\x3d",
23852 },
23853};
23854
23855static struct cipher_testvec aes_kw_dec_tv_template[] = {
23856 {
23857 .key = "\x80\xaa\x99\x73\x27\xa4\x80\x6b"
23858 "\x6a\x7a\x41\xa5\x2b\x86\xc3\x71"
23859 "\x03\x86\xf9\x32\x78\x6e\xf7\x96"
23860 "\x76\xfa\xfb\x90\xb8\x26\x3c\x5f",
23861 .klen = 32,
23862 .input = "\xd3\x3d\x3d\x97\x7b\xf0\xa9\x15"
23863 "\x59\xf9\x9c\x8a\xcd\x29\x3d\x43",
23864 .ilen = 16,
23865 .result = "\x0a\x25\x6b\xa7\x5c\xfa\x03\xaa"
23866 "\xa0\x2b\xa9\x42\x03\xf1\x5b\xaa",
23867 .rlen = 16,
23868 .iv = "\x42\x3c\x96\x0d\x8a\x2a\xc4\xc1",
23869 },
23870};
23871
23872/*
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080023873 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
23874 * test vectors, taken from Appendix B.2.9 and B.2.10:
23875 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
23876 * Only AES-128 is supported at this time.
23877 */
23878#define ANSI_CPRNG_AES_TEST_VECTORS 6
23879
23880static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
23881 {
23882 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
23883 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
23884 .klen = 16,
23885 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
23886 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
23887 .dtlen = 16,
23888 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
23889 "\x00\x00\x00\x00\x00\x00\x00\x00",
23890 .vlen = 16,
23891 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
23892 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
23893 .rlen = 16,
23894 .loops = 1,
23895 }, {
23896 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
23897 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
23898 .klen = 16,
23899 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
23900 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
23901 .dtlen = 16,
23902 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
23903 "\x00\x00\x00\x00\x00\x00\x00\x00",
23904 .vlen = 16,
23905 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
23906 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
23907 .rlen = 16,
23908 .loops = 1,
23909 }, {
23910 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
23911 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
23912 .klen = 16,
23913 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
23914 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
23915 .dtlen = 16,
23916 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
23917 "\x00\x00\x00\x00\x00\x00\x00\x00",
23918 .vlen = 16,
23919 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
23920 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
23921 .rlen = 16,
23922 .loops = 1,
23923 }, {
23924 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
23925 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
23926 .klen = 16,
23927 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
23928 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
23929 .dtlen = 16,
23930 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
23931 "\x00\x00\x00\x00\x00\x00\x00\x00",
23932 .vlen = 16,
23933 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
23934 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
23935 .rlen = 16,
23936 .loops = 1,
23937 }, {
23938 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
23939 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
23940 .klen = 16,
23941 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
23942 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
23943 .dtlen = 16,
23944 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
23945 "\x00\x00\x00\x00\x00\x00\x00\x00",
23946 .vlen = 16,
23947 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
23948 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
23949 .rlen = 16,
23950 .loops = 1,
23951 }, { /* Monte Carlo Test */
23952 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
23953 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
23954 .klen = 16,
23955 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
23956 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
23957 .dtlen = 16,
23958 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
23959 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
23960 .vlen = 16,
23961 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
23962 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
23963 .rlen = 16,
23964 .loops = 10000,
23965 },
23966};
23967
Stephan Mueller3332ee22014-05-31 17:24:38 +020023968/*
23969 * SP800-90A DRBG Test vectors from
23970 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
23971 *
23972 * Test vectors for DRBG with prediction resistance. All types of DRBGs
23973 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
23974 * w/o personalization string, w/ and w/o additional input string).
23975 */
23976static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
23977 {
23978 .entropy = (unsigned char *)
23979 "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
23980 "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
23981 "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
23982 "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
23983 .entropylen = 48,
23984 .entpra = (unsigned char *)
23985 "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
23986 "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
23987 "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
23988 .entprb = (unsigned char *)
23989 "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
23990 "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
23991 "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
23992 .entprlen = 32,
23993 .expected = (unsigned char *)
23994 "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
23995 "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
23996 "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
23997 "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
23998 "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
23999 "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
24000 "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
24001 "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
24002 "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
24003 "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
24004 "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
24005 .expectedlen = 128,
24006 .addtla = NULL,
24007 .addtlb = NULL,
24008 .addtllen = 0,
24009 .pers = NULL,
24010 .perslen = 0,
24011 }, {
24012 .entropy = (unsigned char *)
24013 "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
24014 "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
24015 "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
24016 "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
24017 .entropylen = 48,
24018 .entpra = (unsigned char *)
24019 "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
24020 "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
24021 "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
24022 .entprb = (unsigned char *)
24023 "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
24024 "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
24025 "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
24026 .entprlen = 32,
24027 .expected = (unsigned char *)
24028 "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
24029 "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
24030 "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
24031 "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
24032 "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
24033 "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
24034 "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
24035 "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
24036 "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
24037 "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
24038 "\x50\x47\xa3\x63\x81\x16\xaf\x19",
24039 .expectedlen = 128,
24040 .addtla = (unsigned char *)
24041 "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
24042 "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
24043 "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
24044 .addtlb = (unsigned char *)
24045 "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
24046 "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
24047 "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
24048 .addtllen = 32,
24049 .pers = NULL,
24050 .perslen = 0,
24051 }, {
24052 .entropy = (unsigned char *)
24053 "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
24054 "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
24055 "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
24056 "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
24057 .entropylen = 48,
24058 .entpra = (unsigned char *)
24059 "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
24060 "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
24061 "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
24062 .entprb = (unsigned char *)
24063 "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
24064 "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
24065 "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
24066 .entprlen = 32,
24067 .expected = (unsigned char *)
24068 "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
24069 "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
24070 "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
24071 "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
24072 "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
24073 "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
24074 "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
24075 "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
24076 "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
24077 "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
24078 "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
24079 .expectedlen = 128,
24080 .addtla = NULL,
24081 .addtlb = NULL,
24082 .addtllen = 0,
24083 .pers = (unsigned char *)
24084 "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
24085 "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
24086 "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
24087 .perslen = 32,
24088 }, {
24089 .entropy = (unsigned char *)
24090 "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
24091 "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
24092 "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
24093 "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
24094 .entropylen = 48,
24095 .entpra = (unsigned char *)
24096 "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
24097 "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
24098 "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
24099 .entprb = (unsigned char *)
24100 "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
24101 "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
24102 "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
24103 .entprlen = 32,
24104 .expected = (unsigned char *)
24105 "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
24106 "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
24107 "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
24108 "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
24109 "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
24110 "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
24111 "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
24112 "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
24113 "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
24114 "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
24115 "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
24116 .expectedlen = 128,
24117 .addtla = (unsigned char *)
24118 "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
24119 "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
24120 "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
24121 .addtlb = (unsigned char *)
24122 "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
24123 "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
24124 "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
24125 .addtllen = 32,
24126 .pers = (unsigned char *)
24127 "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
24128 "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
24129 "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
24130 .perslen = 32,
24131 },
24132};
24133
24134static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
24135 {
24136 .entropy = (unsigned char *)
24137 "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
24138 "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
24139 "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
24140 "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
24141 .entropylen = 48,
24142 .entpra = (unsigned char *)
24143 "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
24144 "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
24145 "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
24146 .entprb = (unsigned char *)
24147 "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
24148 "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
24149 "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
24150 .entprlen = 32,
24151 .expected = (unsigned char *)
24152 "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
24153 "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
24154 "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
24155 "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
24156 "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
24157 "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
24158 "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
24159 "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
24160 "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
24161 "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
24162 "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
24163 .expectedlen = 128,
24164 .addtla = NULL,
24165 .addtlb = NULL,
24166 .addtllen = 0,
24167 .pers = NULL,
24168 .perslen = 0,
24169 }, {
24170 .entropy = (unsigned char *)
24171 "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
24172 "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
24173 "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
24174 "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
24175 .entropylen = 48,
24176 .entpra = (unsigned char *)
24177 "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
24178 "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
24179 "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
24180 .entprb = (unsigned char *)
24181 "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
24182 "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
24183 "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
24184 .entprlen = 32,
24185 .expected = (unsigned char *)
24186 "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
24187 "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
24188 "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
24189 "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
24190 "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
24191 "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
24192 "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
24193 "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
24194 "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
24195 "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
24196 "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
24197 .expectedlen = 128,
24198 .addtla = (unsigned char *)
24199 "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
24200 "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
24201 "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
24202 .addtlb = (unsigned char *)
24203 "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
24204 "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
24205 "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
24206 .addtllen = 32,
24207 .pers = NULL,
24208 .perslen = 0,
24209 }, {
24210 .entropy = (unsigned char *)
24211 "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
24212 "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
24213 "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
24214 "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
24215 .entropylen = 48,
24216 .entpra = (unsigned char *)
24217 "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
24218 "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
24219 "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
24220 .entprb = (unsigned char *)
24221 "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
24222 "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
24223 "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
24224 .entprlen = 32,
24225 .expected = (unsigned char *)
24226 "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
24227 "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
24228 "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
24229 "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
24230 "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
24231 "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
24232 "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
24233 "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
24234 "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
24235 "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
24236 "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
24237 .expectedlen = 128,
24238 .addtla = NULL,
24239 .addtlb = NULL,
24240 .addtllen = 0,
24241 .pers = (unsigned char *)
24242 "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
24243 "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
24244 "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
24245 .perslen = 32,
24246 }, {
24247 .entropy = (unsigned char *)
24248 "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
24249 "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
24250 "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
24251 "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
24252 .entropylen = 48,
24253 .entpra = (unsigned char *)
24254 "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
24255 "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
24256 "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
24257 .entprb = (unsigned char *)
24258 "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
24259 "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
24260 "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
24261 .entprlen = 32,
24262 .expected = (unsigned char *)
24263 "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
24264 "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
24265 "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
24266 "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
24267 "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
24268 "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
24269 "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
24270 "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
24271 "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
24272 "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
24273 "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
24274 .expectedlen = 128,
24275 .addtla = (unsigned char *)
24276 "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
24277 "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
24278 "\x86\x88\x55\x28\xc1\x69\xdd\x76",
24279 .addtlb = (unsigned char *)
24280 "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
24281 "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
24282 "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
24283 .addtllen = 32,
24284 .pers = (unsigned char *)
24285 "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
24286 "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
24287 "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
24288 .perslen = 32,
24289 },
24290};
24291
24292static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
24293 {
24294 .entropy = (unsigned char *)
24295 "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
24296 "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
24297 .entropylen = 24,
24298 .entpra = (unsigned char *)
24299 "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
24300 "\xb4\xec\x80\xb1",
24301 .entprb = (unsigned char *)
24302 "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
24303 "\x28\x07\xeb\xc2",
24304 .entprlen = 16,
24305 .expected = (unsigned char *)
24306 "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
24307 "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
24308 "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
24309 "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
24310 "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
24311 "\x8a\xf1\x23\xa8",
24312 .expectedlen = 64,
24313 .addtla = NULL,
24314 .addtlb = NULL,
24315 .addtllen = 0,
24316 .pers = NULL,
24317 .perslen = 0,
24318 }, {
24319 .entropy = (unsigned char *)
24320 "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
24321 "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
24322 .entropylen = 24,
24323 .entpra = (unsigned char *)
24324 "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
24325 "\x67\xd1\x08\xf8",
24326 .entprb = (unsigned char *)
24327 "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
24328 "\xd4\xba\x04\x58",
24329 .entprlen = 16,
24330 .expected = (unsigned char *)
24331 "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
24332 "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
24333 "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
24334 "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
24335 "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
24336 "\xc1\x02\x41\x82",
24337 .expectedlen = 64,
24338 .addtla = (unsigned char *)
24339 "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
24340 "\xeb\xb3\x01\x76",
24341 .addtlb = (unsigned char *)
24342 "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
24343 "\xd0\x7f\xcc\x43",
24344 .addtllen = 16,
24345 .pers = NULL,
24346 .perslen = 0,
24347 }, {
24348 .entropy = (unsigned char *)
24349 "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
24350 "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
24351 .entropylen = 24,
24352 .entpra = (unsigned char *)
24353 "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
24354 "\xc3\x0f\xe3\xb0",
24355 .entprb = (unsigned char *)
24356 "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
24357 "\xd6\x9c\x9d\xe8",
24358 .entprlen = 16,
24359 .expected = (unsigned char *)
24360 "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
24361 "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
24362 "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
24363 "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
24364 "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
24365 "\x72\x82\x0c\xcf",
24366 .expectedlen = 64,
24367 .addtla = NULL,
24368 .addtlb = NULL,
24369 .addtllen = 0,
24370 .pers = (unsigned char *)
24371 "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
24372 "\x21\x52\xb3\xad",
24373 .perslen = 16,
24374 }, {
24375 .entropy = (unsigned char *)
24376 "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
24377 "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
24378 .entropylen = 24,
24379 .entpra = (unsigned char *)
24380 "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
24381 "\xc4\x2c\xe8\x10",
24382 .entprb = (unsigned char *)
24383 "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
24384 "\x08\xf7\xa5\x01",
24385 .entprlen = 16,
24386 .expected = (unsigned char *)
24387 "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
24388 "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
24389 "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
24390 "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
24391 "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
24392 "\x23\xc5\x1f\x68",
24393 .expectedlen = 64,
24394 .addtla = (unsigned char *)
24395 "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
24396 "\x23\x6d\xad\x1d",
24397 .addtlb = (unsigned char *)
24398 "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
24399 "\xbc\x59\x31\x8c",
24400 .addtllen = 16,
24401 .pers = (unsigned char *)
24402 "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
24403 "\x37\x3c\x5c\x0b",
24404 .perslen = 16,
24405 },
24406};
24407
24408/*
24409 * SP800-90A DRBG Test vectors from
24410 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
24411 *
24412 * Test vectors for DRBG without prediction resistance. All types of DRBGs
24413 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
24414 * w/o personalization string, w/ and w/o additional input string).
24415 */
24416static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
24417 {
24418 .entropy = (unsigned char *)
24419 "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
24420 "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
24421 "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
24422 "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
24423 .entropylen = 48,
24424 .expected = (unsigned char *)
24425 "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
24426 "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
24427 "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
24428 "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
24429 "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
24430 "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
24431 "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
24432 "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
24433 "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
24434 "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
24435 "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
24436 .expectedlen = 128,
24437 .addtla = NULL,
24438 .addtlb = NULL,
24439 .addtllen = 0,
24440 .pers = NULL,
24441 .perslen = 0,
24442 }, {
24443 .entropy = (unsigned char *)
24444 "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
24445 "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
24446 "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
24447 "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
24448 .entropylen = 48,
24449 .expected = (unsigned char *)
24450 "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
24451 "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
24452 "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
24453 "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
24454 "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
24455 "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
24456 "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
24457 "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
24458 "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
24459 "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
24460 "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
24461 .expectedlen = 128,
24462 .addtla = (unsigned char *)
24463 "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
24464 "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
24465 "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
24466 .addtlb = (unsigned char *)
24467 "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
24468 "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
24469 "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
24470 .addtllen = 32,
24471 .pers = NULL,
24472 .perslen = 0,
24473 }, {
24474 .entropy = (unsigned char *)
24475 "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
24476 "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
24477 "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
24478 "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
24479 .entropylen = 48,
24480 .expected = (unsigned char *)
24481 "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
24482 "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
24483 "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
24484 "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
24485 "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
24486 "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
24487 "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
24488 "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
24489 "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
24490 "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
24491 "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
24492 .expectedlen = 128,
24493 .addtla = NULL,
24494 .addtlb = NULL,
24495 .addtllen = 0,
24496 .pers = (unsigned char *)
24497 "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
24498 "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
24499 "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
24500 .perslen = 32,
24501 }, {
24502 .entropy = (unsigned char *)
24503 "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
24504 "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
24505 "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
24506 "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
24507 .entropylen = 48,
24508 .expected = (unsigned char *)
24509 "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
24510 "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
24511 "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
24512 "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
24513 "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
24514 "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
24515 "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
24516 "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
24517 "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
24518 "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
24519 "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
24520 .expectedlen = 128,
24521 .addtla = (unsigned char *)
24522 "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
24523 "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
24524 "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
24525 .addtlb = (unsigned char *)
24526 "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
24527 "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
24528 "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
24529 .addtllen = 32,
24530 .pers = (unsigned char *)
24531 "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
24532 "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
24533 "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
24534 .perslen = 32,
24535 },
24536};
24537
24538static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
24539 {
24540 .entropy = (unsigned char *)
24541 "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
24542 "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
24543 "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
24544 "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
24545 .entropylen = 48,
24546 .expected = (unsigned char *)
24547 "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
24548 "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
24549 "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
24550 "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
24551 "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
24552 "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
24553 "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
24554 "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
24555 "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
24556 "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
24557 "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
24558 .expectedlen = 128,
24559 .addtla = NULL,
24560 .addtlb = NULL,
24561 .addtllen = 0,
24562 .pers = NULL,
24563 .perslen = 0,
24564 }, {
24565 .entropy = (unsigned char *)
24566 "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
24567 "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
24568 "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
24569 "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
24570 .entropylen = 48,
24571 .expected = (unsigned char *)
24572 "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
24573 "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
24574 "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
24575 "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
24576 "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
24577 "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
24578 "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
24579 "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
24580 "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
24581 "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
24582 "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
24583 .expectedlen = 128,
24584 .addtla = (unsigned char *)
24585 "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
24586 "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
24587 "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
24588 .addtlb = (unsigned char *)
24589 "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
24590 "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
24591 "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
24592 .addtllen = 32,
24593 .pers = NULL,
24594 .perslen = 0,
24595 }, {
24596 .entropy = (unsigned char *)
24597 "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
24598 "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
24599 "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
24600 "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
24601 .entropylen = 48,
24602 .expected = (unsigned char *)
24603 "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
24604 "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
24605 "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
24606 "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
24607 "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
24608 "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
24609 "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
24610 "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
24611 "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
24612 "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
24613 "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
24614 .expectedlen = 128,
24615 .addtla = NULL,
24616 .addtlb = NULL,
24617 .addtllen = 0,
24618 .pers = (unsigned char *)
24619 "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
24620 "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
24621 "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
24622 .perslen = 32,
24623 }, {
24624 .entropy = (unsigned char *)
24625 "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
24626 "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
24627 "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
24628 "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
24629 .entropylen = 48,
24630 .expected = (unsigned char *)
24631 "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
24632 "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
24633 "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
24634 "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
24635 "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
24636 "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
24637 "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
24638 "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
24639 "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
24640 "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
24641 "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
24642 .expectedlen = 128,
24643 .addtla = (unsigned char *)
24644 "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
24645 "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
24646 "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
24647 .addtlb = (unsigned char *)
24648 "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
24649 "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
24650 "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
24651 .addtllen = 32,
24652 .pers = (unsigned char *)
24653 "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
24654 "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
24655 "\x36\x60\x3b\xca\x37\xc9\xee\x29",
24656 .perslen = 32,
24657 },
24658};
24659
24660static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
24661 {
24662 .entropy = (unsigned char *)
24663 "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
24664 "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
24665 "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
24666 "\xac\x9b\xbb\x00",
24667 .entropylen = 40,
24668 .expected = (unsigned char *)
24669 "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
24670 "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
24671 "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
24672 "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
24673 "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
24674 "\x9a\x9d\xf1\x0d",
24675 .expectedlen = 64,
24676 .addtla = NULL,
24677 .addtlb = NULL,
24678 .addtllen = 0,
24679 .pers = NULL,
24680 .perslen = 0,
24681 },
24682};
24683
24684static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
24685 {
24686 .entropy = (unsigned char *)
24687 "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
24688 "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
24689 "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
24690 "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
24691 .entropylen = 48,
24692 .expected = (unsigned char *)
24693 "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
24694 "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
24695 "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
24696 "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
24697 "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
24698 "\xb4\xf0\x7e\x1d",
24699 .expectedlen = 64,
24700 .addtla = NULL,
24701 .addtlb = NULL,
24702 .addtllen = 0,
24703 .pers = NULL,
24704 .perslen = 0,
24705 },
24706};
24707
24708static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
24709 {
24710 .entropy = (unsigned char *)
24711 "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
24712 "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
24713 .entropylen = 24,
24714 .expected = (unsigned char *)
24715 "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
24716 "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
24717 "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
24718 "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
24719 "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
24720 "\xcb\x2d\xd6\xb0",
24721 .expectedlen = 64,
24722 .addtla = NULL,
24723 .addtlb = NULL,
24724 .addtllen = 0,
24725 .pers = NULL,
24726 .perslen = 0,
24727 }, {
24728 .entropy = (unsigned char *)
24729 "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
24730 "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
24731 .entropylen = 24,
24732 .expected = (unsigned char *)
24733 "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
24734 "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
24735 "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
24736 "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
24737 "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
24738 "\xc3\xdf\xb3\x81",
24739 .expectedlen = 64,
24740 .addtla = (unsigned char *)
24741 "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
24742 "\x91\x4d\x81\x56",
24743 .addtlb = (unsigned char *)
24744 "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
24745 "\x4a\x55\xd1\xc6",
24746 .addtllen = 16,
24747 .pers = NULL,
24748 .perslen = 0,
24749 }, {
24750 .entropy = (unsigned char *)
24751 "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
24752 "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
24753 .entropylen = 24,
24754 .expected = (unsigned char *)
24755 "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
24756 "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
24757 "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
24758 "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
24759 "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
24760 "\x34\x30\x0c\x3d",
24761 .expectedlen = 64,
24762 .addtla = NULL,
24763 .addtlb = NULL,
24764 .addtllen = 0,
24765 .pers = (unsigned char *)
24766 "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
24767 "\x0b\xc6\x97\x54",
24768 .perslen = 16,
24769 }, {
24770 .entropy = (unsigned char *)
24771 "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
24772 "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
24773 .entropylen = 24,
24774 .expected = (unsigned char *)
24775 "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
24776 "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
24777 "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
24778 "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
24779 "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
24780 "\x2b\x49\x1e\x5c",
24781 .expectedlen = 64,
24782 .addtla = (unsigned char *)
24783 "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
24784 "\x44\x85\xe7\xfe",
24785 .addtlb = (unsigned char *)
24786 "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
24787 "\x82\x16\x62\x7f",
24788 .addtllen = 16,
24789 .pers = (unsigned char *)
24790 "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
24791 "\x8e\xcf\xe0\x02",
24792 .perslen = 16,
24793 },
24794};
24795
Herbert Xuda7f0332008-07-31 17:08:25 +080024796/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024797#define CAST5_ENC_TEST_VECTORS 4
24798#define CAST5_DEC_TEST_VECTORS 4
24799#define CAST5_CBC_ENC_TEST_VECTORS 1
24800#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030024801#define CAST5_CTR_ENC_TEST_VECTORS 2
24802#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080024803
24804static struct cipher_testvec cast5_enc_tv_template[] = {
24805 {
24806 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
24807 "\x23\x45\x67\x89\x34\x56\x78\x9a",
24808 .klen = 16,
24809 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24810 .ilen = 8,
24811 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
24812 .rlen = 8,
24813 }, {
24814 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
24815 "\x23\x45",
24816 .klen = 10,
24817 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24818 .ilen = 8,
24819 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
24820 .rlen = 8,
24821 }, {
24822 .key = "\x01\x23\x45\x67\x12",
24823 .klen = 5,
24824 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24825 .ilen = 8,
24826 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
24827 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024828 }, { /* Generated from TF test vectors */
24829 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24830 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24831 .klen = 16,
24832 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24833 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24834 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24835 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24836 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24837 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
24838 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24839 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24840 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24841 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24842 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24843 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24844 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24845 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24846 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24847 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24848 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24849 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24850 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24851 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24852 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24853 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24854 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24855 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24856 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24857 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24858 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24859 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24860 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24861 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24862 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24863 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24864 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24865 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24866 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24867 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24868 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24869 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24870 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24871 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24872 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24873 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24874 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24875 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24876 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24877 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24878 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24879 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24880 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24881 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24882 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24883 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24884 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24885 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24886 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24887 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24888 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24889 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24890 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24891 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24892 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24893 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
24894 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
24895 .ilen = 496,
24896 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
24897 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
24898 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
24899 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
24900 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
24901 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
24902 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
24903 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
24904 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
24905 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
24906 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
24907 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
24908 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
24909 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
24910 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
24911 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
24912 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
24913 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
24914 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
24915 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
24916 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
24917 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
24918 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
24919 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
24920 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
24921 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
24922 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
24923 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
24924 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
24925 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
24926 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
24927 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
24928 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
24929 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
24930 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
24931 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
24932 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
24933 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
24934 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
24935 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
24936 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
24937 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
24938 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
24939 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
24940 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
24941 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
24942 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
24943 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
24944 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
24945 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
24946 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
24947 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
24948 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
24949 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
24950 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
24951 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
24952 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
24953 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
24954 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
24955 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
24956 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
24957 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
24958 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024959 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024960 .np = 3,
24961 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080024962 },
24963};
24964
24965static struct cipher_testvec cast5_dec_tv_template[] = {
24966 {
24967 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
24968 "\x23\x45\x67\x89\x34\x56\x78\x9a",
24969 .klen = 16,
24970 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
24971 .ilen = 8,
24972 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24973 .rlen = 8,
24974 }, {
24975 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
24976 "\x23\x45",
24977 .klen = 10,
24978 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
24979 .ilen = 8,
24980 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24981 .rlen = 8,
24982 }, {
24983 .key = "\x01\x23\x45\x67\x12",
24984 .klen = 5,
24985 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
24986 .ilen = 8,
24987 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24988 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024989 }, { /* Generated from TF test vectors */
24990 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24991 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24992 .klen = 16,
24993 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24994 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
24995 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
24996 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
24997 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
24998 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
24999 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
25000 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
25001 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
25002 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
25003 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
25004 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
25005 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
25006 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
25007 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
25008 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
25009 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
25010 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
25011 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
25012 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
25013 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
25014 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
25015 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
25016 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
25017 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
25018 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
25019 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
25020 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
25021 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
25022 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
25023 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
25024 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
25025 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
25026 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
25027 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
25028 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
25029 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
25030 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
25031 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
25032 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
25033 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
25034 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
25035 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
25036 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
25037 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
25038 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
25039 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
25040 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
25041 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
25042 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
25043 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
25044 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
25045 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
25046 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
25047 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
25048 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
25049 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
25050 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
25051 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
25052 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
25053 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
25054 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
25055 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
25056 .ilen = 496,
25057 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25058 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25059 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25060 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25061 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25062 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25063 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25064 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25065 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25066 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25067 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25068 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25069 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25070 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25071 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25072 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25073 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25074 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25075 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25076 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25077 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25078 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25079 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25080 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25081 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25082 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25083 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25084 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25085 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25086 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25087 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25088 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25089 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25090 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25091 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25092 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25093 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25094 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25095 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25096 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25097 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25098 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25099 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25100 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25101 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25102 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25103 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25104 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25105 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25106 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25107 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25108 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25109 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25110 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25111 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25112 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25113 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25114 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25115 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25116 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25117 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25118 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25119 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025120 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025121 .np = 3,
25122 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025123 },
25124};
25125
25126static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
25127 { /* Generated from TF test vectors */
25128 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25129 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25130 .klen = 16,
25131 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25132 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25133 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25134 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25135 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25136 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25137 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25138 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25139 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25140 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25141 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25142 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25143 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25144 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25145 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25146 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25147 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25148 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25149 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25150 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25151 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25152 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25153 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25154 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25155 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25156 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25157 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25158 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25159 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25160 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25161 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25162 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25163 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25164 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25165 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25166 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25167 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25168 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25169 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25170 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25171 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25172 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25173 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25174 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25175 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25176 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25177 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25178 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25179 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25180 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25181 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25182 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25183 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25184 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25185 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25186 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25187 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25188 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25189 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25190 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25191 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25192 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25193 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25194 .ilen = 496,
25195 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
25196 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
25197 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
25198 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
25199 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
25200 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
25201 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
25202 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
25203 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
25204 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
25205 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
25206 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
25207 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
25208 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
25209 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
25210 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
25211 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
25212 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
25213 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
25214 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
25215 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
25216 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
25217 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
25218 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
25219 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
25220 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
25221 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
25222 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
25223 "\x90\x12\x37\x49\x27\x98\x69\x18"
25224 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
25225 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
25226 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
25227 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
25228 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
25229 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
25230 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
25231 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
25232 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
25233 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
25234 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
25235 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
25236 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
25237 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
25238 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
25239 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
25240 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
25241 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
25242 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
25243 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
25244 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
25245 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
25246 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
25247 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
25248 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
25249 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
25250 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
25251 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
25252 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
25253 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
25254 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
25255 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
25256 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
25257 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025258 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025259 .np = 3,
25260 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025261 },
25262};
25263
25264static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
25265 { /* Generated from TF test vectors */
25266 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25267 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25268 .klen = 16,
25269 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25270 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
25271 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
25272 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
25273 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
25274 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
25275 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
25276 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
25277 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
25278 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
25279 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
25280 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
25281 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
25282 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
25283 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
25284 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
25285 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
25286 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
25287 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
25288 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
25289 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
25290 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
25291 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
25292 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
25293 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
25294 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
25295 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
25296 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
25297 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
25298 "\x90\x12\x37\x49\x27\x98\x69\x18"
25299 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
25300 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
25301 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
25302 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
25303 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
25304 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
25305 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
25306 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
25307 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
25308 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
25309 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
25310 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
25311 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
25312 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
25313 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
25314 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
25315 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
25316 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
25317 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
25318 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
25319 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
25320 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
25321 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
25322 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
25323 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
25324 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
25325 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
25326 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
25327 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
25328 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
25329 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
25330 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
25331 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
25332 .ilen = 496,
25333 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25334 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25335 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25336 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25337 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25338 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25339 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25340 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25341 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25342 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25343 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25344 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25345 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25346 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25347 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25348 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25349 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25350 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25351 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25352 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25353 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25354 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25355 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25356 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25357 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25358 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25359 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25360 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25361 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25362 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25363 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25364 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25365 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25366 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25367 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25368 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25369 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25370 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25371 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25372 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25373 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25374 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25375 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25376 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25377 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25378 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25379 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25380 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25381 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25382 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25383 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25384 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25385 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25386 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25387 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25388 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25389 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25390 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25391 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25392 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25393 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25394 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25395 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025396 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025397 .np = 3,
25398 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025399 },
25400};
25401
25402static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
25403 { /* Generated from TF test vectors */
25404 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25405 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25406 .klen = 16,
25407 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25408 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25409 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030025410 "\x3A",
25411 .ilen = 17,
25412 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25413 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
25414 "\x0C",
25415 .rlen = 17,
25416 }, { /* Generated from TF test vectors */
25417 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25418 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25419 .klen = 16,
25420 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25421 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25422 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025423 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25424 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25425 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25426 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25427 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25428 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25429 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25430 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25431 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25432 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25433 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25434 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25435 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25436 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25437 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25438 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25439 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25440 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25441 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25442 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25443 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25444 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25445 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25446 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25447 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25448 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25449 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25450 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25451 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25452 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25453 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25454 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25455 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25456 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25457 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25458 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25459 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25460 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25461 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25462 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25463 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25464 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25465 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25466 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25467 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25468 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25469 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25470 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25471 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25472 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25473 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25474 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25475 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25476 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25477 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25478 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25479 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25480 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25481 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25482 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25483 .ilen = 496,
25484 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25485 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
25486 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
25487 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
25488 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
25489 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
25490 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
25491 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
25492 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
25493 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
25494 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
25495 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
25496 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
25497 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
25498 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
25499 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
25500 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
25501 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
25502 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
25503 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
25504 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
25505 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
25506 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
25507 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
25508 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
25509 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
25510 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
25511 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
25512 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
25513 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
25514 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
25515 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
25516 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
25517 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
25518 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
25519 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
25520 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
25521 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
25522 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
25523 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
25524 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
25525 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
25526 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
25527 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
25528 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
25529 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
25530 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
25531 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
25532 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
25533 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
25534 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
25535 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
25536 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
25537 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
25538 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
25539 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
25540 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
25541 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
25542 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
25543 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
25544 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
25545 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
25546 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025547 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025548 .np = 3,
25549 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025550 },
25551};
25552
25553static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
25554 { /* Generated from TF test vectors */
25555 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25556 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25557 .klen = 16,
25558 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25559 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25560 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030025561 "\x0C",
25562 .ilen = 17,
25563 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25564 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25565 "\x3A",
25566 .rlen = 17,
25567 }, { /* Generated from TF test vectors */
25568 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25569 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25570 .klen = 16,
25571 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25572 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25573 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025574 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
25575 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
25576 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
25577 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
25578 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
25579 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
25580 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
25581 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
25582 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
25583 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
25584 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
25585 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
25586 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
25587 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
25588 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
25589 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
25590 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
25591 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
25592 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
25593 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
25594 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
25595 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
25596 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
25597 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
25598 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
25599 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
25600 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
25601 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
25602 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
25603 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
25604 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
25605 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
25606 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
25607 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
25608 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
25609 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
25610 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
25611 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
25612 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
25613 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
25614 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
25615 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
25616 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
25617 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
25618 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
25619 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
25620 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
25621 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
25622 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
25623 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
25624 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
25625 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
25626 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
25627 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
25628 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
25629 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
25630 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
25631 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
25632 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
25633 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
25634 .ilen = 496,
25635 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25636 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25637 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25638 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25639 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25640 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25641 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25642 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25643 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25644 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25645 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25646 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25647 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25648 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25649 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25650 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25651 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25652 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25653 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25654 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25655 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25656 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25657 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25658 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25659 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25660 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25661 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25662 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25663 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25664 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25665 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25666 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25667 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25668 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25669 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25670 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25671 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25672 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25673 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25674 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25675 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25676 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25677 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25678 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25679 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25680 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25681 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25682 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25683 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25684 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25685 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25686 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25687 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25688 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25689 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25690 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25691 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25692 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25693 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25694 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25695 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25696 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25697 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025698 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025699 .np = 3,
25700 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025701 },
25702};
25703
25704/*
25705 * ARC4 test vectors from OpenSSL
25706 */
25707#define ARC4_ENC_TEST_VECTORS 7
25708#define ARC4_DEC_TEST_VECTORS 7
25709
25710static struct cipher_testvec arc4_enc_tv_template[] = {
25711 {
25712 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25713 .klen = 8,
25714 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25715 .ilen = 8,
25716 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
25717 .rlen = 8,
25718 }, {
25719 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25720 .klen = 8,
25721 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
25722 .ilen = 8,
25723 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
25724 .rlen = 8,
25725 }, {
25726 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
25727 .klen = 8,
25728 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
25729 .ilen = 8,
25730 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
25731 .rlen = 8,
25732 }, {
25733 .key = "\xef\x01\x23\x45",
25734 .klen = 4,
25735 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
25736 "\x00\x00\x00\x00\x00\x00\x00\x00"
25737 "\x00\x00\x00\x00",
25738 .ilen = 20,
25739 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25740 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
25741 "\x36\xb6\x78\x58",
25742 .rlen = 20,
25743 }, {
25744 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25745 .klen = 8,
25746 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25747 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25748 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25749 "\x12\x34\x56\x78",
25750 .ilen = 28,
25751 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
25752 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
25753 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
25754 "\x40\x01\x1e\xcf",
25755 .rlen = 28,
25756 }, {
25757 .key = "\xef\x01\x23\x45",
25758 .klen = 4,
25759 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
25760 "\x00\x00",
25761 .ilen = 10,
25762 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25763 "\xbd\x61",
25764 .rlen = 10,
25765 }, {
25766 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
25767 "\x00\x00\x00\x00\x00\x00\x00\x00",
25768 .klen = 16,
25769 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
25770 .ilen = 8,
25771 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
25772 .rlen = 8,
25773 },
25774};
25775
25776static struct cipher_testvec arc4_dec_tv_template[] = {
25777 {
25778 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25779 .klen = 8,
25780 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
25781 .ilen = 8,
25782 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25783 .rlen = 8,
25784 }, {
25785 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25786 .klen = 8,
25787 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
25788 .ilen = 8,
25789 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
25790 .rlen = 8,
25791 }, {
25792 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
25793 .klen = 8,
25794 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
25795 .ilen = 8,
25796 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
25797 .rlen = 8,
25798 }, {
25799 .key = "\xef\x01\x23\x45",
25800 .klen = 4,
25801 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25802 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
25803 "\x36\xb6\x78\x58",
25804 .ilen = 20,
25805 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
25806 "\x00\x00\x00\x00\x00\x00\x00\x00"
25807 "\x00\x00\x00\x00",
25808 .rlen = 20,
25809 }, {
25810 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25811 .klen = 8,
25812 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
25813 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
25814 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
25815 "\x40\x01\x1e\xcf",
25816 .ilen = 28,
25817 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25818 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25819 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25820 "\x12\x34\x56\x78",
25821 .rlen = 28,
25822 }, {
25823 .key = "\xef\x01\x23\x45",
25824 .klen = 4,
25825 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25826 "\xbd\x61",
25827 .ilen = 10,
25828 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
25829 "\x00\x00",
25830 .rlen = 10,
25831 }, {
25832 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
25833 "\x00\x00\x00\x00\x00\x00\x00\x00",
25834 .klen = 16,
25835 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
25836 .ilen = 8,
25837 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
25838 .rlen = 8,
25839 },
25840};
25841
25842/*
25843 * TEA test vectors
25844 */
25845#define TEA_ENC_TEST_VECTORS 4
25846#define TEA_DEC_TEST_VECTORS 4
25847
25848static struct cipher_testvec tea_enc_tv_template[] = {
25849 {
25850 .key = zeroed_string,
25851 .klen = 16,
25852 .input = zeroed_string,
25853 .ilen = 8,
25854 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
25855 .rlen = 8,
25856 }, {
25857 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25858 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25859 .klen = 16,
25860 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25861 .ilen = 8,
25862 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
25863 .rlen = 8,
25864 }, {
25865 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
25866 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25867 .klen = 16,
25868 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25869 "\x65\x73\x74\x5f\x76\x65\x63\x74",
25870 .ilen = 16,
25871 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
25872 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
25873 .rlen = 16,
25874 }, {
25875 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25876 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25877 .klen = 16,
25878 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
25879 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25880 "\x79\x6f\x75\x21\x21\x21\x20\x72"
25881 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25882 .ilen = 32,
25883 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
25884 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
25885 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
25886 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
25887 .rlen = 32,
25888 }
25889};
25890
25891static struct cipher_testvec tea_dec_tv_template[] = {
25892 {
25893 .key = zeroed_string,
25894 .klen = 16,
25895 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
25896 .ilen = 8,
25897 .result = zeroed_string,
25898 .rlen = 8,
25899 }, {
25900 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25901 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25902 .klen = 16,
25903 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
25904 .ilen = 8,
25905 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25906 .rlen = 8,
25907 }, {
25908 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
25909 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25910 .klen = 16,
25911 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
25912 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
25913 .ilen = 16,
25914 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25915 "\x65\x73\x74\x5f\x76\x65\x63\x74",
25916 .rlen = 16,
25917 }, {
25918 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25919 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25920 .klen = 16,
25921 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
25922 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
25923 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
25924 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
25925 .ilen = 32,
25926 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
25927 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25928 "\x79\x6f\x75\x21\x21\x21\x20\x72"
25929 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25930 .rlen = 32,
25931 }
25932};
25933
25934/*
25935 * XTEA test vectors
25936 */
25937#define XTEA_ENC_TEST_VECTORS 4
25938#define XTEA_DEC_TEST_VECTORS 4
25939
25940static struct cipher_testvec xtea_enc_tv_template[] = {
25941 {
25942 .key = zeroed_string,
25943 .klen = 16,
25944 .input = zeroed_string,
25945 .ilen = 8,
25946 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
25947 .rlen = 8,
25948 }, {
25949 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25950 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25951 .klen = 16,
25952 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25953 .ilen = 8,
25954 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
25955 .rlen = 8,
25956 }, {
25957 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
25958 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25959 .klen = 16,
25960 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25961 "\x65\x73\x74\x5f\x76\x65\x63\x74",
25962 .ilen = 16,
25963 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
25964 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
25965 .rlen = 16,
25966 }, {
25967 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25968 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25969 .klen = 16,
25970 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
25971 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25972 "\x79\x6f\x75\x21\x21\x21\x20\x72"
25973 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25974 .ilen = 32,
25975 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
25976 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
25977 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
25978 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
25979 .rlen = 32,
25980 }
25981};
25982
25983static struct cipher_testvec xtea_dec_tv_template[] = {
25984 {
25985 .key = zeroed_string,
25986 .klen = 16,
25987 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
25988 .ilen = 8,
25989 .result = zeroed_string,
25990 .rlen = 8,
25991 }, {
25992 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25993 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25994 .klen = 16,
25995 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
25996 .ilen = 8,
25997 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25998 .rlen = 8,
25999 }, {
26000 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26001 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26002 .klen = 16,
26003 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
26004 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
26005 .ilen = 16,
26006 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26007 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26008 .rlen = 16,
26009 }, {
26010 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26011 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26012 .klen = 16,
26013 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
26014 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
26015 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
26016 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
26017 .ilen = 32,
26018 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
26019 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26020 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26021 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26022 .rlen = 32,
26023 }
26024};
26025
26026/*
26027 * KHAZAD test vectors.
26028 */
26029#define KHAZAD_ENC_TEST_VECTORS 5
26030#define KHAZAD_DEC_TEST_VECTORS 5
26031
26032static struct cipher_testvec khazad_enc_tv_template[] = {
26033 {
26034 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
26035 "\x00\x00\x00\x00\x00\x00\x00\x00",
26036 .klen = 16,
26037 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
26038 .ilen = 8,
26039 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
26040 .rlen = 8,
26041 }, {
26042 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
26043 "\x38\x38\x38\x38\x38\x38\x38\x38",
26044 .klen = 16,
26045 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
26046 .ilen = 8,
26047 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
26048 .rlen = 8,
26049 }, {
26050 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
26051 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26052 .klen = 16,
26053 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26054 .ilen = 8,
26055 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
26056 .rlen = 8,
26057 }, {
26058 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26059 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26060 .klen = 16,
26061 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26062 .ilen = 8,
26063 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26064 .rlen = 8,
26065 }, {
26066 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26067 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26068 .klen = 16,
26069 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26070 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26071 .ilen = 16,
26072 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
26073 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26074 .rlen = 16,
26075 },
26076};
26077
26078static struct cipher_testvec khazad_dec_tv_template[] = {
26079 {
26080 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
26081 "\x00\x00\x00\x00\x00\x00\x00\x00",
26082 .klen = 16,
26083 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
26084 .ilen = 8,
26085 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
26086 .rlen = 8,
26087 }, {
26088 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
26089 "\x38\x38\x38\x38\x38\x38\x38\x38",
26090 .klen = 16,
26091 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
26092 .ilen = 8,
26093 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
26094 .rlen = 8,
26095 }, {
26096 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
26097 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26098 .klen = 16,
26099 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
26100 .ilen = 8,
26101 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26102 .rlen = 8,
26103 }, {
26104 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26105 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26106 .klen = 16,
26107 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26108 .ilen = 8,
26109 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26110 .rlen = 8,
26111 }, {
26112 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26113 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26114 .klen = 16,
26115 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
26116 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26117 .ilen = 16,
26118 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26119 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26120 .rlen = 16,
26121 },
26122};
26123
26124/*
26125 * Anubis test vectors.
26126 */
26127
26128#define ANUBIS_ENC_TEST_VECTORS 5
26129#define ANUBIS_DEC_TEST_VECTORS 5
26130#define ANUBIS_CBC_ENC_TEST_VECTORS 2
26131#define ANUBIS_CBC_DEC_TEST_VECTORS 2
26132
26133static struct cipher_testvec anubis_enc_tv_template[] = {
26134 {
26135 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26136 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26137 .klen = 16,
26138 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26139 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26140 .ilen = 16,
26141 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26142 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
26143 .rlen = 16,
26144 }, {
26145
26146 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
26147 "\x03\x03\x03\x03\x03\x03\x03\x03"
26148 "\x03\x03\x03\x03",
26149 .klen = 20,
26150 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
26151 "\x03\x03\x03\x03\x03\x03\x03\x03",
26152 .ilen = 16,
26153 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
26154 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
26155 .rlen = 16,
26156 }, {
26157 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
26158 "\x24\x24\x24\x24\x24\x24\x24\x24"
26159 "\x24\x24\x24\x24\x24\x24\x24\x24"
26160 "\x24\x24\x24\x24",
26161 .klen = 28,
26162 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
26163 "\x24\x24\x24\x24\x24\x24\x24\x24",
26164 .ilen = 16,
26165 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
26166 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
26167 .rlen = 16,
26168 }, {
26169 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
26170 "\x25\x25\x25\x25\x25\x25\x25\x25"
26171 "\x25\x25\x25\x25\x25\x25\x25\x25"
26172 "\x25\x25\x25\x25\x25\x25\x25\x25",
26173 .klen = 32,
26174 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
26175 "\x25\x25\x25\x25\x25\x25\x25\x25",
26176 .ilen = 16,
26177 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
26178 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
26179 .rlen = 16,
26180 }, {
26181 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26182 "\x35\x35\x35\x35\x35\x35\x35\x35"
26183 "\x35\x35\x35\x35\x35\x35\x35\x35"
26184 "\x35\x35\x35\x35\x35\x35\x35\x35"
26185 "\x35\x35\x35\x35\x35\x35\x35\x35",
26186 .klen = 40,
26187 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
26188 "\x35\x35\x35\x35\x35\x35\x35\x35",
26189 .ilen = 16,
26190 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26191 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
26192 .rlen = 16,
26193 },
26194};
26195
26196static struct cipher_testvec anubis_dec_tv_template[] = {
26197 {
26198 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26199 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26200 .klen = 16,
26201 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26202 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
26203 .ilen = 16,
26204 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26205 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26206 .rlen = 16,
26207 }, {
26208
26209 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
26210 "\x03\x03\x03\x03\x03\x03\x03\x03"
26211 "\x03\x03\x03\x03",
26212 .klen = 20,
26213 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
26214 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
26215 .ilen = 16,
26216 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
26217 "\x03\x03\x03\x03\x03\x03\x03\x03",
26218 .rlen = 16,
26219 }, {
26220 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
26221 "\x24\x24\x24\x24\x24\x24\x24\x24"
26222 "\x24\x24\x24\x24\x24\x24\x24\x24"
26223 "\x24\x24\x24\x24",
26224 .klen = 28,
26225 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
26226 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
26227 .ilen = 16,
26228 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
26229 "\x24\x24\x24\x24\x24\x24\x24\x24",
26230 .rlen = 16,
26231 }, {
26232 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
26233 "\x25\x25\x25\x25\x25\x25\x25\x25"
26234 "\x25\x25\x25\x25\x25\x25\x25\x25"
26235 "\x25\x25\x25\x25\x25\x25\x25\x25",
26236 .klen = 32,
26237 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
26238 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
26239 .ilen = 16,
26240 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
26241 "\x25\x25\x25\x25\x25\x25\x25\x25",
26242 .rlen = 16,
26243 }, {
26244 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26245 "\x35\x35\x35\x35\x35\x35\x35\x35"
26246 "\x35\x35\x35\x35\x35\x35\x35\x35"
26247 "\x35\x35\x35\x35\x35\x35\x35\x35"
26248 "\x35\x35\x35\x35\x35\x35\x35\x35",
26249 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26250 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
26251 .klen = 40,
26252 .ilen = 16,
26253 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
26254 "\x35\x35\x35\x35\x35\x35\x35\x35",
26255 .rlen = 16,
26256 },
26257};
26258
26259static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
26260 {
26261 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26262 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26263 .klen = 16,
26264 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26265 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26266 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26267 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26268 .ilen = 32,
26269 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26270 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
26271 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
26272 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
26273 .rlen = 32,
26274 }, {
26275 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26276 "\x35\x35\x35\x35\x35\x35\x35\x35"
26277 "\x35\x35\x35\x35\x35\x35\x35\x35"
26278 "\x35\x35\x35\x35\x35\x35\x35\x35"
26279 "\x35\x35\x35\x35\x35\x35\x35\x35",
26280 .klen = 40,
26281 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
26282 "\x35\x35\x35\x35\x35\x35\x35\x35"
26283 "\x35\x35\x35\x35\x35\x35\x35\x35"
26284 "\x35\x35\x35\x35\x35\x35\x35\x35",
26285 .ilen = 32,
26286 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26287 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
26288 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
26289 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
26290 .rlen = 32,
26291 },
26292};
26293
26294static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
26295 {
26296 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26297 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26298 .klen = 16,
26299 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26300 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
26301 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
26302 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
26303 .ilen = 32,
26304 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26305 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26306 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26307 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26308 .rlen = 32,
26309 }, {
26310 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26311 "\x35\x35\x35\x35\x35\x35\x35\x35"
26312 "\x35\x35\x35\x35\x35\x35\x35\x35"
26313 "\x35\x35\x35\x35\x35\x35\x35\x35"
26314 "\x35\x35\x35\x35\x35\x35\x35\x35",
26315 .klen = 40,
26316 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26317 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
26318 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
26319 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
26320 .ilen = 32,
26321 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
26322 "\x35\x35\x35\x35\x35\x35\x35\x35"
26323 "\x35\x35\x35\x35\x35\x35\x35\x35"
26324 "\x35\x35\x35\x35\x35\x35\x35\x35",
26325 .rlen = 32,
26326 },
26327};
26328
26329/*
26330 * XETA test vectors
26331 */
26332#define XETA_ENC_TEST_VECTORS 4
26333#define XETA_DEC_TEST_VECTORS 4
26334
26335static struct cipher_testvec xeta_enc_tv_template[] = {
26336 {
26337 .key = zeroed_string,
26338 .klen = 16,
26339 .input = zeroed_string,
26340 .ilen = 8,
26341 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
26342 .rlen = 8,
26343 }, {
26344 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26345 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26346 .klen = 16,
26347 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26348 .ilen = 8,
26349 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
26350 .rlen = 8,
26351 }, {
26352 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26353 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26354 .klen = 16,
26355 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26356 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26357 .ilen = 16,
26358 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
26359 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
26360 .rlen = 16,
26361 }, {
26362 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26363 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26364 .klen = 16,
26365 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
26366 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26367 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26368 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26369 .ilen = 32,
26370 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
26371 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
26372 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
26373 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
26374 .rlen = 32,
26375 }
26376};
26377
26378static struct cipher_testvec xeta_dec_tv_template[] = {
26379 {
26380 .key = zeroed_string,
26381 .klen = 16,
26382 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
26383 .ilen = 8,
26384 .result = zeroed_string,
26385 .rlen = 8,
26386 }, {
26387 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26388 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26389 .klen = 16,
26390 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
26391 .ilen = 8,
26392 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26393 .rlen = 8,
26394 }, {
26395 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26396 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26397 .klen = 16,
26398 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
26399 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
26400 .ilen = 16,
26401 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26402 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26403 .rlen = 16,
26404 }, {
26405 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26406 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26407 .klen = 16,
26408 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
26409 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
26410 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
26411 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
26412 .ilen = 32,
26413 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
26414 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26415 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26416 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26417 .rlen = 32,
26418 }
26419};
26420
26421/*
26422 * FCrypt test vectors
26423 */
26424#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
26425#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
26426
26427static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
26428 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
26429 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
26430 .klen = 8,
26431 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26432 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
26433 .ilen = 8,
26434 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
26435 .rlen = 8,
26436 }, {
26437 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
26438 .klen = 8,
26439 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26440 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
26441 .ilen = 8,
26442 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
26443 .rlen = 8,
26444 }, { /* From Arla */
26445 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26446 .klen = 8,
26447 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26448 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
26449 .ilen = 48,
26450 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
26451 "\xee\xac\x98\x62\x44\x51\xe4\x84"
26452 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
26453 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
26454 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
26455 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
26456 .rlen = 48,
26457 }, {
26458 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26459 .klen = 8,
26460 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26461 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
26462 .ilen = 48,
26463 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26464 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26465 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26466 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26467 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26468 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26469 .rlen = 48,
26470 }, { /* split-page version */
26471 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26472 .klen = 8,
26473 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26474 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
26475 .ilen = 48,
26476 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26477 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26478 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26479 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26480 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26481 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26482 .rlen = 48,
26483 .np = 2,
26484 .tap = { 20, 28 },
26485 }
26486};
26487
26488static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
26489 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
26490 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
26491 .klen = 8,
26492 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26493 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
26494 .ilen = 8,
26495 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
26496 .rlen = 8,
26497 }, {
26498 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
26499 .klen = 8,
26500 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26501 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
26502 .ilen = 8,
26503 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
26504 .rlen = 8,
26505 }, { /* From Arla */
26506 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26507 .klen = 8,
26508 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26509 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
26510 "\xee\xac\x98\x62\x44\x51\xe4\x84"
26511 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
26512 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
26513 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
26514 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
26515 .ilen = 48,
26516 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26517 .rlen = 48,
26518 }, {
26519 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26520 .klen = 8,
26521 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26522 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26523 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26524 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26525 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26526 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26527 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26528 .ilen = 48,
26529 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26530 .rlen = 48,
26531 }, { /* split-page version */
26532 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26533 .klen = 8,
26534 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26535 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26536 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26537 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26538 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26539 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26540 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26541 .ilen = 48,
26542 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26543 .rlen = 48,
26544 .np = 2,
26545 .tap = { 20, 28 },
26546 }
26547};
26548
26549/*
26550 * CAMELLIA test vectors.
26551 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026552#define CAMELLIA_ENC_TEST_VECTORS 4
26553#define CAMELLIA_DEC_TEST_VECTORS 4
26554#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
26555#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
26556#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
26557#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
26558#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
26559#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
26560#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
26561#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080026562
26563static struct cipher_testvec camellia_enc_tv_template[] = {
26564 {
26565 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26566 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26567 .klen = 16,
26568 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26569 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26570 .ilen = 16,
26571 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
26572 "\x08\x57\x06\x56\x48\xea\xbe\x43",
26573 .rlen = 16,
26574 }, {
26575 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26576 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
26577 "\x00\x11\x22\x33\x44\x55\x66\x77",
26578 .klen = 24,
26579 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26580 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26581 .ilen = 16,
26582 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
26583 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
26584 .rlen = 16,
26585 }, {
26586 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26587 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
26588 "\x00\x11\x22\x33\x44\x55\x66\x77"
26589 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
26590 .klen = 32,
26591 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26592 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26593 .ilen = 16,
26594 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
26595 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
26596 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026597 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026598 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
26599 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
26600 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
26601 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
26602 .klen = 32,
26603 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26604 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26605 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26606 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26607 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026608 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26609 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26610 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26611 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26612 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26613 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26614 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26615 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26616 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26617 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26618 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26619 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26620 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26621 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26622 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26623 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26624 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26625 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26626 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26627 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26628 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26629 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26630 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26631 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26632 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26633 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26634 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26635 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26636 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26637 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26638 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26639 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26640 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26641 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26642 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26643 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26644 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26645 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26646 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26647 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26648 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26649 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26650 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26651 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26652 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26653 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26654 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26655 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26656 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26657 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26658 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26659 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26660 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26661 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26662 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26663 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026664 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26665 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26666 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26667 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26668 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26669 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26670 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26671 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26672 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26673 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26674 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26675 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26676 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26677 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26678 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26679 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26680 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26681 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26682 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26683 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26684 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26685 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26686 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26687 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26688 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26689 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26690 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26691 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26692 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26693 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26694 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26695 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26696 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26697 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26698 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26699 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26700 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26701 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26702 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26703 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26704 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26705 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26706 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26707 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26708 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26709 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26710 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26711 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26712 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26713 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26714 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26715 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26716 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26717 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26718 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26719 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26720 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26721 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26722 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26723 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26724 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26725 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26726 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26727 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26728 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26729 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026730 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
26731 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
26732 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
26733 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
26734 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026735 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
26736 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
26737 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
26738 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
26739 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
26740 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
26741 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
26742 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
26743 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
26744 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
26745 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
26746 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
26747 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
26748 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
26749 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
26750 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
26751 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
26752 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
26753 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
26754 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
26755 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
26756 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
26757 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
26758 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
26759 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
26760 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
26761 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
26762 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
26763 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
26764 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
26765 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
26766 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
26767 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
26768 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
26769 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
26770 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
26771 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
26772 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
26773 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
26774 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
26775 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
26776 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
26777 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
26778 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
26779 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
26780 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
26781 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
26782 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
26783 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
26784 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
26785 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
26786 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
26787 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
26788 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
26789 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
26790 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026791 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
26792 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
26793 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
26794 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
26795 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
26796 "\xED\x28\x39\xE9\x63\xED\x41\x70"
26797 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
26798 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
26799 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
26800 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
26801 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
26802 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
26803 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
26804 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
26805 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
26806 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
26807 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
26808 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
26809 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
26810 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
26811 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
26812 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
26813 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
26814 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
26815 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
26816 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
26817 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
26818 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
26819 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
26820 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
26821 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
26822 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
26823 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
26824 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
26825 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
26826 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
26827 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
26828 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
26829 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
26830 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
26831 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
26832 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
26833 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
26834 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
26835 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
26836 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
26837 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
26838 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
26839 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
26840 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
26841 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
26842 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
26843 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
26844 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
26845 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
26846 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
26847 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
26848 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
26849 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
26850 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
26851 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
26852 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
26853 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
26854 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
26855 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
26856 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026857 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020026858 .np = 3,
26859 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026860 },
Herbert Xuda7f0332008-07-31 17:08:25 +080026861};
26862
26863static struct cipher_testvec camellia_dec_tv_template[] = {
26864 {
26865 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26866 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26867 .klen = 16,
26868 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
26869 "\x08\x57\x06\x56\x48\xea\xbe\x43",
26870 .ilen = 16,
26871 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26872 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26873 .rlen = 16,
26874 }, {
26875 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26876 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
26877 "\x00\x11\x22\x33\x44\x55\x66\x77",
26878 .klen = 24,
26879 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
26880 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
26881 .ilen = 16,
26882 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26883 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26884 .rlen = 16,
26885 }, {
26886 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26887 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
26888 "\x00\x11\x22\x33\x44\x55\x66\x77"
26889 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
26890 .klen = 32,
26891 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
26892 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
26893 .ilen = 16,
26894 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26895 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26896 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026897 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026898 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
26899 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
26900 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
26901 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
26902 .klen = 32,
26903 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
26904 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
26905 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
26906 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
26907 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026908 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
26909 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
26910 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
26911 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
26912 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
26913 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
26914 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
26915 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
26916 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
26917 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
26918 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
26919 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
26920 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
26921 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
26922 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
26923 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
26924 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
26925 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
26926 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
26927 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
26928 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
26929 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
26930 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
26931 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
26932 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
26933 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
26934 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
26935 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
26936 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
26937 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
26938 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
26939 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
26940 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
26941 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
26942 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
26943 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
26944 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
26945 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
26946 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
26947 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
26948 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
26949 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
26950 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
26951 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
26952 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
26953 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
26954 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
26955 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
26956 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
26957 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
26958 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
26959 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
26960 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
26961 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
26962 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
26963 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026964 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
26965 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
26966 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
26967 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
26968 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
26969 "\xED\x28\x39\xE9\x63\xED\x41\x70"
26970 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
26971 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
26972 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
26973 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
26974 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
26975 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
26976 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
26977 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
26978 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
26979 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
26980 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
26981 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
26982 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
26983 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
26984 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
26985 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
26986 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
26987 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
26988 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
26989 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
26990 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
26991 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
26992 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
26993 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
26994 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
26995 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
26996 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
26997 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
26998 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
26999 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
27000 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
27001 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
27002 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
27003 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
27004 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
27005 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
27006 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
27007 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
27008 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
27009 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
27010 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
27011 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
27012 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
27013 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
27014 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
27015 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
27016 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
27017 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
27018 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
27019 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
27020 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
27021 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
27022 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
27023 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
27024 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
27025 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
27026 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
27027 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
27028 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
27029 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027030 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27031 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27032 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27033 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27034 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027035 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27036 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27037 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27038 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27039 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27040 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27041 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27042 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27043 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27044 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27045 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27046 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27047 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27048 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27049 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27050 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27051 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27052 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27053 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27054 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27055 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27056 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27057 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27058 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27059 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27060 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27061 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27062 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27063 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27064 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27065 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27066 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27067 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27068 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27069 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27070 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27071 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27072 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27073 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27074 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27075 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27076 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27077 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27078 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27079 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27080 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27081 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27082 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27083 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27084 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27085 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27086 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27087 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27088 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27089 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27090 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027091 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27092 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27093 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27094 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27095 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27096 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27097 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27098 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27099 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27100 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27101 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27102 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27103 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27104 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27105 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27106 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27107 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27108 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27109 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27110 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27111 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27112 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27113 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27114 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27115 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27116 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27117 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27118 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27119 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27120 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27121 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27122 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27123 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27124 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27125 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27126 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27127 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27128 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27129 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27130 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27131 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27132 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27133 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27134 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27135 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27136 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27137 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27138 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27139 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27140 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27141 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27142 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27143 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27144 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27145 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27146 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27147 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27148 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27149 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27150 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27151 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27152 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27153 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27154 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27155 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27156 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027157 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027158 .np = 3,
27159 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027160 },
Herbert Xuda7f0332008-07-31 17:08:25 +080027161};
27162
27163static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
27164 {
27165 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
27166 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
27167 .klen = 16,
27168 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
27169 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
27170 .input = "Single block msg",
27171 .ilen = 16,
27172 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
27173 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
27174 .rlen = 16,
27175 }, {
27176 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
27177 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
27178 .klen = 16,
27179 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
27180 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
27181 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
27182 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27183 "\x10\x11\x12\x13\x14\x15\x16\x17"
27184 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
27185 .ilen = 32,
27186 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
27187 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
27188 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
27189 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
27190 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027191 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027192 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27193 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27194 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27195 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27196 .klen = 32,
27197 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27198 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27199 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27200 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27201 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27202 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27203 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027204 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27205 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27206 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27207 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27208 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27209 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27210 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27211 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27212 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27213 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27214 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27215 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27216 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27217 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27218 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27219 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27220 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27221 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27222 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27223 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27224 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27225 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27226 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27227 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27228 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27229 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27230 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27231 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27232 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27233 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27234 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27235 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27236 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27237 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27238 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27239 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27240 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27241 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27242 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27243 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27244 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27245 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27246 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27247 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27248 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27249 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27250 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27251 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27252 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27253 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27254 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27255 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27256 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27257 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27258 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27259 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027260 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27261 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27262 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27263 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27264 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27265 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27266 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27267 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27268 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27269 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27270 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27271 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27272 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27273 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27274 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27275 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27276 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27277 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27278 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27279 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27280 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27281 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27282 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27283 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27284 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27285 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27286 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27287 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27288 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27289 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27290 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27291 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27292 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27293 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27294 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27295 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27296 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27297 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27298 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27299 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27300 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27301 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27302 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27303 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27304 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27305 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27306 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27307 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27308 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27309 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27310 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27311 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27312 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27313 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27314 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27315 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27316 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27317 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27318 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27319 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27320 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27321 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27322 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27323 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27324 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27325 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027326 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
27327 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
27328 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
27329 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
27330 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027331 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
27332 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
27333 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
27334 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
27335 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
27336 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
27337 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
27338 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
27339 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
27340 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
27341 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
27342 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
27343 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
27344 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
27345 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
27346 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
27347 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
27348 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
27349 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
27350 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
27351 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
27352 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
27353 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
27354 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
27355 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
27356 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
27357 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
27358 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
27359 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
27360 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
27361 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
27362 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
27363 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
27364 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
27365 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
27366 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
27367 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
27368 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
27369 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
27370 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
27371 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
27372 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
27373 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
27374 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
27375 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
27376 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
27377 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
27378 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
27379 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
27380 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
27381 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
27382 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
27383 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
27384 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
27385 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
27386 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027387 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
27388 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
27389 "\x21\x41\x56\x72\x13\xE1\x86\x07"
27390 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
27391 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
27392 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
27393 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
27394 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
27395 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
27396 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
27397 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
27398 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
27399 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
27400 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
27401 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
27402 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
27403 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
27404 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
27405 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
27406 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
27407 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
27408 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
27409 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
27410 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
27411 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
27412 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
27413 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
27414 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
27415 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
27416 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
27417 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
27418 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
27419 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
27420 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
27421 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
27422 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
27423 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
27424 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
27425 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
27426 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
27427 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
27428 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
27429 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
27430 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
27431 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
27432 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
27433 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
27434 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
27435 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
27436 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
27437 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
27438 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
27439 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
27440 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
27441 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
27442 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
27443 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
27444 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
27445 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
27446 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
27447 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
27448 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
27449 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
27450 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
27451 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
27452 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027453 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027454 .np = 3,
27455 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027456 },
Herbert Xuda7f0332008-07-31 17:08:25 +080027457};
27458
27459static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
27460 {
27461 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
27462 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
27463 .klen = 16,
27464 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
27465 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
27466 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
27467 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
27468 .ilen = 16,
27469 .result = "Single block msg",
27470 .rlen = 16,
27471 }, {
27472 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
27473 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
27474 .klen = 16,
27475 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
27476 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
27477 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
27478 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
27479 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
27480 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
27481 .ilen = 32,
27482 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
27483 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27484 "\x10\x11\x12\x13\x14\x15\x16\x17"
27485 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
27486 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027487 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027488 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27489 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27490 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27491 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27492 .klen = 32,
27493 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27494 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27495 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
27496 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
27497 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
27498 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
27499 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027500 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
27501 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
27502 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
27503 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
27504 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
27505 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
27506 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
27507 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
27508 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
27509 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
27510 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
27511 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
27512 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
27513 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
27514 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
27515 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
27516 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
27517 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
27518 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
27519 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
27520 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
27521 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
27522 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
27523 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
27524 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
27525 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
27526 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
27527 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
27528 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
27529 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
27530 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
27531 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
27532 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
27533 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
27534 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
27535 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
27536 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
27537 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
27538 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
27539 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
27540 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
27541 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
27542 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
27543 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
27544 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
27545 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
27546 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
27547 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
27548 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
27549 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
27550 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
27551 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
27552 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
27553 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
27554 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
27555 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027556 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
27557 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
27558 "\x21\x41\x56\x72\x13\xE1\x86\x07"
27559 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
27560 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
27561 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
27562 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
27563 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
27564 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
27565 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
27566 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
27567 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
27568 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
27569 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
27570 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
27571 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
27572 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
27573 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
27574 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
27575 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
27576 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
27577 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
27578 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
27579 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
27580 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
27581 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
27582 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
27583 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
27584 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
27585 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
27586 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
27587 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
27588 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
27589 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
27590 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
27591 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
27592 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
27593 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
27594 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
27595 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
27596 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
27597 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
27598 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
27599 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
27600 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
27601 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
27602 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
27603 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
27604 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
27605 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
27606 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
27607 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
27608 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
27609 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
27610 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
27611 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
27612 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
27613 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
27614 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
27615 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
27616 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
27617 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
27618 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
27619 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
27620 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
27621 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027622 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27623 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27624 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27625 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27626 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027627 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27628 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27629 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27630 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27631 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27632 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27633 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27634 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27635 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27636 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27637 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27638 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27639 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27640 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27641 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27642 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27643 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27644 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27645 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27646 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27647 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27648 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27649 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27650 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27651 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27652 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27653 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27654 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27655 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27656 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27657 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27658 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27659 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27660 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27661 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27662 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27663 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27664 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27665 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27666 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27667 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27668 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27669 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27670 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27671 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27672 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27673 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27674 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27675 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27676 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27677 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27678 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27679 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27680 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27681 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27682 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027683 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27684 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27685 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27686 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27687 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27688 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27689 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27690 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27691 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27692 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27693 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27694 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27695 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27696 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27697 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27698 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27699 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27700 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27701 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27702 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27703 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27704 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27705 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27706 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27707 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27708 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27709 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27710 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27711 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27712 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27713 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27714 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27715 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27716 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27717 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27718 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27719 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27720 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27721 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27722 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27723 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27724 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27725 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27726 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27727 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27728 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27729 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27730 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27731 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27732 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27733 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27734 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27735 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27736 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27737 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27738 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27739 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27740 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27741 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27742 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27743 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27744 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27745 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27746 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27747 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27748 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027749 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027750 .np = 3,
27751 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027752 },
27753};
27754
27755static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
27756 { /* Generated with Crypto++ */
27757 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27758 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27759 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27760 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27761 .klen = 32,
27762 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27763 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27764 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27765 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27766 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27767 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27768 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027769 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27770 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27771 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27772 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27773 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27774 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27775 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27776 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27777 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27778 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27779 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27780 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27781 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27782 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27783 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27784 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27785 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27786 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27787 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27788 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27789 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27790 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27791 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27792 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27793 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27794 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27795 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27796 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27797 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27798 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27799 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27800 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27801 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27802 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27803 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27804 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27805 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27806 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27807 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27808 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27809 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27810 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27811 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27812 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27813 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27814 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27815 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27816 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27817 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27818 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27819 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27820 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27821 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27822 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27823 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27824 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27825 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
27826 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027827 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
27828 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
27829 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
27830 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
27831 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027832 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
27833 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
27834 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
27835 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
27836 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
27837 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
27838 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
27839 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
27840 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
27841 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
27842 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
27843 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
27844 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
27845 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
27846 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
27847 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
27848 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
27849 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
27850 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
27851 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
27852 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
27853 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
27854 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
27855 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
27856 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
27857 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
27858 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
27859 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
27860 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
27861 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
27862 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
27863 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
27864 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
27865 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
27866 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
27867 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
27868 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
27869 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
27870 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
27871 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
27872 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
27873 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
27874 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
27875 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
27876 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
27877 "\x76\x44\x45\xF3\x24\x11\x57\x98"
27878 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
27879 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
27880 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
27881 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
27882 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
27883 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
27884 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
27885 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
27886 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
27887 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
27888 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
27889 .rlen = 496,
27890 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027891 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27892 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27893 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27894 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27895 .klen = 32,
27896 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27897 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27898 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27899 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27900 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27901 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27902 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27903 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027904 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27905 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27906 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27907 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27908 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27909 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27910 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27911 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27912 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27913 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27914 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27915 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27916 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27917 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27918 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27919 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27920 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27921 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27922 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27923 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27924 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27925 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27926 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27927 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27928 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27929 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27930 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27931 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27932 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27933 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27934 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27935 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27936 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27937 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27938 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27939 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27940 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27941 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27942 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27943 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27944 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27945 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27946 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27947 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27948 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27949 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27950 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27951 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27952 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27953 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27954 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27955 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27956 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27957 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27958 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27959 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027960 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27961 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27962 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27963 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27964 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27965 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27966 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27967 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27968 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27969 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27970 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27971 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27972 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27973 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27974 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27975 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27976 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27977 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27978 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27979 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27980 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27981 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27982 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27983 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27984 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27985 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27986 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27987 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27988 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27989 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27990 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27991 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27992 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27993 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27994 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27995 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27996 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27997 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27998 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27999 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28000 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28001 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28002 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28003 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28004 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28005 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28006 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28007 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28008 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28009 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28010 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28011 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28012 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28013 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28014 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28015 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28016 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28017 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28018 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28019 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28020 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28021 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28022 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28023 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
28024 "\xE4\x7B\x12",
28025 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028026 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28027 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28028 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28029 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28030 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
28031 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028032 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28033 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28034 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28035 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28036 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28037 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28038 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28039 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28040 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28041 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28042 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28043 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28044 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28045 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28046 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28047 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28048 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28049 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28050 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28051 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28052 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28053 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28054 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28055 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28056 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28057 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28058 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28059 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28060 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28061 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28062 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28063 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28064 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28065 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28066 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28067 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28068 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28069 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28070 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28071 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28072 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28073 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28074 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28075 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28076 "\x76\x44\x45\xF3\x24\x11\x57\x98"
28077 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28078 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28079 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28080 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28081 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28082 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28083 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28084 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28085 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28086 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28087 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028088 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
28089 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
28090 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
28091 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
28092 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
28093 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
28094 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
28095 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
28096 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
28097 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
28098 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
28099 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
28100 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
28101 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
28102 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
28103 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
28104 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
28105 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
28106 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
28107 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
28108 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
28109 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
28110 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
28111 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
28112 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
28113 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
28114 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
28115 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
28116 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
28117 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
28118 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
28119 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
28120 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
28121 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
28122 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
28123 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
28124 "\x00\x70\x12\x56\x56\x50\xAD\x14"
28125 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
28126 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
28127 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
28128 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
28129 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
28130 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
28131 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
28132 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
28133 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
28134 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
28135 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
28136 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
28137 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
28138 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
28139 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
28140 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
28141 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
28142 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
28143 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
28144 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
28145 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
28146 "\x74\x28\x9D\x05\x30\x20\x62\x41"
28147 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
28148 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
28149 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
28150 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
28151 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
28152 "\xF1\x6B\xD9",
28153 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028154 .also_non_np = 1,
28155 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028156 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030028157 }, { /* Generated with Crypto++ */
28158 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28159 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28160 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28161 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28162 .klen = 32,
28163 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
28164 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
28165 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28166 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28167 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28168 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28169 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28170 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28171 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28172 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28173 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28174 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28175 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28176 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28177 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28178 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28179 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28180 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28181 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28182 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28183 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28184 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28185 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28186 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28187 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28188 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28189 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28190 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28191 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28192 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28193 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28194 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28195 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28196 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28197 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28198 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28199 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28200 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28201 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28202 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28203 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28204 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28205 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28206 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28207 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28208 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28209 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28210 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28211 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28212 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28213 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28214 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28215 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28216 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28217 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28218 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28219 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28220 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28221 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28222 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28223 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28224 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28225 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028226 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
28227 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28228 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28229 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28230 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28231 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28232 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28233 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28234 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28235 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28236 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28237 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28238 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28239 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28240 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28241 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28242 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28243 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28244 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28245 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28246 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28247 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28248 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28249 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28250 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28251 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28252 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28253 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28254 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28255 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28256 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28257 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28258 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28259 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28260 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28261 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
28262 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
28263 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
28264 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
28265 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
28266 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28267 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28268 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28269 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28270 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28271 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28272 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28273 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28274 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28275 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28276 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28277 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28278 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28279 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28280 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28281 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28282 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28283 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28284 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28285 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28286 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28287 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28288 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28289 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28290 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
28291 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030028292 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
28293 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
28294 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
28295 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
28296 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
28297 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
28298 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
28299 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
28300 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
28301 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
28302 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
28303 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
28304 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
28305 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
28306 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
28307 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
28308 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
28309 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
28310 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
28311 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
28312 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
28313 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
28314 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
28315 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
28316 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
28317 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
28318 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
28319 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
28320 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
28321 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
28322 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
28323 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
28324 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
28325 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
28326 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
28327 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
28328 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
28329 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
28330 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
28331 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
28332 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
28333 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
28334 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
28335 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
28336 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
28337 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
28338 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
28339 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
28340 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
28341 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
28342 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
28343 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
28344 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
28345 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
28346 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
28347 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
28348 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
28349 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
28350 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
28351 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
28352 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028353 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
28354 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
28355 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
28356 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
28357 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
28358 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
28359 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
28360 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
28361 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
28362 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
28363 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
28364 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
28365 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
28366 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
28367 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
28368 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
28369 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
28370 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
28371 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
28372 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
28373 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
28374 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
28375 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
28376 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
28377 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
28378 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
28379 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
28380 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
28381 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
28382 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
28383 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
28384 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
28385 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
28386 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
28387 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
28388 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
28389 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
28390 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
28391 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
28392 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
28393 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
28394 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
28395 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
28396 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
28397 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
28398 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
28399 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
28400 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
28401 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
28402 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
28403 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
28404 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
28405 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
28406 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
28407 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
28408 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
28409 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
28410 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
28411 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
28412 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
28413 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
28414 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
28415 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
28416 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
28417 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
28418 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028419 },
28420};
28421
28422static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
28423 { /* Generated with Crypto++ */
28424 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28425 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28426 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28427 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28428 .klen = 32,
28429 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
28430 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
28431 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28432 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28433 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28434 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28435 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028436 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
28437 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28438 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28439 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28440 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28441 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28442 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28443 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28444 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28445 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28446 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28447 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28448 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28449 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28450 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28451 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28452 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28453 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28454 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28455 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28456 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28457 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28458 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28459 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28460 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28461 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28462 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28463 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28464 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28465 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28466 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28467 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28468 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28469 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28470 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28471 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28472 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28473 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28474 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28475 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28476 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28477 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28478 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28479 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28480 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28481 "\x76\x44\x45\xF3\x24\x11\x57\x98"
28482 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28483 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28484 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28485 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28486 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28487 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28488 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28489 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28490 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28491 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28492 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
28493 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028494 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28495 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28496 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28497 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28498 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028499 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28500 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28501 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28502 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28503 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28504 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28505 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28506 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28507 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28508 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28509 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28510 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28511 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28512 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28513 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28514 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28515 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28516 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28517 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28518 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28519 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28520 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28521 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28522 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28523 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28524 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28525 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28526 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28527 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28528 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28529 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28530 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28531 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28532 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28533 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28534 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28535 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28536 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28537 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28538 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28539 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28540 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28541 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28542 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28543 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28544 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28545 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28546 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28547 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28548 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28549 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28550 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28551 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28552 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28553 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28554 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28555 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
28556 .rlen = 496,
28557 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020028558 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28559 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28560 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28561 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28562 .klen = 32,
28563 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
28564 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
28565 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28566 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28567 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28568 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28569 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
28570 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028571 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28572 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28573 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28574 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28575 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28576 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28577 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28578 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28579 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28580 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28581 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28582 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28583 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28584 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28585 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28586 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28587 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28588 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28589 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28590 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28591 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28592 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28593 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28594 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28595 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28596 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28597 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28598 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28599 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28600 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28601 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28602 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28603 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28604 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28605 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28606 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28607 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28608 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28609 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28610 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28611 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28612 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28613 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28614 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28615 "\x76\x44\x45\xF3\x24\x11\x57\x98"
28616 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28617 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28618 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28619 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28620 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28621 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28622 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28623 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28624 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28625 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28626 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028627 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
28628 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
28629 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
28630 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
28631 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
28632 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
28633 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
28634 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
28635 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
28636 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
28637 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
28638 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
28639 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
28640 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
28641 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
28642 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
28643 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
28644 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
28645 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
28646 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
28647 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
28648 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
28649 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
28650 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
28651 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
28652 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
28653 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
28654 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
28655 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
28656 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
28657 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
28658 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
28659 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
28660 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
28661 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
28662 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
28663 "\x00\x70\x12\x56\x56\x50\xAD\x14"
28664 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
28665 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
28666 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
28667 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
28668 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
28669 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
28670 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
28671 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
28672 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
28673 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
28674 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
28675 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
28676 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
28677 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
28678 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
28679 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
28680 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
28681 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
28682 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
28683 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
28684 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
28685 "\x74\x28\x9D\x05\x30\x20\x62\x41"
28686 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
28687 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
28688 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
28689 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
28690 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
28691 "\xF1\x6B\xD9",
28692 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028693 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28694 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28695 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28696 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28697 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28698 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028699 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28700 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28701 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28702 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28703 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28704 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28705 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28706 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28707 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28708 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28709 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28710 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28711 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28712 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28713 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28714 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28715 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28716 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28717 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28718 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28719 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28720 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28721 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28722 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28723 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28724 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28725 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28726 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28727 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28728 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28729 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28730 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28731 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28732 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28733 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28734 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28735 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28736 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28737 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28738 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28739 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28740 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28741 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28742 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28743 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28744 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28745 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28746 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28747 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28748 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28749 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28750 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28751 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28752 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28753 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28754 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028755 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28756 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28757 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28758 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28759 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28760 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28761 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28762 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28763 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28764 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28765 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28766 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28767 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28768 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28769 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28770 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28771 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28772 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28773 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28774 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28775 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28776 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28777 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28778 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28779 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28780 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28781 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28782 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28783 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28784 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28785 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28786 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28787 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28788 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28789 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
28790 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
28791 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
28792 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
28793 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
28794 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28795 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28796 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28797 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28798 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28799 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28800 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28801 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28802 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28803 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28804 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28805 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28806 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28807 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28808 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28809 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28810 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28811 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28812 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28813 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28814 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28815 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28816 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28817 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28818 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
28819 "\xE4\x7B\x12",
28820 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028821 .also_non_np = 1,
28822 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028823 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030028824 }, { /* Generated with Crypto++ */
28825 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28826 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28827 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28828 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28829 .klen = 32,
28830 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
28831 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
28832 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
28833 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
28834 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
28835 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
28836 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
28837 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
28838 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
28839 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
28840 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
28841 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
28842 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
28843 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
28844 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
28845 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
28846 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
28847 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
28848 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
28849 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
28850 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
28851 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
28852 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
28853 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
28854 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
28855 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
28856 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
28857 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
28858 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
28859 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
28860 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
28861 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
28862 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
28863 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
28864 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
28865 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
28866 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
28867 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
28868 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
28869 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
28870 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
28871 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
28872 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
28873 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
28874 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
28875 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
28876 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
28877 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
28878 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
28879 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
28880 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
28881 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
28882 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
28883 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
28884 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
28885 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
28886 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
28887 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
28888 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
28889 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
28890 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
28891 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
28892 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028893 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
28894 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
28895 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
28896 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
28897 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
28898 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
28899 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
28900 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
28901 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
28902 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
28903 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
28904 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
28905 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
28906 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
28907 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
28908 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
28909 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
28910 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
28911 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
28912 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
28913 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
28914 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
28915 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
28916 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
28917 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
28918 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
28919 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
28920 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
28921 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
28922 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
28923 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
28924 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
28925 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
28926 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
28927 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
28928 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
28929 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
28930 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
28931 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
28932 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
28933 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
28934 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
28935 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
28936 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
28937 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
28938 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
28939 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
28940 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
28941 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
28942 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
28943 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
28944 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
28945 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
28946 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
28947 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
28948 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
28949 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
28950 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
28951 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
28952 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
28953 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
28954 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
28955 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
28956 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
28957 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
28958 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030028959 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28960 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28961 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28962 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28963 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28964 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28965 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28966 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28967 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28968 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28969 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28970 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28971 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28972 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28973 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28974 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28975 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28976 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28977 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28978 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28979 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28980 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28981 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28982 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28983 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28984 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28985 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28986 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28987 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28988 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28989 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28990 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28991 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28992 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28993 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28994 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28995 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28996 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28997 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28998 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28999 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
29000 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
29001 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
29002 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
29003 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
29004 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
29005 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
29006 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
29007 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
29008 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
29009 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
29010 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
29011 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
29012 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
29013 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
29014 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
29015 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
29016 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
29017 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
29018 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
29019 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030029020 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
29021 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
29022 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
29023 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
29024 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
29025 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
29026 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
29027 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
29028 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
29029 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
29030 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
29031 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
29032 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
29033 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
29034 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
29035 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
29036 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
29037 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
29038 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
29039 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
29040 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
29041 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
29042 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
29043 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
29044 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
29045 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
29046 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
29047 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
29048 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
29049 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
29050 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
29051 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
29052 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
29053 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
29054 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
29055 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
29056 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
29057 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
29058 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
29059 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
29060 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
29061 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
29062 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
29063 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
29064 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
29065 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
29066 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
29067 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
29068 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
29069 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
29070 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
29071 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
29072 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
29073 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
29074 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
29075 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
29076 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
29077 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
29078 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
29079 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
29080 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
29081 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
29082 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
29083 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
29084 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
29085 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020029086 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020029087};
29088
29089static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
29090 /* Generated from AES-LRW test vectors */
29091 {
29092 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
29093 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
29094 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
29095 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
29096 .klen = 32,
29097 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29098 "\x00\x00\x00\x00\x00\x00\x00\x01",
29099 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29100 "\x38\x39\x41\x42\x43\x44\x45\x46",
29101 .ilen = 16,
29102 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
29103 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
29104 .rlen = 16,
29105 }, {
29106 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
29107 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
29108 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
29109 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
29110 .klen = 32,
29111 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29112 "\x00\x00\x00\x00\x00\x00\x00\x02",
29113 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29114 "\x38\x39\x41\x42\x43\x44\x45\x46",
29115 .ilen = 16,
29116 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
29117 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
29118 .rlen = 16,
29119 }, {
29120 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
29121 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
29122 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
29123 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
29124 .klen = 32,
29125 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29126 "\x00\x00\x00\x02\x00\x00\x00\x00",
29127 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29128 "\x38\x39\x41\x42\x43\x44\x45\x46",
29129 .ilen = 16,
29130 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
29131 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
29132 .rlen = 16,
29133 }, {
29134 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
29135 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
29136 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
29137 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
29138 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
29139 .klen = 40,
29140 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29141 "\x00\x00\x00\x00\x00\x00\x00\x01",
29142 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29143 "\x38\x39\x41\x42\x43\x44\x45\x46",
29144 .ilen = 16,
29145 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
29146 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
29147 .rlen = 16,
29148 }, {
29149 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
29150 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
29151 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
29152 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
29153 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
29154 .klen = 40,
29155 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29156 "\x00\x00\x00\x02\x00\x00\x00\x00",
29157 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29158 "\x38\x39\x41\x42\x43\x44\x45\x46",
29159 .ilen = 16,
29160 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
29161 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
29162 .rlen = 16,
29163 }, {
29164 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29165 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29166 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29167 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29168 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29169 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29170 .klen = 48,
29171 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29172 "\x00\x00\x00\x00\x00\x00\x00\x01",
29173 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29174 "\x38\x39\x41\x42\x43\x44\x45\x46",
29175 .ilen = 16,
29176 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
29177 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
29178 .rlen = 16,
29179 }, {
29180 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
29181 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
29182 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
29183 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
29184 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
29185 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
29186 .klen = 48,
29187 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29188 "\x00\x00\x00\x02\x00\x00\x00\x00",
29189 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29190 "\x38\x39\x41\x42\x43\x44\x45\x46",
29191 .ilen = 16,
29192 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
29193 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
29194 .rlen = 16,
29195 }, {
29196 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29197 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29198 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29199 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29200 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29201 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29202 .klen = 48,
29203 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29204 "\x00\x00\x00\x00\x00\x00\x00\x01",
29205 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
29206 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
29207 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
29208 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
29209 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
29210 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
29211 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
29212 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
29213 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
29214 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
29215 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
29216 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
29217 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
29218 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
29219 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
29220 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
29221 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
29222 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
29223 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
29224 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
29225 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
29226 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
29227 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
29228 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
29229 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
29230 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
29231 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
29232 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
29233 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
29234 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
29235 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
29236 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
29237 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
29238 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
29239 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
29240 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
29241 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
29242 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
29243 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
29244 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
29245 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
29246 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
29247 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
29248 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
29249 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
29250 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
29251 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
29252 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
29253 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
29254 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
29255 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
29256 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
29257 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
29258 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
29259 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
29260 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
29261 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
29262 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
29263 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
29264 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
29265 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
29266 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
29267 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
29268 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
29269 .ilen = 512,
29270 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
29271 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
29272 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
29273 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
29274 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
29275 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
29276 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
29277 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
29278 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
29279 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
29280 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
29281 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
29282 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
29283 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
29284 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
29285 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
29286 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
29287 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
29288 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
29289 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
29290 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
29291 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
29292 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
29293 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
29294 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
29295 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
29296 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
29297 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
29298 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
29299 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
29300 "\xed\x14\xa9\x57\x19\x63\x40\x04"
29301 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
29302 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
29303 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
29304 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
29305 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
29306 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
29307 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
29308 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
29309 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
29310 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
29311 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
29312 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
29313 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
29314 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
29315 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
29316 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
29317 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
29318 "\x35\xa5\x83\x04\x84\x01\x99\x56"
29319 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
29320 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
29321 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
29322 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
29323 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
29324 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
29325 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
29326 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
29327 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
29328 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
29329 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
29330 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
29331 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
29332 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
29333 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
29334 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030029335 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020029336 .np = 3,
29337 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020029338 },
29339};
29340
29341static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
29342 /* Generated from AES-LRW test vectors */
29343 /* same as enc vectors with input and result reversed */
29344 {
29345 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
29346 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
29347 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
29348 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
29349 .klen = 32,
29350 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29351 "\x00\x00\x00\x00\x00\x00\x00\x01",
29352 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
29353 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
29354 .ilen = 16,
29355 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29356 "\x38\x39\x41\x42\x43\x44\x45\x46",
29357 .rlen = 16,
29358 }, {
29359 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
29360 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
29361 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
29362 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
29363 .klen = 32,
29364 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29365 "\x00\x00\x00\x00\x00\x00\x00\x02",
29366 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
29367 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
29368 .ilen = 16,
29369 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29370 "\x38\x39\x41\x42\x43\x44\x45\x46",
29371 .rlen = 16,
29372 }, {
29373 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
29374 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
29375 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
29376 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
29377 .klen = 32,
29378 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29379 "\x00\x00\x00\x02\x00\x00\x00\x00",
29380 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
29381 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
29382 .ilen = 16,
29383 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29384 "\x38\x39\x41\x42\x43\x44\x45\x46",
29385 .rlen = 16,
29386 }, {
29387 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
29388 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
29389 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
29390 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
29391 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
29392 .klen = 40,
29393 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29394 "\x00\x00\x00\x00\x00\x00\x00\x01",
29395 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
29396 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
29397 .ilen = 16,
29398 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29399 "\x38\x39\x41\x42\x43\x44\x45\x46",
29400 .rlen = 16,
29401 }, {
29402 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
29403 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
29404 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
29405 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
29406 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
29407 .klen = 40,
29408 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29409 "\x00\x00\x00\x02\x00\x00\x00\x00",
29410 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
29411 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
29412 .ilen = 16,
29413 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29414 "\x38\x39\x41\x42\x43\x44\x45\x46",
29415 .rlen = 16,
29416 }, {
29417 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29418 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29419 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29420 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29421 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29422 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29423 .klen = 48,
29424 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29425 "\x00\x00\x00\x00\x00\x00\x00\x01",
29426 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
29427 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
29428 .ilen = 16,
29429 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29430 "\x38\x39\x41\x42\x43\x44\x45\x46",
29431 .rlen = 16,
29432 }, {
29433 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
29434 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
29435 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
29436 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
29437 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
29438 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
29439 .klen = 48,
29440 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29441 "\x00\x00\x00\x02\x00\x00\x00\x00",
29442 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
29443 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
29444 .ilen = 16,
29445 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29446 "\x38\x39\x41\x42\x43\x44\x45\x46",
29447 .rlen = 16,
29448 }, {
29449 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29450 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29451 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29452 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29453 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29454 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29455 .klen = 48,
29456 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29457 "\x00\x00\x00\x00\x00\x00\x00\x01",
29458 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
29459 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
29460 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
29461 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
29462 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
29463 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
29464 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
29465 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
29466 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
29467 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
29468 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
29469 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
29470 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
29471 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
29472 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
29473 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
29474 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
29475 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
29476 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
29477 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
29478 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
29479 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
29480 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
29481 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
29482 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
29483 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
29484 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
29485 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
29486 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
29487 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
29488 "\xed\x14\xa9\x57\x19\x63\x40\x04"
29489 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
29490 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
29491 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
29492 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
29493 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
29494 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
29495 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
29496 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
29497 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
29498 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
29499 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
29500 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
29501 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
29502 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
29503 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
29504 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
29505 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
29506 "\x35\xa5\x83\x04\x84\x01\x99\x56"
29507 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
29508 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
29509 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
29510 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
29511 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
29512 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
29513 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
29514 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
29515 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
29516 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
29517 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
29518 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
29519 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
29520 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
29521 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
29522 .ilen = 512,
29523 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
29524 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
29525 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
29526 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
29527 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
29528 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
29529 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
29530 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
29531 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
29532 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
29533 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
29534 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
29535 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
29536 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
29537 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
29538 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
29539 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
29540 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
29541 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
29542 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
29543 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
29544 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
29545 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
29546 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
29547 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
29548 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
29549 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
29550 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
29551 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
29552 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
29553 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
29554 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
29555 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
29556 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
29557 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
29558 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
29559 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
29560 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
29561 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
29562 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
29563 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
29564 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
29565 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
29566 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
29567 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
29568 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
29569 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
29570 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
29571 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
29572 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
29573 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
29574 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
29575 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
29576 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
29577 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
29578 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
29579 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
29580 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
29581 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
29582 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
29583 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
29584 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
29585 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
29586 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
29587 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030029588 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020029589 .np = 3,
29590 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020029591 },
29592};
29593
29594static struct cipher_testvec camellia_xts_enc_tv_template[] = {
29595 /* Generated from AES-XTS test vectors */
29596 {
29597 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29598 "\x00\x00\x00\x00\x00\x00\x00\x00"
29599 "\x00\x00\x00\x00\x00\x00\x00\x00"
29600 "\x00\x00\x00\x00\x00\x00\x00\x00",
29601 .klen = 32,
29602 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29603 "\x00\x00\x00\x00\x00\x00\x00\x00",
29604 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29605 "\x00\x00\x00\x00\x00\x00\x00\x00"
29606 "\x00\x00\x00\x00\x00\x00\x00\x00"
29607 "\x00\x00\x00\x00\x00\x00\x00\x00",
29608 .ilen = 32,
29609 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
29610 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
29611 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
29612 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
29613 .rlen = 32,
29614 }, {
29615 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
29616 "\x11\x11\x11\x11\x11\x11\x11\x11"
29617 "\x22\x22\x22\x22\x22\x22\x22\x22"
29618 "\x22\x22\x22\x22\x22\x22\x22\x22",
29619 .klen = 32,
29620 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
29621 "\x00\x00\x00\x00\x00\x00\x00\x00",
29622 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
29623 "\x44\x44\x44\x44\x44\x44\x44\x44"
29624 "\x44\x44\x44\x44\x44\x44\x44\x44"
29625 "\x44\x44\x44\x44\x44\x44\x44\x44",
29626 .ilen = 32,
29627 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
29628 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
29629 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
29630 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
29631 .rlen = 32,
29632 }, {
29633 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
29634 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
29635 "\x22\x22\x22\x22\x22\x22\x22\x22"
29636 "\x22\x22\x22\x22\x22\x22\x22\x22",
29637 .klen = 32,
29638 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
29639 "\x00\x00\x00\x00\x00\x00\x00\x00",
29640 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
29641 "\x44\x44\x44\x44\x44\x44\x44\x44"
29642 "\x44\x44\x44\x44\x44\x44\x44\x44"
29643 "\x44\x44\x44\x44\x44\x44\x44\x44",
29644 .ilen = 32,
29645 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
29646 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
29647 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
29648 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
29649 .rlen = 32,
29650 }, {
29651 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
29652 "\x23\x53\x60\x28\x74\x71\x35\x26"
29653 "\x31\x41\x59\x26\x53\x58\x97\x93"
29654 "\x23\x84\x62\x64\x33\x83\x27\x95",
29655 .klen = 32,
29656 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29657 "\x00\x00\x00\x00\x00\x00\x00\x00",
29658 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
29659 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29660 "\x10\x11\x12\x13\x14\x15\x16\x17"
29661 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29662 "\x20\x21\x22\x23\x24\x25\x26\x27"
29663 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29664 "\x30\x31\x32\x33\x34\x35\x36\x37"
29665 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29666 "\x40\x41\x42\x43\x44\x45\x46\x47"
29667 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29668 "\x50\x51\x52\x53\x54\x55\x56\x57"
29669 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29670 "\x60\x61\x62\x63\x64\x65\x66\x67"
29671 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29672 "\x70\x71\x72\x73\x74\x75\x76\x77"
29673 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29674 "\x80\x81\x82\x83\x84\x85\x86\x87"
29675 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29676 "\x90\x91\x92\x93\x94\x95\x96\x97"
29677 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29678 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29679 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29680 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29681 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29682 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29683 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29684 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29685 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29686 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29687 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29688 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29689 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
29690 "\x00\x01\x02\x03\x04\x05\x06\x07"
29691 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29692 "\x10\x11\x12\x13\x14\x15\x16\x17"
29693 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29694 "\x20\x21\x22\x23\x24\x25\x26\x27"
29695 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29696 "\x30\x31\x32\x33\x34\x35\x36\x37"
29697 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29698 "\x40\x41\x42\x43\x44\x45\x46\x47"
29699 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29700 "\x50\x51\x52\x53\x54\x55\x56\x57"
29701 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29702 "\x60\x61\x62\x63\x64\x65\x66\x67"
29703 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29704 "\x70\x71\x72\x73\x74\x75\x76\x77"
29705 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29706 "\x80\x81\x82\x83\x84\x85\x86\x87"
29707 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29708 "\x90\x91\x92\x93\x94\x95\x96\x97"
29709 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29710 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29711 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29712 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29713 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29714 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29715 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29716 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29717 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29718 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29719 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29720 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29721 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
29722 .ilen = 512,
29723 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
29724 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
29725 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
29726 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
29727 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
29728 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
29729 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
29730 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
29731 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
29732 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
29733 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
29734 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
29735 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
29736 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
29737 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
29738 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
29739 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
29740 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
29741 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
29742 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
29743 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
29744 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
29745 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
29746 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
29747 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
29748 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
29749 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
29750 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
29751 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
29752 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
29753 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
29754 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
29755 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
29756 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
29757 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
29758 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
29759 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
29760 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
29761 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
29762 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
29763 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
29764 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
29765 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
29766 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
29767 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
29768 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
29769 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
29770 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
29771 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
29772 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
29773 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
29774 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
29775 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
29776 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
29777 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
29778 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
29779 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
29780 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
29781 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
29782 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
29783 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
29784 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
29785 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
29786 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
29787 .rlen = 512,
29788 }, {
29789 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
29790 "\x23\x53\x60\x28\x74\x71\x35\x26"
29791 "\x62\x49\x77\x57\x24\x70\x93\x69"
29792 "\x99\x59\x57\x49\x66\x96\x76\x27"
29793 "\x31\x41\x59\x26\x53\x58\x97\x93"
29794 "\x23\x84\x62\x64\x33\x83\x27\x95"
29795 "\x02\x88\x41\x97\x16\x93\x99\x37"
29796 "\x51\x05\x82\x09\x74\x94\x45\x92",
29797 .klen = 64,
29798 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
29799 "\x00\x00\x00\x00\x00\x00\x00\x00",
29800 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
29801 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29802 "\x10\x11\x12\x13\x14\x15\x16\x17"
29803 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29804 "\x20\x21\x22\x23\x24\x25\x26\x27"
29805 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29806 "\x30\x31\x32\x33\x34\x35\x36\x37"
29807 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29808 "\x40\x41\x42\x43\x44\x45\x46\x47"
29809 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29810 "\x50\x51\x52\x53\x54\x55\x56\x57"
29811 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29812 "\x60\x61\x62\x63\x64\x65\x66\x67"
29813 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29814 "\x70\x71\x72\x73\x74\x75\x76\x77"
29815 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29816 "\x80\x81\x82\x83\x84\x85\x86\x87"
29817 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29818 "\x90\x91\x92\x93\x94\x95\x96\x97"
29819 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29820 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29821 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29822 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29823 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29824 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29825 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29826 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29827 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29828 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29829 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29830 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29831 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
29832 "\x00\x01\x02\x03\x04\x05\x06\x07"
29833 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29834 "\x10\x11\x12\x13\x14\x15\x16\x17"
29835 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29836 "\x20\x21\x22\x23\x24\x25\x26\x27"
29837 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29838 "\x30\x31\x32\x33\x34\x35\x36\x37"
29839 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29840 "\x40\x41\x42\x43\x44\x45\x46\x47"
29841 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29842 "\x50\x51\x52\x53\x54\x55\x56\x57"
29843 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29844 "\x60\x61\x62\x63\x64\x65\x66\x67"
29845 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29846 "\x70\x71\x72\x73\x74\x75\x76\x77"
29847 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29848 "\x80\x81\x82\x83\x84\x85\x86\x87"
29849 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29850 "\x90\x91\x92\x93\x94\x95\x96\x97"
29851 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29852 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29853 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29854 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29855 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29856 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29857 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29858 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29859 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29860 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29861 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29862 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29863 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
29864 .ilen = 512,
29865 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
29866 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
29867 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
29868 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
29869 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
29870 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
29871 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
29872 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
29873 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
29874 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
29875 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
29876 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
29877 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
29878 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
29879 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
29880 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
29881 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
29882 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
29883 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
29884 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
29885 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
29886 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
29887 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
29888 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
29889 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
29890 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
29891 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
29892 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
29893 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
29894 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
29895 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
29896 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
29897 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
29898 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
29899 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
29900 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
29901 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
29902 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
29903 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
29904 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
29905 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
29906 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
29907 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
29908 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
29909 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
29910 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
29911 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
29912 "\x21\x17\xf8\x59\x15\x24\x64\x22"
29913 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
29914 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
29915 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
29916 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
29917 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
29918 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
29919 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
29920 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
29921 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
29922 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
29923 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
29924 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
29925 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
29926 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
29927 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
29928 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
29929 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030029930 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020029931 .np = 3,
29932 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020029933 },
29934};
29935
29936static struct cipher_testvec camellia_xts_dec_tv_template[] = {
29937 /* Generated from AES-XTS test vectors */
29938 /* same as enc vectors with input and result reversed */
29939 {
29940 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29941 "\x00\x00\x00\x00\x00\x00\x00\x00"
29942 "\x00\x00\x00\x00\x00\x00\x00\x00"
29943 "\x00\x00\x00\x00\x00\x00\x00\x00",
29944 .klen = 32,
29945 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29946 "\x00\x00\x00\x00\x00\x00\x00\x00",
29947 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
29948 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
29949 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
29950 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
29951 .ilen = 32,
29952 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
29953 "\x00\x00\x00\x00\x00\x00\x00\x00"
29954 "\x00\x00\x00\x00\x00\x00\x00\x00"
29955 "\x00\x00\x00\x00\x00\x00\x00\x00",
29956 .rlen = 32,
29957 }, {
29958 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
29959 "\x11\x11\x11\x11\x11\x11\x11\x11"
29960 "\x22\x22\x22\x22\x22\x22\x22\x22"
29961 "\x22\x22\x22\x22\x22\x22\x22\x22",
29962 .klen = 32,
29963 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
29964 "\x00\x00\x00\x00\x00\x00\x00\x00",
29965 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
29966 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
29967 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
29968 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
29969 .ilen = 32,
29970 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
29971 "\x44\x44\x44\x44\x44\x44\x44\x44"
29972 "\x44\x44\x44\x44\x44\x44\x44\x44"
29973 "\x44\x44\x44\x44\x44\x44\x44\x44",
29974 .rlen = 32,
29975 }, {
29976 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
29977 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
29978 "\x22\x22\x22\x22\x22\x22\x22\x22"
29979 "\x22\x22\x22\x22\x22\x22\x22\x22",
29980 .klen = 32,
29981 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
29982 "\x00\x00\x00\x00\x00\x00\x00\x00",
29983 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
29984 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
29985 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
29986 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
29987 .ilen = 32,
29988 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
29989 "\x44\x44\x44\x44\x44\x44\x44\x44"
29990 "\x44\x44\x44\x44\x44\x44\x44\x44"
29991 "\x44\x44\x44\x44\x44\x44\x44\x44",
29992 .rlen = 32,
29993 }, {
29994 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
29995 "\x23\x53\x60\x28\x74\x71\x35\x26"
29996 "\x31\x41\x59\x26\x53\x58\x97\x93"
29997 "\x23\x84\x62\x64\x33\x83\x27\x95",
29998 .klen = 32,
29999 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30000 "\x00\x00\x00\x00\x00\x00\x00\x00",
30001 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
30002 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
30003 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
30004 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
30005 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
30006 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
30007 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
30008 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
30009 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
30010 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
30011 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
30012 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
30013 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
30014 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
30015 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
30016 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
30017 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
30018 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
30019 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
30020 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
30021 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
30022 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
30023 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
30024 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
30025 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
30026 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
30027 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
30028 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
30029 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
30030 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
30031 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
30032 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
30033 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
30034 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
30035 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
30036 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
30037 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
30038 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
30039 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
30040 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
30041 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
30042 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
30043 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
30044 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
30045 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
30046 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
30047 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
30048 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
30049 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
30050 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
30051 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
30052 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
30053 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
30054 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
30055 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
30056 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
30057 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
30058 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
30059 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
30060 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
30061 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
30062 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
30063 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
30064 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
30065 .ilen = 512,
30066 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30067 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30068 "\x10\x11\x12\x13\x14\x15\x16\x17"
30069 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30070 "\x20\x21\x22\x23\x24\x25\x26\x27"
30071 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30072 "\x30\x31\x32\x33\x34\x35\x36\x37"
30073 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30074 "\x40\x41\x42\x43\x44\x45\x46\x47"
30075 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30076 "\x50\x51\x52\x53\x54\x55\x56\x57"
30077 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30078 "\x60\x61\x62\x63\x64\x65\x66\x67"
30079 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30080 "\x70\x71\x72\x73\x74\x75\x76\x77"
30081 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30082 "\x80\x81\x82\x83\x84\x85\x86\x87"
30083 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30084 "\x90\x91\x92\x93\x94\x95\x96\x97"
30085 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30086 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30087 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30088 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30089 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30090 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30091 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30092 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30093 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30094 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30095 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30096 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30097 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30098 "\x00\x01\x02\x03\x04\x05\x06\x07"
30099 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30100 "\x10\x11\x12\x13\x14\x15\x16\x17"
30101 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30102 "\x20\x21\x22\x23\x24\x25\x26\x27"
30103 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30104 "\x30\x31\x32\x33\x34\x35\x36\x37"
30105 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30106 "\x40\x41\x42\x43\x44\x45\x46\x47"
30107 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30108 "\x50\x51\x52\x53\x54\x55\x56\x57"
30109 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30110 "\x60\x61\x62\x63\x64\x65\x66\x67"
30111 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30112 "\x70\x71\x72\x73\x74\x75\x76\x77"
30113 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30114 "\x80\x81\x82\x83\x84\x85\x86\x87"
30115 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30116 "\x90\x91\x92\x93\x94\x95\x96\x97"
30117 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30118 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30119 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30120 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30121 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30122 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30123 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30124 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30125 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30126 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30127 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30128 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30129 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
30130 .rlen = 512,
30131 }, {
30132 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
30133 "\x23\x53\x60\x28\x74\x71\x35\x26"
30134 "\x62\x49\x77\x57\x24\x70\x93\x69"
30135 "\x99\x59\x57\x49\x66\x96\x76\x27"
30136 "\x31\x41\x59\x26\x53\x58\x97\x93"
30137 "\x23\x84\x62\x64\x33\x83\x27\x95"
30138 "\x02\x88\x41\x97\x16\x93\x99\x37"
30139 "\x51\x05\x82\x09\x74\x94\x45\x92",
30140 .klen = 64,
30141 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
30142 "\x00\x00\x00\x00\x00\x00\x00\x00",
30143 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
30144 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
30145 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
30146 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
30147 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
30148 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
30149 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
30150 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
30151 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
30152 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
30153 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
30154 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
30155 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
30156 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
30157 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
30158 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
30159 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
30160 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
30161 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
30162 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
30163 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
30164 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
30165 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
30166 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
30167 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
30168 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
30169 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
30170 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
30171 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
30172 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
30173 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
30174 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
30175 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
30176 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
30177 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
30178 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
30179 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
30180 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
30181 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
30182 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
30183 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
30184 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
30185 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
30186 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
30187 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
30188 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
30189 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
30190 "\x21\x17\xf8\x59\x15\x24\x64\x22"
30191 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
30192 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
30193 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
30194 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
30195 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
30196 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
30197 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
30198 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
30199 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
30200 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
30201 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
30202 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
30203 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
30204 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
30205 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
30206 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
30207 .ilen = 512,
30208 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30209 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30210 "\x10\x11\x12\x13\x14\x15\x16\x17"
30211 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30212 "\x20\x21\x22\x23\x24\x25\x26\x27"
30213 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30214 "\x30\x31\x32\x33\x34\x35\x36\x37"
30215 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30216 "\x40\x41\x42\x43\x44\x45\x46\x47"
30217 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30218 "\x50\x51\x52\x53\x54\x55\x56\x57"
30219 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30220 "\x60\x61\x62\x63\x64\x65\x66\x67"
30221 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30222 "\x70\x71\x72\x73\x74\x75\x76\x77"
30223 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30224 "\x80\x81\x82\x83\x84\x85\x86\x87"
30225 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30226 "\x90\x91\x92\x93\x94\x95\x96\x97"
30227 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30228 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30229 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30230 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30231 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30232 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30233 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30234 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30235 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30236 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30237 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30238 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30239 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30240 "\x00\x01\x02\x03\x04\x05\x06\x07"
30241 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30242 "\x10\x11\x12\x13\x14\x15\x16\x17"
30243 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30244 "\x20\x21\x22\x23\x24\x25\x26\x27"
30245 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30246 "\x30\x31\x32\x33\x34\x35\x36\x37"
30247 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30248 "\x40\x41\x42\x43\x44\x45\x46\x47"
30249 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30250 "\x50\x51\x52\x53\x54\x55\x56\x57"
30251 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30252 "\x60\x61\x62\x63\x64\x65\x66\x67"
30253 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30254 "\x70\x71\x72\x73\x74\x75\x76\x77"
30255 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30256 "\x80\x81\x82\x83\x84\x85\x86\x87"
30257 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30258 "\x90\x91\x92\x93\x94\x95\x96\x97"
30259 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30260 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30261 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30262 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30263 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30264 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30265 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30266 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30267 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30268 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30269 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30270 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30271 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
30272 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030030273 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020030274 .np = 3,
30275 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020030276 },
Herbert Xuda7f0332008-07-31 17:08:25 +080030277};
30278
30279/*
30280 * SEED test vectors
30281 */
30282#define SEED_ENC_TEST_VECTORS 4
30283#define SEED_DEC_TEST_VECTORS 4
30284
30285static struct cipher_testvec seed_enc_tv_template[] = {
30286 {
30287 .key = zeroed_string,
30288 .klen = 16,
30289 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
30290 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30291 .ilen = 16,
30292 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
30293 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
30294 .rlen = 16,
30295 }, {
30296 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30297 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30298 .klen = 16,
30299 .input = zeroed_string,
30300 .ilen = 16,
30301 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
30302 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
30303 .rlen = 16,
30304 }, {
30305 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
30306 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
30307 .klen = 16,
30308 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
30309 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
30310 .ilen = 16,
30311 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
30312 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
30313 .rlen = 16,
30314 }, {
30315 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
30316 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
30317 .klen = 16,
30318 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
30319 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
30320 .ilen = 16,
30321 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
30322 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
30323 .rlen = 16,
30324 }
30325};
30326
30327static struct cipher_testvec seed_dec_tv_template[] = {
30328 {
30329 .key = zeroed_string,
30330 .klen = 16,
30331 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
30332 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
30333 .ilen = 16,
30334 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30335 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30336 .rlen = 16,
30337 }, {
30338 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30339 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30340 .klen = 16,
30341 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
30342 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
30343 .ilen = 16,
30344 .result = zeroed_string,
30345 .rlen = 16,
30346 }, {
30347 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
30348 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
30349 .klen = 16,
30350 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
30351 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
30352 .ilen = 16,
30353 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
30354 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
30355 .rlen = 16,
30356 }, {
30357 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
30358 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
30359 .klen = 16,
30360 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
30361 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
30362 .ilen = 16,
30363 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
30364 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
30365 .rlen = 16,
30366 }
30367};
30368
30369#define SALSA20_STREAM_ENC_TEST_VECTORS 5
30370static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
30371 /*
30372 * Testvectors from verified.test-vectors submitted to ECRYPT.
30373 * They are truncated to size 39, 64, 111, 129 to test a variety
30374 * of input length.
30375 */
30376 { /* Set 3, vector 0 */
30377 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30378 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
30379 .klen = 16,
30380 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
30381 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30382 "\x00\x00\x00\x00\x00\x00\x00\x00"
30383 "\x00\x00\x00\x00\x00\x00\x00\x00"
30384 "\x00\x00\x00\x00\x00\x00\x00\x00"
30385 "\x00\x00\x00\x00\x00\x00\x00",
30386 .ilen = 39,
30387 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
30388 "\x68\x02\x41\x0C\x68\x86\x88\x89"
30389 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
30390 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
30391 "\x58\x3F\x52\x79\x70\xEB\xC1",
30392 .rlen = 39,
30393 }, { /* Set 5, vector 0 */
30394 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30395 "\x00\x00\x00\x00\x00\x00\x00\x00",
30396 .klen = 16,
30397 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
30398 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30399 "\x00\x00\x00\x00\x00\x00\x00\x00"
30400 "\x00\x00\x00\x00\x00\x00\x00\x00"
30401 "\x00\x00\x00\x00\x00\x00\x00\x00"
30402 "\x00\x00\x00\x00\x00\x00\x00\x00"
30403 "\x00\x00\x00\x00\x00\x00\x00\x00"
30404 "\x00\x00\x00\x00\x00\x00\x00\x00"
30405 "\x00\x00\x00\x00\x00\x00\x00\x00",
30406 .ilen = 64,
30407 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
30408 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
30409 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
30410 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
30411 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
30412 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
30413 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
30414 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
30415 .rlen = 64,
30416 }, { /* Set 3, vector 27 */
30417 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
30418 "\x23\x24\x25\x26\x27\x28\x29\x2A"
30419 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
30420 "\x33\x34\x35\x36\x37\x38\x39\x3A",
30421 .klen = 32,
30422 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
30423 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30424 "\x00\x00\x00\x00\x00\x00\x00\x00"
30425 "\x00\x00\x00\x00\x00\x00\x00\x00"
30426 "\x00\x00\x00\x00\x00\x00\x00\x00"
30427 "\x00\x00\x00\x00\x00\x00\x00\x00"
30428 "\x00\x00\x00\x00\x00\x00\x00\x00"
30429 "\x00\x00\x00\x00\x00\x00\x00\x00"
30430 "\x00\x00\x00\x00\x00\x00\x00\x00"
30431 "\x00\x00\x00\x00\x00\x00\x00\x00"
30432 "\x00\x00\x00\x00\x00\x00\x00\x00"
30433 "\x00\x00\x00\x00\x00\x00\x00\x00"
30434 "\x00\x00\x00\x00\x00\x00\x00\x00"
30435 "\x00\x00\x00\x00\x00\x00\x00\x00"
30436 "\x00\x00\x00\x00\x00\x00\x00",
30437 .ilen = 111,
30438 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
30439 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
30440 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
30441 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
30442 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
30443 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
30444 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
30445 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
30446 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
30447 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
30448 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
30449 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
30450 "\x95\x46\x45\x54\xE9\x75\x03\x08"
30451 "\x44\xAF\xE5\x8A\x81\x12\x09",
30452 .rlen = 111,
30453 }, { /* Set 5, vector 27 */
30454 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30455 "\x00\x00\x00\x00\x00\x00\x00\x00"
30456 "\x00\x00\x00\x00\x00\x00\x00\x00"
30457 "\x00\x00\x00\x00\x00\x00\x00\x00",
30458 .klen = 32,
30459 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
30460 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30461 "\x00\x00\x00\x00\x00\x00\x00\x00"
30462 "\x00\x00\x00\x00\x00\x00\x00\x00"
30463 "\x00\x00\x00\x00\x00\x00\x00\x00"
30464 "\x00\x00\x00\x00\x00\x00\x00\x00"
30465 "\x00\x00\x00\x00\x00\x00\x00\x00"
30466 "\x00\x00\x00\x00\x00\x00\x00\x00"
30467 "\x00\x00\x00\x00\x00\x00\x00\x00"
30468 "\x00\x00\x00\x00\x00\x00\x00\x00"
30469 "\x00\x00\x00\x00\x00\x00\x00\x00"
30470 "\x00\x00\x00\x00\x00\x00\x00\x00"
30471 "\x00\x00\x00\x00\x00\x00\x00\x00"
30472 "\x00\x00\x00\x00\x00\x00\x00\x00"
30473 "\x00\x00\x00\x00\x00\x00\x00\x00"
30474 "\x00\x00\x00\x00\x00\x00\x00\x00"
30475 "\x00\x00\x00\x00\x00\x00\x00\x00"
30476 "\x00",
30477 .ilen = 129,
30478 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
30479 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
30480 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
30481 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
30482 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
30483 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
30484 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
30485 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
30486 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
30487 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
30488 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
30489 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
30490 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
30491 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
30492 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
30493 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
30494 "\x5A",
30495 .rlen = 129,
30496 }, { /* large test vector generated using Crypto++ */
30497 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30498 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30499 "\x10\x11\x12\x13\x14\x15\x16\x17"
30500 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
30501 .klen = 32,
30502 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30503 "\x00\x00\x00\x00\x00\x00\x00\x00",
30504 .input =
30505 "\x00\x01\x02\x03\x04\x05\x06\x07"
30506 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30507 "\x10\x11\x12\x13\x14\x15\x16\x17"
30508 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30509 "\x20\x21\x22\x23\x24\x25\x26\x27"
30510 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30511 "\x30\x31\x32\x33\x34\x35\x36\x37"
30512 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30513 "\x40\x41\x42\x43\x44\x45\x46\x47"
30514 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30515 "\x50\x51\x52\x53\x54\x55\x56\x57"
30516 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30517 "\x60\x61\x62\x63\x64\x65\x66\x67"
30518 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30519 "\x70\x71\x72\x73\x74\x75\x76\x77"
30520 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30521 "\x80\x81\x82\x83\x84\x85\x86\x87"
30522 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30523 "\x90\x91\x92\x93\x94\x95\x96\x97"
30524 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30525 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30526 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30527 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30528 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30529 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30530 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30531 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30532 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30533 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30534 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30535 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30536 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30537 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
30538 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
30539 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
30540 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
30541 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
30542 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
30543 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
30544 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
30545 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
30546 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
30547 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
30548 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
30549 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
30550 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
30551 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
30552 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
30553 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
30554 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
30555 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
30556 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
30557 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
30558 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
30559 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
30560 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
30561 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
30562 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
30563 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
30564 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
30565 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
30566 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
30567 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
30568 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
30569 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
30570 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
30571 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
30572 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
30573 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
30574 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
30575 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
30576 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
30577 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
30578 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
30579 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
30580 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
30581 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
30582 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
30583 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
30584 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
30585 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
30586 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
30587 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
30588 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
30589 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
30590 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
30591 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
30592 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
30593 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
30594 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
30595 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
30596 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
30597 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
30598 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
30599 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
30600 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
30601 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
30602 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
30603 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
30604 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
30605 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
30606 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
30607 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
30608 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
30609 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
30610 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
30611 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
30612 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
30613 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
30614 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
30615 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
30616 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
30617 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
30618 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
30619 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
30620 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
30621 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
30622 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
30623 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
30624 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
30625 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
30626 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
30627 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
30628 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
30629 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
30630 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
30631 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
30632 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
30633 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
30634 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
30635 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
30636 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
30637 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
30638 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
30639 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
30640 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
30641 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
30642 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
30643 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
30644 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
30645 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
30646 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
30647 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
30648 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
30649 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
30650 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
30651 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
30652 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
30653 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
30654 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
30655 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
30656 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
30657 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
30658 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
30659 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
30660 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
30661 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
30662 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
30663 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
30664 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
30665 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
30666 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
30667 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
30668 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
30669 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
30670 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
30671 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
30672 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
30673 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
30674 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
30675 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
30676 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
30677 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
30678 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
30679 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
30680 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
30681 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
30682 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
30683 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
30684 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
30685 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
30686 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
30687 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
30688 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
30689 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
30690 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
30691 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
30692 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
30693 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
30694 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
30695 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
30696 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
30697 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
30698 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
30699 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
30700 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
30701 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
30702 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
30703 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
30704 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
30705 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
30706 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
30707 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
30708 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
30709 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
30710 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
30711 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
30712 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
30713 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
30714 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
30715 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
30716 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
30717 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
30718 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
30719 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
30720 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
30721 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
30722 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
30723 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
30724 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
30725 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
30726 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
30727 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
30728 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
30729 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
30730 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
30731 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
30732 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
30733 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
30734 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
30735 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
30736 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
30737 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
30738 "\x38\x47\x56\x65\x74\x83\x92\xa1"
30739 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
30740 "\x28\x37\x46\x55\x64\x73\x82\x91"
30741 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
30742 "\x18\x27\x36\x45\x54\x63\x72\x81"
30743 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
30744 "\x08\x17\x26\x35\x44\x53\x62\x71"
30745 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
30746 "\xf8\x07\x16\x25\x34\x43\x52\x61"
30747 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
30748 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
30749 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
30750 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
30751 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
30752 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
30753 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
30754 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
30755 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
30756 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
30757 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
30758 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
30759 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
30760 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
30761 "\x00\x11\x22\x33\x44\x55\x66\x77"
30762 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
30763 "\x10\x21\x32\x43\x54\x65\x76\x87"
30764 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
30765 "\x20\x31\x42\x53\x64\x75\x86\x97"
30766 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
30767 "\x30\x41\x52\x63\x74\x85\x96\xa7"
30768 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
30769 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
30770 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
30771 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
30772 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
30773 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
30774 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
30775 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
30776 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
30777 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
30778 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
30779 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
30780 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
30781 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
30782 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
30783 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
30784 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
30785 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
30786 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
30787 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
30788 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
30789 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
30790 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
30791 "\xf0\x01\x12\x23\x34\x45\x56\x67"
30792 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
30793 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
30794 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
30795 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
30796 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
30797 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
30798 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
30799 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
30800 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
30801 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
30802 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
30803 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
30804 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
30805 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
30806 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
30807 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
30808 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
30809 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
30810 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
30811 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
30812 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
30813 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
30814 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
30815 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
30816 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
30817 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
30818 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
30819 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
30820 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
30821 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
30822 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
30823 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
30824 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
30825 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
30826 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
30827 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
30828 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
30829 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
30830 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
30831 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
30832 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
30833 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
30834 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
30835 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
30836 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
30837 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
30838 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
30839 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
30840 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
30841 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
30842 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
30843 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
30844 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
30845 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
30846 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
30847 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
30848 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
30849 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
30850 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
30851 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
30852 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
30853 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
30854 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
30855 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
30856 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
30857 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
30858 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
30859 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
30860 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
30861 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
30862 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
30863 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
30864 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
30865 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
30866 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
30867 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
30868 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
30869 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
30870 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
30871 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
30872 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
30873 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
30874 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
30875 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
30876 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
30877 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
30878 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
30879 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
30880 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
30881 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
30882 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
30883 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
30884 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
30885 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
30886 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
30887 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
30888 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
30889 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
30890 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
30891 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
30892 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
30893 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
30894 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
30895 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
30896 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
30897 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
30898 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
30899 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
30900 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
30901 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
30902 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
30903 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
30904 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
30905 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
30906 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
30907 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
30908 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
30909 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
30910 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
30911 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
30912 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
30913 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
30914 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
30915 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
30916 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
30917 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
30918 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
30919 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
30920 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
30921 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
30922 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
30923 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
30924 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
30925 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
30926 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
30927 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
30928 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
30929 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
30930 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
30931 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
30932 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
30933 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
30934 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
30935 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
30936 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
30937 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
30938 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
30939 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
30940 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
30941 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
30942 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
30943 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
30944 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
30945 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
30946 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
30947 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
30948 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
30949 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
30950 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
30951 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
30952 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
30953 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
30954 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
30955 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
30956 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
30957 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
30958 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
30959 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
30960 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
30961 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
30962 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
30963 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
30964 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
30965 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
30966 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
30967 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
30968 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
30969 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
30970 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
30971 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
30972 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
30973 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
30974 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
30975 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
30976 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
30977 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
30978 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
30979 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
30980 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
30981 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
30982 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
30983 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
30984 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
30985 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
30986 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
30987 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
30988 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
30989 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
30990 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
30991 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
30992 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
30993 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
30994 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
30995 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
30996 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
30997 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
30998 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
30999 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
31000 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
31001 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
31002 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
31003 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
31004 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
31005 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
31006 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
31007 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
31008 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
31009 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
31010 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
31011 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
31012 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
31013 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
31014 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
31015 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
31016 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
31017 "\x00\x21\x42\x63",
31018 .ilen = 4100,
31019 .result =
31020 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
31021 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
31022 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
31023 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
31024 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
31025 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
31026 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
31027 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
31028 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
31029 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
31030 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
31031 "\xbb\xde\x56\x86\xab\x65\x21\x30"
31032 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
31033 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
31034 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
31035 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
31036 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
31037 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
31038 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
31039 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
31040 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
31041 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
31042 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
31043 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
31044 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
31045 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
31046 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
31047 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
31048 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
31049 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
31050 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
31051 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
31052 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
31053 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
31054 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
31055 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
31056 "\x62\x08\x18\x7a\x25\x49\x28\xac"
31057 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
31058 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
31059 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
31060 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
31061 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
31062 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
31063 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
31064 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
31065 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
31066 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
31067 "\x33\xee\x14\x19\x22\x52\x89\xa7"
31068 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
31069 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
31070 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
31071 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
31072 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
31073 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
31074 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
31075 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
31076 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
31077 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
31078 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
31079 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
31080 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
31081 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
31082 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
31083 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
31084 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
31085 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
31086 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
31087 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
31088 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
31089 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
31090 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
31091 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
31092 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
31093 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
31094 "\x49\x97\x33\xab\x36\x14\x0a\x70"
31095 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
31096 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
31097 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
31098 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
31099 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
31100 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
31101 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
31102 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
31103 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
31104 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
31105 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
31106 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
31107 "\xad\x04\x07\xae\x22\x90\x4a\x93"
31108 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
31109 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
31110 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
31111 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
31112 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
31113 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
31114 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
31115 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
31116 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
31117 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
31118 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
31119 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
31120 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
31121 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
31122 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
31123 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
31124 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
31125 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
31126 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
31127 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
31128 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
31129 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
31130 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
31131 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
31132 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
31133 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
31134 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
31135 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
31136 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
31137 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
31138 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
31139 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
31140 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
31141 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
31142 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
31143 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
31144 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
31145 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
31146 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
31147 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
31148 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
31149 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
31150 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
31151 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
31152 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
31153 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
31154 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
31155 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
31156 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
31157 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
31158 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
31159 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
31160 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
31161 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
31162 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
31163 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
31164 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
31165 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
31166 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
31167 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
31168 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
31169 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
31170 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
31171 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
31172 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
31173 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
31174 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
31175 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
31176 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
31177 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
31178 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
31179 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
31180 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
31181 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
31182 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
31183 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
31184 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
31185 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
31186 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
31187 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
31188 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
31189 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
31190 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
31191 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
31192 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
31193 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
31194 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
31195 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
31196 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
31197 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
31198 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
31199 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
31200 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
31201 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
31202 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
31203 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
31204 "\x2e\x53\x49\x97\x94\x33\xae\x40"
31205 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
31206 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
31207 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
31208 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
31209 "\xce\x87\xad\xcc\x72\x05\x00\x29"
31210 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
31211 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
31212 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
31213 "\xac\xc0\x79\x50\x69\xca\x59\x32"
31214 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
31215 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
31216 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
31217 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
31218 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
31219 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
31220 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
31221 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
31222 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
31223 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
31224 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
31225 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
31226 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
31227 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
31228 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
31229 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
31230 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
31231 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
31232 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
31233 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
31234 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
31235 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
31236 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
31237 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
31238 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
31239 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
31240 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
31241 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
31242 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
31243 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
31244 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
31245 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
31246 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
31247 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
31248 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
31249 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
31250 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
31251 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
31252 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
31253 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
31254 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
31255 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
31256 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
31257 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
31258 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
31259 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
31260 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
31261 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
31262 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
31263 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
31264 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
31265 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
31266 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
31267 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
31268 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
31269 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
31270 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
31271 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
31272 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
31273 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
31274 "\x38\x55\xab\x33\x26\xef\x9f\x43"
31275 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
31276 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
31277 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
31278 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
31279 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
31280 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
31281 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
31282 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
31283 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
31284 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
31285 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
31286 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
31287 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
31288 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
31289 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
31290 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
31291 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
31292 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
31293 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
31294 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
31295 "\x62\x36\x43\xb2\x82\x15\x75\x50"
31296 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
31297 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
31298 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
31299 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
31300 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
31301 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
31302 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
31303 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
31304 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
31305 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
31306 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
31307 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
31308 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
31309 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
31310 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
31311 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
31312 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
31313 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
31314 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
31315 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
31316 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
31317 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
31318 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
31319 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
31320 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
31321 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
31322 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
31323 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
31324 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
31325 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
31326 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
31327 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
31328 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
31329 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
31330 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
31331 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
31332 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
31333 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
31334 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
31335 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
31336 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
31337 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
31338 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
31339 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
31340 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
31341 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
31342 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
31343 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
31344 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
31345 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
31346 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
31347 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
31348 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
31349 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
31350 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
31351 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
31352 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
31353 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
31354 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
31355 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
31356 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
31357 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
31358 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
31359 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
31360 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
31361 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
31362 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
31363 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
31364 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
31365 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
31366 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
31367 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
31368 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
31369 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
31370 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
31371 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
31372 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
31373 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
31374 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
31375 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
31376 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
31377 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
31378 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
31379 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
31380 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
31381 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
31382 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
31383 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
31384 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
31385 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
31386 "\x73\x2e\x71\x79\x16\x06\x63\x28"
31387 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
31388 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
31389 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
31390 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
31391 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
31392 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
31393 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
31394 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
31395 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
31396 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
31397 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
31398 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
31399 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
31400 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
31401 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
31402 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
31403 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
31404 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
31405 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
31406 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
31407 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
31408 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
31409 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
31410 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
31411 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
31412 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
31413 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
31414 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
31415 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
31416 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
31417 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
31418 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
31419 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
31420 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
31421 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
31422 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
31423 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
31424 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
31425 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
31426 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
31427 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
31428 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
31429 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
31430 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
31431 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
31432 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
31433 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
31434 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
31435 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
31436 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
31437 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
31438 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
31439 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
31440 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
31441 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
31442 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
31443 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
31444 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
31445 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
31446 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
31447 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
31448 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
31449 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
31450 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
31451 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
31452 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
31453 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
31454 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
31455 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
31456 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
31457 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
31458 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
31459 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
31460 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
31461 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
31462 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
31463 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
31464 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
31465 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
31466 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
31467 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
31468 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
31469 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
31470 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
31471 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
31472 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
31473 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
31474 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
31475 "\x85\x73\x78\x45\x20\x7f\xae\x13"
31476 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
31477 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
31478 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
31479 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
31480 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
31481 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
31482 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
31483 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
31484 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
31485 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
31486 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
31487 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
31488 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
31489 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
31490 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
31491 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
31492 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
31493 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
31494 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
31495 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
31496 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
31497 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
31498 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
31499 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
31500 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
31501 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
31502 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
31503 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
31504 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
31505 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
31506 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
31507 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
31508 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
31509 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
31510 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
31511 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
31512 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
31513 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
31514 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
31515 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
31516 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
31517 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
31518 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
31519 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
31520 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
31521 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
31522 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
31523 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
31524 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
31525 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
31526 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
31527 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
31528 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
31529 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
31530 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
31531 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
31532 "\xaf\xdf\x11\x95",
31533 .rlen = 4100,
31534 .np = 2,
31535 .tap = { 4064, 36 },
31536 },
31537};
31538
Martin Willi6692cbc22015-07-16 19:14:04 +020031539#define CHACHA20_ENC_TEST_VECTORS 4
Martin Willi3590ebf2015-06-01 13:43:57 +020031540static struct cipher_testvec chacha20_enc_tv_template[] = {
31541 { /* RFC7539 A.2. Test Vector #1 */
31542 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
31543 "\x00\x00\x00\x00\x00\x00\x00\x00"
31544 "\x00\x00\x00\x00\x00\x00\x00\x00"
31545 "\x00\x00\x00\x00\x00\x00\x00\x00",
31546 .klen = 32,
31547 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
31548 "\x00\x00\x00\x00\x00\x00\x00\x00",
31549 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
31550 "\x00\x00\x00\x00\x00\x00\x00\x00"
31551 "\x00\x00\x00\x00\x00\x00\x00\x00"
31552 "\x00\x00\x00\x00\x00\x00\x00\x00"
31553 "\x00\x00\x00\x00\x00\x00\x00\x00"
31554 "\x00\x00\x00\x00\x00\x00\x00\x00"
31555 "\x00\x00\x00\x00\x00\x00\x00\x00"
31556 "\x00\x00\x00\x00\x00\x00\x00\x00",
31557 .ilen = 64,
31558 .result = "\x76\xb8\xe0\xad\xa0\xf1\x3d\x90"
31559 "\x40\x5d\x6a\xe5\x53\x86\xbd\x28"
31560 "\xbd\xd2\x19\xb8\xa0\x8d\xed\x1a"
31561 "\xa8\x36\xef\xcc\x8b\x77\x0d\xc7"
31562 "\xda\x41\x59\x7c\x51\x57\x48\x8d"
31563 "\x77\x24\xe0\x3f\xb8\xd8\x4a\x37"
31564 "\x6a\x43\xb8\xf4\x15\x18\xa1\x1c"
31565 "\xc3\x87\xb6\x69\xb2\xee\x65\x86",
31566 .rlen = 64,
31567 }, { /* RFC7539 A.2. Test Vector #2 */
31568 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
31569 "\x00\x00\x00\x00\x00\x00\x00\x00"
31570 "\x00\x00\x00\x00\x00\x00\x00\x00"
31571 "\x00\x00\x00\x00\x00\x00\x00\x01",
31572 .klen = 32,
31573 .iv = "\x01\x00\x00\x00\x00\x00\x00\x00"
31574 "\x00\x00\x00\x00\x00\x00\x00\x02",
31575 .input = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
31576 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
31577 "\x6f\x20\x74\x68\x65\x20\x49\x45"
31578 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
31579 "\x64\x65\x64\x20\x62\x79\x20\x74"
31580 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
31581 "\x69\x62\x75\x74\x6f\x72\x20\x66"
31582 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
31583 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
31584 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
31585 "\x20\x70\x61\x72\x74\x20\x6f\x66"
31586 "\x20\x61\x6e\x20\x49\x45\x54\x46"
31587 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
31588 "\x74\x2d\x44\x72\x61\x66\x74\x20"
31589 "\x6f\x72\x20\x52\x46\x43\x20\x61"
31590 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
31591 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
31592 "\x20\x6d\x61\x64\x65\x20\x77\x69"
31593 "\x74\x68\x69\x6e\x20\x74\x68\x65"
31594 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
31595 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
31596 "\x45\x54\x46\x20\x61\x63\x74\x69"
31597 "\x76\x69\x74\x79\x20\x69\x73\x20"
31598 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
31599 "\x65\x64\x20\x61\x6e\x20\x22\x49"
31600 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
31601 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
31602 "\x22\x2e\x20\x53\x75\x63\x68\x20"
31603 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
31604 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
31605 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
31606 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
31607 "\x74\x73\x20\x69\x6e\x20\x49\x45"
31608 "\x54\x46\x20\x73\x65\x73\x73\x69"
31609 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
31610 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
31611 "\x77\x72\x69\x74\x74\x65\x6e\x20"
31612 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
31613 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
31614 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
31615 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
31616 "\x64\x65\x20\x61\x74\x20\x61\x6e"
31617 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
31618 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
31619 "\x20\x77\x68\x69\x63\x68\x20\x61"
31620 "\x72\x65\x20\x61\x64\x64\x72\x65"
31621 "\x73\x73\x65\x64\x20\x74\x6f",
31622 .ilen = 375,
31623 .result = "\xa3\xfb\xf0\x7d\xf3\xfa\x2f\xde"
31624 "\x4f\x37\x6c\xa2\x3e\x82\x73\x70"
31625 "\x41\x60\x5d\x9f\x4f\x4f\x57\xbd"
31626 "\x8c\xff\x2c\x1d\x4b\x79\x55\xec"
31627 "\x2a\x97\x94\x8b\xd3\x72\x29\x15"
31628 "\xc8\xf3\xd3\x37\xf7\xd3\x70\x05"
31629 "\x0e\x9e\x96\xd6\x47\xb7\xc3\x9f"
31630 "\x56\xe0\x31\xca\x5e\xb6\x25\x0d"
31631 "\x40\x42\xe0\x27\x85\xec\xec\xfa"
31632 "\x4b\x4b\xb5\xe8\xea\xd0\x44\x0e"
31633 "\x20\xb6\xe8\xdb\x09\xd8\x81\xa7"
31634 "\xc6\x13\x2f\x42\x0e\x52\x79\x50"
31635 "\x42\xbd\xfa\x77\x73\xd8\xa9\x05"
31636 "\x14\x47\xb3\x29\x1c\xe1\x41\x1c"
31637 "\x68\x04\x65\x55\x2a\xa6\xc4\x05"
31638 "\xb7\x76\x4d\x5e\x87\xbe\xa8\x5a"
31639 "\xd0\x0f\x84\x49\xed\x8f\x72\xd0"
31640 "\xd6\x62\xab\x05\x26\x91\xca\x66"
31641 "\x42\x4b\xc8\x6d\x2d\xf8\x0e\xa4"
31642 "\x1f\x43\xab\xf9\x37\xd3\x25\x9d"
31643 "\xc4\xb2\xd0\xdf\xb4\x8a\x6c\x91"
31644 "\x39\xdd\xd7\xf7\x69\x66\xe9\x28"
31645 "\xe6\x35\x55\x3b\xa7\x6c\x5c\x87"
31646 "\x9d\x7b\x35\xd4\x9e\xb2\xe6\x2b"
31647 "\x08\x71\xcd\xac\x63\x89\x39\xe2"
31648 "\x5e\x8a\x1e\x0e\xf9\xd5\x28\x0f"
31649 "\xa8\xca\x32\x8b\x35\x1c\x3c\x76"
31650 "\x59\x89\xcb\xcf\x3d\xaa\x8b\x6c"
31651 "\xcc\x3a\xaf\x9f\x39\x79\xc9\x2b"
31652 "\x37\x20\xfc\x88\xdc\x95\xed\x84"
31653 "\xa1\xbe\x05\x9c\x64\x99\xb9\xfd"
31654 "\xa2\x36\xe7\xe8\x18\xb0\x4b\x0b"
31655 "\xc3\x9c\x1e\x87\x6b\x19\x3b\xfe"
31656 "\x55\x69\x75\x3f\x88\x12\x8c\xc0"
31657 "\x8a\xaa\x9b\x63\xd1\xa1\x6f\x80"
31658 "\xef\x25\x54\xd7\x18\x9c\x41\x1f"
31659 "\x58\x69\xca\x52\xc5\xb8\x3f\xa3"
31660 "\x6f\xf2\x16\xb9\xc1\xd3\x00\x62"
31661 "\xbe\xbc\xfd\x2d\xc5\xbc\xe0\x91"
31662 "\x19\x34\xfd\xa7\x9a\x86\xf6\xe6"
31663 "\x98\xce\xd7\x59\xc3\xff\x9b\x64"
31664 "\x77\x33\x8f\x3d\xa4\xf9\xcd\x85"
31665 "\x14\xea\x99\x82\xcc\xaf\xb3\x41"
31666 "\xb2\x38\x4d\xd9\x02\xf3\xd1\xab"
31667 "\x7a\xc6\x1d\xd2\x9c\x6f\x21\xba"
31668 "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
31669 "\xc4\xfd\x80\x6c\x22\xf2\x21",
31670 .rlen = 375,
31671 }, { /* RFC7539 A.2. Test Vector #3 */
31672 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
31673 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
31674 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
31675 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
31676 .klen = 32,
31677 .iv = "\x2a\x00\x00\x00\x00\x00\x00\x00"
31678 "\x00\x00\x00\x00\x00\x00\x00\x02",
31679 .input = "\x27\x54\x77\x61\x73\x20\x62\x72"
31680 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
31681 "\x6e\x64\x20\x74\x68\x65\x20\x73"
31682 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
31683 "\x76\x65\x73\x0a\x44\x69\x64\x20"
31684 "\x67\x79\x72\x65\x20\x61\x6e\x64"
31685 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
31686 "\x69\x6e\x20\x74\x68\x65\x20\x77"
31687 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
31688 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
31689 "\x65\x72\x65\x20\x74\x68\x65\x20"
31690 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
31691 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
31692 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
31693 "\x72\x61\x74\x68\x73\x20\x6f\x75"
31694 "\x74\x67\x72\x61\x62\x65\x2e",
31695 .ilen = 127,
31696 .result = "\x62\xe6\x34\x7f\x95\xed\x87\xa4"
31697 "\x5f\xfa\xe7\x42\x6f\x27\xa1\xdf"
31698 "\x5f\xb6\x91\x10\x04\x4c\x0d\x73"
31699 "\x11\x8e\xff\xa9\x5b\x01\xe5\xcf"
31700 "\x16\x6d\x3d\xf2\xd7\x21\xca\xf9"
31701 "\xb2\x1e\x5f\xb1\x4c\x61\x68\x71"
31702 "\xfd\x84\xc5\x4f\x9d\x65\xb2\x83"
31703 "\x19\x6c\x7f\xe4\xf6\x05\x53\xeb"
31704 "\xf3\x9c\x64\x02\xc4\x22\x34\xe3"
31705 "\x2a\x35\x6b\x3e\x76\x43\x12\xa6"
31706 "\x1a\x55\x32\x05\x57\x16\xea\xd6"
31707 "\x96\x25\x68\xf8\x7d\x3f\x3f\x77"
31708 "\x04\xc6\xa8\xd1\xbc\xd1\xbf\x4d"
31709 "\x50\xd6\x15\x4b\x6d\xa7\x31\xb1"
31710 "\x87\xb5\x8d\xfd\x72\x8a\xfa\x36"
31711 "\x75\x7a\x79\x7a\xc1\x88\xd1",
31712 .rlen = 127,
Martin Willi6692cbc22015-07-16 19:14:04 +020031713 }, { /* Self-made test vector for long data */
31714 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
31715 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
31716 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
31717 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
31718 .klen = 32,
31719 .iv = "\x1c\x00\x00\x00\x00\x00\x00\x00"
31720 "\x00\x00\x00\x00\x00\x00\x00\x01",
31721 .input = "\x49\xee\xe0\xdc\x24\x90\x40\xcd"
31722 "\xc5\x40\x8f\x47\x05\xbc\xdd\x81"
31723 "\x47\xc6\x8d\xe6\xb1\x8f\xd7\xcb"
31724 "\x09\x0e\x6e\x22\x48\x1f\xbf\xb8"
31725 "\x5c\xf7\x1e\x8a\xc1\x23\xf2\xd4"
31726 "\x19\x4b\x01\x0f\x4e\xa4\x43\xce"
31727 "\x01\xc6\x67\xda\x03\x91\x18\x90"
31728 "\xa5\xa4\x8e\x45\x03\xb3\x2d\xac"
31729 "\x74\x92\xd3\x53\x47\xc8\xdd\x25"
31730 "\x53\x6c\x02\x03\x87\x0d\x11\x0c"
31731 "\x58\xe3\x12\x18\xfd\x2a\x5b\x40"
31732 "\x0c\x30\xf0\xb8\x3f\x43\xce\xae"
31733 "\x65\x3a\x7d\x7c\xf4\x54\xaa\xcc"
31734 "\x33\x97\xc3\x77\xba\xc5\x70\xde"
31735 "\xd7\xd5\x13\xa5\x65\xc4\x5f\x0f"
31736 "\x46\x1a\x0d\x97\xb5\xf3\xbb\x3c"
31737 "\x84\x0f\x2b\xc5\xaa\xea\xf2\x6c"
31738 "\xc9\xb5\x0c\xee\x15\xf3\x7d\xbe"
31739 "\x9f\x7b\x5a\xa6\xae\x4f\x83\xb6"
31740 "\x79\x49\x41\xf4\x58\x18\xcb\x86"
31741 "\x7f\x30\x0e\xf8\x7d\x44\x36\xea"
31742 "\x75\xeb\x88\x84\x40\x3c\xad\x4f"
31743 "\x6f\x31\x6b\xaa\x5d\xe5\xa5\xc5"
31744 "\x21\x66\xe9\xa7\xe3\xb2\x15\x88"
31745 "\x78\xf6\x79\xa1\x59\x47\x12\x4e"
31746 "\x9f\x9f\x64\x1a\xa0\x22\x5b\x08"
31747 "\xbe\x7c\x36\xc2\x2b\x66\x33\x1b"
31748 "\xdd\x60\x71\xf7\x47\x8c\x61\xc3"
31749 "\xda\x8a\x78\x1e\x16\xfa\x1e\x86"
31750 "\x81\xa6\x17\x2a\xa7\xb5\xc2\xe7"
31751 "\xa4\xc7\x42\xf1\xcf\x6a\xca\xb4"
31752 "\x45\xcf\xf3\x93\xf0\xe7\xea\xf6"
31753 "\xf4\xe6\x33\x43\x84\x93\xa5\x67"
31754 "\x9b\x16\x58\x58\x80\x0f\x2b\x5c"
31755 "\x24\x74\x75\x7f\x95\x81\xb7\x30"
31756 "\x7a\x33\xa7\xf7\x94\x87\x32\x27"
31757 "\x10\x5d\x14\x4c\x43\x29\xdd\x26"
31758 "\xbd\x3e\x3c\x0e\xfe\x0e\xa5\x10"
31759 "\xea\x6b\x64\xfd\x73\xc6\xed\xec"
31760 "\xa8\xc9\xbf\xb3\xba\x0b\x4d\x07"
31761 "\x70\xfc\x16\xfd\x79\x1e\xd7\xc5"
31762 "\x49\x4e\x1c\x8b\x8d\x79\x1b\xb1"
31763 "\xec\xca\x60\x09\x4c\x6a\xd5\x09"
31764 "\x49\x46\x00\x88\x22\x8d\xce\xea"
31765 "\xb1\x17\x11\xde\x42\xd2\x23\xc1"
31766 "\x72\x11\xf5\x50\x73\x04\x40\x47"
31767 "\xf9\x5d\xe7\xa7\x26\xb1\x7e\xb0"
31768 "\x3f\x58\xc1\x52\xab\x12\x67\x9d"
31769 "\x3f\x43\x4b\x68\xd4\x9c\x68\x38"
31770 "\x07\x8a\x2d\x3e\xf3\xaf\x6a\x4b"
31771 "\xf9\xe5\x31\x69\x22\xf9\xa6\x69"
31772 "\xc6\x9c\x96\x9a\x12\x35\x95\x1d"
31773 "\x95\xd5\xdd\xbe\xbf\x93\x53\x24"
31774 "\xfd\xeb\xc2\x0a\x64\xb0\x77\x00"
31775 "\x6f\x88\xc4\x37\x18\x69\x7c\xd7"
31776 "\x41\x92\x55\x4c\x03\xa1\x9a\x4b"
31777 "\x15\xe5\xdf\x7f\x37\x33\x72\xc1"
31778 "\x8b\x10\x67\xa3\x01\x57\x94\x25"
31779 "\x7b\x38\x71\x7e\xdd\x1e\xcc\x73"
31780 "\x55\xd2\x8e\xeb\x07\xdd\xf1\xda"
31781 "\x58\xb1\x47\x90\xfe\x42\x21\x72"
31782 "\xa3\x54\x7a\xa0\x40\xec\x9f\xdd"
31783 "\xc6\x84\x6e\xca\xae\xe3\x68\xb4"
31784 "\x9d\xe4\x78\xff\x57\xf2\xf8\x1b"
31785 "\x03\xa1\x31\xd9\xde\x8d\xf5\x22"
31786 "\x9c\xdd\x20\xa4\x1e\x27\xb1\x76"
31787 "\x4f\x44\x55\xe2\x9b\xa1\x9c\xfe"
31788 "\x54\xf7\x27\x1b\xf4\xde\x02\xf5"
31789 "\x1b\x55\x48\x5c\xdc\x21\x4b\x9e"
31790 "\x4b\x6e\xed\x46\x23\xdc\x65\xb2"
31791 "\xcf\x79\x5f\x28\xe0\x9e\x8b\xe7"
31792 "\x4c\x9d\x8a\xff\xc1\xa6\x28\xb8"
31793 "\x65\x69\x8a\x45\x29\xef\x74\x85"
31794 "\xde\x79\xc7\x08\xae\x30\xb0\xf4"
31795 "\xa3\x1d\x51\x41\xab\xce\xcb\xf6"
31796 "\xb5\xd8\x6d\xe0\x85\xe1\x98\xb3"
31797 "\x43\xbb\x86\x83\x0a\xa0\xf5\xb7"
31798 "\x04\x0b\xfa\x71\x1f\xb0\xf6\xd9"
31799 "\x13\x00\x15\xf0\xc7\xeb\x0d\x5a"
31800 "\x9f\xd7\xb9\x6c\x65\x14\x22\x45"
31801 "\x6e\x45\x32\x3e\x7e\x60\x1a\x12"
31802 "\x97\x82\x14\xfb\xaa\x04\x22\xfa"
31803 "\xa0\xe5\x7e\x8c\x78\x02\x48\x5d"
31804 "\x78\x33\x5a\x7c\xad\xdb\x29\xce"
31805 "\xbb\x8b\x61\xa4\xb7\x42\xe2\xac"
31806 "\x8b\x1a\xd9\x2f\x0b\x8b\x62\x21"
31807 "\x83\x35\x7e\xad\x73\xc2\xb5\x6c"
31808 "\x10\x26\x38\x07\xe5\xc7\x36\x80"
31809 "\xe2\x23\x12\x61\xf5\x48\x4b\x2b"
31810 "\xc5\xdf\x15\xd9\x87\x01\xaa\xac"
31811 "\x1e\x7c\xad\x73\x78\x18\x63\xe0"
31812 "\x8b\x9f\x81\xd8\x12\x6a\x28\x10"
31813 "\xbe\x04\x68\x8a\x09\x7c\x1b\x1c"
31814 "\x83\x66\x80\x47\x80\xe8\xfd\x35"
31815 "\x1c\x97\x6f\xae\x49\x10\x66\xcc"
31816 "\xc6\xd8\xcc\x3a\x84\x91\x20\x77"
31817 "\x72\xe4\x24\xd2\x37\x9f\xc5\xc9"
31818 "\x25\x94\x10\x5f\x40\x00\x64\x99"
31819 "\xdc\xae\xd7\x21\x09\x78\x50\x15"
31820 "\xac\x5f\xc6\x2c\xa2\x0b\xa9\x39"
31821 "\x87\x6e\x6d\xab\xde\x08\x51\x16"
31822 "\xc7\x13\xe9\xea\xed\x06\x8e\x2c"
31823 "\xf8\x37\x8c\xf0\xa6\x96\x8d\x43"
31824 "\xb6\x98\x37\xb2\x43\xed\xde\xdf"
31825 "\x89\x1a\xe7\xeb\x9d\xa1\x7b\x0b"
31826 "\x77\xb0\xe2\x75\xc0\xf1\x98\xd9"
31827 "\x80\x55\xc9\x34\x91\xd1\x59\xe8"
31828 "\x4b\x0f\xc1\xa9\x4b\x7a\x84\x06"
31829 "\x20\xa8\x5d\xfa\xd1\xde\x70\x56"
31830 "\x2f\x9e\x91\x9c\x20\xb3\x24\xd8"
31831 "\x84\x3d\xe1\x8c\x7e\x62\x52\xe5"
31832 "\x44\x4b\x9f\xc2\x93\x03\xea\x2b"
31833 "\x59\xc5\xfa\x3f\x91\x2b\xbb\x23"
31834 "\xf5\xb2\x7b\xf5\x38\xaf\xb3\xee"
31835 "\x63\xdc\x7b\xd1\xff\xaa\x8b\xab"
31836 "\x82\x6b\x37\x04\xeb\x74\xbe\x79"
31837 "\xb9\x83\x90\xef\x20\x59\x46\xff"
31838 "\xe9\x97\x3e\x2f\xee\xb6\x64\x18"
31839 "\x38\x4c\x7a\x4a\xf9\x61\xe8\x9a"
31840 "\xa1\xb5\x01\xa6\x47\xd3\x11\xd4"
31841 "\xce\xd3\x91\x49\x88\xc7\xb8\x4d"
31842 "\xb1\xb9\x07\x6d\x16\x72\xae\x46"
31843 "\x5e\x03\xa1\x4b\xb6\x02\x30\xa8"
31844 "\x3d\xa9\x07\x2a\x7c\x19\xe7\x62"
31845 "\x87\xe3\x82\x2f\x6f\xe1\x09\xd9"
31846 "\x94\x97\xea\xdd\x58\x9e\xae\x76"
31847 "\x7e\x35\xe5\xb4\xda\x7e\xf4\xde"
31848 "\xf7\x32\x87\xcd\x93\xbf\x11\x56"
31849 "\x11\xbe\x08\x74\xe1\x69\xad\xe2"
31850 "\xd7\xf8\x86\x75\x8a\x3c\xa4\xbe"
31851 "\x70\xa7\x1b\xfc\x0b\x44\x2a\x76"
31852 "\x35\xea\x5d\x85\x81\xaf\x85\xeb"
31853 "\xa0\x1c\x61\xc2\xf7\x4f\xa5\xdc"
31854 "\x02\x7f\xf6\x95\x40\x6e\x8a\x9a"
31855 "\xf3\x5d\x25\x6e\x14\x3a\x22\xc9"
31856 "\x37\x1c\xeb\x46\x54\x3f\xa5\x91"
31857 "\xc2\xb5\x8c\xfe\x53\x08\x97\x32"
31858 "\x1b\xb2\x30\x27\xfe\x25\x5d\xdc"
31859 "\x08\x87\xd0\xe5\x94\x1a\xd4\xf1"
31860 "\xfe\xd6\xb4\xa3\xe6\x74\x81\x3c"
31861 "\x1b\xb7\x31\xa7\x22\xfd\xd4\xdd"
31862 "\x20\x4e\x7c\x51\xb0\x60\x73\xb8"
31863 "\x9c\xac\x91\x90\x7e\x01\xb0\xe1"
31864 "\x8a\x2f\x75\x1c\x53\x2a\x98\x2a"
31865 "\x06\x52\x95\x52\xb2\xe9\x25\x2e"
31866 "\x4c\xe2\x5a\x00\xb2\x13\x81\x03"
31867 "\x77\x66\x0d\xa5\x99\xda\x4e\x8c"
31868 "\xac\xf3\x13\x53\x27\x45\xaf\x64"
31869 "\x46\xdc\xea\x23\xda\x97\xd1\xab"
31870 "\x7d\x6c\x30\x96\x1f\xbc\x06\x34"
31871 "\x18\x0b\x5e\x21\x35\x11\x8d\x4c"
31872 "\xe0\x2d\xe9\x50\x16\x74\x81\xa8"
31873 "\xb4\x34\xb9\x72\x42\xa6\xcc\xbc"
31874 "\xca\x34\x83\x27\x10\x5b\x68\x45"
31875 "\x8f\x52\x22\x0c\x55\x3d\x29\x7c"
31876 "\xe3\xc0\x66\x05\x42\x91\x5f\x58"
31877 "\xfe\x4a\x62\xd9\x8c\xa9\x04\x19"
31878 "\x04\xa9\x08\x4b\x57\xfc\x67\x53"
31879 "\x08\x7c\xbc\x66\x8a\xb0\xb6\x9f"
31880 "\x92\xd6\x41\x7c\x5b\x2a\x00\x79"
31881 "\x72",
31882 .ilen = 1281,
31883 .result = "\x45\xe8\xe0\xb6\x9c\xca\xfd\x87"
31884 "\xe8\x1d\x37\x96\x8a\xe3\x40\x35"
31885 "\xcf\x5e\x3a\x46\x3d\xfb\xd0\x69"
31886 "\xde\xaf\x7a\xd5\x0d\xe9\x52\xec"
31887 "\xc2\x82\xe5\x3e\x7d\xb2\x4a\xd9"
31888 "\xbb\xc3\x9f\xc0\x5d\xac\x93\x8d"
31889 "\x0e\x6f\xd3\xd7\xfb\x6a\x0d\xce"
31890 "\x92\x2c\xf7\xbb\x93\x57\xcc\xee"
31891 "\x42\x72\x6f\xc8\x4b\xd2\x76\xbf"
31892 "\xa0\xe3\x7a\x39\xf9\x5c\x8e\xfd"
31893 "\xa1\x1d\x41\xe5\x08\xc1\x1c\x11"
31894 "\x92\xfd\x39\x5c\x51\xd0\x2f\x66"
31895 "\x33\x4a\x71\x15\xfe\xee\x12\x54"
31896 "\x8c\x8f\x34\xd8\x50\x3c\x18\xa6"
31897 "\xc5\xe1\x46\x8a\xfb\x5f\x7e\x25"
31898 "\x9b\xe2\xc3\x66\x41\x2b\xb3\xa5"
31899 "\x57\x0e\x94\x17\x26\x39\xbb\x54"
31900 "\xae\x2e\x6f\x42\xfb\x4d\x89\x6f"
31901 "\x9d\xf1\x16\x2e\xe3\xe7\xfc\xe3"
31902 "\xb2\x4b\x2b\xa6\x7c\x04\x69\x3a"
31903 "\x70\x5a\xa7\xf1\x31\x64\x19\xca"
31904 "\x45\x79\xd8\x58\x23\x61\xaf\xc2"
31905 "\x52\x05\xc3\x0b\xc1\x64\x7c\x81"
31906 "\xd9\x11\xcf\xff\x02\x3d\x51\x84"
31907 "\x01\xac\xc6\x2e\x34\x2b\x09\x3a"
31908 "\xa8\x5d\x98\x0e\x89\xd9\xef\x8f"
31909 "\xd9\xd7\x7d\xdd\x63\x47\x46\x7d"
31910 "\xa1\xda\x0b\x53\x7d\x79\xcd\xc9"
31911 "\x86\xdd\x6b\x13\xa1\x9a\x70\xdd"
31912 "\x5c\xa1\x69\x3c\xe4\x5d\xe3\x8c"
31913 "\xe5\xf4\x87\x9c\x10\xcf\x0f\x0b"
31914 "\xc8\x43\xdc\xf8\x1d\x62\x5e\x5b"
31915 "\xe2\x03\x06\xc5\x71\xb6\x48\xa5"
31916 "\xf0\x0f\x2d\xd5\xa2\x73\x55\x8f"
31917 "\x01\xa7\x59\x80\x5f\x11\x6c\x40"
31918 "\xff\xb1\xf2\xc6\x7e\x01\xbb\x1c"
31919 "\x69\x9c\xc9\x3f\x71\x5f\x07\x7e"
31920 "\xdf\x6f\x99\xca\x9c\xfd\xf9\xb9"
31921 "\x49\xe7\xcc\x91\xd5\x9b\x8f\x03"
31922 "\xae\xe7\x61\x32\xef\x41\x6c\x75"
31923 "\x84\x9b\x8c\xce\x1d\x6b\x93\x21"
31924 "\x41\xec\xc6\xad\x8e\x0c\x48\xa8"
31925 "\xe2\xf5\x57\xde\xf7\x38\xfd\x4a"
31926 "\x6f\xa7\x4a\xf9\xac\x7d\xb1\x85"
31927 "\x7d\x6c\x95\x0a\x5a\xcf\x68\xd2"
31928 "\xe0\x7a\x26\xd9\xc1\x6d\x3e\xc6"
31929 "\x37\xbd\xbe\x24\x36\x77\x9f\x1b"
31930 "\xc1\x22\xf3\x79\xae\x95\x78\x66"
31931 "\x97\x11\xc0\x1a\xf1\xe8\x0d\x38"
31932 "\x09\xc2\xee\xb7\xd3\x46\x7b\x59"
31933 "\x77\x23\xe8\xb4\x92\x3d\x78\xbe"
31934 "\xe2\x25\x63\xa5\x2a\x06\x70\x92"
31935 "\x32\x63\xf9\x19\x21\x68\xe1\x0b"
31936 "\x9a\xd0\xee\x21\xdb\x1f\xe0\xde"
31937 "\x3e\x64\x02\x4d\x0e\xe0\x0a\xa9"
31938 "\xed\x19\x8c\xa8\xbf\xe3\x2e\x75"
31939 "\x24\x2b\xb0\xe5\x82\x6a\x1e\x6f"
31940 "\x71\x2a\x3a\x60\xed\x06\x0d\x17"
31941 "\xa2\xdb\x29\x1d\xae\xb2\xc4\xfb"
31942 "\x94\x04\xd8\x58\xfc\xc4\x04\x4e"
31943 "\xee\xc7\xc1\x0f\xe9\x9b\x63\x2d"
31944 "\x02\x3e\x02\x67\xe5\xd8\xbb\x79"
31945 "\xdf\xd2\xeb\x50\xe9\x0a\x02\x46"
31946 "\xdf\x68\xcf\xe7\x2b\x0a\x56\xd6"
31947 "\xf7\xbc\x44\xad\xb8\xb5\x5f\xeb"
31948 "\xbc\x74\x6b\xe8\x7e\xb0\x60\xc6"
31949 "\x0d\x96\x09\xbb\x19\xba\xe0\x3c"
31950 "\xc4\x6c\xbf\x0f\x58\xc0\x55\x62"
31951 "\x23\xa0\xff\xb5\x1c\xfd\x18\xe1"
31952 "\xcf\x6d\xd3\x52\xb4\xce\xa6\xfa"
31953 "\xaa\xfb\x1b\x0b\x42\x6d\x79\x42"
31954 "\x48\x70\x5b\x0e\xdd\x3a\xc9\x69"
31955 "\x8b\x73\x67\xf6\x95\xdb\x8c\xfb"
31956 "\xfd\xb5\x08\x47\x42\x84\x9a\xfa"
31957 "\xcc\x67\xb2\x3c\xb6\xfd\xd8\x32"
31958 "\xd6\x04\xb6\x4a\xea\x53\x4b\xf5"
31959 "\x94\x16\xad\xf0\x10\x2e\x2d\xb4"
31960 "\x8b\xab\xe5\x89\xc7\x39\x12\xf3"
31961 "\x8d\xb5\x96\x0b\x87\x5d\xa7\x7c"
31962 "\xb0\xc2\xf6\x2e\x57\x97\x2c\xdc"
31963 "\x54\x1c\x34\x72\xde\x0c\x68\x39"
31964 "\x9d\x32\xa5\x75\x92\x13\x32\xea"
31965 "\x90\x27\xbd\x5b\x1d\xb9\x21\x02"
31966 "\x1c\xcc\xba\x97\x5e\x49\x58\xe8"
31967 "\xac\x8b\xf3\xce\x3c\xf0\x00\xe9"
31968 "\x6c\xae\xe9\x77\xdf\xf4\x02\xcd"
31969 "\x55\x25\x89\x9e\x90\xf3\x6b\x8f"
31970 "\xb7\xd6\x47\x98\x26\x2f\x31\x2f"
31971 "\x8d\xbf\x54\xcd\x99\xeb\x80\xd7"
31972 "\xac\xc3\x08\xc2\xa6\x32\xf1\x24"
31973 "\x76\x7c\x4f\x78\x53\x55\xfb\x00"
31974 "\x8a\xd6\x52\x53\x25\x45\xfb\x0a"
31975 "\x6b\xb9\xbe\x3c\x5e\x11\xcc\x6a"
31976 "\xdd\xfc\xa7\xc4\x79\x4d\xbd\xfb"
31977 "\xce\x3a\xf1\x7a\xda\xeb\xfe\x64"
31978 "\x28\x3d\x0f\xee\x80\xba\x0c\xf8"
31979 "\xe9\x5b\x3a\xd4\xae\xc9\xf3\x0e"
31980 "\xe8\x5d\xc5\x5c\x0b\x20\x20\xee"
31981 "\x40\x0d\xde\x07\xa7\x14\xb4\x90"
31982 "\xb6\xbd\x3b\xae\x7d\x2b\xa7\xc7"
31983 "\xdc\x0b\x4c\x5d\x65\xb0\xd2\xc5"
31984 "\x79\x61\x23\xe0\xa2\x99\x73\x55"
31985 "\xad\xc6\xfb\xc7\x54\xb5\x98\x1f"
31986 "\x8c\x86\xc2\x3f\xbe\x5e\xea\x64"
31987 "\xa3\x60\x18\x9f\x80\xaf\x52\x74"
31988 "\x1a\xfe\x22\xc2\x92\x67\x40\x02"
31989 "\x08\xee\x67\x5b\x67\xe0\x3d\xde"
31990 "\x7a\xaf\x8e\x28\xf3\x5e\x0e\xf4"
31991 "\x48\x56\xaa\x85\x22\xd8\x36\xed"
31992 "\x3b\x3d\x68\x69\x30\xbc\x71\x23"
31993 "\xb1\x6e\x61\x03\x89\x44\x03\xf4"
31994 "\x32\xaa\x4c\x40\x9f\x69\xfb\x70"
31995 "\x91\xcc\x1f\x11\xbd\x76\x67\xe6"
31996 "\x10\x8b\x29\x39\x68\xea\x4e\x6d"
31997 "\xae\xfb\x40\xcf\xe2\xd0\x0d\x8d"
31998 "\x6f\xed\x9b\x8d\x64\x7a\x94\x8e"
31999 "\x32\x38\x78\xeb\x7d\x5f\xf9\x4d"
32000 "\x13\xbe\x21\xea\x16\xe7\x5c\xee"
32001 "\xcd\xf6\x5f\xc6\x45\xb2\x8f\x2b"
32002 "\xb5\x93\x3e\x45\xdb\xfd\xa2\x6a"
32003 "\xec\x83\x92\x99\x87\x47\xe0\x7c"
32004 "\xa2\x7b\xc4\x2a\xcd\xc0\x81\x03"
32005 "\x98\xb0\x87\xb6\x86\x13\x64\x33"
32006 "\x4c\xd7\x99\xbf\xdb\x7b\x6e\xaa"
32007 "\x76\xcc\xa0\x74\x1b\xa3\x6e\x83"
32008 "\xd4\xba\x7a\x84\x9d\x91\x71\xcd"
32009 "\x60\x2d\x56\xfd\x26\x35\xcb\xeb"
32010 "\xac\xe9\xee\xa4\xfc\x18\x5b\x91"
32011 "\xd5\xfe\x84\x45\xe0\xc7\xfd\x11"
32012 "\xe9\x00\xb6\x54\xdf\xe1\x94\xde"
32013 "\x2b\x70\x9f\x94\x7f\x15\x0e\x83"
32014 "\x63\x10\xb3\xf5\xea\xd3\xe8\xd1"
32015 "\xa5\xfc\x17\x19\x68\x9a\xbc\x17"
32016 "\x30\x43\x0a\x1a\x33\x92\xd4\x2a"
32017 "\x2e\x68\x99\xbc\x49\xf0\x68\xe3"
32018 "\xf0\x1f\xcb\xcc\xfa\xbb\x05\x56"
32019 "\x46\x84\x8b\x69\x83\x64\xc5\xe0"
32020 "\xc5\x52\x99\x07\x3c\xa6\x5c\xaf"
32021 "\xa3\xde\xd7\xdb\x43\xe6\xb7\x76"
32022 "\x4e\x4d\xd6\x71\x60\x63\x4a\x0c"
32023 "\x5f\xae\x25\x84\x22\x90\x5f\x26"
32024 "\x61\x4d\x8f\xaf\xc9\x22\xf2\x05"
32025 "\xcf\xc1\xdc\x68\xe5\x57\x8e\x24"
32026 "\x1b\x30\x59\xca\xd7\x0d\xc3\xd3"
32027 "\x52\x9e\x09\x3e\x0e\xaf\xdb\x5f"
32028 "\xc7\x2b\xde\x3a\xfd\xad\x93\x04"
32029 "\x74\x06\x89\x0e\x90\xeb\x85\xff"
32030 "\xe6\x3c\x12\x42\xf4\xfa\x80\x75"
32031 "\x5e\x4e\xd7\x2f\x93\x0b\x34\x41"
32032 "\x02\x85\x68\xd0\x03\x12\xde\x92"
32033 "\x54\x7a\x7e\xfb\x55\xe7\x88\xfb"
32034 "\xa4\xa9\xf2\xd1\xc6\x70\x06\x37"
32035 "\x25\xee\xa7\x6e\xd9\x89\x86\x50"
32036 "\x2e\x07\xdb\xfb\x2a\x86\x45\x0e"
32037 "\x91\xf4\x7c\xbb\x12\x60\xe8\x3f"
32038 "\x71\xbe\x8f\x9d\x26\xef\xd9\x89"
32039 "\xc4\x8f\xd8\xc5\x73\xd8\x84\xaa"
32040 "\x2f\xad\x22\x1e\x7e\xcf\xa2\x08"
32041 "\x23\x45\x89\x42\xa0\x30\xeb\xbf"
32042 "\xa1\xed\xad\xd5\x76\xfa\x24\x8f"
32043 "\x98",
32044 .rlen = 1281,
Martin Willi3590ebf2015-06-01 13:43:57 +020032045 },
32046};
32047
Herbert Xuda7f0332008-07-31 17:08:25 +080032048/*
32049 * CTS (Cipher Text Stealing) mode tests
32050 */
32051#define CTS_MODE_ENC_TEST_VECTORS 6
32052#define CTS_MODE_DEC_TEST_VECTORS 6
32053static struct cipher_testvec cts_mode_enc_tv_template[] = {
32054 { /* from rfc3962 */
32055 .klen = 16,
32056 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32057 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32058 .ilen = 17,
32059 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32060 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32061 "\x20",
32062 .rlen = 17,
32063 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
32064 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
32065 "\x97",
32066 }, {
32067 .klen = 16,
32068 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32069 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32070 .ilen = 31,
32071 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32072 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32073 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32074 "\x20\x47\x61\x75\x27\x73\x20",
32075 .rlen = 31,
32076 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
32077 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
32078 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32079 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
32080 }, {
32081 .klen = 16,
32082 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32083 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32084 .ilen = 32,
32085 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32086 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32087 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32088 "\x20\x47\x61\x75\x27\x73\x20\x43",
32089 .rlen = 32,
32090 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32091 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32092 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32093 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
32094 }, {
32095 .klen = 16,
32096 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32097 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32098 .ilen = 47,
32099 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32100 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32101 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32102 "\x20\x47\x61\x75\x27\x73\x20\x43"
32103 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32104 "\x70\x6c\x65\x61\x73\x65\x2c",
32105 .rlen = 47,
32106 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32107 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32108 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
32109 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
32110 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32111 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
32112 }, {
32113 .klen = 16,
32114 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32115 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32116 .ilen = 48,
32117 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32118 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32119 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32120 "\x20\x47\x61\x75\x27\x73\x20\x43"
32121 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32122 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
32123 .rlen = 48,
32124 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32125 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32126 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32127 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
32128 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32129 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
32130 }, {
32131 .klen = 16,
32132 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32133 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32134 .ilen = 64,
32135 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32136 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32137 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32138 "\x20\x47\x61\x75\x27\x73\x20\x43"
32139 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32140 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
32141 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
32142 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
32143 .rlen = 64,
32144 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32145 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32146 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32147 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32148 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
32149 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
32150 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32151 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
32152 }
32153};
32154
32155static struct cipher_testvec cts_mode_dec_tv_template[] = {
32156 { /* from rfc3962 */
32157 .klen = 16,
32158 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32159 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32160 .rlen = 17,
32161 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32162 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32163 "\x20",
32164 .ilen = 17,
32165 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
32166 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
32167 "\x97",
32168 }, {
32169 .klen = 16,
32170 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32171 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32172 .rlen = 31,
32173 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32174 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32175 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32176 "\x20\x47\x61\x75\x27\x73\x20",
32177 .ilen = 31,
32178 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
32179 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
32180 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32181 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
32182 }, {
32183 .klen = 16,
32184 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32185 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32186 .rlen = 32,
32187 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32188 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32189 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32190 "\x20\x47\x61\x75\x27\x73\x20\x43",
32191 .ilen = 32,
32192 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32193 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32194 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32195 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
32196 }, {
32197 .klen = 16,
32198 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32199 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32200 .rlen = 47,
32201 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32202 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32203 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32204 "\x20\x47\x61\x75\x27\x73\x20\x43"
32205 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32206 "\x70\x6c\x65\x61\x73\x65\x2c",
32207 .ilen = 47,
32208 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32209 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32210 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
32211 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
32212 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32213 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
32214 }, {
32215 .klen = 16,
32216 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32217 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32218 .rlen = 48,
32219 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32220 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32221 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32222 "\x20\x47\x61\x75\x27\x73\x20\x43"
32223 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32224 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
32225 .ilen = 48,
32226 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32227 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32228 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32229 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
32230 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32231 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
32232 }, {
32233 .klen = 16,
32234 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32235 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32236 .rlen = 64,
32237 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32238 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32239 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32240 "\x20\x47\x61\x75\x27\x73\x20\x43"
32241 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32242 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
32243 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
32244 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
32245 .ilen = 64,
32246 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32247 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32248 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32249 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32250 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
32251 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
32252 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32253 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
32254 }
32255};
32256
32257/*
32258 * Compression stuff.
32259 */
32260#define COMP_BUF_SIZE 512
32261
32262struct comp_testvec {
32263 int inlen, outlen;
32264 char input[COMP_BUF_SIZE];
32265 char output[COMP_BUF_SIZE];
32266};
32267
32268/*
32269 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110032270 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080032271 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080032272
Herbert Xuda7f0332008-07-31 17:08:25 +080032273#define DEFLATE_COMP_TEST_VECTORS 2
32274#define DEFLATE_DECOMP_TEST_VECTORS 2
32275
32276static struct comp_testvec deflate_comp_tv_template[] = {
32277 {
32278 .inlen = 70,
32279 .outlen = 38,
32280 .input = "Join us now and share the software "
32281 "Join us now and share the software ",
32282 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
32283 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
32284 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
32285 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
32286 "\x71\xbc\x08\x2b\x01\x00",
32287 }, {
32288 .inlen = 191,
32289 .outlen = 122,
32290 .input = "This document describes a compression method based on the DEFLATE"
32291 "compression algorithm. This document defines the application of "
32292 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
32293 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
32294 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
32295 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
32296 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
32297 "\x68\x12\x51\xae\x76\x67\xd6\x27"
32298 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
32299 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
32300 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
32301 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
32302 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
32303 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
32304 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
32305 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
32306 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
32307 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
32308 "\xfa\x02",
32309 },
32310};
32311
32312static struct comp_testvec deflate_decomp_tv_template[] = {
32313 {
32314 .inlen = 122,
32315 .outlen = 191,
32316 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
32317 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
32318 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
32319 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
32320 "\x68\x12\x51\xae\x76\x67\xd6\x27"
32321 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
32322 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
32323 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
32324 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
32325 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
32326 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
32327 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
32328 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
32329 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
32330 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
32331 "\xfa\x02",
32332 .output = "This document describes a compression method based on the DEFLATE"
32333 "compression algorithm. This document defines the application of "
32334 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
32335 }, {
32336 .inlen = 38,
32337 .outlen = 70,
32338 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
32339 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
32340 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
32341 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
32342 "\x71\xbc\x08\x2b\x01\x00",
32343 .output = "Join us now and share the software "
32344 "Join us now and share the software ",
32345 },
32346};
32347
Herbert Xuda7f0332008-07-31 17:08:25 +080032348/*
32349 * LZO test vectors (null-terminated strings).
32350 */
32351#define LZO_COMP_TEST_VECTORS 2
32352#define LZO_DECOMP_TEST_VECTORS 2
32353
32354static struct comp_testvec lzo_comp_tv_template[] = {
32355 {
32356 .inlen = 70,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032357 .outlen = 57,
Herbert Xuda7f0332008-07-31 17:08:25 +080032358 .input = "Join us now and share the software "
32359 "Join us now and share the software ",
32360 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032361 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
32362 "\x64\x20\x73\x68\x61\x72\x65\x20"
32363 "\x74\x68\x65\x20\x73\x6f\x66\x74"
32364 "\x77\x70\x01\x32\x88\x00\x0c\x65"
32365 "\x20\x74\x68\x65\x20\x73\x6f\x66"
32366 "\x74\x77\x61\x72\x65\x20\x11\x00"
32367 "\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080032368 }, {
32369 .inlen = 159,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032370 .outlen = 131,
Herbert Xuda7f0332008-07-31 17:08:25 +080032371 .input = "This document describes a compression method based on the LZO "
32372 "compression algorithm. This document defines the application of "
32373 "the LZO algorithm used in UBIFS.",
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032374 .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
Herbert Xuda7f0332008-07-31 17:08:25 +080032375 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
32376 "\x64\x65\x73\x63\x72\x69\x62\x65"
32377 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
32378 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
32379 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
32380 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032381 "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
32382 "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
32383 "\x72\x69\x74\x68\x6d\x2e\x20\x20"
32384 "\x2e\x54\x01\x03\x66\x69\x6e\x65"
32385 "\x73\x20\x74\x06\x05\x61\x70\x70"
32386 "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
32387 "\x66\x88\x02\x60\x09\x27\xf0\x00"
32388 "\x0c\x20\x75\x73\x65\x64\x20\x69"
32389 "\x6e\x20\x55\x42\x49\x46\x53\x2e"
32390 "\x11\x00\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080032391 },
32392};
32393
32394static struct comp_testvec lzo_decomp_tv_template[] = {
32395 {
32396 .inlen = 133,
32397 .outlen = 159,
32398 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
32399 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
32400 "\x64\x65\x73\x63\x72\x69\x62\x65"
32401 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
32402 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
32403 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
32404 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
32405 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
32406 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
32407 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
32408 "\x68\x69\x73\x2a\x54\x01\x02\x66"
32409 "\x69\x6e\x65\x73\x94\x06\x05\x61"
32410 "\x70\x70\x6c\x69\x63\x61\x74\x76"
32411 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
32412 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
32413 "\x20\x69\x6e\x20\x55\x42\x49\x46"
32414 "\x53\x2e\x11\x00\x00",
32415 .output = "This document describes a compression method based on the LZO "
32416 "compression algorithm. This document defines the application of "
32417 "the LZO algorithm used in UBIFS.",
32418 }, {
32419 .inlen = 46,
32420 .outlen = 70,
32421 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
32422 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
32423 "\x64\x20\x73\x68\x61\x72\x65\x20"
32424 "\x74\x68\x65\x20\x73\x6f\x66\x74"
32425 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
32426 "\x3d\x88\x00\x11\x00\x00",
32427 .output = "Join us now and share the software "
32428 "Join us now and share the software ",
32429 },
32430};
32431
32432/*
32433 * Michael MIC test vectors from IEEE 802.11i
32434 */
32435#define MICHAEL_MIC_TEST_VECTORS 6
32436
32437static struct hash_testvec michael_mic_tv_template[] = {
32438 {
32439 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
32440 .ksize = 8,
32441 .plaintext = zeroed_string,
32442 .psize = 0,
32443 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
32444 },
32445 {
32446 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
32447 .ksize = 8,
32448 .plaintext = "M",
32449 .psize = 1,
32450 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
32451 },
32452 {
32453 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
32454 .ksize = 8,
32455 .plaintext = "Mi",
32456 .psize = 2,
32457 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
32458 },
32459 {
32460 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
32461 .ksize = 8,
32462 .plaintext = "Mic",
32463 .psize = 3,
32464 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
32465 },
32466 {
32467 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
32468 .ksize = 8,
32469 .plaintext = "Mich",
32470 .psize = 4,
32471 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
32472 },
32473 {
32474 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
32475 .ksize = 8,
32476 .plaintext = "Michael",
32477 .psize = 7,
32478 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
32479 }
32480};
32481
32482/*
Ard Biesheuvelebb34722015-05-04 11:00:17 +020032483 * CRC32 test vectors
32484 */
32485#define CRC32_TEST_VECTORS 14
32486
32487static struct hash_testvec crc32_tv_template[] = {
32488 {
32489 .key = "\x87\xa9\xcb\xed",
32490 .ksize = 4,
32491 .psize = 0,
32492 .digest = "\x87\xa9\xcb\xed",
32493 },
32494 {
32495 .key = "\xff\xff\xff\xff",
32496 .ksize = 4,
32497 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
32498 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
32499 "\x11\x12\x13\x14\x15\x16\x17\x18"
32500 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
32501 "\x21\x22\x23\x24\x25\x26\x27\x28",
32502 .psize = 40,
32503 .digest = "\x3a\xdf\x4b\xb0",
32504 },
32505 {
32506 .key = "\xff\xff\xff\xff",
32507 .ksize = 4,
32508 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32509 "\x31\x32\x33\x34\x35\x36\x37\x38"
32510 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32511 "\x41\x42\x43\x44\x45\x46\x47\x48"
32512 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
32513 .psize = 40,
32514 .digest = "\xa9\x7a\x7f\x7b",
32515 },
32516 {
32517 .key = "\xff\xff\xff\xff",
32518 .ksize = 4,
32519 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
32520 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32521 "\x61\x62\x63\x64\x65\x66\x67\x68"
32522 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32523 "\x71\x72\x73\x74\x75\x76\x77\x78",
32524 .psize = 40,
32525 .digest = "\xba\xd3\xf8\x1c",
32526 },
32527 {
32528 .key = "\xff\xff\xff\xff",
32529 .ksize = 4,
32530 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32531 "\x81\x82\x83\x84\x85\x86\x87\x88"
32532 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32533 "\x91\x92\x93\x94\x95\x96\x97\x98"
32534 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
32535 .psize = 40,
32536 .digest = "\xa8\xa9\xc2\x02",
32537 },
32538 {
32539 .key = "\xff\xff\xff\xff",
32540 .ksize = 4,
32541 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32542 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32543 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32544 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32545 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
32546 .psize = 40,
32547 .digest = "\x27\xf0\x57\xe2",
32548 },
32549 {
32550 .key = "\xff\xff\xff\xff",
32551 .ksize = 4,
32552 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
32553 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
32554 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
32555 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
32556 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
32557 .psize = 40,
32558 .digest = "\x49\x78\x10\x08",
32559 },
32560 {
32561 .key = "\x80\xea\xd3\xf1",
32562 .ksize = 4,
32563 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32564 "\x31\x32\x33\x34\x35\x36\x37\x38"
32565 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32566 "\x41\x42\x43\x44\x45\x46\x47\x48"
32567 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
32568 .psize = 40,
32569 .digest = "\x9a\xb1\xdc\xf0",
32570 },
32571 {
32572 .key = "\xf3\x4a\x1d\x5d",
32573 .ksize = 4,
32574 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
32575 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32576 "\x61\x62\x63\x64\x65\x66\x67\x68"
32577 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32578 "\x71\x72\x73\x74\x75\x76\x77\x78",
32579 .psize = 40,
32580 .digest = "\xb4\x97\xcc\xd4",
32581 },
32582 {
32583 .key = "\x2e\x80\x04\x59",
32584 .ksize = 4,
32585 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32586 "\x81\x82\x83\x84\x85\x86\x87\x88"
32587 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32588 "\x91\x92\x93\x94\x95\x96\x97\x98"
32589 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
32590 .psize = 40,
32591 .digest = "\x67\x9b\xfa\x79",
32592 },
32593 {
32594 .key = "\xa6\xcc\x19\x85",
32595 .ksize = 4,
32596 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32597 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32598 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32599 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32600 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
32601 .psize = 40,
32602 .digest = "\x24\xb5\x16\xef",
32603 },
32604 {
32605 .key = "\x41\xfc\xfe\x2d",
32606 .ksize = 4,
32607 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
32608 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
32609 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
32610 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
32611 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
32612 .psize = 40,
32613 .digest = "\x15\x94\x80\x39",
32614 },
32615 {
32616 .key = "\xff\xff\xff\xff",
32617 .ksize = 4,
32618 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
32619 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
32620 "\x11\x12\x13\x14\x15\x16\x17\x18"
32621 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
32622 "\x21\x22\x23\x24\x25\x26\x27\x28"
32623 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32624 "\x31\x32\x33\x34\x35\x36\x37\x38"
32625 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32626 "\x41\x42\x43\x44\x45\x46\x47\x48"
32627 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
32628 "\x51\x52\x53\x54\x55\x56\x57\x58"
32629 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32630 "\x61\x62\x63\x64\x65\x66\x67\x68"
32631 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32632 "\x71\x72\x73\x74\x75\x76\x77\x78"
32633 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32634 "\x81\x82\x83\x84\x85\x86\x87\x88"
32635 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32636 "\x91\x92\x93\x94\x95\x96\x97\x98"
32637 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
32638 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32639 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32640 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32641 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32642 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
32643 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
32644 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
32645 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
32646 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
32647 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
32648 .psize = 240,
32649 .digest = "\x6c\xc6\x56\xde",
32650 .np = 2,
32651 .tap = { 31, 209 }
32652 }, {
32653 .key = "\xff\xff\xff\xff",
32654 .ksize = 4,
32655 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
32656 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
32657 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
32658 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
32659 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
32660 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
32661 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
32662 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
32663 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
32664 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
32665 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
32666 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
32667 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
32668 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
32669 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
32670 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
32671 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
32672 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
32673 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
32674 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
32675 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
32676 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
32677 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
32678 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
32679 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
32680 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
32681 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
32682 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
32683 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
32684 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
32685 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
32686 "\x47\xde\x75\x0c\x80\x17\xae\x22"
32687 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
32688 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
32689 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
32690 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
32691 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
32692 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
32693 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
32694 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
32695 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
32696 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
32697 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
32698 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
32699 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
32700 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
32701 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
32702 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
32703 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
32704 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
32705 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
32706 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
32707 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
32708 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
32709 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
32710 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
32711 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
32712 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
32713 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
32714 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
32715 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
32716 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
32717 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
32718 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
32719 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
32720 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
32721 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
32722 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
32723 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
32724 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
32725 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
32726 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
32727 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
32728 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
32729 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
32730 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
32731 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
32732 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
32733 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
32734 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
32735 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
32736 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
32737 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
32738 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
32739 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
32740 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
32741 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
32742 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
32743 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
32744 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
32745 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
32746 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
32747 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
32748 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
32749 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
32750 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
32751 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
32752 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
32753 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
32754 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
32755 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
32756 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
32757 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
32758 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
32759 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
32760 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
32761 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
32762 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
32763 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
32764 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
32765 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
32766 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
32767 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
32768 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
32769 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
32770 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
32771 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
32772 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
32773 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
32774 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
32775 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
32776 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
32777 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
32778 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
32779 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
32780 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
32781 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
32782 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
32783 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
32784 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
32785 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
32786 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
32787 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
32788 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
32789 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
32790 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
32791 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
32792 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
32793 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
32794 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
32795 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
32796 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
32797 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
32798 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
32799 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
32800 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
32801 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
32802 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
32803 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
32804 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
32805 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
32806 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
32807 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
32808 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
32809 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
32810 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
32811 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
32812 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
32813 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
32814 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
32815 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
32816 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
32817 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
32818 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
32819 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
32820 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
32821 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
32822 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
32823 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
32824 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
32825 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
32826 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
32827 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
32828 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
32829 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
32830 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
32831 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
32832 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
32833 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
32834 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
32835 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
32836 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
32837 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
32838 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
32839 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
32840 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
32841 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
32842 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
32843 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
32844 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
32845 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
32846 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
32847 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
32848 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
32849 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
32850 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
32851 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
32852 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
32853 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
32854 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
32855 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
32856 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
32857 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
32858 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
32859 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
32860 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
32861 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
32862 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
32863 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
32864 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
32865 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
32866 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
32867 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
32868 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
32869 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
32870 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
32871 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
32872 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
32873 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
32874 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
32875 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
32876 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
32877 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
32878 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
32879 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
32880 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
32881 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
32882 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
32883 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
32884 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
32885 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
32886 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
32887 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
32888 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
32889 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
32890 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
32891 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
32892 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
32893 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
32894 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
32895 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
32896 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
32897 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
32898 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
32899 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
32900 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
32901 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
32902 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
32903 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
32904 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
32905 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
32906 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
32907 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
32908 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
32909 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
32910 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
32911 .psize = 2048,
32912 .digest = "\xfb\x3a\x7a\xda",
32913 }
32914};
32915
32916/*
Herbert Xuda7f0332008-07-31 17:08:25 +080032917 * CRC32C test vectors
32918 */
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020032919#define CRC32C_TEST_VECTORS 15
Herbert Xuda7f0332008-07-31 17:08:25 +080032920
32921static struct hash_testvec crc32c_tv_template[] = {
32922 {
32923 .psize = 0,
32924 .digest = "\x00\x00\x00\x00",
32925 },
32926 {
32927 .key = "\x87\xa9\xcb\xed",
32928 .ksize = 4,
32929 .psize = 0,
32930 .digest = "\x78\x56\x34\x12",
32931 },
32932 {
32933 .key = "\xff\xff\xff\xff",
32934 .ksize = 4,
32935 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
32936 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
32937 "\x11\x12\x13\x14\x15\x16\x17\x18"
32938 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
32939 "\x21\x22\x23\x24\x25\x26\x27\x28",
32940 .psize = 40,
32941 .digest = "\x7f\x15\x2c\x0e",
32942 },
32943 {
32944 .key = "\xff\xff\xff\xff",
32945 .ksize = 4,
32946 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32947 "\x31\x32\x33\x34\x35\x36\x37\x38"
32948 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32949 "\x41\x42\x43\x44\x45\x46\x47\x48"
32950 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
32951 .psize = 40,
32952 .digest = "\xf6\xeb\x80\xe9",
32953 },
32954 {
32955 .key = "\xff\xff\xff\xff",
32956 .ksize = 4,
32957 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
32958 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32959 "\x61\x62\x63\x64\x65\x66\x67\x68"
32960 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32961 "\x71\x72\x73\x74\x75\x76\x77\x78",
32962 .psize = 40,
32963 .digest = "\xed\xbd\x74\xde",
32964 },
32965 {
32966 .key = "\xff\xff\xff\xff",
32967 .ksize = 4,
32968 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32969 "\x81\x82\x83\x84\x85\x86\x87\x88"
32970 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32971 "\x91\x92\x93\x94\x95\x96\x97\x98"
32972 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
32973 .psize = 40,
32974 .digest = "\x62\xc8\x79\xd5",
32975 },
32976 {
32977 .key = "\xff\xff\xff\xff",
32978 .ksize = 4,
32979 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32980 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32981 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32982 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32983 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
32984 .psize = 40,
32985 .digest = "\xd0\x9a\x97\xba",
32986 },
32987 {
32988 .key = "\xff\xff\xff\xff",
32989 .ksize = 4,
32990 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
32991 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
32992 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
32993 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
32994 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
32995 .psize = 40,
32996 .digest = "\x13\xd9\x29\x2b",
32997 },
32998 {
32999 .key = "\x80\xea\xd3\xf1",
33000 .ksize = 4,
33001 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33002 "\x31\x32\x33\x34\x35\x36\x37\x38"
33003 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33004 "\x41\x42\x43\x44\x45\x46\x47\x48"
33005 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
33006 .psize = 40,
33007 .digest = "\x0c\xb5\xe2\xa2",
33008 },
33009 {
33010 .key = "\xf3\x4a\x1d\x5d",
33011 .ksize = 4,
33012 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
33013 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33014 "\x61\x62\x63\x64\x65\x66\x67\x68"
33015 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33016 "\x71\x72\x73\x74\x75\x76\x77\x78",
33017 .psize = 40,
33018 .digest = "\xd1\x7f\xfb\xa6",
33019 },
33020 {
33021 .key = "\x2e\x80\x04\x59",
33022 .ksize = 4,
33023 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33024 "\x81\x82\x83\x84\x85\x86\x87\x88"
33025 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33026 "\x91\x92\x93\x94\x95\x96\x97\x98"
33027 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
33028 .psize = 40,
33029 .digest = "\x59\x33\xe6\x7a",
33030 },
33031 {
33032 .key = "\xa6\xcc\x19\x85",
33033 .ksize = 4,
33034 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33035 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33036 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33037 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33038 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
33039 .psize = 40,
33040 .digest = "\xbe\x03\x01\xd2",
33041 },
33042 {
33043 .key = "\x41\xfc\xfe\x2d",
33044 .ksize = 4,
33045 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33046 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33047 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33048 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33049 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33050 .psize = 40,
33051 .digest = "\x75\xd3\xc5\x24",
33052 },
33053 {
33054 .key = "\xff\xff\xff\xff",
33055 .ksize = 4,
33056 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33057 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33058 "\x11\x12\x13\x14\x15\x16\x17\x18"
33059 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33060 "\x21\x22\x23\x24\x25\x26\x27\x28"
33061 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33062 "\x31\x32\x33\x34\x35\x36\x37\x38"
33063 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33064 "\x41\x42\x43\x44\x45\x46\x47\x48"
33065 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
33066 "\x51\x52\x53\x54\x55\x56\x57\x58"
33067 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33068 "\x61\x62\x63\x64\x65\x66\x67\x68"
33069 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33070 "\x71\x72\x73\x74\x75\x76\x77\x78"
33071 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33072 "\x81\x82\x83\x84\x85\x86\x87\x88"
33073 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33074 "\x91\x92\x93\x94\x95\x96\x97\x98"
33075 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
33076 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33077 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33078 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33079 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33080 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
33081 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33082 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33083 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33084 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33085 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33086 .psize = 240,
33087 .digest = "\x75\xd3\xc5\x24",
33088 .np = 2,
33089 .tap = { 31, 209 }
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020033090 }, {
33091 .key = "\xff\xff\xff\xff",
33092 .ksize = 4,
33093 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
33094 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
33095 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
33096 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
33097 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
33098 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
33099 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
33100 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
33101 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
33102 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
33103 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
33104 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
33105 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
33106 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
33107 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
33108 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
33109 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
33110 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
33111 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
33112 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
33113 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
33114 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
33115 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
33116 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
33117 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
33118 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
33119 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
33120 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
33121 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
33122 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
33123 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
33124 "\x47\xde\x75\x0c\x80\x17\xae\x22"
33125 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
33126 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
33127 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
33128 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
33129 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
33130 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
33131 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
33132 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
33133 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
33134 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
33135 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
33136 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
33137 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
33138 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
33139 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
33140 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
33141 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
33142 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
33143 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
33144 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
33145 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
33146 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
33147 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
33148 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
33149 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
33150 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
33151 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
33152 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
33153 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
33154 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
33155 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
33156 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
33157 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
33158 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
33159 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
33160 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
33161 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
33162 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
33163 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
33164 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
33165 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
33166 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
33167 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
33168 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
33169 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
33170 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
33171 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
33172 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
33173 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
33174 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
33175 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
33176 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
33177 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
33178 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
33179 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
33180 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
33181 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
33182 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
33183 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
33184 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
33185 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
33186 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
33187 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
33188 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
33189 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
33190 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
33191 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
33192 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
33193 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
33194 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
33195 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
33196 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
33197 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
33198 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
33199 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
33200 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
33201 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
33202 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
33203 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
33204 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
33205 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
33206 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
33207 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
33208 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
33209 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
33210 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
33211 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
33212 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
33213 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
33214 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
33215 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
33216 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
33217 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
33218 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
33219 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
33220 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
33221 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
33222 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
33223 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
33224 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
33225 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
33226 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
33227 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
33228 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
33229 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
33230 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
33231 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
33232 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
33233 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
33234 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
33235 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
33236 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
33237 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
33238 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
33239 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
33240 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
33241 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
33242 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
33243 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
33244 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
33245 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
33246 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
33247 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
33248 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
33249 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
33250 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
33251 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
33252 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
33253 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
33254 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
33255 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
33256 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
33257 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
33258 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
33259 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
33260 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
33261 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
33262 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
33263 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
33264 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
33265 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
33266 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
33267 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
33268 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
33269 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
33270 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
33271 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
33272 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
33273 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
33274 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
33275 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
33276 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
33277 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
33278 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
33279 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
33280 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
33281 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
33282 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
33283 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
33284 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
33285 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
33286 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
33287 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
33288 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
33289 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
33290 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
33291 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
33292 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
33293 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
33294 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
33295 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
33296 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
33297 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
33298 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
33299 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
33300 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
33301 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
33302 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
33303 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
33304 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
33305 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
33306 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
33307 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
33308 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
33309 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
33310 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
33311 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
33312 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
33313 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
33314 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
33315 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
33316 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
33317 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
33318 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
33319 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
33320 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
33321 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
33322 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
33323 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
33324 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
33325 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
33326 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
33327 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
33328 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
33329 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
33330 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
33331 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
33332 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
33333 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
33334 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
33335 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
33336 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
33337 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
33338 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
33339 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
33340 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
33341 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
33342 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
33343 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
33344 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
33345 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
33346 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
33347 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
33348 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
33349 .psize = 2048,
33350 .digest = "\xec\x26\x4d\x95",
33351 }
Herbert Xuda7f0332008-07-31 17:08:25 +080033352};
33353
Sonic Zhanga482b082012-05-25 17:54:13 +080033354/*
33355 * Blakcifn CRC test vectors
33356 */
33357#define BFIN_CRC_TEST_VECTORS 6
33358
33359static struct hash_testvec bfin_crc_tv_template[] = {
33360 {
33361 .psize = 0,
33362 .digest = "\x00\x00\x00\x00",
33363 },
33364 {
33365 .key = "\x87\xa9\xcb\xed",
33366 .ksize = 4,
33367 .psize = 0,
33368 .digest = "\x87\xa9\xcb\xed",
33369 },
33370 {
33371 .key = "\xff\xff\xff\xff",
33372 .ksize = 4,
33373 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33374 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33375 "\x11\x12\x13\x14\x15\x16\x17\x18"
33376 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33377 "\x21\x22\x23\x24\x25\x26\x27\x28",
33378 .psize = 40,
33379 .digest = "\x84\x0c\x8d\xa2",
33380 },
33381 {
33382 .key = "\xff\xff\xff\xff",
33383 .ksize = 4,
33384 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33385 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33386 "\x11\x12\x13\x14\x15\x16\x17\x18"
33387 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33388 "\x21\x22\x23\x24\x25\x26",
33389 .psize = 38,
33390 .digest = "\x8c\x58\xec\xb7",
33391 },
33392 {
33393 .key = "\xff\xff\xff\xff",
33394 .ksize = 4,
33395 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33396 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33397 "\x11\x12\x13\x14\x15\x16\x17\x18"
33398 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33399 "\x21\x22\x23\x24\x25\x26\x27",
33400 .psize = 39,
33401 .digest = "\xdc\x50\x28\x7b",
33402 },
33403 {
33404 .key = "\xff\xff\xff\xff",
33405 .ksize = 4,
33406 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33407 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33408 "\x11\x12\x13\x14\x15\x16\x17\x18"
33409 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33410 "\x21\x22\x23\x24\x25\x26\x27\x28"
33411 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33412 "\x31\x32\x33\x34\x35\x36\x37\x38"
33413 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33414 "\x41\x42\x43\x44\x45\x46\x47\x48"
33415 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
33416 "\x51\x52\x53\x54\x55\x56\x57\x58"
33417 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33418 "\x61\x62\x63\x64\x65\x66\x67\x68"
33419 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33420 "\x71\x72\x73\x74\x75\x76\x77\x78"
33421 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33422 "\x81\x82\x83\x84\x85\x86\x87\x88"
33423 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33424 "\x91\x92\x93\x94\x95\x96\x97\x98"
33425 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
33426 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33427 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33428 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33429 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33430 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
33431 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33432 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33433 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33434 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33435 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33436 .psize = 240,
33437 .digest = "\x10\x19\x4a\x5c",
33438 .np = 2,
33439 .tap = { 31, 209 }
33440 },
33441
33442};
33443
KOVACS Krisztian1443cc92014-08-22 10:44:36 +020033444#define LZ4_COMP_TEST_VECTORS 1
33445#define LZ4_DECOMP_TEST_VECTORS 1
33446
33447static struct comp_testvec lz4_comp_tv_template[] = {
33448 {
33449 .inlen = 70,
33450 .outlen = 45,
33451 .input = "Join us now and share the software "
33452 "Join us now and share the software ",
33453 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33454 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33455 "\x64\x20\x73\x68\x61\x72\x65\x20"
33456 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33457 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33458 "\x77\x61\x72\x65\x20",
33459 },
33460};
33461
33462static struct comp_testvec lz4_decomp_tv_template[] = {
33463 {
33464 .inlen = 45,
33465 .outlen = 70,
33466 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33467 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33468 "\x64\x20\x73\x68\x61\x72\x65\x20"
33469 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33470 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33471 "\x77\x61\x72\x65\x20",
33472 .output = "Join us now and share the software "
33473 "Join us now and share the software ",
33474 },
33475};
33476
33477#define LZ4HC_COMP_TEST_VECTORS 1
33478#define LZ4HC_DECOMP_TEST_VECTORS 1
33479
33480static struct comp_testvec lz4hc_comp_tv_template[] = {
33481 {
33482 .inlen = 70,
33483 .outlen = 45,
33484 .input = "Join us now and share the software "
33485 "Join us now and share the software ",
33486 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33487 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33488 "\x64\x20\x73\x68\x61\x72\x65\x20"
33489 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33490 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33491 "\x77\x61\x72\x65\x20",
33492 },
33493};
33494
33495static struct comp_testvec lz4hc_decomp_tv_template[] = {
33496 {
33497 .inlen = 45,
33498 .outlen = 70,
33499 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33500 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33501 "\x64\x20\x73\x68\x61\x72\x65\x20"
33502 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33503 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33504 "\x77\x61\x72\x65\x20",
33505 .output = "Join us now and share the software "
33506 "Join us now and share the software ",
33507 },
33508};
33509
Herbert Xuda7f0332008-07-31 17:08:25 +080033510#endif /* _CRYPTO_TESTMGR_H */