blob: 7358931b3082cd70878046b37b15032c0a27bc26 [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
Salvatore Benedetto802c7f12016-06-22 17:49:14 +0100136struct kpp_testvec {
137 unsigned char *secret;
138 unsigned char *b_public;
139 unsigned char *expected_a_public;
140 unsigned char *expected_ss;
141 unsigned short secret_size;
142 unsigned short b_public_size;
143 unsigned short expected_a_public_size;
144 unsigned short expected_ss_size;
145};
146
Herbert Xuda7f0332008-07-31 17:08:25 +0800147static char zeroed_string[48];
148
149/*
Tadeusz Struk946cc462015-06-16 10:31:06 -0700150 * RSA test vectors. Borrowed from openSSL.
151 */
152#ifdef CONFIG_CRYPTO_FIPS
153#define RSA_TEST_VECTORS 2
154#else
155#define RSA_TEST_VECTORS 4
156#endif
157static struct akcipher_testvec rsa_tv_template[] = {
158 {
159#ifndef CONFIG_CRYPTO_FIPS
160 .key =
Tadeusz Struk22287b02015-10-08 09:26:55 -0700161 "\x30\x81\x9A" /* sequence of 154 bytes */
162 "\x02\x01\x01" /* version - integer of 1 byte */
Tadeusz Struk946cc462015-06-16 10:31:06 -0700163 "\x02\x41" /* modulus - integer of 65 bytes */
164 "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
165 "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
166 "\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93"
167 "\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1"
168 "\xF5"
169 "\x02\x01\x11" /* public key - integer of 1 byte */
170 "\x02\x40" /* private key - integer of 64 bytes */
171 "\x0A\x03\x37\x48\x62\x64\x87\x69\x5F\x5F\x30\xBC\x38\xB9\x8B\x44"
172 "\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64"
173 "\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9"
Tadeusz Struk22287b02015-10-08 09:26:55 -0700174 "\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51"
175 "\x02\x01\x00" /* prime1 - integer of 1 byte */
176 "\x02\x01\x00" /* prime2 - integer of 1 byte */
177 "\x02\x01\x00" /* exponent1 - integer of 1 byte */
178 "\x02\x01\x00" /* exponent2 - integer of 1 byte */
179 "\x02\x01\x00", /* coefficient - integer of 1 byte */
Tadeusz Struk946cc462015-06-16 10:31:06 -0700180 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
181 .c =
182 "\x63\x1c\xcd\x7b\xe1\x7e\xe4\xde\xc9\xa8\x89\xa1\x74\xcb\x3c\x63"
183 "\x7d\x24\xec\x83\xc3\x15\xe4\x7f\x73\x05\x34\xd1\xec\x22\xbb\x8a"
184 "\x5e\x32\x39\x6d\xc1\x1d\x7d\x50\x3b\x9f\x7a\xad\xf0\x2e\x25\x53"
185 "\x9f\x6e\xbd\x4c\x55\x84\x0c\x9b\xcf\x1a\x4b\x51\x1e\x9e\x0c\x06",
Tadeusz Struk22287b02015-10-08 09:26:55 -0700186 .key_len = 157,
Tadeusz Struk946cc462015-06-16 10:31:06 -0700187 .m_size = 8,
188 .c_size = 64,
189 }, {
190 .key =
Tadeusz Struk22287b02015-10-08 09:26:55 -0700191 "\x30\x82\x01\x1D" /* sequence of 285 bytes */
192 "\x02\x01\x01" /* version - integer of 1 byte */
Tadeusz Struk946cc462015-06-16 10:31:06 -0700193 "\x02\x81\x81" /* modulus - integer of 129 bytes */
194 "\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
195 "\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
196 "\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD"
197 "\x48\x76\xED\x52\x0D\x60\xE1\xEC\x46\x19\x71\x9D\x8A\x5B\x8B\x80"
198 "\x7F\xAF\xB8\xE0\xA3\xDF\xC7\x37\x72\x3E\xE6\xB4\xB7\xD9\x3A\x25"
199 "\x84\xEE\x6A\x64\x9D\x06\x09\x53\x74\x88\x34\xB2\x45\x45\x98\x39"
200 "\x4E\xE0\xAA\xB1\x2D\x7B\x61\xA5\x1F\x52\x7A\x9A\x41\xF6\xC1\x68"
201 "\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD"
202 "\xCB"
203 "\x02\x01\x11" /* public key - integer of 1 byte */
204 "\x02\x81\x81" /* private key - integer of 129 bytes */
205 "\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD"
206 "\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41"
207 "\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69"
208 "\xD6\x87\x0D\xA2\xC0\x82\xA9\x39\xE3\x7F\xDC\xB8\x2E\xC9\x3E\xDA"
209 "\xC9\x7F\xF3\xAD\x59\x50\xAC\xCF\xBC\x11\x1C\x76\xF1\xA9\x52\x94"
210 "\x44\xE5\x6A\xAF\x68\xC5\x6C\x09\x2C\xD3\x8D\xC3\xBE\xF5\xD2\x0A"
211 "\x93\x99\x26\xED\x4F\x74\xA1\x3E\xDD\xFB\xE1\xA1\xCE\xCC\x48\x94"
212 "\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3"
Tadeusz Struk22287b02015-10-08 09:26:55 -0700213 "\xC1"
214 "\x02\x01\x00" /* prime1 - integer of 1 byte */
215 "\x02\x01\x00" /* prime2 - integer of 1 byte */
216 "\x02\x01\x00" /* exponent1 - integer of 1 byte */
217 "\x02\x01\x00" /* exponent2 - integer of 1 byte */
218 "\x02\x01\x00", /* coefficient - integer of 1 byte */
219 .key_len = 289,
Tadeusz Struk946cc462015-06-16 10:31:06 -0700220 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
221 .c =
222 "\x74\x1b\x55\xac\x47\xb5\x08\x0a\x6e\x2b\x2d\xf7\x94\xb8\x8a\x95"
223 "\xed\xa3\x6b\xc9\x29\xee\xb2\x2c\x80\xc3\x39\x3b\x8c\x62\x45\x72"
224 "\xc2\x7f\x74\x81\x91\x68\x44\x48\x5a\xdc\xa0\x7e\xa7\x0b\x05\x7f"
225 "\x0e\xa0\x6c\xe5\x8f\x19\x4d\xce\x98\x47\x5f\xbd\x5f\xfe\xe5\x34"
226 "\x59\x89\xaf\xf0\xba\x44\xd7\xf1\x1a\x50\x72\xef\x5e\x4a\xb6\xb7"
227 "\x54\x34\xd1\xc4\x83\x09\xdf\x0f\x91\x5f\x7d\x91\x70\x2f\xd4\x13"
228 "\xcc\x5e\xa4\x6c\xc3\x4d\x28\xef\xda\xaf\xec\x14\x92\xfc\xa3\x75"
229 "\x13\xb4\xc1\xa1\x11\xfc\x40\x2f\x4c\x9d\xdf\x16\x76\x11\x20\x6b",
230 .m_size = 8,
231 .c_size = 128,
232 }, {
233#endif
234 .key =
Tadeusz Struk22287b02015-10-08 09:26:55 -0700235 "\x30\x82\x02\x1F" /* sequence of 543 bytes */
236 "\x02\x01\x01" /* version - integer of 1 byte */
Tadeusz Struk946cc462015-06-16 10:31:06 -0700237 "\x02\x82\x01\x00" /* modulus - integer of 256 bytes */
238 "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
239 "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
240 "\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D"
241 "\x41\xE4\x25\x99\xAC\xFC\xD2\x0F\x02\xD3\xD1\x54\x06\x1A\x51\x77"
242 "\xBD\xB6\xBF\xEA\xA7\x5C\x06\xA9\x5D\x69\x84\x45\xD7\xF5\x05\xBA"
243 "\x47\xF0\x1B\xD7\x2B\x24\xEC\xCB\x9B\x1B\x10\x8D\x81\xA0\xBE\xB1"
244 "\x8C\x33\xE4\x36\xB8\x43\xEB\x19\x2A\x81\x8D\xDE\x81\x0A\x99\x48"
245 "\xB6\xF6\xBC\xCD\x49\x34\x3A\x8F\x26\x94\xE3\x28\x82\x1A\x7C\x8F"
246 "\x59\x9F\x45\xE8\x5D\x1A\x45\x76\x04\x56\x05\xA1\xD0\x1B\x8C\x77"
247 "\x6D\xAF\x53\xFA\x71\xE2\x67\xE0\x9A\xFE\x03\xA9\x85\xD2\xC9\xAA"
248 "\xBA\x2A\xBC\xF4\xA0\x08\xF5\x13\x98\x13\x5D\xF0\xD9\x33\x34\x2A"
249 "\x61\xC3\x89\x55\xF0\xAE\x1A\x9C\x22\xEE\x19\x05\x8D\x32\xFE\xEC"
250 "\x9C\x84\xBA\xB7\xF9\x6C\x3A\x4F\x07\xFC\x45\xEB\x12\xE5\x7B\xFD"
251 "\x55\xE6\x29\x69\xD1\xC2\xE8\xB9\x78\x59\xF6\x79\x10\xC6\x4E\xEB"
252 "\x6A\x5E\xB9\x9A\xC7\xC4\x5B\x63\xDA\xA3\x3F\x5E\x92\x7A\x81\x5E"
253 "\xD6\xB0\xE2\x62\x8F\x74\x26\xC2\x0C\xD3\x9A\x17\x47\xE6\x8E\xAB"
254 "\x02\x03\x01\x00\x01" /* public key - integer of 3 bytes */
255 "\x02\x82\x01\x00" /* private key - integer of 256 bytes */
256 "\x52\x41\xF4\xDA\x7B\xB7\x59\x55\xCA\xD4\x2F\x0F\x3A\xCB\xA4\x0D"
257 "\x93\x6C\xCC\x9D\xC1\xB2\xFB\xFD\xAE\x40\x31\xAC\x69\x52\x21\x92"
258 "\xB3\x27\xDF\xEA\xEE\x2C\x82\xBB\xF7\x40\x32\xD5\x14\xC4\x94\x12"
259 "\xEC\xB8\x1F\xCA\x59\xE3\xC1\x78\xF3\x85\xD8\x47\xA5\xD7\x02\x1A"
260 "\x65\x79\x97\x0D\x24\xF4\xF0\x67\x6E\x75\x2D\xBF\x10\x3D\xA8\x7D"
261 "\xEF\x7F\x60\xE4\xE6\x05\x82\x89\x5D\xDF\xC6\xD2\x6C\x07\x91\x33"
262 "\x98\x42\xF0\x02\x00\x25\x38\xC5\x85\x69\x8A\x7D\x2F\x95\x6C\x43"
263 "\x9A\xB8\x81\xE2\xD0\x07\x35\xAA\x05\x41\xC9\x1E\xAF\xE4\x04\x3B"
264 "\x19\xB8\x73\xA2\xAC\x4B\x1E\x66\x48\xD8\x72\x1F\xAC\xF6\xCB\xBC"
265 "\x90\x09\xCA\xEC\x0C\xDC\xF9\x2C\xD7\xEB\xAE\xA3\xA4\x47\xD7\x33"
266 "\x2F\x8A\xCA\xBC\x5E\xF0\x77\xE4\x97\x98\x97\xC7\x10\x91\x7D\x2A"
267 "\xA6\xFF\x46\x83\x97\xDE\xE9\xE2\x17\x03\x06\x14\xE2\xD7\xB1\x1D"
268 "\x77\xAF\x51\x27\x5B\x5E\x69\xB8\x81\xE6\x11\xC5\x43\x23\x81\x04"
269 "\x62\xFF\xE9\x46\xB8\xD8\x44\xDB\xA5\xCC\x31\x54\x34\xCE\x3E\x82"
270 "\xD6\xBF\x7A\x0B\x64\x21\x6D\x88\x7E\x5B\x45\x12\x1E\x63\x8D\x49"
Tadeusz Struk22287b02015-10-08 09:26:55 -0700271 "\xA7\x1D\xD9\x1E\x06\xCD\xE8\xBA\x2C\x8C\x69\x32\xEA\xBE\x60\x71"
272 "\x02\x01\x00" /* prime1 - integer of 1 byte */
273 "\x02\x01\x00" /* prime2 - integer of 1 byte */
274 "\x02\x01\x00" /* exponent1 - integer of 1 byte */
275 "\x02\x01\x00" /* exponent2 - integer of 1 byte */
276 "\x02\x01\x00", /* coefficient - integer of 1 byte */
277 .key_len = 547,
Tadeusz Struk946cc462015-06-16 10:31:06 -0700278 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
279 .c =
280 "\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe"
281 "\xcf\x49\xbc\x48\xd3\x6c\x8f\x0a\x0e\xc1\x73\xbd\x7b\x55\x79\x36"
282 "\x0e\xa1\x87\x88\xb9\x2c\x90\xa6\x53\x5e\xe9\xef\xc4\xe2\x4d\xdd"
283 "\xf7\xa6\x69\x82\x3f\x56\xa4\x7b\xfb\x62\xe0\xae\xb8\xd3\x04\xb3"
284 "\xac\x5a\x15\x2a\xe3\x19\x9b\x03\x9a\x0b\x41\xda\x64\xec\x0a\x69"
285 "\xfc\xf2\x10\x92\xf3\xc1\xbf\x84\x7f\xfd\x2c\xae\xc8\xb5\xf6\x41"
286 "\x70\xc5\x47\x03\x8a\xf8\xff\x6f\x3f\xd2\x6f\x09\xb4\x22\xf3\x30"
287 "\xbe\xa9\x85\xcb\x9c\x8d\xf9\x8f\xeb\x32\x91\xa2\x25\x84\x8f\xf5"
288 "\xdc\xc7\x06\x9c\x2d\xe5\x11\x2c\x09\x09\x87\x09\xa9\xf6\x33\x73"
289 "\x90\xf1\x60\xf2\x65\xdd\x30\xa5\x66\xce\x62\x7b\xd0\xf8\x2d\x3d"
290 "\x19\x82\x77\xe3\x0a\x5f\x75\x2f\x8e\xb1\xe5\xe8\x91\x35\x1b\x3b"
291 "\x33\xb7\x66\x92\xd1\xf2\x8e\x6f\xe5\x75\x0c\xad\x36\xfb\x4e\xd0"
292 "\x66\x61\xbd\x49\xfe\xf4\x1a\xa2\x2b\x49\xfe\x03\x4c\x74\x47\x8d"
293 "\x9a\x66\xb2\x49\x46\x4d\x77\xea\x33\x4d\x6b\x3c\xb4\x49\x4a\xc6"
294 "\x7d\x3d\xb5\xb9\x56\x41\x15\x67\x0f\x94\x3c\x93\x65\x27\xe0\x21"
295 "\x5d\x59\xc3\x62\xd5\xa6\xda\x38\x26\x22\x5e\x34\x1c\x94\xaf\x98",
296 .m_size = 8,
297 .c_size = 256,
298 }, {
299 .key =
300 "\x30\x82\x01\x09" /* sequence of 265 bytes */
301 "\x02\x82\x01\x00" /* modulus - integer of 256 bytes */
302 "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
303 "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
304 "\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D"
305 "\x41\xE4\x25\x99\xAC\xFC\xD2\x0F\x02\xD3\xD1\x54\x06\x1A\x51\x77"
306 "\xBD\xB6\xBF\xEA\xA7\x5C\x06\xA9\x5D\x69\x84\x45\xD7\xF5\x05\xBA"
307 "\x47\xF0\x1B\xD7\x2B\x24\xEC\xCB\x9B\x1B\x10\x8D\x81\xA0\xBE\xB1"
308 "\x8C\x33\xE4\x36\xB8\x43\xEB\x19\x2A\x81\x8D\xDE\x81\x0A\x99\x48"
309 "\xB6\xF6\xBC\xCD\x49\x34\x3A\x8F\x26\x94\xE3\x28\x82\x1A\x7C\x8F"
310 "\x59\x9F\x45\xE8\x5D\x1A\x45\x76\x04\x56\x05\xA1\xD0\x1B\x8C\x77"
311 "\x6D\xAF\x53\xFA\x71\xE2\x67\xE0\x9A\xFE\x03\xA9\x85\xD2\xC9\xAA"
312 "\xBA\x2A\xBC\xF4\xA0\x08\xF5\x13\x98\x13\x5D\xF0\xD9\x33\x34\x2A"
313 "\x61\xC3\x89\x55\xF0\xAE\x1A\x9C\x22\xEE\x19\x05\x8D\x32\xFE\xEC"
314 "\x9C\x84\xBA\xB7\xF9\x6C\x3A\x4F\x07\xFC\x45\xEB\x12\xE5\x7B\xFD"
315 "\x55\xE6\x29\x69\xD1\xC2\xE8\xB9\x78\x59\xF6\x79\x10\xC6\x4E\xEB"
316 "\x6A\x5E\xB9\x9A\xC7\xC4\x5B\x63\xDA\xA3\x3F\x5E\x92\x7A\x81\x5E"
317 "\xD6\xB0\xE2\x62\x8F\x74\x26\xC2\x0C\xD3\x9A\x17\x47\xE6\x8E\xAB"
318 "\x02\x03\x01\x00\x01", /* public key - integer of 3 bytes */
319 .key_len = 269,
320 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
321 .c =
322 "\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe"
323 "\xcf\x49\xbc\x48\xd3\x6c\x8f\x0a\x0e\xc1\x73\xbd\x7b\x55\x79\x36"
324 "\x0e\xa1\x87\x88\xb9\x2c\x90\xa6\x53\x5e\xe9\xef\xc4\xe2\x4d\xdd"
325 "\xf7\xa6\x69\x82\x3f\x56\xa4\x7b\xfb\x62\xe0\xae\xb8\xd3\x04\xb3"
326 "\xac\x5a\x15\x2a\xe3\x19\x9b\x03\x9a\x0b\x41\xda\x64\xec\x0a\x69"
327 "\xfc\xf2\x10\x92\xf3\xc1\xbf\x84\x7f\xfd\x2c\xae\xc8\xb5\xf6\x41"
328 "\x70\xc5\x47\x03\x8a\xf8\xff\x6f\x3f\xd2\x6f\x09\xb4\x22\xf3\x30"
329 "\xbe\xa9\x85\xcb\x9c\x8d\xf9\x8f\xeb\x32\x91\xa2\x25\x84\x8f\xf5"
330 "\xdc\xc7\x06\x9c\x2d\xe5\x11\x2c\x09\x09\x87\x09\xa9\xf6\x33\x73"
331 "\x90\xf1\x60\xf2\x65\xdd\x30\xa5\x66\xce\x62\x7b\xd0\xf8\x2d\x3d"
332 "\x19\x82\x77\xe3\x0a\x5f\x75\x2f\x8e\xb1\xe5\xe8\x91\x35\x1b\x3b"
333 "\x33\xb7\x66\x92\xd1\xf2\x8e\x6f\xe5\x75\x0c\xad\x36\xfb\x4e\xd0"
334 "\x66\x61\xbd\x49\xfe\xf4\x1a\xa2\x2b\x49\xfe\x03\x4c\x74\x47\x8d"
335 "\x9a\x66\xb2\x49\x46\x4d\x77\xea\x33\x4d\x6b\x3c\xb4\x49\x4a\xc6"
336 "\x7d\x3d\xb5\xb9\x56\x41\x15\x67\x0f\x94\x3c\x93\x65\x27\xe0\x21"
337 "\x5d\x59\xc3\x62\xd5\xa6\xda\x38\x26\x22\x5e\x34\x1c\x94\xaf\x98",
338 .m_size = 8,
339 .c_size = 256,
340 .public_key_vec = true,
341 }
342};
343
Salvatore Benedetto802c7f12016-06-22 17:49:14 +0100344#define DH_TEST_VECTORS 2
345
346struct kpp_testvec dh_tv_template[] = {
347 {
348 .secret =
349#ifdef __LITTLE_ENDIAN
350 "\x01\x00" /* type */
351 "\x11\x02" /* len */
352 "\x00\x01\x00\x00" /* key_size */
353 "\x00\x01\x00\x00" /* p_size */
354 "\x01\x00\x00\x00" /* g_size */
355#else
356 "\x00\x01" /* type */
357 "\x02\x11" /* len */
358 "\x00\x00\x01\x00" /* key_size */
359 "\x00\x00\x01\x00" /* p_size */
360 "\x00\x00\x00\x01" /* g_size */
361#endif
362 /* xa */
363 "\x44\xc1\x48\x36\xa7\x2b\x6f\x4e\x43\x03\x68\xad\x31\x00\xda\xf3"
364 "\x2a\x01\xa8\x32\x63\x5f\x89\x32\x1f\xdf\x4c\xa1\x6a\xbc\x10\x15"
365 "\x90\x35\xc9\x26\x41\xdf\x7b\xaa\x56\x56\x3d\x85\x44\xb5\xc0\x8e"
366 "\x37\x83\x06\x50\xb3\x5f\x0e\x28\x2c\xd5\x46\x15\xe3\xda\x7d\x74"
367 "\x87\x13\x91\x4f\xd4\x2d\xf6\xc7\x5e\x14\x2c\x11\xc2\x26\xb4\x3a"
368 "\xe3\xb2\x36\x20\x11\x3b\x22\xf2\x06\x65\x66\xe2\x57\x58\xf8\x22"
369 "\x1a\x94\xbd\x2b\x0e\x8c\x55\xad\x61\x23\x45\x2b\x19\x1e\x63\x3a"
370 "\x13\x61\xe3\xa0\x79\x70\x3e\x6d\x98\x32\xbc\x7f\x82\xc3\x11\xd8"
371 "\xeb\x53\xb5\xfc\xb5\xd5\x3c\x4a\xea\x92\x3e\x01\xce\x15\x65\xd4"
372 "\xaa\x85\xc1\x11\x90\x83\x31\x6e\xfe\xe7\x7f\x7d\xed\xab\xf9\x29"
373 "\xf8\xc7\xf1\x68\xc6\xb7\xe4\x1f\x2f\x28\xa0\xc9\x1a\x50\x64\x29"
374 "\x4b\x01\x6d\x1a\xda\x46\x63\x21\x07\x40\x8c\x8e\x4c\x6f\xb5\xe5"
375 "\x12\xf3\xc2\x1b\x48\x27\x5e\x27\x01\xb1\xaa\xed\x68\x9b\x83\x18"
376 "\x8f\xb1\xeb\x1f\x04\xd1\x3c\x79\xed\x4b\xf7\x0a\x33\xdc\xe0\xc6"
377 "\xd8\x02\x51\x59\x00\x74\x30\x07\x4c\x2d\xac\xe4\x13\xf1\x80\xf0"
378 "\xce\xfa\xff\xa9\xce\x29\x46\xdd\x9d\xad\xd1\xc3\xc6\x58\x1a\x63"
379 /* p */
380 "\xb9\x36\x3a\xf1\x82\x1f\x60\xd3\x22\x47\xb8\xbc\x2d\x22\x6b\x81"
381 "\x7f\xe8\x20\x06\x09\x23\x73\x49\x9a\x59\x8b\x35\x25\xf8\x31\xbc"
382 "\x7d\xa8\x1c\x9d\x56\x0d\x1a\xf7\x4b\x4f\x96\xa4\x35\x77\x6a\x89"
383 "\xab\x42\x00\x49\x21\x71\xed\x28\x16\x1d\x87\x5a\x10\xa7\x9c\x64"
384 "\x94\xd4\x87\x3d\x28\xef\x44\xfe\x4b\xe2\xb4\x15\x8c\x82\xa6\xf3"
385 "\x50\x5f\xa8\xe8\xa2\x60\xe7\x00\x86\x78\x05\xd4\x78\x19\xa1\x98"
386 "\x62\x4e\x4a\x00\x78\x56\x96\xe6\xcf\xd7\x10\x1b\x74\x5d\xd0\x26"
387 "\x61\xdb\x6b\x32\x09\x51\xd8\xa5\xfd\x54\x16\x71\x01\xb3\x39\xe6"
388 "\x4e\x69\xb1\xd7\x06\x8f\xd6\x1e\xdc\x72\x25\x26\x74\xc8\x41\x06"
389 "\x5c\xd1\x26\x5c\xb0\x2f\xf9\x59\x13\xc1\x2a\x0f\x78\xea\x7b\xf7"
390 "\xbd\x59\xa0\x90\x1d\xfc\x33\x5b\x4c\xbf\x05\x9c\x3a\x3f\x69\xa2"
391 "\x45\x61\x4e\x10\x6a\xb3\x17\xc5\x68\x30\xfb\x07\x5f\x34\xc6\xfb"
392 "\x73\x07\x3c\x70\xf6\xae\xe7\x72\x84\xc3\x18\x81\x8f\xe8\x11\x1f"
393 "\x3d\x83\x83\x01\x2a\x14\x73\xbf\x32\x32\x2e\xc9\x4d\xdb\x2a\xca"
394 "\xee\x71\xf9\xda\xad\xe8\x82\x0b\x4d\x0c\x1f\xb6\x1d\xef\x00\x67"
395 "\x74\x3d\x95\xe0\xb7\xc4\x30\x8a\x24\x87\x12\x47\x27\x70\x0d\x73"
396 /* g */
397 "\x02",
398 .b_public =
399 "\x2a\x67\x5c\xfd\x63\x5d\xc0\x97\x0a\x8b\xa2\x1f\xf8\x8a\xcb\x54"
400 "\xca\x2f\xd3\x49\x3f\x01\x8e\x87\xfe\xcc\x94\xa0\x3e\xd4\x26\x79"
401 "\x9a\x94\x3c\x11\x81\x58\x5c\x60\x3d\xf5\x98\x90\x89\x64\x62\x1f"
402 "\xbd\x05\x6d\x2b\xcd\x84\x40\x9b\x4a\x1f\xe0\x19\xf1\xca\x20\xb3"
403 "\x4e\xa0\x4f\x15\xcc\xa5\xfe\xa5\xb4\xf5\x0b\x18\x7a\x5a\x37\xaa"
404 "\x58\x00\x19\x7f\xe2\xa3\xd9\x1c\x44\x57\xcc\xde\x2e\xc1\x38\xea"
405 "\xeb\xe3\x90\x40\xc4\x6c\xf7\xcd\xe9\x22\x50\x71\xf5\x7c\xdb\x37"
406 "\x0e\x80\xc3\xed\x7e\xb1\x2b\x2f\xbe\x71\xa6\x11\xa5\x9d\xf5\x39"
407 "\xf1\xa2\xe5\x85\xbc\x25\x91\x4e\x84\x8d\x26\x9f\x4f\xe6\x0f\xa6"
408 "\x2b\x6b\xf9\x0d\xaf\x6f\xbb\xfa\x2d\x79\x15\x31\x57\xae\x19\x60"
409 "\x22\x0a\xf5\xfd\x98\x0e\xbf\x5d\x49\x75\x58\x37\xbc\x7f\xf5\x21"
410 "\x56\x1e\xd5\xb3\x50\x0b\xca\x96\xf3\xd1\x3f\xb3\x70\xa8\x6d\x63"
411 "\x48\xfb\x3d\xd7\x29\x91\x45\xb5\x48\xcd\xb6\x78\x30\xf2\x3f\x1e"
412 "\xd6\x22\xd6\x35\x9b\xf9\x1f\x85\xae\xab\x4b\xd7\xe0\xc7\x86\x67"
413 "\x3f\x05\x7f\xa6\x0d\x2f\x0d\xbf\x53\x5f\x4d\x2c\x6d\x5e\x57\x40"
414 "\x30\x3a\x23\x98\xf9\xb4\x32\xf5\x32\x83\xdd\x0b\xae\x33\x97\x2f",
415 .expected_a_public =
416 "\x5c\x24\xdf\xeb\x5b\x4b\xf8\xc5\xef\x39\x48\x82\xe0\x1e\x62\xee"
417 "\x8a\xae\xdf\x93\x6c\x2b\x16\x95\x92\x16\x3f\x16\x7b\x75\x03\x85"
418 "\xd9\xf1\x69\xc2\x14\x87\x45\xfc\xa4\x19\xf6\xf0\xa4\xf3\xec\xd4"
419 "\x6c\x5c\x03\x3b\x94\xc2\x2f\x92\xe4\xce\xb3\xe4\x72\xe8\x17\xe6"
420 "\x23\x7e\x00\x01\x09\x59\x13\xbf\xc1\x2f\x99\xa9\x07\xaa\x02\x23"
421 "\x4a\xca\x39\x4f\xbc\xec\x0f\x27\x4f\x19\x93\x6c\xb9\x30\x52\xfd"
422 "\x2b\x9d\x86\xf1\x06\x1e\xb6\x56\x27\x4a\xc9\x8a\xa7\x8a\x48\x5e"
423 "\xb5\x60\xcb\xdf\xff\x03\x26\x10\xbf\x90\x8f\x46\x60\xeb\x9b\x9a"
424 "\xd6\x6f\x44\x91\x03\x92\x18\x2c\x96\x5e\x40\x19\xfb\xf4\x4f\x3a"
425 "\x02\x7b\xaf\xcc\x22\x20\x79\xb9\xf8\x9f\x8f\x85\x6b\xec\x44\xbb"
426 "\xe6\xa8\x8e\xb1\xe8\x2c\xee\x64\xee\xf8\xbd\x00\xf3\xe2\x2b\x93"
427 "\xcd\xe7\xc4\xdf\xc9\x19\x46\xfe\xb6\x07\x73\xc1\x8a\x64\x79\x26"
428 "\xe7\x30\xad\x2a\xdf\xe6\x8f\x59\xf5\x81\xbf\x4a\x29\x91\xe7\xb7"
429 "\xcf\x48\x13\x27\x75\x79\x40\xd9\xd6\x32\x52\x4e\x6a\x86\xae\x6f"
430 "\xc2\xbf\xec\x1f\xc2\x69\xb2\xb6\x59\xe5\xa5\x17\xa4\x77\xb7\x62"
431 "\x46\xde\xe8\xd2\x89\x78\x9a\xef\xa3\xb5\x8f\x26\xec\x80\xda\x39",
432 .expected_ss =
433 "\x8f\xf3\xac\xa2\xea\x22\x11\x5c\x45\x65\x1a\x77\x75\x2e\xcf\x46"
434 "\x23\x14\x1e\x67\x53\x4d\x35\xb0\x38\x1d\x4e\xb9\x41\x9a\x21\x24"
435 "\x6e\x9f\x40\xfe\x90\x51\xb1\x06\xa4\x7b\x87\x17\x2f\xe7\x5e\x22"
436 "\xf0\x7b\x54\x84\x0a\xac\x0a\x90\xd2\xd7\xe8\x7f\xe7\xe3\x30\x75"
437 "\x01\x1f\x24\x75\x56\xbe\xcc\x8d\x1e\x68\x0c\x41\x72\xd3\xfa\xbb"
438 "\xe5\x9c\x60\xc7\x28\x77\x0c\xbe\x89\xab\x08\xd6\x21\xe7\x2e\x1a"
439 "\x58\x7a\xca\x4f\x22\xf3\x2b\x30\xfd\xf4\x98\xc1\xa3\xf8\xf6\xcc"
440 "\xa9\xe4\xdb\x5b\xee\xd5\x5c\x6f\x62\x4c\xd1\x1a\x02\x2a\x23\xe4"
441 "\xb5\x57\xf3\xf9\xec\x04\x83\x54\xfe\x08\x5e\x35\xac\xfb\xa8\x09"
442 "\x82\x32\x60\x11\xb2\x16\x62\x6b\xdf\xda\xde\x9c\xcb\x63\x44\x6c"
443 "\x59\x26\x6a\x8f\xb0\x24\xcb\xa6\x72\x48\x1e\xeb\xe0\xe1\x09\x44"
444 "\xdd\xee\x66\x6d\x84\xcf\xa5\xc1\xb8\x36\x74\xd3\x15\x96\xc3\xe4"
445 "\xc6\x5a\x4d\x23\x97\x0c\x5c\xcb\xa9\xf5\x29\xc2\x0e\xff\x93\x82"
446 "\xd3\x34\x49\xad\x64\xa6\xb1\xc0\x59\x28\x75\x60\xa7\x8a\xb0\x11"
447 "\x56\x89\x42\x74\x11\xf5\xf6\x5e\x6f\x16\x54\x6a\xb1\x76\x4d\x50"
448 "\x8a\x68\xc1\x5b\x82\xb9\x0d\x00\x32\x50\xed\x88\x87\x48\x92\x17",
449 .secret_size = 529,
450 .b_public_size = 256,
451 .expected_a_public_size = 256,
452 .expected_ss_size = 256,
453 },
454 {
455 .secret =
456#ifdef __LITTLE_ENDIAN
457 "\x01\x00" /* type */
458 "\x11\x02" /* len */
459 "\x00\x01\x00\x00" /* key_size */
460 "\x00\x01\x00\x00" /* p_size */
461 "\x01\x00\x00\x00" /* g_size */
462#else
463 "\x00\x01" /* type */
464 "\x02\x11" /* len */
465 "\x00\x00\x01\x00" /* key_size */
466 "\x00\x00\x01\x00" /* p_size */
467 "\x00\x00\x00\x01" /* g_size */
468#endif
469 /* xa */
470 "\x4d\x75\xa8\x6e\xba\x23\x3a\x0c\x63\x56\xc8\xc9\x5a\xa7\xd6\x0e"
471 "\xed\xae\x40\x78\x87\x47\x5f\xe0\xa7\x7b\xba\x84\x88\x67\x4e\xe5"
472 "\x3c\xcc\x5c\x6a\xe7\x4a\x20\xec\xbe\xcb\xf5\x52\x62\x9f\x37\x80"
473 "\x0c\x72\x7b\x83\x66\xa4\xf6\x7f\x95\x97\x1c\x6a\x5c\x7e\xf1\x67"
474 "\x37\xb3\x93\x39\x3d\x0b\x55\x35\xd9\xe5\x22\x04\x9f\xf8\xc1\x04"
475 "\xce\x13\xa5\xac\xe1\x75\x05\xd1\x2b\x53\xa2\x84\xef\xb1\x18\xf4"
476 "\x66\xdd\xea\xe6\x24\x69\x5a\x49\xe0\x7a\xd8\xdf\x1b\xb7\xf1\x6d"
477 "\x9b\x50\x2c\xc8\x1c\x1c\xa3\xb4\x37\xfb\x66\x3f\x67\x71\x73\xa9"
478 "\xff\x5f\xd9\xa2\x25\x6e\x25\x1b\x26\x54\xbf\x0c\xc6\xdb\xea\x0a"
479 "\x52\x6c\x16\x7c\x27\x68\x15\x71\x58\x73\x9d\xe6\xc2\x80\xaa\x97"
480 "\x31\x66\xfb\xa6\xfb\xfd\xd0\x9c\x1d\xbe\x81\x48\xf5\x9a\x32\xf1"
481 "\x69\x62\x18\x78\xae\x72\x36\xe6\x94\x27\xd1\xff\x18\x4f\x28\x6a"
482 "\x16\xbd\x6a\x60\xee\xe5\xf9\x6d\x16\xe4\xb8\xa6\x41\x9b\x23\x7e"
483 "\xf7\x9d\xd1\x1d\x03\x15\x66\x3a\xcf\xb6\x2c\x13\x96\x2c\x52\x21"
484 "\xe4\x2d\x48\x7a\x8a\x5d\xb2\x88\xed\x98\x61\x79\x8b\x6a\x1e\x5f"
485 "\xd0\x8a\x2d\x99\x5a\x2b\x0f\xbc\xef\x53\x8f\x32\xc1\xa2\x99\x26"
486 /* p */
487 "\xb9\x36\x3a\xf1\x82\x1f\x60\xd3\x22\x47\xb8\xbc\x2d\x22\x6b\x81"
488 "\x7f\xe8\x20\x06\x09\x23\x73\x49\x9a\x59\x8b\x35\x25\xf8\x31\xbc"
489 "\x7d\xa8\x1c\x9d\x56\x0d\x1a\xf7\x4b\x4f\x96\xa4\x35\x77\x6a\x89"
490 "\xab\x42\x00\x49\x21\x71\xed\x28\x16\x1d\x87\x5a\x10\xa7\x9c\x64"
491 "\x94\xd4\x87\x3d\x28\xef\x44\xfe\x4b\xe2\xb4\x15\x8c\x82\xa6\xf3"
492 "\x50\x5f\xa8\xe8\xa2\x60\xe7\x00\x86\x78\x05\xd4\x78\x19\xa1\x98"
493 "\x62\x4e\x4a\x00\x78\x56\x96\xe6\xcf\xd7\x10\x1b\x74\x5d\xd0\x26"
494 "\x61\xdb\x6b\x32\x09\x51\xd8\xa5\xfd\x54\x16\x71\x01\xb3\x39\xe6"
495 "\x4e\x69\xb1\xd7\x06\x8f\xd6\x1e\xdc\x72\x25\x26\x74\xc8\x41\x06"
496 "\x5c\xd1\x26\x5c\xb0\x2f\xf9\x59\x13\xc1\x2a\x0f\x78\xea\x7b\xf7"
497 "\xbd\x59\xa0\x90\x1d\xfc\x33\x5b\x4c\xbf\x05\x9c\x3a\x3f\x69\xa2"
498 "\x45\x61\x4e\x10\x6a\xb3\x17\xc5\x68\x30\xfb\x07\x5f\x34\xc6\xfb"
499 "\x73\x07\x3c\x70\xf6\xae\xe7\x72\x84\xc3\x18\x81\x8f\xe8\x11\x1f"
500 "\x3d\x83\x83\x01\x2a\x14\x73\xbf\x32\x32\x2e\xc9\x4d\xdb\x2a\xca"
501 "\xee\x71\xf9\xda\xad\xe8\x82\x0b\x4d\x0c\x1f\xb6\x1d\xef\x00\x67"
502 "\x74\x3d\x95\xe0\xb7\xc4\x30\x8a\x24\x87\x12\x47\x27\x70\x0d\x73"
503 /* g */
504 "\x02",
505 .b_public =
506 "\x99\x4d\xd9\x01\x84\x8e\x4a\x5b\xb8\xa5\x64\x8c\x6c\x00\x5c\x0e"
507 "\x1e\x1b\xee\x5d\x9f\x53\xe3\x16\x70\x01\xed\xbf\x4f\x14\x36\x6e"
508 "\xe4\x43\x45\x43\x49\xcc\xb1\xb0\x2a\xc0\x6f\x22\x55\x42\x17\x94"
509 "\x18\x83\xd7\x2a\x5c\x51\x54\xf8\x4e\x7c\x10\xda\x76\x68\x57\x77"
510 "\x1e\x62\x03\x30\x04\x7b\x4c\x39\x9c\x54\x01\x54\xec\xef\xb3\x55"
511 "\xa4\xc0\x24\x6d\x3d\xbd\xcc\x46\x5b\x00\x96\xc7\xea\x93\xd1\x3f"
512 "\xf2\x6a\x72\xe3\xf2\xc1\x92\x24\x5b\xda\x48\x70\x2c\xa9\x59\x97"
513 "\x19\xb1\xd6\x54\xb3\x9c\x2e\xb0\x63\x07\x9b\x5e\xac\xb5\xf2\xb1"
514 "\x5b\xf8\xf3\xd7\x2d\x37\x9b\x68\x6c\xf8\x90\x07\xbc\x37\x9a\xa5"
515 "\xe2\x91\x12\x25\x47\x77\xe3\x3d\xb2\x95\x69\x44\x0b\x91\x1e\xaf"
516 "\x7c\x8c\x7c\x34\x41\x6a\xab\x60\x6e\xc6\x52\xec\x7e\x94\x0a\x37"
517 "\xec\x98\x90\xdf\x3f\x02\xbd\x23\x52\xdd\xd9\xe5\x31\x80\x74\x25"
518 "\xb6\xd2\xd3\xcc\xd5\xcc\x6d\xf9\x7e\x4d\x78\xab\x77\x51\xfa\x77"
519 "\x19\x94\x49\x8c\x05\xd4\x75\xed\xd2\xb3\x64\x57\xe0\x52\x99\xc0"
520 "\x83\xe3\xbb\x5e\x2b\xf1\xd2\xc0\xb1\x37\x36\x0b\x7c\xb5\x63\x96"
521 "\x8e\xde\x04\x23\x11\x95\x62\x11\x9a\xce\x6f\x63\xc8\xd5\xd1\x8f",
522 .expected_a_public =
523 "\x90\x89\xe4\x82\xd6\x0a\xcf\x1a\xae\xce\x1b\x66\xa7\x19\x71\x18"
524 "\x8f\x95\x4b\x5b\x80\x45\x4a\x5a\x43\x99\x4d\x37\xcf\xa3\xa7\x28"
525 "\x9c\xc7\x73\xf1\xb2\x17\xf6\x99\xe3\x6b\x56\xcb\x3e\x35\x60\x7d"
526 "\x65\xc7\x84\x6b\x3e\x60\xee\xcd\xd2\x70\xe7\xc9\x32\x1c\xf0\xb4"
527 "\xf9\x52\xd9\x88\x75\xfd\x40\x2c\xa7\xbe\x19\x1c\x0a\xae\x93\xe1"
528 "\x71\xc7\xcd\x4f\x33\x5c\x10\x7d\x39\x56\xfc\x73\x84\xb2\x67\xc3"
529 "\x77\x26\x20\x97\x2b\xf8\x13\x43\x93\x9c\x9a\xa4\x08\xc7\x34\x83"
530 "\xe6\x98\x61\xe7\x16\x30\x2c\xb1\xdb\x2a\xb2\xcc\xc3\x02\xa5\x3c"
531 "\x71\x50\x14\x83\xc7\xbb\xa4\xbe\x98\x1b\xfe\xcb\x43\xe9\x97\x62"
532 "\xd6\xf0\x8c\xcb\x1c\xba\x1e\xa8\xa6\xa6\x50\xfc\x85\x7d\x47\xbf"
533 "\xf4\x3e\x23\xd3\x5f\xb2\x71\x3e\x40\x94\xaa\x87\x83\x2c\x6c\x8e"
534 "\x60\xfd\xdd\xf7\xf4\x76\x03\xd3\x1d\xec\x18\x51\xa3\xf2\x44\x1a"
535 "\x3f\xb4\x7c\x18\x0d\x68\x65\x92\x54\x0d\x2d\x81\x16\xf1\x84\x66"
536 "\x89\x92\xd0\x1a\x5e\x1f\x42\x46\x5b\xe5\x83\x86\x80\xd9\xcd\x3a"
537 "\x5a\x2f\xb9\x59\x9b\xe4\x43\x84\x64\xf3\x09\x1a\x0a\xa2\x64\x0f"
538 "\x77\x4e\x8d\x8b\xe6\x88\xd1\xfc\xaf\x8f\xdf\x1d\xbc\x31\xb3\xbd",
539 .expected_ss =
540 "\x34\xc3\x35\x14\x88\x46\x26\x23\x97\xbb\xdd\x28\x5c\x94\xf6\x47"
541 "\xca\xb3\x19\xaf\xca\x44\x9b\xc2\x7d\x89\xfd\x96\x14\xfd\x6d\x58"
542 "\xd8\xc4\x6b\x61\x2a\x0d\xf2\x36\x45\xc8\xe4\xa4\xed\x81\x53\x81"
543 "\x66\x1e\xe0\x5a\xb1\x78\x2d\x0b\x5c\xb4\xd1\xfc\x90\xc6\x9c\xdb"
544 "\x5a\x30\x0b\x14\x7d\xbe\xb3\x7d\xb1\xb2\x76\x3c\x6c\xef\x74\x6b"
545 "\xe7\x1f\x64\x0c\xab\x65\xe1\x76\x5c\x3d\x83\xb5\x8a\xfb\xaf\x0f"
546 "\xf2\x06\x14\x8f\xa0\xf6\xc1\x89\x78\xf2\xba\x72\x73\x3c\xf7\x76"
547 "\x21\x67\xbc\x24\x31\xb8\x09\x65\x0f\x0c\x02\x32\x4a\x98\x14\xfc"
548 "\x72\x2c\x25\x60\x68\x5f\x2f\x30\x1e\x5b\xf0\x3b\xd1\xa2\x87\xa0"
549 "\x54\xdf\xdb\xc0\xee\x0a\x0f\x47\xc9\x90\x20\x2c\xf9\xe3\x52\xad"
550 "\x27\x65\x8d\x54\x8d\xa8\xa1\xf3\xed\x15\xd4\x94\x28\x90\x31\x93"
551 "\x1b\xc0\x51\xbb\x43\x5d\x76\x3b\x1d\x2a\x71\x50\xea\x5d\x48\x94"
552 "\x7f\x6f\xf1\x48\xdb\x30\xe5\xae\x64\x79\xd9\x7a\xdb\xc6\xff\xd8"
553 "\x5e\x5a\x64\xbd\xf6\x85\x04\xe8\x28\x6a\xac\xef\xce\x19\x8e\x9a"
554 "\xfe\x75\xc0\x27\x69\xe3\xb3\x7b\x21\xa7\xb1\x16\xa4\x85\x23\xee"
555 "\xb0\x1b\x04\x6e\xbd\xab\x16\xde\xfd\x86\x6b\xa9\x95\xd7\x0b\xfd",
556 .secret_size = 529,
557 .b_public_size = 256,
558 .expected_a_public_size = 256,
559 .expected_ss_size = 256,
560 }
561};
562
Salvatore Benedetto3c4b2392016-06-22 17:49:15 +0100563#ifdef CONFIG_CRYPTO_FIPS
564#define ECDH_TEST_VECTORS 1
565#else
566#define ECDH_TEST_VECTORS 2
567#endif
568struct kpp_testvec ecdh_tv_template[] = {
569 {
570#ifndef CONFIG_CRYPTO_FIPS
571 .secret =
572#ifdef __LITTLE_ENDIAN
573 "\x02\x00" /* type */
574 "\x20\x00" /* len */
575 "\x01\x00" /* curve_id */
576 "\x18\x00" /* key_size */
577#else
578 "\x00\x02" /* type */
579 "\x00\x20" /* len */
580 "\x00\x01" /* curve_id */
581 "\x00\x18" /* key_size */
582#endif
583 "\xb5\x05\xb1\x71\x1e\xbf\x8c\xda"
584 "\x4e\x19\x1e\x62\x1f\x23\x23\x31"
585 "\x36\x1e\xd3\x84\x2f\xcc\x21\x72",
586 .b_public =
587 "\xc3\xba\x67\x4b\x71\xec\xd0\x76"
588 "\x7a\x99\x75\x64\x36\x13\x9a\x94"
589 "\x5d\x8b\xdc\x60\x90\x91\xfd\x3f"
590 "\xb0\x1f\x8a\x0a\x68\xc6\x88\x6e"
591 "\x83\x87\xdd\x67\x09\xf8\x8d\x96"
592 "\x07\xd6\xbd\x1c\xe6\x8d\x9d\x67",
593 .expected_a_public =
594 "\x1a\x04\xdb\xa5\xe1\xdd\x4e\x79"
595 "\xa3\xe6\xef\x0e\x5c\x80\x49\x85"
596 "\xfa\x78\xb4\xef\x49\xbd\x4c\x7c"
597 "\x22\x90\x21\x02\xf9\x1b\x81\x5d"
598 "\x0c\x8a\xa8\x98\xd6\x27\x69\x88"
599 "\x5e\xbc\x94\xd8\x15\x9e\x21\xce",
600 .expected_ss =
601 "\xf4\x57\xcc\x4f\x1f\x4e\x31\xcc"
602 "\xe3\x40\x60\xc8\x06\x93\xc6\x2e"
603 "\x99\x80\x81\x28\xaf\xc5\x51\x74",
604 .secret_size = 32,
605 .b_public_size = 48,
606 .expected_a_public_size = 48,
607 .expected_ss_size = 24
608 }, {
609#endif
610 .secret =
611#ifdef __LITTLE_ENDIAN
612 "\x02\x00" /* type */
613 "\x28\x00" /* len */
614 "\x02\x00" /* curve_id */
615 "\x20\x00" /* key_size */
616#else
617 "\x00\x02" /* type */
618 "\x00\x28" /* len */
619 "\x00\x02" /* curve_id */
620 "\x00\x20" /* key_size */
621#endif
622 "\x24\xd1\x21\xeb\xe5\xcf\x2d\x83"
623 "\xf6\x62\x1b\x6e\x43\x84\x3a\xa3"
624 "\x8b\xe0\x86\xc3\x20\x19\xda\x92"
625 "\x50\x53\x03\xe1\xc0\xea\xb8\x82",
626 .expected_a_public =
627 "\x1a\x7f\xeb\x52\x00\xbd\x3c\x31"
628 "\x7d\xb6\x70\xc1\x86\xa6\xc7\xc4"
629 "\x3b\xc5\x5f\x6c\x6f\x58\x3c\xf5"
630 "\xb6\x63\x82\x77\x33\x24\xa1\x5f"
631 "\x6a\xca\x43\x6f\xf7\x7e\xff\x02"
632 "\x37\x08\xcc\x40\x5e\x7a\xfd\x6a"
633 "\x6a\x02\x6e\x41\x87\x68\x38\x77"
634 "\xfa\xa9\x44\x43\x2d\xef\x09\xdf",
635 .expected_ss =
636 "\xea\x17\x6f\x7e\x6e\x57\x26\x38"
637 "\x8b\xfb\x41\xeb\xba\xc8\x6d\xa5"
638 "\xa8\x72\xd1\xff\xc9\x47\x3d\xaa"
639 "\x58\x43\x9f\x34\x0f\x8c\xf3\xc9",
640 .b_public =
641 "\xcc\xb4\xda\x74\xb1\x47\x3f\xea"
642 "\x6c\x70\x9e\x38\x2d\xc7\xaa\xb7"
643 "\x29\xb2\x47\x03\x19\xab\xdd\x34"
644 "\xbd\xa8\x2c\x93\xe1\xa4\x74\xd9"
645 "\x64\x63\xf7\x70\x20\x2f\xa4\xe6"
646 "\x9f\x4a\x38\xcc\xc0\x2c\x49\x2f"
647 "\xb1\x32\xbb\xaf\x22\x61\xda\xcb"
648 "\x6f\xdb\xa9\xaa\xfc\x77\x81\xf3",
649 .secret_size = 40,
650 .b_public_size = 64,
651 .expected_a_public_size = 64,
652 .expected_ss_size = 32
653 }
654};
655
Tadeusz Struk946cc462015-06-16 10:31:06 -0700656/*
Herbert Xuda7f0332008-07-31 17:08:25 +0800657 * MD4 test vectors from RFC1320
658 */
659#define MD4_TEST_VECTORS 7
660
661static struct hash_testvec md4_tv_template [] = {
662 {
663 .plaintext = "",
664 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
665 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
666 }, {
667 .plaintext = "a",
668 .psize = 1,
669 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
670 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
671 }, {
672 .plaintext = "abc",
673 .psize = 3,
674 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
675 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
676 }, {
677 .plaintext = "message digest",
678 .psize = 14,
679 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
680 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
681 }, {
682 .plaintext = "abcdefghijklmnopqrstuvwxyz",
683 .psize = 26,
684 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
685 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
686 .np = 2,
687 .tap = { 13, 13 },
688 }, {
689 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
690 .psize = 62,
691 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
692 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
693 }, {
694 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
695 "45678901234567890",
696 .psize = 80,
697 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
698 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
699 },
700};
701
raveendra padasalagi79cc6ab2016-06-17 10:30:36 +0530702#define SHA3_224_TEST_VECTORS 3
703static struct hash_testvec sha3_224_tv_template[] = {
704 {
705 .plaintext = "",
706 .digest = "\x6b\x4e\x03\x42\x36\x67\xdb\xb7"
707 "\x3b\x6e\x15\x45\x4f\x0e\xb1\xab"
708 "\xd4\x59\x7f\x9a\x1b\x07\x8e\x3f"
709 "\x5b\x5a\x6b\xc7",
710 }, {
711 .plaintext = "a",
712 .psize = 1,
713 .digest = "\x9e\x86\xff\x69\x55\x7c\xa9\x5f"
714 "\x40\x5f\x08\x12\x69\x68\x5b\x38"
715 "\xe3\xa8\x19\xb3\x09\xee\x94\x2f"
716 "\x48\x2b\x6a\x8b",
717 }, {
718 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl"
719 "jklmklmnlmnomnopnopq",
720 .psize = 56,
721 .digest = "\x8a\x24\x10\x8b\x15\x4a\xda\x21"
722 "\xc9\xfd\x55\x74\x49\x44\x79\xba"
723 "\x5c\x7e\x7a\xb7\x6e\xf2\x64\xea"
724 "\xd0\xfc\xce\x33",
725 },
726};
727
728#define SHA3_256_TEST_VECTORS 3
729static struct hash_testvec sha3_256_tv_template[] = {
730 {
731 .plaintext = "",
732 .digest = "\xa7\xff\xc6\xf8\xbf\x1e\xd7\x66"
733 "\x51\xc1\x47\x56\xa0\x61\xd6\x62"
734 "\xf5\x80\xff\x4d\xe4\x3b\x49\xfa"
735 "\x82\xd8\x0a\x4b\x80\xf8\x43\x4a",
736 }, {
737 .plaintext = "a",
738 .psize = 1,
739 .digest = "\x80\x08\x4b\xf2\xfb\xa0\x24\x75"
740 "\x72\x6f\xeb\x2c\xab\x2d\x82\x15"
741 "\xea\xb1\x4b\xc6\xbd\xd8\xbf\xb2"
742 "\xc8\x15\x12\x57\x03\x2e\xcd\x8b",
743 }, {
744 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl"
745 "jklmklmnlmnomnopnopq",
746 .psize = 56,
747 .digest = "\x41\xc0\xdb\xa2\xa9\xd6\x24\x08"
748 "\x49\x10\x03\x76\xa8\x23\x5e\x2c"
749 "\x82\xe1\xb9\x99\x8a\x99\x9e\x21"
750 "\xdb\x32\xdd\x97\x49\x6d\x33\x76",
751 },
752};
753
754
755#define SHA3_384_TEST_VECTORS 3
756static struct hash_testvec sha3_384_tv_template[] = {
757 {
758 .plaintext = "",
759 .digest = "\x0c\x63\xa7\x5b\x84\x5e\x4f\x7d"
760 "\x01\x10\x7d\x85\x2e\x4c\x24\x85"
761 "\xc5\x1a\x50\xaa\xaa\x94\xfc\x61"
762 "\x99\x5e\x71\xbb\xee\x98\x3a\x2a"
763 "\xc3\x71\x38\x31\x26\x4a\xdb\x47"
764 "\xfb\x6b\xd1\xe0\x58\xd5\xf0\x04",
765 }, {
766 .plaintext = "a",
767 .psize = 1,
768 .digest = "\x18\x15\xf7\x74\xf3\x20\x49\x1b"
769 "\x48\x56\x9e\xfe\xc7\x94\xd2\x49"
770 "\xee\xb5\x9a\xae\x46\xd2\x2b\xf7"
771 "\x7d\xaf\xe2\x5c\x5e\xdc\x28\xd7"
772 "\xea\x44\xf9\x3e\xe1\x23\x4a\xa8"
773 "\x8f\x61\xc9\x19\x12\xa4\xcc\xd9",
774 }, {
775 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl"
776 "jklmklmnlmnomnopnopq",
777 .psize = 56,
778 .digest = "\x99\x1c\x66\x57\x55\xeb\x3a\x4b"
779 "\x6b\xbd\xfb\x75\xc7\x8a\x49\x2e"
780 "\x8c\x56\xa2\x2c\x5c\x4d\x7e\x42"
781 "\x9b\xfd\xbc\x32\xb9\xd4\xad\x5a"
782 "\xa0\x4a\x1f\x07\x6e\x62\xfe\xa1"
783 "\x9e\xef\x51\xac\xd0\x65\x7c\x22",
784 },
785};
786
787
788#define SHA3_512_TEST_VECTORS 3
789static struct hash_testvec sha3_512_tv_template[] = {
790 {
791 .plaintext = "",
792 .digest = "\xa6\x9f\x73\xcc\xa2\x3a\x9a\xc5"
793 "\xc8\xb5\x67\xdc\x18\x5a\x75\x6e"
794 "\x97\xc9\x82\x16\x4f\xe2\x58\x59"
795 "\xe0\xd1\xdc\xc1\x47\x5c\x80\xa6"
796 "\x15\xb2\x12\x3a\xf1\xf5\xf9\x4c"
797 "\x11\xe3\xe9\x40\x2c\x3a\xc5\x58"
798 "\xf5\x00\x19\x9d\x95\xb6\xd3\xe3"
799 "\x01\x75\x85\x86\x28\x1d\xcd\x26",
800 }, {
801 .plaintext = "a",
802 .psize = 1,
803 .digest = "\x69\x7f\x2d\x85\x61\x72\xcb\x83"
804 "\x09\xd6\xb8\xb9\x7d\xac\x4d\xe3"
805 "\x44\xb5\x49\xd4\xde\xe6\x1e\xdf"
806 "\xb4\x96\x2d\x86\x98\xb7\xfa\x80"
807 "\x3f\x4f\x93\xff\x24\x39\x35\x86"
808 "\xe2\x8b\x5b\x95\x7a\xc3\xd1\xd3"
809 "\x69\x42\x0c\xe5\x33\x32\x71\x2f"
810 "\x99\x7b\xd3\x36\xd0\x9a\xb0\x2a",
811 }, {
812 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkl"
813 "jklmklmnlmnomnopnopq",
814 .psize = 56,
815 .digest = "\x04\xa3\x71\xe8\x4e\xcf\xb5\xb8"
816 "\xb7\x7c\xb4\x86\x10\xfc\xa8\x18"
817 "\x2d\xd4\x57\xce\x6f\x32\x6a\x0f"
818 "\xd3\xd7\xec\x2f\x1e\x91\x63\x6d"
819 "\xee\x69\x1f\xbe\x0c\x98\x53\x02"
820 "\xba\x1b\x0d\x8d\xc7\x8c\x08\x63"
821 "\x46\xb5\x33\xb4\x9c\x03\x0d\x99"
822 "\xa2\x7d\xaf\x11\x39\xd6\xe7\x5e",
823 },
824};
825
826
Herbert Xuda7f0332008-07-31 17:08:25 +0800827/*
828 * MD5 test vectors from RFC1321
829 */
830#define MD5_TEST_VECTORS 7
831
832static struct hash_testvec md5_tv_template[] = {
833 {
834 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
835 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
836 }, {
837 .plaintext = "a",
838 .psize = 1,
839 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
840 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
841 }, {
842 .plaintext = "abc",
843 .psize = 3,
844 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
845 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
846 }, {
847 .plaintext = "message digest",
848 .psize = 14,
849 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
850 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
851 }, {
852 .plaintext = "abcdefghijklmnopqrstuvwxyz",
853 .psize = 26,
854 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
855 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
856 .np = 2,
857 .tap = {13, 13}
858 }, {
859 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
860 .psize = 62,
861 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
862 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
863 }, {
864 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
865 "345678901234567890",
866 .psize = 80,
867 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
868 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
869 }
870
871};
872
873/*
874 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
875 */
876#define RMD128_TEST_VECTORS 10
877
878static struct hash_testvec rmd128_tv_template[] = {
879 {
880 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
881 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
882 }, {
883 .plaintext = "a",
884 .psize = 1,
885 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
886 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
887 }, {
888 .plaintext = "abc",
889 .psize = 3,
890 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
891 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
892 }, {
893 .plaintext = "message digest",
894 .psize = 14,
895 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
896 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
897 }, {
898 .plaintext = "abcdefghijklmnopqrstuvwxyz",
899 .psize = 26,
900 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
901 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
902 }, {
903 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
904 "fghijklmnopqrstuvwxyz0123456789",
905 .psize = 62,
906 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
907 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
908 }, {
909 .plaintext = "1234567890123456789012345678901234567890"
910 "1234567890123456789012345678901234567890",
911 .psize = 80,
912 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
913 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
914 }, {
915 .plaintext = "abcdbcdecdefdefgefghfghighij"
916 "hijkijkljklmklmnlmnomnopnopq",
917 .psize = 56,
918 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
919 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
920 .np = 2,
921 .tap = { 28, 28 },
922 }, {
923 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
924 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
925 "lmnopqrsmnopqrstnopqrstu",
926 .psize = 112,
927 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
928 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
929 }, {
930 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
931 .psize = 32,
932 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
933 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
934 }
935};
936
937/*
938 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
939 */
940#define RMD160_TEST_VECTORS 10
941
942static struct hash_testvec rmd160_tv_template[] = {
943 {
944 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
945 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
946 }, {
947 .plaintext = "a",
948 .psize = 1,
949 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
950 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
951 }, {
952 .plaintext = "abc",
953 .psize = 3,
954 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
955 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
956 }, {
957 .plaintext = "message digest",
958 .psize = 14,
959 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
960 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
961 }, {
962 .plaintext = "abcdefghijklmnopqrstuvwxyz",
963 .psize = 26,
964 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
965 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
966 }, {
967 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
968 "fghijklmnopqrstuvwxyz0123456789",
969 .psize = 62,
970 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
971 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
972 }, {
973 .plaintext = "1234567890123456789012345678901234567890"
974 "1234567890123456789012345678901234567890",
975 .psize = 80,
976 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
977 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
978 }, {
979 .plaintext = "abcdbcdecdefdefgefghfghighij"
980 "hijkijkljklmklmnlmnomnopnopq",
981 .psize = 56,
982 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
983 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
984 .np = 2,
985 .tap = { 28, 28 },
986 }, {
987 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
988 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
989 "lmnopqrsmnopqrstnopqrstu",
990 .psize = 112,
991 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
992 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
993 }, {
994 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
995 .psize = 32,
996 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
997 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
998 }
999};
1000
1001/*
1002 * RIPEMD-256 test vectors
1003 */
1004#define RMD256_TEST_VECTORS 8
1005
1006static struct hash_testvec rmd256_tv_template[] = {
1007 {
1008 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
1009 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
1010 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
1011 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
1012 }, {
1013 .plaintext = "a",
1014 .psize = 1,
1015 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
1016 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
1017 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
1018 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
1019 }, {
1020 .plaintext = "abc",
1021 .psize = 3,
1022 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
1023 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
1024 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
1025 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
1026 }, {
1027 .plaintext = "message digest",
1028 .psize = 14,
1029 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
1030 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
1031 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
1032 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
1033 }, {
1034 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1035 .psize = 26,
1036 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
1037 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
1038 "\x78\x96\x11\x8a\x51\x97\x96\x87"
1039 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
1040 }, {
1041 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
1042 "fghijklmnopqrstuvwxyz0123456789",
1043 .psize = 62,
1044 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
1045 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
1046 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
1047 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
1048 }, {
1049 .plaintext = "1234567890123456789012345678901234567890"
1050 "1234567890123456789012345678901234567890",
1051 .psize = 80,
1052 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
1053 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
1054 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
1055 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
1056 }, {
1057 .plaintext = "abcdbcdecdefdefgefghfghighij"
1058 "hijkijkljklmklmnlmnomnopnopq",
1059 .psize = 56,
1060 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
1061 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
1062 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
1063 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
1064 .np = 2,
1065 .tap = { 28, 28 },
1066 }
1067};
1068
1069/*
1070 * RIPEMD-320 test vectors
1071 */
1072#define RMD320_TEST_VECTORS 8
1073
1074static struct hash_testvec rmd320_tv_template[] = {
1075 {
1076 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
1077 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
1078 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
1079 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
1080 }, {
1081 .plaintext = "a",
1082 .psize = 1,
1083 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
1084 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
1085 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
1086 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
1087 }, {
1088 .plaintext = "abc",
1089 .psize = 3,
1090 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
1091 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
1092 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
1093 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
1094 }, {
1095 .plaintext = "message digest",
1096 .psize = 14,
1097 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
1098 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
1099 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
1100 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
1101 }, {
1102 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1103 .psize = 26,
1104 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
1105 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
1106 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
1107 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
1108 }, {
1109 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
1110 "fghijklmnopqrstuvwxyz0123456789",
1111 .psize = 62,
1112 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
1113 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
1114 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
1115 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
1116 }, {
1117 .plaintext = "1234567890123456789012345678901234567890"
1118 "1234567890123456789012345678901234567890",
1119 .psize = 80,
1120 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
1121 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
1122 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
1123 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
1124 }, {
1125 .plaintext = "abcdbcdecdefdefgefghfghighij"
1126 "hijkijkljklmklmnlmnomnopnopq",
1127 .psize = 56,
1128 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
1129 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
1130 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
1131 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
1132 .np = 2,
1133 .tap = { 28, 28 },
1134 }
1135};
1136
Herbert Xu684115212013-09-07 12:56:26 +10001137#define CRCT10DIF_TEST_VECTORS 3
1138static struct hash_testvec crct10dif_tv_template[] = {
1139 {
1140 .plaintext = "abc",
1141 .psize = 3,
1142#ifdef __LITTLE_ENDIAN
1143 .digest = "\x3b\x44",
1144#else
1145 .digest = "\x44\x3b",
1146#endif
1147 }, {
1148 .plaintext = "1234567890123456789012345678901234567890"
1149 "123456789012345678901234567890123456789",
1150 .psize = 79,
1151#ifdef __LITTLE_ENDIAN
1152 .digest = "\x70\x4b",
1153#else
1154 .digest = "\x4b\x70",
1155#endif
1156 }, {
1157 .plaintext =
1158 "abcddddddddddddddddddddddddddddddddddddddddddddddddddddd",
1159 .psize = 56,
1160#ifdef __LITTLE_ENDIAN
1161 .digest = "\xe3\x9c",
1162#else
1163 .digest = "\x9c\xe3",
1164#endif
1165 .np = 2,
1166 .tap = { 28, 28 }
1167 }
1168};
1169
Herbert Xuda7f0332008-07-31 17:08:25 +08001170/*
1171 * SHA1 test vectors from from FIPS PUB 180-1
Herbert Xubd1f2992011-02-17 14:24:45 +11001172 * Long vector from CAVS 5.0
Herbert Xuda7f0332008-07-31 17:08:25 +08001173 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001174#define SHA1_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001175
1176static struct hash_testvec sha1_tv_template[] = {
1177 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001178 .plaintext = "",
1179 .psize = 0,
1180 .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55"
1181 "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09",
1182 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001183 .plaintext = "abc",
1184 .psize = 3,
1185 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
1186 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
1187 }, {
1188 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1189 .psize = 56,
1190 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
1191 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
1192 .np = 2,
1193 .tap = { 28, 28 }
Herbert Xubd1f2992011-02-17 14:24:45 +11001194 }, {
1195 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
1196 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
1197 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
1198 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
1199 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
1200 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
1201 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
1202 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
1203 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
1204 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
1205 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
1206 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
1207 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
1208 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
1209 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
1210 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
1211 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
1212 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
1213 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
1214 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
1215 "\x5a\x90\x11",
1216 .psize = 163,
1217 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
1218 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
1219 .np = 4,
1220 .tap = { 63, 64, 31, 5 }
Ard Biesheuvel45859882014-04-16 20:40:04 +08001221 }, {
1222 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1223 .psize = 64,
1224 .digest = "\xc8\x71\xf6\x9a\x63\xcc\xa9\x84\x84\x82"
1225 "\x64\xe7\x79\x95\x5d\xd7\x19\x41\x7c\x91",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001226 }, {
1227 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1228 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1229 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1230 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1231 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1232 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1233 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1234 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1235 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1236 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1237 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1238 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1239 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1240 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1241 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1242 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1243 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1244 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1245 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1246 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1247 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1248 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1249 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1250 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1251 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1252 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1253 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1254 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1255 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1256 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1257 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1258 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1259 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1260 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1261 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1262 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1263 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1264 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1265 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1266 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1267 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1268 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1269 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1270 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1271 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1272 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1273 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1274 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1275 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1276 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1277 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1278 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1279 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1280 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1281 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1282 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1283 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1284 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1285 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1286 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1287 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1288 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1289 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1290 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1291 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1292 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1293 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1294 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1295 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1296 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1297 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1298 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1299 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1300 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1301 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1302 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1303 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1304 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1305 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1306 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1307 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1308 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1309 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1310 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1311 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1312 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1313 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1314 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1315 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1316 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1317 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1318 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1319 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1320 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1321 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1322 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1323 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1324 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1325 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1326 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1327 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1328 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1329 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1330 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1331 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1332 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1333 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1334 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1335 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1336 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1337 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1338 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1339 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1340 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1341 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1342 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1343 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1344 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1345 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1346 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1347 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1348 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1349 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1350 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1351 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1352 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1353 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1354 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1355 .psize = 1023,
1356 .digest = "\xb8\xe3\x54\xed\xc5\xfc\xef\xa4"
1357 "\x55\x73\x4a\x81\x99\xe4\x47\x2a"
1358 "\x30\xd6\xc9\x85",
Herbert Xuda7f0332008-07-31 17:08:25 +08001359 }
1360};
1361
1362
1363/*
1364 * SHA224 test vectors from from FIPS PUB 180-2
1365 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001366#define SHA224_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08001367
1368static struct hash_testvec sha224_tv_template[] = {
1369 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001370 .plaintext = "",
1371 .psize = 0,
1372 .digest = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9"
1373 "\x47\x61\x02\xbb\x28\x82\x34\xc4"
1374 "\x15\xa2\xb0\x1f\x82\x8e\xa6\x2a"
1375 "\xc5\xb3\xe4\x2f",
1376 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001377 .plaintext = "abc",
1378 .psize = 3,
1379 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
1380 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
1381 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
1382 "\xE3\x6C\x9D\xA7",
1383 }, {
1384 .plaintext =
1385 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1386 .psize = 56,
1387 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
1388 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
1389 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
1390 "\x52\x52\x25\x25",
1391 .np = 2,
1392 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +08001393 }, {
1394 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1395 .psize = 64,
1396 .digest = "\xc4\xdb\x2b\x3a\x58\xc3\x99\x01"
1397 "\x42\xfd\x10\x92\xaa\x4e\x04\x08"
1398 "\x58\xbb\xbb\xe8\xf8\x14\xa7\x0c"
1399 "\xef\x3b\xcb\x0e",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001400 }, {
1401 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1402 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1403 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1404 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1405 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1406 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1407 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1408 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1409 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1410 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1411 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1412 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1413 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1414 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1415 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1416 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1417 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1418 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1419 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1420 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1421 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1422 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1423 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1424 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1425 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1426 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1427 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1428 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1429 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1430 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1431 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1432 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1433 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1434 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1435 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1436 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1437 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1438 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1439 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1440 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1441 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1442 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1443 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1444 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1445 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1446 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1447 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1448 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1449 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1450 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1451 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1452 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1453 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1454 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1455 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1456 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1457 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1458 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1459 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1460 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1461 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1462 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1463 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1464 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1465 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1466 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1467 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1468 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1469 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1470 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1471 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1472 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1473 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1474 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1475 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1476 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1477 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1478 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1479 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1480 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1481 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1482 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1483 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1484 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1485 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1486 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1487 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1488 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1489 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1490 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1491 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1492 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1493 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1494 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1495 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1496 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1497 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1498 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1499 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1500 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1501 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1502 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1503 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1504 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1505 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1506 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1507 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1508 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1509 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1510 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1511 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1512 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1513 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1514 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1515 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1516 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1517 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1518 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1519 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1520 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1521 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1522 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1523 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1524 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1525 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1526 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1527 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1528 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1529 .psize = 1023,
1530 .digest = "\x98\x43\x07\x63\x75\xe0\xa7\x1c"
1531 "\x78\xb1\x8b\xfd\x04\xf5\x2d\x91"
1532 "\x20\x48\xa4\x28\xff\x55\xb1\xd3"
1533 "\xe6\xf9\x4f\xcc",
Herbert Xuda7f0332008-07-31 17:08:25 +08001534 }
1535};
1536
1537/*
1538 * SHA256 test vectors from from NIST
1539 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001540#define SHA256_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08001541
1542static struct hash_testvec sha256_tv_template[] = {
1543 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001544 .plaintext = "",
1545 .psize = 0,
1546 .digest = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14"
1547 "\x9a\xfb\xf4\xc8\x99\x6f\xb9\x24"
1548 "\x27\xae\x41\xe4\x64\x9b\x93\x4c"
1549 "\xa4\x95\x99\x1b\x78\x52\xb8\x55",
1550 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001551 .plaintext = "abc",
1552 .psize = 3,
1553 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
1554 "\x41\x41\x40\xde\x5d\xae\x22\x23"
1555 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
1556 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
1557 }, {
1558 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1559 .psize = 56,
1560 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
1561 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
1562 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
1563 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
1564 .np = 2,
1565 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +08001566 }, {
1567 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1568 .psize = 64,
1569 .digest = "\xb5\xfe\xad\x56\x7d\xff\xcb\xa4"
1570 "\x2c\x32\x29\x32\x19\xbb\xfb\xfa"
1571 "\xd6\xff\x94\xa3\x72\x91\x85\x66"
1572 "\x3b\xa7\x87\x77\x58\xa3\x40\x3a",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001573 }, {
1574 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1575 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1576 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1577 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1578 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1579 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1580 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1581 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1582 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1583 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1584 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1585 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1586 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1587 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1588 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1589 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1590 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1591 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1592 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1593 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1594 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1595 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1596 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1597 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1598 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1599 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1600 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1601 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1602 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1603 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1604 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1605 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1606 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1607 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1608 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1609 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1610 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1611 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1612 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1613 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1614 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1615 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1616 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1617 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1618 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1619 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1620 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1621 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1622 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1623 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1624 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1625 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1626 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1627 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1628 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1629 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1630 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1631 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1632 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1633 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1634 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1635 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1636 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1637 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1638 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1639 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1640 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1641 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1642 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1643 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1644 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1645 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1646 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1647 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1648 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1649 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1650 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1651 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1652 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1653 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1654 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1655 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1656 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1657 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1658 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1659 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1660 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1661 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1662 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1663 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1664 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1665 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1666 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1667 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1668 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1669 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1670 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1671 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1672 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1673 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1674 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1675 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1676 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1677 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1678 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1679 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1680 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1681 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1682 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1683 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1684 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1685 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1686 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1687 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1688 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1689 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1690 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1691 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1692 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1693 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1694 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1695 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1696 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1697 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1698 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1699 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1700 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1701 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1702 .psize = 1023,
1703 .digest = "\xc5\xce\x0c\xca\x01\x4f\x53\x3a"
1704 "\x32\x32\x17\xcc\xd4\x6a\x71\xa9"
1705 "\xf3\xed\x50\x10\x64\x8e\x06\xbe"
1706 "\x9b\x4a\xa6\xbb\x05\x89\x59\x51",
Ard Biesheuvel45859882014-04-16 20:40:04 +08001707 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001708};
1709
1710/*
1711 * SHA384 test vectors from from NIST and kerneli
1712 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001713#define SHA384_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001714
1715static struct hash_testvec sha384_tv_template[] = {
1716 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001717 .plaintext = "",
1718 .psize = 0,
1719 .digest = "\x38\xb0\x60\xa7\x51\xac\x96\x38"
1720 "\x4c\xd9\x32\x7e\xb1\xb1\xe3\x6a"
1721 "\x21\xfd\xb7\x11\x14\xbe\x07\x43"
1722 "\x4c\x0c\xc7\xbf\x63\xf6\xe1\xda"
1723 "\x27\x4e\xde\xbf\xe7\x6f\x65\xfb"
1724 "\xd5\x1a\xd2\xf1\x48\x98\xb9\x5b",
1725 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001726 .plaintext= "abc",
1727 .psize = 3,
1728 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
1729 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
1730 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
1731 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
1732 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
1733 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
1734 }, {
1735 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1736 .psize = 56,
1737 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
1738 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
1739 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
1740 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
1741 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
1742 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
1743 }, {
1744 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1745 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1746 .psize = 112,
1747 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
1748 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
1749 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
1750 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
1751 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
1752 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
1753 }, {
1754 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1755 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1756 .psize = 104,
1757 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
1758 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
1759 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
1760 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
1761 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
1762 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
1763 .np = 4,
1764 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001765 }, {
1766 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1767 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1768 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1769 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1770 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1771 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1772 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1773 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1774 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1775 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1776 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1777 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1778 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1779 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1780 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1781 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1782 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1783 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1784 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1785 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1786 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1787 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1788 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1789 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1790 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1791 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1792 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1793 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1794 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1795 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1796 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1797 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1798 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1799 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1800 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1801 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1802 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1803 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1804 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1805 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1806 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1807 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1808 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1809 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1810 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1811 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1812 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1813 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1814 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1815 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1816 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1817 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1818 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1819 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1820 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1821 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1822 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1823 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1824 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1825 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1826 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1827 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1828 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1829 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1830 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1831 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1832 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1833 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1834 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1835 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1836 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1837 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1838 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1839 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1840 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1841 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1842 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1843 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1844 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1845 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1846 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1847 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1848 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1849 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1850 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1851 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1852 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1853 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1854 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1855 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1856 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1857 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1858 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1859 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1860 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1861 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1862 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1863 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1864 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1865 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1866 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1867 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1868 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1869 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1870 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1871 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1872 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1873 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1874 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1875 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1876 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1877 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1878 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1879 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1880 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1881 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1882 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1883 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1884 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1885 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1886 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1887 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1888 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1889 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1890 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1891 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1892 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1893 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1894 .psize = 1023,
1895 .digest = "\x4d\x97\x23\xc8\xea\x7a\x7c\x15"
1896 "\xb8\xff\x97\x9c\xf5\x13\x4f\x31"
1897 "\xde\x67\xf7\x24\x73\xcd\x70\x1c"
1898 "\x03\x4a\xba\x8a\x87\x49\xfe\xdc"
1899 "\x75\x29\x62\x83\xae\x3f\x17\xab"
1900 "\xfd\x10\x4d\x8e\x17\x1c\x1f\xca",
1901 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001902};
1903
1904/*
1905 * SHA512 test vectors from from NIST and kerneli
1906 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001907#define SHA512_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001908
1909static struct hash_testvec sha512_tv_template[] = {
1910 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001911 .plaintext = "",
1912 .psize = 0,
1913 .digest = "\xcf\x83\xe1\x35\x7e\xef\xb8\xbd"
1914 "\xf1\x54\x28\x50\xd6\x6d\x80\x07"
1915 "\xd6\x20\xe4\x05\x0b\x57\x15\xdc"
1916 "\x83\xf4\xa9\x21\xd3\x6c\xe9\xce"
1917 "\x47\xd0\xd1\x3c\x5d\x85\xf2\xb0"
1918 "\xff\x83\x18\xd2\x87\x7e\xec\x2f"
1919 "\x63\xb9\x31\xbd\x47\x41\x7a\x81"
1920 "\xa5\x38\x32\x7a\xf9\x27\xda\x3e",
1921 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001922 .plaintext = "abc",
1923 .psize = 3,
1924 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
1925 "\xcc\x41\x73\x49\xae\x20\x41\x31"
1926 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
1927 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
1928 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
1929 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
1930 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
1931 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
1932 }, {
1933 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1934 .psize = 56,
1935 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
1936 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
1937 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
1938 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
1939 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
1940 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
1941 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
1942 "\x54\xec\x63\x12\x38\xca\x34\x45",
1943 }, {
1944 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1945 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1946 .psize = 112,
1947 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
1948 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
1949 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
1950 "\x72\x99\xae\xad\xb6\x88\x90\x18"
1951 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
1952 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
1953 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
1954 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
1955 }, {
1956 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1957 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1958 .psize = 104,
1959 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
1960 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
1961 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
1962 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
1963 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
1964 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
1965 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
1966 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
1967 .np = 4,
1968 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001969 }, {
1970 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1971 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1972 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1973 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1974 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1975 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1976 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1977 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1978 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1979 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1980 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1981 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1982 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1983 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1984 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1985 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1986 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1987 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1988 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1989 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1990 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1991 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1992 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1993 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1994 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1995 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1996 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1997 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1998 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1999 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
2000 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
2001 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
2002 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
2003 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
2004 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
2005 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
2006 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
2007 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
2008 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
2009 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
2010 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
2011 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
2012 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
2013 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
2014 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
2015 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
2016 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
2017 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
2018 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
2019 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
2020 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
2021 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
2022 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
2023 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
2024 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
2025 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
2026 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
2027 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
2028 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
2029 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
2030 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
2031 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
2032 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
2033 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
2034 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
2035 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
2036 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
2037 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
2038 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
2039 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
2040 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
2041 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
2042 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
2043 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
2044 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
2045 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
2046 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
2047 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
2048 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
2049 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
2050 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
2051 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
2052 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
2053 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
2054 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
2055 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
2056 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
2057 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
2058 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
2059 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
2060 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
2061 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
2062 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
2063 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
2064 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
2065 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
2066 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
2067 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
2068 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
2069 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
2070 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
2071 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
2072 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
2073 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
2074 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
2075 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
2076 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
2077 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
2078 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
2079 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
2080 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
2081 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
2082 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
2083 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
2084 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
2085 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
2086 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
2087 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
2088 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
2089 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
2090 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
2091 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
2092 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
2093 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
2094 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
2095 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
2096 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
2097 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
2098 .psize = 1023,
2099 .digest = "\x76\xc9\xd4\x91\x7a\x5f\x0f\xaa"
2100 "\x13\x39\xf3\x01\x7a\xfa\xe5\x41"
2101 "\x5f\x0b\xf8\xeb\x32\xfc\xbf\xb0"
2102 "\xfa\x8c\xcd\x17\x83\xe2\xfa\xeb"
2103 "\x1c\x19\xde\xe2\x75\xdc\x34\x64"
2104 "\x5f\x35\x9c\x61\x2f\x10\xf9\xec"
2105 "\x59\xca\x9d\xcc\x25\x0c\x43\xba"
2106 "\x85\xa8\xf8\xfe\xb5\x24\xb2\xee",
2107 }
Herbert Xuda7f0332008-07-31 17:08:25 +08002108};
2109
2110
2111/*
2112 * WHIRLPOOL test vectors from Whirlpool package
2113 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
2114 * submission
2115 */
2116#define WP512_TEST_VECTORS 8
2117
2118static struct hash_testvec wp512_tv_template[] = {
2119 {
2120 .plaintext = "",
2121 .psize = 0,
2122 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
2123 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
2124 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
2125 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
2126 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
2127 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
2128 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
2129 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
2130
2131
2132 }, {
2133 .plaintext = "a",
2134 .psize = 1,
2135 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
2136 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
2137 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
2138 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
2139 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
2140 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
2141 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
2142 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
2143 }, {
2144 .plaintext = "abc",
2145 .psize = 3,
2146 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
2147 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
2148 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
2149 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
2150 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
2151 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
2152 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
2153 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
2154 }, {
2155 .plaintext = "message digest",
2156 .psize = 14,
2157 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
2158 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
2159 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
2160 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
2161 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
2162 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
2163 "\x92\xED\x92\x00\x52\x83\x8F\x33"
2164 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
2165 }, {
2166 .plaintext = "abcdefghijklmnopqrstuvwxyz",
2167 .psize = 26,
2168 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
2169 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
2170 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
2171 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
2172 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
2173 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
2174 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
2175 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
2176 }, {
2177 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
2178 "abcdefghijklmnopqrstuvwxyz0123456789",
2179 .psize = 62,
2180 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
2181 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
2182 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
2183 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
2184 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
2185 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
2186 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
2187 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
2188 }, {
2189 .plaintext = "1234567890123456789012345678901234567890"
2190 "1234567890123456789012345678901234567890",
2191 .psize = 80,
2192 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
2193 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
2194 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
2195 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
2196 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
2197 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
2198 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
2199 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
2200 }, {
2201 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
2202 .psize = 32,
2203 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
2204 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
2205 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
2206 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
2207 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
2208 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
2209 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
2210 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
2211 },
2212};
2213
2214#define WP384_TEST_VECTORS 8
2215
2216static struct hash_testvec wp384_tv_template[] = {
2217 {
2218 .plaintext = "",
2219 .psize = 0,
2220 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
2221 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
2222 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
2223 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
2224 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
2225 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
2226
2227
2228 }, {
2229 .plaintext = "a",
2230 .psize = 1,
2231 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
2232 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
2233 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
2234 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
2235 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
2236 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
2237 }, {
2238 .plaintext = "abc",
2239 .psize = 3,
2240 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
2241 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
2242 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
2243 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
2244 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
2245 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
2246 }, {
2247 .plaintext = "message digest",
2248 .psize = 14,
2249 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
2250 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
2251 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
2252 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
2253 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
2254 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
2255 }, {
2256 .plaintext = "abcdefghijklmnopqrstuvwxyz",
2257 .psize = 26,
2258 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
2259 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
2260 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
2261 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
2262 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
2263 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
2264 }, {
2265 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
2266 "abcdefghijklmnopqrstuvwxyz0123456789",
2267 .psize = 62,
2268 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
2269 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
2270 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
2271 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
2272 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
2273 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
2274 }, {
2275 .plaintext = "1234567890123456789012345678901234567890"
2276 "1234567890123456789012345678901234567890",
2277 .psize = 80,
2278 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
2279 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
2280 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
2281 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
2282 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
2283 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
2284 }, {
2285 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
2286 .psize = 32,
2287 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
2288 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
2289 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
2290 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
2291 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
2292 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
2293 },
2294};
2295
2296#define WP256_TEST_VECTORS 8
2297
2298static struct hash_testvec wp256_tv_template[] = {
2299 {
2300 .plaintext = "",
2301 .psize = 0,
2302 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
2303 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
2304 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
2305 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
2306
2307
2308 }, {
2309 .plaintext = "a",
2310 .psize = 1,
2311 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
2312 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
2313 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
2314 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
2315 }, {
2316 .plaintext = "abc",
2317 .psize = 3,
2318 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
2319 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
2320 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
2321 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
2322 }, {
2323 .plaintext = "message digest",
2324 .psize = 14,
2325 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
2326 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
2327 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
2328 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
2329 }, {
2330 .plaintext = "abcdefghijklmnopqrstuvwxyz",
2331 .psize = 26,
2332 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
2333 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
2334 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
2335 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
2336 }, {
2337 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
2338 "abcdefghijklmnopqrstuvwxyz0123456789",
2339 .psize = 62,
2340 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
2341 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
2342 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
2343 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
2344 }, {
2345 .plaintext = "1234567890123456789012345678901234567890"
2346 "1234567890123456789012345678901234567890",
2347 .psize = 80,
2348 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
2349 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
2350 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
2351 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
2352 }, {
2353 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
2354 .psize = 32,
2355 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
2356 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
2357 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
2358 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
2359 },
2360};
2361
2362/*
2363 * TIGER test vectors from Tiger website
2364 */
2365#define TGR192_TEST_VECTORS 6
2366
2367static struct hash_testvec tgr192_tv_template[] = {
2368 {
2369 .plaintext = "",
2370 .psize = 0,
2371 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
2372 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
2373 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
2374 }, {
2375 .plaintext = "abc",
2376 .psize = 3,
2377 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
2378 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
2379 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
2380 }, {
2381 .plaintext = "Tiger",
2382 .psize = 5,
2383 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
2384 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
2385 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
2386 }, {
2387 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
2388 .psize = 64,
2389 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
2390 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
2391 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
2392 }, {
2393 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
2394 .psize = 64,
2395 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
2396 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
2397 "\x57\x89\x65\x65\x97\x5f\x91\x97",
2398 }, {
2399 .plaintext = "Tiger - A Fast New Hash Function, "
2400 "by Ross Anderson and Eli Biham, "
2401 "proceedings of Fast Software Encryption 3, "
2402 "Cambridge, 1996.",
2403 .psize = 125,
2404 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
2405 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
2406 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
2407 },
2408};
2409
2410#define TGR160_TEST_VECTORS 6
2411
2412static struct hash_testvec tgr160_tv_template[] = {
2413 {
2414 .plaintext = "",
2415 .psize = 0,
2416 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
2417 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
2418 "\xf3\x73\xde\x2d",
2419 }, {
2420 .plaintext = "abc",
2421 .psize = 3,
2422 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
2423 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
2424 "\x93\x5f\x7b\x95",
2425 }, {
2426 .plaintext = "Tiger",
2427 .psize = 5,
2428 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
2429 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
2430 "\x37\x79\x0c\x11",
2431 }, {
2432 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
2433 .psize = 64,
2434 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
2435 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
2436 "\xb5\x86\x44\x50",
2437 }, {
2438 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
2439 .psize = 64,
2440 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
2441 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
2442 "\x57\x89\x65\x65",
2443 }, {
2444 .plaintext = "Tiger - A Fast New Hash Function, "
2445 "by Ross Anderson and Eli Biham, "
2446 "proceedings of Fast Software Encryption 3, "
2447 "Cambridge, 1996.",
2448 .psize = 125,
2449 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
2450 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
2451 "\xdd\x68\x15\x1d",
2452 },
2453};
2454
2455#define TGR128_TEST_VECTORS 6
2456
2457static struct hash_testvec tgr128_tv_template[] = {
2458 {
2459 .plaintext = "",
2460 .psize = 0,
2461 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
2462 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
2463 }, {
2464 .plaintext = "abc",
2465 .psize = 3,
2466 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
2467 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
2468 }, {
2469 .plaintext = "Tiger",
2470 .psize = 5,
2471 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
2472 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
2473 }, {
2474 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
2475 .psize = 64,
2476 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
2477 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
2478 }, {
2479 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
2480 .psize = 64,
2481 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
2482 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
2483 }, {
2484 .plaintext = "Tiger - A Fast New Hash Function, "
2485 "by Ross Anderson and Eli Biham, "
2486 "proceedings of Fast Software Encryption 3, "
2487 "Cambridge, 1996.",
2488 .psize = 125,
2489 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
2490 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
2491 },
2492};
2493
Harald Freudenberger445a8e02015-05-21 17:34:31 +02002494#define GHASH_TEST_VECTORS 6
Youquan, Song507069c2009-11-23 20:23:04 +08002495
2496static struct hash_testvec ghash_tv_template[] =
2497{
2498 {
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002499 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03"
2500 "\xff\xca\xff\x95\xf8\x30\xf0\x61",
Youquan, Song507069c2009-11-23 20:23:04 +08002501 .ksize = 16,
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002502 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
2503 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
Youquan, Song507069c2009-11-23 20:23:04 +08002504 .psize = 16,
2505 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
2506 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002507 }, {
2508 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2509 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2510 .ksize = 16,
2511 .plaintext = "what do ya want for nothing?",
2512 .psize = 28,
2513 .digest = "\x3e\x1f\x5c\x4d\x65\xf0\xef\xce"
2514 "\x0d\x61\x06\x27\x66\x51\xd5\xe2",
2515 .np = 2,
2516 .tap = {14, 14}
2517 }, {
2518 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2519 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2520 .ksize = 16,
2521 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2522 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2523 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2524 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2525 .psize = 50,
2526 .digest = "\xfb\x49\x8a\x36\xe1\x96\xe1\x96"
2527 "\xe1\x96\xe1\x96\xe1\x96\xe1\x96",
2528 }, {
2529 .key = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
2530 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
2531 .ksize = 16,
2532 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2533 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2534 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2535 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2536 .psize = 50,
2537 .digest = "\x2b\x5c\x0c\x7f\x52\xd1\x60\xc2"
2538 "\x49\xed\x6e\x32\x7a\xa9\xbe\x08",
2539 }, {
2540 .key = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
2541 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
2542 .ksize = 16,
2543 .plaintext = "Test With Truncation",
2544 .psize = 20,
2545 .digest = "\xf8\x94\x87\x2a\x4b\x63\x99\x28"
2546 "\x23\xf7\x93\xf7\x19\xf5\x96\xd9",
Harald Freudenberger445a8e02015-05-21 17:34:31 +02002547 }, {
2548 .key = "\x0a\x1b\x2c\x3d\x4e\x5f\x64\x71"
2549 "\x82\x93\xa4\xb5\xc6\xd7\xe8\xf9",
2550 .ksize = 16,
2551 .plaintext = "\x56\x6f\x72\x20\x6c\x61\x75\x74"
2552 "\x65\x72\x20\x4c\x61\x75\x73\x63"
2553 "\x68\x65\x6e\x20\x75\x6e\x64\x20"
2554 "\x53\x74\x61\x75\x6e\x65\x6e\x20"
2555 "\x73\x65\x69\x20\x73\x74\x69\x6c"
2556 "\x6c\x2c\x0a\x64\x75\x20\x6d\x65"
2557 "\x69\x6e\x20\x74\x69\x65\x66\x74"
2558 "\x69\x65\x66\x65\x73\x20\x4c\x65"
2559 "\x62\x65\x6e\x3b\x0a\x64\x61\x73"
2560 "\x73\x20\x64\x75\x20\x77\x65\x69"
2561 "\xc3\x9f\x74\x20\x77\x61\x73\x20"
2562 "\x64\x65\x72\x20\x57\x69\x6e\x64"
2563 "\x20\x64\x69\x72\x20\x77\x69\x6c"
2564 "\x6c\x2c\x0a\x65\x68\x20\x6e\x6f"
2565 "\x63\x68\x20\x64\x69\x65\x20\x42"
2566 "\x69\x72\x6b\x65\x6e\x20\x62\x65"
2567 "\x62\x65\x6e\x2e\x0a\x0a\x55\x6e"
2568 "\x64\x20\x77\x65\x6e\x6e\x20\x64"
2569 "\x69\x72\x20\x65\x69\x6e\x6d\x61"
2570 "\x6c\x20\x64\x61\x73\x20\x53\x63"
2571 "\x68\x77\x65\x69\x67\x65\x6e\x20"
2572 "\x73\x70\x72\x61\x63\x68\x2c\x0a"
2573 "\x6c\x61\x73\x73\x20\x64\x65\x69"
2574 "\x6e\x65\x20\x53\x69\x6e\x6e\x65"
2575 "\x20\x62\x65\x73\x69\x65\x67\x65"
2576 "\x6e\x2e\x0a\x4a\x65\x64\x65\x6d"
2577 "\x20\x48\x61\x75\x63\x68\x65\x20"
2578 "\x67\x69\x62\x74\x20\x64\x69\x63"
2579 "\x68\x2c\x20\x67\x69\x62\x20\x6e"
2580 "\x61\x63\x68\x2c\x0a\x65\x72\x20"
2581 "\x77\x69\x72\x64\x20\x64\x69\x63"
2582 "\x68\x20\x6c\x69\x65\x62\x65\x6e"
2583 "\x20\x75\x6e\x64\x20\x77\x69\x65"
2584 "\x67\x65\x6e\x2e\x0a\x0a\x55\x6e"
2585 "\x64\x20\x64\x61\x6e\x6e\x20\x6d"
2586 "\x65\x69\x6e\x65\x20\x53\x65\x65"
2587 "\x6c\x65\x20\x73\x65\x69\x74\x20"
2588 "\x77\x65\x69\x74\x2c\x20\x73\x65"
2589 "\x69\x20\x77\x65\x69\x74\x2c\x0a"
2590 "\x64\x61\x73\x73\x20\x64\x69\x72"
2591 "\x20\x64\x61\x73\x20\x4c\x65\x62"
2592 "\x65\x6e\x20\x67\x65\x6c\x69\x6e"
2593 "\x67\x65\x2c\x0a\x62\x72\x65\x69"
2594 "\x74\x65\x20\x64\x69\x63\x68\x20"
2595 "\x77\x69\x65\x20\x65\x69\x6e\x20"
2596 "\x46\x65\x69\x65\x72\x6b\x6c\x65"
2597 "\x69\x64\x0a\xc3\xbc\x62\x65\x72"
2598 "\x20\x64\x69\x65\x20\x73\x69\x6e"
2599 "\x6e\x65\x6e\x64\x65\x6e\x20\x44"
2600 "\x69\x6e\x67\x65\x2e\x2e\x2e\x0a",
2601 .psize = 400,
2602 .digest = "\xad\xb1\xc1\xe9\x56\x70\x31\x1d"
2603 "\xbb\x5b\xdf\x5e\x70\x72\x1a\x57",
Youquan, Song507069c2009-11-23 20:23:04 +08002604 },
2605};
2606
Herbert Xuda7f0332008-07-31 17:08:25 +08002607/*
2608 * HMAC-MD5 test vectors from RFC2202
2609 * (These need to be fixed to not use strlen).
2610 */
2611#define HMAC_MD5_TEST_VECTORS 7
2612
2613static struct hash_testvec hmac_md5_tv_template[] =
2614{
2615 {
2616 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2617 .ksize = 16,
2618 .plaintext = "Hi There",
2619 .psize = 8,
2620 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
2621 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
2622 }, {
2623 .key = "Jefe",
2624 .ksize = 4,
2625 .plaintext = "what do ya want for nothing?",
2626 .psize = 28,
2627 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
2628 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
2629 .np = 2,
2630 .tap = {14, 14}
2631 }, {
2632 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2633 .ksize = 16,
2634 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2635 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2636 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2637 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2638 .psize = 50,
2639 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
2640 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
2641 }, {
2642 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2643 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2644 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2645 .ksize = 25,
2646 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2647 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2648 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2649 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2650 .psize = 50,
2651 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
2652 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
2653 }, {
2654 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2655 .ksize = 16,
2656 .plaintext = "Test With Truncation",
2657 .psize = 20,
2658 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
2659 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
2660 }, {
2661 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2662 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2663 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2664 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2665 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2666 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2667 "\xaa\xaa",
2668 .ksize = 80,
2669 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2670 .psize = 54,
2671 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
2672 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
2673 }, {
2674 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2675 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2676 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2677 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2678 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2679 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2680 "\xaa\xaa",
2681 .ksize = 80,
2682 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2683 "Block-Size Data",
2684 .psize = 73,
2685 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
2686 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
2687 },
2688};
2689
2690/*
2691 * HMAC-RIPEMD128 test vectors from RFC2286
2692 */
2693#define HMAC_RMD128_TEST_VECTORS 7
2694
2695static struct hash_testvec hmac_rmd128_tv_template[] = {
2696 {
2697 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2698 .ksize = 16,
2699 .plaintext = "Hi There",
2700 .psize = 8,
2701 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
2702 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
2703 }, {
2704 .key = "Jefe",
2705 .ksize = 4,
2706 .plaintext = "what do ya want for nothing?",
2707 .psize = 28,
2708 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
2709 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
2710 .np = 2,
2711 .tap = { 14, 14 },
2712 }, {
2713 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2714 .ksize = 16,
2715 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2716 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2717 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2718 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2719 .psize = 50,
2720 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
2721 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
2722 }, {
2723 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2724 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2725 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2726 .ksize = 25,
2727 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2728 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2729 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2730 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2731 .psize = 50,
2732 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
2733 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
2734 }, {
2735 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2736 .ksize = 16,
2737 .plaintext = "Test With Truncation",
2738 .psize = 20,
2739 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
2740 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
2741 }, {
2742 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2743 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2744 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2745 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2746 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2747 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2748 "\xaa\xaa",
2749 .ksize = 80,
2750 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2751 .psize = 54,
2752 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
2753 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
2754 }, {
2755 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2756 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2757 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2758 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2759 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2760 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2761 "\xaa\xaa",
2762 .ksize = 80,
2763 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2764 "Block-Size Data",
2765 .psize = 73,
2766 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
2767 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
2768 },
2769};
2770
2771/*
2772 * HMAC-RIPEMD160 test vectors from RFC2286
2773 */
2774#define HMAC_RMD160_TEST_VECTORS 7
2775
2776static struct hash_testvec hmac_rmd160_tv_template[] = {
2777 {
2778 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2779 .ksize = 20,
2780 .plaintext = "Hi There",
2781 .psize = 8,
2782 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
2783 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
2784 }, {
2785 .key = "Jefe",
2786 .ksize = 4,
2787 .plaintext = "what do ya want for nothing?",
2788 .psize = 28,
2789 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
2790 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
2791 .np = 2,
2792 .tap = { 14, 14 },
2793 }, {
2794 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2795 .ksize = 20,
2796 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2797 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2798 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2799 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2800 .psize = 50,
2801 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
2802 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
2803 }, {
2804 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2805 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2806 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2807 .ksize = 25,
2808 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2809 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2810 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2811 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2812 .psize = 50,
2813 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
2814 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
2815 }, {
2816 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2817 .ksize = 20,
2818 .plaintext = "Test With Truncation",
2819 .psize = 20,
2820 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
2821 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
2822 }, {
2823 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2824 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2825 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2826 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2827 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2828 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2829 "\xaa\xaa",
2830 .ksize = 80,
2831 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2832 .psize = 54,
2833 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
2834 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
2835 }, {
2836 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2837 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2838 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2839 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2840 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2841 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2842 "\xaa\xaa",
2843 .ksize = 80,
2844 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2845 "Block-Size Data",
2846 .psize = 73,
2847 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
2848 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
2849 },
2850};
2851
2852/*
2853 * HMAC-SHA1 test vectors from RFC2202
2854 */
2855#define HMAC_SHA1_TEST_VECTORS 7
2856
2857static struct hash_testvec hmac_sha1_tv_template[] = {
2858 {
2859 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2860 .ksize = 20,
2861 .plaintext = "Hi There",
2862 .psize = 8,
2863 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
2864 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
2865 "\x46\xbe",
2866 }, {
2867 .key = "Jefe",
2868 .ksize = 4,
2869 .plaintext = "what do ya want for nothing?",
2870 .psize = 28,
2871 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
2872 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
2873 .np = 2,
2874 .tap = { 14, 14 }
2875 }, {
2876 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2877 .ksize = 20,
2878 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2879 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2880 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2881 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2882 .psize = 50,
2883 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
2884 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
2885 }, {
2886 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2887 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2888 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2889 .ksize = 25,
2890 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2891 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2892 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2893 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2894 .psize = 50,
2895 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
2896 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
2897 }, {
2898 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2899 .ksize = 20,
2900 .plaintext = "Test With Truncation",
2901 .psize = 20,
2902 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
2903 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
2904 }, {
2905 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2906 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2907 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2908 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2909 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2910 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2911 "\xaa\xaa",
2912 .ksize = 80,
2913 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2914 .psize = 54,
2915 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
2916 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
2917 }, {
2918 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2919 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2920 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2921 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2922 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2923 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2924 "\xaa\xaa",
2925 .ksize = 80,
2926 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2927 "Block-Size Data",
2928 .psize = 73,
2929 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
2930 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
2931 },
2932};
2933
2934
2935/*
2936 * SHA224 HMAC test vectors from RFC4231
2937 */
2938#define HMAC_SHA224_TEST_VECTORS 4
2939
2940static struct hash_testvec hmac_sha224_tv_template[] = {
2941 {
2942 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2943 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2944 "\x0b\x0b\x0b\x0b",
2945 .ksize = 20,
2946 /* ("Hi There") */
2947 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
2948 .psize = 8,
2949 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
2950 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
2951 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
2952 "\x53\x68\x4b\x22",
2953 }, {
2954 .key = "Jefe",
2955 .ksize = 4,
2956 /* ("what do ya want for nothing?") */
2957 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
2958 "\x79\x61\x20\x77\x61\x6e\x74\x20"
2959 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
2960 "\x69\x6e\x67\x3f",
2961 .psize = 28,
2962 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
2963 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
2964 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
2965 "\x8f\xd0\x5e\x44",
2966 .np = 4,
2967 .tap = { 7, 7, 7, 7 }
2968 }, {
2969 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2970 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2971 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2972 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2973 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2974 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2975 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2976 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2977 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2978 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2979 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2980 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2981 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2982 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2983 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2984 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2985 "\xaa\xaa\xaa",
2986 .ksize = 131,
2987 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
2988 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
2989 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
2990 "\x72\x20\x54\x68\x61\x6e\x20\x42"
2991 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
2992 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
2993 "\x48\x61\x73\x68\x20\x4b\x65\x79"
2994 "\x20\x46\x69\x72\x73\x74",
2995 .psize = 54,
2996 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
2997 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
2998 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
2999 "\x3f\xa6\x87\x0e",
3000 }, {
3001 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3002 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3003 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3004 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3005 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3006 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3007 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3008 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3009 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3010 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3011 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3012 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3013 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3014 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3015 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3016 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3017 "\xaa\xaa\xaa",
3018 .ksize = 131,
3019 /* ("This is a test using a larger than block-size key and a")
3020 (" larger than block-size data. The key needs to be")
3021 (" hashed before being used by the HMAC algorithm.") */
3022 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
3023 "\x61\x20\x74\x65\x73\x74\x20\x75"
3024 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
3025 "\x61\x72\x67\x65\x72\x20\x74\x68"
3026 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
3027 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
3028 "\x79\x20\x61\x6e\x64\x20\x61\x20"
3029 "\x6c\x61\x72\x67\x65\x72\x20\x74"
3030 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
3031 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
3032 "\x61\x74\x61\x2e\x20\x54\x68\x65"
3033 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
3034 "\x64\x73\x20\x74\x6f\x20\x62\x65"
3035 "\x20\x68\x61\x73\x68\x65\x64\x20"
3036 "\x62\x65\x66\x6f\x72\x65\x20\x62"
3037 "\x65\x69\x6e\x67\x20\x75\x73\x65"
3038 "\x64\x20\x62\x79\x20\x74\x68\x65"
3039 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
3040 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
3041 .psize = 152,
3042 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
3043 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
3044 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
3045 "\xf6\xf5\x65\xd1",
3046 },
3047};
3048
3049/*
3050 * HMAC-SHA256 test vectors from
3051 * draft-ietf-ipsec-ciph-sha-256-01.txt
3052 */
3053#define HMAC_SHA256_TEST_VECTORS 10
3054
3055static struct hash_testvec hmac_sha256_tv_template[] = {
3056 {
3057 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
3058 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
3059 "\x11\x12\x13\x14\x15\x16\x17\x18"
3060 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
3061 .ksize = 32,
3062 .plaintext = "abc",
3063 .psize = 3,
3064 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
3065 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
3066 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
3067 "\x92\x75\x90\x21\xcf\xab\x81\x81",
3068 }, {
3069 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
3070 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
3071 "\x11\x12\x13\x14\x15\x16\x17\x18"
3072 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
3073 .ksize = 32,
3074 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
3075 .psize = 56,
3076 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
3077 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
3078 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
3079 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
3080 }, {
3081 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
3082 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
3083 "\x11\x12\x13\x14\x15\x16\x17\x18"
3084 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
3085 .ksize = 32,
3086 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
3087 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
3088 .psize = 112,
3089 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
3090 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
3091 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
3092 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
3093 }, {
3094 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3095 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3096 "\x0b\x0b\x0b\x0b\x0b\x0b",
3097 .ksize = 32,
3098 .plaintext = "Hi There",
3099 .psize = 8,
3100 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
3101 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
3102 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
3103 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
3104 }, {
3105 .key = "Jefe",
3106 .ksize = 4,
3107 .plaintext = "what do ya want for nothing?",
3108 .psize = 28,
3109 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
3110 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
3111 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
3112 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
3113 .np = 2,
3114 .tap = { 14, 14 }
3115 }, {
3116 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3117 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3118 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
3119 .ksize = 32,
3120 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
3121 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
3122 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
3123 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
3124 .psize = 50,
3125 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
3126 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
3127 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
3128 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
3129 }, {
3130 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
3131 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
3132 "\x11\x12\x13\x14\x15\x16\x17\x18"
3133 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
3134 "\x21\x22\x23\x24\x25",
3135 .ksize = 37,
3136 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
3137 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
3138 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
3139 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
3140 .psize = 50,
3141 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
3142 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
3143 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
3144 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
3145 }, {
3146 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
3147 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
3148 "\x0c\x0c\x0c\x0c\x0c\x0c",
3149 .ksize = 32,
3150 .plaintext = "Test With Truncation",
3151 .psize = 20,
3152 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
3153 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
3154 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
3155 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
3156 }, {
3157 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3158 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3159 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3160 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3161 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3162 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3163 "\xaa\xaa",
3164 .ksize = 80,
3165 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
3166 .psize = 54,
3167 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
3168 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
3169 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
3170 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
3171 }, {
3172 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3173 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3174 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3175 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3176 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3177 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3178 "\xaa\xaa",
3179 .ksize = 80,
3180 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
3181 "One Block-Size Data",
3182 .psize = 73,
3183 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
3184 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
3185 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
3186 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
3187 },
3188};
3189
Jussi Kivilinna93b5e862013-04-08 10:48:44 +03003190#define CMAC_AES_TEST_VECTORS 6
3191
3192static struct hash_testvec aes_cmac128_tv_template[] = {
3193 { /* From NIST Special Publication 800-38B, AES-128 */
3194 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
3195 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
3196 .plaintext = zeroed_string,
3197 .digest = "\xbb\x1d\x69\x29\xe9\x59\x37\x28"
3198 "\x7f\xa3\x7d\x12\x9b\x75\x67\x46",
3199 .psize = 0,
3200 .ksize = 16,
3201 }, {
3202 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
3203 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
3204 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
3205 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a",
3206 .digest = "\x07\x0a\x16\xb4\x6b\x4d\x41\x44"
3207 "\xf7\x9b\xdd\x9d\xd0\x4a\x28\x7c",
3208 .psize = 16,
3209 .ksize = 16,
3210 }, {
3211 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
3212 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
3213 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
3214 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
3215 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
3216 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
3217 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11",
3218 .digest = "\xdf\xa6\x67\x47\xde\x9a\xe6\x30"
3219 "\x30\xca\x32\x61\x14\x97\xc8\x27",
3220 .psize = 40,
3221 .ksize = 16,
3222 }, {
3223 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
3224 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
3225 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
3226 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
3227 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
3228 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
3229 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
3230 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
3231 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
3232 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
3233 .digest = "\x51\xf0\xbe\xbf\x7e\x3b\x9d\x92"
3234 "\xfc\x49\x74\x17\x79\x36\x3c\xfe",
3235 .psize = 64,
3236 .ksize = 16,
3237 }, { /* From NIST Special Publication 800-38B, AES-256 */
3238 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
3239 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
3240 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
3241 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
3242 .plaintext = zeroed_string,
3243 .digest = "\x02\x89\x62\xf6\x1b\x7b\xf8\x9e"
3244 "\xfc\x6b\x55\x1f\x46\x67\xd9\x83",
3245 .psize = 0,
3246 .ksize = 32,
3247 }, {
3248 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
3249 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
3250 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
3251 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
3252 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
3253 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
3254 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
3255 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
3256 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
3257 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
3258 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
3259 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
3260 .digest = "\xe1\x99\x21\x90\x54\x9f\x6e\xd5"
3261 "\x69\x6a\x2c\x05\x6c\x31\x54\x10",
3262 .psize = 64,
3263 .ksize = 32,
3264 }
3265};
3266
3267#define CMAC_DES3_EDE_TEST_VECTORS 4
3268
3269static struct hash_testvec des3_ede_cmac64_tv_template[] = {
3270/*
3271 * From NIST Special Publication 800-38B, Three Key TDEA
3272 * Corrected test vectors from:
3273 * http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf
3274 */
3275 {
3276 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
3277 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
3278 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
3279 .plaintext = zeroed_string,
3280 .digest = "\xb7\xa6\x88\xe1\x22\xff\xaf\x95",
3281 .psize = 0,
3282 .ksize = 24,
3283 }, {
3284 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
3285 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
3286 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
3287 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96",
3288 .digest = "\x8e\x8f\x29\x31\x36\x28\x37\x97",
3289 .psize = 8,
3290 .ksize = 24,
3291 }, {
3292 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
3293 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
3294 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
3295 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
3296 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
3297 "\xae\x2d\x8a\x57",
3298 .digest = "\x74\x3d\xdb\xe0\xce\x2d\xc2\xed",
3299 .psize = 20,
3300 .ksize = 24,
3301 }, {
3302 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
3303 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
3304 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
3305 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
3306 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
3307 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
3308 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51",
3309 .digest = "\x33\xe6\xb1\x09\x24\x00\xea\xe5",
3310 .psize = 32,
3311 .ksize = 24,
3312 }
3313};
3314
Herbert Xuda7f0332008-07-31 17:08:25 +08003315#define XCBC_AES_TEST_VECTORS 6
3316
3317static struct hash_testvec aes_xcbc128_tv_template[] = {
3318 {
3319 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3320 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3321 .plaintext = zeroed_string,
3322 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
3323 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
3324 .psize = 0,
3325 .ksize = 16,
3326 }, {
3327 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3328 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3329 .plaintext = "\x00\x01\x02",
3330 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
3331 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
3332 .psize = 3,
3333 .ksize = 16,
3334 } , {
3335 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3336 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3337 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
3338 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3339 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
3340 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
3341 .psize = 16,
3342 .ksize = 16,
3343 }, {
3344 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3345 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3346 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
3347 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3348 "\x10\x11\x12\x13",
3349 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
3350 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
3351 .tap = { 10, 10 },
3352 .psize = 20,
3353 .np = 2,
3354 .ksize = 16,
3355 }, {
3356 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3357 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3358 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
3359 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3360 "\x10\x11\x12\x13\x14\x15\x16\x17"
3361 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
3362 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
3363 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
3364 .psize = 32,
3365 .ksize = 16,
3366 }, {
3367 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3368 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3369 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
3370 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3371 "\x10\x11\x12\x13\x14\x15\x16\x17"
3372 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3373 "\x20\x21",
3374 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
3375 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
3376 .tap = { 17, 17 },
3377 .psize = 34,
3378 .np = 2,
3379 .ksize = 16,
3380 }
3381};
3382
Salman Qaziba1ee072012-10-05 14:24:14 -07003383#define VMAC_AES_TEST_VECTORS 11
Shane Wang304a2042010-03-18 20:22:55 +08003384static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
Shane Wangf1939f72009-09-02 20:05:22 +10003385 '\x02', '\x03', '\x02', '\x02',
3386 '\x02', '\x04', '\x01', '\x07',
3387 '\x04', '\x01', '\x04', '\x03',};
Shane Wang304a2042010-03-18 20:22:55 +08003388static char vmac_string2[128] = {'a', 'b', 'c',};
3389static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
3390 'a', 'b', 'c', 'a', 'b', 'c',
3391 'a', 'b', 'c', 'a', 'b', 'c',
3392 'a', 'b', 'c', 'a', 'b', 'c',
3393 'a', 'b', 'c', 'a', 'b', 'c',
3394 'a', 'b', 'c', 'a', 'b', 'c',
3395 'a', 'b', 'c', 'a', 'b', 'c',
3396 'a', 'b', 'c', 'a', 'b', 'c',
3397 };
3398
Salman Qaziba1ee072012-10-05 14:24:14 -07003399static char vmac_string4[17] = {'b', 'c', 'e', 'f',
3400 'i', 'j', 'l', 'm',
3401 'o', 'p', 'r', 's',
3402 't', 'u', 'w', 'x', 'z'};
3403
3404static char vmac_string5[127] = {'r', 'm', 'b', 't', 'c',
3405 'o', 'l', 'k', ']', '%',
3406 '9', '2', '7', '!', 'A'};
3407
3408static char vmac_string6[129] = {'p', 't', '*', '7', 'l',
3409 'i', '!', '#', 'w', '0',
3410 'z', '/', '4', 'A', 'n'};
3411
Shane Wangf1939f72009-09-02 20:05:22 +10003412static struct hash_testvec aes_vmac128_tv_template[] = {
3413 {
Shane Wang304a2042010-03-18 20:22:55 +08003414 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3415 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3416 .plaintext = NULL,
3417 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
3418 .psize = 0,
3419 .ksize = 16,
3420 }, {
Shane Wangf1939f72009-09-02 20:05:22 +10003421 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3422 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Shane Wang304a2042010-03-18 20:22:55 +08003423 .plaintext = vmac_string1,
3424 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
3425 .psize = 128,
3426 .ksize = 16,
3427 }, {
3428 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3429 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3430 .plaintext = vmac_string2,
3431 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
3432 .psize = 128,
3433 .ksize = 16,
3434 }, {
3435 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3436 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3437 .plaintext = vmac_string3,
3438 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
3439 .psize = 128,
3440 .ksize = 16,
3441 }, {
3442 .key = "abcdefghijklmnop",
3443 .plaintext = NULL,
3444 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
3445 .psize = 0,
3446 .ksize = 16,
3447 }, {
3448 .key = "abcdefghijklmnop",
3449 .plaintext = vmac_string1,
3450 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
3451 .psize = 128,
3452 .ksize = 16,
3453 }, {
3454 .key = "abcdefghijklmnop",
3455 .plaintext = vmac_string2,
3456 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
3457 .psize = 128,
3458 .ksize = 16,
3459 }, {
3460 .key = "abcdefghijklmnop",
3461 .plaintext = vmac_string3,
3462 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
Shane Wangf1939f72009-09-02 20:05:22 +10003463 .psize = 128,
3464 .ksize = 16,
Salman Qaziba1ee072012-10-05 14:24:14 -07003465 }, {
3466 .key = "a09b5cd!f#07K\x00\x00\x00",
3467 .plaintext = vmac_string4,
3468 .digest = "\xab\xa5\x0f\xea\x42\x4e\xa1\x5f",
3469 .psize = sizeof(vmac_string4),
3470 .ksize = 16,
3471 }, {
3472 .key = "a09b5cd!f#07K\x00\x00\x00",
3473 .plaintext = vmac_string5,
3474 .digest = "\x25\x31\x98\xbc\x1d\xe8\x67\x60",
3475 .psize = sizeof(vmac_string5),
3476 .ksize = 16,
3477 }, {
3478 .key = "a09b5cd!f#07K\x00\x00\x00",
3479 .plaintext = vmac_string6,
3480 .digest = "\xc4\xae\x9b\x47\x95\x65\xeb\x41",
3481 .psize = sizeof(vmac_string6),
3482 .ksize = 16,
Shane Wangf1939f72009-09-02 20:05:22 +10003483 },
3484};
3485
Herbert Xuda7f0332008-07-31 17:08:25 +08003486/*
3487 * SHA384 HMAC test vectors from RFC4231
3488 */
3489
3490#define HMAC_SHA384_TEST_VECTORS 4
3491
3492static struct hash_testvec hmac_sha384_tv_template[] = {
3493 {
3494 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3495 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3496 "\x0b\x0b\x0b\x0b",
3497 .ksize = 20,
3498 .plaintext = "Hi There",
3499 .psize = 8,
3500 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
3501 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
3502 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
3503 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
3504 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
3505 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
3506 }, {
3507 .key = "Jefe",
3508 .ksize = 4,
3509 .plaintext = "what do ya want for nothing?",
3510 .psize = 28,
3511 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
3512 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
3513 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
3514 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
3515 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
3516 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
3517 .np = 4,
3518 .tap = { 7, 7, 7, 7 }
3519 }, {
3520 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3521 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3522 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3523 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3524 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3525 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3526 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3527 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3528 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3529 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3530 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3531 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3532 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3533 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3534 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3535 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3536 "\xaa\xaa\xaa",
3537 .ksize = 131,
3538 .plaintext = "Test Using Larger Than Block-Siz"
3539 "e Key - Hash Key First",
3540 .psize = 54,
3541 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
3542 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
3543 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
3544 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
3545 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
3546 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
3547 }, {
3548 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3549 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3550 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3551 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3552 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3553 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3554 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3555 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3556 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3557 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3558 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3559 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3560 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3561 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3562 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3563 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3564 "\xaa\xaa\xaa",
3565 .ksize = 131,
3566 .plaintext = "This is a test u"
3567 "sing a larger th"
3568 "an block-size ke"
3569 "y and a larger t"
3570 "han block-size d"
3571 "ata. The key nee"
3572 "ds to be hashed "
3573 "before being use"
3574 "d by the HMAC al"
3575 "gorithm.",
3576 .psize = 152,
3577 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
3578 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
3579 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
3580 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
3581 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
3582 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
3583 },
3584};
3585
3586/*
3587 * SHA512 HMAC test vectors from RFC4231
3588 */
3589
3590#define HMAC_SHA512_TEST_VECTORS 4
3591
3592static struct hash_testvec hmac_sha512_tv_template[] = {
3593 {
3594 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3595 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3596 "\x0b\x0b\x0b\x0b",
3597 .ksize = 20,
3598 .plaintext = "Hi There",
3599 .psize = 8,
3600 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
3601 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
3602 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
3603 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
3604 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
3605 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
3606 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
3607 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
3608 }, {
3609 .key = "Jefe",
3610 .ksize = 4,
3611 .plaintext = "what do ya want for nothing?",
3612 .psize = 28,
3613 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
3614 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
3615 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
3616 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
3617 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
3618 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
3619 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
3620 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
3621 .np = 4,
3622 .tap = { 7, 7, 7, 7 }
3623 }, {
3624 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3625 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3626 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3627 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3628 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3629 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3630 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3631 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3632 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3633 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3634 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3635 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3636 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3637 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3638 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3639 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3640 "\xaa\xaa\xaa",
3641 .ksize = 131,
3642 .plaintext = "Test Using Large"
3643 "r Than Block-Siz"
3644 "e Key - Hash Key"
3645 " First",
3646 .psize = 54,
3647 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
3648 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
3649 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
3650 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
3651 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
3652 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
3653 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
3654 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
3655 }, {
3656 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3657 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3658 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3659 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3660 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3661 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3662 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3663 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3664 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3665 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3666 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3667 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3668 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3669 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3670 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3671 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3672 "\xaa\xaa\xaa",
3673 .ksize = 131,
3674 .plaintext =
3675 "This is a test u"
3676 "sing a larger th"
3677 "an block-size ke"
3678 "y and a larger t"
3679 "han block-size d"
3680 "ata. The key nee"
3681 "ds to be hashed "
3682 "before being use"
3683 "d by the HMAC al"
3684 "gorithm.",
3685 .psize = 152,
3686 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
3687 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
3688 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
3689 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
3690 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
3691 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
3692 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
3693 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
3694 },
3695};
3696
3697/*
Martin Willieee9dc62015-06-01 13:43:59 +02003698 * Poly1305 test vectors from RFC7539 A.3.
3699 */
3700
3701#define POLY1305_TEST_VECTORS 11
3702
3703static struct hash_testvec poly1305_tv_template[] = {
3704 { /* Test Vector #1 */
Martin Willieee9dc62015-06-01 13:43:59 +02003705 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
3706 "\x00\x00\x00\x00\x00\x00\x00\x00"
3707 "\x00\x00\x00\x00\x00\x00\x00\x00"
3708 "\x00\x00\x00\x00\x00\x00\x00\x00"
3709 "\x00\x00\x00\x00\x00\x00\x00\x00"
3710 "\x00\x00\x00\x00\x00\x00\x00\x00"
3711 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003712 "\x00\x00\x00\x00\x00\x00\x00\x00"
3713 "\x00\x00\x00\x00\x00\x00\x00\x00"
3714 "\x00\x00\x00\x00\x00\x00\x00\x00"
3715 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003716 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003717 .psize = 96,
Martin Willieee9dc62015-06-01 13:43:59 +02003718 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3719 "\x00\x00\x00\x00\x00\x00\x00\x00",
3720 }, { /* Test Vector #2 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003721 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003722 "\x00\x00\x00\x00\x00\x00\x00\x00"
3723 "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003724 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3725 "\x41\x6e\x79\x20\x73\x75\x62\x6d"
Martin Willieee9dc62015-06-01 13:43:59 +02003726 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3727 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3728 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3729 "\x64\x65\x64\x20\x62\x79\x20\x74"
3730 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3731 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3732 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3733 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3734 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3735 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3736 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3737 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3738 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3739 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3740 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3741 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3742 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3743 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3744 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3745 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3746 "\x45\x54\x46\x20\x61\x63\x74\x69"
3747 "\x76\x69\x74\x79\x20\x69\x73\x20"
3748 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3749 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3750 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3751 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3752 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3753 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3754 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3755 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3756 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3757 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3758 "\x54\x46\x20\x73\x65\x73\x73\x69"
3759 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3760 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3761 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3762 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3763 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3764 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3765 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3766 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3767 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3768 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3769 "\x20\x77\x68\x69\x63\x68\x20\x61"
3770 "\x72\x65\x20\x61\x64\x64\x72\x65"
3771 "\x73\x73\x65\x64\x20\x74\x6f",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003772 .psize = 407,
Martin Willieee9dc62015-06-01 13:43:59 +02003773 .digest = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3774 "\xf0\xef\xca\x96\x22\x7a\x86\x3e",
3775 }, { /* Test Vector #3 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003776 .plaintext = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
Martin Willieee9dc62015-06-01 13:43:59 +02003777 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3778 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003779 "\x00\x00\x00\x00\x00\x00\x00\x00"
3780 "\x41\x6e\x79\x20\x73\x75\x62\x6d"
Martin Willieee9dc62015-06-01 13:43:59 +02003781 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3782 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3783 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3784 "\x64\x65\x64\x20\x62\x79\x20\x74"
3785 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3786 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3787 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3788 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3789 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3790 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3791 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3792 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3793 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3794 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3795 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3796 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3797 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3798 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3799 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3800 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3801 "\x45\x54\x46\x20\x61\x63\x74\x69"
3802 "\x76\x69\x74\x79\x20\x69\x73\x20"
3803 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3804 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3805 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3806 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3807 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3808 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3809 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3810 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3811 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3812 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3813 "\x54\x46\x20\x73\x65\x73\x73\x69"
3814 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3815 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3816 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3817 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3818 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3819 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3820 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3821 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3822 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3823 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3824 "\x20\x77\x68\x69\x63\x68\x20\x61"
3825 "\x72\x65\x20\x61\x64\x64\x72\x65"
3826 "\x73\x73\x65\x64\x20\x74\x6f",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003827 .psize = 407,
Martin Willieee9dc62015-06-01 13:43:59 +02003828 .digest = "\xf3\x47\x7e\x7c\xd9\x54\x17\xaf"
3829 "\x89\xa6\xb8\x79\x4c\x31\x0c\xf0",
3830 }, { /* Test Vector #4 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003831 .plaintext = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
Martin Willieee9dc62015-06-01 13:43:59 +02003832 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
3833 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003834 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
3835 "\x27\x54\x77\x61\x73\x20\x62\x72"
Martin Willieee9dc62015-06-01 13:43:59 +02003836 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
3837 "\x6e\x64\x20\x74\x68\x65\x20\x73"
3838 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
3839 "\x76\x65\x73\x0a\x44\x69\x64\x20"
3840 "\x67\x79\x72\x65\x20\x61\x6e\x64"
3841 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
3842 "\x69\x6e\x20\x74\x68\x65\x20\x77"
3843 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
3844 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
3845 "\x65\x72\x65\x20\x74\x68\x65\x20"
3846 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
3847 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
3848 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
3849 "\x72\x61\x74\x68\x73\x20\x6f\x75"
3850 "\x74\x67\x72\x61\x62\x65\x2e",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003851 .psize = 159,
Martin Willieee9dc62015-06-01 13:43:59 +02003852 .digest = "\x45\x41\x66\x9a\x7e\xaa\xee\x61"
3853 "\xe7\x08\xdc\x7c\xbc\xc5\xeb\x62",
3854 }, { /* Test Vector #5 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003855 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003856 "\x00\x00\x00\x00\x00\x00\x00\x00"
3857 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003858 "\x00\x00\x00\x00\x00\x00\x00\x00"
3859 "\xff\xff\xff\xff\xff\xff\xff\xff"
3860 "\xff\xff\xff\xff\xff\xff\xff\xff",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003861 .psize = 48,
3862 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003863 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003864 }, { /* Test Vector #6 */
3865 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
3866 "\x00\x00\x00\x00\x00\x00\x00\x00"
3867 "\xff\xff\xff\xff\xff\xff\xff\xff"
3868 "\xff\xff\xff\xff\xff\xff\xff\xff"
3869 "\x02\x00\x00\x00\x00\x00\x00\x00"
3870 "\x00\x00\x00\x00\x00\x00\x00\x00",
3871 .psize = 48,
Martin Willieee9dc62015-06-01 13:43:59 +02003872 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
3873 "\x00\x00\x00\x00\x00\x00\x00\x00",
3874 }, { /* Test Vector #7 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003875 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003876 "\x00\x00\x00\x00\x00\x00\x00\x00"
3877 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003878 "\x00\x00\x00\x00\x00\x00\x00\x00"
3879 "\xff\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003880 "\xff\xff\xff\xff\xff\xff\xff\xff"
3881 "\xf0\xff\xff\xff\xff\xff\xff\xff"
3882 "\xff\xff\xff\xff\xff\xff\xff\xff"
3883 "\x11\x00\x00\x00\x00\x00\x00\x00"
3884 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003885 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003886 .digest = "\x05\x00\x00\x00\x00\x00\x00\x00"
3887 "\x00\x00\x00\x00\x00\x00\x00\x00",
3888 }, { /* Test Vector #8 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003889 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003890 "\x00\x00\x00\x00\x00\x00\x00\x00"
3891 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003892 "\x00\x00\x00\x00\x00\x00\x00\x00"
3893 "\xff\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003894 "\xff\xff\xff\xff\xff\xff\xff\xff"
3895 "\xfb\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3896 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3897 "\x01\x01\x01\x01\x01\x01\x01\x01"
3898 "\x01\x01\x01\x01\x01\x01\x01\x01",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003899 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003900 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3901 "\x00\x00\x00\x00\x00\x00\x00\x00",
3902 }, { /* Test Vector #9 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003903 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003904 "\x00\x00\x00\x00\x00\x00\x00\x00"
3905 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003906 "\x00\x00\x00\x00\x00\x00\x00\x00"
3907 "\xfd\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003908 "\xff\xff\xff\xff\xff\xff\xff\xff",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003909 .psize = 48,
Martin Willieee9dc62015-06-01 13:43:59 +02003910 .digest = "\xfa\xff\xff\xff\xff\xff\xff\xff"
3911 "\xff\xff\xff\xff\xff\xff\xff\xff",
3912 }, { /* Test Vector #10 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003913 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003914 "\x04\x00\x00\x00\x00\x00\x00\x00"
3915 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003916 "\x00\x00\x00\x00\x00\x00\x00\x00"
3917 "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
Martin Willieee9dc62015-06-01 13:43:59 +02003918 "\x00\x00\x00\x00\x00\x00\x00\x00"
3919 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3920 "\x01\x00\x00\x00\x00\x00\x00\x00"
3921 "\x00\x00\x00\x00\x00\x00\x00\x00"
3922 "\x00\x00\x00\x00\x00\x00\x00\x00"
3923 "\x01\x00\x00\x00\x00\x00\x00\x00"
3924 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003925 .psize = 96,
Martin Willieee9dc62015-06-01 13:43:59 +02003926 .digest = "\x14\x00\x00\x00\x00\x00\x00\x00"
3927 "\x55\x00\x00\x00\x00\x00\x00\x00",
3928 }, { /* Test Vector #11 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003929 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003930 "\x04\x00\x00\x00\x00\x00\x00\x00"
3931 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003932 "\x00\x00\x00\x00\x00\x00\x00\x00"
3933 "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
Martin Willieee9dc62015-06-01 13:43:59 +02003934 "\x00\x00\x00\x00\x00\x00\x00\x00"
3935 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3936 "\x01\x00\x00\x00\x00\x00\x00\x00"
3937 "\x00\x00\x00\x00\x00\x00\x00\x00"
3938 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003939 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003940 .digest = "\x13\x00\x00\x00\x00\x00\x00\x00"
3941 "\x00\x00\x00\x00\x00\x00\x00\x00",
3942 },
3943};
3944
3945/*
Herbert Xuda7f0332008-07-31 17:08:25 +08003946 * DES test vectors.
3947 */
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003948#define DES_ENC_TEST_VECTORS 11
3949#define DES_DEC_TEST_VECTORS 5
3950#define DES_CBC_ENC_TEST_VECTORS 6
3951#define DES_CBC_DEC_TEST_VECTORS 5
3952#define DES_CTR_ENC_TEST_VECTORS 2
3953#define DES_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003954#define DES3_EDE_ENC_TEST_VECTORS 4
3955#define DES3_EDE_DEC_TEST_VECTORS 4
3956#define DES3_EDE_CBC_ENC_TEST_VECTORS 2
3957#define DES3_EDE_CBC_DEC_TEST_VECTORS 2
3958#define DES3_EDE_CTR_ENC_TEST_VECTORS 2
3959#define DES3_EDE_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08003960
3961static struct cipher_testvec des_enc_tv_template[] = {
3962 { /* From Applied Cryptography */
3963 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3964 .klen = 8,
3965 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3966 .ilen = 8,
3967 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3968 .rlen = 8,
3969 }, { /* Same key, different plaintext block */
3970 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3971 .klen = 8,
3972 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
3973 .ilen = 8,
3974 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3975 .rlen = 8,
3976 }, { /* Sbox test from NBS */
3977 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3978 .klen = 8,
3979 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3980 .ilen = 8,
3981 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3982 .rlen = 8,
3983 }, { /* Three blocks */
3984 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3985 .klen = 8,
3986 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3987 "\x22\x33\x44\x55\x66\x77\x88\x99"
3988 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3989 .ilen = 24,
3990 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3991 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3992 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3993 .rlen = 24,
3994 }, { /* Weak key */
David Howells09e21782015-04-28 15:36:36 +01003995 .fail = true,
Herbert Xuda7f0332008-07-31 17:08:25 +08003996 .wk = 1,
3997 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
3998 .klen = 8,
3999 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
4000 .ilen = 8,
4001 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
4002 .rlen = 8,
4003 }, { /* Two blocks -- for testing encryption across pages */
4004 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4005 .klen = 8,
4006 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
4007 "\x22\x33\x44\x55\x66\x77\x88\x99",
4008 .ilen = 16,
4009 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
4010 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
4011 .rlen = 16,
4012 .np = 2,
4013 .tap = { 8, 8 }
4014 }, { /* Four blocks -- for testing encryption with chunking */
4015 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4016 .klen = 8,
4017 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
4018 "\x22\x33\x44\x55\x66\x77\x88\x99"
4019 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
4020 "\x22\x33\x44\x55\x66\x77\x88\x99",
4021 .ilen = 32,
4022 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
4023 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
4024 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
4025 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
4026 .rlen = 32,
4027 .np = 3,
4028 .tap = { 14, 10, 8 }
4029 }, {
4030 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4031 .klen = 8,
4032 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
4033 "\x22\x33\x44\x55\x66\x77\x88\x99"
4034 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
4035 .ilen = 24,
4036 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
4037 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
4038 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
4039 .rlen = 24,
4040 .np = 4,
4041 .tap = { 2, 1, 3, 18 }
4042 }, {
4043 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4044 .klen = 8,
4045 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
4046 "\x22\x33\x44\x55\x66\x77\x88\x99",
4047 .ilen = 16,
4048 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
4049 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
4050 .rlen = 16,
4051 .np = 5,
4052 .tap = { 2, 2, 2, 2, 8 }
4053 }, {
4054 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4055 .klen = 8,
4056 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
4057 .ilen = 8,
4058 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
4059 .rlen = 8,
4060 .np = 8,
4061 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004062 }, { /* Generated with Crypto++ */
4063 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4064 .klen = 8,
4065 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4066 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4067 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4068 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4069 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4070 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4071 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4072 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4073 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4074 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4075 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4076 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4077 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4078 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4079 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4080 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4081 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4082 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4083 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4084 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4085 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4086 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4087 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4088 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4089 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4090 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4091 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4092 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4093 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4094 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4095 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4096 .ilen = 248,
4097 .result = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
4098 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
4099 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
4100 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
4101 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
4102 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
4103 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
4104 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
4105 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
4106 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
4107 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
4108 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
4109 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
4110 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
4111 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
4112 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
4113 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
4114 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
4115 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
4116 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
4117 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
4118 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
4119 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
4120 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
4121 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
4122 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
4123 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
4124 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
4125 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
4126 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
4127 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
4128 .rlen = 248,
4129 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004130 .np = 3,
4131 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004132 },
4133};
4134
4135static struct cipher_testvec des_dec_tv_template[] = {
4136 { /* From Applied Cryptography */
4137 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4138 .klen = 8,
4139 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
4140 .ilen = 8,
4141 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
4142 .rlen = 8,
4143 }, { /* Sbox test from NBS */
4144 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
4145 .klen = 8,
4146 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
4147 .ilen = 8,
4148 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
4149 .rlen = 8,
4150 }, { /* Two blocks, for chunking test */
4151 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4152 .klen = 8,
4153 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
4154 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
4155 .ilen = 16,
4156 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
4157 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
4158 .rlen = 16,
4159 .np = 2,
4160 .tap = { 8, 8 }
4161 }, {
4162 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4163 .klen = 8,
4164 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
4165 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
4166 .ilen = 16,
4167 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
4168 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
4169 .rlen = 16,
4170 .np = 3,
4171 .tap = { 3, 12, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004172 }, { /* Generated with Crypto++ */
4173 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4174 .klen = 8,
4175 .input = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
4176 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
4177 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
4178 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
4179 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
4180 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
4181 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
4182 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
4183 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
4184 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
4185 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
4186 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
4187 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
4188 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
4189 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
4190 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
4191 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
4192 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
4193 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
4194 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
4195 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
4196 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
4197 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
4198 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
4199 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
4200 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
4201 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
4202 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
4203 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
4204 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
4205 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
4206 .ilen = 248,
4207 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4208 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4209 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4210 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4211 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4212 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4213 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4214 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4215 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4216 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4217 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4218 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4219 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4220 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4221 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4222 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4223 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4224 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4225 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4226 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4227 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4228 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4229 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4230 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4231 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4232 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4233 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4234 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4235 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4236 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4237 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4238 .rlen = 248,
4239 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004240 .np = 3,
4241 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004242 },
4243};
4244
4245static struct cipher_testvec des_cbc_enc_tv_template[] = {
4246 { /* From OpenSSL */
4247 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4248 .klen = 8,
4249 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4250 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
4251 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
4252 "\x68\x65\x20\x74\x69\x6d\x65\x20",
4253 .ilen = 24,
4254 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
4255 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
4256 "\x46\x8e\x91\x15\x78\x88\xba\x68",
4257 .rlen = 24,
4258 }, { /* FIPS Pub 81 */
4259 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4260 .klen = 8,
4261 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
4262 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
4263 .ilen = 8,
4264 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
4265 .rlen = 8,
4266 }, {
4267 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4268 .klen = 8,
4269 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
4270 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
4271 .ilen = 8,
4272 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
4273 .rlen = 8,
4274 }, {
4275 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4276 .klen = 8,
4277 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
4278 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
4279 .ilen = 8,
4280 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
4281 .rlen = 8,
4282 }, { /* Copy of openssl vector for chunk testing */
4283 /* From OpenSSL */
4284 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4285 .klen = 8,
4286 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4287 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
4288 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
4289 "\x68\x65\x20\x74\x69\x6d\x65\x20",
4290 .ilen = 24,
4291 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
4292 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
4293 "\x46\x8e\x91\x15\x78\x88\xba\x68",
4294 .rlen = 24,
4295 .np = 2,
4296 .tap = { 13, 11 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004297 }, { /* Generated with Crypto++ */
4298 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4299 .klen = 8,
4300 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4301 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4302 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4303 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4304 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4305 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4306 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4307 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4308 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4309 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4310 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4311 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4312 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4313 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4314 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4315 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4316 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4317 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4318 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4319 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4320 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4321 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4322 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4323 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4324 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4325 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4326 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4327 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4328 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4329 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4330 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4331 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4332 .ilen = 248,
4333 .result = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
4334 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
4335 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
4336 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
4337 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
4338 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
4339 "\x81\x72\x74\xDE\x30\x19\x69\x49"
4340 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
4341 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
4342 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
4343 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
4344 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
4345 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
4346 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
4347 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
4348 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
4349 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
4350 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
4351 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
4352 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
4353 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
4354 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
4355 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
4356 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
4357 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
4358 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
4359 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
4360 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
4361 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
4362 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
4363 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
4364 .rlen = 248,
4365 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004366 .np = 3,
4367 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004368 },
4369};
4370
4371static struct cipher_testvec des_cbc_dec_tv_template[] = {
4372 { /* FIPS Pub 81 */
4373 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4374 .klen = 8,
4375 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
4376 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
4377 .ilen = 8,
4378 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
4379 .rlen = 8,
4380 }, {
4381 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4382 .klen = 8,
4383 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
4384 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
4385 .ilen = 8,
4386 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
4387 .rlen = 8,
4388 }, {
4389 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4390 .klen = 8,
4391 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
4392 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
4393 .ilen = 8,
4394 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
4395 .rlen = 8,
4396 }, { /* Copy of above, for chunk testing */
4397 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4398 .klen = 8,
4399 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
4400 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
4401 .ilen = 8,
4402 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
4403 .rlen = 8,
4404 .np = 2,
4405 .tap = { 4, 4 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004406 }, { /* Generated with Crypto++ */
4407 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4408 .klen = 8,
4409 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4410 .input = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
4411 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
4412 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
4413 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
4414 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
4415 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
4416 "\x81\x72\x74\xDE\x30\x19\x69\x49"
4417 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
4418 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
4419 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
4420 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
4421 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
4422 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
4423 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
4424 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
4425 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
4426 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
4427 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
4428 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
4429 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
4430 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
4431 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
4432 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
4433 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
4434 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
4435 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
4436 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
4437 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
4438 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
4439 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
4440 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
4441 .ilen = 248,
4442 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4443 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4444 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4445 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4446 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4447 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4448 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4449 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4450 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4451 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4452 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4453 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4454 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4455 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4456 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4457 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4458 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4459 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4460 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4461 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4462 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4463 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4464 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4465 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4466 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4467 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4468 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4469 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4470 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4471 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4472 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4473 .rlen = 248,
4474 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004475 .np = 3,
4476 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004477 },
4478};
4479
4480static struct cipher_testvec des_ctr_enc_tv_template[] = {
4481 { /* Generated with Crypto++ */
4482 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4483 .klen = 8,
4484 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4485 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4486 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4487 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4488 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4489 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4490 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4491 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4492 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4493 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4494 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4495 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4496 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4497 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4498 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4499 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4500 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4501 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4502 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4503 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4504 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4505 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4506 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4507 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4508 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4509 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4510 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4511 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4512 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4513 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4514 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4515 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4516 .ilen = 248,
4517 .result = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
4518 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
4519 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
4520 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
4521 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
4522 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
4523 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
4524 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
4525 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4526 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4527 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4528 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4529 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4530 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4531 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4532 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4533 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4534 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4535 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4536 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4537 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4538 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4539 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4540 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4541 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4542 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4543 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4544 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4545 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4546 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4547 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4548 .rlen = 248,
4549 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004550 .np = 3,
4551 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004552 }, { /* Generated with Crypto++ */
4553 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4554 .klen = 8,
4555 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4556 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4557 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4558 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4559 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4560 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4561 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4562 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4563 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4564 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4565 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4566 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4567 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4568 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4569 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4570 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4571 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4572 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4573 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4574 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4575 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4576 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4577 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4578 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4579 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4580 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4581 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4582 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4583 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4584 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4585 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4586 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4587 .ilen = 247,
4588 .result = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4589 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4590 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4591 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4592 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4593 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4594 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4595 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4596 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4597 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4598 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4599 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4600 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4601 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4602 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4603 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4604 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4605 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4606 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4607 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4608 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4609 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4610 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4611 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4612 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4613 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4614 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4615 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4616 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4617 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4618 "\x91\x45\x05\x3E\x58\xBF\x32",
4619 .rlen = 247,
4620 .also_non_np = 1,
4621 .np = 2,
4622 .tap = { 247 - 8, 8 },
4623 },
4624};
4625
4626static struct cipher_testvec des_ctr_dec_tv_template[] = {
4627 { /* Generated with Crypto++ */
4628 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4629 .klen = 8,
4630 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4631 .input = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
4632 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
4633 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
4634 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
4635 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
4636 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
4637 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
4638 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
4639 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4640 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4641 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4642 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4643 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4644 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4645 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4646 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4647 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4648 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4649 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4650 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4651 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4652 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4653 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4654 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4655 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4656 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4657 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4658 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4659 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4660 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4661 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4662 .ilen = 248,
4663 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4664 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4665 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4666 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4667 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4668 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4669 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4670 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4671 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4672 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4673 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4674 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4675 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4676 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4677 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4678 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4679 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4680 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4681 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4682 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4683 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4684 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4685 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4686 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4687 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4688 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4689 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4690 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4691 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4692 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4693 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4694 .rlen = 248,
4695 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004696 .np = 3,
4697 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004698 }, { /* Generated with Crypto++ */
4699 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4700 .klen = 8,
4701 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4702 .input = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4703 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4704 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4705 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4706 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4707 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4708 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4709 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4710 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4711 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4712 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4713 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4714 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4715 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4716 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4717 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4718 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4719 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4720 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4721 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4722 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4723 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4724 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4725 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4726 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4727 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4728 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4729 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4730 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4731 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4732 "\x91\x45\x05\x3E\x58\xBF\x32",
4733 .ilen = 247,
4734 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4735 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4736 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4737 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4738 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4739 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4740 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4741 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4742 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4743 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4744 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4745 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4746 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4747 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4748 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4749 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4750 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4751 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4752 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4753 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4754 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4755 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4756 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4757 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4758 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4759 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4760 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4761 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4762 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4763 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4764 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4765 .rlen = 247,
4766 .also_non_np = 1,
4767 .np = 2,
4768 .tap = { 247 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004769 },
4770};
4771
4772static struct cipher_testvec des3_ede_enc_tv_template[] = {
4773 { /* These are from openssl */
4774 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4775 "\x55\x55\x55\x55\x55\x55\x55\x55"
4776 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4777 .klen = 24,
4778 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4779 .ilen = 8,
4780 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4781 .rlen = 8,
4782 }, {
4783 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4784 "\x86\x02\x87\x66\x59\x08\x21\x98"
4785 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4786 .klen = 24,
4787 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4788 .ilen = 8,
4789 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4790 .rlen = 8,
4791 }, {
4792 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4793 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4794 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4795 .klen = 24,
4796 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
4797 .ilen = 8,
4798 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4799 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004800 }, { /* Generated with Crypto++ */
4801 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4802 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4803 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4804 .klen = 24,
4805 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4806 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4807 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4808 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4809 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4810 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4811 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4812 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4813 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4814 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4815 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4816 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4817 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4818 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4819 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4820 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4821 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4822 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4823 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4824 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4825 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4826 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4827 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4828 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4829 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4830 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4831 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4832 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4833 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4834 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4835 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4836 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4837 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4838 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4839 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4840 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4841 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4842 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4843 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4844 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4845 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4846 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4847 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4848 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4849 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4850 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4851 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4852 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4853 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4854 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4855 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4856 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4857 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4858 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4859 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4860 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4861 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4862 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4863 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4864 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4865 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4866 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4867 .ilen = 496,
4868 .result = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4869 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4870 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4871 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4872 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4873 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4874 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4875 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4876 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4877 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4878 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4879 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4880 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4881 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4882 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4883 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4884 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4885 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4886 "\x45\x86\x50\x01\x70\x35\x99\x92"
4887 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4888 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4889 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4890 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4891 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4892 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4893 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4894 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4895 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4896 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4897 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4898 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4899 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4900 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4901 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4902 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4903 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4904 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4905 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4906 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4907 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4908 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4909 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4910 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4911 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4912 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4913 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4914 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4915 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4916 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4917 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4918 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4919 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4920 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4921 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4922 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4923 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4924 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4925 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4926 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4927 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4928 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4929 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4930 .rlen = 496,
4931 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004932 .np = 3,
4933 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004934 },
4935};
4936
4937static struct cipher_testvec des3_ede_dec_tv_template[] = {
4938 { /* These are from openssl */
4939 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4940 "\x55\x55\x55\x55\x55\x55\x55\x55"
4941 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4942 .klen = 24,
4943 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4944 .ilen = 8,
4945 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4946 .rlen = 8,
4947 }, {
4948 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4949 "\x86\x02\x87\x66\x59\x08\x21\x98"
4950 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4951 .klen = 24,
4952 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4953 .ilen = 8,
4954 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4955 .rlen = 8,
4956 }, {
4957 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4958 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4959 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4960 .klen = 24,
4961 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4962 .ilen = 8,
4963 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
4964 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004965 }, { /* Generated with Crypto++ */
4966 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4967 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4968 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4969 .klen = 24,
4970 .input = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4971 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4972 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4973 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4974 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4975 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4976 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4977 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4978 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4979 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4980 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4981 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4982 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4983 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4984 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4985 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4986 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4987 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4988 "\x45\x86\x50\x01\x70\x35\x99\x92"
4989 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4990 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4991 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4992 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4993 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4994 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4995 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4996 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4997 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4998 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4999 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
5000 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
5001 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
5002 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
5003 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
5004 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
5005 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
5006 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
5007 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
5008 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
5009 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
5010 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
5011 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
5012 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
5013 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
5014 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
5015 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
5016 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
5017 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
5018 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
5019 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
5020 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
5021 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
5022 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
5023 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
5024 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
5025 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
5026 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
5027 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
5028 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
5029 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
5030 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
5031 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
5032 .ilen = 496,
5033 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5034 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5035 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5036 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5037 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5038 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5039 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5040 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5041 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5042 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5043 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5044 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5045 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5046 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5047 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5048 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5049 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5050 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5051 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5052 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5053 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5054 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5055 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5056 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5057 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5058 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5059 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5060 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5061 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5062 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5063 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5064 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5065 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5066 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5067 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5068 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5069 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5070 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5071 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5072 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5073 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5074 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5075 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5076 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5077 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5078 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5079 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5080 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5081 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5082 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5083 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5084 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5085 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5086 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5087 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5088 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5089 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5090 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5091 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5092 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5093 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5094 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5095 .rlen = 496,
5096 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005097 .np = 3,
5098 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005099 },
5100};
5101
5102static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
5103 { /* Generated from openssl */
5104 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
5105 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
5106 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
5107 .klen = 24,
5108 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
5109 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
5110 "\x53\x20\x63\x65\x65\x72\x73\x74"
5111 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
5112 "\x20\x79\x65\x53\x72\x63\x74\x65"
5113 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
5114 "\x79\x6e\x53\x20\x63\x65\x65\x72"
5115 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
5116 "\x6e\x61\x20\x79\x65\x53\x72\x63"
5117 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
5118 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
5119 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
5120 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
5121 "\x72\x63\x74\x65\x20\x73\x6f\x54"
5122 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
5123 "\x63\x65\x65\x72\x73\x74\x54\x20"
5124 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
5125 .ilen = 128,
5126 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
5127 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
5128 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
5129 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
5130 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
5131 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
5132 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
5133 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
5134 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
5135 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
5136 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
5137 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
5138 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
5139 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
5140 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
5141 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
5142 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005143 }, { /* Generated with Crypto++ */
5144 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5145 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5146 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5147 .klen = 24,
5148 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5149 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5150 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5151 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5152 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5153 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5154 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5155 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5156 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5157 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5158 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5159 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5160 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5161 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5162 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5163 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5164 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5165 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5166 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5167 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5168 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5169 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5170 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5171 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5172 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5173 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5174 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5175 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5176 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5177 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5178 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5179 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5180 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5181 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5182 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5183 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5184 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5185 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5186 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5187 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5188 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5189 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5190 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5191 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5192 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5193 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5194 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5195 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5196 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5197 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5198 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5199 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5200 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5201 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5202 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5203 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5204 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5205 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5206 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5207 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5208 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5209 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5210 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5211 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5212 .ilen = 496,
5213 .result = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
5214 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
5215 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
5216 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
5217 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
5218 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
5219 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
5220 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
5221 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
5222 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
5223 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
5224 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
5225 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
5226 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
5227 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
5228 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
5229 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
5230 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
5231 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
5232 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
5233 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
5234 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
5235 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
5236 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
5237 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
5238 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
5239 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
5240 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
5241 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
5242 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
5243 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
5244 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
5245 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
5246 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
5247 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
5248 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
5249 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
5250 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
5251 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
5252 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
5253 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
5254 "\x73\x50\x08\x56\x20\x9B\x94\x23"
5255 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
5256 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
5257 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
5258 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
5259 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
5260 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
5261 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
5262 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
5263 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
5264 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
5265 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
5266 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
5267 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
5268 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
5269 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
5270 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
5271 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
5272 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
5273 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
5274 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
5275 .rlen = 496,
5276 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005277 .np = 3,
5278 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005279 },
5280};
5281
5282static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
5283 { /* Generated from openssl */
5284 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
5285 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
5286 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
5287 .klen = 24,
5288 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
5289 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
5290 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
5291 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
5292 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
5293 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
5294 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
5295 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
5296 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
5297 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
5298 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
5299 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
5300 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
5301 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
5302 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
5303 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
5304 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
5305 .ilen = 128,
5306 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
5307 "\x53\x20\x63\x65\x65\x72\x73\x74"
5308 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
5309 "\x20\x79\x65\x53\x72\x63\x74\x65"
5310 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
5311 "\x79\x6e\x53\x20\x63\x65\x65\x72"
5312 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
5313 "\x6e\x61\x20\x79\x65\x53\x72\x63"
5314 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
5315 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
5316 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
5317 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
5318 "\x72\x63\x74\x65\x20\x73\x6f\x54"
5319 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
5320 "\x63\x65\x65\x72\x73\x74\x54\x20"
5321 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
5322 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005323 }, { /* Generated with Crypto++ */
5324 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5325 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5326 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5327 .klen = 24,
5328 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5329 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5330 .input = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
5331 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
5332 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
5333 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
5334 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
5335 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
5336 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
5337 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
5338 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
5339 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
5340 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
5341 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
5342 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
5343 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
5344 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
5345 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
5346 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
5347 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
5348 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
5349 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
5350 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
5351 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
5352 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
5353 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
5354 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
5355 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
5356 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
5357 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
5358 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
5359 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
5360 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
5361 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
5362 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
5363 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
5364 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
5365 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
5366 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
5367 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
5368 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
5369 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
5370 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
5371 "\x73\x50\x08\x56\x20\x9B\x94\x23"
5372 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
5373 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
5374 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
5375 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
5376 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
5377 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
5378 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
5379 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
5380 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
5381 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
5382 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
5383 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
5384 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
5385 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
5386 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
5387 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
5388 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
5389 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
5390 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
5391 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
5392 .ilen = 496,
5393 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5394 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5395 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5396 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5397 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5398 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5399 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5400 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5401 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5402 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5403 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5404 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5405 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5406 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5407 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5408 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5409 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5410 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5411 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5412 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5413 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5414 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5415 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5416 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5417 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5418 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5419 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5420 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5421 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5422 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5423 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5424 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5425 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5426 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5427 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5428 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5429 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5430 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5431 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5432 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5433 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5434 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5435 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5436 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5437 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5438 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5439 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5440 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5441 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5442 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5443 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5444 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5445 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5446 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5447 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5448 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5449 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5450 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5451 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5452 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5453 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5454 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5455 .rlen = 496,
5456 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005457 .np = 3,
5458 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005459 },
5460};
5461
5462static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
5463 { /* Generated with Crypto++ */
5464 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5465 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5466 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5467 .klen = 24,
5468 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5469 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5470 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5471 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5472 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5473 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5474 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5475 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5476 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5477 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5478 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5479 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5480 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5481 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5482 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5483 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5484 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5485 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5486 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5487 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5488 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5489 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5490 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5491 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5492 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5493 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5494 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5495 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5496 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5497 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5498 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5499 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5500 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5501 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5502 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5503 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5504 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5505 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5506 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5507 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5508 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5509 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5510 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5511 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5512 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5513 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5514 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5515 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5516 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5517 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5518 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5519 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5520 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5521 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5522 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5523 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5524 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5525 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5526 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5527 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5528 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5529 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5530 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5531 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5532 .ilen = 496,
5533 .result = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5534 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5535 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5536 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5537 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5538 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5539 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5540 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5541 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5542 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5543 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5544 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5545 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5546 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5547 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5548 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5549 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5550 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5551 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5552 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5553 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5554 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5555 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5556 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5557 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5558 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5559 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5560 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5561 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5562 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5563 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5564 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5565 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5566 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5567 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5568 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5569 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5570 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5571 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5572 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5573 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5574 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5575 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5576 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5577 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5578 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5579 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5580 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5581 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5582 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5583 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5584 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5585 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5586 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5587 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5588 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5589 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5590 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5591 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5592 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5593 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5594 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5595 .rlen = 496,
5596 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005597 .np = 3,
5598 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005599 }, { /* Generated with Crypto++ */
5600 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5601 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5602 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5603 .klen = 24,
5604 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5605 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5606 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5607 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5608 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5609 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5610 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5611 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5612 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5613 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5614 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5615 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5616 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5617 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5618 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5619 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5620 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5621 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5622 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5623 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5624 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5625 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5626 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5627 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5628 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5629 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5630 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5631 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5632 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5633 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5634 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5635 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5636 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5637 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5638 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5639 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5640 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5641 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5642 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5643 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5644 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5645 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5646 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5647 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5648 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5649 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5650 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5651 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5652 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5653 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5654 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5655 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5656 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5657 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5658 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5659 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5660 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5661 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5662 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5663 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5664 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5665 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5666 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5667 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5668 "\x2E\xB1\x18",
5669 .ilen = 499,
5670 .result = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5671 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5672 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5673 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5674 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5675 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5676 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5677 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5678 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5679 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5680 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5681 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5682 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5683 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5684 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5685 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5686 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5687 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5688 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5689 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5690 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5691 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5692 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5693 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5694 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5695 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5696 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5697 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5698 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5699 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5700 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5701 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5702 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5703 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5704 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5705 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5706 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5707 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5708 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5709 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5710 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5711 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5712 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5713 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5714 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5715 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5716 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5717 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5718 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5719 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5720 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5721 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5722 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5723 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5724 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5725 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5726 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5727 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5728 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5729 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5730 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5731 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5732 "\xF2\x79\xD9",
5733 .rlen = 499,
5734 .also_non_np = 1,
5735 .np = 2,
5736 .tap = { 499 - 16, 16 },
5737 },
5738};
5739
5740static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
5741 { /* Generated with Crypto++ */
5742 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5743 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5744 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5745 .klen = 24,
5746 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5747 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5748 .input = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5749 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5750 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5751 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5752 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5753 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5754 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5755 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5756 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5757 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5758 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5759 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5760 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5761 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5762 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5763 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5764 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5765 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5766 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5767 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5768 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5769 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5770 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5771 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5772 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5773 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5774 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5775 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5776 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5777 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5778 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5779 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5780 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5781 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5782 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5783 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5784 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5785 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5786 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5787 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5788 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5789 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5790 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5791 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5792 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5793 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5794 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5795 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5796 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5797 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5798 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5799 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5800 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5801 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5802 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5803 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5804 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5805 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5806 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5807 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5808 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5809 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5810 .ilen = 496,
5811 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5812 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5813 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5814 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5815 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5816 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5817 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5818 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5819 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5820 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5821 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5822 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5823 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5824 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5825 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5826 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5827 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5828 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5829 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5830 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5831 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5832 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5833 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5834 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5835 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5836 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5837 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5838 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5839 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5840 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5841 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5842 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5843 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5844 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5845 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5846 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5847 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5848 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5849 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5850 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5851 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5852 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5853 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5854 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5855 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5856 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5857 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5858 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5859 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5860 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5861 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5862 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5863 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5864 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5865 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5866 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5867 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5868 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5869 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5870 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5871 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5872 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5873 .rlen = 496,
5874 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005875 .np = 3,
5876 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005877 }, { /* Generated with Crypto++ */
5878 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5879 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5880 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5881 .klen = 24,
5882 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5883 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5884 .input = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5885 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5886 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5887 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5888 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5889 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5890 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5891 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5892 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5893 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5894 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5895 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5896 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5897 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5898 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5899 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5900 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5901 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5902 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5903 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5904 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5905 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5906 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5907 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5908 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5909 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5910 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5911 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5912 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5913 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5914 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5915 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5916 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5917 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5918 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5919 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5920 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5921 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5922 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5923 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5924 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5925 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5926 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5927 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5928 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5929 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5930 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5931 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5932 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5933 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5934 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5935 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5936 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5937 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5938 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5939 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5940 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5941 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5942 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5943 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5944 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5945 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5946 "\xF2\x79\xD9",
5947 .ilen = 499,
5948 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5949 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5950 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5951 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5952 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5953 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5954 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5955 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5956 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5957 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5958 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5959 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5960 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5961 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5962 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5963 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5964 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5965 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5966 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5967 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5968 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5969 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5970 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5971 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5972 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5973 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5974 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5975 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5976 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5977 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5978 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5979 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5980 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5981 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5982 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5983 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5984 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5985 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5986 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5987 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5988 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5989 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5990 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5991 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5992 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5993 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5994 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5995 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5996 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5997 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5998 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5999 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
6000 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
6001 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
6002 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
6003 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
6004 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
6005 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
6006 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
6007 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
6008 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
6009 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
6010 "\x2E\xB1\x18",
6011 .rlen = 499,
6012 .also_non_np = 1,
6013 .np = 2,
6014 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006015 },
6016};
6017
6018/*
6019 * Blowfish test vectors.
6020 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006021#define BF_ENC_TEST_VECTORS 7
6022#define BF_DEC_TEST_VECTORS 7
6023#define BF_CBC_ENC_TEST_VECTORS 2
6024#define BF_CBC_DEC_TEST_VECTORS 2
6025#define BF_CTR_ENC_TEST_VECTORS 2
6026#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08006027
6028static struct cipher_testvec bf_enc_tv_template[] = {
6029 { /* DES test vectors from OpenSSL */
6030 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
6031 .klen = 8,
6032 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
6033 .ilen = 8,
6034 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
6035 .rlen = 8,
6036 }, {
6037 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
6038 .klen = 8,
6039 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
6040 .ilen = 8,
6041 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
6042 .rlen = 8,
6043 }, {
6044 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6045 .klen = 8,
6046 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6047 .ilen = 8,
6048 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
6049 .rlen = 8,
6050 }, { /* Vary the keylength... */
6051 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
6052 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
6053 .klen = 16,
6054 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6055 .ilen = 8,
6056 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
6057 .rlen = 8,
6058 }, {
6059 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
6060 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
6061 "\x00\x11\x22\x33\x44",
6062 .klen = 21,
6063 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6064 .ilen = 8,
6065 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
6066 .rlen = 8,
6067 }, { /* Generated with bf488 */
6068 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
6069 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
6070 "\x00\x11\x22\x33\x44\x55\x66\x77"
6071 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
6072 "\x58\x40\x23\x64\x1a\xba\x61\x76"
6073 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
6074 "\xff\xff\xff\xff\xff\xff\xff\xff",
6075 .klen = 56,
6076 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6077 .ilen = 8,
6078 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
6079 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006080 }, { /* Generated with Crypto++ */
6081 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6082 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6083 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6084 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6085 .klen = 32,
6086 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6087 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6088 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6089 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006090 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6091 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6092 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6093 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6094 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6095 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6096 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6097 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6098 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6099 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6100 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6101 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6102 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6103 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6104 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6105 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6106 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6107 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6108 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6109 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6110 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6111 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6112 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6113 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6114 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6115 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6116 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6117 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6118 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6119 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6120 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6121 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6122 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6123 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6124 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6125 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6126 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6127 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6128 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6129 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6130 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6131 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6132 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6133 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6134 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6135 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6136 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6137 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6138 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6139 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6140 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6141 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6142 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6143 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6144 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6145 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6146 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6147 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6148 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6149 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006150 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
6151 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
6152 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
6153 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006154 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
6155 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
6156 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
6157 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
6158 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
6159 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
6160 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
6161 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
6162 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
6163 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
6164 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
6165 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
6166 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
6167 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
6168 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
6169 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
6170 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
6171 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
6172 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
6173 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
6174 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
6175 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
6176 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
6177 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
6178 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
6179 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
6180 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
6181 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
6182 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
6183 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
6184 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
6185 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
6186 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
6187 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
6188 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
6189 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
6190 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
6191 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
6192 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
6193 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
6194 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
6195 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
6196 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
6197 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
6198 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
6199 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
6200 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
6201 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
6202 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
6203 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
6204 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
6205 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
6206 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
6207 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
6208 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
6209 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
6210 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
6211 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
6212 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
6213 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006214 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006215 .np = 3,
6216 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006217 },
6218};
6219
6220static struct cipher_testvec bf_dec_tv_template[] = {
6221 { /* DES test vectors from OpenSSL */
6222 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
6223 .klen = 8,
6224 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
6225 .ilen = 8,
6226 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
6227 .rlen = 8,
6228 }, {
6229 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
6230 .klen = 8,
6231 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
6232 .ilen = 8,
6233 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
6234 .rlen = 8,
6235 }, {
6236 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6237 .klen = 8,
6238 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
6239 .ilen = 8,
6240 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6241 .rlen = 8,
6242 }, { /* Vary the keylength... */
6243 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
6244 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
6245 .klen = 16,
6246 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
6247 .ilen = 8,
6248 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6249 .rlen = 8,
6250 }, {
6251 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
6252 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
6253 "\x00\x11\x22\x33\x44",
6254 .klen = 21,
6255 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
6256 .ilen = 8,
6257 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6258 .rlen = 8,
6259 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
6260 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
6261 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
6262 "\x00\x11\x22\x33\x44\x55\x66\x77"
6263 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
6264 "\x58\x40\x23\x64\x1a\xba\x61\x76"
6265 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
6266 "\xff\xff\xff\xff\xff\xff\xff\xff",
6267 .klen = 56,
6268 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
6269 .ilen = 8,
6270 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6271 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006272 }, { /* Generated with Crypto++ */
6273 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6274 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6275 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6276 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6277 .klen = 32,
6278 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
6279 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
6280 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
6281 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006282 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
6283 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
6284 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
6285 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
6286 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
6287 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
6288 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
6289 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
6290 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
6291 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
6292 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
6293 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
6294 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
6295 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
6296 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
6297 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
6298 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
6299 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
6300 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
6301 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
6302 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
6303 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
6304 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
6305 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
6306 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
6307 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
6308 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
6309 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
6310 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
6311 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
6312 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
6313 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
6314 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
6315 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
6316 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
6317 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
6318 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
6319 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
6320 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
6321 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
6322 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
6323 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
6324 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
6325 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
6326 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
6327 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
6328 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
6329 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
6330 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
6331 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
6332 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
6333 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
6334 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
6335 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
6336 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
6337 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
6338 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
6339 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
6340 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
6341 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006342 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6343 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6344 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6345 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006346 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6347 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6348 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6349 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6350 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6351 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6352 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6353 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6354 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6355 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6356 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6357 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6358 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6359 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6360 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6361 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6362 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6363 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6364 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6365 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6366 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6367 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6368 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6369 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6370 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6371 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6372 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6373 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6374 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6375 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6376 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6377 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6378 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6379 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6380 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6381 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6382 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6383 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6384 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6385 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6386 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6387 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6388 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6389 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6390 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6391 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6392 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6393 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6394 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6395 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6396 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6397 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6398 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6399 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6400 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6401 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6402 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6403 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6404 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6405 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006406 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006407 .np = 3,
6408 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006409 },
6410};
6411
6412static struct cipher_testvec bf_cbc_enc_tv_template[] = {
6413 { /* From OpenSSL */
6414 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6415 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6416 .klen = 16,
6417 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6418 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
6419 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
6420 "\x68\x65\x20\x74\x69\x6d\x65\x20"
6421 "\x66\x6f\x72\x20\x00\x00\x00\x00",
6422 .ilen = 32,
6423 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
6424 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
6425 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
6426 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
6427 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006428 }, { /* Generated with Crypto++ */
6429 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6430 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6431 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6432 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6433 .klen = 32,
6434 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6435 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6436 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6437 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6438 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006439 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6440 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6441 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6442 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6443 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6444 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6445 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6446 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6447 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6448 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6449 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6450 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6451 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6452 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6453 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6454 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6455 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6456 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6457 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6458 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6459 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6460 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6461 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6462 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6463 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6464 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6465 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6466 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6467 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6468 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6469 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6470 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6471 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6472 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6473 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6474 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6475 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6476 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6477 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6478 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6479 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6480 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6481 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6482 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6483 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6484 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6485 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6486 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6487 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6488 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6489 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6490 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6491 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6492 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6493 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6494 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6495 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6496 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6497 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6498 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006499 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
6500 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
6501 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
6502 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006503 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
6504 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
6505 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
6506 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
6507 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
6508 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
6509 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
6510 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
6511 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
6512 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
6513 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
6514 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
6515 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
6516 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
6517 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
6518 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
6519 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
6520 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
6521 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
6522 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
6523 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
6524 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
6525 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
6526 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
6527 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
6528 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
6529 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
6530 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
6531 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
6532 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
6533 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
6534 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
6535 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
6536 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
6537 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
6538 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
6539 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
6540 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
6541 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
6542 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
6543 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
6544 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
6545 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
6546 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6547 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6548 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6549 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6550 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6551 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6552 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6553 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6554 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6555 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6556 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6557 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6558 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6559 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6560 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6561 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6562 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006563 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006564 .np = 3,
6565 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006566 },
6567};
6568
6569static struct cipher_testvec bf_cbc_dec_tv_template[] = {
6570 { /* From OpenSSL */
6571 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6572 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6573 .klen = 16,
6574 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6575 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
6576 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
6577 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
6578 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
6579 .ilen = 32,
6580 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
6581 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
6582 "\x68\x65\x20\x74\x69\x6d\x65\x20"
6583 "\x66\x6f\x72\x20\x00\x00\x00\x00",
6584 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006585 }, { /* Generated with Crypto++ */
6586 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6587 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6588 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6589 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6590 .klen = 32,
6591 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6592 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
6593 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
6594 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
6595 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006596 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
6597 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
6598 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
6599 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
6600 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
6601 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
6602 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
6603 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
6604 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
6605 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
6606 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
6607 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
6608 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
6609 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
6610 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
6611 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
6612 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
6613 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
6614 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
6615 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
6616 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
6617 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
6618 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
6619 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
6620 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
6621 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
6622 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
6623 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
6624 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
6625 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
6626 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
6627 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
6628 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
6629 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
6630 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
6631 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
6632 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
6633 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
6634 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
6635 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
6636 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
6637 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
6638 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
6639 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6640 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6641 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6642 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6643 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6644 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6645 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6646 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6647 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6648 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6649 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6650 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6651 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6652 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6653 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6654 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6655 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006656 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6657 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6658 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6659 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006660 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6661 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6662 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6663 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6664 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6665 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6666 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6667 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6668 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6669 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6670 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6671 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6672 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6673 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6674 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6675 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6676 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6677 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6678 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6679 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6680 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6681 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6682 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6683 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6684 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6685 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6686 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6687 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6688 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6689 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6690 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6691 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6692 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6693 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6694 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6695 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6696 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6697 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6698 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6699 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6700 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6701 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6702 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6703 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6704 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6705 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6706 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6707 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6708 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6709 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6710 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6711 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6712 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6713 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6714 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6715 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6716 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6717 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6718 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6719 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006720 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006721 .np = 3,
6722 .tap = { 504 - 10, 2, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006723 },
6724};
6725
6726static struct cipher_testvec bf_ctr_enc_tv_template[] = {
6727 { /* Generated with Crypto++ */
6728 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6729 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6730 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6731 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6732 .klen = 32,
6733 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6734 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6735 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6736 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6737 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006738 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6739 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6740 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6741 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6742 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6743 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6744 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6745 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6746 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6747 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6748 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6749 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6750 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6751 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6752 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6753 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6754 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6755 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6756 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6757 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6758 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6759 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6760 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6761 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6762 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6763 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6764 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6765 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6766 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6767 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6768 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6769 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6770 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6771 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6772 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6773 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6774 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6775 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6776 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6777 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6778 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6779 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6780 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6781 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6782 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6783 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6784 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6785 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6786 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6787 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6788 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6789 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6790 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6791 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6792 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6793 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6794 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6795 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6796 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6797 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006798 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6799 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6800 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6801 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006802 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6803 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6804 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6805 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6806 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6807 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6808 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6809 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6810 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6811 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6812 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6813 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6814 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6815 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6816 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6817 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6818 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6819 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6820 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6821 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6822 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6823 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6824 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6825 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6826 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6827 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6828 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6829 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6830 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6831 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6832 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6833 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6834 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6835 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6836 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6837 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6838 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6839 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6840 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6841 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6842 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6843 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6844 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6845 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6846 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6847 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6848 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6849 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6850 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6851 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6852 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6853 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6854 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6855 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6856 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6857 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6858 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6859 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6860 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6861 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006862 }, { /* Generated with Crypto++ */
6863 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6864 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6865 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6866 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6867 .klen = 32,
6868 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6869 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6870 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6871 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6872 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6873 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006874 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6875 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6876 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6877 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6878 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6879 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6880 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6881 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6882 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6883 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6884 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6885 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6886 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6887 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6888 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6889 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6890 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6891 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6892 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6893 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6894 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6895 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6896 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6897 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6898 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6899 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6900 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6901 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6902 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6903 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6904 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6905 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6906 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6907 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6908 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6909 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6910 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6911 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6912 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6913 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6914 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6915 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6916 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6917 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6918 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6919 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6920 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6921 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6922 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6923 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6924 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6925 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6926 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6927 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6928 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6929 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6930 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6931 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6932 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006933 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6934 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6935 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6936 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6937 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006938 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6939 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6940 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6941 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6942 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6943 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6944 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6945 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6946 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6947 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6948 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6949 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6950 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6951 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6952 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6953 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6954 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6955 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6956 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6957 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6958 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6959 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6960 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6961 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6962 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6963 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6964 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6965 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6966 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6967 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6968 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6969 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6970 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6971 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6972 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6973 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6974 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6975 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6976 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6977 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6978 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6979 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6980 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6981 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6982 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6983 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6984 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6985 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6986 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6987 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6988 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6989 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6990 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6991 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6992 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6993 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6994 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6995 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6996 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006997 .also_non_np = 1,
6998 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006999 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007000 }, { /* Generated with Crypto++ */
7001 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7002 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7003 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7004 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7005 .klen = 32,
7006 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7007 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7008 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7009 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7010 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7011 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7012 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7013 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7014 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7015 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7016 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7017 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7018 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7019 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7020 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7021 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7022 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7023 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7024 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7025 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7026 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7027 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7028 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7029 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7030 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7031 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7032 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7033 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7034 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7035 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7036 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7037 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7038 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7039 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7040 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7041 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7042 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7043 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7044 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7045 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7046 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7047 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7048 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7049 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7050 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7051 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7052 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7053 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7054 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7055 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7056 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7057 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7058 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7059 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7060 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7061 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7062 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7063 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7064 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7065 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7066 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7067 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7068 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7069 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
7070 .ilen = 504,
7071 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
7072 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
7073 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
7074 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
7075 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
7076 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
7077 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
7078 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
7079 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
7080 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
7081 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
7082 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
7083 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
7084 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
7085 "\x0B\x82\x59\x14\x26\x67\x08\x09"
7086 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
7087 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
7088 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
7089 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
7090 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
7091 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
7092 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
7093 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
7094 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
7095 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
7096 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
7097 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
7098 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
7099 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
7100 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
7101 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
7102 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
7103 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
7104 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
7105 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
7106 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
7107 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
7108 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
7109 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
7110 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
7111 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
7112 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
7113 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
7114 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
7115 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
7116 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
7117 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
7118 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
7119 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
7120 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
7121 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
7122 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
7123 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
7124 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
7125 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
7126 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
7127 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
7128 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
7129 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
7130 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
7131 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
7132 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
7133 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
7134 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03007135 },
7136};
7137
7138static struct cipher_testvec bf_ctr_dec_tv_template[] = {
7139 { /* Generated with Crypto++ */
7140 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7141 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7142 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7143 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7144 .klen = 32,
7145 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
7146 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
7147 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
7148 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
7149 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03007150 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
7151 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
7152 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
7153 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
7154 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
7155 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
7156 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
7157 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
7158 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
7159 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
7160 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
7161 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
7162 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
7163 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
7164 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
7165 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
7166 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
7167 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
7168 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
7169 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
7170 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
7171 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
7172 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
7173 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
7174 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
7175 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
7176 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
7177 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
7178 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
7179 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
7180 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
7181 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
7182 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
7183 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
7184 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
7185 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
7186 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
7187 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
7188 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
7189 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
7190 "\x82\x63\x11\xB3\x54\x49\x00\x08"
7191 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
7192 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
7193 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
7194 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
7195 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
7196 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
7197 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
7198 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
7199 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
7200 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
7201 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
7202 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
7203 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
7204 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
7205 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
7206 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
7207 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
7208 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
7209 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03007210 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7211 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7212 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7213 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03007214 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7215 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7216 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7217 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7218 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7219 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7220 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7221 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7222 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7223 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7224 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7225 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7226 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7227 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7228 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7229 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7230 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7231 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7232 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7233 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7234 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7235 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7236 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7237 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7238 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7239 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7240 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7241 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7242 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7243 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7244 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7245 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7246 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7247 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7248 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7249 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7250 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7251 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7252 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7253 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7254 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7255 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7256 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7257 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7258 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7259 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7260 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7261 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7262 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7263 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7264 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7265 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7266 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7267 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7268 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7269 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7270 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7271 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7272 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
7273 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03007274 }, { /* Generated with Crypto++ */
7275 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7276 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7277 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7278 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7279 .klen = 32,
7280 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
7281 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
7282 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
7283 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
7284 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
7285 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03007286 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
7287 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
7288 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
7289 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
7290 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
7291 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
7292 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
7293 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
7294 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
7295 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
7296 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
7297 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
7298 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
7299 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
7300 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
7301 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
7302 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
7303 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
7304 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
7305 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
7306 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
7307 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
7308 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
7309 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
7310 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
7311 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
7312 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
7313 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
7314 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
7315 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
7316 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
7317 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
7318 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
7319 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
7320 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
7321 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
7322 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
7323 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
7324 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
7325 "\x82\x63\x11\xB3\x54\x49\x00\x08"
7326 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
7327 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
7328 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
7329 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
7330 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
7331 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
7332 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
7333 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
7334 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
7335 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
7336 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
7337 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
7338 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
7339 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
7340 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
7341 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
7342 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
7343 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
7344 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03007345 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7346 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7347 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7348 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7349 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03007350 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7351 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7352 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7353 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7354 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7355 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7356 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7357 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7358 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7359 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7360 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7361 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7362 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7363 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7364 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7365 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7366 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7367 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7368 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7369 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7370 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7371 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7372 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7373 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7374 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7375 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7376 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7377 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7378 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7379 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7380 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7381 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7382 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7383 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7384 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7385 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7386 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7387 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7388 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7389 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7390 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7391 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7392 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7393 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7394 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7395 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7396 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7397 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7398 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7399 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7400 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7401 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7402 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7403 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7404 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7405 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7406 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7407 "\x2B\xC2\x59\xF0\x64\xFB\x92",
7408 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007409 .also_non_np = 1,
7410 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03007411 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007412 }, { /* Generated with Crypto++ */
7413 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7414 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7415 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7416 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7417 .klen = 32,
7418 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7419 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
7420 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
7421 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
7422 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
7423 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
7424 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
7425 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
7426 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
7427 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
7428 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
7429 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
7430 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
7431 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
7432 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
7433 "\x0B\x82\x59\x14\x26\x67\x08\x09"
7434 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
7435 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
7436 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
7437 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
7438 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
7439 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
7440 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
7441 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
7442 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
7443 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
7444 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
7445 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
7446 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
7447 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
7448 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
7449 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
7450 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
7451 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
7452 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
7453 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
7454 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
7455 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
7456 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
7457 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
7458 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
7459 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
7460 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
7461 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
7462 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
7463 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
7464 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
7465 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
7466 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
7467 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
7468 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
7469 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
7470 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
7471 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
7472 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
7473 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
7474 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
7475 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
7476 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
7477 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
7478 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
7479 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
7480 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
7481 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
7482 .ilen = 504,
7483 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7484 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7485 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7486 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7487 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7488 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7489 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7490 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7491 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7492 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7493 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7494 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7495 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7496 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7497 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7498 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7499 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7500 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7501 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7502 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7503 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7504 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7505 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7506 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7507 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7508 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7509 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7510 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7511 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7512 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7513 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7514 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7515 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7516 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7517 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7518 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7519 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7520 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7521 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7522 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7523 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7524 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7525 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7526 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7527 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7528 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7529 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7530 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7531 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7532 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7533 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7534 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7535 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7536 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7537 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7538 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7539 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7540 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7541 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7542 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7543 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7544 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7545 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
7546 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08007547 },
7548};
7549
7550/*
7551 * Twofish test vectors.
7552 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03007553#define TF_ENC_TEST_VECTORS 4
7554#define TF_DEC_TEST_VECTORS 4
7555#define TF_CBC_ENC_TEST_VECTORS 5
7556#define TF_CBC_DEC_TEST_VECTORS 5
7557#define TF_CTR_ENC_TEST_VECTORS 2
7558#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03007559#define TF_LRW_ENC_TEST_VECTORS 8
7560#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03007561#define TF_XTS_ENC_TEST_VECTORS 5
7562#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08007563
7564static struct cipher_testvec tf_enc_tv_template[] = {
7565 {
7566 .key = zeroed_string,
7567 .klen = 16,
7568 .input = zeroed_string,
7569 .ilen = 16,
7570 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7571 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7572 .rlen = 16,
7573 }, {
7574 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7575 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7576 "\x00\x11\x22\x33\x44\x55\x66\x77",
7577 .klen = 24,
7578 .input = zeroed_string,
7579 .ilen = 16,
7580 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7581 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7582 .rlen = 16,
7583 }, {
7584 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7585 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7586 "\x00\x11\x22\x33\x44\x55\x66\x77"
7587 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7588 .klen = 32,
7589 .input = zeroed_string,
7590 .ilen = 16,
7591 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7592 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7593 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007594 }, { /* Generated with Crypto++ */
7595 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7596 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7597 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7598 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7599 .klen = 32,
7600 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7601 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7602 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7603 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7604 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7605 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7606 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007607 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7608 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7609 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7610 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7611 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7612 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7613 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7614 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7615 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7616 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7617 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7618 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7619 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7620 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7621 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7622 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7623 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7624 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7625 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7626 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7627 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7628 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7629 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7630 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7631 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7632 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7633 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7634 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7635 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7636 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7637 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7638 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7639 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7640 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7641 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7642 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7643 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7644 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7645 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7646 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7647 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7648 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7649 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7650 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7651 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7652 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7653 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7654 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7655 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7656 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7657 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7658 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7659 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7660 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7661 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7662 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007663 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7664 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7665 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7666 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7667 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7668 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7669 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007670 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7671 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7672 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7673 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7674 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7675 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7676 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7677 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7678 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7679 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7680 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7681 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7682 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7683 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7684 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7685 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7686 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7687 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7688 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7689 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7690 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7691 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7692 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7693 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7694 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7695 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7696 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7697 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7698 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7699 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7700 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7701 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7702 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7703 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7704 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7705 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7706 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7707 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7708 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7709 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7710 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7711 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7712 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7713 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7714 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7715 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7716 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7717 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7718 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7719 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7720 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7721 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7722 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7723 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7724 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7725 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007726 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007727 .np = 3,
7728 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007729 },
7730};
7731
7732static struct cipher_testvec tf_dec_tv_template[] = {
7733 {
7734 .key = zeroed_string,
7735 .klen = 16,
7736 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7737 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7738 .ilen = 16,
7739 .result = zeroed_string,
7740 .rlen = 16,
7741 }, {
7742 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7743 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7744 "\x00\x11\x22\x33\x44\x55\x66\x77",
7745 .klen = 24,
7746 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7747 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7748 .ilen = 16,
7749 .result = zeroed_string,
7750 .rlen = 16,
7751 }, {
7752 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7753 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7754 "\x00\x11\x22\x33\x44\x55\x66\x77"
7755 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7756 .klen = 32,
7757 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7758 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7759 .ilen = 16,
7760 .result = zeroed_string,
7761 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007762 }, { /* Generated with Crypto++ */
7763 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7764 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7765 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7766 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7767 .klen = 32,
7768 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7769 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7770 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7771 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7772 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7773 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7774 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007775 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7776 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7777 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7778 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7779 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7780 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7781 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7782 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7783 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7784 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7785 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7786 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7787 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7788 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7789 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7790 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7791 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7792 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7793 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7794 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7795 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7796 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7797 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7798 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7799 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7800 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7801 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7802 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7803 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7804 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7805 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7806 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7807 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7808 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7809 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7810 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7811 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7812 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7813 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7814 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7815 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7816 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7817 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7818 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7819 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7820 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7821 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7822 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7823 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7824 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7825 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7826 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7827 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7828 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7829 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7830 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007831 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7832 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7833 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7834 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7835 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7836 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7837 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007838 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7839 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7840 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7841 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7842 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7843 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7844 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7845 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7846 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7847 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7848 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7849 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7850 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7851 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7852 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7853 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7854 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7855 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7856 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7857 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7858 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7859 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7860 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7861 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7862 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7863 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7864 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7865 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7866 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7867 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7868 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7869 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7870 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7871 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7872 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7873 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7874 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7875 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7876 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7877 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7878 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7879 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7880 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7881 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7882 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7883 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7884 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7885 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7886 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7887 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7888 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7889 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7890 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7891 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7892 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7893 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007894 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007895 .np = 3,
7896 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007897 },
7898};
7899
7900static struct cipher_testvec tf_cbc_enc_tv_template[] = {
7901 { /* Generated with Nettle */
7902 .key = zeroed_string,
7903 .klen = 16,
7904 .iv = zeroed_string,
7905 .input = zeroed_string,
7906 .ilen = 16,
7907 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7908 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7909 .rlen = 16,
7910 }, {
7911 .key = zeroed_string,
7912 .klen = 16,
7913 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7914 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7915 .input = zeroed_string,
7916 .ilen = 16,
7917 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7918 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7919 .rlen = 16,
7920 }, {
7921 .key = zeroed_string,
7922 .klen = 16,
7923 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7924 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7925 .input = zeroed_string,
7926 .ilen = 16,
7927 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7928 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7929 .rlen = 16,
7930 }, {
7931 .key = zeroed_string,
7932 .klen = 16,
7933 .iv = zeroed_string,
7934 .input = zeroed_string,
7935 .ilen = 48,
7936 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7937 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7938 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7939 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7940 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7941 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7942 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007943 }, { /* Generated with Crypto++ */
7944 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7945 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7946 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7947 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7948 .klen = 32,
7949 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7950 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7951 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7952 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7953 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7954 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7955 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7956 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7957 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007958 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7959 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7960 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7961 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7962 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7963 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7964 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7965 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7966 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7967 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7968 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7969 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7970 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7971 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7972 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7973 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7974 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7975 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7976 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7977 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7978 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7979 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7980 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7981 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7982 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7983 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7984 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7985 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7986 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7987 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7988 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7989 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7990 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7991 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7992 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7993 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7994 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7995 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7996 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7997 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7998 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7999 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8000 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8001 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8002 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8003 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8004 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8005 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8006 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8007 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8008 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8009 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8010 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8011 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8012 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8013 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008014 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
8015 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
8016 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
8017 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
8018 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
8019 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
8020 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008021 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
8022 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
8023 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
8024 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
8025 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
8026 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
8027 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
8028 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
8029 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
8030 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
8031 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
8032 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
8033 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
8034 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
8035 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
8036 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
8037 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
8038 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
8039 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
8040 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
8041 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
8042 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
8043 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
8044 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
8045 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
8046 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
8047 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
8048 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
8049 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
8050 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
8051 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
8052 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
8053 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
8054 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
8055 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
8056 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
8057 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
8058 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
8059 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
8060 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
8061 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
8062 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
8063 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
8064 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
8065 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
8066 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
8067 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
8068 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
8069 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
8070 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
8071 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
8072 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
8073 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
8074 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
8075 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
8076 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008077 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02008078 .np = 3,
8079 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008080 },
8081};
8082
8083static struct cipher_testvec tf_cbc_dec_tv_template[] = {
8084 { /* Reverse of the first four above */
8085 .key = zeroed_string,
8086 .klen = 16,
8087 .iv = zeroed_string,
8088 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
8089 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
8090 .ilen = 16,
8091 .result = zeroed_string,
8092 .rlen = 16,
8093 }, {
8094 .key = zeroed_string,
8095 .klen = 16,
8096 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
8097 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
8098 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
8099 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
8100 .ilen = 16,
8101 .result = zeroed_string,
8102 .rlen = 16,
8103 }, {
8104 .key = zeroed_string,
8105 .klen = 16,
8106 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
8107 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
8108 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
8109 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
8110 .ilen = 16,
8111 .result = zeroed_string,
8112 .rlen = 16,
8113 }, {
8114 .key = zeroed_string,
8115 .klen = 16,
8116 .iv = zeroed_string,
8117 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
8118 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
8119 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
8120 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
8121 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
8122 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
8123 .ilen = 48,
8124 .result = zeroed_string,
8125 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008126 }, { /* Generated with Crypto++ */
8127 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8128 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8129 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8130 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8131 .klen = 32,
8132 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8133 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8134 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
8135 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
8136 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
8137 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
8138 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
8139 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
8140 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008141 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
8142 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
8143 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
8144 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
8145 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
8146 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
8147 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
8148 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
8149 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
8150 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
8151 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
8152 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
8153 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
8154 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
8155 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
8156 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
8157 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
8158 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
8159 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
8160 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
8161 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
8162 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
8163 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
8164 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
8165 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
8166 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
8167 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
8168 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
8169 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
8170 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
8171 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
8172 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
8173 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
8174 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
8175 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
8176 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
8177 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
8178 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
8179 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
8180 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
8181 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
8182 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
8183 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
8184 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
8185 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
8186 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
8187 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
8188 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
8189 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
8190 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
8191 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
8192 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
8193 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
8194 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
8195 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
8196 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008197 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8198 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8199 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8200 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8201 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8202 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8203 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008204 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8205 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8206 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8207 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8208 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8209 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8210 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8211 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8212 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8213 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8214 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8215 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8216 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8217 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8218 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8219 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8220 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8221 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8222 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8223 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8224 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8225 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8226 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8227 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8228 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8229 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8230 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8231 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8232 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8233 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8234 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8235 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8236 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8237 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8238 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8239 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8240 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8241 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8242 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8243 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8244 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8245 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8246 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8247 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8248 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8249 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8250 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8251 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8252 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8253 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8254 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8255 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8256 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8257 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8258 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8259 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008260 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02008261 .np = 3,
8262 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03008263 },
8264};
8265
8266static struct cipher_testvec tf_ctr_enc_tv_template[] = {
8267 { /* Generated with Crypto++ */
8268 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8269 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8270 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8271 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8272 .klen = 32,
8273 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8274 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8275 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8276 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8277 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8278 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8279 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8280 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8281 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008282 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8283 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8284 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8285 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8286 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8287 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8288 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8289 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8290 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8291 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8292 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8293 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8294 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8295 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8296 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8297 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8298 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8299 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8300 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8301 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8302 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8303 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8304 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8305 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8306 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8307 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8308 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8309 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8310 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8311 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8312 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8313 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8314 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8315 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8316 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8317 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8318 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8319 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8320 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8321 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8322 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8323 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8324 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8325 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8326 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8327 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8328 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8329 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8330 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8331 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8332 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8333 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8334 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8335 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8336 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8337 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008338 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8339 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8340 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8341 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8342 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8343 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8344 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008345 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8346 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8347 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8348 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8349 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8350 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8351 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8352 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8353 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8354 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8355 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8356 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8357 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8358 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8359 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8360 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8361 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8362 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8363 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8364 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8365 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8366 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8367 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8368 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8369 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8370 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8371 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8372 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8373 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8374 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8375 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8376 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8377 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8378 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8379 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8380 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8381 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8382 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8383 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8384 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8385 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8386 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8387 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8388 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8389 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8390 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8391 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8392 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8393 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8394 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8395 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8396 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8397 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8398 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8399 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
8400 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008401 }, { /* Generated with Crypto++ */
8402 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8403 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8404 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8405 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8406 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03008407 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
8408 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
8409 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8410 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8411 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8412 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8413 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8414 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8415 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8416 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8417 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8418 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8419 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8420 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8421 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8422 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8423 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8424 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8425 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8426 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8427 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8428 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8429 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8430 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8431 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8432 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8433 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8434 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8435 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8436 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8437 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8438 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8439 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8440 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8441 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8442 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8443 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8444 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8445 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8446 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8447 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8448 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8449 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8450 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8451 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8452 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8453 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8454 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8455 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8456 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8457 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8458 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8459 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8460 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8461 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8462 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8463 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8464 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8465 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8466 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8467 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8468 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8469 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8470 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8471 .ilen = 496,
8472 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8473 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8474 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8475 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8476 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8477 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8478 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8479 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8480 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8481 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8482 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8483 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8484 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8485 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8486 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8487 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8488 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8489 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8490 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8491 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8492 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8493 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8494 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8495 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8496 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8497 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8498 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8499 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8500 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8501 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8502 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8503 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8504 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8505 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8506 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8507 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8508 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8509 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8510 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8511 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8512 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8513 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8514 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8515 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8516 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8517 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8518 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8519 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8520 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8521 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8522 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8523 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8524 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8525 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8526 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8527 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8528 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8529 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8530 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8531 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8532 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8533 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8534 .rlen = 496,
8535 }, { /* Generated with Crypto++ */
8536 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8537 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8538 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8539 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8540 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008541 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8542 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8543 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8544 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8545 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8546 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8547 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8548 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8549 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8550 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008551 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8552 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8553 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8554 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8555 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8556 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8557 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8558 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8559 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8560 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8561 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8562 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8563 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8564 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8565 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8566 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8567 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8568 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8569 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8570 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8571 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8572 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8573 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8574 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8575 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8576 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8577 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8578 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8579 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8580 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8581 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8582 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8583 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8584 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8585 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8586 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8587 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8588 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8589 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8590 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8591 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8592 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8593 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8594 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8595 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8596 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8597 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8598 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8599 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8600 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8601 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8602 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8603 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8604 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8605 "\x2B\xC2\x59",
8606 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008607 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8608 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8609 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8610 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8611 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8612 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8613 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8614 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008615 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8616 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8617 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8618 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8619 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8620 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8621 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8622 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8623 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8624 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8625 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8626 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8627 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8628 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8629 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8630 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8631 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8632 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8633 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8634 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8635 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8636 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8637 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8638 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8639 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8640 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8641 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8642 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8643 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8644 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8645 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8646 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8647 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8648 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8649 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8650 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8651 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8652 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8653 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8654 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8655 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8656 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8657 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8658 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8659 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8660 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8661 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8662 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8663 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8664 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8665 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8666 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8667 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8668 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8669 "\x6C\x82\x9D",
8670 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008671 .also_non_np = 1,
8672 .np = 2,
8673 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03008674 },
8675};
8676
8677static struct cipher_testvec tf_ctr_dec_tv_template[] = {
8678 { /* Generated with Crypto++ */
8679 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8680 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8681 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8682 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8683 .klen = 32,
8684 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8685 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8686 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8687 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8688 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8689 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8690 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8691 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8692 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008693 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8694 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8695 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8696 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8697 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8698 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8699 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8700 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8701 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8702 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8703 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8704 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8705 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8706 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8707 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8708 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8709 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8710 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8711 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8712 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8713 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8714 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8715 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8716 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8717 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8718 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8719 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8720 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8721 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8722 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8723 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8724 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8725 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8726 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8727 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8728 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8729 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8730 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8731 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8732 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8733 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8734 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8735 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8736 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8737 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8738 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8739 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8740 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8741 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8742 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8743 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8744 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8745 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8746 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8747 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
8748 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008749 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8750 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8751 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8752 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8753 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8754 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8755 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008756 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8757 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8758 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8759 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8760 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8761 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8762 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8763 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8764 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8765 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8766 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8767 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8768 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8769 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8770 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8771 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8772 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8773 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8774 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8775 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8776 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8777 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8778 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8779 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8780 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8781 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8782 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8783 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8784 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8785 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8786 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8787 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8788 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8789 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8790 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8791 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8792 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8793 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8794 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8795 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8796 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8797 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8798 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8799 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8800 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8801 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8802 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8803 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8804 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8805 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8806 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8807 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8808 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8809 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8810 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8811 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008812 }, { /* Generated with Crypto++ */
8813 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8814 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8815 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8816 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8817 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03008818 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
8819 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
8820 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8821 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8822 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8823 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8824 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8825 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8826 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8827 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8828 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8829 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8830 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8831 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8832 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8833 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8834 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8835 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8836 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8837 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8838 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8839 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8840 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8841 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8842 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8843 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8844 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8845 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8846 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8847 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8848 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8849 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8850 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8851 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8852 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8853 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8854 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8855 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8856 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8857 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8858 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8859 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8860 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8861 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8862 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8863 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8864 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8865 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8866 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8867 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8868 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8869 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8870 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8871 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8872 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8873 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8874 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8875 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8876 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8877 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8878 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8879 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8880 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8881 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8882 .ilen = 496,
8883 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8884 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8885 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8886 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8887 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8888 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8889 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8890 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8891 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8892 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8893 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8894 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8895 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8896 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8897 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8898 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8899 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8900 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8901 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8902 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8903 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8904 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8905 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8906 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8907 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8908 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8909 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8910 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8911 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8912 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8913 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8914 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8915 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8916 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8917 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8918 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8919 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8920 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8921 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8922 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8923 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8924 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8925 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8926 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8927 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8928 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8929 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8930 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8931 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8932 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8933 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8934 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8935 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8936 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8937 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8938 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8939 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8940 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8941 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8942 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8943 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8944 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8945 .rlen = 496,
8946 }, { /* Generated with Crypto++ */
8947 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8948 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8949 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8950 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8951 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008952 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8953 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8954 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8955 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8956 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8957 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8958 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8959 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8960 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8961 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008962 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8963 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8964 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8965 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8966 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8967 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8968 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8969 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8970 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8971 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8972 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8973 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8974 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8975 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8976 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8977 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8978 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8979 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8980 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8981 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8982 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8983 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8984 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8985 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8986 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8987 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8988 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8989 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8990 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8991 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8992 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8993 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8994 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8995 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8996 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8997 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8998 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8999 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
9000 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
9001 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
9002 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
9003 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
9004 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
9005 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
9006 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
9007 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
9008 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
9009 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
9010 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
9011 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
9012 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
9013 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
9014 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
9015 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
9016 "\x6C\x82\x9D",
9017 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03009018 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9019 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9020 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9021 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9022 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9023 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9024 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9025 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02009026 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9027 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9028 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9029 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9030 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9031 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9032 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9033 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9034 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9035 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9036 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9037 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9038 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9039 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9040 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9041 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9042 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9043 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9044 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9045 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9046 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9047 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9048 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9049 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9050 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9051 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9052 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9053 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9054 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9055 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9056 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9057 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9058 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9059 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9060 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9061 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9062 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9063 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9064 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9065 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9066 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9067 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9068 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9069 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9070 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9071 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9072 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9073 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9074 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9075 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9076 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9077 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9078 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9079 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
9080 "\x2B\xC2\x59",
9081 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009082 .also_non_np = 1,
9083 .np = 2,
9084 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08009085 },
9086};
9087
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03009088static struct cipher_testvec tf_lrw_enc_tv_template[] = {
9089 /* Generated from AES-LRW test vectors */
9090 {
9091 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
9092 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
9093 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
9094 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
9095 .klen = 32,
9096 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9097 "\x00\x00\x00\x00\x00\x00\x00\x01",
9098 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9099 "\x38\x39\x41\x42\x43\x44\x45\x46",
9100 .ilen = 16,
9101 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
9102 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
9103 .rlen = 16,
9104 }, {
9105 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
9106 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
9107 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
9108 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
9109 .klen = 32,
9110 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9111 "\x00\x00\x00\x00\x00\x00\x00\x02",
9112 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9113 "\x38\x39\x41\x42\x43\x44\x45\x46",
9114 .ilen = 16,
9115 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
9116 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
9117 .rlen = 16,
9118 }, {
9119 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
9120 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
9121 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
9122 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
9123 .klen = 32,
9124 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9125 "\x00\x00\x00\x02\x00\x00\x00\x00",
9126 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9127 "\x38\x39\x41\x42\x43\x44\x45\x46",
9128 .ilen = 16,
9129 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
9130 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
9131 .rlen = 16,
9132 }, {
9133 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
9134 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
9135 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
9136 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
9137 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
9138 .klen = 40,
9139 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9140 "\x00\x00\x00\x00\x00\x00\x00\x01",
9141 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9142 "\x38\x39\x41\x42\x43\x44\x45\x46",
9143 .ilen = 16,
9144 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
9145 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
9146 .rlen = 16,
9147 }, {
9148 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
9149 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
9150 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
9151 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
9152 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
9153 .klen = 40,
9154 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9155 "\x00\x00\x00\x02\x00\x00\x00\x00",
9156 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9157 "\x38\x39\x41\x42\x43\x44\x45\x46",
9158 .ilen = 16,
9159 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
9160 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
9161 .rlen = 16,
9162 }, {
9163 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9164 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9165 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9166 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9167 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9168 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9169 .klen = 48,
9170 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9171 "\x00\x00\x00\x00\x00\x00\x00\x01",
9172 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9173 "\x38\x39\x41\x42\x43\x44\x45\x46",
9174 .ilen = 16,
9175 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
9176 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
9177 .rlen = 16,
9178 }, {
9179 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
9180 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
9181 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
9182 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
9183 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
9184 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
9185 .klen = 48,
9186 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9187 "\x00\x00\x00\x02\x00\x00\x00\x00",
9188 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9189 "\x38\x39\x41\x42\x43\x44\x45\x46",
9190 .ilen = 16,
9191 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
9192 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
9193 .rlen = 16,
9194 }, {
9195 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9196 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9197 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9198 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9199 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9200 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9201 .klen = 48,
9202 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9203 "\x00\x00\x00\x00\x00\x00\x00\x01",
9204 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
9205 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
9206 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
9207 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
9208 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
9209 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
9210 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
9211 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
9212 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
9213 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
9214 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
9215 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
9216 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
9217 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
9218 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
9219 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
9220 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
9221 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
9222 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
9223 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
9224 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
9225 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
9226 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
9227 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
9228 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
9229 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
9230 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
9231 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
9232 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
9233 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
9234 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
9235 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
9236 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
9237 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
9238 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
9239 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
9240 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
9241 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
9242 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
9243 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
9244 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
9245 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
9246 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
9247 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9248 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9249 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9250 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9251 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9252 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9253 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9254 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9255 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9256 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9257 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9258 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9259 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9260 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9261 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9262 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9263 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9264 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9265 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9266 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9267 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9268 .ilen = 512,
9269 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
9270 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
9271 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
9272 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
9273 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
9274 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
9275 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
9276 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
9277 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
9278 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
9279 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
9280 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
9281 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
9282 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
9283 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
9284 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
9285 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
9286 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
9287 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
9288 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
9289 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
9290 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
9291 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
9292 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
9293 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
9294 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
9295 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
9296 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
9297 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
9298 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
9299 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
9300 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
9301 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
9302 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
9303 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
9304 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
9305 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
9306 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
9307 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
9308 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
9309 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
9310 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
9311 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
9312 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
9313 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
9314 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
9315 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
9316 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
9317 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
9318 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
9319 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
9320 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
9321 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
9322 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
9323 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
9324 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
9325 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
9326 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
9327 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
9328 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
9329 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
9330 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
9331 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
9332 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
9333 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009334 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009335 .np = 3,
9336 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03009337 },
9338};
9339
9340static struct cipher_testvec tf_lrw_dec_tv_template[] = {
9341 /* Generated from AES-LRW test vectors */
9342 /* same as enc vectors with input and result reversed */
9343 {
9344 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
9345 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
9346 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
9347 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
9348 .klen = 32,
9349 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9350 "\x00\x00\x00\x00\x00\x00\x00\x01",
9351 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
9352 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
9353 .ilen = 16,
9354 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9355 "\x38\x39\x41\x42\x43\x44\x45\x46",
9356 .rlen = 16,
9357 }, {
9358 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
9359 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
9360 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
9361 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
9362 .klen = 32,
9363 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9364 "\x00\x00\x00\x00\x00\x00\x00\x02",
9365 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
9366 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
9367 .ilen = 16,
9368 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9369 "\x38\x39\x41\x42\x43\x44\x45\x46",
9370 .rlen = 16,
9371 }, {
9372 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
9373 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
9374 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
9375 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
9376 .klen = 32,
9377 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9378 "\x00\x00\x00\x02\x00\x00\x00\x00",
9379 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
9380 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
9381 .ilen = 16,
9382 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9383 "\x38\x39\x41\x42\x43\x44\x45\x46",
9384 .rlen = 16,
9385 }, {
9386 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
9387 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
9388 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
9389 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
9390 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
9391 .klen = 40,
9392 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9393 "\x00\x00\x00\x00\x00\x00\x00\x01",
9394 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
9395 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
9396 .ilen = 16,
9397 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9398 "\x38\x39\x41\x42\x43\x44\x45\x46",
9399 .rlen = 16,
9400 }, {
9401 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
9402 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
9403 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
9404 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
9405 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
9406 .klen = 40,
9407 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9408 "\x00\x00\x00\x02\x00\x00\x00\x00",
9409 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
9410 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
9411 .ilen = 16,
9412 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9413 "\x38\x39\x41\x42\x43\x44\x45\x46",
9414 .rlen = 16,
9415 }, {
9416 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9417 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9418 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9419 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9420 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9421 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9422 .klen = 48,
9423 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9424 "\x00\x00\x00\x00\x00\x00\x00\x01",
9425 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
9426 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
9427 .ilen = 16,
9428 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9429 "\x38\x39\x41\x42\x43\x44\x45\x46",
9430 .rlen = 16,
9431 }, {
9432 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
9433 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
9434 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
9435 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
9436 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
9437 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
9438 .klen = 48,
9439 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9440 "\x00\x00\x00\x02\x00\x00\x00\x00",
9441 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
9442 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
9443 .ilen = 16,
9444 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9445 "\x38\x39\x41\x42\x43\x44\x45\x46",
9446 .rlen = 16,
9447 }, {
9448 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9449 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9450 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9451 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9452 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9453 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9454 .klen = 48,
9455 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9456 "\x00\x00\x00\x00\x00\x00\x00\x01",
9457 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
9458 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
9459 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
9460 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
9461 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
9462 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
9463 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
9464 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
9465 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
9466 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
9467 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
9468 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
9469 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
9470 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
9471 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
9472 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
9473 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
9474 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
9475 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
9476 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
9477 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
9478 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
9479 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
9480 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
9481 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
9482 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
9483 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
9484 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
9485 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
9486 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
9487 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
9488 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
9489 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
9490 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
9491 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
9492 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
9493 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
9494 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
9495 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
9496 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
9497 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
9498 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
9499 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
9500 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
9501 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
9502 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
9503 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
9504 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
9505 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
9506 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
9507 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
9508 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
9509 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
9510 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
9511 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
9512 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
9513 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
9514 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
9515 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
9516 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
9517 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
9518 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
9519 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
9520 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
9521 .ilen = 512,
9522 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
9523 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
9524 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
9525 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
9526 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
9527 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
9528 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
9529 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
9530 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
9531 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
9532 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
9533 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
9534 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
9535 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
9536 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
9537 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
9538 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
9539 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
9540 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
9541 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
9542 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
9543 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
9544 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
9545 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
9546 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
9547 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
9548 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
9549 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
9550 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
9551 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
9552 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
9553 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
9554 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
9555 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
9556 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
9557 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
9558 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
9559 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
9560 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
9561 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
9562 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
9563 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
9564 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
9565 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9566 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9567 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9568 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9569 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9570 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9571 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9572 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9573 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9574 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9575 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9576 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9577 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9578 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9579 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9580 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9581 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9582 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9583 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9584 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9585 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9586 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009587 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009588 .np = 3,
9589 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03009590 },
9591};
9592
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009593static struct cipher_testvec tf_xts_enc_tv_template[] = {
9594 /* Generated from AES-XTS test vectors */
9595{
9596 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9597 "\x00\x00\x00\x00\x00\x00\x00\x00"
9598 "\x00\x00\x00\x00\x00\x00\x00\x00"
9599 "\x00\x00\x00\x00\x00\x00\x00\x00",
9600 .klen = 32,
9601 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9602 "\x00\x00\x00\x00\x00\x00\x00\x00",
9603 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9604 "\x00\x00\x00\x00\x00\x00\x00\x00"
9605 "\x00\x00\x00\x00\x00\x00\x00\x00"
9606 "\x00\x00\x00\x00\x00\x00\x00\x00",
9607 .ilen = 32,
9608 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9609 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9610 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9611 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9612 .rlen = 32,
9613 }, {
9614 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9615 "\x11\x11\x11\x11\x11\x11\x11\x11"
9616 "\x22\x22\x22\x22\x22\x22\x22\x22"
9617 "\x22\x22\x22\x22\x22\x22\x22\x22",
9618 .klen = 32,
9619 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9620 "\x00\x00\x00\x00\x00\x00\x00\x00",
9621 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
9622 "\x44\x44\x44\x44\x44\x44\x44\x44"
9623 "\x44\x44\x44\x44\x44\x44\x44\x44"
9624 "\x44\x44\x44\x44\x44\x44\x44\x44",
9625 .ilen = 32,
9626 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9627 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9628 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9629 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9630 .rlen = 32,
9631 }, {
9632 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9633 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9634 "\x22\x22\x22\x22\x22\x22\x22\x22"
9635 "\x22\x22\x22\x22\x22\x22\x22\x22",
9636 .klen = 32,
9637 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9638 "\x00\x00\x00\x00\x00\x00\x00\x00",
9639 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
9640 "\x44\x44\x44\x44\x44\x44\x44\x44"
9641 "\x44\x44\x44\x44\x44\x44\x44\x44"
9642 "\x44\x44\x44\x44\x44\x44\x44\x44",
9643 .ilen = 32,
9644 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9645 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9646 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9647 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9648 .rlen = 32,
9649 }, {
9650 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9651 "\x23\x53\x60\x28\x74\x71\x35\x26"
9652 "\x31\x41\x59\x26\x53\x58\x97\x93"
9653 "\x23\x84\x62\x64\x33\x83\x27\x95",
9654 .klen = 32,
9655 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9656 "\x00\x00\x00\x00\x00\x00\x00\x00",
9657 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9658 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9659 "\x10\x11\x12\x13\x14\x15\x16\x17"
9660 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9661 "\x20\x21\x22\x23\x24\x25\x26\x27"
9662 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9663 "\x30\x31\x32\x33\x34\x35\x36\x37"
9664 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9665 "\x40\x41\x42\x43\x44\x45\x46\x47"
9666 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9667 "\x50\x51\x52\x53\x54\x55\x56\x57"
9668 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9669 "\x60\x61\x62\x63\x64\x65\x66\x67"
9670 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9671 "\x70\x71\x72\x73\x74\x75\x76\x77"
9672 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9673 "\x80\x81\x82\x83\x84\x85\x86\x87"
9674 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9675 "\x90\x91\x92\x93\x94\x95\x96\x97"
9676 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9677 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9678 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9679 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9680 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9681 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9682 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9683 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9684 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9685 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9686 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9687 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9688 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9689 "\x00\x01\x02\x03\x04\x05\x06\x07"
9690 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9691 "\x10\x11\x12\x13\x14\x15\x16\x17"
9692 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9693 "\x20\x21\x22\x23\x24\x25\x26\x27"
9694 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9695 "\x30\x31\x32\x33\x34\x35\x36\x37"
9696 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9697 "\x40\x41\x42\x43\x44\x45\x46\x47"
9698 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9699 "\x50\x51\x52\x53\x54\x55\x56\x57"
9700 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9701 "\x60\x61\x62\x63\x64\x65\x66\x67"
9702 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9703 "\x70\x71\x72\x73\x74\x75\x76\x77"
9704 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9705 "\x80\x81\x82\x83\x84\x85\x86\x87"
9706 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9707 "\x90\x91\x92\x93\x94\x95\x96\x97"
9708 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9709 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9710 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9711 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9712 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9713 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9714 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9715 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9716 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9717 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9718 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9719 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9720 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9721 .ilen = 512,
9722 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9723 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9724 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9725 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9726 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9727 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9728 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9729 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9730 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9731 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9732 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9733 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9734 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9735 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9736 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9737 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9738 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9739 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9740 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9741 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9742 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9743 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9744 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9745 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9746 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9747 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9748 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9749 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9750 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9751 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9752 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9753 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9754 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9755 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9756 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9757 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9758 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9759 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9760 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9761 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9762 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9763 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9764 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9765 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9766 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9767 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9768 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9769 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9770 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9771 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9772 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9773 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9774 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9775 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9776 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9777 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9778 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9779 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9780 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9781 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9782 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9783 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9784 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9785 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9786 .rlen = 512,
9787 }, {
9788 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9789 "\x23\x53\x60\x28\x74\x71\x35\x26"
9790 "\x62\x49\x77\x57\x24\x70\x93\x69"
9791 "\x99\x59\x57\x49\x66\x96\x76\x27"
9792 "\x31\x41\x59\x26\x53\x58\x97\x93"
9793 "\x23\x84\x62\x64\x33\x83\x27\x95"
9794 "\x02\x88\x41\x97\x16\x93\x99\x37"
9795 "\x51\x05\x82\x09\x74\x94\x45\x92",
9796 .klen = 64,
9797 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9798 "\x00\x00\x00\x00\x00\x00\x00\x00",
9799 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9800 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9801 "\x10\x11\x12\x13\x14\x15\x16\x17"
9802 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9803 "\x20\x21\x22\x23\x24\x25\x26\x27"
9804 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9805 "\x30\x31\x32\x33\x34\x35\x36\x37"
9806 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9807 "\x40\x41\x42\x43\x44\x45\x46\x47"
9808 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9809 "\x50\x51\x52\x53\x54\x55\x56\x57"
9810 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9811 "\x60\x61\x62\x63\x64\x65\x66\x67"
9812 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9813 "\x70\x71\x72\x73\x74\x75\x76\x77"
9814 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9815 "\x80\x81\x82\x83\x84\x85\x86\x87"
9816 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9817 "\x90\x91\x92\x93\x94\x95\x96\x97"
9818 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9819 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9820 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9821 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9822 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9823 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9824 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9825 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9826 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9827 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9828 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9829 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9830 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9831 "\x00\x01\x02\x03\x04\x05\x06\x07"
9832 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9833 "\x10\x11\x12\x13\x14\x15\x16\x17"
9834 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9835 "\x20\x21\x22\x23\x24\x25\x26\x27"
9836 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9837 "\x30\x31\x32\x33\x34\x35\x36\x37"
9838 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9839 "\x40\x41\x42\x43\x44\x45\x46\x47"
9840 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9841 "\x50\x51\x52\x53\x54\x55\x56\x57"
9842 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9843 "\x60\x61\x62\x63\x64\x65\x66\x67"
9844 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9845 "\x70\x71\x72\x73\x74\x75\x76\x77"
9846 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9847 "\x80\x81\x82\x83\x84\x85\x86\x87"
9848 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9849 "\x90\x91\x92\x93\x94\x95\x96\x97"
9850 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9851 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9852 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9853 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9854 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9855 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9856 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9857 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9858 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9859 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9860 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9861 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9862 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9863 .ilen = 512,
9864 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9865 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9866 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9867 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9868 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9869 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9870 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9871 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9872 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9873 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9874 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9875 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9876 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9877 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9878 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9879 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9880 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9881 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9882 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9883 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9884 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9885 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9886 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9887 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9888 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9889 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9890 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9891 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9892 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9893 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9894 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9895 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9896 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9897 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9898 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9899 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9900 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9901 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9902 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9903 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9904 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9905 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9906 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9907 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9908 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9909 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9910 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9911 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9912 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9913 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9914 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9915 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9916 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9917 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9918 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9919 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9920 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9921 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9922 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9923 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9924 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9925 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9926 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9927 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9928 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009929 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009930 .np = 3,
9931 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009932 },
9933};
9934
9935static struct cipher_testvec tf_xts_dec_tv_template[] = {
9936 /* Generated from AES-XTS test vectors */
9937 /* same as enc vectors with input and result reversed */
9938 {
9939 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9940 "\x00\x00\x00\x00\x00\x00\x00\x00"
9941 "\x00\x00\x00\x00\x00\x00\x00\x00"
9942 "\x00\x00\x00\x00\x00\x00\x00\x00",
9943 .klen = 32,
9944 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9945 "\x00\x00\x00\x00\x00\x00\x00\x00",
9946 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9947 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9948 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9949 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9950 .ilen = 32,
9951 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
9952 "\x00\x00\x00\x00\x00\x00\x00\x00"
9953 "\x00\x00\x00\x00\x00\x00\x00\x00"
9954 "\x00\x00\x00\x00\x00\x00\x00\x00",
9955 .rlen = 32,
9956 }, {
9957 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9958 "\x11\x11\x11\x11\x11\x11\x11\x11"
9959 "\x22\x22\x22\x22\x22\x22\x22\x22"
9960 "\x22\x22\x22\x22\x22\x22\x22\x22",
9961 .klen = 32,
9962 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9963 "\x00\x00\x00\x00\x00\x00\x00\x00",
9964 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9965 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9966 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9967 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9968 .ilen = 32,
9969 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9970 "\x44\x44\x44\x44\x44\x44\x44\x44"
9971 "\x44\x44\x44\x44\x44\x44\x44\x44"
9972 "\x44\x44\x44\x44\x44\x44\x44\x44",
9973 .rlen = 32,
9974 }, {
9975 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9976 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9977 "\x22\x22\x22\x22\x22\x22\x22\x22"
9978 "\x22\x22\x22\x22\x22\x22\x22\x22",
9979 .klen = 32,
9980 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9981 "\x00\x00\x00\x00\x00\x00\x00\x00",
9982 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9983 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9984 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9985 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9986 .ilen = 32,
9987 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9988 "\x44\x44\x44\x44\x44\x44\x44\x44"
9989 "\x44\x44\x44\x44\x44\x44\x44\x44"
9990 "\x44\x44\x44\x44\x44\x44\x44\x44",
9991 .rlen = 32,
9992 }, {
9993 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9994 "\x23\x53\x60\x28\x74\x71\x35\x26"
9995 "\x31\x41\x59\x26\x53\x58\x97\x93"
9996 "\x23\x84\x62\x64\x33\x83\x27\x95",
9997 .klen = 32,
9998 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9999 "\x00\x00\x00\x00\x00\x00\x00\x00",
10000 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
10001 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
10002 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
10003 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
10004 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
10005 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
10006 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
10007 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
10008 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
10009 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
10010 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
10011 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
10012 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
10013 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
10014 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
10015 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
10016 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
10017 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
10018 "\x39\x80\x39\x09\x97\x65\xf2\x83"
10019 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
10020 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
10021 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
10022 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
10023 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
10024 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
10025 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
10026 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
10027 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
10028 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
10029 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
10030 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
10031 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
10032 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
10033 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
10034 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
10035 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
10036 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
10037 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
10038 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
10039 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
10040 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
10041 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
10042 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
10043 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
10044 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
10045 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
10046 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
10047 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
10048 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
10049 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
10050 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
10051 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
10052 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
10053 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
10054 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
10055 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
10056 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
10057 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
10058 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
10059 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
10060 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
10061 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
10062 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
10063 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
10064 .ilen = 512,
10065 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10066 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10067 "\x10\x11\x12\x13\x14\x15\x16\x17"
10068 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10069 "\x20\x21\x22\x23\x24\x25\x26\x27"
10070 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10071 "\x30\x31\x32\x33\x34\x35\x36\x37"
10072 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10073 "\x40\x41\x42\x43\x44\x45\x46\x47"
10074 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10075 "\x50\x51\x52\x53\x54\x55\x56\x57"
10076 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10077 "\x60\x61\x62\x63\x64\x65\x66\x67"
10078 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10079 "\x70\x71\x72\x73\x74\x75\x76\x77"
10080 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10081 "\x80\x81\x82\x83\x84\x85\x86\x87"
10082 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10083 "\x90\x91\x92\x93\x94\x95\x96\x97"
10084 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10085 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10086 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10087 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10088 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10089 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10090 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10091 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10092 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10093 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10094 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10095 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10096 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10097 "\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 "\x20\x21\x22\x23\x24\x25\x26\x27"
10102 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10103 "\x30\x31\x32\x33\x34\x35\x36\x37"
10104 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10105 "\x40\x41\x42\x43\x44\x45\x46\x47"
10106 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10107 "\x50\x51\x52\x53\x54\x55\x56\x57"
10108 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10109 "\x60\x61\x62\x63\x64\x65\x66\x67"
10110 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10111 "\x70\x71\x72\x73\x74\x75\x76\x77"
10112 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10113 "\x80\x81\x82\x83\x84\x85\x86\x87"
10114 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10115 "\x90\x91\x92\x93\x94\x95\x96\x97"
10116 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10117 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10118 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10119 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10120 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10121 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10122 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10123 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10124 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10125 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10126 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10127 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10128 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10129 .rlen = 512,
10130 }, {
10131 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10132 "\x23\x53\x60\x28\x74\x71\x35\x26"
10133 "\x62\x49\x77\x57\x24\x70\x93\x69"
10134 "\x99\x59\x57\x49\x66\x96\x76\x27"
10135 "\x31\x41\x59\x26\x53\x58\x97\x93"
10136 "\x23\x84\x62\x64\x33\x83\x27\x95"
10137 "\x02\x88\x41\x97\x16\x93\x99\x37"
10138 "\x51\x05\x82\x09\x74\x94\x45\x92",
10139 .klen = 64,
10140 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
10141 "\x00\x00\x00\x00\x00\x00\x00\x00",
10142 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
10143 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
10144 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
10145 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
10146 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
10147 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
10148 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
10149 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
10150 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
10151 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
10152 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
10153 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
10154 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
10155 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
10156 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
10157 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
10158 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
10159 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
10160 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
10161 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
10162 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
10163 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
10164 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
10165 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
10166 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
10167 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
10168 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
10169 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
10170 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
10171 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
10172 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
10173 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
10174 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
10175 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
10176 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
10177 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
10178 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
10179 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
10180 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
10181 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
10182 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
10183 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
10184 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
10185 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
10186 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
10187 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
10188 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
10189 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
10190 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
10191 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
10192 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
10193 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
10194 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
10195 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
10196 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
10197 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
10198 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
10199 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
10200 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
10201 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
10202 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
10203 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
10204 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
10205 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
10206 .ilen = 512,
10207 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10208 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10209 "\x10\x11\x12\x13\x14\x15\x16\x17"
10210 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10211 "\x20\x21\x22\x23\x24\x25\x26\x27"
10212 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10213 "\x30\x31\x32\x33\x34\x35\x36\x37"
10214 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10215 "\x40\x41\x42\x43\x44\x45\x46\x47"
10216 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10217 "\x50\x51\x52\x53\x54\x55\x56\x57"
10218 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10219 "\x60\x61\x62\x63\x64\x65\x66\x67"
10220 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10221 "\x70\x71\x72\x73\x74\x75\x76\x77"
10222 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10223 "\x80\x81\x82\x83\x84\x85\x86\x87"
10224 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10225 "\x90\x91\x92\x93\x94\x95\x96\x97"
10226 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10227 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10228 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10229 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10230 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10231 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10232 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10233 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10234 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10235 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10236 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10237 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10238 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10239 "\x00\x01\x02\x03\x04\x05\x06\x07"
10240 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10241 "\x10\x11\x12\x13\x14\x15\x16\x17"
10242 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10243 "\x20\x21\x22\x23\x24\x25\x26\x27"
10244 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10245 "\x30\x31\x32\x33\x34\x35\x36\x37"
10246 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10247 "\x40\x41\x42\x43\x44\x45\x46\x47"
10248 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10249 "\x50\x51\x52\x53\x54\x55\x56\x57"
10250 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10251 "\x60\x61\x62\x63\x64\x65\x66\x67"
10252 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10253 "\x70\x71\x72\x73\x74\x75\x76\x77"
10254 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10255 "\x80\x81\x82\x83\x84\x85\x86\x87"
10256 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10257 "\x90\x91\x92\x93\x94\x95\x96\x97"
10258 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10259 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10260 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10261 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10262 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10263 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10264 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10265 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10266 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10267 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10268 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10269 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10270 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10271 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010272 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010273 .np = 3,
10274 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +030010275 },
10276};
10277
Herbert Xuda7f0332008-07-31 17:08:25 +080010278/*
10279 * Serpent test vectors. These are backwards because Serpent writes
10280 * octet sequences in right-to-left mode.
10281 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010282#define SERPENT_ENC_TEST_VECTORS 5
10283#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080010284
10285#define TNEPRES_ENC_TEST_VECTORS 4
10286#define TNEPRES_DEC_TEST_VECTORS 4
10287
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010288#define SERPENT_CBC_ENC_TEST_VECTORS 1
10289#define SERPENT_CBC_DEC_TEST_VECTORS 1
10290
10291#define SERPENT_CTR_ENC_TEST_VECTORS 2
10292#define SERPENT_CTR_DEC_TEST_VECTORS 2
10293
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030010294#define SERPENT_LRW_ENC_TEST_VECTORS 8
10295#define SERPENT_LRW_DEC_TEST_VECTORS 8
10296
Jussi Kivilinna18be20b92011-10-18 13:33:17 +030010297#define SERPENT_XTS_ENC_TEST_VECTORS 5
10298#define SERPENT_XTS_DEC_TEST_VECTORS 5
10299
Herbert Xuda7f0332008-07-31 17:08:25 +080010300static struct cipher_testvec serpent_enc_tv_template[] = {
10301 {
10302 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10303 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10304 .ilen = 16,
10305 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
10306 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
10307 .rlen = 16,
10308 }, {
10309 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10310 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10311 .klen = 16,
10312 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10313 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10314 .ilen = 16,
10315 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
10316 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
10317 .rlen = 16,
10318 }, {
10319 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10320 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10321 "\x10\x11\x12\x13\x14\x15\x16\x17"
10322 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10323 .klen = 32,
10324 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10325 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10326 .ilen = 16,
10327 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
10328 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
10329 .rlen = 16,
10330 }, {
10331 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10332 .klen = 16,
10333 .input = zeroed_string,
10334 .ilen = 16,
10335 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
10336 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
10337 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010338 }, { /* Generated with Crypto++ */
10339 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10340 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10341 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10342 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10343 .klen = 32,
10344 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10345 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10346 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10347 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10348 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10349 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10350 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10351 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10352 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10353 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10354 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10355 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10356 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10357 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10358 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10359 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10360 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010361 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10362 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10363 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10364 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10365 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10366 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10367 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10368 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10369 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10370 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10371 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10372 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10373 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10374 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10375 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10376 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10377 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10378 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10379 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10380 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10381 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10382 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10383 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10384 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10385 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10386 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10387 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10388 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10389 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10390 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10391 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10392 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10393 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10394 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10395 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10396 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10397 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10398 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10399 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10400 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10401 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10402 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10403 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10404 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10405 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10406 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010407 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
10408 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
10409 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
10410 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
10411 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
10412 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
10413 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
10414 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
10415 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
10416 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
10417 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
10418 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
10419 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
10420 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
10421 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
10422 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
10423 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010424 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
10425 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
10426 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
10427 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
10428 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
10429 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
10430 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
10431 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
10432 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
10433 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
10434 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
10435 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
10436 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
10437 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
10438 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
10439 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
10440 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
10441 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
10442 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
10443 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
10444 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
10445 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
10446 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
10447 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
10448 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
10449 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
10450 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
10451 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
10452 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
10453 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
10454 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
10455 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
10456 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
10457 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
10458 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
10459 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
10460 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
10461 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
10462 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
10463 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
10464 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
10465 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
10466 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
10467 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10468 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10469 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010470 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010471 .np = 3,
10472 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010473 },
10474};
10475
10476static struct cipher_testvec tnepres_enc_tv_template[] = {
10477 { /* KeySize=128, PT=0, I=1 */
10478 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10479 "\x00\x00\x00\x00\x00\x00\x00\x00",
10480 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10481 "\x00\x00\x00\x00\x00\x00\x00\x00",
10482 .klen = 16,
10483 .ilen = 16,
10484 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
10485 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
10486 .rlen = 16,
10487 }, { /* KeySize=192, PT=0, I=1 */
10488 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10489 "\x00\x00\x00\x00\x00\x00\x00\x00"
10490 "\x00\x00\x00\x00\x00\x00\x00\x00",
10491 .klen = 24,
10492 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10493 "\x00\x00\x00\x00\x00\x00\x00\x00",
10494 .ilen = 16,
10495 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
10496 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
10497 .rlen = 16,
10498 }, { /* KeySize=256, PT=0, I=1 */
10499 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10500 "\x00\x00\x00\x00\x00\x00\x00\x00"
10501 "\x00\x00\x00\x00\x00\x00\x00\x00"
10502 "\x00\x00\x00\x00\x00\x00\x00\x00",
10503 .klen = 32,
10504 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10505 "\x00\x00\x00\x00\x00\x00\x00\x00",
10506 .ilen = 16,
10507 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
10508 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
10509 .rlen = 16,
10510 }, { /* KeySize=256, I=257 */
10511 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
10512 "\x17\x16\x15\x14\x13\x12\x11\x10"
10513 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
10514 "\x07\x06\x05\x04\x03\x02\x01\x00",
10515 .klen = 32,
10516 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
10517 "\x07\x06\x05\x04\x03\x02\x01\x00",
10518 .ilen = 16,
10519 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
10520 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
10521 .rlen = 16,
10522 },
10523};
10524
10525
10526static struct cipher_testvec serpent_dec_tv_template[] = {
10527 {
10528 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
10529 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
10530 .ilen = 16,
10531 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10532 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10533 .rlen = 16,
10534 }, {
10535 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10536 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10537 .klen = 16,
10538 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
10539 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
10540 .ilen = 16,
10541 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10542 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10543 .rlen = 16,
10544 }, {
10545 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10546 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10547 "\x10\x11\x12\x13\x14\x15\x16\x17"
10548 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10549 .klen = 32,
10550 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
10551 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
10552 .ilen = 16,
10553 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10554 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10555 .rlen = 16,
10556 }, {
10557 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10558 .klen = 16,
10559 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
10560 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
10561 .ilen = 16,
10562 .result = zeroed_string,
10563 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010564 }, { /* Generated with Crypto++ */
10565 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10566 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10567 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10568 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10569 .klen = 32,
10570 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
10571 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
10572 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
10573 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
10574 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
10575 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
10576 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
10577 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
10578 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
10579 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
10580 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
10581 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
10582 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
10583 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
10584 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
10585 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
10586 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010587 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
10588 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
10589 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
10590 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
10591 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
10592 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
10593 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
10594 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
10595 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
10596 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
10597 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
10598 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
10599 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
10600 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
10601 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
10602 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
10603 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
10604 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
10605 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
10606 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
10607 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
10608 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
10609 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
10610 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
10611 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
10612 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
10613 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
10614 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
10615 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
10616 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
10617 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
10618 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
10619 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
10620 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
10621 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
10622 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
10623 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
10624 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
10625 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
10626 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
10627 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
10628 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
10629 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
10630 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10631 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10632 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010633 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10634 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10635 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10636 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10637 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10638 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10639 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10640 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10641 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10642 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10643 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10644 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10645 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10646 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10647 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10648 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10649 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010650 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10651 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10652 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10653 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10654 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10655 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10656 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10657 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10658 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10659 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10660 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10661 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10662 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10663 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10664 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10665 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10666 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10667 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10668 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10669 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10670 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10671 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10672 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10673 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10674 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10675 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10676 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10677 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10678 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10679 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10680 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10681 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10682 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10683 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10684 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10685 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10686 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10687 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10688 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10689 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10690 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10691 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10692 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10693 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10694 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10695 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010696 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010697 .np = 3,
10698 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010699 },
10700};
10701
10702static struct cipher_testvec tnepres_dec_tv_template[] = {
10703 {
10704 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
10705 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
10706 .ilen = 16,
10707 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10708 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10709 .rlen = 16,
10710 }, {
10711 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10712 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10713 .klen = 16,
10714 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
10715 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
10716 .ilen = 16,
10717 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10718 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10719 .rlen = 16,
10720 }, {
10721 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10722 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10723 "\x10\x11\x12\x13\x14\x15\x16\x17"
10724 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10725 .klen = 32,
10726 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
10727 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
10728 .ilen = 16,
10729 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10730 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10731 .rlen = 16,
10732 }, { /* KeySize=128, I=121 */
10733 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10734 .klen = 16,
10735 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
10736 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
10737 .ilen = 16,
10738 .result = zeroed_string,
10739 .rlen = 16,
10740 },
10741};
10742
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010743static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
10744 { /* Generated with Crypto++ */
10745 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10746 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10747 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10748 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10749 .klen = 32,
10750 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10751 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10752 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10753 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10754 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10755 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10756 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10757 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10758 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10759 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10760 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10761 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10762 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10763 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10764 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10765 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10766 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10767 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10768 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010769 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10770 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10771 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10772 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10773 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10774 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10775 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10776 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10777 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10778 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10779 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10780 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10781 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10782 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10783 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10784 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10785 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10786 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10787 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10788 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10789 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10790 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10791 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10792 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10793 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10794 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10795 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10796 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10797 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10798 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10799 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10800 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10801 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10802 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10803 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10804 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10805 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10806 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10807 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10808 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10809 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10810 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10811 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10812 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10813 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10814 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010815 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10816 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10817 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10818 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10819 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10820 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10821 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10822 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10823 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10824 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10825 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10826 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10827 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10828 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10829 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10830 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10831 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010832 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10833 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10834 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10835 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10836 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10837 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10838 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10839 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10840 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10841 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10842 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10843 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10844 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10845 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10846 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10847 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10848 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10849 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10850 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10851 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10852 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10853 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10854 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10855 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10856 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10857 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10858 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10859 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10860 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10861 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10862 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10863 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10864 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10865 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10866 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10867 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10868 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10869 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10870 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10871 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10872 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10873 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10874 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10875 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10876 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10877 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010878 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010879 .np = 3,
10880 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010881 },
10882};
10883
10884static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
10885 { /* Generated with Crypto++ */
10886 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10887 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10888 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10889 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10890 .klen = 32,
10891 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10892 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10893 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10894 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10895 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10896 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10897 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10898 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10899 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10900 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10901 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10902 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10903 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10904 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10905 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10906 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10907 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10908 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10909 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010910 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10911 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10912 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10913 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10914 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10915 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10916 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10917 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10918 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10919 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10920 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10921 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10922 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10923 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10924 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10925 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10926 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10927 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10928 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10929 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10930 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10931 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10932 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10933 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10934 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10935 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10936 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10937 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10938 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10939 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10940 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10941 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10942 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10943 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10944 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10945 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10946 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10947 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10948 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10949 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10950 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10951 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10952 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10953 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10954 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10955 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010956 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10957 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10958 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10959 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10960 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10961 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10962 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10963 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10964 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10965 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10966 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10967 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10968 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10969 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10970 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10971 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10972 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010973 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10974 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10975 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10976 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10977 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10978 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10979 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10980 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10981 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10982 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10983 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10984 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10985 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10986 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10987 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10988 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10989 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10990 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10991 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10992 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10993 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10994 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10995 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10996 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10997 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10998 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10999 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11000 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11001 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11002 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11003 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11004 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11005 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11006 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11007 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11008 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11009 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11010 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11011 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11012 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11013 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11014 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11015 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11016 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11017 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11018 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011019 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011020 .np = 3,
11021 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011022 },
11023};
11024
11025static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
11026 { /* Generated with Crypto++ */
11027 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11028 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11029 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11030 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11031 .klen = 32,
11032 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11033 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11034 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11035 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11036 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11037 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11038 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11039 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11040 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11041 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11042 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11043 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11044 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11045 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11046 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11047 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11048 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11049 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11050 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011051 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11052 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11053 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11054 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11055 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11056 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11057 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11058 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11059 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11060 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11061 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11062 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11063 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11064 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11065 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11066 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11067 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11068 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11069 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11070 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11071 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11072 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11073 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11074 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11075 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11076 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11077 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11078 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11079 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11080 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11081 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11082 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11083 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11084 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11085 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11086 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11087 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11088 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11089 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11090 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11091 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11092 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11093 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11094 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11095 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11096 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011097 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
11098 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
11099 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
11100 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
11101 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
11102 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
11103 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
11104 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
11105 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
11106 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
11107 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
11108 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
11109 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
11110 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
11111 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
11112 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
11113 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011114 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
11115 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11116 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11117 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11118 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11119 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11120 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11121 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11122 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11123 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11124 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11125 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11126 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11127 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11128 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11129 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11130 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11131 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11132 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11133 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11134 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11135 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11136 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11137 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11138 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11139 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11140 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11141 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11142 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11143 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11144 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11145 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11146 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11147 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11148 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11149 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11150 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11151 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11152 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11153 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11154 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11155 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11156 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11157 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11158 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
11159 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011160 }, { /* Generated with Crypto++ */
11161 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11162 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11163 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11164 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11165 .klen = 32,
11166 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11167 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11168 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11169 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11170 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11171 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11172 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11173 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11174 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11175 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11176 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11177 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11178 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11179 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11180 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11181 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11182 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11183 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11184 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11185 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011186 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11187 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11188 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11189 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11190 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11191 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11192 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11193 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11194 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11195 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11196 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11197 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11198 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11199 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11200 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11201 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11202 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11203 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11204 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11205 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11206 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11207 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11208 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11209 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11210 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11211 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11212 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11213 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11214 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11215 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11216 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11217 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11218 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11219 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11220 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11221 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11222 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11223 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11224 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11225 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11226 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11227 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11228 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11229 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
11230 "\x2B\xC2\x59",
11231 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011232 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
11233 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
11234 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
11235 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
11236 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
11237 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
11238 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
11239 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
11240 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
11241 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
11242 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
11243 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
11244 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
11245 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
11246 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
11247 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
11248 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
11249 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011250 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11251 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11252 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11253 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11254 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11255 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11256 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11257 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11258 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11259 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11260 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11261 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11262 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11263 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11264 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11265 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11266 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11267 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11268 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11269 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11270 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11271 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11272 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11273 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11274 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11275 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11276 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11277 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11278 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11279 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11280 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11281 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11282 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11283 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11284 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11285 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11286 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11287 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11288 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11289 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11290 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11291 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11292 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11293 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
11294 "\x38\xE2\xE5",
11295 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011296 .also_non_np = 1,
11297 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011298 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030011299 }, { /* Generated with Crypto++ */
11300 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11301 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11302 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11303 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11304 .klen = 32,
11305 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
11306 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
11307 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11308 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11309 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11310 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11311 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11312 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11313 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11314 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11315 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11316 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11317 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11318 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11319 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11320 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11321 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11322 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11323 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11324 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11325 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11326 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11327 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11328 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11329 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11330 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11331 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11332 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11333 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11334 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11335 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11336 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11337 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11338 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11339 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11340 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11341 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11342 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11343 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11344 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11345 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11346 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11347 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11348 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11349 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11350 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11351 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11352 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11353 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11354 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11355 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11356 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11357 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11358 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11359 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11360 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11361 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11362 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11363 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11364 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11365 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11366 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11367 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11368 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11369 .ilen = 496,
11370 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
11371 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
11372 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
11373 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
11374 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
11375 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
11376 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
11377 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
11378 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
11379 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
11380 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
11381 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
11382 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
11383 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
11384 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
11385 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
11386 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
11387 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
11388 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
11389 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
11390 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
11391 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
11392 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
11393 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
11394 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
11395 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
11396 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
11397 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
11398 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
11399 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
11400 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
11401 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
11402 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
11403 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
11404 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
11405 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
11406 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
11407 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
11408 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
11409 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
11410 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
11411 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
11412 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
11413 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
11414 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
11415 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
11416 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
11417 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
11418 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
11419 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
11420 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
11421 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
11422 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
11423 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
11424 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
11425 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
11426 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
11427 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
11428 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
11429 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
11430 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
11431 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
11432 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011433 },
11434};
11435
11436static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
11437 { /* Generated with Crypto++ */
11438 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11439 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11440 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11441 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11442 .klen = 32,
11443 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11444 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11445 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
11446 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
11447 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
11448 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
11449 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
11450 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
11451 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
11452 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
11453 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
11454 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
11455 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
11456 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
11457 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
11458 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
11459 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
11460 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
11461 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011462 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
11463 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11464 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11465 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11466 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11467 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11468 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11469 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11470 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11471 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11472 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11473 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11474 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11475 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11476 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11477 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11478 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11479 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11480 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11481 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11482 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11483 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11484 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11485 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11486 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11487 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11488 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11489 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11490 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11491 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11492 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11493 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11494 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11495 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11496 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11497 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11498 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11499 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11500 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11501 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11502 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11503 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11504 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11505 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11506 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
11507 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011508 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11509 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11510 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11511 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11512 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11513 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11514 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11515 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11516 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11517 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11518 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11519 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11520 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11521 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11522 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11523 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11524 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011525 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11526 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11527 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11528 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11529 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11530 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11531 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11532 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11533 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11534 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11535 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11536 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11537 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11538 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11539 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11540 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11541 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11542 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11543 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11544 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11545 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11546 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11547 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11548 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11549 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11550 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11551 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11552 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11553 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11554 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11555 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11556 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11557 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11558 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11559 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11560 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11561 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11562 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11563 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11564 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11565 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11566 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11567 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11568 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11569 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11570 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011571 }, { /* Generated with Crypto++ */
11572 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11573 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11574 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11575 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11576 .klen = 32,
11577 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11578 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11579 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
11580 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
11581 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
11582 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
11583 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
11584 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
11585 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
11586 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
11587 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
11588 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
11589 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
11590 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
11591 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
11592 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
11593 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
11594 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
11595 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
11596 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011597 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11598 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11599 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11600 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11601 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11602 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11603 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11604 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11605 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11606 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11607 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11608 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11609 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11610 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11611 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11612 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11613 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11614 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11615 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11616 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11617 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11618 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11619 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11620 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11621 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11622 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11623 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11624 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11625 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11626 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11627 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11628 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11629 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11630 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11631 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11632 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11633 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11634 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11635 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11636 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11637 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11638 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11639 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11640 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
11641 "\x38\xE2\xE5",
11642 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011643 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11644 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11645 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11646 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11647 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11648 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11649 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11650 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11651 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11652 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11653 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11654 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11655 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11656 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11657 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11658 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11659 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11660 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011661 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11662 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11663 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11664 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11665 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11666 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11667 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11668 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11669 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11670 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11671 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11672 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11673 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11674 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11675 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11676 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11677 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11678 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11679 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11680 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11681 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11682 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11683 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11684 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11685 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11686 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11687 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11688 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11689 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11690 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11691 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11692 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11693 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11694 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11695 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11696 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11697 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11698 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11699 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11700 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11701 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11702 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11703 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11704 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
11705 "\x2B\xC2\x59",
11706 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011707 .also_non_np = 1,
11708 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011709 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030011710 }, { /* Generated with Crypto++ */
11711 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11712 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11713 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11714 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11715 .klen = 32,
11716 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
11717 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
11718 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
11719 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
11720 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
11721 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
11722 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
11723 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
11724 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
11725 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
11726 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
11727 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
11728 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
11729 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
11730 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
11731 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
11732 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
11733 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
11734 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
11735 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
11736 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
11737 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
11738 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
11739 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
11740 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
11741 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
11742 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
11743 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
11744 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
11745 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
11746 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
11747 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
11748 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
11749 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
11750 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
11751 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
11752 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
11753 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
11754 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
11755 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
11756 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
11757 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
11758 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
11759 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
11760 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
11761 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
11762 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
11763 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
11764 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
11765 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
11766 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
11767 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
11768 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
11769 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
11770 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
11771 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
11772 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
11773 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
11774 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
11775 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
11776 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
11777 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
11778 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
11779 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
11780 .ilen = 496,
11781 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11782 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11783 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11784 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11785 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11786 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11787 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11788 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11789 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11790 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11791 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11792 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11793 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11794 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11795 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11796 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11797 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11798 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11799 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11800 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11801 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11802 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11803 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11804 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11805 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11806 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11807 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11808 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11809 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11810 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11811 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11812 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11813 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11814 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11815 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11816 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11817 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11818 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11819 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11820 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11821 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11822 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11823 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11824 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11825 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11826 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11827 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11828 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11829 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11830 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11831 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11832 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11833 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11834 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11835 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11836 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11837 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11838 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11839 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11840 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11841 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11842 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11843 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011844 },
11845};
Herbert Xuda7f0332008-07-31 17:08:25 +080011846
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011847static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
11848 /* Generated from AES-LRW test vectors */
11849 {
11850 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11851 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11852 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11853 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11854 .klen = 32,
11855 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11856 "\x00\x00\x00\x00\x00\x00\x00\x01",
11857 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11858 "\x38\x39\x41\x42\x43\x44\x45\x46",
11859 .ilen = 16,
11860 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11861 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11862 .rlen = 16,
11863 }, {
11864 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11865 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11866 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11867 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11868 .klen = 32,
11869 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11870 "\x00\x00\x00\x00\x00\x00\x00\x02",
11871 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11872 "\x38\x39\x41\x42\x43\x44\x45\x46",
11873 .ilen = 16,
11874 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11875 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11876 .rlen = 16,
11877 }, {
11878 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11879 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11880 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11881 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11882 .klen = 32,
11883 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11884 "\x00\x00\x00\x02\x00\x00\x00\x00",
11885 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11886 "\x38\x39\x41\x42\x43\x44\x45\x46",
11887 .ilen = 16,
11888 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11889 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11890 .rlen = 16,
11891 }, {
11892 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11893 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11894 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11895 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11896 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11897 .klen = 40,
11898 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11899 "\x00\x00\x00\x00\x00\x00\x00\x01",
11900 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11901 "\x38\x39\x41\x42\x43\x44\x45\x46",
11902 .ilen = 16,
11903 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11904 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11905 .rlen = 16,
11906 }, {
11907 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11908 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11909 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11910 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11911 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11912 .klen = 40,
11913 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11914 "\x00\x00\x00\x02\x00\x00\x00\x00",
11915 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11916 "\x38\x39\x41\x42\x43\x44\x45\x46",
11917 .ilen = 16,
11918 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11919 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11920 .rlen = 16,
11921 }, {
11922 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11923 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11924 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11925 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11926 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11927 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11928 .klen = 48,
11929 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11930 "\x00\x00\x00\x00\x00\x00\x00\x01",
11931 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11932 "\x38\x39\x41\x42\x43\x44\x45\x46",
11933 .ilen = 16,
11934 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11935 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11936 .rlen = 16,
11937 }, {
11938 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11939 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11940 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11941 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11942 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11943 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11944 .klen = 48,
11945 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11946 "\x00\x00\x00\x02\x00\x00\x00\x00",
11947 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11948 "\x38\x39\x41\x42\x43\x44\x45\x46",
11949 .ilen = 16,
11950 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11951 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11952 .rlen = 16,
11953 }, {
11954 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11955 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11956 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11957 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11958 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11959 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11960 .klen = 48,
11961 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11962 "\x00\x00\x00\x00\x00\x00\x00\x01",
11963 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11964 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11965 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11966 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11967 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11968 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11969 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11970 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11971 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11972 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11973 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11974 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11975 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11976 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11977 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11978 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11979 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11980 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11981 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11982 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11983 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11984 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11985 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11986 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11987 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11988 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11989 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11990 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11991 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11992 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11993 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11994 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11995 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11996 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11997 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11998 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11999 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
12000 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
12001 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
12002 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
12003 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
12004 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
12005 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
12006 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
12007 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
12008 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
12009 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
12010 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
12011 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
12012 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
12013 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
12014 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
12015 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
12016 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
12017 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
12018 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
12019 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
12020 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
12021 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
12022 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
12023 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
12024 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
12025 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
12026 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
12027 .ilen = 512,
12028 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
12029 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
12030 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
12031 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
12032 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
12033 "\xce\xab\xda\x33\x30\x20\x12\xfa"
12034 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
12035 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
12036 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
12037 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
12038 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
12039 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
12040 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
12041 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
12042 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
12043 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
12044 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
12045 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
12046 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
12047 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
12048 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
12049 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
12050 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
12051 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
12052 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
12053 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
12054 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
12055 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
12056 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
12057 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
12058 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
12059 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
12060 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
12061 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
12062 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
12063 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
12064 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
12065 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
12066 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
12067 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
12068 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
12069 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
12070 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
12071 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
12072 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
12073 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
12074 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
12075 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
12076 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
12077 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
12078 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
12079 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
12080 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
12081 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
12082 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
12083 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
12084 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
12085 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
12086 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
12087 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
12088 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
12089 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
12090 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
12091 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
12092 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012093 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012094 .np = 3,
12095 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030012096 },
12097};
12098
12099static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
12100 /* Generated from AES-LRW test vectors */
12101 /* same as enc vectors with input and result reversed */
12102 {
12103 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
12104 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
12105 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
12106 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
12107 .klen = 32,
12108 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12109 "\x00\x00\x00\x00\x00\x00\x00\x01",
12110 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
12111 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
12112 .ilen = 16,
12113 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
12114 "\x38\x39\x41\x42\x43\x44\x45\x46",
12115 .rlen = 16,
12116 }, {
12117 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
12118 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
12119 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
12120 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
12121 .klen = 32,
12122 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12123 "\x00\x00\x00\x00\x00\x00\x00\x02",
12124 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
12125 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
12126 .ilen = 16,
12127 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
12128 "\x38\x39\x41\x42\x43\x44\x45\x46",
12129 .rlen = 16,
12130 }, {
12131 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
12132 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
12133 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
12134 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
12135 .klen = 32,
12136 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12137 "\x00\x00\x00\x02\x00\x00\x00\x00",
12138 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
12139 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
12140 .ilen = 16,
12141 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
12142 "\x38\x39\x41\x42\x43\x44\x45\x46",
12143 .rlen = 16,
12144 }, {
12145 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
12146 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
12147 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
12148 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
12149 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
12150 .klen = 40,
12151 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12152 "\x00\x00\x00\x00\x00\x00\x00\x01",
12153 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
12154 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
12155 .ilen = 16,
12156 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
12157 "\x38\x39\x41\x42\x43\x44\x45\x46",
12158 .rlen = 16,
12159 }, {
12160 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
12161 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
12162 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
12163 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
12164 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
12165 .klen = 40,
12166 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12167 "\x00\x00\x00\x02\x00\x00\x00\x00",
12168 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
12169 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
12170 .ilen = 16,
12171 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
12172 "\x38\x39\x41\x42\x43\x44\x45\x46",
12173 .rlen = 16,
12174 }, {
12175 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
12176 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
12177 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
12178 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
12179 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
12180 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
12181 .klen = 48,
12182 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12183 "\x00\x00\x00\x00\x00\x00\x00\x01",
12184 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
12185 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
12186 .ilen = 16,
12187 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
12188 "\x38\x39\x41\x42\x43\x44\x45\x46",
12189 .rlen = 16,
12190 }, {
12191 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
12192 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
12193 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
12194 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
12195 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
12196 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
12197 .klen = 48,
12198 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12199 "\x00\x00\x00\x02\x00\x00\x00\x00",
12200 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
12201 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
12202 .ilen = 16,
12203 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
12204 "\x38\x39\x41\x42\x43\x44\x45\x46",
12205 .rlen = 16,
12206 }, {
12207 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
12208 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
12209 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
12210 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
12211 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
12212 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
12213 .klen = 48,
12214 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12215 "\x00\x00\x00\x00\x00\x00\x00\x01",
12216 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
12217 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
12218 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
12219 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
12220 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
12221 "\xce\xab\xda\x33\x30\x20\x12\xfa"
12222 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
12223 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
12224 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
12225 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
12226 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
12227 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
12228 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
12229 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
12230 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
12231 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
12232 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
12233 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
12234 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
12235 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
12236 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
12237 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
12238 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
12239 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
12240 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
12241 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
12242 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
12243 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
12244 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
12245 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
12246 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
12247 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
12248 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
12249 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
12250 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
12251 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
12252 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
12253 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
12254 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
12255 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
12256 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
12257 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
12258 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
12259 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
12260 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
12261 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
12262 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
12263 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
12264 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
12265 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
12266 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
12267 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
12268 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
12269 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
12270 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
12271 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
12272 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
12273 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
12274 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
12275 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
12276 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
12277 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
12278 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
12279 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
12280 .ilen = 512,
12281 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
12282 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
12283 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
12284 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
12285 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
12286 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
12287 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
12288 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
12289 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
12290 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
12291 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
12292 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
12293 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
12294 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
12295 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
12296 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
12297 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
12298 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
12299 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
12300 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
12301 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
12302 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
12303 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
12304 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
12305 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
12306 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
12307 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
12308 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
12309 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
12310 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
12311 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
12312 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
12313 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
12314 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
12315 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
12316 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
12317 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
12318 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
12319 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
12320 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
12321 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
12322 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
12323 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
12324 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
12325 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
12326 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
12327 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
12328 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
12329 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
12330 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
12331 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
12332 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
12333 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
12334 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
12335 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
12336 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
12337 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
12338 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
12339 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
12340 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
12341 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
12342 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
12343 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
12344 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
12345 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012346 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012347 .np = 3,
12348 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030012349 },
12350};
12351
Jussi Kivilinna18be20b92011-10-18 13:33:17 +030012352static struct cipher_testvec serpent_xts_enc_tv_template[] = {
12353 /* Generated from AES-XTS test vectors */
12354 {
12355 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
12356 "\x00\x00\x00\x00\x00\x00\x00\x00"
12357 "\x00\x00\x00\x00\x00\x00\x00\x00"
12358 "\x00\x00\x00\x00\x00\x00\x00\x00",
12359 .klen = 32,
12360 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12361 "\x00\x00\x00\x00\x00\x00\x00\x00",
12362 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
12363 "\x00\x00\x00\x00\x00\x00\x00\x00"
12364 "\x00\x00\x00\x00\x00\x00\x00\x00"
12365 "\x00\x00\x00\x00\x00\x00\x00\x00",
12366 .ilen = 32,
12367 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
12368 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
12369 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
12370 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
12371 .rlen = 32,
12372 }, {
12373 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
12374 "\x11\x11\x11\x11\x11\x11\x11\x11"
12375 "\x22\x22\x22\x22\x22\x22\x22\x22"
12376 "\x22\x22\x22\x22\x22\x22\x22\x22",
12377 .klen = 32,
12378 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12379 "\x00\x00\x00\x00\x00\x00\x00\x00",
12380 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
12381 "\x44\x44\x44\x44\x44\x44\x44\x44"
12382 "\x44\x44\x44\x44\x44\x44\x44\x44"
12383 "\x44\x44\x44\x44\x44\x44\x44\x44",
12384 .ilen = 32,
12385 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
12386 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
12387 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
12388 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
12389 .rlen = 32,
12390 }, {
12391 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12392 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12393 "\x22\x22\x22\x22\x22\x22\x22\x22"
12394 "\x22\x22\x22\x22\x22\x22\x22\x22",
12395 .klen = 32,
12396 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12397 "\x00\x00\x00\x00\x00\x00\x00\x00",
12398 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
12399 "\x44\x44\x44\x44\x44\x44\x44\x44"
12400 "\x44\x44\x44\x44\x44\x44\x44\x44"
12401 "\x44\x44\x44\x44\x44\x44\x44\x44",
12402 .ilen = 32,
12403 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
12404 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
12405 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
12406 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
12407 .rlen = 32,
12408 }, {
12409 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12410 "\x23\x53\x60\x28\x74\x71\x35\x26"
12411 "\x31\x41\x59\x26\x53\x58\x97\x93"
12412 "\x23\x84\x62\x64\x33\x83\x27\x95",
12413 .klen = 32,
12414 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12415 "\x00\x00\x00\x00\x00\x00\x00\x00",
12416 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12417 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12418 "\x10\x11\x12\x13\x14\x15\x16\x17"
12419 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12420 "\x20\x21\x22\x23\x24\x25\x26\x27"
12421 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12422 "\x30\x31\x32\x33\x34\x35\x36\x37"
12423 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12424 "\x40\x41\x42\x43\x44\x45\x46\x47"
12425 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12426 "\x50\x51\x52\x53\x54\x55\x56\x57"
12427 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12428 "\x60\x61\x62\x63\x64\x65\x66\x67"
12429 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12430 "\x70\x71\x72\x73\x74\x75\x76\x77"
12431 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12432 "\x80\x81\x82\x83\x84\x85\x86\x87"
12433 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12434 "\x90\x91\x92\x93\x94\x95\x96\x97"
12435 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12436 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12437 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12438 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12439 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12440 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12441 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12442 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12443 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12444 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12445 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12446 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12447 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12448 "\x00\x01\x02\x03\x04\x05\x06\x07"
12449 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12450 "\x10\x11\x12\x13\x14\x15\x16\x17"
12451 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12452 "\x20\x21\x22\x23\x24\x25\x26\x27"
12453 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12454 "\x30\x31\x32\x33\x34\x35\x36\x37"
12455 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12456 "\x40\x41\x42\x43\x44\x45\x46\x47"
12457 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12458 "\x50\x51\x52\x53\x54\x55\x56\x57"
12459 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12460 "\x60\x61\x62\x63\x64\x65\x66\x67"
12461 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12462 "\x70\x71\x72\x73\x74\x75\x76\x77"
12463 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12464 "\x80\x81\x82\x83\x84\x85\x86\x87"
12465 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12466 "\x90\x91\x92\x93\x94\x95\x96\x97"
12467 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12468 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12469 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12470 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12471 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12472 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12473 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12474 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12475 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12476 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12477 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12478 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12479 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12480 .ilen = 512,
12481 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12482 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12483 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12484 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12485 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12486 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12487 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12488 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12489 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12490 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12491 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12492 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12493 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12494 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12495 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12496 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12497 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12498 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12499 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12500 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12501 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12502 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12503 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12504 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12505 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12506 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12507 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12508 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12509 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12510 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12511 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12512 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12513 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12514 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12515 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12516 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12517 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12518 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12519 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12520 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12521 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12522 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12523 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12524 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12525 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12526 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12527 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12528 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12529 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12530 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12531 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12532 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12533 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12534 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12535 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12536 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12537 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12538 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12539 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12540 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12541 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12542 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12543 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12544 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12545 .rlen = 512,
12546 }, {
12547 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12548 "\x23\x53\x60\x28\x74\x71\x35\x26"
12549 "\x62\x49\x77\x57\x24\x70\x93\x69"
12550 "\x99\x59\x57\x49\x66\x96\x76\x27"
12551 "\x31\x41\x59\x26\x53\x58\x97\x93"
12552 "\x23\x84\x62\x64\x33\x83\x27\x95"
12553 "\x02\x88\x41\x97\x16\x93\x99\x37"
12554 "\x51\x05\x82\x09\x74\x94\x45\x92",
12555 .klen = 64,
12556 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12557 "\x00\x00\x00\x00\x00\x00\x00\x00",
12558 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12559 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12560 "\x10\x11\x12\x13\x14\x15\x16\x17"
12561 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12562 "\x20\x21\x22\x23\x24\x25\x26\x27"
12563 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12564 "\x30\x31\x32\x33\x34\x35\x36\x37"
12565 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12566 "\x40\x41\x42\x43\x44\x45\x46\x47"
12567 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12568 "\x50\x51\x52\x53\x54\x55\x56\x57"
12569 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12570 "\x60\x61\x62\x63\x64\x65\x66\x67"
12571 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12572 "\x70\x71\x72\x73\x74\x75\x76\x77"
12573 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12574 "\x80\x81\x82\x83\x84\x85\x86\x87"
12575 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12576 "\x90\x91\x92\x93\x94\x95\x96\x97"
12577 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12578 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12579 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12580 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12581 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12582 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12583 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12584 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12585 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12586 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12587 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12588 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12589 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12590 "\x00\x01\x02\x03\x04\x05\x06\x07"
12591 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12592 "\x10\x11\x12\x13\x14\x15\x16\x17"
12593 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12594 "\x20\x21\x22\x23\x24\x25\x26\x27"
12595 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12596 "\x30\x31\x32\x33\x34\x35\x36\x37"
12597 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12598 "\x40\x41\x42\x43\x44\x45\x46\x47"
12599 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12600 "\x50\x51\x52\x53\x54\x55\x56\x57"
12601 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12602 "\x60\x61\x62\x63\x64\x65\x66\x67"
12603 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12604 "\x70\x71\x72\x73\x74\x75\x76\x77"
12605 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12606 "\x80\x81\x82\x83\x84\x85\x86\x87"
12607 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12608 "\x90\x91\x92\x93\x94\x95\x96\x97"
12609 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12610 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12611 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12612 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12613 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12614 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12615 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12616 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12617 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12618 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12619 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12620 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12621 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12622 .ilen = 512,
12623 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12624 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12625 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12626 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12627 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12628 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12629 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12630 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12631 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12632 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12633 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12634 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12635 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12636 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12637 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12638 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12639 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12640 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12641 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12642 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12643 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12644 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12645 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12646 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12647 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12648 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12649 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12650 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12651 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12652 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12653 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12654 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12655 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12656 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12657 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12658 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12659 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12660 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12661 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12662 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12663 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12664 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12665 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12666 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12667 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12668 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12669 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12670 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12671 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12672 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12673 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12674 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12675 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12676 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12677 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12678 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12679 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12680 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12681 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12682 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12683 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12684 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12685 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12686 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12687 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012688 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012689 .np = 3,
12690 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b92011-10-18 13:33:17 +030012691 },
12692};
12693
12694static struct cipher_testvec serpent_xts_dec_tv_template[] = {
12695 /* Generated from AES-XTS test vectors */
12696 /* same as enc vectors with input and result reversed */
12697 {
12698 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
12699 "\x00\x00\x00\x00\x00\x00\x00\x00"
12700 "\x00\x00\x00\x00\x00\x00\x00\x00"
12701 "\x00\x00\x00\x00\x00\x00\x00\x00",
12702 .klen = 32,
12703 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12704 "\x00\x00\x00\x00\x00\x00\x00\x00",
12705 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
12706 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
12707 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
12708 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
12709 .ilen = 32,
12710 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
12711 "\x00\x00\x00\x00\x00\x00\x00\x00"
12712 "\x00\x00\x00\x00\x00\x00\x00\x00"
12713 "\x00\x00\x00\x00\x00\x00\x00\x00",
12714 .rlen = 32,
12715 }, {
12716 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
12717 "\x11\x11\x11\x11\x11\x11\x11\x11"
12718 "\x22\x22\x22\x22\x22\x22\x22\x22"
12719 "\x22\x22\x22\x22\x22\x22\x22\x22",
12720 .klen = 32,
12721 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12722 "\x00\x00\x00\x00\x00\x00\x00\x00",
12723 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
12724 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
12725 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
12726 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
12727 .ilen = 32,
12728 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12729 "\x44\x44\x44\x44\x44\x44\x44\x44"
12730 "\x44\x44\x44\x44\x44\x44\x44\x44"
12731 "\x44\x44\x44\x44\x44\x44\x44\x44",
12732 .rlen = 32,
12733 }, {
12734 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12735 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12736 "\x22\x22\x22\x22\x22\x22\x22\x22"
12737 "\x22\x22\x22\x22\x22\x22\x22\x22",
12738 .klen = 32,
12739 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12740 "\x00\x00\x00\x00\x00\x00\x00\x00",
12741 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
12742 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
12743 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
12744 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
12745 .ilen = 32,
12746 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12747 "\x44\x44\x44\x44\x44\x44\x44\x44"
12748 "\x44\x44\x44\x44\x44\x44\x44\x44"
12749 "\x44\x44\x44\x44\x44\x44\x44\x44",
12750 .rlen = 32,
12751 }, {
12752 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12753 "\x23\x53\x60\x28\x74\x71\x35\x26"
12754 "\x31\x41\x59\x26\x53\x58\x97\x93"
12755 "\x23\x84\x62\x64\x33\x83\x27\x95",
12756 .klen = 32,
12757 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12758 "\x00\x00\x00\x00\x00\x00\x00\x00",
12759 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12760 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12761 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12762 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12763 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12764 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12765 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12766 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12767 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12768 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12769 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12770 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12771 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12772 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12773 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12774 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12775 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12776 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12777 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12778 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12779 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12780 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12781 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12782 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12783 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12784 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12785 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12786 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12787 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12788 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12789 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12790 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12791 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12792 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12793 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12794 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12795 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12796 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12797 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12798 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12799 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12800 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12801 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12802 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12803 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12804 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12805 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12806 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12807 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12808 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12809 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12810 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12811 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12812 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12813 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12814 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12815 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12816 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12817 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12818 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12819 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12820 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12821 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12822 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12823 .ilen = 512,
12824 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12825 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12826 "\x10\x11\x12\x13\x14\x15\x16\x17"
12827 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12828 "\x20\x21\x22\x23\x24\x25\x26\x27"
12829 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12830 "\x30\x31\x32\x33\x34\x35\x36\x37"
12831 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12832 "\x40\x41\x42\x43\x44\x45\x46\x47"
12833 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12834 "\x50\x51\x52\x53\x54\x55\x56\x57"
12835 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12836 "\x60\x61\x62\x63\x64\x65\x66\x67"
12837 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12838 "\x70\x71\x72\x73\x74\x75\x76\x77"
12839 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12840 "\x80\x81\x82\x83\x84\x85\x86\x87"
12841 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12842 "\x90\x91\x92\x93\x94\x95\x96\x97"
12843 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12844 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12845 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12846 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12847 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12848 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12849 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12850 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12851 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12852 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12853 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12854 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12855 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12856 "\x00\x01\x02\x03\x04\x05\x06\x07"
12857 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12858 "\x10\x11\x12\x13\x14\x15\x16\x17"
12859 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12860 "\x20\x21\x22\x23\x24\x25\x26\x27"
12861 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12862 "\x30\x31\x32\x33\x34\x35\x36\x37"
12863 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12864 "\x40\x41\x42\x43\x44\x45\x46\x47"
12865 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12866 "\x50\x51\x52\x53\x54\x55\x56\x57"
12867 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12868 "\x60\x61\x62\x63\x64\x65\x66\x67"
12869 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12870 "\x70\x71\x72\x73\x74\x75\x76\x77"
12871 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12872 "\x80\x81\x82\x83\x84\x85\x86\x87"
12873 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12874 "\x90\x91\x92\x93\x94\x95\x96\x97"
12875 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12876 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12877 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12878 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12879 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12880 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12881 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12882 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12883 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12884 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12885 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12886 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12887 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12888 .rlen = 512,
12889 }, {
12890 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12891 "\x23\x53\x60\x28\x74\x71\x35\x26"
12892 "\x62\x49\x77\x57\x24\x70\x93\x69"
12893 "\x99\x59\x57\x49\x66\x96\x76\x27"
12894 "\x31\x41\x59\x26\x53\x58\x97\x93"
12895 "\x23\x84\x62\x64\x33\x83\x27\x95"
12896 "\x02\x88\x41\x97\x16\x93\x99\x37"
12897 "\x51\x05\x82\x09\x74\x94\x45\x92",
12898 .klen = 64,
12899 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12900 "\x00\x00\x00\x00\x00\x00\x00\x00",
12901 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12902 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12903 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12904 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12905 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12906 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12907 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12908 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12909 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12910 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12911 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12912 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12913 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12914 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12915 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12916 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12917 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12918 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12919 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12920 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12921 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12922 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12923 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12924 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12925 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12926 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12927 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12928 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12929 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12930 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12931 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12932 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12933 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12934 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12935 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12936 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12937 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12938 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12939 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12940 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12941 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12942 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12943 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12944 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12945 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12946 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12947 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12948 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12949 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12950 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12951 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12952 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12953 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12954 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12955 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12956 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12957 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12958 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12959 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12960 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12961 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12962 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12963 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12964 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12965 .ilen = 512,
12966 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12967 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12968 "\x10\x11\x12\x13\x14\x15\x16\x17"
12969 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12970 "\x20\x21\x22\x23\x24\x25\x26\x27"
12971 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12972 "\x30\x31\x32\x33\x34\x35\x36\x37"
12973 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12974 "\x40\x41\x42\x43\x44\x45\x46\x47"
12975 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12976 "\x50\x51\x52\x53\x54\x55\x56\x57"
12977 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12978 "\x60\x61\x62\x63\x64\x65\x66\x67"
12979 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12980 "\x70\x71\x72\x73\x74\x75\x76\x77"
12981 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12982 "\x80\x81\x82\x83\x84\x85\x86\x87"
12983 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12984 "\x90\x91\x92\x93\x94\x95\x96\x97"
12985 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12986 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12987 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12988 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12989 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12990 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12991 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12992 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12993 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12994 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12995 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12996 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12997 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12998 "\x00\x01\x02\x03\x04\x05\x06\x07"
12999 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13000 "\x10\x11\x12\x13\x14\x15\x16\x17"
13001 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13002 "\x20\x21\x22\x23\x24\x25\x26\x27"
13003 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13004 "\x30\x31\x32\x33\x34\x35\x36\x37"
13005 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13006 "\x40\x41\x42\x43\x44\x45\x46\x47"
13007 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13008 "\x50\x51\x52\x53\x54\x55\x56\x57"
13009 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13010 "\x60\x61\x62\x63\x64\x65\x66\x67"
13011 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13012 "\x70\x71\x72\x73\x74\x75\x76\x77"
13013 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13014 "\x80\x81\x82\x83\x84\x85\x86\x87"
13015 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13016 "\x90\x91\x92\x93\x94\x95\x96\x97"
13017 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13018 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13019 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13020 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13021 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13022 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13023 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13024 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13025 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13026 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13027 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13028 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13029 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
13030 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013031 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013032 .np = 3,
13033 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b92011-10-18 13:33:17 +030013034 },
13035};
13036
Herbert Xuda7f0332008-07-31 17:08:25 +080013037/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013038#define CAST6_ENC_TEST_VECTORS 4
13039#define CAST6_DEC_TEST_VECTORS 4
13040#define CAST6_CBC_ENC_TEST_VECTORS 1
13041#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013042#define CAST6_CTR_ENC_TEST_VECTORS 2
13043#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013044#define CAST6_LRW_ENC_TEST_VECTORS 1
13045#define CAST6_LRW_DEC_TEST_VECTORS 1
13046#define CAST6_XTS_ENC_TEST_VECTORS 1
13047#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +080013048
13049static struct cipher_testvec cast6_enc_tv_template[] = {
13050 {
13051 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
13052 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
13053 .klen = 16,
13054 .input = zeroed_string,
13055 .ilen = 16,
13056 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
13057 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
13058 .rlen = 16,
13059 }, {
13060 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
13061 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
13062 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
13063 .klen = 24,
13064 .input = zeroed_string,
13065 .ilen = 16,
13066 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
13067 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
13068 .rlen = 16,
13069 }, {
13070 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
13071 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
13072 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
13073 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
13074 .klen = 32,
13075 .input = zeroed_string,
13076 .ilen = 16,
13077 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
13078 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
13079 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013080 }, { /* Generated from TF test vectors */
13081 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13082 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13083 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13084 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13085 .klen = 32,
13086 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13087 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13088 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13089 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13090 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13091 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13092 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13093 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13094 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13095 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13096 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13097 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13098 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13099 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13100 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13101 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13102 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13103 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13104 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13105 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13106 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13107 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13108 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13109 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13110 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13111 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13112 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13113 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13114 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13115 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13116 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13117 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13118 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13119 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13120 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13121 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13122 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13123 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13124 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13125 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13126 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13127 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13128 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13129 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13130 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13131 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13132 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13133 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13134 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13135 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13136 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13137 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13138 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13139 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13140 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13141 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13142 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13143 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13144 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13145 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13146 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13147 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13148 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13149 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13150 .ilen = 496,
13151 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
13152 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
13153 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
13154 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
13155 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
13156 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
13157 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
13158 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
13159 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
13160 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
13161 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
13162 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
13163 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
13164 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
13165 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
13166 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
13167 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
13168 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
13169 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
13170 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
13171 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
13172 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
13173 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
13174 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
13175 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
13176 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
13177 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
13178 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
13179 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
13180 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
13181 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
13182 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
13183 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
13184 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
13185 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
13186 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
13187 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
13188 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
13189 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
13190 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
13191 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
13192 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
13193 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
13194 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
13195 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
13196 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
13197 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
13198 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
13199 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
13200 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
13201 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
13202 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
13203 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
13204 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
13205 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
13206 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
13207 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
13208 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
13209 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
13210 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
13211 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
13212 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
13213 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013214 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013215 .np = 3,
13216 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013217 },
13218};
13219
13220static struct cipher_testvec cast6_dec_tv_template[] = {
13221 {
13222 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
13223 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
13224 .klen = 16,
13225 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
13226 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
13227 .ilen = 16,
13228 .result = zeroed_string,
13229 .rlen = 16,
13230 }, {
13231 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
13232 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
13233 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
13234 .klen = 24,
13235 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
13236 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
13237 .ilen = 16,
13238 .result = zeroed_string,
13239 .rlen = 16,
13240 }, {
13241 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
13242 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
13243 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
13244 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
13245 .klen = 32,
13246 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
13247 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
13248 .ilen = 16,
13249 .result = zeroed_string,
13250 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013251 }, { /* Generated from TF test vectors */
13252 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13253 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13254 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13255 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13256 .klen = 32,
13257 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13258 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13259 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
13260 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
13261 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
13262 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
13263 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
13264 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
13265 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
13266 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
13267 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
13268 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
13269 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
13270 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
13271 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
13272 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
13273 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
13274 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
13275 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
13276 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
13277 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
13278 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
13279 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
13280 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
13281 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
13282 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
13283 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
13284 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
13285 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
13286 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
13287 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
13288 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
13289 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
13290 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
13291 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
13292 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
13293 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
13294 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
13295 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
13296 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
13297 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
13298 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
13299 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
13300 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
13301 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
13302 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
13303 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
13304 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
13305 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
13306 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
13307 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
13308 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
13309 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
13310 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
13311 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
13312 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
13313 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
13314 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
13315 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
13316 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
13317 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
13318 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
13319 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
13320 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
13321 .ilen = 496,
13322 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13323 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13324 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13325 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13326 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13327 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13328 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13329 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13330 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13331 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13332 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13333 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13334 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13335 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13336 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13337 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13338 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13339 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13340 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13341 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13342 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13343 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13344 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13345 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13346 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13347 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13348 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13349 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13350 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13351 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13352 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13353 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13354 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13355 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13356 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13357 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13358 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13359 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13360 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13361 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13362 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13363 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13364 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13365 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13366 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13367 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13368 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13369 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13370 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13371 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13372 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13373 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13374 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13375 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13376 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13377 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13378 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13379 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13380 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13381 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13382 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13383 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13384 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013385 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013386 .np = 3,
13387 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013388 },
13389};
13390
13391static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
13392 { /* Generated from TF test vectors */
13393 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13394 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13395 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13396 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13397 .klen = 32,
13398 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13399 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13400 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13401 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13402 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13403 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13404 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13405 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13406 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13407 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13408 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13409 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13410 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13411 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13412 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13413 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13414 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13415 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13416 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13417 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13418 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13419 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13420 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13421 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13422 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13423 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13424 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13425 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13426 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13427 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13428 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13429 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13430 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13431 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13432 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13433 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13434 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13435 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13436 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13437 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13438 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13439 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13440 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13441 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13442 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13443 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13444 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13445 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13446 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13447 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13448 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13449 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13450 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13451 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13452 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13453 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13454 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13455 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13456 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13457 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13458 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13459 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13460 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13461 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13462 .ilen = 496,
13463 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
13464 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
13465 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
13466 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
13467 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
13468 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
13469 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
13470 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
13471 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
13472 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
13473 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
13474 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
13475 "\x23\x16\x47\x72\x81\x13\x3A\x72"
13476 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
13477 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
13478 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
13479 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
13480 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
13481 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
13482 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
13483 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
13484 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
13485 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
13486 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
13487 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
13488 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
13489 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
13490 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
13491 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
13492 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
13493 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
13494 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
13495 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
13496 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
13497 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
13498 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
13499 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
13500 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
13501 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
13502 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
13503 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
13504 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
13505 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
13506 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
13507 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
13508 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
13509 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
13510 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
13511 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
13512 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
13513 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
13514 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
13515 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
13516 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
13517 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
13518 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
13519 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
13520 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
13521 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
13522 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
13523 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
13524 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
13525 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013526 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013527 .np = 3,
13528 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013529 },
13530};
13531
13532static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
13533 { /* Generated from TF test vectors */
13534 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13535 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13536 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13537 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13538 .klen = 32,
13539 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13540 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13541 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
13542 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
13543 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
13544 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
13545 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
13546 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
13547 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
13548 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
13549 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
13550 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
13551 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
13552 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
13553 "\x23\x16\x47\x72\x81\x13\x3A\x72"
13554 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
13555 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
13556 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
13557 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
13558 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
13559 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
13560 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
13561 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
13562 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
13563 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
13564 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
13565 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
13566 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
13567 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
13568 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
13569 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
13570 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
13571 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
13572 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
13573 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
13574 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
13575 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
13576 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
13577 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
13578 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
13579 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
13580 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
13581 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
13582 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
13583 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
13584 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
13585 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
13586 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
13587 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
13588 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
13589 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
13590 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
13591 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
13592 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
13593 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
13594 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
13595 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
13596 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
13597 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
13598 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
13599 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
13600 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
13601 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
13602 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
13603 .ilen = 496,
13604 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13605 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13606 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13607 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13608 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13609 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13610 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13611 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13612 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13613 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13614 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13615 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13616 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13617 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13618 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13619 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13620 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13621 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13622 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13623 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13624 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13625 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13626 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13627 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13628 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13629 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13630 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13631 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13632 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13633 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13634 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13635 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13636 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13637 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13638 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13639 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13640 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13641 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13642 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13643 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13644 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13645 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13646 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13647 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13648 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13649 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13650 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13651 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13652 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13653 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13654 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13655 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13656 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13657 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13658 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13659 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13660 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13661 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13662 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13663 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13664 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13665 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13666 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013667 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013668 .np = 3,
13669 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013670 },
13671};
13672
13673static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
13674 { /* Generated from TF test vectors */
13675 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13676 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13677 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13678 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13679 .klen = 32,
13680 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13681 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13682 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13683 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013684 "\x3A",
13685 .ilen = 17,
13686 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13687 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13688 "\x57",
13689 .rlen = 17,
13690 }, { /* Generated from TF test vectors */
13691 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13692 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13693 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13694 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13695 .klen = 32,
13696 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13697 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13698 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13699 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013700 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13701 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13702 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13703 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13704 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13705 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13706 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13707 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13708 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13709 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13710 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13711 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13712 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13713 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13714 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13715 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13716 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13717 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13718 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13719 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13720 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13721 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13722 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13723 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13724 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13725 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13726 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13727 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13728 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13729 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13730 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13731 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13732 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13733 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13734 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13735 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13736 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13737 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13738 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13739 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13740 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13741 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13742 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13743 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13744 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13745 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13746 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13747 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13748 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13749 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13750 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13751 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13752 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13753 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13754 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13755 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13756 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13757 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13758 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13759 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13760 .ilen = 496,
13761 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13762 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13763 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13764 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13765 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13766 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13767 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13768 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13769 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13770 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13771 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13772 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13773 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13774 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13775 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13776 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13777 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13778 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13779 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13780 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13781 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13782 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13783 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13784 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13785 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13786 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13787 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13788 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13789 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13790 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13791 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13792 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13793 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13794 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13795 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13796 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13797 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13798 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13799 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13800 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13801 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13802 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13803 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13804 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13805 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13806 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13807 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13808 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13809 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13810 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13811 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13812 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13813 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13814 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13815 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13816 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13817 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13818 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13819 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13820 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13821 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13822 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13823 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013824 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013825 .np = 3,
13826 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013827 },
13828};
13829
13830static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
13831 { /* Generated from TF test vectors */
13832 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13833 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13834 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13835 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13836 .klen = 32,
13837 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13838 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13839 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13840 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013841 "\x57",
13842 .ilen = 17,
13843 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13844 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13845 "\x3A",
13846 .rlen = 17,
13847 }, { /* Generated from TF test vectors */
13848 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13849 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13850 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13851 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13852 .klen = 32,
13853 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13854 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13855 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13856 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013857 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13858 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13859 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13860 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13861 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13862 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13863 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13864 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13865 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13866 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13867 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13868 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13869 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13870 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13871 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13872 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13873 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13874 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13875 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13876 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13877 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13878 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13879 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13880 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13881 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13882 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13883 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13884 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13885 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13886 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13887 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13888 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13889 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13890 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13891 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13892 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13893 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13894 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13895 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13896 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13897 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13898 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13899 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13900 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13901 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13902 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13903 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13904 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13905 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13906 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13907 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13908 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13909 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13910 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13911 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13912 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13913 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13914 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13915 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13916 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13917 .ilen = 496,
13918 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13919 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13920 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13921 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13922 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13923 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13924 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13925 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13926 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13927 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13928 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13929 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13930 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13931 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13932 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13933 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13934 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13935 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13936 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13937 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13938 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13939 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13940 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13941 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13942 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13943 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13944 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13945 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13946 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13947 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13948 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13949 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13950 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13951 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13952 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13953 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13954 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13955 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13956 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13957 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13958 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13959 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13960 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13961 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13962 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13963 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13964 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13965 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13966 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13967 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13968 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13969 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13970 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13971 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13972 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13973 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13974 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13975 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13976 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13977 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13978 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13979 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13980 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013981 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013982 .np = 3,
13983 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013984 },
13985};
13986
13987static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
13988 { /* Generated from TF test vectors */
13989 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13990 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13991 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13992 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13993 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13994 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13995 .klen = 48,
13996 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13997 "\x00\x00\x00\x00\x00\x00\x00\x01",
13998 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13999 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
14000 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
14001 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
14002 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
14003 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
14004 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
14005 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
14006 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
14007 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
14008 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
14009 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
14010 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
14011 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
14012 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
14013 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
14014 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
14015 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
14016 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
14017 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
14018 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
14019 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
14020 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
14021 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
14022 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
14023 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
14024 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
14025 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
14026 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
14027 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
14028 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
14029 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
14030 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
14031 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
14032 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
14033 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
14034 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
14035 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
14036 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
14037 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
14038 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
14039 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
14040 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
14041 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
14042 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
14043 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
14044 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
14045 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
14046 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
14047 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
14048 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
14049 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
14050 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
14051 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
14052 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
14053 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
14054 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
14055 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
14056 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
14057 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
14058 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
14059 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
14060 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
14061 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
14062 .ilen = 512,
14063 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
14064 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
14065 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
14066 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
14067 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
14068 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
14069 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
14070 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
14071 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
14072 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
14073 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
14074 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
14075 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
14076 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
14077 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
14078 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
14079 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
14080 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
14081 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
14082 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
14083 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
14084 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
14085 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
14086 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
14087 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
14088 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
14089 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
14090 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
14091 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
14092 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
14093 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
14094 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
14095 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
14096 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
14097 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
14098 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
14099 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
14100 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
14101 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
14102 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
14103 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
14104 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
14105 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
14106 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
14107 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
14108 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
14109 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
14110 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
14111 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
14112 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
14113 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
14114 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
14115 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
14116 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
14117 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
14118 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
14119 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
14120 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
14121 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
14122 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
14123 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
14124 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
14125 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
14126 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
14127 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014128 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014129 .np = 3,
14130 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020014131 },
14132};
14133
14134static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
14135 { /* Generated from TF test vectors */
14136 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
14137 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
14138 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
14139 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
14140 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
14141 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
14142 .klen = 48,
14143 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14144 "\x00\x00\x00\x00\x00\x00\x00\x01",
14145 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
14146 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
14147 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
14148 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
14149 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
14150 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
14151 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
14152 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
14153 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
14154 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
14155 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
14156 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
14157 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
14158 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
14159 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
14160 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
14161 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
14162 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
14163 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
14164 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
14165 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
14166 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
14167 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
14168 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
14169 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
14170 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
14171 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
14172 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
14173 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
14174 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
14175 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
14176 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
14177 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
14178 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
14179 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
14180 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
14181 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
14182 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
14183 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
14184 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
14185 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
14186 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
14187 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
14188 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
14189 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
14190 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
14191 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
14192 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
14193 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
14194 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
14195 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
14196 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
14197 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
14198 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
14199 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
14200 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
14201 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
14202 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
14203 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
14204 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
14205 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
14206 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
14207 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
14208 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
14209 .ilen = 512,
14210 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
14211 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
14212 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
14213 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
14214 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
14215 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
14216 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
14217 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
14218 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
14219 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
14220 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
14221 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
14222 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
14223 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
14224 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
14225 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
14226 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
14227 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
14228 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
14229 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
14230 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
14231 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
14232 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
14233 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
14234 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
14235 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
14236 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
14237 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
14238 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
14239 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
14240 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
14241 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
14242 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
14243 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
14244 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
14245 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
14246 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
14247 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
14248 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
14249 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
14250 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
14251 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
14252 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
14253 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
14254 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
14255 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
14256 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
14257 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
14258 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
14259 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
14260 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
14261 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
14262 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
14263 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
14264 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
14265 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
14266 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
14267 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
14268 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
14269 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
14270 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
14271 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
14272 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
14273 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
14274 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014275 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014276 .np = 3,
14277 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020014278 },
14279};
14280
14281static struct cipher_testvec cast6_xts_enc_tv_template[] = {
14282 { /* Generated from TF test vectors */
14283 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
14284 "\x23\x53\x60\x28\x74\x71\x35\x26"
14285 "\x62\x49\x77\x57\x24\x70\x93\x69"
14286 "\x99\x59\x57\x49\x66\x96\x76\x27"
14287 "\x31\x41\x59\x26\x53\x58\x97\x93"
14288 "\x23\x84\x62\x64\x33\x83\x27\x95"
14289 "\x02\x88\x41\x97\x16\x93\x99\x37"
14290 "\x51\x05\x82\x09\x74\x94\x45\x92",
14291 .klen = 64,
14292 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
14293 "\x00\x00\x00\x00\x00\x00\x00\x00",
14294 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14295 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14296 "\x10\x11\x12\x13\x14\x15\x16\x17"
14297 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14298 "\x20\x21\x22\x23\x24\x25\x26\x27"
14299 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14300 "\x30\x31\x32\x33\x34\x35\x36\x37"
14301 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14302 "\x40\x41\x42\x43\x44\x45\x46\x47"
14303 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14304 "\x50\x51\x52\x53\x54\x55\x56\x57"
14305 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14306 "\x60\x61\x62\x63\x64\x65\x66\x67"
14307 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14308 "\x70\x71\x72\x73\x74\x75\x76\x77"
14309 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14310 "\x80\x81\x82\x83\x84\x85\x86\x87"
14311 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14312 "\x90\x91\x92\x93\x94\x95\x96\x97"
14313 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14314 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14315 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14316 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14317 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14318 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14319 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14320 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14321 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14322 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14323 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14324 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14325 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
14326 "\x00\x01\x02\x03\x04\x05\x06\x07"
14327 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14328 "\x10\x11\x12\x13\x14\x15\x16\x17"
14329 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14330 "\x20\x21\x22\x23\x24\x25\x26\x27"
14331 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14332 "\x30\x31\x32\x33\x34\x35\x36\x37"
14333 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14334 "\x40\x41\x42\x43\x44\x45\x46\x47"
14335 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14336 "\x50\x51\x52\x53\x54\x55\x56\x57"
14337 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14338 "\x60\x61\x62\x63\x64\x65\x66\x67"
14339 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14340 "\x70\x71\x72\x73\x74\x75\x76\x77"
14341 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14342 "\x80\x81\x82\x83\x84\x85\x86\x87"
14343 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14344 "\x90\x91\x92\x93\x94\x95\x96\x97"
14345 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14346 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14347 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14348 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14349 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14350 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14351 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14352 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14353 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14354 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14355 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14356 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14357 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
14358 .ilen = 512,
14359 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
14360 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
14361 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
14362 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
14363 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
14364 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
14365 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
14366 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
14367 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
14368 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
14369 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
14370 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
14371 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
14372 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
14373 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
14374 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
14375 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
14376 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
14377 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
14378 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
14379 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
14380 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
14381 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
14382 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
14383 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
14384 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
14385 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
14386 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
14387 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
14388 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
14389 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
14390 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
14391 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
14392 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
14393 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
14394 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
14395 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
14396 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
14397 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
14398 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
14399 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
14400 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
14401 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
14402 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
14403 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
14404 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
14405 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
14406 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
14407 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
14408 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
14409 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
14410 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
14411 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
14412 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
14413 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
14414 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
14415 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
14416 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
14417 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
14418 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
14419 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
14420 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
14421 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
14422 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
14423 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014424 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014425 .np = 3,
14426 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020014427 },
14428};
14429
14430static struct cipher_testvec cast6_xts_dec_tv_template[] = {
14431 { /* Generated from TF test vectors */
14432 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
14433 "\x23\x53\x60\x28\x74\x71\x35\x26"
14434 "\x62\x49\x77\x57\x24\x70\x93\x69"
14435 "\x99\x59\x57\x49\x66\x96\x76\x27"
14436 "\x31\x41\x59\x26\x53\x58\x97\x93"
14437 "\x23\x84\x62\x64\x33\x83\x27\x95"
14438 "\x02\x88\x41\x97\x16\x93\x99\x37"
14439 "\x51\x05\x82\x09\x74\x94\x45\x92",
14440 .klen = 64,
14441 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
14442 "\x00\x00\x00\x00\x00\x00\x00\x00",
14443 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
14444 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
14445 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
14446 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
14447 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
14448 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
14449 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
14450 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
14451 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
14452 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
14453 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
14454 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
14455 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
14456 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
14457 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
14458 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
14459 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
14460 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
14461 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
14462 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
14463 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
14464 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
14465 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
14466 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
14467 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
14468 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
14469 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
14470 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
14471 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
14472 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
14473 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
14474 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
14475 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
14476 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
14477 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
14478 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
14479 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
14480 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
14481 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
14482 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
14483 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
14484 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
14485 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
14486 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
14487 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
14488 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
14489 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
14490 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
14491 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
14492 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
14493 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
14494 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
14495 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
14496 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
14497 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
14498 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
14499 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
14500 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
14501 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
14502 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
14503 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
14504 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
14505 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
14506 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
14507 .ilen = 512,
14508 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14509 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14510 "\x10\x11\x12\x13\x14\x15\x16\x17"
14511 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14512 "\x20\x21\x22\x23\x24\x25\x26\x27"
14513 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14514 "\x30\x31\x32\x33\x34\x35\x36\x37"
14515 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14516 "\x40\x41\x42\x43\x44\x45\x46\x47"
14517 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14518 "\x50\x51\x52\x53\x54\x55\x56\x57"
14519 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14520 "\x60\x61\x62\x63\x64\x65\x66\x67"
14521 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14522 "\x70\x71\x72\x73\x74\x75\x76\x77"
14523 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14524 "\x80\x81\x82\x83\x84\x85\x86\x87"
14525 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14526 "\x90\x91\x92\x93\x94\x95\x96\x97"
14527 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14528 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14529 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14530 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14531 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14532 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14533 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14534 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14535 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14536 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14537 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14538 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14539 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
14540 "\x00\x01\x02\x03\x04\x05\x06\x07"
14541 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14542 "\x10\x11\x12\x13\x14\x15\x16\x17"
14543 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14544 "\x20\x21\x22\x23\x24\x25\x26\x27"
14545 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14546 "\x30\x31\x32\x33\x34\x35\x36\x37"
14547 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14548 "\x40\x41\x42\x43\x44\x45\x46\x47"
14549 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14550 "\x50\x51\x52\x53\x54\x55\x56\x57"
14551 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14552 "\x60\x61\x62\x63\x64\x65\x66\x67"
14553 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14554 "\x70\x71\x72\x73\x74\x75\x76\x77"
14555 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14556 "\x80\x81\x82\x83\x84\x85\x86\x87"
14557 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14558 "\x90\x91\x92\x93\x94\x95\x96\x97"
14559 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14560 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14561 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14562 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14563 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14564 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14565 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14566 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14567 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14568 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14569 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14570 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14571 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
14572 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014573 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014574 .np = 3,
14575 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014576 },
14577};
14578
14579
14580/*
14581 * AES test vectors.
14582 */
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014583#define AES_ENC_TEST_VECTORS 4
14584#define AES_DEC_TEST_VECTORS 4
14585#define AES_CBC_ENC_TEST_VECTORS 5
14586#define AES_CBC_DEC_TEST_VECTORS 5
Horia Geantabca4feb2014-03-14 17:46:51 +020014587#define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
14588#define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
Nitesh Lal5208ed22014-05-21 17:09:08 +053014589#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2
14590#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2
14591#define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7
14592#define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7
14593#define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7
Herbert Xuda7f0332008-07-31 17:08:25 +080014594#define AES_LRW_ENC_TEST_VECTORS 8
14595#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +100014596#define AES_XTS_ENC_TEST_VECTORS 5
14597#define AES_XTS_DEC_TEST_VECTORS 5
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014598#define AES_CTR_ENC_TEST_VECTORS 5
14599#define AES_CTR_DEC_TEST_VECTORS 5
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100014600#define AES_OFB_ENC_TEST_VECTORS 1
14601#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080014602#define AES_CTR_3686_ENC_TEST_VECTORS 7
14603#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +080014604#define AES_GCM_ENC_TEST_VECTORS 9
14605#define AES_GCM_DEC_TEST_VECTORS 8
Herbert Xu8f69b762015-06-16 13:54:26 +080014606#define AES_GCM_4106_ENC_TEST_VECTORS 23
14607#define AES_GCM_4106_DEC_TEST_VECTORS 23
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030014608#define AES_GCM_4543_ENC_TEST_VECTORS 1
14609#define AES_GCM_4543_DEC_TEST_VECTORS 2
Ard Biesheuvel45859882014-04-16 20:40:04 +080014610#define AES_CCM_ENC_TEST_VECTORS 8
Herbert Xuda7f0332008-07-31 17:08:25 +080014611#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +080014612#define AES_CCM_4309_ENC_TEST_VECTORS 7
14613#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +080014614
14615static struct cipher_testvec aes_enc_tv_template[] = {
14616 { /* From FIPS-197 */
14617 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14618 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14619 .klen = 16,
14620 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14621 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14622 .ilen = 16,
14623 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14624 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14625 .rlen = 16,
14626 }, {
14627 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14628 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14629 "\x10\x11\x12\x13\x14\x15\x16\x17",
14630 .klen = 24,
14631 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14632 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14633 .ilen = 16,
14634 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14635 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14636 .rlen = 16,
14637 }, {
14638 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14639 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14640 "\x10\x11\x12\x13\x14\x15\x16\x17"
14641 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14642 .klen = 32,
14643 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14644 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14645 .ilen = 16,
14646 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14647 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14648 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014649 }, { /* Generated with Crypto++ */
14650 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14651 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14652 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14653 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14654 .klen = 32,
14655 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14656 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14657 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14658 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14659 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14660 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14661 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14662 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14663 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14664 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14665 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14666 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14667 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14668 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14669 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14670 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14671 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14672 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14673 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14674 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14675 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14676 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14677 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14678 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14679 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14680 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14681 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14682 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14683 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14684 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14685 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14686 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14687 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14688 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14689 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14690 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14691 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14692 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14693 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14694 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14695 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14696 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14697 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14698 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14699 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14700 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14701 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14702 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14703 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14704 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14705 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14706 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14707 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14708 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14709 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14710 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14711 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14712 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14713 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14714 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14715 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14716 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14717 .ilen = 496,
14718 .result = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14719 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14720 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14721 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14722 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14723 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14724 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14725 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14726 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14727 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14728 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14729 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14730 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14731 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14732 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14733 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14734 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14735 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14736 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14737 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14738 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14739 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14740 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14741 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14742 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14743 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14744 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14745 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14746 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14747 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14748 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14749 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14750 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14751 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14752 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14753 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14754 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14755 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14756 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14757 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14758 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14759 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14760 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14761 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14762 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14763 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14764 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14765 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14766 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14767 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14768 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14769 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14770 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14771 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14772 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14773 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14774 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14775 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14776 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14777 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14778 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14779 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14780 .rlen = 496,
14781 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014782 .np = 3,
14783 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014784 },
14785};
14786
14787static struct cipher_testvec aes_dec_tv_template[] = {
14788 { /* From FIPS-197 */
14789 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14790 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14791 .klen = 16,
14792 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14793 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14794 .ilen = 16,
14795 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14796 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14797 .rlen = 16,
14798 }, {
14799 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14800 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14801 "\x10\x11\x12\x13\x14\x15\x16\x17",
14802 .klen = 24,
14803 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14804 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14805 .ilen = 16,
14806 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14807 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14808 .rlen = 16,
14809 }, {
14810 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14811 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14812 "\x10\x11\x12\x13\x14\x15\x16\x17"
14813 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14814 .klen = 32,
14815 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14816 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14817 .ilen = 16,
14818 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14819 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14820 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014821 }, { /* Generated with Crypto++ */
14822 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14823 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14824 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14825 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14826 .klen = 32,
14827 .input = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14828 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14829 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14830 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14831 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14832 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14833 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14834 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14835 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14836 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14837 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14838 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14839 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14840 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14841 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14842 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14843 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14844 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14845 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14846 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14847 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14848 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14849 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14850 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14851 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14852 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14853 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14854 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14855 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14856 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14857 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14858 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14859 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14860 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14861 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14862 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14863 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14864 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14865 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14866 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14867 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14868 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14869 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14870 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14871 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14872 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14873 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14874 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14875 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14876 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14877 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14878 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14879 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14880 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14881 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14882 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14883 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14884 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14885 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14886 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14887 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14888 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14889 .ilen = 496,
14890 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14891 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14892 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14893 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14894 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14895 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14896 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14897 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14898 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14899 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14900 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14901 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14902 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14903 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14904 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14905 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14906 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14907 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14908 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14909 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14910 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14911 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14912 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14913 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14914 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14915 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14916 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14917 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14918 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14919 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14920 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14921 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14922 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14923 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14924 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14925 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14926 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14927 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14928 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14929 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14930 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14931 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14932 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14933 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14934 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14935 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14936 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14937 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14938 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14939 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14940 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14941 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14942 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14943 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14944 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14945 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14946 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14947 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14948 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14949 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14950 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14951 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14952 .rlen = 496,
14953 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014954 .np = 3,
14955 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014956 },
14957};
14958
14959static struct cipher_testvec aes_cbc_enc_tv_template[] = {
14960 { /* From RFC 3602 */
14961 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14962 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14963 .klen = 16,
14964 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14965 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14966 .input = "Single block msg",
14967 .ilen = 16,
14968 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14969 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14970 .rlen = 16,
LABBE Corentin0d8dc962015-07-06 13:37:33 +020014971 .also_non_np = 1,
14972 .np = 8,
14973 .tap = { 3, 2, 3, 2, 3, 1, 1, 1 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014974 }, {
14975 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14976 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14977 .klen = 16,
14978 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14979 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14980 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14981 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14982 "\x10\x11\x12\x13\x14\x15\x16\x17"
14983 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14984 .ilen = 32,
14985 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14986 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14987 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14988 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14989 .rlen = 32,
14990 }, { /* From NIST SP800-38A */
14991 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14992 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14993 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14994 .klen = 24,
14995 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14996 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14997 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14998 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14999 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15000 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15001 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15002 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15003 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15004 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15005 .ilen = 64,
15006 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15007 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15008 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15009 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15010 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15011 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15012 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15013 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
15014 .rlen = 64,
15015 }, {
15016 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15017 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15018 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15019 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15020 .klen = 32,
15021 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15022 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15023 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15024 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15025 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15026 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15027 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15028 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15029 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15030 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15031 .ilen = 64,
15032 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15033 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15034 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15035 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15036 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15037 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15038 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15039 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
15040 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030015041 }, { /* Generated with Crypto++ */
15042 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
15043 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
15044 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
15045 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
15046 .klen = 32,
15047 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
15048 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
15049 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
15050 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
15051 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
15052 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
15053 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
15054 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
15055 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
15056 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
15057 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
15058 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
15059 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
15060 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
15061 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
15062 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
15063 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
15064 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
15065 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
15066 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
15067 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
15068 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
15069 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
15070 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
15071 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
15072 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
15073 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
15074 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
15075 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
15076 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
15077 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
15078 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
15079 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
15080 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
15081 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
15082 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
15083 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
15084 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
15085 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
15086 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
15087 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
15088 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
15089 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
15090 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
15091 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
15092 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
15093 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
15094 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
15095 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
15096 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
15097 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
15098 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
15099 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
15100 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
15101 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
15102 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
15103 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
15104 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
15105 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
15106 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
15107 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
15108 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
15109 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
15110 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
15111 .ilen = 496,
15112 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
15113 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
15114 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
15115 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
15116 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
15117 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
15118 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
15119 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
15120 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
15121 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
15122 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
15123 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
15124 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
15125 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
15126 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
15127 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
15128 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
15129 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
15130 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
15131 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
15132 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
15133 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
15134 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
15135 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
15136 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
15137 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
15138 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
15139 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
15140 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
15141 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
15142 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
15143 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
15144 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
15145 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
15146 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
15147 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
15148 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
15149 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
15150 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
15151 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
15152 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
15153 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
15154 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
15155 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
15156 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
15157 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
15158 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
15159 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
15160 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
15161 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
15162 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
15163 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
15164 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
15165 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
15166 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
15167 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
15168 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
15169 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
15170 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
15171 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
15172 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
15173 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
15174 .rlen = 496,
15175 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020015176 .np = 3,
15177 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015178 },
15179};
15180
15181static struct cipher_testvec aes_cbc_dec_tv_template[] = {
15182 { /* From RFC 3602 */
15183 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15184 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15185 .klen = 16,
15186 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15187 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15188 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15189 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
15190 .ilen = 16,
15191 .result = "Single block msg",
15192 .rlen = 16,
LABBE Corentin0d8dc962015-07-06 13:37:33 +020015193 .also_non_np = 1,
15194 .np = 8,
15195 .tap = { 3, 2, 3, 2, 3, 1, 1, 1 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015196 }, {
15197 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15198 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15199 .klen = 16,
15200 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15201 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15202 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15203 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15204 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15205 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
15206 .ilen = 32,
15207 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
15208 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15209 "\x10\x11\x12\x13\x14\x15\x16\x17"
15210 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15211 .rlen = 32,
15212 }, { /* From NIST SP800-38A */
15213 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15214 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15215 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15216 .klen = 24,
15217 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15218 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15219 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15220 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15221 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15222 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15223 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15224 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15225 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15226 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
15227 .ilen = 64,
15228 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15229 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15230 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15231 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15232 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15233 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15234 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15235 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15236 .rlen = 64,
15237 }, {
15238 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15239 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15240 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15241 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15242 .klen = 32,
15243 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15244 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15245 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15246 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15247 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15248 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15249 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15250 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15251 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15252 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
15253 .ilen = 64,
15254 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15255 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15256 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15257 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15258 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15259 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15260 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15261 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15262 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030015263 }, { /* Generated with Crypto++ */
15264 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
15265 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
15266 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
15267 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
15268 .klen = 32,
15269 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
15270 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
15271 .input = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
15272 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
15273 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
15274 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
15275 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
15276 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
15277 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
15278 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
15279 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
15280 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
15281 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
15282 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
15283 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
15284 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
15285 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
15286 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
15287 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
15288 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
15289 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
15290 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
15291 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
15292 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
15293 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
15294 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
15295 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
15296 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
15297 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
15298 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
15299 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
15300 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
15301 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
15302 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
15303 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
15304 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
15305 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
15306 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
15307 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
15308 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
15309 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
15310 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
15311 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
15312 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
15313 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
15314 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
15315 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
15316 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
15317 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
15318 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
15319 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
15320 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
15321 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
15322 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
15323 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
15324 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
15325 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
15326 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
15327 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
15328 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
15329 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
15330 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
15331 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
15332 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
15333 .ilen = 496,
15334 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
15335 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
15336 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
15337 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
15338 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
15339 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
15340 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
15341 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
15342 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
15343 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
15344 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
15345 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
15346 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
15347 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
15348 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
15349 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
15350 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
15351 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
15352 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
15353 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
15354 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
15355 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
15356 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
15357 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
15358 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
15359 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
15360 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
15361 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
15362 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
15363 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
15364 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
15365 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
15366 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
15367 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
15368 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
15369 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
15370 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
15371 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
15372 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
15373 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
15374 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
15375 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
15376 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
15377 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
15378 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
15379 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
15380 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
15381 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
15382 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
15383 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
15384 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
15385 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
15386 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
15387 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
15388 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
15389 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
15390 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
15391 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
15392 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
15393 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
15394 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
15395 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
15396 .rlen = 496,
15397 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020015398 .np = 3,
15399 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015400 },
15401};
15402
Horia Geantabca4feb2014-03-14 17:46:51 +020015403static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
15404 { /* Input data from RFC 2410 Case 1 */
15405#ifdef __LITTLE_ENDIAN
15406 .key = "\x08\x00" /* rta length */
15407 "\x01\x00" /* rta type */
15408#else
15409 .key = "\x00\x08" /* rta length */
15410 "\x00\x01" /* rta type */
15411#endif
15412 "\x00\x00\x00\x00" /* enc key length */
15413 "\x00\x00\x00\x00\x00\x00\x00\x00"
15414 "\x00\x00\x00\x00\x00\x00\x00\x00",
15415 .klen = 8 + 16 + 0,
15416 .iv = "",
15417 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15418 .ilen = 8,
15419 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15420 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
15421 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
15422 .rlen = 8 + 16,
15423 }, { /* Input data from RFC 2410 Case 2 */
15424#ifdef __LITTLE_ENDIAN
15425 .key = "\x08\x00" /* rta length */
15426 "\x01\x00" /* rta type */
15427#else
15428 .key = "\x00\x08" /* rta length */
15429 "\x00\x01" /* rta type */
15430#endif
15431 "\x00\x00\x00\x00" /* enc key length */
15432 "\x00\x00\x00\x00\x00\x00\x00\x00"
15433 "\x00\x00\x00\x00\x00\x00\x00\x00",
15434 .klen = 8 + 16 + 0,
15435 .iv = "",
15436 .input = "Network Security People Have A Strange Sense Of Humor",
15437 .ilen = 53,
15438 .result = "Network Security People Have A Strange Sense Of Humor"
15439 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
15440 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
15441 .rlen = 53 + 16,
15442 },
15443};
15444
15445static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
15446 {
15447#ifdef __LITTLE_ENDIAN
15448 .key = "\x08\x00" /* rta length */
15449 "\x01\x00" /* rta type */
15450#else
15451 .key = "\x00\x08" /* rta length */
15452 "\x00\x01" /* rta type */
15453#endif
15454 "\x00\x00\x00\x00" /* enc key length */
15455 "\x00\x00\x00\x00\x00\x00\x00\x00"
15456 "\x00\x00\x00\x00\x00\x00\x00\x00",
15457 .klen = 8 + 16 + 0,
15458 .iv = "",
15459 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15460 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
15461 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
15462 .ilen = 8 + 16,
15463 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15464 .rlen = 8,
15465 }, {
15466#ifdef __LITTLE_ENDIAN
15467 .key = "\x08\x00" /* rta length */
15468 "\x01\x00" /* rta type */
15469#else
15470 .key = "\x00\x08" /* rta length */
15471 "\x00\x01" /* rta type */
15472#endif
15473 "\x00\x00\x00\x00" /* enc key length */
15474 "\x00\x00\x00\x00\x00\x00\x00\x00"
15475 "\x00\x00\x00\x00\x00\x00\x00\x00",
15476 .klen = 8 + 16 + 0,
15477 .iv = "",
15478 .input = "Network Security People Have A Strange Sense Of Humor"
15479 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
15480 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
15481 .ilen = 53 + 16,
15482 .result = "Network Security People Have A Strange Sense Of Humor",
15483 .rlen = 53,
15484 },
15485};
15486
Nitesh Lal5208ed22014-05-21 17:09:08 +053015487static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015488 { /* RFC 3602 Case 1 */
15489#ifdef __LITTLE_ENDIAN
15490 .key = "\x08\x00" /* rta length */
15491 "\x01\x00" /* rta type */
15492#else
15493 .key = "\x00\x08" /* rta length */
15494 "\x00\x01" /* rta type */
15495#endif
15496 "\x00\x00\x00\x10" /* enc key length */
15497 "\x00\x00\x00\x00\x00\x00\x00\x00"
15498 "\x00\x00\x00\x00\x00\x00\x00\x00"
15499 "\x00\x00\x00\x00"
15500 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15501 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15502 .klen = 8 + 20 + 16,
15503 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15504 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
Herbert Xu7079ce62015-07-30 17:53:14 +080015505 .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15506 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15507 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015508 .input = "Single block msg",
15509 .ilen = 16,
15510 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15511 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15512 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
15513 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
15514 "\x03\x71\xa2\x06",
15515 .rlen = 16 + 20,
15516 }, { /* RFC 3602 Case 2 */
15517#ifdef __LITTLE_ENDIAN
15518 .key = "\x08\x00" /* rta length */
15519 "\x01\x00" /* rta type */
15520#else
15521 .key = "\x00\x08" /* rta length */
15522 "\x00\x01" /* rta type */
15523#endif
15524 "\x00\x00\x00\x10" /* enc key length */
15525 "\x20\x21\x22\x23\x24\x25\x26\x27"
15526 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15527 "\x30\x31\x32\x33"
15528 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15529 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15530 .klen = 8 + 20 + 16,
15531 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15532 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
Herbert Xu7079ce62015-07-30 17:53:14 +080015533 .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15534 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15535 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015536 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15537 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15538 "\x10\x11\x12\x13\x14\x15\x16\x17"
15539 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15540 .ilen = 32,
15541 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15542 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15543 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15544 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15545 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
15546 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
15547 "\x65\x39\xf8\xde",
15548 .rlen = 32 + 20,
15549 }, { /* RFC 3602 Case 3 */
15550#ifdef __LITTLE_ENDIAN
15551 .key = "\x08\x00" /* rta length */
15552 "\x01\x00" /* rta type */
15553#else
15554 .key = "\x00\x08" /* rta length */
15555 "\x00\x01" /* rta type */
15556#endif
15557 "\x00\x00\x00\x10" /* enc key length */
15558 "\x11\x22\x33\x44\x55\x66\x77\x88"
15559 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15560 "\x22\x33\x44\x55"
15561 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15562 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15563 .klen = 8 + 20 + 16,
15564 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15565 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
Herbert Xu7079ce62015-07-30 17:53:14 +080015566 .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15567 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15568 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015569 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15570 .ilen = 48,
15571 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15572 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15573 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15574 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15575 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15576 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15577 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
15578 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
15579 "\x8d\x62\xf2\x1e",
15580 .rlen = 48 + 20,
15581 }, { /* RFC 3602 Case 4 */
15582#ifdef __LITTLE_ENDIAN
15583 .key = "\x08\x00" /* rta length */
15584 "\x01\x00" /* rta type */
15585#else
15586 .key = "\x00\x08" /* rta length */
15587 "\x00\x01" /* rta type */
15588#endif
15589 "\x00\x00\x00\x10" /* enc key length */
15590 "\x11\x22\x33\x44\x55\x66\x77\x88"
15591 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15592 "\x22\x33\x44\x55"
15593 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15594 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15595 .klen = 8 + 20 + 16,
15596 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15597 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
Herbert Xu7079ce62015-07-30 17:53:14 +080015598 .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15599 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15600 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015601 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15602 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15603 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15604 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15605 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15606 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15607 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15608 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15609 .ilen = 64,
15610 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15611 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15612 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15613 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15614 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15615 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15616 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15617 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15618 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
15619 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
15620 "\x1d\xbe\xc6\xe9",
15621 .rlen = 64 + 20,
15622 }, { /* RFC 3602 Case 5 */
15623#ifdef __LITTLE_ENDIAN
15624 .key = "\x08\x00" /* rta length */
15625 "\x01\x00" /* rta type */
15626#else
15627 .key = "\x00\x08" /* rta length */
15628 "\x00\x01" /* rta type */
15629#endif
15630 "\x00\x00\x00\x10" /* enc key length */
15631 "\x11\x22\x33\x44\x55\x66\x77\x88"
15632 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15633 "\x22\x33\x44\x55"
15634 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15635 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15636 .klen = 8 + 20 + 16,
15637 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15638 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
Herbert Xu7079ce62015-07-30 17:53:14 +080015639 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
15640 "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15641 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15642 .alen = 24,
Horia Geantae46e9a42012-07-03 19:16:54 +030015643 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15644 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15645 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15646 "\x10\x11\x12\x13\x14\x15\x16\x17"
15647 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15648 "\x20\x21\x22\x23\x24\x25\x26\x27"
15649 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15650 "\x30\x31\x32\x33\x34\x35\x36\x37"
15651 "\x01\x02\x03\x04\x05\x06\x07\x08"
15652 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15653 .ilen = 80,
15654 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15655 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15656 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15657 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15658 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15659 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15660 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15661 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15662 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15663 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15664 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
15665 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
15666 "\x85\xe1\x59\xf7",
15667 .rlen = 80 + 20,
15668 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15669#ifdef __LITTLE_ENDIAN
15670 .key = "\x08\x00" /* rta length */
15671 "\x01\x00" /* rta type */
15672#else
15673 .key = "\x00\x08" /* rta length */
15674 "\x00\x01" /* rta type */
15675#endif
15676 "\x00\x00\x00\x18" /* enc key length */
15677 "\x11\x22\x33\x44\x55\x66\x77\x88"
15678 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15679 "\x22\x33\x44\x55"
15680 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15681 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15682 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15683 .klen = 8 + 20 + 24,
15684 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15685 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015686 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15687 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15688 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015689 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15690 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15691 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15692 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15693 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15694 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15695 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15696 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15697 .ilen = 64,
15698 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15699 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15700 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15701 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15702 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15703 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15704 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15705 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15706 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
15707 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
15708 "\x47\x4c\xfc\x36",
15709 .rlen = 64 + 20,
15710 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15711#ifdef __LITTLE_ENDIAN
15712 .key = "\x08\x00" /* rta length */
15713 "\x01\x00" /* rta type */
15714#else
15715 .key = "\x00\x08" /* rta length */
15716 "\x00\x01" /* rta type */
15717#endif
15718 "\x00\x00\x00\x20" /* enc key length */
15719 "\x11\x22\x33\x44\x55\x66\x77\x88"
15720 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15721 "\x22\x33\x44\x55"
15722 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15723 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15724 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15725 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15726 .klen = 8 + 20 + 32,
15727 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15728 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080015729 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
15730 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15731 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015732 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15733 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15734 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15735 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15736 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15737 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15738 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15739 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15740 .ilen = 64,
15741 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15742 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15743 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15744 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15745 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15746 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15747 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15748 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15749 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
15750 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
15751 "\x51\xee\xd6\x4e",
15752 .rlen = 64 + 20,
15753 },
15754};
15755
Nitesh Lal5208ed22014-05-21 17:09:08 +053015756static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015757 { /* Input data from RFC 2410 Case 1 */
15758#ifdef __LITTLE_ENDIAN
15759 .key = "\x08\x00" /* rta length */
15760 "\x01\x00" /* rta type */
15761#else
15762 .key = "\x00\x08" /* rta length */
15763 "\x00\x01" /* rta type */
15764#endif
15765 "\x00\x00\x00\x00" /* enc key length */
15766 "\x00\x00\x00\x00\x00\x00\x00\x00"
15767 "\x00\x00\x00\x00\x00\x00\x00\x00"
15768 "\x00\x00\x00\x00",
15769 .klen = 8 + 20 + 0,
15770 .iv = "",
15771 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15772 .ilen = 8,
15773 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15774 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15775 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15776 "\x8c\x5e\xe4\x08",
15777 .rlen = 8 + 20,
15778 }, { /* Input data from RFC 2410 Case 2 */
15779#ifdef __LITTLE_ENDIAN
15780 .key = "\x08\x00" /* rta length */
15781 "\x01\x00" /* rta type */
15782#else
15783 .key = "\x00\x08" /* rta length */
15784 "\x00\x01" /* rta type */
15785#endif
15786 "\x00\x00\x00\x00" /* enc key length */
15787 "\x00\x00\x00\x00\x00\x00\x00\x00"
15788 "\x00\x00\x00\x00\x00\x00\x00\x00"
15789 "\x00\x00\x00\x00",
15790 .klen = 8 + 20 + 0,
15791 .iv = "",
15792 .input = "Network Security People Have A Strange Sense Of Humor",
15793 .ilen = 53,
15794 .result = "Network Security People Have A Strange Sense Of Humor"
15795 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15796 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15797 "\x91\x56\xe4\xd6",
15798 .rlen = 53 + 20,
15799 },
15800};
15801
Nitesh Lal5208ed22014-05-21 17:09:08 +053015802static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015803 {
15804#ifdef __LITTLE_ENDIAN
15805 .key = "\x08\x00" /* rta length */
15806 "\x01\x00" /* rta type */
15807#else
15808 .key = "\x00\x08" /* rta length */
15809 "\x00\x01" /* rta type */
15810#endif
15811 "\x00\x00\x00\x00" /* enc key length */
15812 "\x00\x00\x00\x00\x00\x00\x00\x00"
15813 "\x00\x00\x00\x00\x00\x00\x00\x00"
15814 "\x00\x00\x00\x00",
15815 .klen = 8 + 20 + 0,
15816 .iv = "",
15817 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15818 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15819 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15820 "\x8c\x5e\xe4\x08",
15821 .ilen = 8 + 20,
15822 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15823 .rlen = 8,
15824 }, {
15825#ifdef __LITTLE_ENDIAN
15826 .key = "\x08\x00" /* rta length */
15827 "\x01\x00" /* rta type */
15828#else
15829 .key = "\x00\x08" /* rta length */
15830 "\x00\x01" /* rta type */
15831#endif
15832 "\x00\x00\x00\x00" /* enc key length */
15833 "\x00\x00\x00\x00\x00\x00\x00\x00"
15834 "\x00\x00\x00\x00\x00\x00\x00\x00"
15835 "\x00\x00\x00\x00",
15836 .klen = 8 + 20 + 0,
15837 .iv = "",
15838 .input = "Network Security People Have A Strange Sense Of Humor"
15839 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15840 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15841 "\x91\x56\xe4\xd6",
15842 .ilen = 53 + 20,
15843 .result = "Network Security People Have A Strange Sense Of Humor",
15844 .rlen = 53,
15845 },
15846};
15847
Nitesh Lal5208ed22014-05-21 17:09:08 +053015848static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015849 { /* RFC 3602 Case 1 */
15850#ifdef __LITTLE_ENDIAN
15851 .key = "\x08\x00" /* rta length */
15852 "\x01\x00" /* rta type */
15853#else
15854 .key = "\x00\x08" /* rta length */
15855 "\x00\x01" /* rta type */
15856#endif
15857 "\x00\x00\x00\x10" /* enc key length */
15858 "\x00\x00\x00\x00\x00\x00\x00\x00"
15859 "\x00\x00\x00\x00\x00\x00\x00\x00"
15860 "\x00\x00\x00\x00\x00\x00\x00\x00"
15861 "\x00\x00\x00\x00\x00\x00\x00\x00"
15862 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15863 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15864 .klen = 8 + 32 + 16,
15865 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15866 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
Herbert Xu7079ce62015-07-30 17:53:14 +080015867 .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15868 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15869 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015870 .input = "Single block msg",
15871 .ilen = 16,
15872 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15873 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15874 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
15875 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
15876 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
15877 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
15878 .rlen = 16 + 32,
15879 }, { /* RFC 3602 Case 2 */
15880#ifdef __LITTLE_ENDIAN
15881 .key = "\x08\x00" /* rta length */
15882 "\x01\x00" /* rta type */
15883#else
15884 .key = "\x00\x08" /* rta length */
15885 "\x00\x01" /* rta type */
15886#endif
15887 "\x00\x00\x00\x10" /* enc key length */
15888 "\x20\x21\x22\x23\x24\x25\x26\x27"
15889 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15890 "\x30\x31\x32\x33\x34\x35\x36\x37"
15891 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15892 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15893 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15894 .klen = 8 + 32 + 16,
15895 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15896 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
Herbert Xu7079ce62015-07-30 17:53:14 +080015897 .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15898 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15899 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015900 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15901 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15902 "\x10\x11\x12\x13\x14\x15\x16\x17"
15903 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15904 .ilen = 32,
15905 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15906 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15907 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15908 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15909 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
15910 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
15911 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
15912 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
15913 .rlen = 32 + 32,
15914 }, { /* RFC 3602 Case 3 */
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\x10" /* 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 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15928 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15929 .klen = 8 + 32 + 16,
15930 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15931 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
Herbert Xu7079ce62015-07-30 17:53:14 +080015932 .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15933 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15934 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015935 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15936 .ilen = 48,
15937 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15938 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15939 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15940 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15941 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15942 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15943 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
15944 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
15945 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
15946 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
15947 .rlen = 48 + 32,
15948 }, { /* RFC 3602 Case 4 */
15949#ifdef __LITTLE_ENDIAN
15950 .key = "\x08\x00" /* rta length */
15951 "\x01\x00" /* rta type */
15952#else
15953 .key = "\x00\x08" /* rta length */
15954 "\x00\x01" /* rta type */
15955#endif
15956 "\x00\x00\x00\x10" /* enc key length */
15957 "\x11\x22\x33\x44\x55\x66\x77\x88"
15958 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15959 "\x22\x33\x44\x55\x66\x77\x88\x99"
15960 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15961 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15962 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15963 .klen = 8 + 32 + 16,
15964 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15965 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
Herbert Xu7079ce62015-07-30 17:53:14 +080015966 .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15967 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15968 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030015969 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15970 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15971 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15972 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15973 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15974 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15975 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15976 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15977 .ilen = 64,
15978 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15979 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15980 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15981 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15982 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15983 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15984 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15985 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15986 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
15987 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
15988 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
15989 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
15990 .rlen = 64 + 32,
15991 }, { /* RFC 3602 Case 5 */
15992#ifdef __LITTLE_ENDIAN
15993 .key = "\x08\x00" /* rta length */
15994 "\x01\x00" /* rta type */
15995#else
15996 .key = "\x00\x08" /* rta length */
15997 "\x00\x01" /* rta type */
15998#endif
15999 "\x00\x00\x00\x10" /* enc key length */
16000 "\x11\x22\x33\x44\x55\x66\x77\x88"
16001 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16002 "\x22\x33\x44\x55\x66\x77\x88\x99"
16003 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16004 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
16005 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
16006 .klen = 8 + 32 + 16,
16007 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
16008 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
Herbert Xu7079ce62015-07-30 17:53:14 +080016009 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16010 "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
16011 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
16012 .alen = 24,
Horia Geantae46e9a42012-07-03 19:16:54 +030016013 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
16014 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
16015 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16016 "\x10\x11\x12\x13\x14\x15\x16\x17"
16017 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16018 "\x20\x21\x22\x23\x24\x25\x26\x27"
16019 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16020 "\x30\x31\x32\x33\x34\x35\x36\x37"
16021 "\x01\x02\x03\x04\x05\x06\x07\x08"
16022 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
16023 .ilen = 80,
16024 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
16025 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
16026 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
16027 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
16028 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
16029 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
16030 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
16031 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
16032 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
16033 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
16034 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
16035 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
16036 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
16037 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
16038 .rlen = 80 + 32,
16039 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
16040#ifdef __LITTLE_ENDIAN
16041 .key = "\x08\x00" /* rta length */
16042 "\x01\x00" /* rta type */
16043#else
16044 .key = "\x00\x08" /* rta length */
16045 "\x00\x01" /* rta type */
16046#endif
16047 "\x00\x00\x00\x18" /* enc key length */
16048 "\x11\x22\x33\x44\x55\x66\x77\x88"
16049 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16050 "\x22\x33\x44\x55\x66\x77\x88\x99"
16051 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16052 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
16053 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
16054 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
16055 .klen = 8 + 32 + 24,
16056 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
16057 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080016058 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
16059 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
16060 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030016061 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
16062 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
16063 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
16064 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
16065 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
16066 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
16067 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
16068 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
16069 .ilen = 64,
16070 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
16071 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
16072 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
16073 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
16074 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
16075 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
16076 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
16077 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
16078 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
16079 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
16080 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
16081 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
16082 .rlen = 64 + 32,
16083 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
16084#ifdef __LITTLE_ENDIAN
16085 .key = "\x08\x00" /* rta length */
16086 "\x01\x00" /* rta type */
16087#else
16088 .key = "\x00\x08" /* rta length */
16089 "\x00\x01" /* rta type */
16090#endif
16091 "\x00\x00\x00\x20" /* enc key length */
16092 "\x11\x22\x33\x44\x55\x66\x77\x88"
16093 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16094 "\x22\x33\x44\x55\x66\x77\x88\x99"
16095 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16096 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
16097 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
16098 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
16099 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
16100 .klen = 8 + 32 + 32,
16101 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
16102 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080016103 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
16104 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
16105 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030016106 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
16107 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
16108 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
16109 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
16110 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
16111 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
16112 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
16113 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
16114 .ilen = 64,
16115 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
16116 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
16117 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
16118 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
16119 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
16120 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
16121 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
16122 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
16123 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
16124 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
16125 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
16126 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
16127 .rlen = 64 + 32,
16128 },
16129};
16130
Nitesh Lal5208ed22014-05-21 17:09:08 +053016131static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030016132 { /* RFC 3602 Case 1 */
16133#ifdef __LITTLE_ENDIAN
16134 .key = "\x08\x00" /* rta length */
16135 "\x01\x00" /* rta type */
16136#else
16137 .key = "\x00\x08" /* rta length */
16138 "\x00\x01" /* rta type */
16139#endif
16140 "\x00\x00\x00\x10" /* enc key length */
16141 "\x00\x00\x00\x00\x00\x00\x00\x00"
16142 "\x00\x00\x00\x00\x00\x00\x00\x00"
16143 "\x00\x00\x00\x00\x00\x00\x00\x00"
16144 "\x00\x00\x00\x00\x00\x00\x00\x00"
16145 "\x00\x00\x00\x00\x00\x00\x00\x00"
16146 "\x00\x00\x00\x00\x00\x00\x00\x00"
16147 "\x00\x00\x00\x00\x00\x00\x00\x00"
16148 "\x00\x00\x00\x00\x00\x00\x00\x00"
16149 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
16150 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
16151 .klen = 8 + 64 + 16,
16152 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
16153 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
Herbert Xu7079ce62015-07-30 17:53:14 +080016154 .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
16155 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
16156 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030016157 .input = "Single block msg",
16158 .ilen = 16,
16159 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
16160 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
16161 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
16162 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
16163 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
16164 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
16165 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
16166 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
16167 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
16168 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
16169 .rlen = 16 + 64,
16170 }, { /* RFC 3602 Case 2 */
16171#ifdef __LITTLE_ENDIAN
16172 .key = "\x08\x00" /* rta length */
16173 "\x01\x00" /* rta type */
16174#else
16175 .key = "\x00\x08" /* rta length */
16176 "\x00\x01" /* rta type */
16177#endif
16178 "\x00\x00\x00\x10" /* enc key length */
16179 "\x20\x21\x22\x23\x24\x25\x26\x27"
16180 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16181 "\x30\x31\x32\x33\x34\x35\x36\x37"
16182 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16183 "\x40\x41\x42\x43\x44\x45\x46\x47"
16184 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16185 "\x50\x51\x52\x53\x54\x55\x56\x57"
16186 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16187 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
16188 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
16189 .klen = 8 + 64 + 16,
16190 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
16191 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
Herbert Xu7079ce62015-07-30 17:53:14 +080016192 .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
16193 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
16194 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030016195 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16196 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16197 "\x10\x11\x12\x13\x14\x15\x16\x17"
16198 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16199 .ilen = 32,
16200 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
16201 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
16202 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
16203 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
16204 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
16205 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
16206 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
16207 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
16208 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
16209 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
16210 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
16211 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
16212 .rlen = 32 + 64,
16213 }, { /* RFC 3602 Case 3 */
16214#ifdef __LITTLE_ENDIAN
16215 .key = "\x08\x00" /* rta length */
16216 "\x01\x00" /* rta type */
16217#else
16218 .key = "\x00\x08" /* rta length */
16219 "\x00\x01" /* rta type */
16220#endif
16221 "\x00\x00\x00\x10" /* enc key length */
16222 "\x11\x22\x33\x44\x55\x66\x77\x88"
16223 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16224 "\x22\x33\x44\x55\x66\x77\x88\x99"
16225 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16226 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16227 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16228 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16229 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16230 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
16231 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
16232 .klen = 8 + 64 + 16,
16233 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
16234 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
Herbert Xu7079ce62015-07-30 17:53:14 +080016235 .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
16236 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
16237 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030016238 .input = "This is a 48-byte message (exactly 3 AES blocks)",
16239 .ilen = 48,
16240 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
16241 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
16242 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
16243 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
16244 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
16245 "\x85\x79\x69\x5d\x83\xba\x26\x84"
16246 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
16247 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
16248 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
16249 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
16250 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
16251 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
16252 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
16253 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
16254 .rlen = 48 + 64,
16255 }, { /* RFC 3602 Case 4 */
16256#ifdef __LITTLE_ENDIAN
16257 .key = "\x08\x00" /* rta length */
16258 "\x01\x00" /* rta type */
16259#else
16260 .key = "\x00\x08" /* rta length */
16261 "\x00\x01" /* rta type */
16262#endif
16263 "\x00\x00\x00\x10" /* enc key length */
16264 "\x11\x22\x33\x44\x55\x66\x77\x88"
16265 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16266 "\x22\x33\x44\x55\x66\x77\x88\x99"
16267 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16268 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16269 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16270 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16271 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16272 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
16273 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
16274 .klen = 8 + 64 + 16,
16275 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
16276 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
Herbert Xu7079ce62015-07-30 17:53:14 +080016277 .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
16278 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
16279 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030016280 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16281 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16282 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16283 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16284 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16285 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16286 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16287 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
16288 .ilen = 64,
16289 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
16290 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
16291 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
16292 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
16293 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
16294 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
16295 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
16296 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
16297 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
16298 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
16299 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
16300 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
16301 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
16302 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
16303 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
16304 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
16305 .rlen = 64 + 64,
16306 }, { /* RFC 3602 Case 5 */
16307#ifdef __LITTLE_ENDIAN
16308 .key = "\x08\x00" /* rta length */
16309 "\x01\x00" /* rta type */
16310#else
16311 .key = "\x00\x08" /* rta length */
16312 "\x00\x01" /* rta type */
16313#endif
16314 "\x00\x00\x00\x10" /* enc key length */
16315 "\x11\x22\x33\x44\x55\x66\x77\x88"
16316 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16317 "\x22\x33\x44\x55\x66\x77\x88\x99"
16318 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16319 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16320 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16321 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16322 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16323 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
16324 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
16325 .klen = 8 + 64 + 16,
16326 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
16327 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
Herbert Xu7079ce62015-07-30 17:53:14 +080016328 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16329 "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
16330 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
16331 .alen = 24,
Horia Geantae46e9a42012-07-03 19:16:54 +030016332 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
16333 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
16334 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16335 "\x10\x11\x12\x13\x14\x15\x16\x17"
16336 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16337 "\x20\x21\x22\x23\x24\x25\x26\x27"
16338 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16339 "\x30\x31\x32\x33\x34\x35\x36\x37"
16340 "\x01\x02\x03\x04\x05\x06\x07\x08"
16341 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
16342 .ilen = 80,
16343 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
16344 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
16345 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
16346 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
16347 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
16348 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
16349 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
16350 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
16351 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
16352 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
16353 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
16354 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
16355 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
16356 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
16357 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
16358 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
16359 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
16360 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
16361 .rlen = 80 + 64,
16362 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
16363#ifdef __LITTLE_ENDIAN
16364 .key = "\x08\x00" /* rta length */
16365 "\x01\x00" /* rta type */
16366#else
16367 .key = "\x00\x08" /* rta length */
16368 "\x00\x01" /* rta type */
16369#endif
16370 "\x00\x00\x00\x18" /* enc key length */
16371 "\x11\x22\x33\x44\x55\x66\x77\x88"
16372 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16373 "\x22\x33\x44\x55\x66\x77\x88\x99"
16374 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16375 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16376 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16377 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16378 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16379 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
16380 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
16381 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
16382 .klen = 8 + 64 + 24,
16383 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
16384 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080016385 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
16386 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
16387 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030016388 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
16389 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
16390 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
16391 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
16392 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
16393 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
16394 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
16395 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
16396 .ilen = 64,
16397 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
16398 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
16399 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
16400 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
16401 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
16402 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
16403 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
16404 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
16405 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
16406 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
16407 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
16408 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
16409 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
16410 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
16411 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
16412 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
16413 .rlen = 64 + 64,
16414 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
16415#ifdef __LITTLE_ENDIAN
16416 .key = "\x08\x00" /* rta length */
16417 "\x01\x00" /* rta type */
16418#else
16419 .key = "\x00\x08" /* rta length */
16420 "\x00\x01" /* rta type */
16421#endif
16422 "\x00\x00\x00\x20" /* enc key length */
16423 "\x11\x22\x33\x44\x55\x66\x77\x88"
16424 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16425 "\x22\x33\x44\x55\x66\x77\x88\x99"
16426 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16427 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16428 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16429 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16430 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16431 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
16432 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
16433 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
16434 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
16435 .klen = 8 + 64 + 32,
16436 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
16437 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Herbert Xu7079ce62015-07-30 17:53:14 +080016438 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
16439 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
16440 .alen = 16,
Horia Geantae46e9a42012-07-03 19:16:54 +030016441 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
16442 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
16443 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
16444 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
16445 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
16446 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
16447 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
16448 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
16449 .ilen = 64,
16450 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
16451 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
16452 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
16453 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
16454 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
16455 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
16456 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
16457 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
16458 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
16459 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
16460 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
16461 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
16462 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
16463 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
16464 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
16465 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
16466 .rlen = 64 + 64,
16467 },
16468};
16469
Nitesh Lal5208ed22014-05-21 17:09:08 +053016470#define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1
16471
16472static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = {
16473 { /*Generated with cryptopp*/
16474#ifdef __LITTLE_ENDIAN
16475 .key = "\x08\x00" /* rta length */
16476 "\x01\x00" /* rta type */
16477#else
16478 .key = "\x00\x08" /* rta length */
16479 "\x00\x01" /* rta type */
16480#endif
16481 "\x00\x00\x00\x08" /* enc key length */
16482 "\x11\x22\x33\x44\x55\x66\x77\x88"
16483 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16484 "\x22\x33\x44\x55"
16485 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16486 .klen = 8 + 20 + 8,
16487 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016488 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16489 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16490 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016491 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16492 "\x53\x20\x63\x65\x65\x72\x73\x74"
16493 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16494 "\x20\x79\x65\x53\x72\x63\x74\x65"
16495 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16496 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16497 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16498 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16499 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16500 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16501 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16502 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16503 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16504 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16505 "\x63\x65\x65\x72\x73\x74\x54\x20"
16506 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16507 .ilen = 128,
16508 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16509 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16510 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16511 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16512 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16513 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16514 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16515 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16516 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16517 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16518 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16519 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16520 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16521 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16522 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16523 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16524 "\x95\x16\x20\x09\xf5\x95\x19\xfd"
16525 "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa"
16526 "\x5c\x44\xa9\x37",
16527 .rlen = 128 + 20,
16528 },
16529};
16530
16531#define HMAC_SHA224_DES_CBC_ENC_TEST_VEC 1
16532
16533static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = {
16534 { /*Generated with cryptopp*/
16535#ifdef __LITTLE_ENDIAN
16536 .key = "\x08\x00" /* rta length */
16537 "\x01\x00" /* rta type */
16538#else
16539 .key = "\x00\x08" /* rta length */
16540 "\x00\x01" /* rta type */
16541#endif
16542 "\x00\x00\x00\x08" /* enc key length */
16543 "\x11\x22\x33\x44\x55\x66\x77\x88"
16544 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16545 "\x22\x33\x44\x55\x66\x77\x88\x99"
16546 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16547 .klen = 8 + 24 + 8,
16548 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016549 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16550 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16551 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016552 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16553 "\x53\x20\x63\x65\x65\x72\x73\x74"
16554 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16555 "\x20\x79\x65\x53\x72\x63\x74\x65"
16556 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16557 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16558 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16559 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16560 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16561 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16562 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16563 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16564 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16565 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16566 "\x63\x65\x65\x72\x73\x74\x54\x20"
16567 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16568 .ilen = 128,
16569 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16570 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16571 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16572 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16573 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16574 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16575 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16576 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16577 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16578 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16579 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16580 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16581 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16582 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16583 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16584 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16585 "\x9c\x2d\x7e\xee\x20\x34\x55\x0a"
16586 "\xce\xb5\x4e\x64\x53\xe7\xbf\x91"
16587 "\xab\xd4\xd9\xda\xc9\x12\xae\xf7",
16588 .rlen = 128 + 24,
16589 },
16590};
16591
16592#define HMAC_SHA256_DES_CBC_ENC_TEST_VEC 1
16593
16594static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = {
16595 { /*Generated with cryptopp*/
16596#ifdef __LITTLE_ENDIAN
16597 .key = "\x08\x00" /* rta length */
16598 "\x01\x00" /* rta type */
16599#else
16600 .key = "\x00\x08" /* rta length */
16601 "\x00\x01" /* rta type */
16602#endif
16603 "\x00\x00\x00\x08" /* enc key length */
16604 "\x11\x22\x33\x44\x55\x66\x77\x88"
16605 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16606 "\x22\x33\x44\x55\x66\x77\x88\x99"
16607 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16608 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16609 .klen = 8 + 32 + 8,
16610 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016611 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16612 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16613 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016614 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16615 "\x53\x20\x63\x65\x65\x72\x73\x74"
16616 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16617 "\x20\x79\x65\x53\x72\x63\x74\x65"
16618 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16619 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16620 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16621 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16622 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16623 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16624 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16625 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16626 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16627 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16628 "\x63\x65\x65\x72\x73\x74\x54\x20"
16629 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16630 .ilen = 128,
16631 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16632 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16633 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16634 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16635 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16636 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16637 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16638 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16639 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16640 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16641 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16642 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16643 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16644 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16645 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16646 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16647 "\xc6\x58\xa1\x60\x70\x91\x39\x36"
16648 "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e"
16649 "\xde\x63\xde\x76\x52\xde\x9f\xba"
16650 "\x90\xcf\x15\xf2\xbb\x6e\x84\x00",
16651 .rlen = 128 + 32,
16652 },
16653};
16654
16655#define HMAC_SHA384_DES_CBC_ENC_TEST_VEC 1
16656
16657static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = {
16658 { /*Generated with cryptopp*/
16659#ifdef __LITTLE_ENDIAN
16660 .key = "\x08\x00" /* rta length */
16661 "\x01\x00" /* rta type */
16662#else
16663 .key = "\x00\x08" /* rta length */
16664 "\x00\x01" /* rta type */
16665#endif
16666 "\x00\x00\x00\x08" /* enc key length */
16667 "\x11\x22\x33\x44\x55\x66\x77\x88"
16668 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16669 "\x22\x33\x44\x55\x66\x77\x88\x99"
16670 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16671 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16672 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16673 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16674 .klen = 8 + 48 + 8,
16675 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016676 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16677 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16678 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016679 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16680 "\x53\x20\x63\x65\x65\x72\x73\x74"
16681 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16682 "\x20\x79\x65\x53\x72\x63\x74\x65"
16683 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16684 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16685 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16686 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16687 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16688 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16689 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16690 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16691 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16692 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16693 "\x63\x65\x65\x72\x73\x74\x54\x20"
16694 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16695 .ilen = 128,
16696 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16697 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16698 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16699 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16700 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16701 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16702 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16703 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16704 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16705 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16706 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16707 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16708 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16709 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16710 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16711 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16712 "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0"
16713 "\xc8\x8c\xef\x25\x07\x83\x11\x3a"
16714 "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe"
16715 "\x5e\x67\xb5\x74\xe7\xe7\x85\x61"
16716 "\x6a\x95\x26\x75\xcc\x53\x89\xf3"
16717 "\x74\xc9\x2a\x76\x20\xa2\x64\x62",
16718 .rlen = 128 + 48,
16719 },
16720};
16721
16722#define HMAC_SHA512_DES_CBC_ENC_TEST_VEC 1
16723
16724static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = {
16725 { /*Generated with cryptopp*/
16726#ifdef __LITTLE_ENDIAN
16727 .key = "\x08\x00" /* rta length */
16728 "\x01\x00" /* rta type */
16729#else
16730 .key = "\x00\x08" /* rta length */
16731 "\x00\x01" /* rta type */
16732#endif
16733 "\x00\x00\x00\x08" /* enc key length */
16734 "\x11\x22\x33\x44\x55\x66\x77\x88"
16735 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16736 "\x22\x33\x44\x55\x66\x77\x88\x99"
16737 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16738 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16739 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16740 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16741 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16742 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16743 .klen = 8 + 64 + 8,
16744 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016745 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16746 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16747 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016748 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16749 "\x53\x20\x63\x65\x65\x72\x73\x74"
16750 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16751 "\x20\x79\x65\x53\x72\x63\x74\x65"
16752 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16753 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16754 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16755 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16756 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16757 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16758 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16759 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16760 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16761 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16762 "\x63\x65\x65\x72\x73\x74\x54\x20"
16763 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16764 .ilen = 128,
16765 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16766 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16767 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16768 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16769 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16770 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16771 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16772 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16773 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16774 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16775 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16776 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16777 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16778 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16779 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16780 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16781 "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e"
16782 "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb"
16783 "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb"
16784 "\x58\x83\xda\x67\xfb\x21\x24\xa2"
16785 "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93"
16786 "\x97\xe2\xe3\xb8\xaa\x48\x85\xee"
16787 "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96"
16788 "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b",
16789 .rlen = 128 + 64,
16790 },
16791};
16792
16793#define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC 1
16794
16795static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = {
16796 { /*Generated with cryptopp*/
16797#ifdef __LITTLE_ENDIAN
16798 .key = "\x08\x00" /* rta length */
16799 "\x01\x00" /* rta type */
16800#else
16801 .key = "\x00\x08" /* rta length */
16802 "\x00\x01" /* rta type */
16803#endif
16804 "\x00\x00\x00\x18" /* enc key length */
16805 "\x11\x22\x33\x44\x55\x66\x77\x88"
16806 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16807 "\x22\x33\x44\x55"
16808 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16809 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16810 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16811 .klen = 8 + 20 + 24,
16812 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016813 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16814 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16815 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016816 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16817 "\x53\x20\x63\x65\x65\x72\x73\x74"
16818 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16819 "\x20\x79\x65\x53\x72\x63\x74\x65"
16820 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16821 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16822 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16823 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16824 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16825 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16826 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16827 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16828 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16829 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16830 "\x63\x65\x65\x72\x73\x74\x54\x20"
16831 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16832 .ilen = 128,
16833 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16834 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16835 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16836 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16837 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16838 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16839 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16840 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16841 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16842 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16843 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16844 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16845 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16846 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16847 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16848 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16849 "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6"
16850 "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf"
16851 "\xd1\x60\x91\xb3",
16852 .rlen = 128 + 20,
16853 },
16854};
16855
16856#define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC 1
16857
16858static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = {
16859 { /*Generated with cryptopp*/
16860#ifdef __LITTLE_ENDIAN
16861 .key = "\x08\x00" /* rta length */
16862 "\x01\x00" /* rta type */
16863#else
16864 .key = "\x00\x08" /* rta length */
16865 "\x00\x01" /* rta type */
16866#endif
16867 "\x00\x00\x00\x18" /* enc key length */
16868 "\x11\x22\x33\x44\x55\x66\x77\x88"
16869 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16870 "\x22\x33\x44\x55\x66\x77\x88\x99"
16871 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16872 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16873 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16874 .klen = 8 + 24 + 24,
16875 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016876 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16877 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16878 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016879 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16880 "\x53\x20\x63\x65\x65\x72\x73\x74"
16881 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16882 "\x20\x79\x65\x53\x72\x63\x74\x65"
16883 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16884 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16885 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16886 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16887 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16888 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16889 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16890 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16891 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16892 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16893 "\x63\x65\x65\x72\x73\x74\x54\x20"
16894 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16895 .ilen = 128,
16896 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16897 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16898 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16899 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16900 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16901 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16902 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16903 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16904 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16905 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16906 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16907 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16908 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16909 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16910 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16911 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16912 "\x15\x24\x7f\x5a\x45\x4a\x66\xce"
16913 "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c"
16914 "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0",
16915 .rlen = 128 + 24,
16916 },
16917};
16918
16919#define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC 1
16920
16921static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = {
16922 { /*Generated with cryptopp*/
16923#ifdef __LITTLE_ENDIAN
16924 .key = "\x08\x00" /* rta length */
16925 "\x01\x00" /* rta type */
16926#else
16927 .key = "\x00\x08" /* rta length */
16928 "\x00\x01" /* rta type */
16929#endif
16930 "\x00\x00\x00\x18" /* enc key length */
16931 "\x11\x22\x33\x44\x55\x66\x77\x88"
16932 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16933 "\x22\x33\x44\x55\x66\x77\x88\x99"
16934 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16935 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16936 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16937 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16938 .klen = 8 + 32 + 24,
16939 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080016940 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
16941 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16942 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053016943 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16944 "\x53\x20\x63\x65\x65\x72\x73\x74"
16945 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16946 "\x20\x79\x65\x53\x72\x63\x74\x65"
16947 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16948 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16949 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16950 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16951 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16952 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16953 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16954 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16955 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16956 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16957 "\x63\x65\x65\x72\x73\x74\x54\x20"
16958 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16959 .ilen = 128,
16960 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16961 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16962 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16963 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16964 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16965 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16966 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16967 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16968 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16969 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16970 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16971 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16972 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16973 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16974 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16975 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16976 "\x73\xb0\xea\x9f\xe8\x18\x80\xd6"
16977 "\x56\x38\x44\xc0\xdb\xe3\x4f\x71"
16978 "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f"
16979 "\xca\x43\x95\xdf\x80\x61\x81\xa9",
16980 .rlen = 128 + 32,
16981 },
16982};
16983
16984#define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC 1
16985
16986static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = {
16987 { /*Generated with cryptopp*/
16988#ifdef __LITTLE_ENDIAN
16989 .key = "\x08\x00" /* rta length */
16990 "\x01\x00" /* rta type */
16991#else
16992 .key = "\x00\x08" /* rta length */
16993 "\x00\x01" /* rta type */
16994#endif
16995 "\x00\x00\x00\x18" /* enc key length */
16996 "\x11\x22\x33\x44\x55\x66\x77\x88"
16997 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16998 "\x22\x33\x44\x55\x66\x77\x88\x99"
16999 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
17000 "\x33\x44\x55\x66\x77\x88\x99\xaa"
17001 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
17002 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
17003 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
17004 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
17005 .klen = 8 + 48 + 24,
17006 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080017007 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
17008 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
17009 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053017010 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
17011 "\x53\x20\x63\x65\x65\x72\x73\x74"
17012 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
17013 "\x20\x79\x65\x53\x72\x63\x74\x65"
17014 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
17015 "\x79\x6e\x53\x20\x63\x65\x65\x72"
17016 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
17017 "\x6e\x61\x20\x79\x65\x53\x72\x63"
17018 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
17019 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
17020 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
17021 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
17022 "\x72\x63\x74\x65\x20\x73\x6f\x54"
17023 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
17024 "\x63\x65\x65\x72\x73\x74\x54\x20"
17025 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
17026 .ilen = 128,
17027 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
17028 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
17029 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
17030 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
17031 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
17032 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
17033 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
17034 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
17035 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
17036 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
17037 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
17038 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
17039 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
17040 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
17041 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
17042 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
17043 "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7"
17044 "\x70\xe7\x93\xbf\x73\xe6\x9f\x83"
17045 "\x99\x62\x23\xe6\x5b\xd0\xda\x18"
17046 "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39"
17047 "\x36\x5d\x13\x2f\x86\x10\x78\xd6"
17048 "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b",
17049 .rlen = 128 + 48,
17050 },
17051};
17052
17053#define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC 1
17054
17055static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = {
17056 { /*Generated with cryptopp*/
17057#ifdef __LITTLE_ENDIAN
17058 .key = "\x08\x00" /* rta length */
17059 "\x01\x00" /* rta type */
17060#else
17061 .key = "\x00\x08" /* rta length */
17062 "\x00\x01" /* rta type */
17063#endif
17064 "\x00\x00\x00\x18" /* enc key length */
17065 "\x11\x22\x33\x44\x55\x66\x77\x88"
17066 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
17067 "\x22\x33\x44\x55\x66\x77\x88\x99"
17068 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
17069 "\x33\x44\x55\x66\x77\x88\x99\xaa"
17070 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
17071 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
17072 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
17073 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
17074 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
17075 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
17076 .klen = 8 + 64 + 24,
17077 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
Herbert Xu7079ce62015-07-30 17:53:14 +080017078 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01"
17079 "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
17080 .alen = 16,
Nitesh Lal5208ed22014-05-21 17:09:08 +053017081 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
17082 "\x53\x20\x63\x65\x65\x72\x73\x74"
17083 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
17084 "\x20\x79\x65\x53\x72\x63\x74\x65"
17085 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
17086 "\x79\x6e\x53\x20\x63\x65\x65\x72"
17087 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
17088 "\x6e\x61\x20\x79\x65\x53\x72\x63"
17089 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
17090 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
17091 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
17092 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
17093 "\x72\x63\x74\x65\x20\x73\x6f\x54"
17094 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
17095 "\x63\x65\x65\x72\x73\x74\x54\x20"
17096 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
17097 .ilen = 128,
17098 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
17099 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
17100 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
17101 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
17102 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
17103 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
17104 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
17105 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
17106 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
17107 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
17108 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
17109 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
17110 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
17111 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
17112 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
17113 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
17114 "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32"
17115 "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e"
17116 "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b"
17117 "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60"
17118 "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0"
17119 "\x2a\x74\xd4\x65\x12\xcb\x55\xf2"
17120 "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2"
17121 "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb",
17122 .rlen = 128 + 64,
17123 },
17124};
17125
Herbert Xuda7f0332008-07-31 17:08:25 +080017126static struct cipher_testvec aes_lrw_enc_tv_template[] = {
17127 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
17128 { /* LRW-32-AES 1 */
17129 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
17130 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
17131 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
17132 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
17133 .klen = 32,
17134 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17135 "\x00\x00\x00\x00\x00\x00\x00\x01",
17136 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17137 "\x38\x39\x41\x42\x43\x44\x45\x46",
17138 .ilen = 16,
17139 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
17140 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
17141 .rlen = 16,
17142 }, { /* LRW-32-AES 2 */
17143 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
17144 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
17145 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
17146 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
17147 .klen = 32,
17148 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17149 "\x00\x00\x00\x00\x00\x00\x00\x02",
17150 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17151 "\x38\x39\x41\x42\x43\x44\x45\x46",
17152 .ilen = 16,
17153 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
17154 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
17155 .rlen = 16,
17156 }, { /* LRW-32-AES 3 */
17157 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
17158 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
17159 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
17160 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
17161 .klen = 32,
17162 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17163 "\x00\x00\x00\x02\x00\x00\x00\x00",
17164 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17165 "\x38\x39\x41\x42\x43\x44\x45\x46",
17166 .ilen = 16,
17167 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
17168 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
17169 .rlen = 16,
17170 }, { /* LRW-32-AES 4 */
17171 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
17172 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
17173 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
17174 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
17175 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
17176 .klen = 40,
17177 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17178 "\x00\x00\x00\x00\x00\x00\x00\x01",
17179 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17180 "\x38\x39\x41\x42\x43\x44\x45\x46",
17181 .ilen = 16,
17182 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
17183 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
17184 .rlen = 16,
17185 }, { /* LRW-32-AES 5 */
17186 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
17187 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
17188 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
17189 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
17190 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
17191 .klen = 40,
17192 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17193 "\x00\x00\x00\x02\x00\x00\x00\x00",
17194 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17195 "\x38\x39\x41\x42\x43\x44\x45\x46",
17196 .ilen = 16,
17197 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
17198 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
17199 .rlen = 16,
17200 }, { /* LRW-32-AES 6 */
17201 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17202 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17203 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17204 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17205 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17206 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17207 .klen = 48,
17208 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17209 "\x00\x00\x00\x00\x00\x00\x00\x01",
17210 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17211 "\x38\x39\x41\x42\x43\x44\x45\x46",
17212 .ilen = 16,
17213 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
17214 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
17215 .rlen = 16,
17216 }, { /* LRW-32-AES 7 */
17217 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
17218 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
17219 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
17220 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
17221 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
17222 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
17223 .klen = 48,
17224 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17225 "\x00\x00\x00\x02\x00\x00\x00\x00",
17226 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17227 "\x38\x39\x41\x42\x43\x44\x45\x46",
17228 .ilen = 16,
17229 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
17230 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
17231 .rlen = 16,
17232 }, {
17233/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
17234 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17235 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17236 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17237 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17238 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17239 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17240 .klen = 48,
17241 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17242 "\x00\x00\x00\x00\x00\x00\x00\x01",
17243 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
17244 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
17245 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
17246 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
17247 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
17248 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
17249 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
17250 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
17251 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
17252 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
17253 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
17254 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
17255 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
17256 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
17257 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
17258 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
17259 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
17260 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
17261 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
17262 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
17263 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
17264 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
17265 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
17266 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
17267 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
17268 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
17269 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
17270 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
17271 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
17272 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
17273 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
17274 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
17275 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
17276 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
17277 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
17278 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
17279 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
17280 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
17281 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
17282 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
17283 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
17284 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
17285 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
17286 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
17287 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
17288 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
17289 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
17290 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
17291 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
17292 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
17293 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
17294 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
17295 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
17296 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
17297 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
17298 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
17299 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
17300 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
17301 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
17302 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
17303 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
17304 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
17305 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
17306 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
17307 .ilen = 512,
17308 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
17309 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
17310 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
17311 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
17312 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
17313 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
17314 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
17315 "\xe8\x58\x46\x97\x39\x51\x07\xde"
17316 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
17317 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
17318 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
17319 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
17320 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
17321 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
17322 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
17323 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
17324 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
17325 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
17326 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
17327 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
17328 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
17329 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
17330 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
17331 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
17332 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
17333 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
17334 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
17335 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
17336 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
17337 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
17338 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
17339 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
17340 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
17341 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
17342 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
17343 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
17344 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
17345 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
17346 "\xb8\x79\x78\x97\x94\xff\x72\x13"
17347 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
17348 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
17349 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
17350 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
17351 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
17352 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
17353 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
17354 "\x1e\x86\x53\x11\x53\x94\x00\xee"
17355 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
17356 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
17357 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
17358 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
17359 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
17360 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
17361 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
17362 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
17363 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
17364 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
17365 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
17366 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
17367 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
17368 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
17369 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
17370 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
17371 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
17372 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017373 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017374 .np = 3,
17375 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017376 }
17377};
17378
17379static struct cipher_testvec aes_lrw_dec_tv_template[] = {
17380 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
17381 /* same as enc vectors with input and result reversed */
17382 { /* LRW-32-AES 1 */
17383 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
17384 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
17385 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
17386 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
17387 .klen = 32,
17388 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17389 "\x00\x00\x00\x00\x00\x00\x00\x01",
17390 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
17391 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
17392 .ilen = 16,
17393 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17394 "\x38\x39\x41\x42\x43\x44\x45\x46",
17395 .rlen = 16,
17396 }, { /* LRW-32-AES 2 */
17397 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
17398 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
17399 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
17400 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
17401 .klen = 32,
17402 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17403 "\x00\x00\x00\x00\x00\x00\x00\x02",
17404 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
17405 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
17406 .ilen = 16,
17407 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17408 "\x38\x39\x41\x42\x43\x44\x45\x46",
17409 .rlen = 16,
17410 }, { /* LRW-32-AES 3 */
17411 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
17412 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
17413 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
17414 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
17415 .klen = 32,
17416 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17417 "\x00\x00\x00\x02\x00\x00\x00\x00",
17418 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
17419 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
17420 .ilen = 16,
17421 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17422 "\x38\x39\x41\x42\x43\x44\x45\x46",
17423 .rlen = 16,
17424 }, { /* LRW-32-AES 4 */
17425 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
17426 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
17427 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
17428 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
17429 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
17430 .klen = 40,
17431 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17432 "\x00\x00\x00\x00\x00\x00\x00\x01",
17433 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
17434 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
17435 .ilen = 16,
17436 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17437 "\x38\x39\x41\x42\x43\x44\x45\x46",
17438 .rlen = 16,
17439 }, { /* LRW-32-AES 5 */
17440 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
17441 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
17442 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
17443 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
17444 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
17445 .klen = 40,
17446 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17447 "\x00\x00\x00\x02\x00\x00\x00\x00",
17448 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
17449 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
17450 .ilen = 16,
17451 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17452 "\x38\x39\x41\x42\x43\x44\x45\x46",
17453 .rlen = 16,
17454 }, { /* LRW-32-AES 6 */
17455 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17456 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17457 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17458 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17459 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17460 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17461 .klen = 48,
17462 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17463 "\x00\x00\x00\x00\x00\x00\x00\x01",
17464 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
17465 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
17466 .ilen = 16,
17467 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17468 "\x38\x39\x41\x42\x43\x44\x45\x46",
17469 .rlen = 16,
17470 }, { /* LRW-32-AES 7 */
17471 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
17472 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
17473 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
17474 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
17475 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
17476 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
17477 .klen = 48,
17478 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17479 "\x00\x00\x00\x02\x00\x00\x00\x00",
17480 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
17481 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
17482 .ilen = 16,
17483 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17484 "\x38\x39\x41\x42\x43\x44\x45\x46",
17485 .rlen = 16,
17486 }, {
17487/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
17488 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17489 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17490 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17491 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17492 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17493 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17494 .klen = 48,
17495 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17496 "\x00\x00\x00\x00\x00\x00\x00\x01",
17497 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
17498 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
17499 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
17500 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
17501 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
17502 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
17503 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
17504 "\xe8\x58\x46\x97\x39\x51\x07\xde"
17505 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
17506 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
17507 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
17508 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
17509 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
17510 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
17511 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
17512 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
17513 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
17514 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
17515 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
17516 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
17517 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
17518 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
17519 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
17520 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
17521 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
17522 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
17523 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
17524 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
17525 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
17526 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
17527 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
17528 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
17529 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
17530 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
17531 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
17532 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
17533 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
17534 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
17535 "\xb8\x79\x78\x97\x94\xff\x72\x13"
17536 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
17537 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
17538 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
17539 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
17540 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
17541 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
17542 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
17543 "\x1e\x86\x53\x11\x53\x94\x00\xee"
17544 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
17545 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
17546 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
17547 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
17548 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
17549 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
17550 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
17551 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
17552 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
17553 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
17554 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
17555 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
17556 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
17557 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
17558 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
17559 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
17560 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
17561 .ilen = 512,
17562 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
17563 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
17564 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
17565 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
17566 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
17567 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
17568 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
17569 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
17570 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
17571 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
17572 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
17573 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
17574 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
17575 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
17576 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
17577 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
17578 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
17579 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
17580 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
17581 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
17582 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
17583 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
17584 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
17585 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
17586 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
17587 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
17588 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
17589 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
17590 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
17591 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
17592 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
17593 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
17594 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
17595 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
17596 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
17597 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
17598 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
17599 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
17600 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
17601 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
17602 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
17603 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
17604 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
17605 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
17606 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
17607 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
17608 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
17609 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
17610 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
17611 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
17612 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
17613 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
17614 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
17615 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
17616 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
17617 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
17618 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
17619 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
17620 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
17621 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
17622 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
17623 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
17624 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
17625 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
17626 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017627 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017628 .np = 3,
17629 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017630 }
17631};
17632
17633static struct cipher_testvec aes_xts_enc_tv_template[] = {
17634 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17635 { /* XTS-AES 1 */
17636 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17637 "\x00\x00\x00\x00\x00\x00\x00\x00"
17638 "\x00\x00\x00\x00\x00\x00\x00\x00"
17639 "\x00\x00\x00\x00\x00\x00\x00\x00",
17640 .klen = 32,
17641 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17642 "\x00\x00\x00\x00\x00\x00\x00\x00",
17643 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
17644 "\x00\x00\x00\x00\x00\x00\x00\x00"
17645 "\x00\x00\x00\x00\x00\x00\x00\x00"
17646 "\x00\x00\x00\x00\x00\x00\x00\x00",
17647 .ilen = 32,
17648 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17649 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17650 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17651 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17652 .rlen = 32,
17653 }, { /* XTS-AES 2 */
17654 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17655 "\x11\x11\x11\x11\x11\x11\x11\x11"
17656 "\x22\x22\x22\x22\x22\x22\x22\x22"
17657 "\x22\x22\x22\x22\x22\x22\x22\x22",
17658 .klen = 32,
17659 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17660 "\x00\x00\x00\x00\x00\x00\x00\x00",
17661 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
17662 "\x44\x44\x44\x44\x44\x44\x44\x44"
17663 "\x44\x44\x44\x44\x44\x44\x44\x44"
17664 "\x44\x44\x44\x44\x44\x44\x44\x44",
17665 .ilen = 32,
17666 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17667 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17668 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17669 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17670 .rlen = 32,
17671 }, { /* XTS-AES 3 */
17672 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17673 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17674 "\x22\x22\x22\x22\x22\x22\x22\x22"
17675 "\x22\x22\x22\x22\x22\x22\x22\x22",
17676 .klen = 32,
17677 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17678 "\x00\x00\x00\x00\x00\x00\x00\x00",
17679 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
17680 "\x44\x44\x44\x44\x44\x44\x44\x44"
17681 "\x44\x44\x44\x44\x44\x44\x44\x44"
17682 "\x44\x44\x44\x44\x44\x44\x44\x44",
17683 .ilen = 32,
17684 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17685 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17686 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17687 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17688 .rlen = 32,
17689 }, { /* XTS-AES 4 */
17690 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17691 "\x23\x53\x60\x28\x74\x71\x35\x26"
17692 "\x31\x41\x59\x26\x53\x58\x97\x93"
17693 "\x23\x84\x62\x64\x33\x83\x27\x95",
17694 .klen = 32,
17695 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17696 "\x00\x00\x00\x00\x00\x00\x00\x00",
17697 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17698 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17699 "\x10\x11\x12\x13\x14\x15\x16\x17"
17700 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17701 "\x20\x21\x22\x23\x24\x25\x26\x27"
17702 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17703 "\x30\x31\x32\x33\x34\x35\x36\x37"
17704 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17705 "\x40\x41\x42\x43\x44\x45\x46\x47"
17706 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17707 "\x50\x51\x52\x53\x54\x55\x56\x57"
17708 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17709 "\x60\x61\x62\x63\x64\x65\x66\x67"
17710 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17711 "\x70\x71\x72\x73\x74\x75\x76\x77"
17712 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17713 "\x80\x81\x82\x83\x84\x85\x86\x87"
17714 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17715 "\x90\x91\x92\x93\x94\x95\x96\x97"
17716 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17717 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17718 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17719 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17720 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17721 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17722 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17723 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17724 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17725 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17726 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17727 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17728 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17729 "\x00\x01\x02\x03\x04\x05\x06\x07"
17730 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17731 "\x10\x11\x12\x13\x14\x15\x16\x17"
17732 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17733 "\x20\x21\x22\x23\x24\x25\x26\x27"
17734 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17735 "\x30\x31\x32\x33\x34\x35\x36\x37"
17736 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17737 "\x40\x41\x42\x43\x44\x45\x46\x47"
17738 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17739 "\x50\x51\x52\x53\x54\x55\x56\x57"
17740 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17741 "\x60\x61\x62\x63\x64\x65\x66\x67"
17742 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17743 "\x70\x71\x72\x73\x74\x75\x76\x77"
17744 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17745 "\x80\x81\x82\x83\x84\x85\x86\x87"
17746 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17747 "\x90\x91\x92\x93\x94\x95\x96\x97"
17748 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17749 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17750 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17751 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17752 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17753 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17754 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17755 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17756 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17757 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17758 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17759 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17760 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17761 .ilen = 512,
17762 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17763 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17764 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17765 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17766 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17767 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17768 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17769 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17770 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17771 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17772 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17773 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17774 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17775 "\x22\x97\x61\x46\xae\x20\xce\x84"
17776 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17777 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17778 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17779 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17780 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17781 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17782 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17783 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17784 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17785 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17786 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17787 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17788 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17789 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17790 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17791 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17792 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17793 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17794 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17795 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17796 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17797 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17798 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17799 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17800 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17801 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17802 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17803 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17804 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17805 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17806 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17807 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17808 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17809 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17810 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17811 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17812 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17813 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17814 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17815 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17816 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17817 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17818 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17819 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17820 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17821 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17822 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17823 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17824 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17825 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17826 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017827 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17828 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17829 "\x23\x53\x60\x28\x74\x71\x35\x26"
17830 "\x62\x49\x77\x57\x24\x70\x93\x69"
17831 "\x99\x59\x57\x49\x66\x96\x76\x27"
17832 "\x31\x41\x59\x26\x53\x58\x97\x93"
17833 "\x23\x84\x62\x64\x33\x83\x27\x95"
17834 "\x02\x88\x41\x97\x16\x93\x99\x37"
17835 "\x51\x05\x82\x09\x74\x94\x45\x92",
17836 .klen = 64,
17837 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17838 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017839 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17840 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17841 "\x10\x11\x12\x13\x14\x15\x16\x17"
17842 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17843 "\x20\x21\x22\x23\x24\x25\x26\x27"
17844 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17845 "\x30\x31\x32\x33\x34\x35\x36\x37"
17846 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17847 "\x40\x41\x42\x43\x44\x45\x46\x47"
17848 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17849 "\x50\x51\x52\x53\x54\x55\x56\x57"
17850 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17851 "\x60\x61\x62\x63\x64\x65\x66\x67"
17852 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17853 "\x70\x71\x72\x73\x74\x75\x76\x77"
17854 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17855 "\x80\x81\x82\x83\x84\x85\x86\x87"
17856 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17857 "\x90\x91\x92\x93\x94\x95\x96\x97"
17858 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17859 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17860 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17861 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17862 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17863 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17864 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17865 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17866 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17867 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17868 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17869 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17870 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17871 "\x00\x01\x02\x03\x04\x05\x06\x07"
17872 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17873 "\x10\x11\x12\x13\x14\x15\x16\x17"
17874 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17875 "\x20\x21\x22\x23\x24\x25\x26\x27"
17876 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17877 "\x30\x31\x32\x33\x34\x35\x36\x37"
17878 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17879 "\x40\x41\x42\x43\x44\x45\x46\x47"
17880 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17881 "\x50\x51\x52\x53\x54\x55\x56\x57"
17882 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17883 "\x60\x61\x62\x63\x64\x65\x66\x67"
17884 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17885 "\x70\x71\x72\x73\x74\x75\x76\x77"
17886 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17887 "\x80\x81\x82\x83\x84\x85\x86\x87"
17888 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17889 "\x90\x91\x92\x93\x94\x95\x96\x97"
17890 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17891 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17892 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17893 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17894 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17895 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17896 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17897 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17898 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17899 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17900 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17901 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17902 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17903 .ilen = 512,
17904 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17905 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17906 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17907 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17908 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17909 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17910 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17911 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17912 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17913 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17914 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17915 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17916 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17917 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17918 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17919 "\x00\x02\x08\x87\x89\x14\x29\xca"
17920 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17921 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17922 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17923 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17924 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17925 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17926 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17927 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17928 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17929 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17930 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17931 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17932 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17933 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17934 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17935 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17936 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17937 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17938 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17939 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17940 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17941 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17942 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17943 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17944 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17945 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17946 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17947 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17948 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17949 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17950 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17951 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17952 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17953 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17954 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17955 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17956 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17957 "\x94\x30\x54\xff\x84\x01\x14\x93"
17958 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17959 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17960 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17961 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17962 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17963 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17964 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17965 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17966 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17967 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17968 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017969 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017970 .np = 3,
17971 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017972 }
17973};
17974
17975static struct cipher_testvec aes_xts_dec_tv_template[] = {
17976 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17977 { /* XTS-AES 1 */
17978 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17979 "\x00\x00\x00\x00\x00\x00\x00\x00"
17980 "\x00\x00\x00\x00\x00\x00\x00\x00"
17981 "\x00\x00\x00\x00\x00\x00\x00\x00",
17982 .klen = 32,
17983 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17984 "\x00\x00\x00\x00\x00\x00\x00\x00",
17985 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17986 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17987 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17988 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17989 .ilen = 32,
17990 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
17991 "\x00\x00\x00\x00\x00\x00\x00\x00"
17992 "\x00\x00\x00\x00\x00\x00\x00\x00"
17993 "\x00\x00\x00\x00\x00\x00\x00\x00",
17994 .rlen = 32,
17995 }, { /* XTS-AES 2 */
17996 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17997 "\x11\x11\x11\x11\x11\x11\x11\x11"
17998 "\x22\x22\x22\x22\x22\x22\x22\x22"
17999 "\x22\x22\x22\x22\x22\x22\x22\x22",
18000 .klen = 32,
18001 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
18002 "\x00\x00\x00\x00\x00\x00\x00\x00",
18003 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
18004 "\x39\x33\x40\x38\xac\xef\x83\x8b"
18005 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
18006 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
18007 .ilen = 32,
18008 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
18009 "\x44\x44\x44\x44\x44\x44\x44\x44"
18010 "\x44\x44\x44\x44\x44\x44\x44\x44"
18011 "\x44\x44\x44\x44\x44\x44\x44\x44",
18012 .rlen = 32,
18013 }, { /* XTS-AES 3 */
18014 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
18015 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
18016 "\x22\x22\x22\x22\x22\x22\x22\x22"
18017 "\x22\x22\x22\x22\x22\x22\x22\x22",
18018 .klen = 32,
18019 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
18020 "\x00\x00\x00\x00\x00\x00\x00\x00",
18021 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
18022 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
18023 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
18024 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
18025 .ilen = 32,
18026 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
18027 "\x44\x44\x44\x44\x44\x44\x44\x44"
18028 "\x44\x44\x44\x44\x44\x44\x44\x44"
18029 "\x44\x44\x44\x44\x44\x44\x44\x44",
18030 .rlen = 32,
18031 }, { /* XTS-AES 4 */
18032 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
18033 "\x23\x53\x60\x28\x74\x71\x35\x26"
18034 "\x31\x41\x59\x26\x53\x58\x97\x93"
18035 "\x23\x84\x62\x64\x33\x83\x27\x95",
18036 .klen = 32,
18037 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18038 "\x00\x00\x00\x00\x00\x00\x00\x00",
18039 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
18040 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
18041 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
18042 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
18043 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
18044 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
18045 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
18046 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
18047 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
18048 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
18049 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
18050 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
18051 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
18052 "\x22\x97\x61\x46\xae\x20\xce\x84"
18053 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
18054 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
18055 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
18056 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
18057 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
18058 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
18059 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
18060 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
18061 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
18062 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
18063 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
18064 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
18065 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
18066 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
18067 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
18068 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
18069 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
18070 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
18071 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
18072 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
18073 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
18074 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
18075 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
18076 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
18077 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
18078 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
18079 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
18080 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
18081 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
18082 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
18083 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
18084 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
18085 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
18086 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
18087 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
18088 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
18089 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
18090 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
18091 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
18092 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
18093 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
18094 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
18095 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
18096 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
18097 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
18098 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
18099 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
18100 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
18101 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
18102 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
18103 .ilen = 512,
18104 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
18105 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18106 "\x10\x11\x12\x13\x14\x15\x16\x17"
18107 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18108 "\x20\x21\x22\x23\x24\x25\x26\x27"
18109 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18110 "\x30\x31\x32\x33\x34\x35\x36\x37"
18111 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18112 "\x40\x41\x42\x43\x44\x45\x46\x47"
18113 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18114 "\x50\x51\x52\x53\x54\x55\x56\x57"
18115 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18116 "\x60\x61\x62\x63\x64\x65\x66\x67"
18117 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18118 "\x70\x71\x72\x73\x74\x75\x76\x77"
18119 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18120 "\x80\x81\x82\x83\x84\x85\x86\x87"
18121 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18122 "\x90\x91\x92\x93\x94\x95\x96\x97"
18123 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18124 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18125 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18126 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18127 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18128 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18129 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18130 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18131 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18132 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18133 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18134 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18135 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18136 "\x00\x01\x02\x03\x04\x05\x06\x07"
18137 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18138 "\x10\x11\x12\x13\x14\x15\x16\x17"
18139 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18140 "\x20\x21\x22\x23\x24\x25\x26\x27"
18141 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18142 "\x30\x31\x32\x33\x34\x35\x36\x37"
18143 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18144 "\x40\x41\x42\x43\x44\x45\x46\x47"
18145 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18146 "\x50\x51\x52\x53\x54\x55\x56\x57"
18147 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18148 "\x60\x61\x62\x63\x64\x65\x66\x67"
18149 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18150 "\x70\x71\x72\x73\x74\x75\x76\x77"
18151 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18152 "\x80\x81\x82\x83\x84\x85\x86\x87"
18153 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18154 "\x90\x91\x92\x93\x94\x95\x96\x97"
18155 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18156 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18157 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18158 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18159 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18160 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18161 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18162 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18163 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18164 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18165 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18166 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18167 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18168 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100018169 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
18170 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
18171 "\x23\x53\x60\x28\x74\x71\x35\x26"
18172 "\x62\x49\x77\x57\x24\x70\x93\x69"
18173 "\x99\x59\x57\x49\x66\x96\x76\x27"
18174 "\x31\x41\x59\x26\x53\x58\x97\x93"
18175 "\x23\x84\x62\x64\x33\x83\x27\x95"
18176 "\x02\x88\x41\x97\x16\x93\x99\x37"
18177 "\x51\x05\x82\x09\x74\x94\x45\x92",
18178 .klen = 64,
18179 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
18180 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100018181 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
18182 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
18183 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
18184 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
18185 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
18186 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
18187 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
18188 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
18189 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
18190 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
18191 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
18192 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
18193 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
18194 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
18195 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
18196 "\x00\x02\x08\x87\x89\x14\x29\xca"
18197 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
18198 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
18199 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
18200 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
18201 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
18202 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
18203 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
18204 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
18205 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
18206 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
18207 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
18208 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
18209 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
18210 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
18211 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
18212 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
18213 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
18214 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
18215 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
18216 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
18217 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
18218 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
18219 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
18220 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
18221 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
18222 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
18223 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
18224 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
18225 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
18226 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
18227 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
18228 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
18229 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
18230 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
18231 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
18232 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
18233 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
18234 "\x94\x30\x54\xff\x84\x01\x14\x93"
18235 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
18236 "\x53\x76\x44\x1a\x77\xed\x43\x85"
18237 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
18238 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
18239 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
18240 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
18241 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
18242 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
18243 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
18244 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
18245 .ilen = 512,
18246 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
18247 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18248 "\x10\x11\x12\x13\x14\x15\x16\x17"
18249 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18250 "\x20\x21\x22\x23\x24\x25\x26\x27"
18251 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18252 "\x30\x31\x32\x33\x34\x35\x36\x37"
18253 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18254 "\x40\x41\x42\x43\x44\x45\x46\x47"
18255 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18256 "\x50\x51\x52\x53\x54\x55\x56\x57"
18257 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18258 "\x60\x61\x62\x63\x64\x65\x66\x67"
18259 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18260 "\x70\x71\x72\x73\x74\x75\x76\x77"
18261 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18262 "\x80\x81\x82\x83\x84\x85\x86\x87"
18263 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18264 "\x90\x91\x92\x93\x94\x95\x96\x97"
18265 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18266 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18267 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18268 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18269 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18270 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18271 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18272 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18273 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18274 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18275 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18276 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18277 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18278 "\x00\x01\x02\x03\x04\x05\x06\x07"
18279 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18280 "\x10\x11\x12\x13\x14\x15\x16\x17"
18281 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18282 "\x20\x21\x22\x23\x24\x25\x26\x27"
18283 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18284 "\x30\x31\x32\x33\x34\x35\x36\x37"
18285 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18286 "\x40\x41\x42\x43\x44\x45\x46\x47"
18287 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18288 "\x50\x51\x52\x53\x54\x55\x56\x57"
18289 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18290 "\x60\x61\x62\x63\x64\x65\x66\x67"
18291 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18292 "\x70\x71\x72\x73\x74\x75\x76\x77"
18293 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18294 "\x80\x81\x82\x83\x84\x85\x86\x87"
18295 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18296 "\x90\x91\x92\x93\x94\x95\x96\x97"
18297 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18298 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18299 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18300 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18301 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18302 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18303 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18304 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18305 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18306 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18307 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18308 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18309 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18310 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030018311 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018312 .np = 3,
18313 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080018314 }
18315};
18316
18317
18318static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018319 { /* From NIST Special Publication 800-38A, Appendix F.5 */
18320 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
18321 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
18322 .klen = 16,
18323 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18324 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18325 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18326 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18327 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18328 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18329 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18330 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18331 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18332 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18333 .ilen = 64,
18334 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
18335 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
18336 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
18337 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
18338 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
18339 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
18340 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
18341 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
18342 .rlen = 64,
18343 }, {
18344 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
18345 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
18346 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
18347 .klen = 24,
18348 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18349 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18350 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18351 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18352 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18353 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18354 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18355 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18356 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18357 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18358 .ilen = 64,
18359 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
18360 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
18361 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
18362 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
18363 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
18364 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
18365 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
18366 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
18367 .rlen = 64,
18368 }, {
18369 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
18370 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
18371 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
18372 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
18373 .klen = 32,
18374 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18375 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18376 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18377 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18378 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18379 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18380 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18381 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18382 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18383 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18384 .ilen = 64,
18385 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
18386 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
18387 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18388 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18389 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18390 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18391 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18392 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18393 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018394 }, { /* Generated with Crypto++ */
18395 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18396 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18397 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18398 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18399 .klen = 32,
18400 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18401 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18402 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18403 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18404 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18405 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18406 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18407 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18408 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18409 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18410 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18411 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18412 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18413 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18414 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18415 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18416 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18417 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18418 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18419 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18420 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18421 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18422 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18423 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18424 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18425 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18426 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18427 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18428 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18429 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18430 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18431 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18432 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18433 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18434 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18435 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18436 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18437 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18438 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18439 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18440 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18441 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18442 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18443 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18444 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18445 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18446 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18447 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18448 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18449 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18450 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18451 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18452 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18453 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18454 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18455 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18456 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18457 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18458 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18459 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18460 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18461 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18462 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18463 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18464 .ilen = 496,
18465 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18466 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18467 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18468 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18469 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18470 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18471 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18472 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18473 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18474 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18475 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18476 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18477 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18478 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18479 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18480 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18481 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18482 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18483 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18484 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18485 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18486 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18487 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18488 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18489 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18490 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18491 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18492 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18493 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18494 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18495 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18496 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18497 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18498 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18499 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18500 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18501 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18502 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18503 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18504 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18505 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18506 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18507 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18508 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18509 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18510 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18511 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18512 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18513 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18514 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18515 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18516 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18517 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18518 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18519 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18520 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18521 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18522 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18523 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18524 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18525 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18526 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18527 .rlen = 496,
18528 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018529 .np = 3,
18530 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018531 }, { /* Generated with Crypto++ */
18532 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18533 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18534 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18535 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18536 .klen = 32,
18537 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18538 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18539 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18540 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18541 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18542 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18543 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18544 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18545 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18546 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18547 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18548 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18549 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18550 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18551 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18552 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18553 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18554 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18555 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18556 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18557 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18558 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18559 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18560 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18561 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18562 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18563 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18564 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18565 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18566 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18567 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18568 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18569 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18570 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18571 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18572 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18573 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18574 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18575 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18576 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18577 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18578 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18579 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18580 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18581 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18582 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18583 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18584 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18585 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18586 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18587 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18588 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18589 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18590 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18591 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18592 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18593 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18594 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18595 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18596 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18597 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18598 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18599 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18600 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18601 "\x7B\xE4\x4D",
18602 .ilen = 499,
18603 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18604 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18605 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18606 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18607 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18608 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18609 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18610 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18611 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18612 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18613 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18614 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18615 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18616 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18617 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18618 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18619 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18620 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18621 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18622 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18623 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18624 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18625 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18626 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18627 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18628 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18629 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18630 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18631 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18632 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18633 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18634 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18635 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18636 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18637 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18638 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18639 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18640 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18641 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18642 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18643 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18644 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18645 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18646 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18647 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18648 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18649 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18650 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18651 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18652 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18653 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18654 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18655 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18656 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18657 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18658 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18659 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18660 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18661 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18662 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18663 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18664 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18665 "\xFB\xF2\x3F",
18666 .rlen = 499,
18667 .also_non_np = 1,
18668 .np = 2,
18669 .tap = { 499 - 16, 16 },
18670 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018671};
18672
18673static struct cipher_testvec aes_ctr_dec_tv_template[] = {
18674 { /* From NIST Special Publication 800-38A, Appendix F.5 */
18675 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
18676 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
18677 .klen = 16,
18678 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18679 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18680 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
18681 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
18682 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
18683 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
18684 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
18685 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
18686 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
18687 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
18688 .ilen = 64,
18689 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18690 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18691 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18692 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18693 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18694 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18695 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18696 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18697 .rlen = 64,
18698 }, {
18699 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
18700 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
18701 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
18702 .klen = 24,
18703 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18704 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18705 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
18706 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
18707 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
18708 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
18709 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
18710 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
18711 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
18712 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
18713 .ilen = 64,
18714 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18715 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18716 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18717 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18718 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18719 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18720 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18721 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18722 .rlen = 64,
18723 }, {
18724 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
18725 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
18726 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
18727 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
18728 .klen = 32,
18729 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18730 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18731 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
18732 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
18733 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18734 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18735 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18736 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18737 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18738 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18739 .ilen = 64,
18740 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18741 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18742 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18743 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18744 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18745 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18746 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18747 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18748 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018749 }, { /* Generated with Crypto++ */
18750 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18751 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18752 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18753 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18754 .klen = 32,
18755 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18756 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18757 .input = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18758 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18759 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18760 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18761 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18762 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18763 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18764 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18765 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18766 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18767 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18768 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18769 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18770 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18771 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18772 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18773 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18774 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18775 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18776 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18777 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18778 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18779 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18780 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18781 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18782 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18783 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18784 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18785 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18786 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18787 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18788 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18789 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18790 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18791 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18792 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18793 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18794 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18795 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18796 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18797 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18798 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18799 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18800 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18801 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18802 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18803 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18804 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18805 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18806 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18807 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18808 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18809 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18810 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18811 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18812 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18813 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18814 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18815 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18816 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18817 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18818 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18819 .ilen = 496,
18820 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18821 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18822 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18823 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18824 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18825 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18826 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18827 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18828 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18829 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18830 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18831 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18832 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18833 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18834 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18835 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18836 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18837 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18838 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18839 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18840 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18841 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18842 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18843 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18844 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18845 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18846 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18847 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18848 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18849 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18850 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18851 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18852 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18853 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18854 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18855 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18856 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18857 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18858 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18859 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18860 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18861 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18862 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18863 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18864 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18865 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18866 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18867 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18868 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18869 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18870 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18871 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18872 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18873 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18874 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18875 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18876 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18877 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18878 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18879 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18880 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18881 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18882 .rlen = 496,
18883 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018884 .np = 3,
18885 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018886 }, { /* Generated with Crypto++ */
18887 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18888 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18889 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18890 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18891 .klen = 32,
18892 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18893 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18894 .input = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18895 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18896 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18897 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18898 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18899 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18900 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18901 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18902 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18903 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18904 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18905 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18906 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18907 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18908 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18909 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18910 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18911 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18912 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18913 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18914 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18915 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18916 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18917 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18918 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18919 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18920 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18921 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18922 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18923 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18924 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18925 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18926 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18927 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18928 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18929 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18930 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18931 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18932 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18933 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18934 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18935 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18936 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18937 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18938 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18939 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18940 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18941 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18942 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18943 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18944 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18945 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18946 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18947 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18948 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18949 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18950 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18951 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18952 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18953 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18954 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18955 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18956 "\xFB\xF2\x3F",
18957 .ilen = 499,
18958 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18959 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18960 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18961 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18962 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18963 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18964 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18965 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18966 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18967 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18968 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18969 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18970 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18971 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18972 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18973 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18974 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18975 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18976 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18977 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18978 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18979 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18980 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18981 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18982 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18983 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18984 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18985 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18986 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18987 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18988 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18989 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18990 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18991 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18992 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18993 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18994 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18995 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18996 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18997 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18998 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18999 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
19000 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
19001 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
19002 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
19003 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
19004 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
19005 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
19006 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
19007 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
19008 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
19009 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
19010 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
19011 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
19012 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
19013 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
19014 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
19015 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
19016 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
19017 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
19018 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
19019 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
19020 "\x7B\xE4\x4D",
19021 .rlen = 499,
19022 .also_non_np = 1,
19023 .np = 2,
19024 .tap = { 499 - 16, 16 },
19025 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080019026};
19027
19028static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080019029 { /* From RFC 3686 */
19030 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
19031 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
19032 "\x00\x00\x00\x30",
19033 .klen = 20,
19034 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19035 .input = "Single block msg",
19036 .ilen = 16,
19037 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
19038 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
19039 .rlen = 16,
19040 }, {
19041 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
19042 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
19043 "\x00\x6c\xb6\xdb",
19044 .klen = 20,
19045 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
19046 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
19047 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19048 "\x10\x11\x12\x13\x14\x15\x16\x17"
19049 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19050 .ilen = 32,
19051 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
19052 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
19053 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
19054 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
19055 .rlen = 32,
19056 }, {
19057 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
19058 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
19059 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
19060 "\x00\x00\x00\x48",
19061 .klen = 28,
19062 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
19063 .input = "Single block msg",
19064 .ilen = 16,
19065 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
19066 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
19067 .rlen = 16,
19068 }, {
19069 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
19070 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
19071 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
19072 "\x00\x96\xb0\x3b",
19073 .klen = 28,
19074 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
19075 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
19076 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19077 "\x10\x11\x12\x13\x14\x15\x16\x17"
19078 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19079 .ilen = 32,
19080 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
19081 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
19082 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
19083 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
19084 .rlen = 32,
19085 }, {
19086 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
19087 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
19088 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
19089 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
19090 "\x00\x00\x00\x60",
19091 .klen = 36,
19092 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
19093 .input = "Single block msg",
19094 .ilen = 16,
19095 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
19096 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
19097 .rlen = 16,
19098 }, {
19099 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
19100 "\x07\x96\x36\x58\x79\xef\xf8\x86"
19101 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
19102 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
19103 "\x00\xfa\xac\x24",
19104 .klen = 36,
19105 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
19106 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
19107 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19108 "\x10\x11\x12\x13\x14\x15\x16\x17"
19109 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19110 .ilen = 32,
19111 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
19112 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
19113 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
19114 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
19115 .rlen = 32,
19116 }, {
19117 // generated using Crypto++
19118 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
19119 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19120 "\x10\x11\x12\x13\x14\x15\x16\x17"
19121 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19122 "\x00\x00\x00\x00",
19123 .klen = 32 + 4,
19124 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19125 .input =
19126 "\x00\x01\x02\x03\x04\x05\x06\x07"
19127 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19128 "\x10\x11\x12\x13\x14\x15\x16\x17"
19129 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19130 "\x20\x21\x22\x23\x24\x25\x26\x27"
19131 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
19132 "\x30\x31\x32\x33\x34\x35\x36\x37"
19133 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
19134 "\x40\x41\x42\x43\x44\x45\x46\x47"
19135 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
19136 "\x50\x51\x52\x53\x54\x55\x56\x57"
19137 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
19138 "\x60\x61\x62\x63\x64\x65\x66\x67"
19139 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
19140 "\x70\x71\x72\x73\x74\x75\x76\x77"
19141 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
19142 "\x80\x81\x82\x83\x84\x85\x86\x87"
19143 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
19144 "\x90\x91\x92\x93\x94\x95\x96\x97"
19145 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
19146 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
19147 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
19148 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
19149 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
19150 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
19151 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
19152 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
19153 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
19154 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
19155 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
19156 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
19157 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
19158 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
19159 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
19160 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
19161 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
19162 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
19163 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
19164 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
19165 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
19166 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
19167 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
19168 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
19169 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
19170 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
19171 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
19172 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
19173 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
19174 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
19175 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
19176 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
19177 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
19178 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
19179 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
19180 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
19181 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
19182 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
19183 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
19184 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
19185 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
19186 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
19187 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
19188 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
19189 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
19190 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
19191 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
19192 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
19193 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
19194 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
19195 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
19196 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
19197 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
19198 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
19199 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
19200 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
19201 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
19202 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
19203 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
19204 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
19205 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
19206 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
19207 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
19208 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
19209 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
19210 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
19211 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
19212 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
19213 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
19214 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
19215 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
19216 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
19217 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
19218 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
19219 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
19220 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
19221 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
19222 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
19223 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
19224 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
19225 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
19226 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
19227 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
19228 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
19229 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
19230 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
19231 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
19232 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
19233 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
19234 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
19235 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
19236 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
19237 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
19238 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
19239 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
19240 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
19241 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
19242 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
19243 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
19244 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
19245 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
19246 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
19247 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
19248 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
19249 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
19250 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
19251 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
19252 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
19253 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
19254 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
19255 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
19256 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
19257 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
19258 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
19259 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
19260 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
19261 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
19262 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
19263 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
19264 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
19265 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
19266 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
19267 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
19268 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
19269 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
19270 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
19271 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
19272 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
19273 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
19274 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
19275 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
19276 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
19277 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
19278 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
19279 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
19280 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
19281 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
19282 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
19283 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
19284 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
19285 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
19286 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
19287 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
19288 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
19289 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
19290 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
19291 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
19292 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
19293 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
19294 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
19295 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
19296 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
19297 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
19298 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
19299 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
19300 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
19301 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
19302 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
19303 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
19304 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
19305 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
19306 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
19307 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
19308 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
19309 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
19310 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
19311 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
19312 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
19313 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
19314 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
19315 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
19316 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
19317 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
19318 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
19319 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
19320 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
19321 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
19322 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
19323 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
19324 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
19325 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
19326 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
19327 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
19328 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
19329 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
19330 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
19331 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
19332 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
19333 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
19334 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
19335 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
19336 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
19337 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
19338 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
19339 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
19340 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
19341 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
19342 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
19343 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
19344 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
19345 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
19346 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
19347 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
19348 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
19349 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
19350 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
19351 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
19352 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
19353 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
19354 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
19355 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
19356 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
19357 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
19358 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
19359 "\x38\x47\x56\x65\x74\x83\x92\xa1"
19360 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
19361 "\x28\x37\x46\x55\x64\x73\x82\x91"
19362 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
19363 "\x18\x27\x36\x45\x54\x63\x72\x81"
19364 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
19365 "\x08\x17\x26\x35\x44\x53\x62\x71"
19366 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
19367 "\xf8\x07\x16\x25\x34\x43\x52\x61"
19368 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
19369 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
19370 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
19371 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
19372 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
19373 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
19374 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
19375 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
19376 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
19377 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
19378 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
19379 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
19380 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
19381 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
19382 "\x00\x11\x22\x33\x44\x55\x66\x77"
19383 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
19384 "\x10\x21\x32\x43\x54\x65\x76\x87"
19385 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
19386 "\x20\x31\x42\x53\x64\x75\x86\x97"
19387 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
19388 "\x30\x41\x52\x63\x74\x85\x96\xa7"
19389 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
19390 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
19391 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
19392 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
19393 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
19394 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
19395 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
19396 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
19397 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
19398 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
19399 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
19400 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
19401 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
19402 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
19403 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
19404 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
19405 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
19406 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
19407 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
19408 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
19409 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
19410 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
19411 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
19412 "\xf0\x01\x12\x23\x34\x45\x56\x67"
19413 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
19414 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
19415 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
19416 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
19417 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
19418 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
19419 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
19420 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
19421 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
19422 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
19423 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
19424 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
19425 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
19426 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
19427 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
19428 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
19429 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
19430 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
19431 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
19432 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
19433 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
19434 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
19435 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
19436 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
19437 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
19438 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
19439 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
19440 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
19441 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
19442 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
19443 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
19444 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
19445 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
19446 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
19447 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
19448 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
19449 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
19450 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
19451 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
19452 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
19453 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
19454 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
19455 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
19456 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
19457 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
19458 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
19459 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
19460 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
19461 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
19462 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
19463 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
19464 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
19465 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
19466 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
19467 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
19468 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
19469 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
19470 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
19471 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
19472 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
19473 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
19474 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
19475 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
19476 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
19477 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
19478 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
19479 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
19480 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
19481 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
19482 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
19483 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
19484 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
19485 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
19486 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
19487 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
19488 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
19489 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
19490 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
19491 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
19492 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
19493 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
19494 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
19495 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
19496 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
19497 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
19498 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
19499 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
19500 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
19501 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
19502 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
19503 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
19504 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
19505 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
19506 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
19507 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
19508 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
19509 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
19510 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
19511 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
19512 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
19513 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
19514 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
19515 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
19516 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
19517 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
19518 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
19519 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
19520 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
19521 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
19522 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
19523 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
19524 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
19525 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
19526 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
19527 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
19528 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
19529 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
19530 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
19531 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
19532 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
19533 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
19534 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
19535 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
19536 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
19537 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
19538 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
19539 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
19540 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
19541 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
19542 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
19543 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
19544 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
19545 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
19546 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
19547 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
19548 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
19549 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
19550 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
19551 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
19552 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
19553 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
19554 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
19555 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
19556 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
19557 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
19558 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
19559 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
19560 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
19561 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
19562 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
19563 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
19564 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
19565 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
19566 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
19567 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
19568 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
19569 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
19570 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
19571 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
19572 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
19573 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
19574 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
19575 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
19576 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
19577 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
19578 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
19579 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
19580 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
19581 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
19582 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
19583 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
19584 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
19585 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
19586 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
19587 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
19588 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
19589 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
19590 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
19591 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
19592 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
19593 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
19594 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
19595 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
19596 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
19597 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
19598 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
19599 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
19600 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
19601 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
19602 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
19603 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
19604 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
19605 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
19606 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
19607 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
19608 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
19609 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
19610 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
19611 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
19612 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
19613 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
19614 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
19615 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
19616 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
19617 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
19618 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
19619 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
19620 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
19621 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
19622 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
19623 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
19624 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
19625 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
19626 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
19627 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
19628 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
19629 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
19630 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
19631 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
19632 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
19633 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
19634 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
19635 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
19636 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
19637 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
19638 "\x00\x21\x42\x63",
19639 .ilen = 4100,
19640 .result =
19641 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
19642 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
19643 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
19644 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
19645 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
19646 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
19647 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
19648 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
19649 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
19650 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
19651 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
19652 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
19653 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
19654 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
19655 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
19656 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
19657 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
19658 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
19659 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
19660 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
19661 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
19662 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
19663 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
19664 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
19665 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
19666 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
19667 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
19668 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
19669 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
19670 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
19671 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
19672 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
19673 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
19674 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
19675 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
19676 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
19677 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
19678 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
19679 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
19680 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
19681 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
19682 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
19683 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
19684 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
19685 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
19686 "\x04\x02\xef\xd3\x44\xde\x76\x31"
19687 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
19688 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
19689 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
19690 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
19691 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
19692 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
19693 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
19694 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
19695 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
19696 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
19697 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
19698 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
19699 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
19700 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
19701 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
19702 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
19703 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
19704 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
19705 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
19706 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
19707 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
19708 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
19709 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
19710 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
19711 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
19712 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
19713 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
19714 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
19715 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
19716 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
19717 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
19718 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
19719 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
19720 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
19721 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
19722 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
19723 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
19724 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
19725 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
19726 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
19727 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
19728 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
19729 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
19730 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
19731 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
19732 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
19733 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
19734 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
19735 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
19736 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
19737 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
19738 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
19739 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
19740 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
19741 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
19742 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
19743 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
19744 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
19745 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
19746 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
19747 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
19748 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
19749 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
19750 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
19751 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
19752 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
19753 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
19754 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
19755 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
19756 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
19757 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
19758 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
19759 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
19760 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
19761 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
19762 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
19763 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
19764 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
19765 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
19766 "\x26\x39\x83\x94\xef\x27\xd8\x53"
19767 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
19768 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
19769 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
19770 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
19771 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
19772 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
19773 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
19774 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
19775 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
19776 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
19777 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
19778 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
19779 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
19780 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
19781 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
19782 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
19783 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
19784 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
19785 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
19786 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
19787 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
19788 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
19789 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
19790 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
19791 "\x35\x12\xe3\x36\x28\x27\x36\x58"
19792 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
19793 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
19794 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
19795 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
19796 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
19797 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
19798 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
19799 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
19800 "\x89\xf3\x78\x35\x44\x62\x78\x72"
19801 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
19802 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
19803 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
19804 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
19805 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
19806 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
19807 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
19808 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
19809 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
19810 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
19811 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
19812 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
19813 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
19814 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
19815 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
19816 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
19817 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
19818 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
19819 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
19820 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
19821 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
19822 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
19823 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
19824 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
19825 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
19826 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
19827 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
19828 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
19829 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
19830 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
19831 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
19832 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
19833 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
19834 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
19835 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
19836 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
19837 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
19838 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
19839 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
19840 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
19841 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
19842 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
19843 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
19844 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
19845 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
19846 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
19847 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
19848 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
19849 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
19850 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
19851 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
19852 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
19853 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
19854 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
19855 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
19856 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
19857 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
19858 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
19859 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
19860 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
19861 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
19862 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
19863 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
19864 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
19865 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
19866 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
19867 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
19868 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
19869 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
19870 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
19871 "\x29\x90\x46\x30\x92\x69\x7d\x13"
19872 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
19873 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
19874 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
19875 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
19876 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
19877 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
19878 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
19879 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
19880 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
19881 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
19882 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
19883 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
19884 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
19885 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
19886 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
19887 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
19888 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
19889 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
19890 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
19891 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
19892 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
19893 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
19894 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
19895 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
19896 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
19897 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
19898 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
19899 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
19900 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
19901 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
19902 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
19903 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
19904 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
19905 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
19906 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
19907 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
19908 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
19909 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
19910 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
19911 "\x73\x02\x3b\x78\x21\x72\x43\x00"
19912 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
19913 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
19914 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
19915 "\x11\x94\x13\x69\x51\x09\x28\xde"
19916 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
19917 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
19918 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
19919 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
19920 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
19921 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
19922 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
19923 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
19924 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
19925 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
19926 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
19927 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
19928 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
19929 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
19930 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
19931 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
19932 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
19933 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
19934 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
19935 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
19936 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
19937 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
19938 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
19939 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
19940 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
19941 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
19942 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
19943 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
19944 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
19945 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
19946 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
19947 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
19948 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
19949 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
19950 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
19951 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
19952 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
19953 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
19954 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
19955 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
19956 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
19957 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
19958 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
19959 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
19960 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
19961 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
19962 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
19963 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
19964 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
19965 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
19966 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
19967 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
19968 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
19969 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
19970 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
19971 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
19972 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
19973 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
19974 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
19975 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
19976 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
19977 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
19978 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
19979 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
19980 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
19981 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
19982 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
19983 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
19984 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
19985 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
19986 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
19987 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
19988 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
19989 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
19990 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
19991 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
19992 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
19993 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
19994 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
19995 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
19996 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
19997 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
19998 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
19999 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
20000 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
20001 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
20002 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
20003 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
20004 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
20005 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
20006 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
20007 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
20008 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
20009 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
20010 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
20011 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
20012 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
20013 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
20014 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
20015 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
20016 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
20017 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
20018 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
20019 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
20020 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
20021 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
20022 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
20023 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
20024 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
20025 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
20026 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
20027 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
20028 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
20029 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
20030 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
20031 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
20032 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
20033 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
20034 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
20035 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
20036 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
20037 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
20038 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
20039 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
20040 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
20041 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
20042 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
20043 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
20044 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
20045 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
20046 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
20047 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
20048 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
20049 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
20050 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
20051 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
20052 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
20053 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
20054 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
20055 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
20056 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
20057 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
20058 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
20059 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
20060 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
20061 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
20062 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
20063 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
20064 "\xae\xed\x39\x88\x42\x11\x3c\xed"
20065 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
20066 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
20067 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
20068 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
20069 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
20070 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
20071 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
20072 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
20073 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
20074 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
20075 "\x34\x17\xde\xba\x47\xf1\x06\x18"
20076 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
20077 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
20078 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
20079 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
20080 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
20081 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
20082 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
20083 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
20084 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
20085 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
20086 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
20087 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
20088 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
20089 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
20090 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
20091 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
20092 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
20093 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
20094 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
20095 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
20096 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
20097 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
20098 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
20099 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
20100 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
20101 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
20102 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
20103 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
20104 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
20105 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
20106 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
20107 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
20108 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
20109 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
20110 "\x74\x56\x58\x40\x02\x37\x52\x2c"
20111 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
20112 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
20113 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
20114 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
20115 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
20116 "\xed\x38\x80\x36\x72\x43\x27\x49"
20117 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
20118 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
20119 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
20120 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
20121 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
20122 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
20123 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
20124 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
20125 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
20126 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
20127 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
20128 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
20129 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
20130 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
20131 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
20132 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
20133 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
20134 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
20135 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
20136 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
20137 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
20138 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
20139 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
20140 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
20141 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
20142 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
20143 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
20144 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
20145 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
20146 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
20147 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
20148 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
20149 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
20150 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
20151 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
20152 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
20153 "\x21\xed\xda\x86",
20154 .rlen = 4100,
20155 .np = 2,
20156 .tap = { 4064, 36 },
20157 },
20158};
20159
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080020160static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080020161 { /* From RFC 3686 */
20162 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
20163 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
20164 "\x00\x00\x00\x30",
20165 .klen = 20,
20166 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20167 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
20168 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
20169 .ilen = 16,
20170 .result = "Single block msg",
20171 .rlen = 16,
20172 }, {
20173 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
20174 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
20175 "\x00\x6c\xb6\xdb",
20176 .klen = 20,
20177 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
20178 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
20179 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
20180 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
20181 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
20182 .ilen = 32,
20183 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
20184 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20185 "\x10\x11\x12\x13\x14\x15\x16\x17"
20186 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
20187 .rlen = 32,
20188 }, {
20189 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
20190 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
20191 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
20192 "\x00\x00\x00\x48",
20193 .klen = 28,
20194 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
20195 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
20196 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
20197 .ilen = 16,
20198 .result = "Single block msg",
20199 .rlen = 16,
20200 }, {
20201 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
20202 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
20203 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
20204 "\x00\x96\xb0\x3b",
20205 .klen = 28,
20206 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
20207 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
20208 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
20209 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
20210 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
20211 .ilen = 32,
20212 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
20213 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20214 "\x10\x11\x12\x13\x14\x15\x16\x17"
20215 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
20216 .rlen = 32,
20217 }, {
20218 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
20219 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
20220 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
20221 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
20222 "\x00\x00\x00\x60",
20223 .klen = 36,
20224 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
20225 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
20226 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
20227 .ilen = 16,
20228 .result = "Single block msg",
20229 .rlen = 16,
20230 }, {
20231 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
20232 "\x07\x96\x36\x58\x79\xef\xf8\x86"
20233 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
20234 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
20235 "\x00\xfa\xac\x24",
20236 .klen = 36,
20237 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
20238 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
20239 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
20240 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
20241 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
20242 .ilen = 32,
20243 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
20244 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20245 "\x10\x11\x12\x13\x14\x15\x16\x17"
20246 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
20247 .rlen = 32,
20248 },
20249};
20250
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100020251static struct cipher_testvec aes_ofb_enc_tv_template[] = {
20252 /* From NIST Special Publication 800-38A, Appendix F.5 */
20253 {
20254 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
20255 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
20256 .klen = 16,
20257 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
20258 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
20259 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
20260 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
20261 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
20262 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
20263 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
20264 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
20265 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
20266 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
20267 .ilen = 64,
20268 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
20269 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
20270 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
20271 "\x3c\x52\xda\xc5\x4e\xd8\x25"
20272 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
20273 "\x44\xf7\xa8\x22\x60\xed\xcc"
20274 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
20275 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
20276 .rlen = 64,
20277 }
20278};
20279
20280static struct cipher_testvec aes_ofb_dec_tv_template[] = {
20281 /* From NIST Special Publication 800-38A, Appendix F.5 */
20282 {
20283 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
20284 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
20285 .klen = 16,
20286 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
20287 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
20288 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
20289 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
20290 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
20291 "\x3c\x52\xda\xc5\x4e\xd8\x25"
20292 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
20293 "\x44\xf7\xa8\x22\x60\xed\xcc"
20294 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
20295 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
20296 .ilen = 64,
20297 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
20298 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
20299 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
20300 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
20301 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
20302 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
20303 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
20304 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
20305 .rlen = 64,
20306 }
20307};
20308
Herbert Xuda7f0332008-07-31 17:08:25 +080020309static struct aead_testvec aes_gcm_enc_tv_template[] = {
20310 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
20311 .key = zeroed_string,
20312 .klen = 16,
20313 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
20314 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
20315 .rlen = 16,
20316 }, {
20317 .key = zeroed_string,
20318 .klen = 16,
20319 .input = zeroed_string,
20320 .ilen = 16,
20321 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
20322 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
20323 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
20324 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
20325 .rlen = 32,
20326 }, {
20327 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20328 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20329 .klen = 16,
20330 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20331 "\xde\xca\xf8\x88",
20332 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20333 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20334 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20335 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20336 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20337 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20338 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20339 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20340 .ilen = 64,
20341 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20342 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20343 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20344 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20345 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20346 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20347 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20348 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
20349 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
20350 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
20351 .rlen = 80,
20352 }, {
20353 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20354 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20355 .klen = 16,
20356 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20357 "\xde\xca\xf8\x88",
20358 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20359 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20360 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20361 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20362 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20363 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20364 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20365 "\xba\x63\x7b\x39",
20366 .ilen = 60,
20367 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20368 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20369 "\xab\xad\xda\xd2",
20370 .alen = 20,
20371 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20372 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20373 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20374 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20375 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20376 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20377 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20378 "\x3d\x58\xe0\x91"
20379 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
20380 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
20381 .rlen = 76,
20382 }, {
20383 .key = zeroed_string,
20384 .klen = 24,
20385 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
20386 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
20387 .rlen = 16,
20388 }, {
20389 .key = zeroed_string,
20390 .klen = 24,
20391 .input = zeroed_string,
20392 .ilen = 16,
20393 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
20394 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
20395 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
20396 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
20397 .rlen = 32,
20398 }, {
20399 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20400 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20401 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20402 .klen = 24,
20403 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20404 "\xde\xca\xf8\x88",
20405 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20406 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20407 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20408 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20409 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20410 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20411 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20412 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20413 .ilen = 64,
20414 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20415 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20416 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20417 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20418 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20419 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20420 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20421 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
20422 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
20423 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
20424 .rlen = 80,
20425 }, {
20426 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20427 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20428 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20429 .klen = 24,
20430 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20431 "\xde\xca\xf8\x88",
20432 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20433 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20434 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20435 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20436 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20437 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20438 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20439 "\xba\x63\x7b\x39",
20440 .ilen = 60,
20441 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20442 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20443 "\xab\xad\xda\xd2",
20444 .alen = 20,
20445 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20446 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20447 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20448 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20449 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20450 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20451 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20452 "\xcc\xda\x27\x10"
20453 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
20454 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
20455 .rlen = 76,
20456 .np = 2,
20457 .tap = { 32, 28 },
20458 .anp = 2,
20459 .atap = { 8, 12 }
20460 }, {
20461 .key = zeroed_string,
20462 .klen = 32,
20463 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
20464 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
20465 .rlen = 16,
20466 }
20467};
20468
20469static struct aead_testvec aes_gcm_dec_tv_template[] = {
20470 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
20471 .key = zeroed_string,
20472 .klen = 32,
20473 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
20474 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
20475 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
20476 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
20477 .ilen = 32,
20478 .result = zeroed_string,
20479 .rlen = 16,
20480 }, {
20481 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20482 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20483 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20484 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20485 .klen = 32,
20486 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20487 "\xde\xca\xf8\x88",
20488 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
20489 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
20490 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
20491 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
20492 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
20493 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
20494 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
20495 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
20496 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
20497 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
20498 .ilen = 80,
20499 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20500 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20501 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20502 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20503 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20504 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20505 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20506 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20507 .rlen = 64,
20508 }, {
20509 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20510 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20511 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20512 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20513 .klen = 32,
20514 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20515 "\xde\xca\xf8\x88",
20516 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
20517 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
20518 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
20519 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
20520 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
20521 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
20522 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
20523 "\xbc\xc9\xf6\x62"
20524 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
20525 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
20526 .ilen = 76,
20527 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20528 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20529 "\xab\xad\xda\xd2",
20530 .alen = 20,
20531 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20532 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20533 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20534 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20535 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20536 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20537 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20538 "\xba\x63\x7b\x39",
20539 .rlen = 60,
20540 .np = 2,
20541 .tap = { 48, 28 },
20542 .anp = 3,
20543 .atap = { 8, 8, 4 }
20544 }, {
20545 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20546 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20547 .klen = 16,
20548 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20549 "\xde\xca\xf8\x88",
20550 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20551 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20552 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20553 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20554 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20555 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20556 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20557 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
20558 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
20559 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
20560 .ilen = 80,
20561 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20562 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20563 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20564 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20565 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20566 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20567 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20568 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20569 .rlen = 64,
20570 }, {
20571 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20572 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20573 .klen = 16,
20574 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20575 "\xde\xca\xf8\x88",
20576 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20577 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20578 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20579 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20580 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20581 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20582 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20583 "\x3d\x58\xe0\x91"
20584 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
20585 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
20586 .ilen = 76,
20587 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20588 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20589 "\xab\xad\xda\xd2",
20590 .alen = 20,
20591 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20592 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20593 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20594 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20595 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20596 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20597 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20598 "\xba\x63\x7b\x39",
20599 .rlen = 60,
20600 }, {
20601 .key = zeroed_string,
20602 .klen = 24,
20603 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
20604 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
20605 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
20606 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
20607 .ilen = 32,
20608 .result = zeroed_string,
20609 .rlen = 16,
20610 }, {
20611 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20612 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20613 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20614 .klen = 24,
20615 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20616 "\xde\xca\xf8\x88",
20617 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20618 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20619 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20620 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20621 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20622 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20623 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20624 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
20625 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
20626 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
20627 .ilen = 80,
20628 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20629 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20630 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20631 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20632 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20633 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20634 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20635 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20636 .rlen = 64,
20637 }, {
20638 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20639 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20640 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20641 .klen = 24,
20642 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20643 "\xde\xca\xf8\x88",
20644 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20645 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20646 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20647 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20648 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20649 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20650 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20651 "\xcc\xda\x27\x10"
20652 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
20653 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
20654 .ilen = 76,
20655 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20656 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20657 "\xab\xad\xda\xd2",
20658 .alen = 20,
20659 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20660 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20661 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20662 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20663 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20664 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20665 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20666 "\xba\x63\x7b\x39",
20667 .rlen = 60,
20668 }
20669};
20670
Adrian Hoban69435b92010-11-04 15:02:04 -040020671static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
Herbert Xu85375442015-07-09 07:17:25 +080020672 { /* Generated using Crypto++ */
Adrian Hoban69435b92010-11-04 15:02:04 -040020673 .key = zeroed_string,
20674 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020675 .iv = zeroed_string,
20676 .input = zeroed_string,
20677 .ilen = 16,
20678 .assoc = zeroed_string,
20679 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020680 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
Herbert Xu85375442015-07-09 07:17:25 +080020681 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20682 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20683 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
Adrian Hoban69435b92010-11-04 15:02:04 -040020684 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020685 },{
Adrian Hoban69435b92010-11-04 15:02:04 -040020686 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20687 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020688 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020689 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020690 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20691 .input = zeroed_string,
20692 .ilen = 16,
20693 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
20694 "\x00\x00\x00\x00\x00\x00\x00\x01",
20695 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020696 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
Herbert Xu85375442015-07-09 07:17:25 +080020697 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20698 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20699 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
Adrian Hoban69435b92010-11-04 15:02:04 -040020700 .rlen = 32,
20701
Herbert Xu85375442015-07-09 07:17:25 +080020702 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020703 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20704 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020705 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020706 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020707 .iv = zeroed_string,
20708 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20709 "\x01\x01\x01\x01\x01\x01\x01\x01",
20710 .ilen = 16,
20711 .assoc = zeroed_string,
20712 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020713 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020714 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20715 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20716 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
Adrian Hoban69435b92010-11-04 15:02:04 -040020717 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020718 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020719 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20720 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020721 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020722 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020723 .iv = zeroed_string,
20724 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20725 "\x01\x01\x01\x01\x01\x01\x01\x01",
20726 .ilen = 16,
20727 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20728 "\x00\x00\x00\x00\x00\x00\x00\x00",
20729 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020730 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020731 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20732 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20733 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
Adrian Hoban69435b92010-11-04 15:02:04 -040020734 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020735 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020736 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20737 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020738 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020739 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020740 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20741 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20742 "\x01\x01\x01\x01\x01\x01\x01\x01",
20743 .ilen = 16,
20744 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20745 "\x00\x00\x00\x00\x00\x00\x00\x01",
20746 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020747 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020748 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20749 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20750 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
Adrian Hoban69435b92010-11-04 15:02:04 -040020751 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020752 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020753 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20754 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020755 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020756 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020757 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20758 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20759 "\x01\x01\x01\x01\x01\x01\x01\x01"
20760 "\x01\x01\x01\x01\x01\x01\x01\x01"
20761 "\x01\x01\x01\x01\x01\x01\x01\x01"
20762 "\x01\x01\x01\x01\x01\x01\x01\x01"
20763 "\x01\x01\x01\x01\x01\x01\x01\x01"
20764 "\x01\x01\x01\x01\x01\x01\x01\x01"
20765 "\x01\x01\x01\x01\x01\x01\x01\x01",
20766 .ilen = 64,
20767 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20768 "\x00\x00\x00\x00\x00\x00\x00\x01",
20769 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020770 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020771 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20772 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20773 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20774 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20775 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20776 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20777 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20778 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20779 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
Adrian Hoban69435b92010-11-04 15:02:04 -040020780 .rlen = 80,
Herbert Xu85375442015-07-09 07:17:25 +080020781 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020782 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20783 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
Herbert Xu85375442015-07-09 07:17:25 +080020784 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020785 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020786 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
20787 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
20788 "\xff\xff\xff\xff\xff\xff\xff\xff"
20789 "\xff\xff\xff\xff\xff\xff\xff\xff"
20790 "\xff\xff\xff\xff\xff\xff\xff\xff"
20791 "\xff\xff\xff\xff\xff\xff\xff\xff"
20792 "\xff\xff\xff\xff\xff\xff\xff\xff"
20793 "\xff\xff\xff\xff\xff\xff\xff\xff"
20794 "\xff\xff\xff\xff\xff\xff\xff\xff"
20795 "\xff\xff\xff\xff\xff\xff\xff\xff"
20796 "\xff\xff\xff\xff\xff\xff\xff\xff"
20797 "\xff\xff\xff\xff\xff\xff\xff\xff"
20798 "\xff\xff\xff\xff\xff\xff\xff\xff"
20799 "\xff\xff\xff\xff\xff\xff\xff\xff"
20800 "\xff\xff\xff\xff\xff\xff\xff\xff"
20801 "\xff\xff\xff\xff\xff\xff\xff\xff"
20802 "\xff\xff\xff\xff\xff\xff\xff\xff"
20803 "\xff\xff\xff\xff\xff\xff\xff\xff"
20804 "\xff\xff\xff\xff\xff\xff\xff\xff"
20805 "\xff\xff\xff\xff\xff\xff\xff\xff"
20806 "\xff\xff\xff\xff\xff\xff\xff\xff"
20807 "\xff\xff\xff\xff\xff\xff\xff\xff"
20808 "\xff\xff\xff\xff\xff\xff\xff\xff"
20809 "\xff\xff\xff\xff\xff\xff\xff\xff"
20810 "\xff\xff\xff\xff\xff\xff\xff\xff",
20811 .ilen = 192,
20812 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20813 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
20814 "\x89\xab\xcd\xef",
20815 .alen = 20,
Adrian Hoban69435b92010-11-04 15:02:04 -040020816 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20817 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20818 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20819 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20820 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20821 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20822 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20823 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20824 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20825 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20826 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20827 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20828 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20829 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20830 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20831 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20832 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20833 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20834 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20835 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20836 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20837 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20838 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20839 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20840 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20841 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20842 .rlen = 208,
Herbert Xu8f69b762015-06-16 13:54:26 +080020843 }, { /* From draft-mcgrew-gcm-test-01 */
20844 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20845 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20846 "\x2E\x44\x3B\x68",
20847 .klen = 20,
20848 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20849 .input = "\x45\x00\x00\x48\x69\x9A\x00\x00"
20850 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
20851 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
20852 "\x38\xD3\x01\x00\x00\x01\x00\x00"
20853 "\x00\x00\x00\x00\x04\x5F\x73\x69"
20854 "\x70\x04\x5F\x75\x64\x70\x03\x73"
20855 "\x69\x70\x09\x63\x79\x62\x65\x72"
20856 "\x63\x69\x74\x79\x02\x64\x6B\x00"
20857 "\x00\x21\x00\x01\x01\x02\x02\x01",
20858 .ilen = 72,
20859 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080020860 "\x00\x00\x00\x00\x49\x56\xED\x7E"
20861 "\x3B\x24\x4C\xFE",
20862 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020863 .result = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
20864 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
20865 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
20866 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
20867 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
20868 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
20869 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
20870 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
20871 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
20872 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
20873 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
20874 .rlen = 88,
20875 }, {
20876 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20877 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20878 "\xCA\xFE\xBA\xBE",
20879 .klen = 20,
20880 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20881 .input = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
20882 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
20883 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
20884 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
20885 "\x00\x01\x00\x00\x00\x00\x00\x00"
20886 "\x03\x73\x69\x70\x09\x63\x79\x62"
20887 "\x65\x72\x63\x69\x74\x79\x02\x64"
20888 "\x6B\x00\x00\x01\x00\x01\x00\x01",
20889 .ilen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080020890 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
20891 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20892 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020893 .result = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
20894 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
20895 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
20896 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
20897 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
20898 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
20899 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
20900 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
20901 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
20902 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
20903 .rlen = 80,
20904 }, {
20905 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20906 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20907 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20908 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20909 "\x11\x22\x33\x44",
20910 .klen = 36,
20911 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
20912 .input = "\x45\x00\x00\x30\x69\xA6\x40\x00"
20913 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
20914 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
20915 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
20916 "\x70\x02\x40\x00\x20\xBF\x00\x00"
20917 "\x02\x04\x05\xB4\x01\x01\x04\x02"
20918 "\x01\x02\x02\x01",
20919 .ilen = 52,
Herbert Xu85375442015-07-09 07:17:25 +080020920 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
20921 "\x01\x02\x03\x04\x05\x06\x07\x08",
20922 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020923 .result = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
20924 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
20925 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
20926 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
20927 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
20928 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
20929 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
20930 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
20931 "\x15\x95\x6C\x96",
20932 .rlen = 68,
20933 }, {
20934 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
20935 "\x00\x00\x00\x00\x00\x00\x00\x00"
20936 "\x00\x00\x00\x00",
20937 .klen = 20,
20938 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20939 .input = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
20940 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
20941 "\x01\x01\x01\x01\x08\x00\x07\x5C"
20942 "\x02\x00\x44\x00\x61\x62\x63\x64"
20943 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20944 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20945 "\x75\x76\x77\x61\x62\x63\x64\x65"
20946 "\x66\x67\x68\x69\x01\x02\x02\x01",
20947 .ilen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080020948 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
20949 "\x00\x00\x00\x00\x00\x00\x00\x00",
20950 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020951 .result = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
20952 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
20953 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
20954 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
20955 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
20956 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
20957 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
20958 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
20959 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
20960 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
20961 .rlen = 80,
20962 }, {
20963 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20964 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20965 "\x57\x69\x0E\x43",
20966 .klen = 20,
20967 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20968 .input = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
20969 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
20970 "\x01\x01\x01\x01\x08\x00\x08\x5C"
20971 "\x02\x00\x43\x00\x61\x62\x63\x64"
20972 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20973 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20974 "\x75\x76\x77\x61\x62\x63\x64\x65"
20975 "\x66\x67\x68\x69\x01\x02\x02\x01",
20976 .ilen = 64,
20977 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020978 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20979 "\xA2\xFC\xA1\xA3",
20980 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020981 .result = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
20982 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
20983 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
20984 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
20985 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20986 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20987 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
20988 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
20989 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
20990 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
20991 .rlen = 80,
20992 }, {
20993 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20994 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20995 "\x57\x69\x0E\x43",
20996 .klen = 20,
20997 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20998 .input = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
20999 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
21000 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
21001 "\x01\x02\x02\x01",
21002 .ilen = 28,
21003 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021004 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21005 "\xA2\xFC\xA1\xA3",
21006 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021007 .result = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
21008 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
21009 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
21010 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
21011 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
21012 "\xE7\xD0\x5D\x35",
21013 .rlen = 44,
21014 }, {
21015 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21016 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21017 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21018 "\xCA\xFE\xBA\xBE",
21019 .klen = 28,
21020 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21021 .input = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
21022 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
21023 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
21024 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
21025 "\x50\x10\x16\xD0\x75\x68\x00\x01",
21026 .ilen = 40,
Herbert Xu85375442015-07-09 07:17:25 +080021027 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
21028 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21029 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021030 .result = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
21031 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
21032 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
21033 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
21034 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
21035 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
21036 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
21037 .rlen = 56,
21038 }, {
21039 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21040 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21041 "\xDE\xCA\xF8\x88",
21042 .klen = 20,
21043 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21044 .input = "\x45\x00\x00\x49\x33\xBA\x00\x00"
21045 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
21046 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21047 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
21048 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
21049 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
21050 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
21051 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
21052 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
21053 "\x23\x01\x01\x01",
21054 .ilen = 76,
21055 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080021056 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21057 "\xCE\xFA\xCE\x74",
21058 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021059 .result = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
21060 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
21061 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
21062 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
21063 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
21064 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
21065 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
21066 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
21067 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
21068 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
21069 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
21070 "\x69\x62\x34\x36",
21071 .rlen = 92,
21072 }, {
21073 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21074 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21075 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21076 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21077 "\x73\x61\x6C\x74",
21078 .klen = 36,
21079 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21080 .input = "\x45\x08\x00\x28\x73\x2C\x00\x00"
21081 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
21082 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
21083 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
21084 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
21085 .ilen = 40,
21086 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080021087 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21088 "\x69\x76\x65\x63",
21089 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021090 .result = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
21091 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
21092 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
21093 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
21094 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
21095 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
21096 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
21097 .rlen = 56,
21098 }, {
21099 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21100 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21101 "\x57\x69\x0E\x43",
21102 .klen = 20,
21103 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21104 .input = "\x45\x00\x00\x49\x33\x3E\x00\x00"
21105 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
21106 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21107 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
21108 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
21109 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
21110 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
21111 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
21112 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
21113 "\x15\x01\x01\x01",
21114 .ilen = 76,
21115 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021116 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21117 "\xA2\xFC\xA1\xA3",
21118 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021119 .result = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
21120 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
21121 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
21122 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
21123 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
21124 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
21125 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
21126 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
21127 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
21128 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
21129 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
21130 "\x8C\xAA\x81\xE2",
21131 .rlen = 92,
21132 }, {
21133 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21134 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21135 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21136 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21137 "\x73\x61\x6C\x74",
21138 .klen = 36,
21139 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21140 .input = "\x63\x69\x73\x63\x6F\x01\x72\x75"
21141 "\x6C\x65\x73\x01\x74\x68\x65\x01"
21142 "\x6E\x65\x74\x77\x65\x01\x64\x65"
21143 "\x66\x69\x6E\x65\x01\x74\x68\x65"
21144 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
21145 "\x67\x69\x65\x73\x01\x74\x68\x61"
21146 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
21147 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
21148 "\x72\x72\x6F\x77\x01\x02\x02\x01",
21149 .ilen = 72,
21150 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080021151 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21152 "\x69\x76\x65\x63",
21153 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021154 .result = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
21155 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
21156 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
21157 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
21158 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
21159 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
21160 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
21161 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
21162 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
21163 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
21164 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
21165 .rlen = 88,
21166 }, {
21167 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
21168 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
21169 "\xD9\x66\x42\x67",
21170 .klen = 20,
21171 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21172 .input = "\x01\x02\x02\x01",
21173 .ilen = 4,
Herbert Xu85375442015-07-09 07:17:25 +080021174 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
21175 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21176 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021177 .result = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
21178 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
21179 "\x04\xBE\xF2\x70",
21180 .rlen = 20,
21181 }, {
21182 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21183 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21184 "\xDE\xCA\xF8\x88",
21185 .klen = 20,
21186 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21187 .input = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
21188 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
21189 "\x62\x65\x00\x01",
21190 .ilen = 20,
21191 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080021192 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21193 "\xCE\xFA\xCE\x74",
21194 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021195 .result = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
21196 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
21197 "\x43\x33\x21\x64\x41\x25\x03\x52"
21198 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
21199 "\x43\xAF\x8C\x3E",
21200 .rlen = 36,
21201 }, {
21202 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
21203 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
21204 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
21205 "\x62\x65\x66\x6F\x72\x65\x69\x61"
21206 "\x74\x75\x72\x6E",
21207 .klen = 36,
21208 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
21209 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21210 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21211 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21212 "\x02\x00\x07\x00\x61\x62\x63\x64"
21213 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21214 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21215 "\x01\x02\x02\x01",
21216 .ilen = 52,
21217 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
Herbert Xu85375442015-07-09 07:17:25 +080021218 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
21219 "\x67\x65\x74\x6D",
21220 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021221 .result = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
21222 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
21223 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
21224 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
21225 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
21226 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
21227 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
21228 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
21229 "\x9F\xB4\xC0\x53",
21230 .rlen = 68,
21231 }, {
21232 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21233 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21234 "\x57\x69\x0E\x43",
21235 .klen = 20,
21236 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21237 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21238 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21239 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21240 "\x02\x00\x07\x00\x61\x62\x63\x64"
21241 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21242 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21243 "\x01\x02\x02\x01",
21244 .ilen = 52,
21245 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021246 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21247 "\xA2\xFC\xA1\xA3",
21248 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021249 .result = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
21250 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
21251 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
21252 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
21253 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21254 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21255 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
21256 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
21257 "\x40\xD7\xCB\x05",
21258 .rlen = 68,
21259 }, {
21260 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21261 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21262 "\x22\x43\x3C\x64",
21263 .klen = 20,
21264 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
21265 .input = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
21266 "\x61\x62\x63\x64\x65\x66\x67\x68"
21267 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
21268 "\x71\x72\x73\x74\x01\x02\x02\x01",
21269 .ilen = 32,
21270 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080021271 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
21272 "\x3A\x23\x4B\xFD",
21273 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021274 .result = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
21275 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
21276 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
21277 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
21278 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
21279 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
21280 .rlen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040021281 }
21282};
21283
21284static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
Herbert Xu85375442015-07-09 07:17:25 +080021285 { /* Generated using Crypto++ */
Adrian Hoban69435b92010-11-04 15:02:04 -040021286 .key = zeroed_string,
21287 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021288 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040021289 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
Herbert Xu85375442015-07-09 07:17:25 +080021290 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
21291 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
21292 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
Adrian Hoban69435b92010-11-04 15:02:04 -040021293 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080021294 .assoc = zeroed_string,
21295 .alen = 16,
21296 .result = zeroed_string,
21297 .rlen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040021298
Herbert Xu85375442015-07-09 07:17:25 +080021299 },{
Adrian Hoban69435b92010-11-04 15:02:04 -040021300 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
21301 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080021302 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040021303 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021304 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040021305 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
Herbert Xu85375442015-07-09 07:17:25 +080021306 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
21307 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
21308 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
Adrian Hoban69435b92010-11-04 15:02:04 -040021309 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080021310 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
21311 "\x00\x00\x00\x00\x00\x00\x00\x01",
21312 .alen = 16,
21313 .result = zeroed_string,
21314 .rlen = 16,
21315 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040021316 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
21317 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080021318 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040021319 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021320 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040021321 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080021322 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
21323 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
21324 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
Adrian Hoban69435b92010-11-04 15:02:04 -040021325 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080021326 .assoc = zeroed_string,
21327 .alen = 16,
21328 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
21329 "\x01\x01\x01\x01\x01\x01\x01\x01",
21330 .rlen = 16,
21331 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040021332 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
21333 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080021334 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040021335 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021336 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040021337 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080021338 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
21339 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
21340 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
Adrian Hoban69435b92010-11-04 15:02:04 -040021341 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080021342 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
21343 "\x00\x00\x00\x00\x00\x00\x00\x00",
21344 .alen = 16,
21345 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
21346 "\x01\x01\x01\x01\x01\x01\x01\x01",
21347 .rlen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040021348
Herbert Xu85375442015-07-09 07:17:25 +080021349 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040021350 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
21351 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080021352 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040021353 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021354 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040021355 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080021356 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
21357 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
21358 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
Adrian Hoban69435b92010-11-04 15:02:04 -040021359 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080021360 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
21361 "\x00\x00\x00\x00\x00\x00\x00\x01",
21362 .alen = 16,
21363 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
21364 "\x01\x01\x01\x01\x01\x01\x01\x01",
21365 .rlen = 16,
21366 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040021367 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
21368 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080021369 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040021370 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021371 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040021372 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080021373 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
21374 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
21375 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
21376 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
21377 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
21378 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
21379 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
21380 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
21381 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
Adrian Hoban69435b92010-11-04 15:02:04 -040021382 .ilen = 80,
Herbert Xu85375442015-07-09 07:17:25 +080021383 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
21384 "\x00\x00\x00\x00\x00\x00\x00\x01",
21385 .alen = 16,
21386 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
21387 "\x01\x01\x01\x01\x01\x01\x01\x01"
21388 "\x01\x01\x01\x01\x01\x01\x01\x01"
21389 "\x01\x01\x01\x01\x01\x01\x01\x01"
21390 "\x01\x01\x01\x01\x01\x01\x01\x01"
21391 "\x01\x01\x01\x01\x01\x01\x01\x01"
21392 "\x01\x01\x01\x01\x01\x01\x01\x01"
21393 "\x01\x01\x01\x01\x01\x01\x01\x01",
21394 .rlen = 64,
21395 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040021396 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
21397 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
Herbert Xu85375442015-07-09 07:17:25 +080021398 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040021399 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080021400 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
Adrian Hoban69435b92010-11-04 15:02:04 -040021401 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
21402 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
21403 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
21404 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
21405 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
21406 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
21407 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
21408 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
21409 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
21410 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
21411 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
21412 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
21413 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
21414 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
21415 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
21416 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
21417 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
21418 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
21419 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
21420 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
21421 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
21422 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
21423 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
21424 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
21425 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
21426 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
21427 .ilen = 208,
Herbert Xu85375442015-07-09 07:17:25 +080021428 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
21429 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
21430 "\x89\xab\xcd\xef",
21431 .alen = 20,
21432 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
21433 "\xff\xff\xff\xff\xff\xff\xff\xff"
21434 "\xff\xff\xff\xff\xff\xff\xff\xff"
21435 "\xff\xff\xff\xff\xff\xff\xff\xff"
21436 "\xff\xff\xff\xff\xff\xff\xff\xff"
21437 "\xff\xff\xff\xff\xff\xff\xff\xff"
21438 "\xff\xff\xff\xff\xff\xff\xff\xff"
21439 "\xff\xff\xff\xff\xff\xff\xff\xff"
21440 "\xff\xff\xff\xff\xff\xff\xff\xff"
21441 "\xff\xff\xff\xff\xff\xff\xff\xff"
21442 "\xff\xff\xff\xff\xff\xff\xff\xff"
21443 "\xff\xff\xff\xff\xff\xff\xff\xff"
21444 "\xff\xff\xff\xff\xff\xff\xff\xff"
21445 "\xff\xff\xff\xff\xff\xff\xff\xff"
21446 "\xff\xff\xff\xff\xff\xff\xff\xff"
21447 "\xff\xff\xff\xff\xff\xff\xff\xff"
21448 "\xff\xff\xff\xff\xff\xff\xff\xff"
21449 "\xff\xff\xff\xff\xff\xff\xff\xff"
21450 "\xff\xff\xff\xff\xff\xff\xff\xff"
21451 "\xff\xff\xff\xff\xff\xff\xff\xff"
21452 "\xff\xff\xff\xff\xff\xff\xff\xff"
21453 "\xff\xff\xff\xff\xff\xff\xff\xff"
21454 "\xff\xff\xff\xff\xff\xff\xff\xff"
21455 "\xff\xff\xff\xff\xff\xff\xff\xff",
21456 .rlen = 192,
Herbert Xu8f69b762015-06-16 13:54:26 +080021457 }, {
21458 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21459 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21460 "\x2E\x44\x3B\x68",
21461 .klen = 20,
21462 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
21463 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
21464 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
21465 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
21466 "\x38\xD3\x01\x00\x00\x01\x00\x00"
21467 "\x00\x00\x00\x00\x04\x5F\x73\x69"
21468 "\x70\x04\x5F\x75\x64\x70\x03\x73"
21469 "\x69\x70\x09\x63\x79\x62\x65\x72"
21470 "\x63\x69\x74\x79\x02\x64\x6B\x00"
21471 "\x00\x21\x00\x01\x01\x02\x02\x01",
21472 .rlen = 72,
21473 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080021474 "\x00\x00\x00\x00\x49\x56\xED\x7E"
21475 "\x3B\x24\x4C\xFE",
21476 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021477 .input = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
21478 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
21479 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
21480 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
21481 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
21482 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
21483 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
21484 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
21485 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
21486 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
21487 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
21488 .ilen = 88,
21489 }, {
21490 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21491 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21492 "\xCA\xFE\xBA\xBE",
21493 .klen = 20,
21494 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21495 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
21496 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
21497 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
21498 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
21499 "\x00\x01\x00\x00\x00\x00\x00\x00"
21500 "\x03\x73\x69\x70\x09\x63\x79\x62"
21501 "\x65\x72\x63\x69\x74\x79\x02\x64"
21502 "\x6B\x00\x00\x01\x00\x01\x00\x01",
21503 .rlen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080021504 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
21505 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21506 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021507 .input = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
21508 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
21509 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
21510 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
21511 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
21512 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
21513 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
21514 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
21515 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
21516 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
21517 .ilen = 80,
21518 }, {
21519 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21520 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21521 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21522 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21523 "\x11\x22\x33\x44",
21524 .klen = 36,
21525 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
21526 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
21527 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
21528 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
21529 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
21530 "\x70\x02\x40\x00\x20\xBF\x00\x00"
21531 "\x02\x04\x05\xB4\x01\x01\x04\x02"
21532 "\x01\x02\x02\x01",
21533 .rlen = 52,
Herbert Xu85375442015-07-09 07:17:25 +080021534 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
21535 "\x01\x02\x03\x04\x05\x06\x07\x08",
21536 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021537 .input = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
21538 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
21539 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
21540 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
21541 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
21542 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
21543 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
21544 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
21545 "\x15\x95\x6C\x96",
21546 .ilen = 68,
21547 }, {
21548 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
21549 "\x00\x00\x00\x00\x00\x00\x00\x00"
21550 "\x00\x00\x00\x00",
21551 .klen = 20,
21552 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
21553 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
21554 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
21555 "\x01\x01\x01\x01\x08\x00\x07\x5C"
21556 "\x02\x00\x44\x00\x61\x62\x63\x64"
21557 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21558 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21559 "\x75\x76\x77\x61\x62\x63\x64\x65"
21560 "\x66\x67\x68\x69\x01\x02\x02\x01",
21561 .rlen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080021562 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
21563 "\x00\x00\x00\x00\x00\x00\x00\x00",
21564 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021565 .input = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
21566 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
21567 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
21568 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
21569 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
21570 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
21571 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
21572 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
21573 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
21574 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
21575 .ilen = 80,
21576 }, {
21577 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21578 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21579 "\x57\x69\x0E\x43",
21580 .klen = 20,
21581 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21582 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
21583 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
21584 "\x01\x01\x01\x01\x08\x00\x08\x5C"
21585 "\x02\x00\x43\x00\x61\x62\x63\x64"
21586 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21587 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21588 "\x75\x76\x77\x61\x62\x63\x64\x65"
21589 "\x66\x67\x68\x69\x01\x02\x02\x01",
21590 .rlen = 64,
21591 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021592 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21593 "\xA2\xFC\xA1\xA3",
21594 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021595 .input = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
21596 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
21597 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
21598 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
21599 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21600 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21601 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
21602 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
21603 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
21604 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
21605 .ilen = 80,
21606 }, {
21607 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21608 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21609 "\x57\x69\x0E\x43",
21610 .klen = 20,
21611 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21612 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
21613 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
21614 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
21615 "\x01\x02\x02\x01",
21616 .rlen = 28,
21617 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021618 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21619 "\xA2\xFC\xA1\xA3",
21620 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021621 .input = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
21622 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
21623 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
21624 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
21625 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
21626 "\xE7\xD0\x5D\x35",
21627 .ilen = 44,
21628 }, {
21629 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21630 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21631 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21632 "\xCA\xFE\xBA\xBE",
21633 .klen = 28,
21634 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21635 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
21636 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
21637 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
21638 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
21639 "\x50\x10\x16\xD0\x75\x68\x00\x01",
21640 .rlen = 40,
Herbert Xu85375442015-07-09 07:17:25 +080021641 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
21642 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21643 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021644 .input = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
21645 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
21646 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
21647 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
21648 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
21649 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
21650 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
21651 .ilen = 56,
21652 }, {
21653 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21654 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21655 "\xDE\xCA\xF8\x88",
21656 .klen = 20,
21657 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21658 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
21659 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
21660 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21661 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
21662 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
21663 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
21664 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
21665 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
21666 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
21667 "\x23\x01\x01\x01",
21668 .rlen = 76,
21669 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080021670 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21671 "\xCE\xFA\xCE\x74",
21672 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021673 .input = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
21674 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
21675 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
21676 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
21677 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
21678 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
21679 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
21680 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
21681 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
21682 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
21683 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
21684 "\x69\x62\x34\x36",
21685 .ilen = 92,
21686 }, {
21687 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21688 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21689 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21690 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21691 "\x73\x61\x6C\x74",
21692 .klen = 36,
21693 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21694 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
21695 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
21696 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
21697 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
21698 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
21699 .rlen = 40,
21700 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080021701 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21702 "\x69\x76\x65\x63",
21703 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021704 .input = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
21705 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
21706 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
21707 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
21708 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
21709 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
21710 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
21711 .ilen = 56,
21712 }, {
21713 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21714 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21715 "\x57\x69\x0E\x43",
21716 .klen = 20,
21717 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21718 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
21719 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
21720 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21721 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
21722 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
21723 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
21724 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
21725 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
21726 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
21727 "\x15\x01\x01\x01",
21728 .rlen = 76,
21729 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021730 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21731 "\xA2\xFC\xA1\xA3",
21732 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021733 .input = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
21734 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
21735 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
21736 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
21737 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
21738 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
21739 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
21740 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
21741 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
21742 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
21743 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
21744 "\x8C\xAA\x81\xE2",
21745 .ilen = 92,
21746 }, {
21747 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21748 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21749 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21750 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21751 "\x73\x61\x6C\x74",
21752 .klen = 36,
21753 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21754 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
21755 "\x6C\x65\x73\x01\x74\x68\x65\x01"
21756 "\x6E\x65\x74\x77\x65\x01\x64\x65"
21757 "\x66\x69\x6E\x65\x01\x74\x68\x65"
21758 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
21759 "\x67\x69\x65\x73\x01\x74\x68\x61"
21760 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
21761 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
21762 "\x72\x72\x6F\x77\x01\x02\x02\x01",
21763 .rlen = 72,
21764 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080021765 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21766 "\x69\x76\x65\x63",
21767 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021768 .input = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
21769 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
21770 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
21771 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
21772 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
21773 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
21774 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
21775 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
21776 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
21777 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
21778 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
21779 .ilen = 88,
21780 }, {
21781 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
21782 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
21783 "\xD9\x66\x42\x67",
21784 .klen = 20,
21785 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21786 .result = "\x01\x02\x02\x01",
21787 .rlen = 4,
Herbert Xu85375442015-07-09 07:17:25 +080021788 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
21789 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21790 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021791 .input = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
21792 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
21793 "\x04\xBE\xF2\x70",
21794 .ilen = 20,
21795 }, {
21796 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21797 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21798 "\xDE\xCA\xF8\x88",
21799 .klen = 20,
21800 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21801 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
21802 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
21803 "\x62\x65\x00\x01",
21804 .rlen = 20,
21805 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080021806 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21807 "\xCE\xFA\xCE\x74",
21808 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021809 .input = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
21810 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
21811 "\x43\x33\x21\x64\x41\x25\x03\x52"
21812 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
21813 "\x43\xAF\x8C\x3E",
21814 .ilen = 36,
21815 }, {
21816 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
21817 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
21818 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
21819 "\x62\x65\x66\x6F\x72\x65\x69\x61"
21820 "\x74\x75\x72\x6E",
21821 .klen = 36,
21822 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
21823 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21824 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21825 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21826 "\x02\x00\x07\x00\x61\x62\x63\x64"
21827 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21828 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21829 "\x01\x02\x02\x01",
21830 .rlen = 52,
21831 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
Herbert Xu85375442015-07-09 07:17:25 +080021832 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
21833 "\x67\x65\x74\x6D",
21834 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021835 .input = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
21836 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
21837 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
21838 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
21839 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
21840 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
21841 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
21842 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
21843 "\x9F\xB4\xC0\x53",
21844 .ilen = 68,
21845 }, {
21846 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21847 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21848 "\x57\x69\x0E\x43",
21849 .klen = 20,
21850 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21851 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21852 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21853 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21854 "\x02\x00\x07\x00\x61\x62\x63\x64"
21855 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21856 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21857 "\x01\x02\x02\x01",
21858 .rlen = 52,
21859 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021860 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21861 "\xA2\xFC\xA1\xA3",
21862 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021863 .input = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
21864 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
21865 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
21866 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
21867 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21868 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21869 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
21870 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
21871 "\x40\xD7\xCB\x05",
21872 .ilen = 68,
21873 }, {
21874 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21875 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21876 "\x22\x43\x3C\x64",
21877 .klen = 20,
21878 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
21879 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
21880 "\x61\x62\x63\x64\x65\x66\x67\x68"
21881 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
21882 "\x71\x72\x73\x74\x01\x02\x02\x01",
21883 .rlen = 32,
21884 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080021885 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
21886 "\x3A\x23\x4B\xFD",
21887 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021888 .input = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
21889 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
21890 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
21891 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
21892 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
21893 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
21894 .ilen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040021895 }
21896};
21897
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021898static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = {
21899 { /* From draft-mcgrew-gcm-test-01 */
21900 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21901 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21902 "\x22\x43\x3c\x64",
21903 .klen = 20,
21904 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021905 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21906 "\x00\x00\x00\x00\x00\x00\x00\x00",
21907 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021908 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21909 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21910 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21911 "\x02\x00\x07\x00\x61\x62\x63\x64"
21912 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21913 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21914 "\x01\x02\x02\x01",
21915 .ilen = 52,
21916 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21917 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21918 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21919 "\x02\x00\x07\x00\x61\x62\x63\x64"
21920 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21921 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21922 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21923 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21924 "\xe4\x09\x9a\xaa",
21925 .rlen = 68,
21926 }
21927};
21928
21929static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = {
21930 { /* From draft-mcgrew-gcm-test-01 */
21931 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21932 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21933 "\x22\x43\x3c\x64",
21934 .klen = 20,
21935 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021936 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21937 "\x00\x00\x00\x00\x00\x00\x00\x00",
21938 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021939 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21940 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21941 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21942 "\x02\x00\x07\x00\x61\x62\x63\x64"
21943 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21944 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21945 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21946 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21947 "\xe4\x09\x9a\xaa",
21948 .ilen = 68,
21949 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21950 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21951 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21952 "\x02\x00\x07\x00\x61\x62\x63\x64"
21953 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21954 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21955 "\x01\x02\x02\x01",
21956 .rlen = 52,
21957 }, { /* nearly same as previous, but should fail */
21958 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21959 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21960 "\x22\x43\x3c\x64",
21961 .klen = 20,
21962 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021963 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21964 "\x00\x00\x00\x00\x00\x00\x00\x00",
21965 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021966 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21967 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21968 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21969 "\x02\x00\x07\x00\x61\x62\x63\x64"
21970 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21971 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21972 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21973 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21974 "\x00\x00\x00\x00",
21975 .ilen = 68,
21976 .novrfy = 1,
21977 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21978 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21979 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21980 "\x02\x00\x07\x00\x61\x62\x63\x64"
21981 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21982 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21983 "\x01\x02\x02\x01",
21984 .rlen = 52,
21985 },
21986};
21987
Herbert Xuda7f0332008-07-31 17:08:25 +080021988static struct aead_testvec aes_ccm_enc_tv_template[] = {
21989 { /* From RFC 3610 */
21990 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21991 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21992 .klen = 16,
21993 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21994 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21995 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21996 .alen = 8,
21997 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21998 "\x10\x11\x12\x13\x14\x15\x16\x17"
21999 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
22000 .ilen = 23,
22001 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
22002 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
22003 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
22004 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
22005 .rlen = 31,
22006 }, {
22007 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22008 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
22009 .klen = 16,
22010 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
22011 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
22012 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
22013 "\x08\x09\x0a\x0b",
22014 .alen = 12,
22015 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
22016 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
22017 "\x1c\x1d\x1e\x1f",
22018 .ilen = 20,
22019 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
22020 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
22021 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
22022 "\x7d\x9c\x2d\x93",
22023 .rlen = 28,
22024 }, {
22025 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22026 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
22027 .klen = 16,
22028 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
22029 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
22030 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
22031 .alen = 8,
22032 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22033 "\x10\x11\x12\x13\x14\x15\x16\x17"
22034 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
22035 "\x20",
22036 .ilen = 25,
22037 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
22038 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
22039 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
22040 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
22041 "\x7e\x5f\x4e",
22042 .rlen = 35,
22043 }, {
22044 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22045 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
22046 .klen = 16,
22047 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
22048 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
22049 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
22050 "\x08\x09\x0a\x0b",
22051 .alen = 12,
22052 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
22053 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
22054 "\x1c\x1d\x1e",
22055 .ilen = 19,
22056 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
22057 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
22058 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
22059 "\x4d\x99\x99\x88\xdd",
22060 .rlen = 29,
22061 }, {
22062 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
22063 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
22064 .klen = 16,
22065 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
22066 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
22067 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
22068 .alen = 8,
22069 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
22070 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
22071 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
22072 .ilen = 24,
22073 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
22074 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
22075 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
22076 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
22077 .rlen = 32,
22078 }, {
22079 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
22080 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
22081 .klen = 16,
22082 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
22083 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
22084 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
22085 "\x20\xea\x60\xc0",
22086 .alen = 12,
22087 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
22088 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
22089 "\x3a\x80\x3b\xa8\x7f",
22090 .ilen = 21,
22091 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
22092 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
22093 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
22094 "\x5a\xe0\x70\x45\x51",
22095 .rlen = 29,
22096 }, {
22097 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
22098 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
22099 .klen = 16,
22100 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
22101 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
22102 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
22103 .alen = 8,
22104 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
22105 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
22106 "\x98\x09\xd6\x7d\xbe\xdd\x18",
22107 .ilen = 23,
22108 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
22109 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
22110 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
22111 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
22112 "\xba",
22113 .rlen = 33,
Ard Biesheuvel45859882014-04-16 20:40:04 +080022114 }, {
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022115 /* This is taken from FIPS CAVS. */
Ard Biesheuvel45859882014-04-16 20:40:04 +080022116 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
22117 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e",
22118 .klen = 16,
22119 .iv = "\x03\x96\xac\x59\x30\x07\xa1\xe2\xa2\xc7\x55\x24\0\0\0\0",
22120 .alen = 0,
22121 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
22122 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
22123 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
22124 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
22125 .ilen = 32,
22126 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
22127 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
22128 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
22129 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
22130 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
22131 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
22132 .rlen = 48,
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022133 }, {
22134 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
22135 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3",
22136 .klen = 16,
22137 .iv = "\x03\x4f\xa3\x19\xd3\x01\x5a\xd8"
22138 "\x30\x60\x15\x56\x00\x00\x00\x00",
22139 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
22140 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
22141 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
22142 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
22143 .alen = 32,
22144 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
22145 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
22146 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
22147 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
22148 .ilen = 32,
22149 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
22150 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
22151 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
22152 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
22153 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
22154 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
22155 .rlen = 48,
22156 }, {
22157 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
22158 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
22159 "\x53\x14\x73\x66\x8d\x88\xf6\x80",
22160 .klen = 24,
22161 .iv = "\x03\xa0\x20\x35\x26\xf2\x21\x8d"
22162 "\x50\x20\xda\xe2\x00\x00\x00\x00",
22163 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
22164 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
22165 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
22166 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
22167 .alen = 32,
22168 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
22169 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
22170 .rlen = 16,
22171 }, {
22172 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
22173 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
22174 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01",
22175 .klen = 24,
22176 .iv = "\x03\xd6\x3c\x8c\x86\x84\xb6\xcd"
22177 "\xef\x09\x2e\x94\x00\x00\x00\x00",
22178 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
22179 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
22180 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
22181 "\xe3\x00\x73\x69\x84\x69\x87\x79",
22182 .alen = 32,
22183 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
22184 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
22185 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
22186 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
22187 .ilen = 32,
22188 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
22189 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
22190 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
22191 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
22192 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
22193 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
22194 .rlen = 48,
22195 }, {
22196 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
22197 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
22198 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
22199 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b",
22200 .klen = 32,
22201 .iv = "\x03\x1e\x29\x91\xad\x8e\xc1\x53"
22202 "\x0a\xcf\x2d\xbe\x00\x00\x00\x00",
22203 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
22204 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
22205 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
22206 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
22207 .alen = 32,
22208 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
22209 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
22210 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
22211 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
22212 .ilen = 32,
22213 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
22214 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
22215 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
22216 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
22217 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
22218 .rlen = 40,
22219 }, {
22220 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
22221 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
22222 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
22223 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39",
22224 .klen = 32,
22225 .iv = "\x03\xf9\xd9\x4e\x63\xb5\x3d\x9d"
22226 "\x43\xf6\x1e\x50",
22227 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
22228 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
22229 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
22230 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
22231 .alen = 32,
22232 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
22233 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
22234 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
22235 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
22236 .ilen = 32,
22237 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
22238 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
22239 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
22240 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
22241 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
22242 "\x7b\x72\x8a\xf7",
22243 .rlen = 44,
22244 }, {
22245 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
22246 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
22247 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
22248 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b",
22249 .klen = 32,
22250 .iv = "\x03\x24\xa7\x8b\x07\xcb\xcc\x0e"
22251 "\xe6\x33\xbf\xf5\x00\x00\x00\x00",
22252 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
22253 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
22254 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
22255 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
22256 .alen = 32,
22257 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
22258 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
22259 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
22260 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
22261 .ilen = 32,
22262 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
22263 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
22264 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
22265 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
22266 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
22267 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
22268 .rlen = 48,
Ard Biesheuvel45859882014-04-16 20:40:04 +080022269 }
Herbert Xuda7f0332008-07-31 17:08:25 +080022270};
22271
22272static struct aead_testvec aes_ccm_dec_tv_template[] = {
22273 { /* From RFC 3610 */
22274 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22275 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
22276 .klen = 16,
22277 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
22278 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
22279 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
22280 .alen = 8,
22281 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
22282 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
22283 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
22284 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
22285 .ilen = 31,
22286 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22287 "\x10\x11\x12\x13\x14\x15\x16\x17"
22288 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
22289 .rlen = 23,
22290 }, {
22291 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22292 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
22293 .klen = 16,
22294 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
22295 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
22296 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
22297 "\x08\x09\x0a\x0b",
22298 .alen = 12,
22299 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
22300 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
22301 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
22302 "\x7d\x9c\x2d\x93",
22303 .ilen = 28,
22304 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
22305 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
22306 "\x1c\x1d\x1e\x1f",
22307 .rlen = 20,
22308 }, {
22309 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22310 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
22311 .klen = 16,
22312 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
22313 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
22314 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
22315 .alen = 8,
22316 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
22317 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
22318 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
22319 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
22320 "\x7e\x5f\x4e",
22321 .ilen = 35,
22322 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22323 "\x10\x11\x12\x13\x14\x15\x16\x17"
22324 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
22325 "\x20",
22326 .rlen = 25,
22327 }, {
22328 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22329 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
22330 .klen = 16,
22331 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
22332 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
22333 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
22334 "\x08\x09\x0a\x0b",
22335 .alen = 12,
22336 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
22337 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
22338 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
22339 "\x4d\x99\x99\x88\xdd",
22340 .ilen = 29,
22341 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
22342 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
22343 "\x1c\x1d\x1e",
22344 .rlen = 19,
22345 }, {
22346 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
22347 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
22348 .klen = 16,
22349 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
22350 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
22351 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
22352 .alen = 8,
22353 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
22354 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
22355 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
22356 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
22357 .ilen = 32,
22358 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
22359 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
22360 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
22361 .rlen = 24,
22362 }, {
22363 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
22364 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
22365 .klen = 16,
22366 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
22367 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
22368 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
22369 "\x20\xea\x60\xc0",
22370 .alen = 12,
22371 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
22372 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
22373 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
22374 "\x5a\xe0\x70\x45\x51",
22375 .ilen = 29,
22376 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
22377 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
22378 "\x3a\x80\x3b\xa8\x7f",
22379 .rlen = 21,
22380 }, {
22381 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
22382 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
22383 .klen = 16,
22384 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
22385 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
22386 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
22387 .alen = 8,
22388 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
22389 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
22390 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
22391 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
22392 "\xba",
22393 .ilen = 33,
22394 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
22395 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
22396 "\x98\x09\xd6\x7d\xbe\xdd\x18",
22397 .rlen = 23,
Jarod Wilson5d667322009-05-04 19:23:40 +080022398 }, {
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022399 /* This is taken from FIPS CAVS. */
Jarod Wilson5d667322009-05-04 19:23:40 +080022400 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022401 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9",
22402 .klen = 16,
22403 .iv = "\x03\xc6\xfb\x7d\x80\x0d\x13\xab"
22404 "\xd8\xa6\xb2\xd8\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022405 .alen = 0,
22406 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
22407 .ilen = 8,
22408 .result = "\x00",
22409 .rlen = 0,
22410 .novrfy = 1,
22411 }, {
22412 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022413 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9",
22414 .klen = 16,
22415 .iv = "\x03\xaf\x94\x87\x78\x35\x82\x81"
22416 "\x7f\x88\x94\x68\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022417 .alen = 0,
22418 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
22419 .ilen = 8,
22420 .result = "\x00",
22421 .rlen = 0,
22422 }, {
22423 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022424 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8",
22425 .klen = 16,
22426 .iv = "\x03\xc6\xfb\x7d\x80\x0d\x13\xab"
22427 "\xd8\xa6\xb2\xd8\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022428 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
22429 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
22430 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
22431 "\xd8\x94\x99\x91\x81\x54\x62\x57",
22432 .alen = 32,
22433 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
22434 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
22435 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
22436 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
22437 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
22438 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
22439 .ilen = 48,
22440 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
22441 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
22442 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
22443 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
22444 .rlen = 32,
22445 .novrfy = 1,
22446 }, {
22447 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022448 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8",
22449 .klen = 16,
22450 .iv = "\x03\x05\xe0\xc9\x0f\xed\x34\xea"
22451 "\x97\xd4\x3b\xdf\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022452 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
22453 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
22454 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
22455 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
22456 .alen = 32,
22457 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
22458 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
22459 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
22460 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
22461 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
22462 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
22463 .ilen = 48,
22464 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
22465 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
22466 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
22467 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
22468 .rlen = 32,
22469 }, {
22470 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
22471 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022472 "\xa4\x48\x93\x39\x26\x71\x4a\xc6",
22473 .klen = 24,
22474 .iv = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22475 "\x57\xba\xfd\x9e\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022476 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
22477 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
22478 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
22479 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
22480 .alen = 32,
22481 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
22482 .ilen = 8,
22483 .result = "\x00",
22484 .rlen = 0,
22485 }, {
22486 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22487 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022488 "\x29\xa0\xba\x9e\x48\x78\xd1\xba",
22489 .klen = 24,
22490 .iv = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22491 "\x57\xba\xfd\x9e\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022492 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
22493 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
22494 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
22495 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
22496 .alen = 32,
22497 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
22498 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
22499 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
22500 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
22501 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
22502 .ilen = 40,
22503 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
22504 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
22505 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
22506 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
22507 .rlen = 32,
22508 }, {
22509 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22510 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022511 "\x29\xa0\xba\x9e\x48\x78\xd1\xba",
22512 .klen = 24,
22513 .iv = "\x03\xd1\xfc\x57\x9c\xfe\xb8\x9c"
22514 "\xad\x71\xaa\x1f\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022515 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
22516 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
22517 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
22518 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
22519 .alen = 32,
22520 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
22521 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
22522 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
22523 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
22524 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
22525 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
22526 .ilen = 48,
22527 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
22528 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
22529 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
22530 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
22531 .rlen = 32,
22532 .novrfy = 1,
22533 }, {
22534 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
22535 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
22536 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022537 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff",
22538 .klen = 32,
22539 .iv = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22540 "\x57\xba\xfd\x9e\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022541 .alen = 0,
22542 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
22543 .ilen = 8,
22544 .result = "\x00",
22545 .rlen = 0,
22546 }, {
22547 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
22548 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
22549 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022550 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb",
22551 .klen = 32,
22552 .iv = "\x03\x85\x34\x66\x42\xc8\x92\x0f"
22553 "\x36\x58\xe0\x6b\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022554 .alen = 0,
22555 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
22556 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
22557 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
22558 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
22559 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
22560 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
22561 .ilen = 48,
22562 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
22563 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
22564 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
22565 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
22566 .rlen = 32,
22567 .novrfy = 1,
22568 }, {
22569 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22570 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
22571 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022572 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b",
22573 .klen = 32,
22574 .iv = "\x03\xcf\x76\x3f\xd9\x95\x75\x8f"
22575 "\x44\x89\x40\x7b\x00\x00\x00\x00",
Jarod Wilson5d667322009-05-04 19:23:40 +080022576 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
22577 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
22578 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
22579 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
22580 .alen = 32,
22581 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
22582 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
22583 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
22584 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
22585 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
22586 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
22587 .ilen = 48,
22588 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
22589 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
22590 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
22591 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
22592 .rlen = 32,
22593 },
22594};
22595
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080022596/*
Herbert Xu0bc5a6c2015-07-14 16:53:17 +080022597 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
22598 * use a 13-byte nonce, we only support an 11-byte nonce. Worse,
22599 * they use AD lengths which are not valid ESP header lengths.
22600 *
22601 * These vectors are copied/generated from the ones for rfc4106 with
22602 * the key truncated by one byte..
22603 */
22604static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
22605 { /* Generated using Crypto++ */
22606 .key = zeroed_string,
22607 .klen = 19,
22608 .iv = zeroed_string,
22609 .input = zeroed_string,
22610 .ilen = 16,
22611 .assoc = zeroed_string,
22612 .alen = 16,
22613 .result = "\x2E\x9A\xCA\x6B\xDA\x54\xFC\x6F"
22614 "\x12\x50\xE8\xDE\x81\x3C\x63\x08"
22615 "\x1A\x22\xBA\x75\xEE\xD4\xD5\xB5"
22616 "\x27\x50\x01\xAC\x03\x33\x39\xFB",
22617 .rlen = 32,
22618 },{
22619 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22620 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22621 "\x00\x00\x00",
22622 .klen = 19,
22623 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22624 .input = zeroed_string,
22625 .ilen = 16,
22626 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
22627 "\x00\x00\x00\x00\x00\x00\x00\x01",
22628 .alen = 16,
22629 .result = "\xCF\xB9\x99\x17\xC8\x86\x0E\x7F"
22630 "\x7E\x76\xF8\xE6\xF8\xCC\x1F\x17"
22631 "\x6A\xE0\x53\x9F\x4B\x73\x7E\xDA"
22632 "\x08\x09\x4E\xC4\x1E\xAD\xC6\xB0",
22633 .rlen = 32,
22634
22635 }, {
22636 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22637 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22638 "\x00\x00\x00",
22639 .klen = 19,
22640 .iv = zeroed_string,
22641 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22642 "\x01\x01\x01\x01\x01\x01\x01\x01",
22643 .ilen = 16,
22644 .assoc = zeroed_string,
22645 .alen = 16,
22646 .result = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22647 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22648 "\xA1\xE2\xC2\x42\x2B\x81\x70\x40"
22649 "\xFD\x7F\x76\xD1\x03\x07\xBB\x0C",
22650 .rlen = 32,
22651 }, {
22652 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22653 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22654 "\x00\x00\x00",
22655 .klen = 19,
22656 .iv = zeroed_string,
22657 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22658 "\x01\x01\x01\x01\x01\x01\x01\x01",
22659 .ilen = 16,
22660 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22661 "\x00\x00\x00\x00\x00\x00\x00\x00",
22662 .alen = 16,
22663 .result = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22664 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22665 "\x5B\xC0\x73\xE0\x2B\x73\x68\xC9"
22666 "\x2D\x8C\x58\xC2\x90\x3D\xB0\x3E",
22667 .rlen = 32,
22668 }, {
22669 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22670 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22671 "\x00\x00\x00",
22672 .klen = 19,
22673 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22674 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22675 "\x01\x01\x01\x01\x01\x01\x01\x01",
22676 .ilen = 16,
22677 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22678 "\x00\x00\x00\x00\x00\x00\x00\x01",
22679 .alen = 16,
22680 .result = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22681 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22682 "\x43\x8E\x76\x57\x3B\xB4\x05\xE8"
22683 "\xA9\x9B\xBF\x25\xE0\x4F\xC0\xED",
22684 .rlen = 32,
22685 }, {
22686 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22687 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22688 "\x00\x00\x00",
22689 .klen = 19,
22690 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
22691 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
22692 "\x01\x01\x01\x01\x01\x01\x01\x01"
22693 "\x01\x01\x01\x01\x01\x01\x01\x01"
22694 "\x01\x01\x01\x01\x01\x01\x01\x01"
22695 "\x01\x01\x01\x01\x01\x01\x01\x01"
22696 "\x01\x01\x01\x01\x01\x01\x01\x01"
22697 "\x01\x01\x01\x01\x01\x01\x01\x01"
22698 "\x01\x01\x01\x01\x01\x01\x01\x01",
22699 .ilen = 64,
22700 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
22701 "\x00\x00\x00\x00\x00\x00\x00\x01",
22702 .alen = 16,
22703 .result = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22704 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22705 "\x9C\xA4\x97\x83\x3F\x01\xA5\xF4"
22706 "\x43\x09\xE7\xB8\xE9\xD1\xD7\x02"
22707 "\x9B\xAB\x39\x18\xEB\x94\x34\x36"
22708 "\xE6\xC5\xC8\x9B\x00\x81\x9E\x49"
22709 "\x1D\x78\xE1\x48\xE3\xE9\xEA\x8E"
22710 "\x3A\x2B\x67\x5D\x35\x6A\x0F\xDB"
22711 "\x02\x73\xDD\xE7\x30\x4A\x30\x54"
22712 "\x1A\x9D\x09\xCA\xC8\x1C\x32\x5F",
22713 .rlen = 80,
22714 }, {
22715 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
22716 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22717 "\x00\x00\x00",
22718 .klen = 19,
22719 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
22720 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
22721 "\xff\xff\xff\xff\xff\xff\xff\xff"
22722 "\xff\xff\xff\xff\xff\xff\xff\xff"
22723 "\xff\xff\xff\xff\xff\xff\xff\xff"
22724 "\xff\xff\xff\xff\xff\xff\xff\xff"
22725 "\xff\xff\xff\xff\xff\xff\xff\xff"
22726 "\xff\xff\xff\xff\xff\xff\xff\xff"
22727 "\xff\xff\xff\xff\xff\xff\xff\xff"
22728 "\xff\xff\xff\xff\xff\xff\xff\xff"
22729 "\xff\xff\xff\xff\xff\xff\xff\xff"
22730 "\xff\xff\xff\xff\xff\xff\xff\xff"
22731 "\xff\xff\xff\xff\xff\xff\xff\xff"
22732 "\xff\xff\xff\xff\xff\xff\xff\xff"
22733 "\xff\xff\xff\xff\xff\xff\xff\xff"
22734 "\xff\xff\xff\xff\xff\xff\xff\xff"
22735 "\xff\xff\xff\xff\xff\xff\xff\xff"
22736 "\xff\xff\xff\xff\xff\xff\xff\xff"
22737 "\xff\xff\xff\xff\xff\xff\xff\xff"
22738 "\xff\xff\xff\xff\xff\xff\xff\xff"
22739 "\xff\xff\xff\xff\xff\xff\xff\xff"
22740 "\xff\xff\xff\xff\xff\xff\xff\xff"
22741 "\xff\xff\xff\xff\xff\xff\xff\xff"
22742 "\xff\xff\xff\xff\xff\xff\xff\xff"
22743 "\xff\xff\xff\xff\xff\xff\xff\xff",
22744 .ilen = 192,
22745 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
22746 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
22747 "\x89\xab\xcd\xef",
22748 .alen = 20,
22749 .result = "\x64\x17\xDC\x24\x9D\x92\xBA\x5E"
22750 "\x7C\x64\x6D\x33\x46\x77\xAC\xB1"
22751 "\x5C\x9E\xE2\xC7\x27\x11\x3E\x95"
22752 "\x7D\xBE\x28\xC8\xC1\xCA\x5E\x8C"
22753 "\xB4\xE2\xDE\x9F\x53\x59\x26\xDB"
22754 "\x0C\xD4\xE4\x07\x9A\xE6\x3E\x01"
22755 "\x58\x0D\x3E\x3D\xD5\x21\xEB\x04"
22756 "\x06\x9D\x5F\xB9\x02\x49\x1A\x2B"
22757 "\xBA\xF0\x4E\x3B\x85\x50\x5B\x09"
22758 "\xFE\xEC\xFC\x54\xEC\x0C\xE2\x79"
22759 "\x8A\x2F\x5F\xD7\x05\x5D\xF1\x6D"
22760 "\x22\xEB\xD1\x09\x80\x3F\x5A\x70"
22761 "\xB2\xB9\xD3\x63\x99\xC2\x4D\x1B"
22762 "\x36\x12\x00\x89\xAA\x5D\x55\xDA"
22763 "\x1D\x5B\xD8\x3C\x5F\x09\xD2\xE6"
22764 "\x39\x41\x5C\xF0\xBE\x26\x4E\x5F"
22765 "\x2B\x50\x44\x52\xC2\x10\x7D\x38"
22766 "\x82\x64\x83\x0C\xAE\x49\xD0\xE5"
22767 "\x4F\xE5\x66\x4C\x58\x7A\xEE\x43"
22768 "\x3B\x51\xFE\xBA\x24\x8A\xFE\xDC"
22769 "\x19\x6D\x60\x66\x61\xF9\x9A\x3F"
22770 "\x75\xFC\x38\x53\x5B\xB5\xCD\x52"
22771 "\x4F\xE5\xE4\xC9\xFE\x10\xCB\x98"
22772 "\xF0\x06\x5B\x07\xAB\xBB\xF4\x0E"
22773 "\x2D\xC2\xDD\x5D\xDD\x22\x9A\xCC"
22774 "\x39\xAB\x63\xA5\x3D\x9C\x51\x8A",
22775 .rlen = 208,
22776 }, { /* From draft-mcgrew-gcm-test-01 */
22777 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
22778 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
22779 "\x2E\x44\x3B",
22780 .klen = 19,
22781 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
22782 .input = "\x45\x00\x00\x48\x69\x9A\x00\x00"
22783 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
22784 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
22785 "\x38\xD3\x01\x00\x00\x01\x00\x00"
22786 "\x00\x00\x00\x00\x04\x5F\x73\x69"
22787 "\x70\x04\x5F\x75\x64\x70\x03\x73"
22788 "\x69\x70\x09\x63\x79\x62\x65\x72"
22789 "\x63\x69\x74\x79\x02\x64\x6B\x00"
22790 "\x00\x21\x00\x01\x01\x02\x02\x01",
22791 .ilen = 72,
22792 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
22793 "\x00\x00\x00\x00\x49\x56\xED\x7E"
22794 "\x3B\x24\x4C\xFE",
22795 .alen = 20,
22796 .result = "\x89\xBA\x3E\xEF\xE6\xD6\xCF\xDB"
22797 "\x83\x60\xF5\xBA\x3A\x56\x79\xE6"
22798 "\x7E\x0C\x53\xCF\x9E\x87\xE0\x4E"
22799 "\x1A\x26\x01\x24\xC7\x2E\x3D\xBF"
22800 "\x29\x2C\x91\xC1\xB8\xA8\xCF\xE0"
22801 "\x39\xF8\x53\x6D\x31\x22\x2B\xBF"
22802 "\x98\x81\xFC\x34\xEE\x85\x36\xCD"
22803 "\x26\xDB\x6C\x7A\x0C\x77\x8A\x35"
22804 "\x18\x85\x54\xB2\xBC\xDD\x3F\x43"
22805 "\x61\x06\x8A\xDF\x86\x3F\xB4\xAC"
22806 "\x97\xDC\xBD\xFD\x92\x10\xC5\xFF",
22807 .rlen = 88,
22808 }, {
22809 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22810 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
22811 "\xCA\xFE\xBA",
22812 .klen = 19,
22813 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22814 .input = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
22815 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
22816 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
22817 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
22818 "\x00\x01\x00\x00\x00\x00\x00\x00"
22819 "\x03\x73\x69\x70\x09\x63\x79\x62"
22820 "\x65\x72\x63\x69\x74\x79\x02\x64"
22821 "\x6B\x00\x00\x01\x00\x01\x00\x01",
22822 .ilen = 64,
22823 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
22824 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22825 .alen = 16,
22826 .result = "\x4B\xC2\x70\x60\x64\xD2\xF3\xC8"
22827 "\xE5\x26\x8A\xDE\xB8\x7E\x7D\x16"
22828 "\x56\xC7\xD2\x88\xBA\x8D\x58\xAF"
22829 "\xF5\x71\xB6\x37\x84\xA7\xB1\x99"
22830 "\x51\x5C\x0D\xA0\x27\xDE\xE7\x2D"
22831 "\xEF\x25\x88\x1F\x1D\x77\x11\xFF"
22832 "\xDB\xED\xEE\x56\x16\xC5\x5C\x9B"
22833 "\x00\x62\x1F\x68\x4E\x7C\xA0\x97"
22834 "\x10\x72\x7E\x53\x13\x3B\x68\xE4"
22835 "\x30\x99\x91\x79\x09\xEA\xFF\x6A",
22836 .rlen = 80,
22837 }, {
22838 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22839 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22840 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22841 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22842 "\x11\x22\x33",
22843 .klen = 35,
22844 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
22845 .input = "\x45\x00\x00\x30\x69\xA6\x40\x00"
22846 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
22847 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
22848 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
22849 "\x70\x02\x40\x00\x20\xBF\x00\x00"
22850 "\x02\x04\x05\xB4\x01\x01\x04\x02"
22851 "\x01\x02\x02\x01",
22852 .ilen = 52,
22853 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
22854 "\x01\x02\x03\x04\x05\x06\x07\x08",
22855 .alen = 16,
22856 .result = "\xD6\x31\x0D\x2B\x3D\x6F\xBD\x2F"
22857 "\x58\x41\x7E\xFF\x9A\x9E\x09\xB4"
22858 "\x1A\xF7\xF6\x42\x31\xCD\xBF\xAD"
22859 "\x27\x0E\x2C\xF2\xDB\x10\xDF\x55"
22860 "\x8F\x0D\xD7\xAC\x23\xBD\x42\x10"
22861 "\xD0\xB2\xAF\xD8\x37\xAC\x6B\x0B"
22862 "\x11\xD4\x0B\x12\xEC\xB4\xB1\x92"
22863 "\x23\xA6\x10\xB0\x26\xD6\xD9\x26"
22864 "\x5A\x48\x6A\x3E",
22865 .rlen = 68,
22866 }, {
22867 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
22868 "\x00\x00\x00\x00\x00\x00\x00\x00"
22869 "\x00\x00\x00",
22870 .klen = 19,
22871 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
22872 .input = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
22873 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
22874 "\x01\x01\x01\x01\x08\x00\x07\x5C"
22875 "\x02\x00\x44\x00\x61\x62\x63\x64"
22876 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22877 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22878 "\x75\x76\x77\x61\x62\x63\x64\x65"
22879 "\x66\x67\x68\x69\x01\x02\x02\x01",
22880 .ilen = 64,
22881 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
22882 "\x00\x00\x00\x00\x00\x00\x00\x00",
22883 .alen = 16,
22884 .result = "\x6B\x9A\xCA\x57\x43\x91\xFC\x6F"
22885 "\x92\x51\x23\xA4\xC1\x5B\xF0\x10"
22886 "\xF3\x13\xF4\xF8\xA1\x9A\xB4\xDC"
22887 "\x89\xC8\xF8\x42\x62\x95\xB7\xCB"
22888 "\xB8\xF5\x0F\x1B\x2E\x94\xA2\xA7"
22889 "\xBF\xFB\x8A\x92\x13\x63\xD1\x3C"
22890 "\x08\xF5\xE8\xA6\xAA\xF6\x34\xF9"
22891 "\x42\x05\xAF\xB3\xE7\x9A\xFC\xEE"
22892 "\x36\x25\xC1\x10\x12\x1C\xCA\x82"
22893 "\xEA\xE6\x63\x5A\x57\x28\xA9\x9A",
22894 .rlen = 80,
22895 }, {
22896 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22897 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22898 "\x57\x69\x0E",
22899 .klen = 19,
22900 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22901 .input = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
22902 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
22903 "\x01\x01\x01\x01\x08\x00\x08\x5C"
22904 "\x02\x00\x43\x00\x61\x62\x63\x64"
22905 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22906 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22907 "\x75\x76\x77\x61\x62\x63\x64\x65"
22908 "\x66\x67\x68\x69\x01\x02\x02\x01",
22909 .ilen = 64,
22910 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22911 "\x10\x10\x10\x10\x4E\x28\x00\x00"
22912 "\xA2\xFC\xA1\xA3",
22913 .alen = 20,
22914 .result = "\x6A\x6B\x45\x2B\x7C\x67\x52\xF6"
22915 "\x10\x60\x40\x62\x6B\x4F\x97\x8E"
22916 "\x0B\xB2\x22\x97\xCB\x21\xE0\x90"
22917 "\xA2\xE7\xD1\x41\x30\xE4\x4B\x1B"
22918 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
22919 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
22920 "\x30\xB8\xE5\xDF\xD7\x12\x56\x75"
22921 "\xD0\x95\xB7\xB8\x91\x42\xF7\xFD"
22922 "\x97\x57\xCA\xC1\x20\xD0\x86\xB9"
22923 "\x66\x9D\xB4\x2B\x96\x22\xAC\x67",
22924 .rlen = 80,
22925 }, {
22926 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22927 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22928 "\x57\x69\x0E",
22929 .klen = 19,
22930 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22931 .input = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
22932 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
22933 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
22934 "\x01\x02\x02\x01",
22935 .ilen = 28,
22936 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22937 "\x10\x10\x10\x10\x4E\x28\x00\x00"
22938 "\xA2\xFC\xA1\xA3",
22939 .alen = 20,
22940 .result = "\x6A\x6B\x45\x0B\xA7\x06\x52\xF6"
22941 "\x10\x60\xCF\x01\x6B\x4F\x97\x20"
22942 "\xEA\xB3\x23\x94\xC9\x21\x1D\x33"
22943 "\xA1\xE5\x90\x40\x05\x37\x45\x70"
22944 "\xB5\xD6\x09\x0A\x23\x73\x33\xF9"
22945 "\x08\xB4\x22\xE4",
22946 .rlen = 44,
22947 }, {
22948 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22949 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
22950 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22951 "\xCA\xFE\xBA",
22952 .klen = 27,
22953 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22954 .input = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
22955 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
22956 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
22957 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
22958 "\x50\x10\x16\xD0\x75\x68\x00\x01",
22959 .ilen = 40,
22960 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
22961 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22962 .alen = 16,
22963 .result = "\x05\x22\x15\xD1\x52\x56\x85\x04"
22964 "\xA8\x5C\x5D\x6D\x7E\x6E\xF5\xFA"
22965 "\xEA\x16\x37\x50\xF3\xDF\x84\x3B"
22966 "\x2F\x32\x18\x57\x34\x2A\x8C\x23"
22967 "\x67\xDF\x6D\x35\x7B\x54\x0D\xFB"
22968 "\x34\xA5\x9F\x6C\x48\x30\x1E\x22"
22969 "\xFE\xB1\x22\x17\x17\x8A\xB9\x5B",
22970 .rlen = 56,
22971 }, {
22972 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22973 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22974 "\xDE\xCA\xF8",
22975 .klen = 19,
22976 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
22977 .input = "\x45\x00\x00\x49\x33\xBA\x00\x00"
22978 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
22979 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
22980 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
22981 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
22982 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
22983 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
22984 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
22985 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
22986 "\x23\x01\x01\x01",
22987 .ilen = 76,
22988 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
22989 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
22990 "\xCE\xFA\xCE\x74",
22991 .alen = 20,
22992 .result = "\x92\xD0\x53\x79\x33\x38\xD5\xF3"
22993 "\x7D\xE4\x7A\x8E\x86\x03\xC9\x90"
22994 "\x96\x35\xAB\x9C\xFB\xE8\xA3\x76"
22995 "\xE9\xE9\xE2\xD1\x2E\x11\x0E\x00"
22996 "\xFA\xCE\xB5\x9E\x02\xA7\x7B\xEA"
22997 "\x71\x9A\x58\xFB\xA5\x8A\xE1\xB7"
22998 "\x9C\x39\x9D\xE3\xB5\x6E\x69\xE6"
22999 "\x63\xC9\xDB\x05\x69\x51\x12\xAD"
23000 "\x3E\x00\x32\x73\x86\xF2\xEE\xF5"
23001 "\x0F\xE8\x81\x7E\x84\xD3\xC0\x0D"
23002 "\x76\xD6\x55\xC6\xB4\xC2\x34\xC7"
23003 "\x12\x25\x0B\xF9",
23004 .rlen = 92,
23005 }, {
23006 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23007 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23008 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23009 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23010 "\x73\x61\x6C",
23011 .klen = 35,
23012 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
23013 .input = "\x45\x08\x00\x28\x73\x2C\x00\x00"
23014 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
23015 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
23016 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
23017 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
23018 .ilen = 40,
23019 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
23020 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
23021 "\x69\x76\x65\x63",
23022 .alen = 20,
23023 .result = "\xCC\x74\xB7\xD3\xB0\x38\x50\x42"
23024 "\x2C\x64\x87\x46\x1E\x34\x10\x05"
23025 "\x29\x6B\xBB\x36\xE9\x69\xAD\x92"
23026 "\x82\xA1\x10\x6A\xEB\x0F\xDC\x7D"
23027 "\x08\xBA\xF3\x91\xCA\xAA\x61\xDA"
23028 "\x62\xF4\x14\x61\x5C\x9D\xB5\xA7"
23029 "\xEE\xD7\xB9\x7E\x87\x99\x9B\x7D",
23030 .rlen = 56,
23031 }, {
23032 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23033 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23034 "\x57\x69\x0E",
23035 .klen = 19,
23036 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23037 .input = "\x45\x00\x00\x49\x33\x3E\x00\x00"
23038 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
23039 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
23040 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
23041 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
23042 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
23043 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
23044 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
23045 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
23046 "\x15\x01\x01\x01",
23047 .ilen = 76,
23048 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23049 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23050 "\xA2\xFC\xA1\xA3",
23051 .alen = 20,
23052 .result = "\x6A\x6B\x45\x5E\xD6\x9A\x52\xF6"
23053 "\xEF\x70\x1A\x9C\xE8\xD3\x19\x86"
23054 "\xC8\x02\xF0\xB0\x03\x09\xD9\x02"
23055 "\xA0\xD2\x59\x04\xD1\x85\x2A\x24"
23056 "\x1C\x67\x3E\xD8\x68\x72\x06\x94"
23057 "\x97\xBA\x4F\x76\x8D\xB0\x44\x5B"
23058 "\x69\xBF\xD5\xE2\x3D\xF1\x0B\x0C"
23059 "\xC0\xBF\xB1\x8F\x70\x09\x9E\xCE"
23060 "\xA5\xF2\x55\x58\x84\xFA\xF9\xB5"
23061 "\x23\xF4\x84\x40\x74\x14\x8A\x6B"
23062 "\xDB\xD7\x67\xED\xA4\x93\xF3\x47"
23063 "\xCC\xF7\x46\x6F",
23064 .rlen = 92,
23065 }, {
23066 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23067 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23068 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23069 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23070 "\x73\x61\x6C",
23071 .klen = 35,
23072 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
23073 .input = "\x63\x69\x73\x63\x6F\x01\x72\x75"
23074 "\x6C\x65\x73\x01\x74\x68\x65\x01"
23075 "\x6E\x65\x74\x77\x65\x01\x64\x65"
23076 "\x66\x69\x6E\x65\x01\x74\x68\x65"
23077 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
23078 "\x67\x69\x65\x73\x01\x74\x68\x61"
23079 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
23080 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
23081 "\x72\x72\x6F\x77\x01\x02\x02\x01",
23082 .ilen = 72,
23083 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
23084 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
23085 "\x69\x76\x65\x63",
23086 .alen = 20,
23087 .result = "\xEA\x15\xC4\x98\xAC\x15\x22\x37"
23088 "\x00\x07\x1D\xBE\x60\x5D\x73\x16"
23089 "\x4D\x0F\xCC\xCE\x8A\xD0\x49\xD4"
23090 "\x39\xA3\xD1\xB1\x21\x0A\x92\x1A"
23091 "\x2C\xCF\x8F\x9D\xC9\x91\x0D\xB4"
23092 "\x15\xFC\xBC\xA5\xC5\xBF\x54\xE5"
23093 "\x1C\xC7\x32\x41\x07\x7B\x2C\xB6"
23094 "\x5C\x23\x7C\x93\xEA\xEF\x23\x1C"
23095 "\x73\xF4\xE7\x12\x84\x4C\x37\x0A"
23096 "\x4A\x8F\x06\x37\x48\xF9\xF9\x05"
23097 "\x55\x13\x40\xC3\xD5\x55\x3A\x3D",
23098 .rlen = 88,
23099 }, {
23100 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
23101 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
23102 "\xD9\x66\x42",
23103 .klen = 19,
23104 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
23105 .input = "\x01\x02\x02\x01",
23106 .ilen = 4,
23107 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
23108 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
23109 .alen = 16,
23110 .result = "\x4C\x72\x63\x30\x2F\xE6\x56\xDD"
23111 "\xD0\xD8\x60\x9D\x8B\xEF\x85\x90"
23112 "\xF7\x61\x24\x62",
23113 .rlen = 20,
23114 }, {
23115 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23116 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23117 "\xDE\xCA\xF8",
23118 .klen = 19,
23119 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
23120 .input = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
23121 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
23122 "\x62\x65\x00\x01",
23123 .ilen = 20,
23124 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
23125 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
23126 "\xCE\xFA\xCE\x74",
23127 .alen = 20,
23128 .result = "\xA3\xBF\x52\x52\x65\x83\xBA\x81"
23129 "\x03\x9B\x84\xFC\x44\x8C\xBB\x81"
23130 "\x36\xE1\x78\xBB\xA5\x49\x3A\xD0"
23131 "\xF0\x6B\x21\xAF\x98\xC0\x34\xDC"
23132 "\x17\x17\x65\xAD",
23133 .rlen = 36,
23134 }, {
23135 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
23136 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
23137 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
23138 "\x62\x65\x66\x6F\x72\x65\x69\x61"
23139 "\x74\x75\x72",
23140 .klen = 35,
23141 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
23142 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
23143 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
23144 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
23145 "\x02\x00\x07\x00\x61\x62\x63\x64"
23146 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23147 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23148 "\x01\x02\x02\x01",
23149 .ilen = 52,
23150 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
23151 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
23152 "\x67\x65\x74\x6D",
23153 .alen = 20,
23154 .result = "\x96\xFD\x86\xF8\xD1\x98\xFF\x10"
23155 "\xAB\x8C\xDA\x8A\x5A\x08\x38\x1A"
23156 "\x48\x59\x80\x18\x1A\x18\x1A\x04"
23157 "\xC9\x0D\xE3\xE7\x0E\xA4\x0B\x75"
23158 "\x92\x9C\x52\x5C\x0B\xFB\xF8\xAF"
23159 "\x16\xC3\x35\xA8\xE7\xCE\x84\x04"
23160 "\xEB\x40\x6B\x7A\x8E\x75\xBB\x42"
23161 "\xE0\x63\x4B\x21\x44\xA2\x2B\x2B"
23162 "\x39\xDB\xC8\xDC",
23163 .rlen = 68,
23164 }, {
23165 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23166 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23167 "\x57\x69\x0E",
23168 .klen = 19,
23169 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23170 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
23171 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
23172 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
23173 "\x02\x00\x07\x00\x61\x62\x63\x64"
23174 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23175 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23176 "\x01\x02\x02\x01",
23177 .ilen = 52,
23178 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
23179 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23180 "\xA2\xFC\xA1\xA3",
23181 .alen = 20,
23182 .result = "\x6A\x6B\x45\x27\x3F\x9E\x52\xF6"
23183 "\x10\x60\x54\x25\xEB\x80\x04\x93"
23184 "\xCA\x1B\x23\x97\xCB\x21\x2E\x01"
23185 "\xA2\xE7\x95\x41\x30\xE4\x4B\x1B"
23186 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
23187 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
23188 "\x44\xCC\x90\xBF\x00\x94\x94\x92"
23189 "\x20\x17\x0C\x1B\x55\xDE\x7E\x68"
23190 "\xF4\x95\x5D\x4F",
23191 .rlen = 68,
23192 }, {
23193 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
23194 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
23195 "\x22\x43\x3C",
23196 .klen = 19,
23197 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
23198 .input = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
23199 "\x61\x62\x63\x64\x65\x66\x67\x68"
23200 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
23201 "\x71\x72\x73\x74\x01\x02\x02\x01",
23202 .ilen = 32,
23203 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
23204 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
23205 "\x3A\x23\x4B\xFD",
23206 .alen = 20,
23207 .result = "\x67\xE9\x28\xB3\x1C\xA4\x6D\x02"
23208 "\xF0\xB5\x37\xB6\x6B\x2F\xF5\x4F"
23209 "\xF8\xA3\x4C\x53\xB8\x12\x09\xBF"
23210 "\x58\x7D\xCF\x29\xA3\x41\x68\x6B"
23211 "\xCE\xE8\x79\x85\x3C\xB0\x3A\x8F"
23212 "\x16\xB0\xA1\x26\xC9\xBC\xBC\xA6",
23213 .rlen = 48,
23214 }
23215};
23216
23217static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
23218 { /* Generated using Crypto++ */
23219 .key = zeroed_string,
23220 .klen = 19,
23221 .iv = zeroed_string,
23222 .result = zeroed_string,
23223 .rlen = 16,
23224 .assoc = zeroed_string,
23225 .alen = 16,
23226 .input = "\x2E\x9A\xCA\x6B\xDA\x54\xFC\x6F"
23227 "\x12\x50\xE8\xDE\x81\x3C\x63\x08"
23228 "\x1A\x22\xBA\x75\xEE\xD4\xD5\xB5"
23229 "\x27\x50\x01\xAC\x03\x33\x39\xFB",
23230 .ilen = 32,
23231 },{
23232 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
23233 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
23234 "\x00\x00\x00",
23235 .klen = 19,
23236 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
23237 .result = zeroed_string,
23238 .rlen = 16,
23239 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
23240 "\x00\x00\x00\x00\x00\x00\x00\x01",
23241 .alen = 16,
23242 .input = "\xCF\xB9\x99\x17\xC8\x86\x0E\x7F"
23243 "\x7E\x76\xF8\xE6\xF8\xCC\x1F\x17"
23244 "\x6A\xE0\x53\x9F\x4B\x73\x7E\xDA"
23245 "\x08\x09\x4E\xC4\x1E\xAD\xC6\xB0",
23246 .ilen = 32,
23247
23248 }, {
23249 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
23250 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
23251 "\x00\x00\x00",
23252 .klen = 19,
23253 .iv = zeroed_string,
23254 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
23255 "\x01\x01\x01\x01\x01\x01\x01\x01",
23256 .rlen = 16,
23257 .assoc = zeroed_string,
23258 .alen = 16,
23259 .input = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
23260 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
23261 "\xA1\xE2\xC2\x42\x2B\x81\x70\x40"
23262 "\xFD\x7F\x76\xD1\x03\x07\xBB\x0C",
23263 .ilen = 32,
23264 }, {
23265 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
23266 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
23267 "\x00\x00\x00",
23268 .klen = 19,
23269 .iv = zeroed_string,
23270 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
23271 "\x01\x01\x01\x01\x01\x01\x01\x01",
23272 .rlen = 16,
23273 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
23274 "\x00\x00\x00\x00\x00\x00\x00\x00",
23275 .alen = 16,
23276 .input = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
23277 "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
23278 "\x5B\xC0\x73\xE0\x2B\x73\x68\xC9"
23279 "\x2D\x8C\x58\xC2\x90\x3D\xB0\x3E",
23280 .ilen = 32,
23281 }, {
23282 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
23283 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
23284 "\x00\x00\x00",
23285 .klen = 19,
23286 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
23287 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
23288 "\x01\x01\x01\x01\x01\x01\x01\x01",
23289 .rlen = 16,
23290 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
23291 "\x00\x00\x00\x00\x00\x00\x00\x01",
23292 .alen = 16,
23293 .input = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
23294 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
23295 "\x43\x8E\x76\x57\x3B\xB4\x05\xE8"
23296 "\xA9\x9B\xBF\x25\xE0\x4F\xC0\xED",
23297 .ilen = 32,
23298 }, {
23299 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
23300 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
23301 "\x00\x00\x00",
23302 .klen = 19,
23303 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
23304 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
23305 "\x01\x01\x01\x01\x01\x01\x01\x01"
23306 "\x01\x01\x01\x01\x01\x01\x01\x01"
23307 "\x01\x01\x01\x01\x01\x01\x01\x01"
23308 "\x01\x01\x01\x01\x01\x01\x01\x01"
23309 "\x01\x01\x01\x01\x01\x01\x01\x01"
23310 "\x01\x01\x01\x01\x01\x01\x01\x01"
23311 "\x01\x01\x01\x01\x01\x01\x01\x01",
23312 .rlen = 64,
23313 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
23314 "\x00\x00\x00\x00\x00\x00\x00\x01",
23315 .alen = 16,
23316 .input = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
23317 "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
23318 "\x9C\xA4\x97\x83\x3F\x01\xA5\xF4"
23319 "\x43\x09\xE7\xB8\xE9\xD1\xD7\x02"
23320 "\x9B\xAB\x39\x18\xEB\x94\x34\x36"
23321 "\xE6\xC5\xC8\x9B\x00\x81\x9E\x49"
23322 "\x1D\x78\xE1\x48\xE3\xE9\xEA\x8E"
23323 "\x3A\x2B\x67\x5D\x35\x6A\x0F\xDB"
23324 "\x02\x73\xDD\xE7\x30\x4A\x30\x54"
23325 "\x1A\x9D\x09\xCA\xC8\x1C\x32\x5F",
23326 .ilen = 80,
23327 }, {
23328 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
23329 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
23330 "\x00\x00\x00",
23331 .klen = 19,
23332 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
23333 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
23334 "\xff\xff\xff\xff\xff\xff\xff\xff"
23335 "\xff\xff\xff\xff\xff\xff\xff\xff"
23336 "\xff\xff\xff\xff\xff\xff\xff\xff"
23337 "\xff\xff\xff\xff\xff\xff\xff\xff"
23338 "\xff\xff\xff\xff\xff\xff\xff\xff"
23339 "\xff\xff\xff\xff\xff\xff\xff\xff"
23340 "\xff\xff\xff\xff\xff\xff\xff\xff"
23341 "\xff\xff\xff\xff\xff\xff\xff\xff"
23342 "\xff\xff\xff\xff\xff\xff\xff\xff"
23343 "\xff\xff\xff\xff\xff\xff\xff\xff"
23344 "\xff\xff\xff\xff\xff\xff\xff\xff"
23345 "\xff\xff\xff\xff\xff\xff\xff\xff"
23346 "\xff\xff\xff\xff\xff\xff\xff\xff"
23347 "\xff\xff\xff\xff\xff\xff\xff\xff"
23348 "\xff\xff\xff\xff\xff\xff\xff\xff"
23349 "\xff\xff\xff\xff\xff\xff\xff\xff"
23350 "\xff\xff\xff\xff\xff\xff\xff\xff"
23351 "\xff\xff\xff\xff\xff\xff\xff\xff"
23352 "\xff\xff\xff\xff\xff\xff\xff\xff"
23353 "\xff\xff\xff\xff\xff\xff\xff\xff"
23354 "\xff\xff\xff\xff\xff\xff\xff\xff"
23355 "\xff\xff\xff\xff\xff\xff\xff\xff"
23356 "\xff\xff\xff\xff\xff\xff\xff\xff",
23357 .rlen = 192,
23358 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
23359 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
23360 "\x89\xab\xcd\xef",
23361 .alen = 20,
23362 .input = "\x64\x17\xDC\x24\x9D\x92\xBA\x5E"
23363 "\x7C\x64\x6D\x33\x46\x77\xAC\xB1"
23364 "\x5C\x9E\xE2\xC7\x27\x11\x3E\x95"
23365 "\x7D\xBE\x28\xC8\xC1\xCA\x5E\x8C"
23366 "\xB4\xE2\xDE\x9F\x53\x59\x26\xDB"
23367 "\x0C\xD4\xE4\x07\x9A\xE6\x3E\x01"
23368 "\x58\x0D\x3E\x3D\xD5\x21\xEB\x04"
23369 "\x06\x9D\x5F\xB9\x02\x49\x1A\x2B"
23370 "\xBA\xF0\x4E\x3B\x85\x50\x5B\x09"
23371 "\xFE\xEC\xFC\x54\xEC\x0C\xE2\x79"
23372 "\x8A\x2F\x5F\xD7\x05\x5D\xF1\x6D"
23373 "\x22\xEB\xD1\x09\x80\x3F\x5A\x70"
23374 "\xB2\xB9\xD3\x63\x99\xC2\x4D\x1B"
23375 "\x36\x12\x00\x89\xAA\x5D\x55\xDA"
23376 "\x1D\x5B\xD8\x3C\x5F\x09\xD2\xE6"
23377 "\x39\x41\x5C\xF0\xBE\x26\x4E\x5F"
23378 "\x2B\x50\x44\x52\xC2\x10\x7D\x38"
23379 "\x82\x64\x83\x0C\xAE\x49\xD0\xE5"
23380 "\x4F\xE5\x66\x4C\x58\x7A\xEE\x43"
23381 "\x3B\x51\xFE\xBA\x24\x8A\xFE\xDC"
23382 "\x19\x6D\x60\x66\x61\xF9\x9A\x3F"
23383 "\x75\xFC\x38\x53\x5B\xB5\xCD\x52"
23384 "\x4F\xE5\xE4\xC9\xFE\x10\xCB\x98"
23385 "\xF0\x06\x5B\x07\xAB\xBB\xF4\x0E"
23386 "\x2D\xC2\xDD\x5D\xDD\x22\x9A\xCC"
23387 "\x39\xAB\x63\xA5\x3D\x9C\x51\x8A",
23388 .ilen = 208,
23389 }, { /* From draft-mcgrew-gcm-test-01 */
23390 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
23391 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
23392 "\x2E\x44\x3B",
23393 .klen = 19,
23394 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
23395 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
23396 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
23397 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
23398 "\x38\xD3\x01\x00\x00\x01\x00\x00"
23399 "\x00\x00\x00\x00\x04\x5F\x73\x69"
23400 "\x70\x04\x5F\x75\x64\x70\x03\x73"
23401 "\x69\x70\x09\x63\x79\x62\x65\x72"
23402 "\x63\x69\x74\x79\x02\x64\x6B\x00"
23403 "\x00\x21\x00\x01\x01\x02\x02\x01",
23404 .rlen = 72,
23405 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
23406 "\x00\x00\x00\x00\x49\x56\xED\x7E"
23407 "\x3B\x24\x4C\xFE",
23408 .alen = 20,
23409 .input = "\x89\xBA\x3E\xEF\xE6\xD6\xCF\xDB"
23410 "\x83\x60\xF5\xBA\x3A\x56\x79\xE6"
23411 "\x7E\x0C\x53\xCF\x9E\x87\xE0\x4E"
23412 "\x1A\x26\x01\x24\xC7\x2E\x3D\xBF"
23413 "\x29\x2C\x91\xC1\xB8\xA8\xCF\xE0"
23414 "\x39\xF8\x53\x6D\x31\x22\x2B\xBF"
23415 "\x98\x81\xFC\x34\xEE\x85\x36\xCD"
23416 "\x26\xDB\x6C\x7A\x0C\x77\x8A\x35"
23417 "\x18\x85\x54\xB2\xBC\xDD\x3F\x43"
23418 "\x61\x06\x8A\xDF\x86\x3F\xB4\xAC"
23419 "\x97\xDC\xBD\xFD\x92\x10\xC5\xFF",
23420 .ilen = 88,
23421 }, {
23422 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
23423 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
23424 "\xCA\xFE\xBA",
23425 .klen = 19,
23426 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23427 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
23428 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
23429 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
23430 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
23431 "\x00\x01\x00\x00\x00\x00\x00\x00"
23432 "\x03\x73\x69\x70\x09\x63\x79\x62"
23433 "\x65\x72\x63\x69\x74\x79\x02\x64"
23434 "\x6B\x00\x00\x01\x00\x01\x00\x01",
23435 .rlen = 64,
23436 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
23437 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23438 .alen = 16,
23439 .input = "\x4B\xC2\x70\x60\x64\xD2\xF3\xC8"
23440 "\xE5\x26\x8A\xDE\xB8\x7E\x7D\x16"
23441 "\x56\xC7\xD2\x88\xBA\x8D\x58\xAF"
23442 "\xF5\x71\xB6\x37\x84\xA7\xB1\x99"
23443 "\x51\x5C\x0D\xA0\x27\xDE\xE7\x2D"
23444 "\xEF\x25\x88\x1F\x1D\x77\x11\xFF"
23445 "\xDB\xED\xEE\x56\x16\xC5\x5C\x9B"
23446 "\x00\x62\x1F\x68\x4E\x7C\xA0\x97"
23447 "\x10\x72\x7E\x53\x13\x3B\x68\xE4"
23448 "\x30\x99\x91\x79\x09\xEA\xFF\x6A",
23449 .ilen = 80,
23450 }, {
23451 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23452 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23453 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23454 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23455 "\x11\x22\x33",
23456 .klen = 35,
23457 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
23458 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
23459 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
23460 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
23461 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
23462 "\x70\x02\x40\x00\x20\xBF\x00\x00"
23463 "\x02\x04\x05\xB4\x01\x01\x04\x02"
23464 "\x01\x02\x02\x01",
23465 .rlen = 52,
23466 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
23467 "\x01\x02\x03\x04\x05\x06\x07\x08",
23468 .alen = 16,
23469 .input = "\xD6\x31\x0D\x2B\x3D\x6F\xBD\x2F"
23470 "\x58\x41\x7E\xFF\x9A\x9E\x09\xB4"
23471 "\x1A\xF7\xF6\x42\x31\xCD\xBF\xAD"
23472 "\x27\x0E\x2C\xF2\xDB\x10\xDF\x55"
23473 "\x8F\x0D\xD7\xAC\x23\xBD\x42\x10"
23474 "\xD0\xB2\xAF\xD8\x37\xAC\x6B\x0B"
23475 "\x11\xD4\x0B\x12\xEC\xB4\xB1\x92"
23476 "\x23\xA6\x10\xB0\x26\xD6\xD9\x26"
23477 "\x5A\x48\x6A\x3E",
23478 .ilen = 68,
23479 }, {
23480 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
23481 "\x00\x00\x00\x00\x00\x00\x00\x00"
23482 "\x00\x00\x00",
23483 .klen = 19,
23484 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
23485 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
23486 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
23487 "\x01\x01\x01\x01\x08\x00\x07\x5C"
23488 "\x02\x00\x44\x00\x61\x62\x63\x64"
23489 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23490 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23491 "\x75\x76\x77\x61\x62\x63\x64\x65"
23492 "\x66\x67\x68\x69\x01\x02\x02\x01",
23493 .rlen = 64,
23494 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
23495 "\x00\x00\x00\x00\x00\x00\x00\x00",
23496 .alen = 16,
23497 .input = "\x6B\x9A\xCA\x57\x43\x91\xFC\x6F"
23498 "\x92\x51\x23\xA4\xC1\x5B\xF0\x10"
23499 "\xF3\x13\xF4\xF8\xA1\x9A\xB4\xDC"
23500 "\x89\xC8\xF8\x42\x62\x95\xB7\xCB"
23501 "\xB8\xF5\x0F\x1B\x2E\x94\xA2\xA7"
23502 "\xBF\xFB\x8A\x92\x13\x63\xD1\x3C"
23503 "\x08\xF5\xE8\xA6\xAA\xF6\x34\xF9"
23504 "\x42\x05\xAF\xB3\xE7\x9A\xFC\xEE"
23505 "\x36\x25\xC1\x10\x12\x1C\xCA\x82"
23506 "\xEA\xE6\x63\x5A\x57\x28\xA9\x9A",
23507 .ilen = 80,
23508 }, {
23509 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23510 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23511 "\x57\x69\x0E",
23512 .klen = 19,
23513 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23514 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
23515 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
23516 "\x01\x01\x01\x01\x08\x00\x08\x5C"
23517 "\x02\x00\x43\x00\x61\x62\x63\x64"
23518 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23519 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23520 "\x75\x76\x77\x61\x62\x63\x64\x65"
23521 "\x66\x67\x68\x69\x01\x02\x02\x01",
23522 .rlen = 64,
23523 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23524 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23525 "\xA2\xFC\xA1\xA3",
23526 .alen = 20,
23527 .input = "\x6A\x6B\x45\x2B\x7C\x67\x52\xF6"
23528 "\x10\x60\x40\x62\x6B\x4F\x97\x8E"
23529 "\x0B\xB2\x22\x97\xCB\x21\xE0\x90"
23530 "\xA2\xE7\xD1\x41\x30\xE4\x4B\x1B"
23531 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
23532 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
23533 "\x30\xB8\xE5\xDF\xD7\x12\x56\x75"
23534 "\xD0\x95\xB7\xB8\x91\x42\xF7\xFD"
23535 "\x97\x57\xCA\xC1\x20\xD0\x86\xB9"
23536 "\x66\x9D\xB4\x2B\x96\x22\xAC\x67",
23537 .ilen = 80,
23538 }, {
23539 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23540 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23541 "\x57\x69\x0E",
23542 .klen = 19,
23543 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23544 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
23545 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
23546 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
23547 "\x01\x02\x02\x01",
23548 .rlen = 28,
23549 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23550 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23551 "\xA2\xFC\xA1\xA3",
23552 .alen = 20,
23553 .input = "\x6A\x6B\x45\x0B\xA7\x06\x52\xF6"
23554 "\x10\x60\xCF\x01\x6B\x4F\x97\x20"
23555 "\xEA\xB3\x23\x94\xC9\x21\x1D\x33"
23556 "\xA1\xE5\x90\x40\x05\x37\x45\x70"
23557 "\xB5\xD6\x09\x0A\x23\x73\x33\xF9"
23558 "\x08\xB4\x22\xE4",
23559 .ilen = 44,
23560 }, {
23561 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
23562 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
23563 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
23564 "\xCA\xFE\xBA",
23565 .klen = 27,
23566 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23567 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
23568 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
23569 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
23570 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
23571 "\x50\x10\x16\xD0\x75\x68\x00\x01",
23572 .rlen = 40,
23573 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
23574 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23575 .alen = 16,
23576 .input = "\x05\x22\x15\xD1\x52\x56\x85\x04"
23577 "\xA8\x5C\x5D\x6D\x7E\x6E\xF5\xFA"
23578 "\xEA\x16\x37\x50\xF3\xDF\x84\x3B"
23579 "\x2F\x32\x18\x57\x34\x2A\x8C\x23"
23580 "\x67\xDF\x6D\x35\x7B\x54\x0D\xFB"
23581 "\x34\xA5\x9F\x6C\x48\x30\x1E\x22"
23582 "\xFE\xB1\x22\x17\x17\x8A\xB9\x5B",
23583 .ilen = 56,
23584 }, {
23585 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23586 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23587 "\xDE\xCA\xF8",
23588 .klen = 19,
23589 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
23590 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
23591 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
23592 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
23593 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
23594 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
23595 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
23596 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
23597 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
23598 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
23599 "\x23\x01\x01\x01",
23600 .rlen = 76,
23601 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
23602 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
23603 "\xCE\xFA\xCE\x74",
23604 .alen = 20,
23605 .input = "\x92\xD0\x53\x79\x33\x38\xD5\xF3"
23606 "\x7D\xE4\x7A\x8E\x86\x03\xC9\x90"
23607 "\x96\x35\xAB\x9C\xFB\xE8\xA3\x76"
23608 "\xE9\xE9\xE2\xD1\x2E\x11\x0E\x00"
23609 "\xFA\xCE\xB5\x9E\x02\xA7\x7B\xEA"
23610 "\x71\x9A\x58\xFB\xA5\x8A\xE1\xB7"
23611 "\x9C\x39\x9D\xE3\xB5\x6E\x69\xE6"
23612 "\x63\xC9\xDB\x05\x69\x51\x12\xAD"
23613 "\x3E\x00\x32\x73\x86\xF2\xEE\xF5"
23614 "\x0F\xE8\x81\x7E\x84\xD3\xC0\x0D"
23615 "\x76\xD6\x55\xC6\xB4\xC2\x34\xC7"
23616 "\x12\x25\x0B\xF9",
23617 .ilen = 92,
23618 }, {
23619 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23620 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23621 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23622 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23623 "\x73\x61\x6C",
23624 .klen = 35,
23625 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
23626 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
23627 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
23628 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
23629 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
23630 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
23631 .rlen = 40,
23632 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
23633 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
23634 "\x69\x76\x65\x63",
23635 .alen = 20,
23636 .input = "\xCC\x74\xB7\xD3\xB0\x38\x50\x42"
23637 "\x2C\x64\x87\x46\x1E\x34\x10\x05"
23638 "\x29\x6B\xBB\x36\xE9\x69\xAD\x92"
23639 "\x82\xA1\x10\x6A\xEB\x0F\xDC\x7D"
23640 "\x08\xBA\xF3\x91\xCA\xAA\x61\xDA"
23641 "\x62\xF4\x14\x61\x5C\x9D\xB5\xA7"
23642 "\xEE\xD7\xB9\x7E\x87\x99\x9B\x7D",
23643 .ilen = 56,
23644 }, {
23645 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23646 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23647 "\x57\x69\x0E",
23648 .klen = 19,
23649 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23650 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
23651 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
23652 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
23653 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
23654 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
23655 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
23656 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
23657 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
23658 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
23659 "\x15\x01\x01\x01",
23660 .rlen = 76,
23661 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23662 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23663 "\xA2\xFC\xA1\xA3",
23664 .alen = 20,
23665 .input = "\x6A\x6B\x45\x5E\xD6\x9A\x52\xF6"
23666 "\xEF\x70\x1A\x9C\xE8\xD3\x19\x86"
23667 "\xC8\x02\xF0\xB0\x03\x09\xD9\x02"
23668 "\xA0\xD2\x59\x04\xD1\x85\x2A\x24"
23669 "\x1C\x67\x3E\xD8\x68\x72\x06\x94"
23670 "\x97\xBA\x4F\x76\x8D\xB0\x44\x5B"
23671 "\x69\xBF\xD5\xE2\x3D\xF1\x0B\x0C"
23672 "\xC0\xBF\xB1\x8F\x70\x09\x9E\xCE"
23673 "\xA5\xF2\x55\x58\x84\xFA\xF9\xB5"
23674 "\x23\xF4\x84\x40\x74\x14\x8A\x6B"
23675 "\xDB\xD7\x67\xED\xA4\x93\xF3\x47"
23676 "\xCC\xF7\x46\x6F",
23677 .ilen = 92,
23678 }, {
23679 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23680 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23681 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23682 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23683 "\x73\x61\x6C",
23684 .klen = 35,
23685 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
23686 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
23687 "\x6C\x65\x73\x01\x74\x68\x65\x01"
23688 "\x6E\x65\x74\x77\x65\x01\x64\x65"
23689 "\x66\x69\x6E\x65\x01\x74\x68\x65"
23690 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
23691 "\x67\x69\x65\x73\x01\x74\x68\x61"
23692 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
23693 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
23694 "\x72\x72\x6F\x77\x01\x02\x02\x01",
23695 .rlen = 72,
23696 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
23697 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
23698 "\x69\x76\x65\x63",
23699 .alen = 20,
23700 .input = "\xEA\x15\xC4\x98\xAC\x15\x22\x37"
23701 "\x00\x07\x1D\xBE\x60\x5D\x73\x16"
23702 "\x4D\x0F\xCC\xCE\x8A\xD0\x49\xD4"
23703 "\x39\xA3\xD1\xB1\x21\x0A\x92\x1A"
23704 "\x2C\xCF\x8F\x9D\xC9\x91\x0D\xB4"
23705 "\x15\xFC\xBC\xA5\xC5\xBF\x54\xE5"
23706 "\x1C\xC7\x32\x41\x07\x7B\x2C\xB6"
23707 "\x5C\x23\x7C\x93\xEA\xEF\x23\x1C"
23708 "\x73\xF4\xE7\x12\x84\x4C\x37\x0A"
23709 "\x4A\x8F\x06\x37\x48\xF9\xF9\x05"
23710 "\x55\x13\x40\xC3\xD5\x55\x3A\x3D",
23711 .ilen = 88,
23712 }, {
23713 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
23714 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
23715 "\xD9\x66\x42",
23716 .klen = 19,
23717 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
23718 .result = "\x01\x02\x02\x01",
23719 .rlen = 4,
23720 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
23721 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
23722 .alen = 16,
23723 .input = "\x4C\x72\x63\x30\x2F\xE6\x56\xDD"
23724 "\xD0\xD8\x60\x9D\x8B\xEF\x85\x90"
23725 "\xF7\x61\x24\x62",
23726 .ilen = 20,
23727 }, {
23728 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23729 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23730 "\xDE\xCA\xF8",
23731 .klen = 19,
23732 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
23733 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
23734 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
23735 "\x62\x65\x00\x01",
23736 .rlen = 20,
23737 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
23738 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
23739 "\xCE\xFA\xCE\x74",
23740 .alen = 20,
23741 .input = "\xA3\xBF\x52\x52\x65\x83\xBA\x81"
23742 "\x03\x9B\x84\xFC\x44\x8C\xBB\x81"
23743 "\x36\xE1\x78\xBB\xA5\x49\x3A\xD0"
23744 "\xF0\x6B\x21\xAF\x98\xC0\x34\xDC"
23745 "\x17\x17\x65\xAD",
23746 .ilen = 36,
23747 }, {
23748 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
23749 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
23750 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
23751 "\x62\x65\x66\x6F\x72\x65\x69\x61"
23752 "\x74\x75\x72",
23753 .klen = 35,
23754 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
23755 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
23756 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
23757 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
23758 "\x02\x00\x07\x00\x61\x62\x63\x64"
23759 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23760 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23761 "\x01\x02\x02\x01",
23762 .rlen = 52,
23763 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
23764 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
23765 "\x67\x65\x74\x6D",
23766 .alen = 20,
23767 .input = "\x96\xFD\x86\xF8\xD1\x98\xFF\x10"
23768 "\xAB\x8C\xDA\x8A\x5A\x08\x38\x1A"
23769 "\x48\x59\x80\x18\x1A\x18\x1A\x04"
23770 "\xC9\x0D\xE3\xE7\x0E\xA4\x0B\x75"
23771 "\x92\x9C\x52\x5C\x0B\xFB\xF8\xAF"
23772 "\x16\xC3\x35\xA8\xE7\xCE\x84\x04"
23773 "\xEB\x40\x6B\x7A\x8E\x75\xBB\x42"
23774 "\xE0\x63\x4B\x21\x44\xA2\x2B\x2B"
23775 "\x39\xDB\xC8\xDC",
23776 .ilen = 68,
23777 }, {
23778 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23779 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23780 "\x57\x69\x0E",
23781 .klen = 19,
23782 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23783 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
23784 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
23785 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
23786 "\x02\x00\x07\x00\x61\x62\x63\x64"
23787 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23788 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23789 "\x01\x02\x02\x01",
23790 .rlen = 52,
23791 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
23792 "\x10\x10\x10\x10\x4E\x28\x00\x00"
23793 "\xA2\xFC\xA1\xA3",
23794 .alen = 20,
23795 .input = "\x6A\x6B\x45\x27\x3F\x9E\x52\xF6"
23796 "\x10\x60\x54\x25\xEB\x80\x04\x93"
23797 "\xCA\x1B\x23\x97\xCB\x21\x2E\x01"
23798 "\xA2\xE7\x95\x41\x30\xE4\x4B\x1B"
23799 "\x79\x01\x58\x50\x01\x06\xE1\xE0"
23800 "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
23801 "\x44\xCC\x90\xBF\x00\x94\x94\x92"
23802 "\x20\x17\x0C\x1B\x55\xDE\x7E\x68"
23803 "\xF4\x95\x5D\x4F",
23804 .ilen = 68,
23805 }, {
23806 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
23807 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
23808 "\x22\x43\x3C",
23809 .klen = 19,
23810 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
23811 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
23812 "\x61\x62\x63\x64\x65\x66\x67\x68"
23813 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
23814 "\x71\x72\x73\x74\x01\x02\x02\x01",
23815 .rlen = 32,
23816 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
23817 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
23818 "\x3A\x23\x4B\xFD",
23819 .alen = 20,
23820 .input = "\x67\xE9\x28\xB3\x1C\xA4\x6D\x02"
23821 "\xF0\xB5\x37\xB6\x6B\x2F\xF5\x4F"
23822 "\xF8\xA3\x4C\x53\xB8\x12\x09\xBF"
23823 "\x58\x7D\xCF\x29\xA3\x41\x68\x6B"
23824 "\xCE\xE8\x79\x85\x3C\xB0\x3A\x8F"
23825 "\x16\xB0\xA1\x26\xC9\xBC\xBC\xA6",
23826 .ilen = 48,
23827 }
23828};
23829
23830/*
Martin Williaf2b76b2015-06-01 13:44:01 +020023831 * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5.
23832 */
23833#define RFC7539_ENC_TEST_VECTORS 2
23834#define RFC7539_DEC_TEST_VECTORS 2
23835static struct aead_testvec rfc7539_enc_tv_template[] = {
23836 {
23837 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
23838 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23839 "\x90\x91\x92\x93\x94\x95\x96\x97"
23840 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
23841 .klen = 32,
23842 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
23843 "\x44\x45\x46\x47",
23844 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
23845 "\xc4\xc5\xc6\xc7",
23846 .alen = 12,
23847 .input = "\x4c\x61\x64\x69\x65\x73\x20\x61"
23848 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
23849 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
23850 "\x74\x68\x65\x20\x63\x6c\x61\x73"
23851 "\x73\x20\x6f\x66\x20\x27\x39\x39"
23852 "\x3a\x20\x49\x66\x20\x49\x20\x63"
23853 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
23854 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
23855 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
23856 "\x74\x69\x70\x20\x66\x6f\x72\x20"
23857 "\x74\x68\x65\x20\x66\x75\x74\x75"
23858 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
23859 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
23860 "\x75\x6c\x64\x20\x62\x65\x20\x69"
23861 "\x74\x2e",
23862 .ilen = 114,
23863 .result = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
23864 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
23865 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
23866 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
23867 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
23868 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
23869 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
23870 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
23871 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
23872 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
23873 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
23874 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
23875 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
23876 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
23877 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
23878 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
23879 "\x06\x91",
23880 .rlen = 130,
23881 }, {
23882 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23883 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23884 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23885 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
23886 .klen = 32,
23887 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
23888 "\x05\x06\x07\x08",
23889 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
23890 "\x00\x00\x4e\x91",
23891 .alen = 12,
23892 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23893 "\x2d\x44\x72\x61\x66\x74\x73\x20"
23894 "\x61\x72\x65\x20\x64\x72\x61\x66"
23895 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23896 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23897 "\x64\x20\x66\x6f\x72\x20\x61\x20"
23898 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23899 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23900 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23901 "\x64\x20\x6d\x61\x79\x20\x62\x65"
23902 "\x20\x75\x70\x64\x61\x74\x65\x64"
23903 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23904 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23905 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23906 "\x20\x62\x79\x20\x6f\x74\x68\x65"
23907 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23908 "\x6e\x74\x73\x20\x61\x74\x20\x61"
23909 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23910 "\x20\x49\x74\x20\x69\x73\x20\x69"
23911 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23912 "\x69\x61\x74\x65\x20\x74\x6f\x20"
23913 "\x75\x73\x65\x20\x49\x6e\x74\x65"
23914 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23915 "\x66\x74\x73\x20\x61\x73\x20\x72"
23916 "\x65\x66\x65\x72\x65\x6e\x63\x65"
23917 "\x20\x6d\x61\x74\x65\x72\x69\x61"
23918 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23919 "\x63\x69\x74\x65\x20\x74\x68\x65"
23920 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23921 "\x74\x68\x61\x6e\x20\x61\x73\x20"
23922 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23923 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23924 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23925 "\x9d",
23926 .ilen = 265,
23927 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23928 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23929 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23930 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23931 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23932 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23933 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23934 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23935 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23936 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23937 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23938 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23939 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23940 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23941 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23942 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23943 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23944 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23945 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23946 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23947 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23948 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23949 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23950 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23951 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23952 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23953 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23954 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23955 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23956 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23957 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23958 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23959 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23960 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23961 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23962 "\x38",
23963 .rlen = 281,
23964 },
23965};
23966
23967static struct aead_testvec rfc7539_dec_tv_template[] = {
23968 {
23969 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
23970 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23971 "\x90\x91\x92\x93\x94\x95\x96\x97"
23972 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
23973 .klen = 32,
23974 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
23975 "\x44\x45\x46\x47",
23976 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
23977 "\xc4\xc5\xc6\xc7",
23978 .alen = 12,
23979 .input = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
23980 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
23981 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
23982 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
23983 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
23984 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
23985 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
23986 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
23987 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
23988 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
23989 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
23990 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
23991 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
23992 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
23993 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
23994 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
23995 "\x06\x91",
23996 .ilen = 130,
23997 .result = "\x4c\x61\x64\x69\x65\x73\x20\x61"
23998 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
23999 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
24000 "\x74\x68\x65\x20\x63\x6c\x61\x73"
24001 "\x73\x20\x6f\x66\x20\x27\x39\x39"
24002 "\x3a\x20\x49\x66\x20\x49\x20\x63"
24003 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
24004 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
24005 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
24006 "\x74\x69\x70\x20\x66\x6f\x72\x20"
24007 "\x74\x68\x65\x20\x66\x75\x74\x75"
24008 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
24009 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
24010 "\x75\x6c\x64\x20\x62\x65\x20\x69"
24011 "\x74\x2e",
24012 .rlen = 114,
24013 }, {
24014 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
24015 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
24016 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
24017 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
24018 .klen = 32,
24019 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
24020 "\x05\x06\x07\x08",
24021 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
24022 "\x00\x00\x4e\x91",
24023 .alen = 12,
24024 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
24025 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
24026 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
24027 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
24028 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
24029 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
24030 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
24031 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
24032 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
24033 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
24034 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
24035 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
24036 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
24037 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
24038 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
24039 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
24040 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
24041 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
24042 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
24043 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
24044 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
24045 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
24046 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
24047 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
24048 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
24049 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
24050 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
24051 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
24052 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
24053 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
24054 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
24055 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
24056 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
24057 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
24058 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
24059 "\x38",
24060 .ilen = 281,
24061 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
24062 "\x2d\x44\x72\x61\x66\x74\x73\x20"
24063 "\x61\x72\x65\x20\x64\x72\x61\x66"
24064 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
24065 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
24066 "\x64\x20\x66\x6f\x72\x20\x61\x20"
24067 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
24068 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
24069 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
24070 "\x64\x20\x6d\x61\x79\x20\x62\x65"
24071 "\x20\x75\x70\x64\x61\x74\x65\x64"
24072 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
24073 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
24074 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
24075 "\x20\x62\x79\x20\x6f\x74\x68\x65"
24076 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
24077 "\x6e\x74\x73\x20\x61\x74\x20\x61"
24078 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
24079 "\x20\x49\x74\x20\x69\x73\x20\x69"
24080 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
24081 "\x69\x61\x74\x65\x20\x74\x6f\x20"
24082 "\x75\x73\x65\x20\x49\x6e\x74\x65"
24083 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
24084 "\x66\x74\x73\x20\x61\x73\x20\x72"
24085 "\x65\x66\x65\x72\x65\x6e\x63\x65"
24086 "\x20\x6d\x61\x74\x65\x72\x69\x61"
24087 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
24088 "\x63\x69\x74\x65\x20\x74\x68\x65"
24089 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
24090 "\x74\x68\x61\x6e\x20\x61\x73\x20"
24091 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
24092 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
24093 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
24094 "\x9d",
24095 .rlen = 265,
24096 },
24097};
24098
24099/*
Martin Willi59007582015-06-01 13:44:03 +020024100 * draft-irtf-cfrg-chacha20-poly1305
24101 */
24102#define RFC7539ESP_DEC_TEST_VECTORS 1
24103#define RFC7539ESP_ENC_TEST_VECTORS 1
24104static struct aead_testvec rfc7539esp_enc_tv_template[] = {
24105 {
24106 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
24107 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
24108 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
24109 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
24110 "\x00\x00\x00\x00",
24111 .klen = 36,
24112 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
24113 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
Herbert Xu74790922015-07-16 12:35:08 +080024114 "\x00\x00\x4e\x91\x01\x02\x03\x04"
24115 "\x05\x06\x07\x08",
24116 .alen = 20,
Martin Willi59007582015-06-01 13:44:03 +020024117 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
24118 "\x2d\x44\x72\x61\x66\x74\x73\x20"
24119 "\x61\x72\x65\x20\x64\x72\x61\x66"
24120 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
24121 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
24122 "\x64\x20\x66\x6f\x72\x20\x61\x20"
24123 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
24124 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
24125 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
24126 "\x64\x20\x6d\x61\x79\x20\x62\x65"
24127 "\x20\x75\x70\x64\x61\x74\x65\x64"
24128 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
24129 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
24130 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
24131 "\x20\x62\x79\x20\x6f\x74\x68\x65"
24132 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
24133 "\x6e\x74\x73\x20\x61\x74\x20\x61"
24134 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
24135 "\x20\x49\x74\x20\x69\x73\x20\x69"
24136 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
24137 "\x69\x61\x74\x65\x20\x74\x6f\x20"
24138 "\x75\x73\x65\x20\x49\x6e\x74\x65"
24139 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
24140 "\x66\x74\x73\x20\x61\x73\x20\x72"
24141 "\x65\x66\x65\x72\x65\x6e\x63\x65"
24142 "\x20\x6d\x61\x74\x65\x72\x69\x61"
24143 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
24144 "\x63\x69\x74\x65\x20\x74\x68\x65"
24145 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
24146 "\x74\x68\x61\x6e\x20\x61\x73\x20"
24147 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
24148 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
24149 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
24150 "\x9d",
24151 .ilen = 265,
24152 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
24153 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
24154 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
24155 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
24156 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
24157 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
24158 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
24159 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
24160 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
24161 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
24162 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
24163 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
24164 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
24165 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
24166 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
24167 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
24168 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
24169 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
24170 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
24171 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
24172 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
24173 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
24174 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
24175 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
24176 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
24177 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
24178 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
24179 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
24180 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
24181 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
24182 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
24183 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
24184 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
24185 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
24186 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
24187 "\x38",
24188 .rlen = 281,
24189 },
24190};
24191
24192static struct aead_testvec rfc7539esp_dec_tv_template[] = {
24193 {
24194 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
24195 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
24196 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
24197 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
24198 "\x00\x00\x00\x00",
24199 .klen = 36,
24200 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
24201 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
Herbert Xu74790922015-07-16 12:35:08 +080024202 "\x00\x00\x4e\x91\x01\x02\x03\x04"
24203 "\x05\x06\x07\x08",
24204 .alen = 20,
Martin Willi59007582015-06-01 13:44:03 +020024205 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
24206 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
24207 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
24208 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
24209 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
24210 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
24211 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
24212 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
24213 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
24214 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
24215 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
24216 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
24217 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
24218 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
24219 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
24220 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
24221 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
24222 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
24223 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
24224 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
24225 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
24226 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
24227 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
24228 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
24229 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
24230 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
24231 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
24232 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
24233 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
24234 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
24235 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
24236 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
24237 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
24238 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
24239 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
24240 "\x38",
24241 .ilen = 281,
24242 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
24243 "\x2d\x44\x72\x61\x66\x74\x73\x20"
24244 "\x61\x72\x65\x20\x64\x72\x61\x66"
24245 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
24246 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
24247 "\x64\x20\x66\x6f\x72\x20\x61\x20"
24248 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
24249 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
24250 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
24251 "\x64\x20\x6d\x61\x79\x20\x62\x65"
24252 "\x20\x75\x70\x64\x61\x74\x65\x64"
24253 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
24254 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
24255 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
24256 "\x20\x62\x79\x20\x6f\x74\x68\x65"
24257 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
24258 "\x6e\x74\x73\x20\x61\x74\x20\x61"
24259 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
24260 "\x20\x49\x74\x20\x69\x73\x20\x69"
24261 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
24262 "\x69\x61\x74\x65\x20\x74\x6f\x20"
24263 "\x75\x73\x65\x20\x49\x6e\x74\x65"
24264 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
24265 "\x66\x74\x73\x20\x61\x73\x20\x72"
24266 "\x65\x66\x65\x72\x65\x6e\x63\x65"
24267 "\x20\x6d\x61\x74\x65\x72\x69\x61"
24268 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
24269 "\x63\x69\x74\x65\x20\x74\x68\x65"
24270 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
24271 "\x74\x68\x61\x6e\x20\x61\x73\x20"
24272 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
24273 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
24274 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
24275 "\x9d",
24276 .rlen = 265,
24277 },
24278};
24279
24280/*
Stephan Mueller35351982015-09-21 20:59:56 +020024281 * All key wrapping test vectors taken from
24282 * http://csrc.nist.gov/groups/STM/cavp/documents/mac/kwtestvectors.zip
24283 *
24284 * Note: as documented in keywrap.c, the ivout for encryption is the first
24285 * semiblock of the ciphertext from the test vector. For decryption, iv is
24286 * the first semiblock of the ciphertext.
24287 */
24288static struct cipher_testvec aes_kw_enc_tv_template[] = {
24289 {
24290 .key = "\x75\x75\xda\x3a\x93\x60\x7c\xc2"
24291 "\xbf\xd8\xce\xc7\xaa\xdf\xd9\xa6",
24292 .klen = 16,
24293 .input = "\x42\x13\x6d\x3c\x38\x4a\x3e\xea"
24294 "\xc9\x5a\x06\x6f\xd2\x8f\xed\x3f",
24295 .ilen = 16,
24296 .result = "\xf6\x85\x94\x81\x6f\x64\xca\xa3"
24297 "\xf5\x6f\xab\xea\x25\x48\xf5\xfb",
24298 .rlen = 16,
24299 .iv_out = "\x03\x1f\x6b\xd7\xe6\x1e\x64\x3d",
24300 },
24301};
24302
24303static struct cipher_testvec aes_kw_dec_tv_template[] = {
24304 {
24305 .key = "\x80\xaa\x99\x73\x27\xa4\x80\x6b"
24306 "\x6a\x7a\x41\xa5\x2b\x86\xc3\x71"
24307 "\x03\x86\xf9\x32\x78\x6e\xf7\x96"
24308 "\x76\xfa\xfb\x90\xb8\x26\x3c\x5f",
24309 .klen = 32,
24310 .input = "\xd3\x3d\x3d\x97\x7b\xf0\xa9\x15"
24311 "\x59\xf9\x9c\x8a\xcd\x29\x3d\x43",
24312 .ilen = 16,
24313 .result = "\x0a\x25\x6b\xa7\x5c\xfa\x03\xaa"
24314 "\xa0\x2b\xa9\x42\x03\xf1\x5b\xaa",
24315 .rlen = 16,
24316 .iv = "\x42\x3c\x96\x0d\x8a\x2a\xc4\xc1",
24317 },
24318};
24319
24320/*
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080024321 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
24322 * test vectors, taken from Appendix B.2.9 and B.2.10:
24323 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
24324 * Only AES-128 is supported at this time.
24325 */
24326#define ANSI_CPRNG_AES_TEST_VECTORS 6
24327
24328static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
24329 {
24330 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
24331 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
24332 .klen = 16,
24333 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
24334 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
24335 .dtlen = 16,
24336 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
24337 "\x00\x00\x00\x00\x00\x00\x00\x00",
24338 .vlen = 16,
24339 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
24340 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
24341 .rlen = 16,
24342 .loops = 1,
24343 }, {
24344 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
24345 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
24346 .klen = 16,
24347 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
24348 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
24349 .dtlen = 16,
24350 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
24351 "\x00\x00\x00\x00\x00\x00\x00\x00",
24352 .vlen = 16,
24353 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
24354 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
24355 .rlen = 16,
24356 .loops = 1,
24357 }, {
24358 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
24359 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
24360 .klen = 16,
24361 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
24362 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
24363 .dtlen = 16,
24364 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
24365 "\x00\x00\x00\x00\x00\x00\x00\x00",
24366 .vlen = 16,
24367 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
24368 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
24369 .rlen = 16,
24370 .loops = 1,
24371 }, {
24372 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
24373 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
24374 .klen = 16,
24375 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
24376 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
24377 .dtlen = 16,
24378 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
24379 "\x00\x00\x00\x00\x00\x00\x00\x00",
24380 .vlen = 16,
24381 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
24382 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
24383 .rlen = 16,
24384 .loops = 1,
24385 }, {
24386 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
24387 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
24388 .klen = 16,
24389 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
24390 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
24391 .dtlen = 16,
24392 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
24393 "\x00\x00\x00\x00\x00\x00\x00\x00",
24394 .vlen = 16,
24395 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
24396 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
24397 .rlen = 16,
24398 .loops = 1,
24399 }, { /* Monte Carlo Test */
24400 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
24401 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
24402 .klen = 16,
24403 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
24404 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
24405 .dtlen = 16,
24406 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
24407 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
24408 .vlen = 16,
24409 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
24410 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
24411 .rlen = 16,
24412 .loops = 10000,
24413 },
24414};
24415
Stephan Mueller3332ee22014-05-31 17:24:38 +020024416/*
24417 * SP800-90A DRBG Test vectors from
24418 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
24419 *
24420 * Test vectors for DRBG with prediction resistance. All types of DRBGs
24421 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
24422 * w/o personalization string, w/ and w/o additional input string).
24423 */
24424static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
24425 {
24426 .entropy = (unsigned char *)
24427 "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
24428 "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
24429 "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
24430 "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
24431 .entropylen = 48,
24432 .entpra = (unsigned char *)
24433 "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
24434 "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
24435 "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
24436 .entprb = (unsigned char *)
24437 "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
24438 "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
24439 "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
24440 .entprlen = 32,
24441 .expected = (unsigned char *)
24442 "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
24443 "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
24444 "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
24445 "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
24446 "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
24447 "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
24448 "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
24449 "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
24450 "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
24451 "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
24452 "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
24453 .expectedlen = 128,
24454 .addtla = NULL,
24455 .addtlb = NULL,
24456 .addtllen = 0,
24457 .pers = NULL,
24458 .perslen = 0,
24459 }, {
24460 .entropy = (unsigned char *)
24461 "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
24462 "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
24463 "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
24464 "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
24465 .entropylen = 48,
24466 .entpra = (unsigned char *)
24467 "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
24468 "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
24469 "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
24470 .entprb = (unsigned char *)
24471 "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
24472 "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
24473 "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
24474 .entprlen = 32,
24475 .expected = (unsigned char *)
24476 "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
24477 "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
24478 "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
24479 "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
24480 "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
24481 "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
24482 "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
24483 "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
24484 "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
24485 "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
24486 "\x50\x47\xa3\x63\x81\x16\xaf\x19",
24487 .expectedlen = 128,
24488 .addtla = (unsigned char *)
24489 "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
24490 "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
24491 "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
24492 .addtlb = (unsigned char *)
24493 "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
24494 "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
24495 "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
24496 .addtllen = 32,
24497 .pers = NULL,
24498 .perslen = 0,
24499 }, {
24500 .entropy = (unsigned char *)
24501 "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
24502 "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
24503 "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
24504 "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
24505 .entropylen = 48,
24506 .entpra = (unsigned char *)
24507 "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
24508 "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
24509 "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
24510 .entprb = (unsigned char *)
24511 "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
24512 "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
24513 "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
24514 .entprlen = 32,
24515 .expected = (unsigned char *)
24516 "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
24517 "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
24518 "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
24519 "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
24520 "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
24521 "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
24522 "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
24523 "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
24524 "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
24525 "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
24526 "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
24527 .expectedlen = 128,
24528 .addtla = NULL,
24529 .addtlb = NULL,
24530 .addtllen = 0,
24531 .pers = (unsigned char *)
24532 "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
24533 "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
24534 "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
24535 .perslen = 32,
24536 }, {
24537 .entropy = (unsigned char *)
24538 "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
24539 "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
24540 "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
24541 "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
24542 .entropylen = 48,
24543 .entpra = (unsigned char *)
24544 "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
24545 "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
24546 "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
24547 .entprb = (unsigned char *)
24548 "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
24549 "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
24550 "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
24551 .entprlen = 32,
24552 .expected = (unsigned char *)
24553 "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
24554 "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
24555 "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
24556 "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
24557 "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
24558 "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
24559 "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
24560 "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
24561 "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
24562 "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
24563 "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
24564 .expectedlen = 128,
24565 .addtla = (unsigned char *)
24566 "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
24567 "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
24568 "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
24569 .addtlb = (unsigned char *)
24570 "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
24571 "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
24572 "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
24573 .addtllen = 32,
24574 .pers = (unsigned char *)
24575 "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
24576 "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
24577 "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
24578 .perslen = 32,
24579 },
24580};
24581
24582static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
24583 {
24584 .entropy = (unsigned char *)
24585 "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
24586 "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
24587 "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
24588 "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
24589 .entropylen = 48,
24590 .entpra = (unsigned char *)
24591 "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
24592 "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
24593 "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
24594 .entprb = (unsigned char *)
24595 "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
24596 "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
24597 "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
24598 .entprlen = 32,
24599 .expected = (unsigned char *)
24600 "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
24601 "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
24602 "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
24603 "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
24604 "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
24605 "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
24606 "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
24607 "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
24608 "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
24609 "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
24610 "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
24611 .expectedlen = 128,
24612 .addtla = NULL,
24613 .addtlb = NULL,
24614 .addtllen = 0,
24615 .pers = NULL,
24616 .perslen = 0,
24617 }, {
24618 .entropy = (unsigned char *)
24619 "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
24620 "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
24621 "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
24622 "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
24623 .entropylen = 48,
24624 .entpra = (unsigned char *)
24625 "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
24626 "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
24627 "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
24628 .entprb = (unsigned char *)
24629 "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
24630 "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
24631 "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
24632 .entprlen = 32,
24633 .expected = (unsigned char *)
24634 "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
24635 "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
24636 "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
24637 "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
24638 "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
24639 "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
24640 "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
24641 "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
24642 "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
24643 "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
24644 "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
24645 .expectedlen = 128,
24646 .addtla = (unsigned char *)
24647 "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
24648 "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
24649 "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
24650 .addtlb = (unsigned char *)
24651 "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
24652 "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
24653 "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
24654 .addtllen = 32,
24655 .pers = NULL,
24656 .perslen = 0,
24657 }, {
24658 .entropy = (unsigned char *)
24659 "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
24660 "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
24661 "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
24662 "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
24663 .entropylen = 48,
24664 .entpra = (unsigned char *)
24665 "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
24666 "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
24667 "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
24668 .entprb = (unsigned char *)
24669 "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
24670 "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
24671 "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
24672 .entprlen = 32,
24673 .expected = (unsigned char *)
24674 "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
24675 "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
24676 "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
24677 "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
24678 "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
24679 "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
24680 "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
24681 "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
24682 "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
24683 "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
24684 "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
24685 .expectedlen = 128,
24686 .addtla = NULL,
24687 .addtlb = NULL,
24688 .addtllen = 0,
24689 .pers = (unsigned char *)
24690 "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
24691 "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
24692 "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
24693 .perslen = 32,
24694 }, {
24695 .entropy = (unsigned char *)
24696 "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
24697 "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
24698 "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
24699 "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
24700 .entropylen = 48,
24701 .entpra = (unsigned char *)
24702 "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
24703 "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
24704 "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
24705 .entprb = (unsigned char *)
24706 "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
24707 "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
24708 "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
24709 .entprlen = 32,
24710 .expected = (unsigned char *)
24711 "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
24712 "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
24713 "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
24714 "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
24715 "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
24716 "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
24717 "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
24718 "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
24719 "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
24720 "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
24721 "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
24722 .expectedlen = 128,
24723 .addtla = (unsigned char *)
24724 "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
24725 "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
24726 "\x86\x88\x55\x28\xc1\x69\xdd\x76",
24727 .addtlb = (unsigned char *)
24728 "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
24729 "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
24730 "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
24731 .addtllen = 32,
24732 .pers = (unsigned char *)
24733 "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
24734 "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
24735 "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
24736 .perslen = 32,
24737 },
24738};
24739
24740static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
24741 {
24742 .entropy = (unsigned char *)
24743 "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
24744 "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
24745 .entropylen = 24,
24746 .entpra = (unsigned char *)
24747 "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
24748 "\xb4\xec\x80\xb1",
24749 .entprb = (unsigned char *)
24750 "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
24751 "\x28\x07\xeb\xc2",
24752 .entprlen = 16,
24753 .expected = (unsigned char *)
24754 "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
24755 "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
24756 "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
24757 "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
24758 "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
24759 "\x8a\xf1\x23\xa8",
24760 .expectedlen = 64,
24761 .addtla = NULL,
24762 .addtlb = NULL,
24763 .addtllen = 0,
24764 .pers = NULL,
24765 .perslen = 0,
24766 }, {
24767 .entropy = (unsigned char *)
24768 "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
24769 "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
24770 .entropylen = 24,
24771 .entpra = (unsigned char *)
24772 "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
24773 "\x67\xd1\x08\xf8",
24774 .entprb = (unsigned char *)
24775 "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
24776 "\xd4\xba\x04\x58",
24777 .entprlen = 16,
24778 .expected = (unsigned char *)
24779 "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
24780 "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
24781 "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
24782 "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
24783 "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
24784 "\xc1\x02\x41\x82",
24785 .expectedlen = 64,
24786 .addtla = (unsigned char *)
24787 "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
24788 "\xeb\xb3\x01\x76",
24789 .addtlb = (unsigned char *)
24790 "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
24791 "\xd0\x7f\xcc\x43",
24792 .addtllen = 16,
24793 .pers = NULL,
24794 .perslen = 0,
24795 }, {
24796 .entropy = (unsigned char *)
24797 "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
24798 "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
24799 .entropylen = 24,
24800 .entpra = (unsigned char *)
24801 "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
24802 "\xc3\x0f\xe3\xb0",
24803 .entprb = (unsigned char *)
24804 "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
24805 "\xd6\x9c\x9d\xe8",
24806 .entprlen = 16,
24807 .expected = (unsigned char *)
24808 "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
24809 "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
24810 "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
24811 "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
24812 "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
24813 "\x72\x82\x0c\xcf",
24814 .expectedlen = 64,
24815 .addtla = NULL,
24816 .addtlb = NULL,
24817 .addtllen = 0,
24818 .pers = (unsigned char *)
24819 "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
24820 "\x21\x52\xb3\xad",
24821 .perslen = 16,
24822 }, {
24823 .entropy = (unsigned char *)
24824 "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
24825 "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
24826 .entropylen = 24,
24827 .entpra = (unsigned char *)
24828 "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
24829 "\xc4\x2c\xe8\x10",
24830 .entprb = (unsigned char *)
24831 "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
24832 "\x08\xf7\xa5\x01",
24833 .entprlen = 16,
24834 .expected = (unsigned char *)
24835 "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
24836 "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
24837 "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
24838 "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
24839 "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
24840 "\x23\xc5\x1f\x68",
24841 .expectedlen = 64,
24842 .addtla = (unsigned char *)
24843 "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
24844 "\x23\x6d\xad\x1d",
24845 .addtlb = (unsigned char *)
24846 "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
24847 "\xbc\x59\x31\x8c",
24848 .addtllen = 16,
24849 .pers = (unsigned char *)
24850 "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
24851 "\x37\x3c\x5c\x0b",
24852 .perslen = 16,
24853 },
24854};
24855
24856/*
24857 * SP800-90A DRBG Test vectors from
24858 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
24859 *
24860 * Test vectors for DRBG without prediction resistance. All types of DRBGs
24861 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
24862 * w/o personalization string, w/ and w/o additional input string).
24863 */
24864static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
24865 {
24866 .entropy = (unsigned char *)
24867 "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
24868 "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
24869 "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
24870 "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
24871 .entropylen = 48,
24872 .expected = (unsigned char *)
24873 "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
24874 "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
24875 "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
24876 "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
24877 "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
24878 "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
24879 "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
24880 "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
24881 "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
24882 "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
24883 "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
24884 .expectedlen = 128,
24885 .addtla = NULL,
24886 .addtlb = NULL,
24887 .addtllen = 0,
24888 .pers = NULL,
24889 .perslen = 0,
24890 }, {
24891 .entropy = (unsigned char *)
24892 "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
24893 "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
24894 "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
24895 "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
24896 .entropylen = 48,
24897 .expected = (unsigned char *)
24898 "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
24899 "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
24900 "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
24901 "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
24902 "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
24903 "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
24904 "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
24905 "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
24906 "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
24907 "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
24908 "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
24909 .expectedlen = 128,
24910 .addtla = (unsigned char *)
24911 "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
24912 "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
24913 "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
24914 .addtlb = (unsigned char *)
24915 "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
24916 "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
24917 "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
24918 .addtllen = 32,
24919 .pers = NULL,
24920 .perslen = 0,
24921 }, {
24922 .entropy = (unsigned char *)
24923 "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
24924 "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
24925 "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
24926 "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
24927 .entropylen = 48,
24928 .expected = (unsigned char *)
24929 "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
24930 "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
24931 "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
24932 "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
24933 "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
24934 "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
24935 "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
24936 "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
24937 "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
24938 "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
24939 "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
24940 .expectedlen = 128,
24941 .addtla = NULL,
24942 .addtlb = NULL,
24943 .addtllen = 0,
24944 .pers = (unsigned char *)
24945 "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
24946 "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
24947 "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
24948 .perslen = 32,
24949 }, {
24950 .entropy = (unsigned char *)
24951 "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
24952 "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
24953 "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
24954 "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
24955 .entropylen = 48,
24956 .expected = (unsigned char *)
24957 "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
24958 "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
24959 "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
24960 "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
24961 "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
24962 "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
24963 "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
24964 "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
24965 "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
24966 "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
24967 "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
24968 .expectedlen = 128,
24969 .addtla = (unsigned char *)
24970 "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
24971 "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
24972 "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
24973 .addtlb = (unsigned char *)
24974 "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
24975 "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
24976 "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
24977 .addtllen = 32,
24978 .pers = (unsigned char *)
24979 "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
24980 "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
24981 "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
24982 .perslen = 32,
24983 },
24984};
24985
24986static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
24987 {
24988 .entropy = (unsigned char *)
24989 "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
24990 "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
24991 "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
24992 "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
24993 .entropylen = 48,
24994 .expected = (unsigned char *)
24995 "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
24996 "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
24997 "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
24998 "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
24999 "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
25000 "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
25001 "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
25002 "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
25003 "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
25004 "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
25005 "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
25006 .expectedlen = 128,
25007 .addtla = NULL,
25008 .addtlb = NULL,
25009 .addtllen = 0,
25010 .pers = NULL,
25011 .perslen = 0,
25012 }, {
25013 .entropy = (unsigned char *)
25014 "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
25015 "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
25016 "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
25017 "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
25018 .entropylen = 48,
25019 .expected = (unsigned char *)
25020 "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
25021 "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
25022 "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
25023 "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
25024 "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
25025 "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
25026 "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
25027 "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
25028 "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
25029 "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
25030 "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
25031 .expectedlen = 128,
25032 .addtla = (unsigned char *)
25033 "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
25034 "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
25035 "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
25036 .addtlb = (unsigned char *)
25037 "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
25038 "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
25039 "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
25040 .addtllen = 32,
25041 .pers = NULL,
25042 .perslen = 0,
25043 }, {
25044 .entropy = (unsigned char *)
25045 "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
25046 "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
25047 "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
25048 "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
25049 .entropylen = 48,
25050 .expected = (unsigned char *)
25051 "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
25052 "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
25053 "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
25054 "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
25055 "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
25056 "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
25057 "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
25058 "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
25059 "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
25060 "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
25061 "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
25062 .expectedlen = 128,
25063 .addtla = NULL,
25064 .addtlb = NULL,
25065 .addtllen = 0,
25066 .pers = (unsigned char *)
25067 "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
25068 "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
25069 "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
25070 .perslen = 32,
25071 }, {
25072 .entropy = (unsigned char *)
25073 "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
25074 "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
25075 "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
25076 "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
25077 .entropylen = 48,
25078 .expected = (unsigned char *)
25079 "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
25080 "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
25081 "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
25082 "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
25083 "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
25084 "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
25085 "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
25086 "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
25087 "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
25088 "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
25089 "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
25090 .expectedlen = 128,
25091 .addtla = (unsigned char *)
25092 "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
25093 "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
25094 "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
25095 .addtlb = (unsigned char *)
25096 "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
25097 "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
25098 "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
25099 .addtllen = 32,
25100 .pers = (unsigned char *)
25101 "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
25102 "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
25103 "\x36\x60\x3b\xca\x37\xc9\xee\x29",
25104 .perslen = 32,
25105 },
25106};
25107
25108static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
25109 {
25110 .entropy = (unsigned char *)
25111 "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
25112 "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
25113 "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
25114 "\xac\x9b\xbb\x00",
25115 .entropylen = 40,
25116 .expected = (unsigned char *)
25117 "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
25118 "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
25119 "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
25120 "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
25121 "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
25122 "\x9a\x9d\xf1\x0d",
25123 .expectedlen = 64,
25124 .addtla = NULL,
25125 .addtlb = NULL,
25126 .addtllen = 0,
25127 .pers = NULL,
25128 .perslen = 0,
25129 },
25130};
25131
25132static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
25133 {
25134 .entropy = (unsigned char *)
25135 "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
25136 "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
25137 "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
25138 "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
25139 .entropylen = 48,
25140 .expected = (unsigned char *)
25141 "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
25142 "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
25143 "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
25144 "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
25145 "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
25146 "\xb4\xf0\x7e\x1d",
25147 .expectedlen = 64,
25148 .addtla = NULL,
25149 .addtlb = NULL,
25150 .addtllen = 0,
25151 .pers = NULL,
25152 .perslen = 0,
25153 },
25154};
25155
25156static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
25157 {
25158 .entropy = (unsigned char *)
25159 "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
25160 "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
25161 .entropylen = 24,
25162 .expected = (unsigned char *)
25163 "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
25164 "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
25165 "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
25166 "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
25167 "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
25168 "\xcb\x2d\xd6\xb0",
25169 .expectedlen = 64,
25170 .addtla = NULL,
25171 .addtlb = NULL,
25172 .addtllen = 0,
25173 .pers = NULL,
25174 .perslen = 0,
25175 }, {
25176 .entropy = (unsigned char *)
25177 "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
25178 "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
25179 .entropylen = 24,
25180 .expected = (unsigned char *)
25181 "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
25182 "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
25183 "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
25184 "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
25185 "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
25186 "\xc3\xdf\xb3\x81",
25187 .expectedlen = 64,
25188 .addtla = (unsigned char *)
25189 "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
25190 "\x91\x4d\x81\x56",
25191 .addtlb = (unsigned char *)
25192 "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
25193 "\x4a\x55\xd1\xc6",
25194 .addtllen = 16,
25195 .pers = NULL,
25196 .perslen = 0,
25197 }, {
25198 .entropy = (unsigned char *)
25199 "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
25200 "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
25201 .entropylen = 24,
25202 .expected = (unsigned char *)
25203 "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
25204 "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
25205 "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
25206 "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
25207 "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
25208 "\x34\x30\x0c\x3d",
25209 .expectedlen = 64,
25210 .addtla = NULL,
25211 .addtlb = NULL,
25212 .addtllen = 0,
25213 .pers = (unsigned char *)
25214 "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
25215 "\x0b\xc6\x97\x54",
25216 .perslen = 16,
25217 }, {
25218 .entropy = (unsigned char *)
25219 "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
25220 "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
25221 .entropylen = 24,
25222 .expected = (unsigned char *)
25223 "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
25224 "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
25225 "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
25226 "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
25227 "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
25228 "\x2b\x49\x1e\x5c",
25229 .expectedlen = 64,
25230 .addtla = (unsigned char *)
25231 "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
25232 "\x44\x85\xe7\xfe",
25233 .addtlb = (unsigned char *)
25234 "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
25235 "\x82\x16\x62\x7f",
25236 .addtllen = 16,
25237 .pers = (unsigned char *)
25238 "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
25239 "\x8e\xcf\xe0\x02",
25240 .perslen = 16,
25241 },
25242};
25243
Herbert Xuda7f0332008-07-31 17:08:25 +080025244/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025245#define CAST5_ENC_TEST_VECTORS 4
25246#define CAST5_DEC_TEST_VECTORS 4
25247#define CAST5_CBC_ENC_TEST_VECTORS 1
25248#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030025249#define CAST5_CTR_ENC_TEST_VECTORS 2
25250#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080025251
25252static struct cipher_testvec cast5_enc_tv_template[] = {
25253 {
25254 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
25255 "\x23\x45\x67\x89\x34\x56\x78\x9a",
25256 .klen = 16,
25257 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25258 .ilen = 8,
25259 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
25260 .rlen = 8,
25261 }, {
25262 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
25263 "\x23\x45",
25264 .klen = 10,
25265 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25266 .ilen = 8,
25267 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
25268 .rlen = 8,
25269 }, {
25270 .key = "\x01\x23\x45\x67\x12",
25271 .klen = 5,
25272 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25273 .ilen = 8,
25274 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
25275 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025276 }, { /* Generated from TF test vectors */
25277 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25278 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25279 .klen = 16,
25280 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25281 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25282 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25283 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25284 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25285 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25286 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25287 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25288 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25289 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25290 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25291 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25292 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25293 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25294 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25295 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25296 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25297 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25298 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25299 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25300 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25301 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25302 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25303 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25304 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25305 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25306 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25307 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25308 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25309 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25310 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25311 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25312 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25313 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25314 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25315 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25316 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25317 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25318 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25319 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25320 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25321 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25322 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25323 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25324 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25325 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25326 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25327 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25328 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25329 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25330 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25331 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25332 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25333 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25334 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25335 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25336 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25337 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25338 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25339 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25340 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25341 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25342 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25343 .ilen = 496,
25344 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
25345 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
25346 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
25347 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
25348 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
25349 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
25350 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
25351 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
25352 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
25353 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
25354 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
25355 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
25356 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
25357 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
25358 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
25359 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
25360 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
25361 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
25362 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
25363 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
25364 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
25365 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
25366 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
25367 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
25368 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
25369 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
25370 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
25371 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
25372 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
25373 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
25374 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
25375 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
25376 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
25377 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
25378 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
25379 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
25380 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
25381 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
25382 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
25383 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
25384 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
25385 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
25386 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
25387 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
25388 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
25389 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
25390 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
25391 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
25392 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
25393 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
25394 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
25395 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
25396 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
25397 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
25398 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
25399 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
25400 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
25401 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
25402 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
25403 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
25404 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
25405 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
25406 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025407 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025408 .np = 3,
25409 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025410 },
25411};
25412
25413static struct cipher_testvec cast5_dec_tv_template[] = {
25414 {
25415 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
25416 "\x23\x45\x67\x89\x34\x56\x78\x9a",
25417 .klen = 16,
25418 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
25419 .ilen = 8,
25420 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25421 .rlen = 8,
25422 }, {
25423 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
25424 "\x23\x45",
25425 .klen = 10,
25426 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
25427 .ilen = 8,
25428 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25429 .rlen = 8,
25430 }, {
25431 .key = "\x01\x23\x45\x67\x12",
25432 .klen = 5,
25433 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
25434 .ilen = 8,
25435 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25436 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025437 }, { /* Generated from TF test vectors */
25438 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25439 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25440 .klen = 16,
25441 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25442 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
25443 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
25444 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
25445 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
25446 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
25447 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
25448 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
25449 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
25450 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
25451 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
25452 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
25453 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
25454 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
25455 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
25456 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
25457 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
25458 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
25459 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
25460 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
25461 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
25462 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
25463 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
25464 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
25465 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
25466 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
25467 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
25468 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
25469 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
25470 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
25471 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
25472 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
25473 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
25474 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
25475 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
25476 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
25477 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
25478 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
25479 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
25480 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
25481 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
25482 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
25483 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
25484 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
25485 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
25486 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
25487 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
25488 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
25489 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
25490 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
25491 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
25492 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
25493 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
25494 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
25495 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
25496 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
25497 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
25498 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
25499 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
25500 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
25501 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
25502 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
25503 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
25504 .ilen = 496,
25505 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25506 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25507 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25508 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25509 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25510 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25511 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25512 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25513 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25514 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25515 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25516 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25517 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25518 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25519 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25520 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25521 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25522 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25523 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25524 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25525 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25526 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25527 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25528 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25529 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25530 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25531 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25532 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25533 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25534 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25535 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25536 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25537 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25538 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25539 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25540 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25541 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25542 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25543 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25544 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25545 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25546 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25547 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25548 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25549 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25550 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25551 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25552 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25553 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25554 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25555 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25556 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25557 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25558 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25559 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25560 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25561 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25562 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25563 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25564 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25565 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25566 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25567 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025568 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025569 .np = 3,
25570 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025571 },
25572};
25573
25574static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
25575 { /* Generated from TF test vectors */
25576 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25577 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25578 .klen = 16,
25579 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25580 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25581 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25582 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25583 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25584 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25585 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25586 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25587 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25588 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25589 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25590 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25591 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25592 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25593 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25594 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25595 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25596 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25597 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25598 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25599 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25600 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25601 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25602 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25603 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25604 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25605 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25606 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25607 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25608 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25609 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25610 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25611 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25612 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25613 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25614 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25615 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25616 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25617 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25618 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25619 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25620 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25621 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25622 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25623 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25624 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25625 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25626 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25627 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25628 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25629 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25630 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25631 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25632 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25633 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25634 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25635 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25636 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25637 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25638 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25639 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25640 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25641 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25642 .ilen = 496,
25643 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
25644 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
25645 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
25646 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
25647 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
25648 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
25649 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
25650 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
25651 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
25652 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
25653 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
25654 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
25655 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
25656 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
25657 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
25658 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
25659 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
25660 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
25661 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
25662 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
25663 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
25664 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
25665 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
25666 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
25667 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
25668 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
25669 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
25670 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
25671 "\x90\x12\x37\x49\x27\x98\x69\x18"
25672 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
25673 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
25674 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
25675 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
25676 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
25677 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
25678 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
25679 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
25680 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
25681 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
25682 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
25683 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
25684 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
25685 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
25686 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
25687 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
25688 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
25689 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
25690 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
25691 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
25692 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
25693 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
25694 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
25695 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
25696 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
25697 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
25698 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
25699 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
25700 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
25701 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
25702 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
25703 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
25704 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
25705 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025706 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025707 .np = 3,
25708 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025709 },
25710};
25711
25712static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
25713 { /* Generated from TF test vectors */
25714 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25715 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25716 .klen = 16,
25717 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25718 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
25719 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
25720 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
25721 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
25722 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
25723 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
25724 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
25725 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
25726 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
25727 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
25728 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
25729 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
25730 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
25731 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
25732 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
25733 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
25734 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
25735 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
25736 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
25737 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
25738 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
25739 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
25740 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
25741 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
25742 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
25743 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
25744 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
25745 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
25746 "\x90\x12\x37\x49\x27\x98\x69\x18"
25747 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
25748 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
25749 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
25750 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
25751 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
25752 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
25753 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
25754 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
25755 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
25756 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
25757 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
25758 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
25759 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
25760 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
25761 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
25762 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
25763 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
25764 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
25765 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
25766 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
25767 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
25768 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
25769 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
25770 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
25771 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
25772 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
25773 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
25774 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
25775 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
25776 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
25777 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
25778 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
25779 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
25780 .ilen = 496,
25781 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25782 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25783 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25784 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25785 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25786 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25787 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25788 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25789 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25790 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25791 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25792 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25793 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25794 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25795 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25796 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25797 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25798 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25799 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25800 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25801 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25802 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25803 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25804 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25805 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25806 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25807 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25808 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25809 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25810 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25811 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25812 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25813 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25814 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25815 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25816 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25817 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25818 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25819 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25820 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25821 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25822 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25823 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25824 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25825 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25826 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25827 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25828 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25829 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25830 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25831 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25832 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25833 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25834 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25835 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25836 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25837 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25838 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25839 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25840 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25841 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25842 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25843 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025844 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025845 .np = 3,
25846 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025847 },
25848};
25849
25850static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
25851 { /* Generated from TF test vectors */
25852 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25853 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25854 .klen = 16,
25855 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25856 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25857 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030025858 "\x3A",
25859 .ilen = 17,
25860 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25861 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
25862 "\x0C",
25863 .rlen = 17,
25864 }, { /* Generated from TF test vectors */
25865 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25866 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25867 .klen = 16,
25868 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25869 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25870 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025871 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25872 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25873 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25874 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25875 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25876 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25877 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25878 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25879 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25880 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25881 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25882 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25883 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25884 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25885 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25886 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25887 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25888 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25889 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25890 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25891 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25892 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25893 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25894 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25895 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25896 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25897 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25898 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25899 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25900 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25901 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25902 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25903 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25904 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25905 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25906 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25907 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25908 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25909 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25910 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25911 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25912 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25913 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25914 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25915 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25916 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25917 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25918 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25919 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25920 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25921 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25922 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25923 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25924 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25925 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25926 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25927 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25928 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25929 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25930 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25931 .ilen = 496,
25932 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25933 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
25934 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
25935 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
25936 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
25937 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
25938 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
25939 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
25940 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
25941 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
25942 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
25943 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
25944 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
25945 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
25946 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
25947 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
25948 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
25949 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
25950 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
25951 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
25952 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
25953 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
25954 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
25955 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
25956 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
25957 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
25958 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
25959 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
25960 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
25961 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
25962 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
25963 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
25964 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
25965 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
25966 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
25967 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
25968 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
25969 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
25970 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
25971 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
25972 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
25973 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
25974 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
25975 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
25976 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
25977 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
25978 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
25979 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
25980 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
25981 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
25982 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
25983 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
25984 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
25985 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
25986 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
25987 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
25988 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
25989 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
25990 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
25991 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
25992 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
25993 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
25994 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025995 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025996 .np = 3,
25997 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020025998 },
25999};
26000
26001static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
26002 { /* Generated from TF test vectors */
26003 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26004 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
26005 .klen = 16,
26006 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
26007 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
26008 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030026009 "\x0C",
26010 .ilen = 17,
26011 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26012 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26013 "\x3A",
26014 .rlen = 17,
26015 }, { /* Generated from TF test vectors */
26016 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26017 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
26018 .klen = 16,
26019 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
26020 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
26021 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020026022 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
26023 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
26024 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
26025 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
26026 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
26027 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
26028 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
26029 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
26030 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
26031 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
26032 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
26033 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
26034 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
26035 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
26036 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
26037 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
26038 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
26039 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
26040 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
26041 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
26042 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
26043 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
26044 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
26045 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
26046 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
26047 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
26048 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
26049 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
26050 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
26051 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
26052 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
26053 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
26054 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
26055 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
26056 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
26057 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
26058 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
26059 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
26060 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
26061 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
26062 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
26063 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
26064 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
26065 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
26066 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
26067 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
26068 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
26069 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
26070 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
26071 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
26072 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
26073 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
26074 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
26075 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
26076 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
26077 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
26078 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
26079 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
26080 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
26081 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
26082 .ilen = 496,
26083 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26084 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26085 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26086 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26087 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26088 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26089 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26090 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26091 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26092 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26093 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26094 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26095 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26096 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26097 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26098 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26099 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26100 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26101 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26102 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26103 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26104 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26105 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26106 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26107 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26108 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26109 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26110 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26111 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26112 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26113 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26114 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26115 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26116 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26117 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26118 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26119 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26120 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26121 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26122 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26123 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26124 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26125 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26126 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26127 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26128 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26129 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26130 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26131 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26132 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26133 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26134 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26135 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26136 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26137 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26138 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26139 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26140 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26141 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26142 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26143 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26144 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
26145 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026146 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020026147 .np = 3,
26148 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080026149 },
26150};
26151
26152/*
26153 * ARC4 test vectors from OpenSSL
26154 */
26155#define ARC4_ENC_TEST_VECTORS 7
26156#define ARC4_DEC_TEST_VECTORS 7
26157
26158static struct cipher_testvec arc4_enc_tv_template[] = {
26159 {
26160 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
26161 .klen = 8,
26162 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
26163 .ilen = 8,
26164 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
26165 .rlen = 8,
26166 }, {
26167 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
26168 .klen = 8,
26169 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
26170 .ilen = 8,
26171 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
26172 .rlen = 8,
26173 }, {
26174 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
26175 .klen = 8,
26176 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
26177 .ilen = 8,
26178 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
26179 .rlen = 8,
26180 }, {
26181 .key = "\xef\x01\x23\x45",
26182 .klen = 4,
26183 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
26184 "\x00\x00\x00\x00\x00\x00\x00\x00"
26185 "\x00\x00\x00\x00",
26186 .ilen = 20,
26187 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
26188 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
26189 "\x36\xb6\x78\x58",
26190 .rlen = 20,
26191 }, {
26192 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
26193 .klen = 8,
26194 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
26195 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
26196 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
26197 "\x12\x34\x56\x78",
26198 .ilen = 28,
26199 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
26200 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
26201 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
26202 "\x40\x01\x1e\xcf",
26203 .rlen = 28,
26204 }, {
26205 .key = "\xef\x01\x23\x45",
26206 .klen = 4,
26207 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
26208 "\x00\x00",
26209 .ilen = 10,
26210 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
26211 "\xbd\x61",
26212 .rlen = 10,
26213 }, {
26214 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
26215 "\x00\x00\x00\x00\x00\x00\x00\x00",
26216 .klen = 16,
26217 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
26218 .ilen = 8,
26219 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
26220 .rlen = 8,
26221 },
26222};
26223
26224static struct cipher_testvec arc4_dec_tv_template[] = {
26225 {
26226 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
26227 .klen = 8,
26228 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
26229 .ilen = 8,
26230 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
26231 .rlen = 8,
26232 }, {
26233 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
26234 .klen = 8,
26235 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
26236 .ilen = 8,
26237 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
26238 .rlen = 8,
26239 }, {
26240 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
26241 .klen = 8,
26242 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
26243 .ilen = 8,
26244 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
26245 .rlen = 8,
26246 }, {
26247 .key = "\xef\x01\x23\x45",
26248 .klen = 4,
26249 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
26250 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
26251 "\x36\xb6\x78\x58",
26252 .ilen = 20,
26253 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
26254 "\x00\x00\x00\x00\x00\x00\x00\x00"
26255 "\x00\x00\x00\x00",
26256 .rlen = 20,
26257 }, {
26258 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
26259 .klen = 8,
26260 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
26261 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
26262 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
26263 "\x40\x01\x1e\xcf",
26264 .ilen = 28,
26265 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
26266 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
26267 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
26268 "\x12\x34\x56\x78",
26269 .rlen = 28,
26270 }, {
26271 .key = "\xef\x01\x23\x45",
26272 .klen = 4,
26273 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
26274 "\xbd\x61",
26275 .ilen = 10,
26276 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
26277 "\x00\x00",
26278 .rlen = 10,
26279 }, {
26280 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
26281 "\x00\x00\x00\x00\x00\x00\x00\x00",
26282 .klen = 16,
26283 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
26284 .ilen = 8,
26285 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
26286 .rlen = 8,
26287 },
26288};
26289
26290/*
26291 * TEA test vectors
26292 */
26293#define TEA_ENC_TEST_VECTORS 4
26294#define TEA_DEC_TEST_VECTORS 4
26295
26296static struct cipher_testvec tea_enc_tv_template[] = {
26297 {
26298 .key = zeroed_string,
26299 .klen = 16,
26300 .input = zeroed_string,
26301 .ilen = 8,
26302 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
26303 .rlen = 8,
26304 }, {
26305 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26306 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26307 .klen = 16,
26308 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26309 .ilen = 8,
26310 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
26311 .rlen = 8,
26312 }, {
26313 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26314 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26315 .klen = 16,
26316 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26317 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26318 .ilen = 16,
26319 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
26320 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
26321 .rlen = 16,
26322 }, {
26323 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26324 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26325 .klen = 16,
26326 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
26327 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26328 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26329 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26330 .ilen = 32,
26331 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
26332 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
26333 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
26334 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
26335 .rlen = 32,
26336 }
26337};
26338
26339static struct cipher_testvec tea_dec_tv_template[] = {
26340 {
26341 .key = zeroed_string,
26342 .klen = 16,
26343 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
26344 .ilen = 8,
26345 .result = zeroed_string,
26346 .rlen = 8,
26347 }, {
26348 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26349 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26350 .klen = 16,
26351 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
26352 .ilen = 8,
26353 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26354 .rlen = 8,
26355 }, {
26356 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26357 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26358 .klen = 16,
26359 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
26360 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
26361 .ilen = 16,
26362 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26363 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26364 .rlen = 16,
26365 }, {
26366 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26367 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26368 .klen = 16,
26369 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
26370 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
26371 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
26372 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
26373 .ilen = 32,
26374 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
26375 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26376 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26377 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26378 .rlen = 32,
26379 }
26380};
26381
26382/*
26383 * XTEA test vectors
26384 */
26385#define XTEA_ENC_TEST_VECTORS 4
26386#define XTEA_DEC_TEST_VECTORS 4
26387
26388static struct cipher_testvec xtea_enc_tv_template[] = {
26389 {
26390 .key = zeroed_string,
26391 .klen = 16,
26392 .input = zeroed_string,
26393 .ilen = 8,
26394 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
26395 .rlen = 8,
26396 }, {
26397 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26398 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26399 .klen = 16,
26400 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26401 .ilen = 8,
26402 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
26403 .rlen = 8,
26404 }, {
26405 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26406 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26407 .klen = 16,
26408 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26409 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26410 .ilen = 16,
26411 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
26412 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
26413 .rlen = 16,
26414 }, {
26415 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26416 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26417 .klen = 16,
26418 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
26419 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26420 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26421 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26422 .ilen = 32,
26423 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
26424 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
26425 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
26426 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
26427 .rlen = 32,
26428 }
26429};
26430
26431static struct cipher_testvec xtea_dec_tv_template[] = {
26432 {
26433 .key = zeroed_string,
26434 .klen = 16,
26435 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
26436 .ilen = 8,
26437 .result = zeroed_string,
26438 .rlen = 8,
26439 }, {
26440 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26441 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26442 .klen = 16,
26443 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
26444 .ilen = 8,
26445 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26446 .rlen = 8,
26447 }, {
26448 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26449 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26450 .klen = 16,
26451 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
26452 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
26453 .ilen = 16,
26454 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26455 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26456 .rlen = 16,
26457 }, {
26458 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26459 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26460 .klen = 16,
26461 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
26462 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
26463 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
26464 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
26465 .ilen = 32,
26466 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
26467 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26468 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26469 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26470 .rlen = 32,
26471 }
26472};
26473
26474/*
26475 * KHAZAD test vectors.
26476 */
26477#define KHAZAD_ENC_TEST_VECTORS 5
26478#define KHAZAD_DEC_TEST_VECTORS 5
26479
26480static struct cipher_testvec khazad_enc_tv_template[] = {
26481 {
26482 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
26483 "\x00\x00\x00\x00\x00\x00\x00\x00",
26484 .klen = 16,
26485 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
26486 .ilen = 8,
26487 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
26488 .rlen = 8,
26489 }, {
26490 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
26491 "\x38\x38\x38\x38\x38\x38\x38\x38",
26492 .klen = 16,
26493 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
26494 .ilen = 8,
26495 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
26496 .rlen = 8,
26497 }, {
26498 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
26499 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26500 .klen = 16,
26501 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26502 .ilen = 8,
26503 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
26504 .rlen = 8,
26505 }, {
26506 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26507 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26508 .klen = 16,
26509 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26510 .ilen = 8,
26511 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26512 .rlen = 8,
26513 }, {
26514 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26515 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26516 .klen = 16,
26517 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26518 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26519 .ilen = 16,
26520 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
26521 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26522 .rlen = 16,
26523 },
26524};
26525
26526static struct cipher_testvec khazad_dec_tv_template[] = {
26527 {
26528 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
26529 "\x00\x00\x00\x00\x00\x00\x00\x00",
26530 .klen = 16,
26531 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
26532 .ilen = 8,
26533 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
26534 .rlen = 8,
26535 }, {
26536 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
26537 "\x38\x38\x38\x38\x38\x38\x38\x38",
26538 .klen = 16,
26539 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
26540 .ilen = 8,
26541 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
26542 .rlen = 8,
26543 }, {
26544 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
26545 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26546 .klen = 16,
26547 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
26548 .ilen = 8,
26549 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26550 .rlen = 8,
26551 }, {
26552 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26553 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26554 .klen = 16,
26555 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26556 .ilen = 8,
26557 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26558 .rlen = 8,
26559 }, {
26560 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26561 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26562 .klen = 16,
26563 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
26564 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26565 .ilen = 16,
26566 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26567 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26568 .rlen = 16,
26569 },
26570};
26571
26572/*
26573 * Anubis test vectors.
26574 */
26575
26576#define ANUBIS_ENC_TEST_VECTORS 5
26577#define ANUBIS_DEC_TEST_VECTORS 5
26578#define ANUBIS_CBC_ENC_TEST_VECTORS 2
26579#define ANUBIS_CBC_DEC_TEST_VECTORS 2
26580
26581static struct cipher_testvec anubis_enc_tv_template[] = {
26582 {
26583 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26584 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26585 .klen = 16,
26586 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26587 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26588 .ilen = 16,
26589 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26590 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
26591 .rlen = 16,
26592 }, {
26593
26594 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
26595 "\x03\x03\x03\x03\x03\x03\x03\x03"
26596 "\x03\x03\x03\x03",
26597 .klen = 20,
26598 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
26599 "\x03\x03\x03\x03\x03\x03\x03\x03",
26600 .ilen = 16,
26601 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
26602 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
26603 .rlen = 16,
26604 }, {
26605 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
26606 "\x24\x24\x24\x24\x24\x24\x24\x24"
26607 "\x24\x24\x24\x24\x24\x24\x24\x24"
26608 "\x24\x24\x24\x24",
26609 .klen = 28,
26610 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
26611 "\x24\x24\x24\x24\x24\x24\x24\x24",
26612 .ilen = 16,
26613 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
26614 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
26615 .rlen = 16,
26616 }, {
26617 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
26618 "\x25\x25\x25\x25\x25\x25\x25\x25"
26619 "\x25\x25\x25\x25\x25\x25\x25\x25"
26620 "\x25\x25\x25\x25\x25\x25\x25\x25",
26621 .klen = 32,
26622 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
26623 "\x25\x25\x25\x25\x25\x25\x25\x25",
26624 .ilen = 16,
26625 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
26626 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
26627 .rlen = 16,
26628 }, {
26629 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26630 "\x35\x35\x35\x35\x35\x35\x35\x35"
26631 "\x35\x35\x35\x35\x35\x35\x35\x35"
26632 "\x35\x35\x35\x35\x35\x35\x35\x35"
26633 "\x35\x35\x35\x35\x35\x35\x35\x35",
26634 .klen = 40,
26635 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
26636 "\x35\x35\x35\x35\x35\x35\x35\x35",
26637 .ilen = 16,
26638 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26639 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
26640 .rlen = 16,
26641 },
26642};
26643
26644static struct cipher_testvec anubis_dec_tv_template[] = {
26645 {
26646 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26647 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26648 .klen = 16,
26649 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26650 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
26651 .ilen = 16,
26652 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26653 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26654 .rlen = 16,
26655 }, {
26656
26657 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
26658 "\x03\x03\x03\x03\x03\x03\x03\x03"
26659 "\x03\x03\x03\x03",
26660 .klen = 20,
26661 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
26662 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
26663 .ilen = 16,
26664 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
26665 "\x03\x03\x03\x03\x03\x03\x03\x03",
26666 .rlen = 16,
26667 }, {
26668 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
26669 "\x24\x24\x24\x24\x24\x24\x24\x24"
26670 "\x24\x24\x24\x24\x24\x24\x24\x24"
26671 "\x24\x24\x24\x24",
26672 .klen = 28,
26673 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
26674 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
26675 .ilen = 16,
26676 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
26677 "\x24\x24\x24\x24\x24\x24\x24\x24",
26678 .rlen = 16,
26679 }, {
26680 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
26681 "\x25\x25\x25\x25\x25\x25\x25\x25"
26682 "\x25\x25\x25\x25\x25\x25\x25\x25"
26683 "\x25\x25\x25\x25\x25\x25\x25\x25",
26684 .klen = 32,
26685 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
26686 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
26687 .ilen = 16,
26688 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
26689 "\x25\x25\x25\x25\x25\x25\x25\x25",
26690 .rlen = 16,
26691 }, {
26692 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26693 "\x35\x35\x35\x35\x35\x35\x35\x35"
26694 "\x35\x35\x35\x35\x35\x35\x35\x35"
26695 "\x35\x35\x35\x35\x35\x35\x35\x35"
26696 "\x35\x35\x35\x35\x35\x35\x35\x35",
26697 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26698 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
26699 .klen = 40,
26700 .ilen = 16,
26701 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
26702 "\x35\x35\x35\x35\x35\x35\x35\x35",
26703 .rlen = 16,
26704 },
26705};
26706
26707static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
26708 {
26709 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26710 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26711 .klen = 16,
26712 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26713 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26714 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26715 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26716 .ilen = 32,
26717 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26718 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
26719 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
26720 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
26721 .rlen = 32,
26722 }, {
26723 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26724 "\x35\x35\x35\x35\x35\x35\x35\x35"
26725 "\x35\x35\x35\x35\x35\x35\x35\x35"
26726 "\x35\x35\x35\x35\x35\x35\x35\x35"
26727 "\x35\x35\x35\x35\x35\x35\x35\x35",
26728 .klen = 40,
26729 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
26730 "\x35\x35\x35\x35\x35\x35\x35\x35"
26731 "\x35\x35\x35\x35\x35\x35\x35\x35"
26732 "\x35\x35\x35\x35\x35\x35\x35\x35",
26733 .ilen = 32,
26734 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26735 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
26736 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
26737 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
26738 .rlen = 32,
26739 },
26740};
26741
26742static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
26743 {
26744 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26745 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26746 .klen = 16,
26747 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26748 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
26749 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
26750 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
26751 .ilen = 32,
26752 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26753 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26754 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26755 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26756 .rlen = 32,
26757 }, {
26758 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
26759 "\x35\x35\x35\x35\x35\x35\x35\x35"
26760 "\x35\x35\x35\x35\x35\x35\x35\x35"
26761 "\x35\x35\x35\x35\x35\x35\x35\x35"
26762 "\x35\x35\x35\x35\x35\x35\x35\x35",
26763 .klen = 40,
26764 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26765 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
26766 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
26767 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
26768 .ilen = 32,
26769 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
26770 "\x35\x35\x35\x35\x35\x35\x35\x35"
26771 "\x35\x35\x35\x35\x35\x35\x35\x35"
26772 "\x35\x35\x35\x35\x35\x35\x35\x35",
26773 .rlen = 32,
26774 },
26775};
26776
26777/*
26778 * XETA test vectors
26779 */
26780#define XETA_ENC_TEST_VECTORS 4
26781#define XETA_DEC_TEST_VECTORS 4
26782
26783static struct cipher_testvec xeta_enc_tv_template[] = {
26784 {
26785 .key = zeroed_string,
26786 .klen = 16,
26787 .input = zeroed_string,
26788 .ilen = 8,
26789 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
26790 .rlen = 8,
26791 }, {
26792 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26793 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26794 .klen = 16,
26795 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26796 .ilen = 8,
26797 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
26798 .rlen = 8,
26799 }, {
26800 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26801 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26802 .klen = 16,
26803 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26804 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26805 .ilen = 16,
26806 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
26807 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
26808 .rlen = 16,
26809 }, {
26810 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26811 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26812 .klen = 16,
26813 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
26814 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26815 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26816 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26817 .ilen = 32,
26818 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
26819 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
26820 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
26821 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
26822 .rlen = 32,
26823 }
26824};
26825
26826static struct cipher_testvec xeta_dec_tv_template[] = {
26827 {
26828 .key = zeroed_string,
26829 .klen = 16,
26830 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
26831 .ilen = 8,
26832 .result = zeroed_string,
26833 .rlen = 8,
26834 }, {
26835 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26836 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26837 .klen = 16,
26838 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
26839 .ilen = 8,
26840 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26841 .rlen = 8,
26842 }, {
26843 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
26844 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26845 .klen = 16,
26846 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
26847 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
26848 .ilen = 16,
26849 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26850 "\x65\x73\x74\x5f\x76\x65\x63\x74",
26851 .rlen = 16,
26852 }, {
26853 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26854 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26855 .klen = 16,
26856 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
26857 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
26858 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
26859 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
26860 .ilen = 32,
26861 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
26862 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26863 "\x79\x6f\x75\x21\x21\x21\x20\x72"
26864 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26865 .rlen = 32,
26866 }
26867};
26868
26869/*
26870 * FCrypt test vectors
26871 */
26872#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
26873#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
26874
26875static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
26876 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
26877 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
26878 .klen = 8,
26879 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26880 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
26881 .ilen = 8,
26882 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
26883 .rlen = 8,
26884 }, {
26885 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
26886 .klen = 8,
26887 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26888 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
26889 .ilen = 8,
26890 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
26891 .rlen = 8,
26892 }, { /* From Arla */
26893 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26894 .klen = 8,
26895 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26896 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
26897 .ilen = 48,
26898 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
26899 "\xee\xac\x98\x62\x44\x51\xe4\x84"
26900 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
26901 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
26902 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
26903 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
26904 .rlen = 48,
26905 }, {
26906 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26907 .klen = 8,
26908 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26909 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
26910 .ilen = 48,
26911 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26912 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26913 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26914 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26915 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26916 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26917 .rlen = 48,
26918 }, { /* split-page version */
26919 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26920 .klen = 8,
26921 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26922 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
26923 .ilen = 48,
26924 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26925 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26926 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26927 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26928 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26929 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26930 .rlen = 48,
26931 .np = 2,
26932 .tap = { 20, 28 },
26933 }
26934};
26935
26936static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
26937 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
26938 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
26939 .klen = 8,
26940 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26941 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
26942 .ilen = 8,
26943 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
26944 .rlen = 8,
26945 }, {
26946 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
26947 .klen = 8,
26948 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
26949 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
26950 .ilen = 8,
26951 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
26952 .rlen = 8,
26953 }, { /* From Arla */
26954 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26955 .klen = 8,
26956 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26957 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
26958 "\xee\xac\x98\x62\x44\x51\xe4\x84"
26959 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
26960 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
26961 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
26962 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
26963 .ilen = 48,
26964 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26965 .rlen = 48,
26966 }, {
26967 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26968 .klen = 8,
26969 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26970 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26971 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26972 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26973 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26974 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26975 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26976 .ilen = 48,
26977 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26978 .rlen = 48,
26979 }, { /* split-page version */
26980 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26981 .klen = 8,
26982 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26983 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26984 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26985 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26986 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26987 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26988 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26989 .ilen = 48,
26990 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26991 .rlen = 48,
26992 .np = 2,
26993 .tap = { 20, 28 },
26994 }
26995};
26996
26997/*
26998 * CAMELLIA test vectors.
26999 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027000#define CAMELLIA_ENC_TEST_VECTORS 4
27001#define CAMELLIA_DEC_TEST_VECTORS 4
27002#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
27003#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
27004#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
27005#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
27006#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
27007#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
27008#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
27009#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080027010
27011static struct cipher_testvec camellia_enc_tv_template[] = {
27012 {
27013 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27014 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
27015 .klen = 16,
27016 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27017 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
27018 .ilen = 16,
27019 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
27020 "\x08\x57\x06\x56\x48\xea\xbe\x43",
27021 .rlen = 16,
27022 }, {
27023 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27024 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
27025 "\x00\x11\x22\x33\x44\x55\x66\x77",
27026 .klen = 24,
27027 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27028 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
27029 .ilen = 16,
27030 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
27031 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
27032 .rlen = 16,
27033 }, {
27034 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27035 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
27036 "\x00\x11\x22\x33\x44\x55\x66\x77"
27037 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
27038 .klen = 32,
27039 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27040 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
27041 .ilen = 16,
27042 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
27043 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
27044 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027045 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027046 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
27047 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
27048 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
27049 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
27050 .klen = 32,
27051 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27052 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27053 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27054 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27055 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027056 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27057 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27058 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27059 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27060 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27061 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27062 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27063 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27064 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27065 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27066 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27067 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27068 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27069 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27070 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27071 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27072 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27073 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27074 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27075 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27076 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27077 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27078 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27079 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27080 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27081 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27082 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27083 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27084 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27085 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27086 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27087 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27088 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27089 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27090 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27091 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27092 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27093 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27094 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27095 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27096 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27097 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27098 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27099 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27100 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27101 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27102 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27103 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27104 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27105 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27106 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27107 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27108 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27109 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27110 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27111 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027112 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27113 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27114 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27115 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27116 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27117 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27118 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27119 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27120 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27121 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27122 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27123 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27124 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27125 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27126 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27127 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27128 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27129 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27130 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27131 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27132 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27133 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27134 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27135 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27136 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27137 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27138 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27139 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27140 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27141 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27142 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27143 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27144 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27145 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27146 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27147 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27148 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27149 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27150 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27151 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27152 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27153 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27154 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27155 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27156 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27157 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27158 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27159 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27160 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27161 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27162 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27163 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27164 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27165 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27166 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27167 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27168 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27169 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27170 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27171 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27172 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27173 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27174 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27175 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27176 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27177 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027178 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
27179 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
27180 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
27181 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
27182 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027183 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
27184 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
27185 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
27186 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
27187 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
27188 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
27189 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
27190 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
27191 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
27192 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
27193 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
27194 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
27195 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
27196 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
27197 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
27198 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
27199 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
27200 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
27201 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
27202 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
27203 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
27204 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
27205 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
27206 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
27207 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
27208 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
27209 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
27210 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
27211 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
27212 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
27213 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
27214 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
27215 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
27216 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
27217 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
27218 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
27219 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
27220 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
27221 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
27222 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
27223 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
27224 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
27225 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
27226 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
27227 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
27228 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
27229 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
27230 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
27231 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
27232 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
27233 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
27234 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
27235 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
27236 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
27237 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
27238 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027239 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
27240 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
27241 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
27242 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
27243 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
27244 "\xED\x28\x39\xE9\x63\xED\x41\x70"
27245 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
27246 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
27247 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
27248 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
27249 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
27250 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
27251 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
27252 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
27253 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
27254 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
27255 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
27256 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
27257 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
27258 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
27259 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
27260 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
27261 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
27262 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
27263 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
27264 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
27265 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
27266 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
27267 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
27268 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
27269 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
27270 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
27271 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
27272 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
27273 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
27274 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
27275 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
27276 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
27277 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
27278 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
27279 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
27280 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
27281 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
27282 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
27283 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
27284 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
27285 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
27286 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
27287 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
27288 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
27289 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
27290 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
27291 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
27292 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
27293 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
27294 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
27295 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
27296 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
27297 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
27298 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
27299 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
27300 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
27301 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
27302 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
27303 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
27304 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027305 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027306 .np = 3,
27307 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027308 },
Herbert Xuda7f0332008-07-31 17:08:25 +080027309};
27310
27311static struct cipher_testvec camellia_dec_tv_template[] = {
27312 {
27313 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27314 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
27315 .klen = 16,
27316 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
27317 "\x08\x57\x06\x56\x48\xea\xbe\x43",
27318 .ilen = 16,
27319 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27320 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
27321 .rlen = 16,
27322 }, {
27323 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27324 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
27325 "\x00\x11\x22\x33\x44\x55\x66\x77",
27326 .klen = 24,
27327 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
27328 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
27329 .ilen = 16,
27330 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27331 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
27332 .rlen = 16,
27333 }, {
27334 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27335 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
27336 "\x00\x11\x22\x33\x44\x55\x66\x77"
27337 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
27338 .klen = 32,
27339 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
27340 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
27341 .ilen = 16,
27342 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
27343 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
27344 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027345 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027346 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
27347 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
27348 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
27349 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
27350 .klen = 32,
27351 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
27352 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
27353 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
27354 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
27355 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027356 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
27357 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
27358 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
27359 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
27360 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
27361 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
27362 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
27363 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
27364 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
27365 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
27366 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
27367 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
27368 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
27369 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
27370 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
27371 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
27372 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
27373 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
27374 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
27375 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
27376 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
27377 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
27378 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
27379 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
27380 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
27381 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
27382 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
27383 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
27384 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
27385 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
27386 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
27387 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
27388 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
27389 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
27390 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
27391 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
27392 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
27393 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
27394 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
27395 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
27396 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
27397 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
27398 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
27399 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
27400 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
27401 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
27402 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
27403 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
27404 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
27405 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
27406 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
27407 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
27408 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
27409 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
27410 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
27411 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027412 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
27413 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
27414 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
27415 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
27416 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
27417 "\xED\x28\x39\xE9\x63\xED\x41\x70"
27418 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
27419 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
27420 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
27421 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
27422 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
27423 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
27424 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
27425 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
27426 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
27427 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
27428 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
27429 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
27430 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
27431 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
27432 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
27433 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
27434 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
27435 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
27436 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
27437 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
27438 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
27439 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
27440 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
27441 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
27442 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
27443 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
27444 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
27445 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
27446 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
27447 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
27448 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
27449 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
27450 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
27451 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
27452 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
27453 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
27454 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
27455 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
27456 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
27457 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
27458 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
27459 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
27460 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
27461 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
27462 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
27463 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
27464 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
27465 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
27466 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
27467 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
27468 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
27469 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
27470 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
27471 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
27472 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
27473 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
27474 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
27475 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
27476 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
27477 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027478 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27479 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27480 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27481 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27482 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027483 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27484 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27485 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27486 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27487 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27488 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27489 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27490 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27491 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27492 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27493 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27494 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27495 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27496 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27497 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27498 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27499 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27500 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27501 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27502 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27503 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27504 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27505 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27506 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27507 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27508 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27509 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27510 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27511 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27512 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27513 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27514 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27515 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27516 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27517 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27518 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27519 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27520 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27521 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27522 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27523 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27524 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27525 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27526 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27527 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27528 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27529 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27530 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27531 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27532 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27533 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27534 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27535 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27536 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27537 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27538 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027539 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27540 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27541 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27542 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27543 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27544 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27545 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27546 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27547 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27548 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27549 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27550 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27551 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27552 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27553 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27554 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27555 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27556 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27557 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27558 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27559 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27560 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27561 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27562 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27563 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27564 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27565 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27566 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27567 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27568 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27569 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27570 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27571 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27572 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27573 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27574 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27575 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27576 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27577 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27578 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27579 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27580 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27581 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27582 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27583 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27584 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27585 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27586 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27587 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27588 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27589 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27590 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27591 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27592 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27593 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27594 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27595 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27596 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27597 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27598 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27599 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27600 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27601 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27602 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27603 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27604 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027605 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027606 .np = 3,
27607 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027608 },
Herbert Xuda7f0332008-07-31 17:08:25 +080027609};
27610
27611static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
27612 {
27613 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
27614 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
27615 .klen = 16,
27616 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
27617 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
27618 .input = "Single block msg",
27619 .ilen = 16,
27620 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
27621 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
27622 .rlen = 16,
27623 }, {
27624 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
27625 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
27626 .klen = 16,
27627 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
27628 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
27629 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
27630 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27631 "\x10\x11\x12\x13\x14\x15\x16\x17"
27632 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
27633 .ilen = 32,
27634 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
27635 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
27636 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
27637 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
27638 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027639 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027640 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27641 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27642 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27643 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27644 .klen = 32,
27645 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27646 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27647 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27648 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27649 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27650 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27651 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027652 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27653 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27654 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27655 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27656 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27657 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27658 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27659 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27660 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27661 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27662 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27663 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27664 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27665 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27666 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27667 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27668 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27669 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27670 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27671 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27672 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27673 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27674 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27675 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27676 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27677 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27678 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27679 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27680 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27681 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27682 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27683 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27684 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27685 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27686 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27687 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27688 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27689 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27690 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27691 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27692 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27693 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27694 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27695 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27696 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27697 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27698 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27699 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27700 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27701 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27702 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27703 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27704 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27705 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27706 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27707 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027708 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27709 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27710 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27711 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27712 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27713 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27714 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27715 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27716 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27717 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27718 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27719 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27720 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27721 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27722 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27723 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27724 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27725 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27726 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27727 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27728 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27729 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27730 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27731 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27732 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27733 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27734 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27735 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27736 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27737 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27738 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27739 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27740 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27741 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27742 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27743 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27744 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27745 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27746 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27747 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27748 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27749 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27750 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27751 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27752 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27753 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27754 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27755 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27756 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27757 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27758 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27759 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27760 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27761 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27762 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27763 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27764 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27765 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27766 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27767 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27768 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27769 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27770 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27771 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27772 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27773 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027774 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
27775 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
27776 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
27777 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
27778 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027779 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
27780 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
27781 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
27782 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
27783 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
27784 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
27785 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
27786 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
27787 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
27788 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
27789 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
27790 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
27791 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
27792 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
27793 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
27794 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
27795 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
27796 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
27797 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
27798 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
27799 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
27800 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
27801 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
27802 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
27803 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
27804 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
27805 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
27806 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
27807 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
27808 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
27809 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
27810 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
27811 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
27812 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
27813 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
27814 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
27815 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
27816 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
27817 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
27818 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
27819 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
27820 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
27821 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
27822 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
27823 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
27824 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
27825 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
27826 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
27827 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
27828 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
27829 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
27830 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
27831 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
27832 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
27833 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
27834 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027835 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
27836 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
27837 "\x21\x41\x56\x72\x13\xE1\x86\x07"
27838 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
27839 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
27840 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
27841 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
27842 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
27843 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
27844 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
27845 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
27846 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
27847 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
27848 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
27849 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
27850 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
27851 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
27852 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
27853 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
27854 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
27855 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
27856 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
27857 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
27858 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
27859 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
27860 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
27861 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
27862 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
27863 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
27864 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
27865 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
27866 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
27867 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
27868 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
27869 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
27870 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
27871 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
27872 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
27873 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
27874 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
27875 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
27876 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
27877 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
27878 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
27879 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
27880 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
27881 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
27882 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
27883 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
27884 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
27885 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
27886 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
27887 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
27888 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
27889 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
27890 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
27891 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
27892 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
27893 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
27894 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
27895 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
27896 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
27897 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
27898 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
27899 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
27900 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027901 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027902 .np = 3,
27903 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027904 },
Herbert Xuda7f0332008-07-31 17:08:25 +080027905};
27906
27907static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
27908 {
27909 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
27910 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
27911 .klen = 16,
27912 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
27913 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
27914 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
27915 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
27916 .ilen = 16,
27917 .result = "Single block msg",
27918 .rlen = 16,
27919 }, {
27920 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
27921 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
27922 .klen = 16,
27923 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
27924 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
27925 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
27926 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
27927 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
27928 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
27929 .ilen = 32,
27930 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
27931 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27932 "\x10\x11\x12\x13\x14\x15\x16\x17"
27933 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
27934 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027935 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027936 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27937 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27938 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27939 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27940 .klen = 32,
27941 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27942 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27943 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
27944 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
27945 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
27946 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
27947 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027948 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
27949 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
27950 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
27951 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
27952 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
27953 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
27954 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
27955 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
27956 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
27957 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
27958 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
27959 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
27960 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
27961 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
27962 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
27963 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
27964 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
27965 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
27966 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
27967 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
27968 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
27969 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
27970 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
27971 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
27972 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
27973 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
27974 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
27975 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
27976 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
27977 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
27978 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
27979 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
27980 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
27981 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
27982 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
27983 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
27984 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
27985 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
27986 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
27987 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
27988 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
27989 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
27990 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
27991 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
27992 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
27993 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
27994 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
27995 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
27996 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
27997 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
27998 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
27999 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
28000 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
28001 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
28002 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
28003 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028004 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
28005 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
28006 "\x21\x41\x56\x72\x13\xE1\x86\x07"
28007 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
28008 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
28009 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
28010 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
28011 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
28012 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
28013 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
28014 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
28015 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
28016 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
28017 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
28018 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
28019 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
28020 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
28021 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
28022 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
28023 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
28024 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
28025 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
28026 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
28027 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
28028 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
28029 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
28030 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
28031 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
28032 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
28033 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
28034 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
28035 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
28036 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
28037 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
28038 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
28039 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
28040 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
28041 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
28042 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
28043 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
28044 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
28045 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
28046 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
28047 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
28048 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
28049 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
28050 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
28051 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
28052 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
28053 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
28054 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
28055 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
28056 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
28057 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
28058 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
28059 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
28060 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
28061 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
28062 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
28063 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
28064 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
28065 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
28066 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
28067 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
28068 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
28069 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028070 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28071 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28072 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28073 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28074 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028075 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28076 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28077 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28078 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28079 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28080 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28081 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28082 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28083 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28084 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28085 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28086 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28087 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28088 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28089 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28090 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28091 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28092 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28093 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28094 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28095 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28096 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28097 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28098 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28099 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28100 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28101 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28102 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28103 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28104 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28105 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28106 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28107 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28108 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28109 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28110 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28111 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28112 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28113 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28114 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28115 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28116 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28117 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28118 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28119 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28120 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28121 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28122 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28123 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28124 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28125 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28126 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28127 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28128 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28129 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28130 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028131 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
28132 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28133 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28134 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28135 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28136 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28137 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28138 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28139 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28140 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28141 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28142 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28143 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28144 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28145 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28146 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28147 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28148 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28149 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28150 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28151 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28152 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28153 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28154 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28155 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28156 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28157 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28158 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28159 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28160 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28161 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28162 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28163 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28164 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28165 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28166 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
28167 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
28168 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
28169 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
28170 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
28171 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28172 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28173 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28174 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28175 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28176 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28177 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28178 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28179 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28180 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28181 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28182 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28183 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28184 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28185 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28186 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28187 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28188 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28189 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28190 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28191 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28192 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28193 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28194 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28195 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
28196 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028197 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028198 .np = 3,
28199 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028200 },
28201};
28202
28203static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
28204 { /* Generated with Crypto++ */
28205 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28206 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28207 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28208 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28209 .klen = 32,
28210 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
28211 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
28212 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28213 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28214 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28215 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28216 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028217 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28218 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28219 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28220 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28221 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28222 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28223 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28224 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28225 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28226 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28227 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28228 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28229 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28230 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28231 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28232 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28233 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28234 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28235 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28236 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28237 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28238 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28239 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28240 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28241 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28242 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28243 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28244 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28245 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28246 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28247 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28248 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28249 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28250 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28251 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28252 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28253 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28254 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28255 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28256 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28257 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28258 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28259 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28260 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28261 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28262 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28263 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28264 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28265 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28266 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28267 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28268 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28269 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28270 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28271 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28272 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28273 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
28274 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028275 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28276 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28277 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28278 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28279 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028280 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
28281 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28282 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28283 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28284 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28285 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28286 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28287 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28288 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28289 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28290 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28291 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28292 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28293 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28294 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28295 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28296 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28297 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28298 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28299 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28300 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28301 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28302 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28303 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28304 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28305 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28306 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28307 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28308 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28309 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28310 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28311 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28312 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28313 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28314 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28315 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28316 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28317 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28318 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28319 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28320 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28321 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28322 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28323 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28324 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28325 "\x76\x44\x45\xF3\x24\x11\x57\x98"
28326 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28327 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28328 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28329 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28330 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28331 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28332 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28333 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28334 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28335 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28336 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
28337 .rlen = 496,
28338 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020028339 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28340 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28341 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28342 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28343 .klen = 32,
28344 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
28345 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
28346 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28347 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28348 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28349 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28350 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28351 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028352 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28353 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28354 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28355 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28356 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28357 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28358 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28359 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28360 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28361 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28362 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28363 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28364 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28365 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28366 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28367 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28368 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28369 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28370 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28371 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28372 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28373 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28374 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28375 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28376 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28377 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28378 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28379 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28380 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28381 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28382 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28383 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28384 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28385 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28386 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28387 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28388 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28389 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28390 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28391 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28392 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28393 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28394 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28395 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28396 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28397 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28398 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28399 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28400 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28401 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28402 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28403 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28404 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28405 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28406 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28407 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028408 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28409 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28410 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28411 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28412 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28413 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28414 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28415 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28416 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28417 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28418 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28419 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28420 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28421 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28422 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28423 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28424 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28425 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28426 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28427 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28428 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28429 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28430 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28431 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28432 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28433 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28434 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28435 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28436 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28437 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28438 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28439 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28440 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28441 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28442 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
28443 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
28444 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
28445 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
28446 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
28447 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28448 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28449 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28450 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28451 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28452 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28453 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28454 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28455 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28456 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28457 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28458 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28459 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28460 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28461 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28462 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28463 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28464 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28465 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28466 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28467 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28468 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28469 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28470 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28471 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
28472 "\xE4\x7B\x12",
28473 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028474 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28475 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28476 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28477 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28478 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
28479 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028480 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28481 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28482 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28483 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28484 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28485 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28486 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28487 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28488 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28489 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28490 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28491 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28492 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28493 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28494 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28495 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28496 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28497 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28498 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28499 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28500 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28501 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28502 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28503 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28504 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28505 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28506 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28507 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28508 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28509 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28510 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28511 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28512 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28513 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28514 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28515 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28516 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28517 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28518 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28519 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28520 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28521 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28522 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28523 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28524 "\x76\x44\x45\xF3\x24\x11\x57\x98"
28525 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28526 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28527 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28528 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28529 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28530 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28531 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28532 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28533 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28534 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28535 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028536 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
28537 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
28538 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
28539 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
28540 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
28541 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
28542 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
28543 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
28544 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
28545 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
28546 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
28547 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
28548 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
28549 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
28550 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
28551 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
28552 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
28553 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
28554 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
28555 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
28556 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
28557 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
28558 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
28559 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
28560 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
28561 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
28562 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
28563 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
28564 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
28565 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
28566 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
28567 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
28568 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
28569 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
28570 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
28571 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
28572 "\x00\x70\x12\x56\x56\x50\xAD\x14"
28573 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
28574 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
28575 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
28576 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
28577 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
28578 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
28579 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
28580 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
28581 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
28582 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
28583 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
28584 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
28585 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
28586 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
28587 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
28588 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
28589 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
28590 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
28591 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
28592 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
28593 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
28594 "\x74\x28\x9D\x05\x30\x20\x62\x41"
28595 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
28596 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
28597 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
28598 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
28599 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
28600 "\xF1\x6B\xD9",
28601 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028602 .also_non_np = 1,
28603 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028604 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030028605 }, { /* Generated with Crypto++ */
28606 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28607 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28608 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28609 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28610 .klen = 32,
28611 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
28612 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
28613 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28614 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28615 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28616 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28617 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28618 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28619 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28620 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28621 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28622 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28623 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28624 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28625 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28626 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28627 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28628 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28629 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28630 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28631 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28632 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28633 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28634 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28635 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28636 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28637 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28638 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28639 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28640 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28641 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28642 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28643 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28644 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28645 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28646 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28647 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28648 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28649 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28650 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28651 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28652 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28653 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28654 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28655 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28656 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28657 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28658 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28659 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28660 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28661 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28662 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28663 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28664 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28665 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28666 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28667 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28668 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28669 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28670 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28671 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28672 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28673 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028674 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
28675 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28676 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28677 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28678 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28679 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28680 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28681 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28682 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28683 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28684 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28685 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28686 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28687 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28688 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28689 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28690 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28691 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28692 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28693 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28694 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28695 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28696 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28697 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28698 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28699 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28700 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28701 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28702 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28703 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28704 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28705 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28706 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28707 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28708 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28709 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
28710 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
28711 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
28712 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
28713 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
28714 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28715 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28716 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28717 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28718 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28719 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28720 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28721 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28722 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28723 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28724 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28725 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28726 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28727 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28728 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28729 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28730 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28731 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28732 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28733 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28734 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28735 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28736 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28737 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28738 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
28739 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030028740 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
28741 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
28742 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
28743 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
28744 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
28745 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
28746 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
28747 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
28748 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
28749 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
28750 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
28751 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
28752 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
28753 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
28754 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
28755 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
28756 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
28757 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
28758 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
28759 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
28760 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
28761 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
28762 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
28763 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
28764 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
28765 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
28766 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
28767 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
28768 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
28769 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
28770 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
28771 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
28772 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
28773 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
28774 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
28775 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
28776 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
28777 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
28778 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
28779 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
28780 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
28781 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
28782 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
28783 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
28784 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
28785 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
28786 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
28787 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
28788 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
28789 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
28790 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
28791 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
28792 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
28793 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
28794 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
28795 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
28796 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
28797 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
28798 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
28799 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
28800 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030028801 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
28802 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
28803 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
28804 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
28805 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
28806 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
28807 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
28808 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
28809 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
28810 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
28811 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
28812 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
28813 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
28814 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
28815 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
28816 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
28817 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
28818 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
28819 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
28820 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
28821 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
28822 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
28823 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
28824 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
28825 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
28826 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
28827 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
28828 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
28829 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
28830 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
28831 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
28832 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
28833 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
28834 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
28835 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
28836 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
28837 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
28838 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
28839 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
28840 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
28841 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
28842 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
28843 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
28844 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
28845 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
28846 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
28847 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
28848 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
28849 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
28850 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
28851 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
28852 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
28853 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
28854 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
28855 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
28856 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
28857 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
28858 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
28859 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
28860 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
28861 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
28862 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
28863 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
28864 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
28865 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
28866 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028867 },
28868};
28869
28870static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
28871 { /* Generated with Crypto++ */
28872 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28873 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28874 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28875 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28876 .klen = 32,
28877 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
28878 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
28879 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28880 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28881 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28882 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28883 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028884 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
28885 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28886 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28887 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28888 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28889 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28890 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28891 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28892 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28893 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28894 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28895 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28896 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28897 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28898 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28899 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28900 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28901 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28902 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28903 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28904 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28905 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28906 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28907 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28908 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28909 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28910 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28911 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28912 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28913 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28914 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28915 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28916 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28917 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28918 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28919 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28920 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28921 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28922 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28923 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28924 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28925 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28926 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28927 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28928 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28929 "\x76\x44\x45\xF3\x24\x11\x57\x98"
28930 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28931 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28932 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28933 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28934 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28935 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28936 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28937 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28938 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28939 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28940 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
28941 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020028942 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28943 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28944 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28945 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28946 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030028947 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28948 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28949 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28950 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28951 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28952 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28953 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28954 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28955 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28956 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28957 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28958 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28959 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28960 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28961 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28962 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28963 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28964 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28965 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28966 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28967 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28968 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28969 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28970 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28971 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28972 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28973 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28974 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28975 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28976 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28977 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28978 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28979 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28980 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28981 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28982 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28983 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28984 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28985 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28986 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28987 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28988 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28989 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28990 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28991 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28992 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28993 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28994 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28995 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28996 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28997 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28998 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28999 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
29000 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
29001 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
29002 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
29003 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
29004 .rlen = 496,
29005 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020029006 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
29007 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
29008 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
29009 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
29010 .klen = 32,
29011 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
29012 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
29013 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
29014 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
29015 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
29016 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
29017 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
29018 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030029019 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
29020 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
29021 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
29022 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
29023 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
29024 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
29025 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
29026 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
29027 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
29028 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
29029 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
29030 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
29031 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
29032 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
29033 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
29034 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
29035 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
29036 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
29037 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
29038 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
29039 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
29040 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
29041 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
29042 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
29043 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
29044 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
29045 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
29046 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
29047 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
29048 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
29049 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
29050 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
29051 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
29052 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
29053 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
29054 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
29055 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
29056 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
29057 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
29058 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
29059 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
29060 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
29061 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
29062 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
29063 "\x76\x44\x45\xF3\x24\x11\x57\x98"
29064 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
29065 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
29066 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
29067 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
29068 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
29069 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
29070 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
29071 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
29072 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
29073 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
29074 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030029075 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
29076 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
29077 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
29078 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
29079 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
29080 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
29081 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
29082 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
29083 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
29084 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
29085 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
29086 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
29087 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
29088 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
29089 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
29090 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
29091 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
29092 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
29093 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
29094 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
29095 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
29096 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
29097 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
29098 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
29099 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
29100 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
29101 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
29102 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
29103 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
29104 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
29105 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
29106 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
29107 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
29108 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
29109 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
29110 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
29111 "\x00\x70\x12\x56\x56\x50\xAD\x14"
29112 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
29113 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
29114 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
29115 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
29116 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
29117 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
29118 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
29119 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
29120 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
29121 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
29122 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
29123 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
29124 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
29125 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
29126 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
29127 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
29128 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
29129 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
29130 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
29131 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
29132 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
29133 "\x74\x28\x9D\x05\x30\x20\x62\x41"
29134 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
29135 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
29136 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
29137 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
29138 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
29139 "\xF1\x6B\xD9",
29140 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020029141 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
29142 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
29143 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
29144 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
29145 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
29146 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030029147 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
29148 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
29149 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
29150 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
29151 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
29152 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
29153 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
29154 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
29155 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
29156 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
29157 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
29158 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
29159 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
29160 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
29161 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
29162 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
29163 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
29164 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
29165 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
29166 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
29167 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
29168 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
29169 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
29170 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
29171 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
29172 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
29173 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
29174 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
29175 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
29176 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
29177 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
29178 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
29179 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
29180 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
29181 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
29182 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
29183 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
29184 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
29185 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
29186 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
29187 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
29188 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
29189 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
29190 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
29191 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
29192 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
29193 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
29194 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
29195 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
29196 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
29197 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
29198 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
29199 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
29200 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
29201 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
29202 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030029203 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
29204 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
29205 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
29206 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
29207 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
29208 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
29209 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
29210 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
29211 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
29212 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
29213 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
29214 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
29215 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
29216 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
29217 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
29218 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
29219 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
29220 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
29221 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
29222 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
29223 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
29224 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
29225 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
29226 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
29227 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
29228 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
29229 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
29230 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
29231 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
29232 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
29233 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
29234 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
29235 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
29236 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
29237 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
29238 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
29239 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
29240 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
29241 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
29242 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
29243 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
29244 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
29245 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
29246 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
29247 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
29248 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
29249 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
29250 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
29251 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
29252 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
29253 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
29254 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
29255 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
29256 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
29257 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
29258 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
29259 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
29260 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
29261 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
29262 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
29263 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
29264 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
29265 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
29266 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
29267 "\xE4\x7B\x12",
29268 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030029269 .also_non_np = 1,
29270 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030029271 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030029272 }, { /* Generated with Crypto++ */
29273 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
29274 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
29275 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
29276 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
29277 .klen = 32,
29278 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
29279 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
29280 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
29281 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
29282 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
29283 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
29284 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
29285 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
29286 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
29287 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
29288 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
29289 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
29290 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
29291 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
29292 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
29293 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
29294 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
29295 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
29296 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
29297 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
29298 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
29299 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
29300 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
29301 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
29302 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
29303 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
29304 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
29305 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
29306 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
29307 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
29308 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
29309 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
29310 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
29311 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
29312 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
29313 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
29314 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
29315 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
29316 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
29317 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
29318 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
29319 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
29320 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
29321 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
29322 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
29323 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
29324 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
29325 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
29326 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
29327 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
29328 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
29329 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
29330 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
29331 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
29332 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
29333 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
29334 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
29335 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
29336 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
29337 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
29338 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
29339 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
29340 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030029341 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
29342 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
29343 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
29344 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
29345 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
29346 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
29347 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
29348 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
29349 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
29350 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
29351 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
29352 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
29353 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
29354 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
29355 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
29356 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
29357 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
29358 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
29359 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
29360 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
29361 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
29362 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
29363 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
29364 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
29365 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
29366 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
29367 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
29368 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
29369 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
29370 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
29371 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
29372 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
29373 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
29374 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
29375 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
29376 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
29377 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
29378 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
29379 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
29380 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
29381 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
29382 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
29383 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
29384 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
29385 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
29386 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
29387 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
29388 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
29389 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
29390 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
29391 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
29392 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
29393 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
29394 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
29395 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
29396 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
29397 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
29398 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
29399 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
29400 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
29401 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
29402 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
29403 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
29404 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
29405 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
29406 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030029407 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
29408 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
29409 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
29410 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
29411 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
29412 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
29413 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
29414 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
29415 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
29416 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
29417 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
29418 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
29419 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
29420 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
29421 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
29422 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
29423 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
29424 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
29425 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
29426 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
29427 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
29428 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
29429 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
29430 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
29431 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
29432 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
29433 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
29434 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
29435 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
29436 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
29437 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
29438 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
29439 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
29440 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
29441 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
29442 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
29443 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
29444 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
29445 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
29446 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
29447 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
29448 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
29449 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
29450 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
29451 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
29452 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
29453 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
29454 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
29455 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
29456 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
29457 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
29458 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
29459 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
29460 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
29461 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
29462 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
29463 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
29464 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
29465 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
29466 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
29467 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030029468 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
29469 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
29470 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
29471 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
29472 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
29473 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
29474 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
29475 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
29476 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
29477 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
29478 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
29479 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
29480 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
29481 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
29482 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
29483 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
29484 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
29485 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
29486 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
29487 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
29488 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
29489 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
29490 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
29491 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
29492 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
29493 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
29494 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
29495 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
29496 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
29497 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
29498 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
29499 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
29500 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
29501 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
29502 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
29503 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
29504 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
29505 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
29506 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
29507 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
29508 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
29509 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
29510 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
29511 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
29512 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
29513 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
29514 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
29515 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
29516 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
29517 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
29518 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
29519 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
29520 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
29521 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
29522 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
29523 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
29524 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
29525 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
29526 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
29527 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
29528 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
29529 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
29530 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
29531 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
29532 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
29533 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020029534 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020029535};
29536
29537static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
29538 /* Generated from AES-LRW test vectors */
29539 {
29540 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
29541 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
29542 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
29543 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
29544 .klen = 32,
29545 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29546 "\x00\x00\x00\x00\x00\x00\x00\x01",
29547 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29548 "\x38\x39\x41\x42\x43\x44\x45\x46",
29549 .ilen = 16,
29550 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
29551 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
29552 .rlen = 16,
29553 }, {
29554 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
29555 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
29556 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
29557 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
29558 .klen = 32,
29559 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29560 "\x00\x00\x00\x00\x00\x00\x00\x02",
29561 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29562 "\x38\x39\x41\x42\x43\x44\x45\x46",
29563 .ilen = 16,
29564 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
29565 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
29566 .rlen = 16,
29567 }, {
29568 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
29569 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
29570 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
29571 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
29572 .klen = 32,
29573 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29574 "\x00\x00\x00\x02\x00\x00\x00\x00",
29575 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29576 "\x38\x39\x41\x42\x43\x44\x45\x46",
29577 .ilen = 16,
29578 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
29579 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
29580 .rlen = 16,
29581 }, {
29582 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
29583 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
29584 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
29585 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
29586 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
29587 .klen = 40,
29588 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29589 "\x00\x00\x00\x00\x00\x00\x00\x01",
29590 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29591 "\x38\x39\x41\x42\x43\x44\x45\x46",
29592 .ilen = 16,
29593 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
29594 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
29595 .rlen = 16,
29596 }, {
29597 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
29598 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
29599 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
29600 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
29601 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
29602 .klen = 40,
29603 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29604 "\x00\x00\x00\x02\x00\x00\x00\x00",
29605 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29606 "\x38\x39\x41\x42\x43\x44\x45\x46",
29607 .ilen = 16,
29608 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
29609 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
29610 .rlen = 16,
29611 }, {
29612 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29613 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29614 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29615 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29616 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29617 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29618 .klen = 48,
29619 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29620 "\x00\x00\x00\x00\x00\x00\x00\x01",
29621 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29622 "\x38\x39\x41\x42\x43\x44\x45\x46",
29623 .ilen = 16,
29624 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
29625 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
29626 .rlen = 16,
29627 }, {
29628 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
29629 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
29630 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
29631 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
29632 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
29633 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
29634 .klen = 48,
29635 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29636 "\x00\x00\x00\x02\x00\x00\x00\x00",
29637 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
29638 "\x38\x39\x41\x42\x43\x44\x45\x46",
29639 .ilen = 16,
29640 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
29641 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
29642 .rlen = 16,
29643 }, {
29644 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29645 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29646 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29647 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29648 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29649 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29650 .klen = 48,
29651 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29652 "\x00\x00\x00\x00\x00\x00\x00\x01",
29653 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
29654 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
29655 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
29656 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
29657 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
29658 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
29659 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
29660 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
29661 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
29662 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
29663 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
29664 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
29665 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
29666 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
29667 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
29668 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
29669 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
29670 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
29671 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
29672 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
29673 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
29674 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
29675 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
29676 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
29677 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
29678 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
29679 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
29680 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
29681 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
29682 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
29683 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
29684 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
29685 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
29686 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
29687 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
29688 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
29689 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
29690 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
29691 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
29692 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
29693 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
29694 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
29695 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
29696 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
29697 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
29698 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
29699 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
29700 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
29701 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
29702 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
29703 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
29704 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
29705 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
29706 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
29707 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
29708 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
29709 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
29710 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
29711 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
29712 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
29713 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
29714 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
29715 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
29716 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
29717 .ilen = 512,
29718 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
29719 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
29720 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
29721 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
29722 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
29723 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
29724 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
29725 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
29726 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
29727 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
29728 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
29729 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
29730 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
29731 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
29732 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
29733 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
29734 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
29735 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
29736 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
29737 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
29738 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
29739 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
29740 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
29741 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
29742 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
29743 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
29744 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
29745 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
29746 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
29747 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
29748 "\xed\x14\xa9\x57\x19\x63\x40\x04"
29749 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
29750 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
29751 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
29752 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
29753 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
29754 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
29755 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
29756 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
29757 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
29758 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
29759 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
29760 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
29761 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
29762 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
29763 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
29764 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
29765 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
29766 "\x35\xa5\x83\x04\x84\x01\x99\x56"
29767 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
29768 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
29769 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
29770 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
29771 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
29772 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
29773 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
29774 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
29775 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
29776 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
29777 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
29778 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
29779 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
29780 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
29781 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
29782 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030029783 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020029784 .np = 3,
29785 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020029786 },
29787};
29788
29789static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
29790 /* Generated from AES-LRW test vectors */
29791 /* same as enc vectors with input and result reversed */
29792 {
29793 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
29794 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
29795 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
29796 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
29797 .klen = 32,
29798 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29799 "\x00\x00\x00\x00\x00\x00\x00\x01",
29800 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
29801 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
29802 .ilen = 16,
29803 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29804 "\x38\x39\x41\x42\x43\x44\x45\x46",
29805 .rlen = 16,
29806 }, {
29807 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
29808 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
29809 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
29810 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
29811 .klen = 32,
29812 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29813 "\x00\x00\x00\x00\x00\x00\x00\x02",
29814 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
29815 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
29816 .ilen = 16,
29817 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29818 "\x38\x39\x41\x42\x43\x44\x45\x46",
29819 .rlen = 16,
29820 }, {
29821 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
29822 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
29823 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
29824 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
29825 .klen = 32,
29826 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29827 "\x00\x00\x00\x02\x00\x00\x00\x00",
29828 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
29829 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
29830 .ilen = 16,
29831 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29832 "\x38\x39\x41\x42\x43\x44\x45\x46",
29833 .rlen = 16,
29834 }, {
29835 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
29836 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
29837 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
29838 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
29839 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
29840 .klen = 40,
29841 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29842 "\x00\x00\x00\x00\x00\x00\x00\x01",
29843 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
29844 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
29845 .ilen = 16,
29846 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29847 "\x38\x39\x41\x42\x43\x44\x45\x46",
29848 .rlen = 16,
29849 }, {
29850 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
29851 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
29852 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
29853 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
29854 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
29855 .klen = 40,
29856 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29857 "\x00\x00\x00\x02\x00\x00\x00\x00",
29858 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
29859 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
29860 .ilen = 16,
29861 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29862 "\x38\x39\x41\x42\x43\x44\x45\x46",
29863 .rlen = 16,
29864 }, {
29865 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29866 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29867 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29868 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29869 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29870 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29871 .klen = 48,
29872 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29873 "\x00\x00\x00\x00\x00\x00\x00\x01",
29874 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
29875 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
29876 .ilen = 16,
29877 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29878 "\x38\x39\x41\x42\x43\x44\x45\x46",
29879 .rlen = 16,
29880 }, {
29881 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
29882 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
29883 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
29884 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
29885 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
29886 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
29887 .klen = 48,
29888 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29889 "\x00\x00\x00\x02\x00\x00\x00\x00",
29890 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
29891 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
29892 .ilen = 16,
29893 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29894 "\x38\x39\x41\x42\x43\x44\x45\x46",
29895 .rlen = 16,
29896 }, {
29897 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29898 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29899 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29900 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29901 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29902 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29903 .klen = 48,
29904 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29905 "\x00\x00\x00\x00\x00\x00\x00\x01",
29906 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
29907 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
29908 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
29909 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
29910 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
29911 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
29912 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
29913 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
29914 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
29915 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
29916 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
29917 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
29918 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
29919 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
29920 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
29921 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
29922 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
29923 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
29924 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
29925 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
29926 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
29927 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
29928 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
29929 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
29930 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
29931 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
29932 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
29933 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
29934 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
29935 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
29936 "\xed\x14\xa9\x57\x19\x63\x40\x04"
29937 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
29938 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
29939 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
29940 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
29941 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
29942 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
29943 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
29944 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
29945 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
29946 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
29947 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
29948 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
29949 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
29950 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
29951 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
29952 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
29953 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
29954 "\x35\xa5\x83\x04\x84\x01\x99\x56"
29955 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
29956 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
29957 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
29958 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
29959 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
29960 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
29961 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
29962 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
29963 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
29964 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
29965 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
29966 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
29967 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
29968 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
29969 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
29970 .ilen = 512,
29971 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
29972 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
29973 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
29974 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
29975 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
29976 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
29977 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
29978 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
29979 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
29980 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
29981 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
29982 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
29983 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
29984 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
29985 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
29986 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
29987 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
29988 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
29989 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
29990 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
29991 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
29992 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
29993 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
29994 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
29995 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
29996 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
29997 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
29998 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
29999 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
30000 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
30001 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
30002 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
30003 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
30004 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
30005 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
30006 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
30007 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
30008 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
30009 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
30010 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
30011 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
30012 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
30013 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
30014 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
30015 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
30016 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
30017 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
30018 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
30019 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
30020 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
30021 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
30022 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
30023 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
30024 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
30025 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
30026 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
30027 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
30028 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
30029 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
30030 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
30031 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
30032 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
30033 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
30034 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
30035 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030030036 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020030037 .np = 3,
30038 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020030039 },
30040};
30041
30042static struct cipher_testvec camellia_xts_enc_tv_template[] = {
30043 /* Generated from AES-XTS test vectors */
30044 {
30045 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30046 "\x00\x00\x00\x00\x00\x00\x00\x00"
30047 "\x00\x00\x00\x00\x00\x00\x00\x00"
30048 "\x00\x00\x00\x00\x00\x00\x00\x00",
30049 .klen = 32,
30050 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30051 "\x00\x00\x00\x00\x00\x00\x00\x00",
30052 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30053 "\x00\x00\x00\x00\x00\x00\x00\x00"
30054 "\x00\x00\x00\x00\x00\x00\x00\x00"
30055 "\x00\x00\x00\x00\x00\x00\x00\x00",
30056 .ilen = 32,
30057 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
30058 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
30059 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
30060 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
30061 .rlen = 32,
30062 }, {
30063 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
30064 "\x11\x11\x11\x11\x11\x11\x11\x11"
30065 "\x22\x22\x22\x22\x22\x22\x22\x22"
30066 "\x22\x22\x22\x22\x22\x22\x22\x22",
30067 .klen = 32,
30068 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
30069 "\x00\x00\x00\x00\x00\x00\x00\x00",
30070 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
30071 "\x44\x44\x44\x44\x44\x44\x44\x44"
30072 "\x44\x44\x44\x44\x44\x44\x44\x44"
30073 "\x44\x44\x44\x44\x44\x44\x44\x44",
30074 .ilen = 32,
30075 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
30076 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
30077 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
30078 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
30079 .rlen = 32,
30080 }, {
30081 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
30082 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
30083 "\x22\x22\x22\x22\x22\x22\x22\x22"
30084 "\x22\x22\x22\x22\x22\x22\x22\x22",
30085 .klen = 32,
30086 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
30087 "\x00\x00\x00\x00\x00\x00\x00\x00",
30088 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
30089 "\x44\x44\x44\x44\x44\x44\x44\x44"
30090 "\x44\x44\x44\x44\x44\x44\x44\x44"
30091 "\x44\x44\x44\x44\x44\x44\x44\x44",
30092 .ilen = 32,
30093 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
30094 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
30095 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
30096 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
30097 .rlen = 32,
30098 }, {
30099 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
30100 "\x23\x53\x60\x28\x74\x71\x35\x26"
30101 "\x31\x41\x59\x26\x53\x58\x97\x93"
30102 "\x23\x84\x62\x64\x33\x83\x27\x95",
30103 .klen = 32,
30104 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30105 "\x00\x00\x00\x00\x00\x00\x00\x00",
30106 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
30107 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30108 "\x10\x11\x12\x13\x14\x15\x16\x17"
30109 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30110 "\x20\x21\x22\x23\x24\x25\x26\x27"
30111 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30112 "\x30\x31\x32\x33\x34\x35\x36\x37"
30113 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30114 "\x40\x41\x42\x43\x44\x45\x46\x47"
30115 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30116 "\x50\x51\x52\x53\x54\x55\x56\x57"
30117 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30118 "\x60\x61\x62\x63\x64\x65\x66\x67"
30119 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30120 "\x70\x71\x72\x73\x74\x75\x76\x77"
30121 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30122 "\x80\x81\x82\x83\x84\x85\x86\x87"
30123 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30124 "\x90\x91\x92\x93\x94\x95\x96\x97"
30125 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30126 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30127 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30128 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30129 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30130 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30131 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30132 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30133 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30134 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30135 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30136 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30137 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30138 "\x00\x01\x02\x03\x04\x05\x06\x07"
30139 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30140 "\x10\x11\x12\x13\x14\x15\x16\x17"
30141 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30142 "\x20\x21\x22\x23\x24\x25\x26\x27"
30143 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30144 "\x30\x31\x32\x33\x34\x35\x36\x37"
30145 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30146 "\x40\x41\x42\x43\x44\x45\x46\x47"
30147 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30148 "\x50\x51\x52\x53\x54\x55\x56\x57"
30149 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30150 "\x60\x61\x62\x63\x64\x65\x66\x67"
30151 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30152 "\x70\x71\x72\x73\x74\x75\x76\x77"
30153 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30154 "\x80\x81\x82\x83\x84\x85\x86\x87"
30155 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30156 "\x90\x91\x92\x93\x94\x95\x96\x97"
30157 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30158 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30159 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30160 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30161 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30162 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30163 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30164 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30165 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30166 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30167 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30168 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30169 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
30170 .ilen = 512,
30171 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
30172 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
30173 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
30174 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
30175 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
30176 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
30177 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
30178 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
30179 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
30180 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
30181 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
30182 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
30183 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
30184 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
30185 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
30186 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
30187 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
30188 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
30189 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
30190 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
30191 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
30192 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
30193 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
30194 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
30195 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
30196 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
30197 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
30198 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
30199 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
30200 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
30201 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
30202 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
30203 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
30204 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
30205 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
30206 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
30207 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
30208 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
30209 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
30210 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
30211 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
30212 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
30213 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
30214 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
30215 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
30216 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
30217 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
30218 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
30219 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
30220 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
30221 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
30222 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
30223 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
30224 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
30225 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
30226 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
30227 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
30228 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
30229 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
30230 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
30231 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
30232 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
30233 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
30234 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
30235 .rlen = 512,
30236 }, {
30237 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
30238 "\x23\x53\x60\x28\x74\x71\x35\x26"
30239 "\x62\x49\x77\x57\x24\x70\x93\x69"
30240 "\x99\x59\x57\x49\x66\x96\x76\x27"
30241 "\x31\x41\x59\x26\x53\x58\x97\x93"
30242 "\x23\x84\x62\x64\x33\x83\x27\x95"
30243 "\x02\x88\x41\x97\x16\x93\x99\x37"
30244 "\x51\x05\x82\x09\x74\x94\x45\x92",
30245 .klen = 64,
30246 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
30247 "\x00\x00\x00\x00\x00\x00\x00\x00",
30248 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
30249 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30250 "\x10\x11\x12\x13\x14\x15\x16\x17"
30251 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30252 "\x20\x21\x22\x23\x24\x25\x26\x27"
30253 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30254 "\x30\x31\x32\x33\x34\x35\x36\x37"
30255 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30256 "\x40\x41\x42\x43\x44\x45\x46\x47"
30257 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30258 "\x50\x51\x52\x53\x54\x55\x56\x57"
30259 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30260 "\x60\x61\x62\x63\x64\x65\x66\x67"
30261 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30262 "\x70\x71\x72\x73\x74\x75\x76\x77"
30263 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30264 "\x80\x81\x82\x83\x84\x85\x86\x87"
30265 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30266 "\x90\x91\x92\x93\x94\x95\x96\x97"
30267 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30268 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30269 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30270 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30271 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30272 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30273 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30274 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30275 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30276 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30277 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30278 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30279 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30280 "\x00\x01\x02\x03\x04\x05\x06\x07"
30281 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30282 "\x10\x11\x12\x13\x14\x15\x16\x17"
30283 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30284 "\x20\x21\x22\x23\x24\x25\x26\x27"
30285 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30286 "\x30\x31\x32\x33\x34\x35\x36\x37"
30287 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30288 "\x40\x41\x42\x43\x44\x45\x46\x47"
30289 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30290 "\x50\x51\x52\x53\x54\x55\x56\x57"
30291 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30292 "\x60\x61\x62\x63\x64\x65\x66\x67"
30293 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30294 "\x70\x71\x72\x73\x74\x75\x76\x77"
30295 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30296 "\x80\x81\x82\x83\x84\x85\x86\x87"
30297 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30298 "\x90\x91\x92\x93\x94\x95\x96\x97"
30299 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30300 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30301 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30302 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30303 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30304 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30305 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30306 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30307 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30308 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30309 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30310 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30311 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
30312 .ilen = 512,
30313 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
30314 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
30315 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
30316 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
30317 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
30318 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
30319 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
30320 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
30321 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
30322 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
30323 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
30324 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
30325 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
30326 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
30327 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
30328 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
30329 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
30330 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
30331 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
30332 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
30333 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
30334 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
30335 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
30336 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
30337 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
30338 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
30339 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
30340 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
30341 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
30342 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
30343 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
30344 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
30345 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
30346 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
30347 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
30348 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
30349 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
30350 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
30351 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
30352 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
30353 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
30354 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
30355 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
30356 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
30357 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
30358 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
30359 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
30360 "\x21\x17\xf8\x59\x15\x24\x64\x22"
30361 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
30362 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
30363 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
30364 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
30365 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
30366 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
30367 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
30368 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
30369 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
30370 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
30371 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
30372 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
30373 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
30374 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
30375 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
30376 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
30377 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030030378 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020030379 .np = 3,
30380 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020030381 },
30382};
30383
30384static struct cipher_testvec camellia_xts_dec_tv_template[] = {
30385 /* Generated from AES-XTS test vectors */
30386 /* same as enc vectors with input and result reversed */
30387 {
30388 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30389 "\x00\x00\x00\x00\x00\x00\x00\x00"
30390 "\x00\x00\x00\x00\x00\x00\x00\x00"
30391 "\x00\x00\x00\x00\x00\x00\x00\x00",
30392 .klen = 32,
30393 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30394 "\x00\x00\x00\x00\x00\x00\x00\x00",
30395 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
30396 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
30397 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
30398 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
30399 .ilen = 32,
30400 .result = "\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 .rlen = 32,
30405 }, {
30406 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
30407 "\x11\x11\x11\x11\x11\x11\x11\x11"
30408 "\x22\x22\x22\x22\x22\x22\x22\x22"
30409 "\x22\x22\x22\x22\x22\x22\x22\x22",
30410 .klen = 32,
30411 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
30412 "\x00\x00\x00\x00\x00\x00\x00\x00",
30413 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
30414 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
30415 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
30416 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
30417 .ilen = 32,
30418 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
30419 "\x44\x44\x44\x44\x44\x44\x44\x44"
30420 "\x44\x44\x44\x44\x44\x44\x44\x44"
30421 "\x44\x44\x44\x44\x44\x44\x44\x44",
30422 .rlen = 32,
30423 }, {
30424 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
30425 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
30426 "\x22\x22\x22\x22\x22\x22\x22\x22"
30427 "\x22\x22\x22\x22\x22\x22\x22\x22",
30428 .klen = 32,
30429 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
30430 "\x00\x00\x00\x00\x00\x00\x00\x00",
30431 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
30432 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
30433 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
30434 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
30435 .ilen = 32,
30436 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
30437 "\x44\x44\x44\x44\x44\x44\x44\x44"
30438 "\x44\x44\x44\x44\x44\x44\x44\x44"
30439 "\x44\x44\x44\x44\x44\x44\x44\x44",
30440 .rlen = 32,
30441 }, {
30442 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
30443 "\x23\x53\x60\x28\x74\x71\x35\x26"
30444 "\x31\x41\x59\x26\x53\x58\x97\x93"
30445 "\x23\x84\x62\x64\x33\x83\x27\x95",
30446 .klen = 32,
30447 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30448 "\x00\x00\x00\x00\x00\x00\x00\x00",
30449 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
30450 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
30451 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
30452 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
30453 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
30454 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
30455 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
30456 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
30457 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
30458 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
30459 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
30460 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
30461 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
30462 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
30463 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
30464 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
30465 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
30466 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
30467 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
30468 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
30469 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
30470 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
30471 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
30472 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
30473 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
30474 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
30475 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
30476 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
30477 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
30478 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
30479 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
30480 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
30481 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
30482 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
30483 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
30484 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
30485 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
30486 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
30487 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
30488 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
30489 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
30490 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
30491 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
30492 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
30493 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
30494 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
30495 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
30496 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
30497 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
30498 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
30499 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
30500 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
30501 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
30502 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
30503 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
30504 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
30505 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
30506 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
30507 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
30508 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
30509 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
30510 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
30511 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
30512 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
30513 .ilen = 512,
30514 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30515 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30516 "\x10\x11\x12\x13\x14\x15\x16\x17"
30517 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30518 "\x20\x21\x22\x23\x24\x25\x26\x27"
30519 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30520 "\x30\x31\x32\x33\x34\x35\x36\x37"
30521 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30522 "\x40\x41\x42\x43\x44\x45\x46\x47"
30523 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30524 "\x50\x51\x52\x53\x54\x55\x56\x57"
30525 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30526 "\x60\x61\x62\x63\x64\x65\x66\x67"
30527 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30528 "\x70\x71\x72\x73\x74\x75\x76\x77"
30529 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30530 "\x80\x81\x82\x83\x84\x85\x86\x87"
30531 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30532 "\x90\x91\x92\x93\x94\x95\x96\x97"
30533 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30534 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30535 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30536 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30537 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30538 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30539 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30540 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30541 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30542 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30543 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30544 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30545 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30546 "\x00\x01\x02\x03\x04\x05\x06\x07"
30547 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30548 "\x10\x11\x12\x13\x14\x15\x16\x17"
30549 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30550 "\x20\x21\x22\x23\x24\x25\x26\x27"
30551 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30552 "\x30\x31\x32\x33\x34\x35\x36\x37"
30553 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30554 "\x40\x41\x42\x43\x44\x45\x46\x47"
30555 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30556 "\x50\x51\x52\x53\x54\x55\x56\x57"
30557 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30558 "\x60\x61\x62\x63\x64\x65\x66\x67"
30559 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30560 "\x70\x71\x72\x73\x74\x75\x76\x77"
30561 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30562 "\x80\x81\x82\x83\x84\x85\x86\x87"
30563 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30564 "\x90\x91\x92\x93\x94\x95\x96\x97"
30565 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30566 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30567 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30568 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30569 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30570 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30571 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30572 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30573 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30574 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30575 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30576 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30577 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
30578 .rlen = 512,
30579 }, {
30580 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
30581 "\x23\x53\x60\x28\x74\x71\x35\x26"
30582 "\x62\x49\x77\x57\x24\x70\x93\x69"
30583 "\x99\x59\x57\x49\x66\x96\x76\x27"
30584 "\x31\x41\x59\x26\x53\x58\x97\x93"
30585 "\x23\x84\x62\x64\x33\x83\x27\x95"
30586 "\x02\x88\x41\x97\x16\x93\x99\x37"
30587 "\x51\x05\x82\x09\x74\x94\x45\x92",
30588 .klen = 64,
30589 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
30590 "\x00\x00\x00\x00\x00\x00\x00\x00",
30591 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
30592 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
30593 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
30594 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
30595 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
30596 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
30597 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
30598 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
30599 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
30600 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
30601 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
30602 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
30603 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
30604 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
30605 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
30606 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
30607 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
30608 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
30609 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
30610 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
30611 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
30612 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
30613 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
30614 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
30615 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
30616 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
30617 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
30618 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
30619 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
30620 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
30621 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
30622 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
30623 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
30624 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
30625 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
30626 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
30627 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
30628 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
30629 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
30630 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
30631 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
30632 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
30633 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
30634 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
30635 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
30636 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
30637 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
30638 "\x21\x17\xf8\x59\x15\x24\x64\x22"
30639 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
30640 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
30641 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
30642 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
30643 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
30644 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
30645 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
30646 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
30647 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
30648 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
30649 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
30650 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
30651 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
30652 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
30653 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
30654 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
30655 .ilen = 512,
30656 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30657 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30658 "\x10\x11\x12\x13\x14\x15\x16\x17"
30659 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30660 "\x20\x21\x22\x23\x24\x25\x26\x27"
30661 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30662 "\x30\x31\x32\x33\x34\x35\x36\x37"
30663 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30664 "\x40\x41\x42\x43\x44\x45\x46\x47"
30665 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30666 "\x50\x51\x52\x53\x54\x55\x56\x57"
30667 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30668 "\x60\x61\x62\x63\x64\x65\x66\x67"
30669 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30670 "\x70\x71\x72\x73\x74\x75\x76\x77"
30671 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30672 "\x80\x81\x82\x83\x84\x85\x86\x87"
30673 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30674 "\x90\x91\x92\x93\x94\x95\x96\x97"
30675 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30676 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30677 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30678 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30679 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30680 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30681 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30682 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30683 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30684 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30685 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30686 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30687 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30688 "\x00\x01\x02\x03\x04\x05\x06\x07"
30689 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30690 "\x10\x11\x12\x13\x14\x15\x16\x17"
30691 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30692 "\x20\x21\x22\x23\x24\x25\x26\x27"
30693 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30694 "\x30\x31\x32\x33\x34\x35\x36\x37"
30695 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30696 "\x40\x41\x42\x43\x44\x45\x46\x47"
30697 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30698 "\x50\x51\x52\x53\x54\x55\x56\x57"
30699 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30700 "\x60\x61\x62\x63\x64\x65\x66\x67"
30701 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30702 "\x70\x71\x72\x73\x74\x75\x76\x77"
30703 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30704 "\x80\x81\x82\x83\x84\x85\x86\x87"
30705 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30706 "\x90\x91\x92\x93\x94\x95\x96\x97"
30707 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30708 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30709 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30710 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30711 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30712 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30713 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30714 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30715 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30716 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30717 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30718 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30719 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
30720 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030030721 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020030722 .np = 3,
30723 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020030724 },
Herbert Xuda7f0332008-07-31 17:08:25 +080030725};
30726
30727/*
30728 * SEED test vectors
30729 */
30730#define SEED_ENC_TEST_VECTORS 4
30731#define SEED_DEC_TEST_VECTORS 4
30732
30733static struct cipher_testvec seed_enc_tv_template[] = {
30734 {
30735 .key = zeroed_string,
30736 .klen = 16,
30737 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
30738 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30739 .ilen = 16,
30740 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
30741 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
30742 .rlen = 16,
30743 }, {
30744 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30745 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30746 .klen = 16,
30747 .input = zeroed_string,
30748 .ilen = 16,
30749 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
30750 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
30751 .rlen = 16,
30752 }, {
30753 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
30754 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
30755 .klen = 16,
30756 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
30757 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
30758 .ilen = 16,
30759 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
30760 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
30761 .rlen = 16,
30762 }, {
30763 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
30764 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
30765 .klen = 16,
30766 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
30767 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
30768 .ilen = 16,
30769 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
30770 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
30771 .rlen = 16,
30772 }
30773};
30774
30775static struct cipher_testvec seed_dec_tv_template[] = {
30776 {
30777 .key = zeroed_string,
30778 .klen = 16,
30779 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
30780 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
30781 .ilen = 16,
30782 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30783 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30784 .rlen = 16,
30785 }, {
30786 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30787 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30788 .klen = 16,
30789 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
30790 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
30791 .ilen = 16,
30792 .result = zeroed_string,
30793 .rlen = 16,
30794 }, {
30795 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
30796 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
30797 .klen = 16,
30798 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
30799 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
30800 .ilen = 16,
30801 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
30802 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
30803 .rlen = 16,
30804 }, {
30805 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
30806 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
30807 .klen = 16,
30808 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
30809 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
30810 .ilen = 16,
30811 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
30812 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
30813 .rlen = 16,
30814 }
30815};
30816
30817#define SALSA20_STREAM_ENC_TEST_VECTORS 5
30818static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
30819 /*
30820 * Testvectors from verified.test-vectors submitted to ECRYPT.
30821 * They are truncated to size 39, 64, 111, 129 to test a variety
30822 * of input length.
30823 */
30824 { /* Set 3, vector 0 */
30825 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30826 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
30827 .klen = 16,
30828 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
30829 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30830 "\x00\x00\x00\x00\x00\x00\x00\x00"
30831 "\x00\x00\x00\x00\x00\x00\x00\x00"
30832 "\x00\x00\x00\x00\x00\x00\x00\x00"
30833 "\x00\x00\x00\x00\x00\x00\x00",
30834 .ilen = 39,
30835 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
30836 "\x68\x02\x41\x0C\x68\x86\x88\x89"
30837 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
30838 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
30839 "\x58\x3F\x52\x79\x70\xEB\xC1",
30840 .rlen = 39,
30841 }, { /* Set 5, vector 0 */
30842 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30843 "\x00\x00\x00\x00\x00\x00\x00\x00",
30844 .klen = 16,
30845 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
30846 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30847 "\x00\x00\x00\x00\x00\x00\x00\x00"
30848 "\x00\x00\x00\x00\x00\x00\x00\x00"
30849 "\x00\x00\x00\x00\x00\x00\x00\x00"
30850 "\x00\x00\x00\x00\x00\x00\x00\x00"
30851 "\x00\x00\x00\x00\x00\x00\x00\x00"
30852 "\x00\x00\x00\x00\x00\x00\x00\x00"
30853 "\x00\x00\x00\x00\x00\x00\x00\x00",
30854 .ilen = 64,
30855 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
30856 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
30857 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
30858 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
30859 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
30860 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
30861 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
30862 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
30863 .rlen = 64,
30864 }, { /* Set 3, vector 27 */
30865 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
30866 "\x23\x24\x25\x26\x27\x28\x29\x2A"
30867 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
30868 "\x33\x34\x35\x36\x37\x38\x39\x3A",
30869 .klen = 32,
30870 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
30871 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30872 "\x00\x00\x00\x00\x00\x00\x00\x00"
30873 "\x00\x00\x00\x00\x00\x00\x00\x00"
30874 "\x00\x00\x00\x00\x00\x00\x00\x00"
30875 "\x00\x00\x00\x00\x00\x00\x00\x00"
30876 "\x00\x00\x00\x00\x00\x00\x00\x00"
30877 "\x00\x00\x00\x00\x00\x00\x00\x00"
30878 "\x00\x00\x00\x00\x00\x00\x00\x00"
30879 "\x00\x00\x00\x00\x00\x00\x00\x00"
30880 "\x00\x00\x00\x00\x00\x00\x00\x00"
30881 "\x00\x00\x00\x00\x00\x00\x00\x00"
30882 "\x00\x00\x00\x00\x00\x00\x00\x00"
30883 "\x00\x00\x00\x00\x00\x00\x00\x00"
30884 "\x00\x00\x00\x00\x00\x00\x00",
30885 .ilen = 111,
30886 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
30887 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
30888 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
30889 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
30890 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
30891 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
30892 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
30893 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
30894 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
30895 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
30896 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
30897 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
30898 "\x95\x46\x45\x54\xE9\x75\x03\x08"
30899 "\x44\xAF\xE5\x8A\x81\x12\x09",
30900 .rlen = 111,
30901 }, { /* Set 5, vector 27 */
30902 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30903 "\x00\x00\x00\x00\x00\x00\x00\x00"
30904 "\x00\x00\x00\x00\x00\x00\x00\x00"
30905 "\x00\x00\x00\x00\x00\x00\x00\x00",
30906 .klen = 32,
30907 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
30908 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30909 "\x00\x00\x00\x00\x00\x00\x00\x00"
30910 "\x00\x00\x00\x00\x00\x00\x00\x00"
30911 "\x00\x00\x00\x00\x00\x00\x00\x00"
30912 "\x00\x00\x00\x00\x00\x00\x00\x00"
30913 "\x00\x00\x00\x00\x00\x00\x00\x00"
30914 "\x00\x00\x00\x00\x00\x00\x00\x00"
30915 "\x00\x00\x00\x00\x00\x00\x00\x00"
30916 "\x00\x00\x00\x00\x00\x00\x00\x00"
30917 "\x00\x00\x00\x00\x00\x00\x00\x00"
30918 "\x00\x00\x00\x00\x00\x00\x00\x00"
30919 "\x00\x00\x00\x00\x00\x00\x00\x00"
30920 "\x00\x00\x00\x00\x00\x00\x00\x00"
30921 "\x00\x00\x00\x00\x00\x00\x00\x00"
30922 "\x00\x00\x00\x00\x00\x00\x00\x00"
30923 "\x00\x00\x00\x00\x00\x00\x00\x00"
30924 "\x00",
30925 .ilen = 129,
30926 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
30927 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
30928 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
30929 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
30930 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
30931 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
30932 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
30933 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
30934 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
30935 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
30936 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
30937 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
30938 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
30939 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
30940 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
30941 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
30942 "\x5A",
30943 .rlen = 129,
30944 }, { /* large test vector generated using Crypto++ */
30945 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
30946 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30947 "\x10\x11\x12\x13\x14\x15\x16\x17"
30948 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
30949 .klen = 32,
30950 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30951 "\x00\x00\x00\x00\x00\x00\x00\x00",
30952 .input =
30953 "\x00\x01\x02\x03\x04\x05\x06\x07"
30954 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30955 "\x10\x11\x12\x13\x14\x15\x16\x17"
30956 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30957 "\x20\x21\x22\x23\x24\x25\x26\x27"
30958 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30959 "\x30\x31\x32\x33\x34\x35\x36\x37"
30960 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30961 "\x40\x41\x42\x43\x44\x45\x46\x47"
30962 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30963 "\x50\x51\x52\x53\x54\x55\x56\x57"
30964 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30965 "\x60\x61\x62\x63\x64\x65\x66\x67"
30966 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30967 "\x70\x71\x72\x73\x74\x75\x76\x77"
30968 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30969 "\x80\x81\x82\x83\x84\x85\x86\x87"
30970 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30971 "\x90\x91\x92\x93\x94\x95\x96\x97"
30972 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30973 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30974 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30975 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30976 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30977 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30978 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30979 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30980 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30981 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30982 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30983 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30984 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30985 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
30986 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
30987 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
30988 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
30989 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
30990 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
30991 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
30992 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
30993 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
30994 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
30995 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
30996 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
30997 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
30998 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
30999 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
31000 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
31001 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
31002 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
31003 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
31004 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
31005 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
31006 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
31007 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
31008 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
31009 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
31010 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
31011 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
31012 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
31013 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
31014 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
31015 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
31016 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
31017 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
31018 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
31019 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
31020 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
31021 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
31022 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
31023 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
31024 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
31025 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
31026 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
31027 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
31028 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
31029 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
31030 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
31031 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
31032 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
31033 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
31034 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
31035 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
31036 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
31037 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
31038 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
31039 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
31040 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
31041 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
31042 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
31043 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
31044 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
31045 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
31046 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
31047 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
31048 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
31049 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
31050 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
31051 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
31052 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
31053 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
31054 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
31055 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
31056 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
31057 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
31058 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
31059 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
31060 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
31061 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
31062 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
31063 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
31064 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
31065 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
31066 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
31067 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
31068 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
31069 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
31070 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
31071 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
31072 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
31073 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
31074 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
31075 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
31076 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
31077 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
31078 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
31079 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
31080 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
31081 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
31082 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
31083 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
31084 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
31085 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
31086 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
31087 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
31088 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
31089 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
31090 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
31091 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
31092 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
31093 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
31094 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
31095 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
31096 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
31097 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
31098 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
31099 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
31100 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
31101 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
31102 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
31103 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
31104 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
31105 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
31106 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
31107 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
31108 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
31109 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
31110 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
31111 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
31112 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
31113 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
31114 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
31115 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
31116 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
31117 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
31118 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
31119 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
31120 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
31121 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
31122 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
31123 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
31124 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
31125 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
31126 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
31127 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
31128 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
31129 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
31130 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
31131 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
31132 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
31133 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
31134 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
31135 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
31136 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
31137 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
31138 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
31139 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
31140 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
31141 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
31142 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
31143 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
31144 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
31145 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
31146 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
31147 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
31148 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
31149 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
31150 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
31151 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
31152 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
31153 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
31154 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
31155 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
31156 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
31157 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
31158 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
31159 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
31160 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
31161 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
31162 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
31163 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
31164 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
31165 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
31166 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
31167 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
31168 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
31169 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
31170 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
31171 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
31172 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
31173 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
31174 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
31175 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
31176 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
31177 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
31178 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
31179 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
31180 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
31181 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
31182 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
31183 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
31184 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
31185 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
31186 "\x38\x47\x56\x65\x74\x83\x92\xa1"
31187 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
31188 "\x28\x37\x46\x55\x64\x73\x82\x91"
31189 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
31190 "\x18\x27\x36\x45\x54\x63\x72\x81"
31191 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
31192 "\x08\x17\x26\x35\x44\x53\x62\x71"
31193 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
31194 "\xf8\x07\x16\x25\x34\x43\x52\x61"
31195 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
31196 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
31197 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
31198 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
31199 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
31200 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
31201 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
31202 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
31203 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
31204 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
31205 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
31206 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
31207 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
31208 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
31209 "\x00\x11\x22\x33\x44\x55\x66\x77"
31210 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
31211 "\x10\x21\x32\x43\x54\x65\x76\x87"
31212 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
31213 "\x20\x31\x42\x53\x64\x75\x86\x97"
31214 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
31215 "\x30\x41\x52\x63\x74\x85\x96\xa7"
31216 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
31217 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
31218 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
31219 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
31220 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
31221 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
31222 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
31223 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
31224 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
31225 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
31226 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
31227 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
31228 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
31229 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
31230 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
31231 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
31232 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
31233 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
31234 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
31235 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
31236 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
31237 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
31238 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
31239 "\xf0\x01\x12\x23\x34\x45\x56\x67"
31240 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
31241 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
31242 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
31243 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
31244 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
31245 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
31246 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
31247 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
31248 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
31249 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
31250 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
31251 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
31252 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
31253 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
31254 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
31255 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
31256 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
31257 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
31258 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
31259 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
31260 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
31261 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
31262 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
31263 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
31264 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
31265 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
31266 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
31267 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
31268 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
31269 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
31270 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
31271 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
31272 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
31273 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
31274 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
31275 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
31276 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
31277 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
31278 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
31279 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
31280 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
31281 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
31282 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
31283 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
31284 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
31285 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
31286 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
31287 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
31288 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
31289 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
31290 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
31291 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
31292 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
31293 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
31294 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
31295 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
31296 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
31297 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
31298 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
31299 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
31300 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
31301 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
31302 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
31303 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
31304 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
31305 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
31306 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
31307 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
31308 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
31309 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
31310 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
31311 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
31312 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
31313 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
31314 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
31315 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
31316 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
31317 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
31318 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
31319 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
31320 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
31321 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
31322 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
31323 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
31324 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
31325 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
31326 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
31327 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
31328 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
31329 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
31330 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
31331 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
31332 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
31333 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
31334 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
31335 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
31336 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
31337 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
31338 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
31339 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
31340 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
31341 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
31342 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
31343 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
31344 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
31345 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
31346 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
31347 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
31348 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
31349 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
31350 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
31351 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
31352 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
31353 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
31354 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
31355 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
31356 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
31357 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
31358 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
31359 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
31360 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
31361 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
31362 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
31363 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
31364 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
31365 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
31366 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
31367 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
31368 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
31369 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
31370 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
31371 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
31372 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
31373 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
31374 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
31375 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
31376 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
31377 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
31378 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
31379 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
31380 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
31381 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
31382 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
31383 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
31384 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
31385 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
31386 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
31387 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
31388 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
31389 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
31390 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
31391 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
31392 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
31393 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
31394 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
31395 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
31396 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
31397 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
31398 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
31399 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
31400 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
31401 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
31402 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
31403 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
31404 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
31405 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
31406 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
31407 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
31408 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
31409 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
31410 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
31411 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
31412 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
31413 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
31414 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
31415 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
31416 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
31417 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
31418 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
31419 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
31420 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
31421 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
31422 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
31423 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
31424 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
31425 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
31426 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
31427 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
31428 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
31429 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
31430 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
31431 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
31432 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
31433 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
31434 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
31435 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
31436 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
31437 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
31438 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
31439 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
31440 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
31441 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
31442 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
31443 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
31444 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
31445 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
31446 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
31447 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
31448 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
31449 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
31450 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
31451 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
31452 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
31453 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
31454 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
31455 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
31456 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
31457 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
31458 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
31459 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
31460 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
31461 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
31462 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
31463 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
31464 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
31465 "\x00\x21\x42\x63",
31466 .ilen = 4100,
31467 .result =
31468 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
31469 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
31470 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
31471 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
31472 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
31473 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
31474 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
31475 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
31476 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
31477 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
31478 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
31479 "\xbb\xde\x56\x86\xab\x65\x21\x30"
31480 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
31481 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
31482 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
31483 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
31484 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
31485 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
31486 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
31487 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
31488 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
31489 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
31490 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
31491 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
31492 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
31493 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
31494 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
31495 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
31496 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
31497 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
31498 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
31499 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
31500 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
31501 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
31502 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
31503 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
31504 "\x62\x08\x18\x7a\x25\x49\x28\xac"
31505 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
31506 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
31507 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
31508 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
31509 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
31510 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
31511 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
31512 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
31513 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
31514 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
31515 "\x33\xee\x14\x19\x22\x52\x89\xa7"
31516 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
31517 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
31518 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
31519 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
31520 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
31521 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
31522 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
31523 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
31524 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
31525 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
31526 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
31527 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
31528 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
31529 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
31530 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
31531 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
31532 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
31533 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
31534 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
31535 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
31536 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
31537 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
31538 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
31539 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
31540 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
31541 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
31542 "\x49\x97\x33\xab\x36\x14\x0a\x70"
31543 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
31544 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
31545 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
31546 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
31547 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
31548 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
31549 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
31550 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
31551 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
31552 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
31553 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
31554 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
31555 "\xad\x04\x07\xae\x22\x90\x4a\x93"
31556 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
31557 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
31558 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
31559 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
31560 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
31561 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
31562 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
31563 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
31564 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
31565 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
31566 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
31567 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
31568 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
31569 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
31570 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
31571 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
31572 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
31573 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
31574 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
31575 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
31576 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
31577 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
31578 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
31579 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
31580 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
31581 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
31582 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
31583 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
31584 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
31585 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
31586 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
31587 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
31588 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
31589 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
31590 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
31591 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
31592 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
31593 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
31594 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
31595 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
31596 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
31597 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
31598 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
31599 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
31600 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
31601 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
31602 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
31603 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
31604 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
31605 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
31606 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
31607 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
31608 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
31609 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
31610 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
31611 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
31612 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
31613 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
31614 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
31615 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
31616 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
31617 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
31618 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
31619 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
31620 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
31621 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
31622 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
31623 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
31624 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
31625 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
31626 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
31627 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
31628 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
31629 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
31630 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
31631 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
31632 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
31633 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
31634 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
31635 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
31636 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
31637 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
31638 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
31639 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
31640 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
31641 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
31642 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
31643 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
31644 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
31645 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
31646 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
31647 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
31648 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
31649 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
31650 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
31651 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
31652 "\x2e\x53\x49\x97\x94\x33\xae\x40"
31653 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
31654 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
31655 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
31656 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
31657 "\xce\x87\xad\xcc\x72\x05\x00\x29"
31658 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
31659 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
31660 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
31661 "\xac\xc0\x79\x50\x69\xca\x59\x32"
31662 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
31663 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
31664 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
31665 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
31666 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
31667 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
31668 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
31669 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
31670 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
31671 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
31672 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
31673 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
31674 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
31675 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
31676 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
31677 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
31678 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
31679 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
31680 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
31681 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
31682 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
31683 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
31684 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
31685 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
31686 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
31687 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
31688 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
31689 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
31690 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
31691 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
31692 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
31693 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
31694 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
31695 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
31696 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
31697 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
31698 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
31699 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
31700 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
31701 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
31702 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
31703 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
31704 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
31705 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
31706 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
31707 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
31708 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
31709 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
31710 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
31711 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
31712 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
31713 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
31714 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
31715 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
31716 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
31717 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
31718 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
31719 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
31720 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
31721 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
31722 "\x38\x55\xab\x33\x26\xef\x9f\x43"
31723 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
31724 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
31725 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
31726 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
31727 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
31728 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
31729 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
31730 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
31731 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
31732 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
31733 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
31734 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
31735 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
31736 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
31737 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
31738 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
31739 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
31740 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
31741 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
31742 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
31743 "\x62\x36\x43\xb2\x82\x15\x75\x50"
31744 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
31745 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
31746 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
31747 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
31748 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
31749 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
31750 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
31751 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
31752 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
31753 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
31754 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
31755 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
31756 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
31757 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
31758 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
31759 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
31760 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
31761 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
31762 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
31763 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
31764 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
31765 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
31766 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
31767 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
31768 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
31769 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
31770 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
31771 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
31772 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
31773 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
31774 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
31775 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
31776 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
31777 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
31778 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
31779 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
31780 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
31781 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
31782 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
31783 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
31784 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
31785 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
31786 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
31787 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
31788 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
31789 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
31790 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
31791 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
31792 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
31793 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
31794 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
31795 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
31796 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
31797 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
31798 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
31799 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
31800 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
31801 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
31802 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
31803 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
31804 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
31805 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
31806 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
31807 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
31808 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
31809 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
31810 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
31811 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
31812 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
31813 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
31814 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
31815 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
31816 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
31817 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
31818 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
31819 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
31820 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
31821 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
31822 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
31823 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
31824 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
31825 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
31826 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
31827 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
31828 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
31829 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
31830 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
31831 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
31832 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
31833 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
31834 "\x73\x2e\x71\x79\x16\x06\x63\x28"
31835 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
31836 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
31837 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
31838 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
31839 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
31840 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
31841 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
31842 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
31843 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
31844 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
31845 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
31846 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
31847 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
31848 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
31849 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
31850 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
31851 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
31852 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
31853 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
31854 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
31855 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
31856 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
31857 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
31858 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
31859 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
31860 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
31861 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
31862 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
31863 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
31864 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
31865 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
31866 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
31867 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
31868 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
31869 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
31870 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
31871 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
31872 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
31873 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
31874 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
31875 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
31876 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
31877 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
31878 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
31879 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
31880 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
31881 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
31882 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
31883 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
31884 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
31885 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
31886 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
31887 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
31888 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
31889 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
31890 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
31891 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
31892 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
31893 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
31894 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
31895 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
31896 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
31897 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
31898 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
31899 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
31900 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
31901 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
31902 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
31903 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
31904 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
31905 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
31906 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
31907 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
31908 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
31909 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
31910 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
31911 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
31912 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
31913 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
31914 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
31915 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
31916 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
31917 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
31918 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
31919 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
31920 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
31921 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
31922 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
31923 "\x85\x73\x78\x45\x20\x7f\xae\x13"
31924 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
31925 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
31926 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
31927 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
31928 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
31929 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
31930 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
31931 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
31932 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
31933 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
31934 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
31935 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
31936 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
31937 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
31938 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
31939 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
31940 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
31941 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
31942 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
31943 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
31944 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
31945 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
31946 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
31947 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
31948 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
31949 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
31950 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
31951 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
31952 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
31953 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
31954 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
31955 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
31956 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
31957 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
31958 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
31959 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
31960 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
31961 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
31962 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
31963 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
31964 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
31965 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
31966 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
31967 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
31968 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
31969 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
31970 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
31971 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
31972 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
31973 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
31974 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
31975 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
31976 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
31977 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
31978 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
31979 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
31980 "\xaf\xdf\x11\x95",
31981 .rlen = 4100,
31982 .np = 2,
31983 .tap = { 4064, 36 },
31984 },
31985};
31986
Martin Willi6692cbc2015-07-16 19:14:04 +020031987#define CHACHA20_ENC_TEST_VECTORS 4
Martin Willi3590ebf2015-06-01 13:43:57 +020031988static struct cipher_testvec chacha20_enc_tv_template[] = {
31989 { /* RFC7539 A.2. Test Vector #1 */
31990 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
31991 "\x00\x00\x00\x00\x00\x00\x00\x00"
31992 "\x00\x00\x00\x00\x00\x00\x00\x00"
31993 "\x00\x00\x00\x00\x00\x00\x00\x00",
31994 .klen = 32,
31995 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
31996 "\x00\x00\x00\x00\x00\x00\x00\x00",
31997 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
31998 "\x00\x00\x00\x00\x00\x00\x00\x00"
31999 "\x00\x00\x00\x00\x00\x00\x00\x00"
32000 "\x00\x00\x00\x00\x00\x00\x00\x00"
32001 "\x00\x00\x00\x00\x00\x00\x00\x00"
32002 "\x00\x00\x00\x00\x00\x00\x00\x00"
32003 "\x00\x00\x00\x00\x00\x00\x00\x00"
32004 "\x00\x00\x00\x00\x00\x00\x00\x00",
32005 .ilen = 64,
32006 .result = "\x76\xb8\xe0\xad\xa0\xf1\x3d\x90"
32007 "\x40\x5d\x6a\xe5\x53\x86\xbd\x28"
32008 "\xbd\xd2\x19\xb8\xa0\x8d\xed\x1a"
32009 "\xa8\x36\xef\xcc\x8b\x77\x0d\xc7"
32010 "\xda\x41\x59\x7c\x51\x57\x48\x8d"
32011 "\x77\x24\xe0\x3f\xb8\xd8\x4a\x37"
32012 "\x6a\x43\xb8\xf4\x15\x18\xa1\x1c"
32013 "\xc3\x87\xb6\x69\xb2\xee\x65\x86",
32014 .rlen = 64,
32015 }, { /* RFC7539 A.2. Test Vector #2 */
32016 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
32017 "\x00\x00\x00\x00\x00\x00\x00\x00"
32018 "\x00\x00\x00\x00\x00\x00\x00\x00"
32019 "\x00\x00\x00\x00\x00\x00\x00\x01",
32020 .klen = 32,
32021 .iv = "\x01\x00\x00\x00\x00\x00\x00\x00"
32022 "\x00\x00\x00\x00\x00\x00\x00\x02",
32023 .input = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
32024 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
32025 "\x6f\x20\x74\x68\x65\x20\x49\x45"
32026 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
32027 "\x64\x65\x64\x20\x62\x79\x20\x74"
32028 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
32029 "\x69\x62\x75\x74\x6f\x72\x20\x66"
32030 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
32031 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
32032 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
32033 "\x20\x70\x61\x72\x74\x20\x6f\x66"
32034 "\x20\x61\x6e\x20\x49\x45\x54\x46"
32035 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
32036 "\x74\x2d\x44\x72\x61\x66\x74\x20"
32037 "\x6f\x72\x20\x52\x46\x43\x20\x61"
32038 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
32039 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
32040 "\x20\x6d\x61\x64\x65\x20\x77\x69"
32041 "\x74\x68\x69\x6e\x20\x74\x68\x65"
32042 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
32043 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
32044 "\x45\x54\x46\x20\x61\x63\x74\x69"
32045 "\x76\x69\x74\x79\x20\x69\x73\x20"
32046 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
32047 "\x65\x64\x20\x61\x6e\x20\x22\x49"
32048 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
32049 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
32050 "\x22\x2e\x20\x53\x75\x63\x68\x20"
32051 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
32052 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
32053 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
32054 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
32055 "\x74\x73\x20\x69\x6e\x20\x49\x45"
32056 "\x54\x46\x20\x73\x65\x73\x73\x69"
32057 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
32058 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
32059 "\x77\x72\x69\x74\x74\x65\x6e\x20"
32060 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
32061 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
32062 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
32063 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
32064 "\x64\x65\x20\x61\x74\x20\x61\x6e"
32065 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
32066 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
32067 "\x20\x77\x68\x69\x63\x68\x20\x61"
32068 "\x72\x65\x20\x61\x64\x64\x72\x65"
32069 "\x73\x73\x65\x64\x20\x74\x6f",
32070 .ilen = 375,
32071 .result = "\xa3\xfb\xf0\x7d\xf3\xfa\x2f\xde"
32072 "\x4f\x37\x6c\xa2\x3e\x82\x73\x70"
32073 "\x41\x60\x5d\x9f\x4f\x4f\x57\xbd"
32074 "\x8c\xff\x2c\x1d\x4b\x79\x55\xec"
32075 "\x2a\x97\x94\x8b\xd3\x72\x29\x15"
32076 "\xc8\xf3\xd3\x37\xf7\xd3\x70\x05"
32077 "\x0e\x9e\x96\xd6\x47\xb7\xc3\x9f"
32078 "\x56\xe0\x31\xca\x5e\xb6\x25\x0d"
32079 "\x40\x42\xe0\x27\x85\xec\xec\xfa"
32080 "\x4b\x4b\xb5\xe8\xea\xd0\x44\x0e"
32081 "\x20\xb6\xe8\xdb\x09\xd8\x81\xa7"
32082 "\xc6\x13\x2f\x42\x0e\x52\x79\x50"
32083 "\x42\xbd\xfa\x77\x73\xd8\xa9\x05"
32084 "\x14\x47\xb3\x29\x1c\xe1\x41\x1c"
32085 "\x68\x04\x65\x55\x2a\xa6\xc4\x05"
32086 "\xb7\x76\x4d\x5e\x87\xbe\xa8\x5a"
32087 "\xd0\x0f\x84\x49\xed\x8f\x72\xd0"
32088 "\xd6\x62\xab\x05\x26\x91\xca\x66"
32089 "\x42\x4b\xc8\x6d\x2d\xf8\x0e\xa4"
32090 "\x1f\x43\xab\xf9\x37\xd3\x25\x9d"
32091 "\xc4\xb2\xd0\xdf\xb4\x8a\x6c\x91"
32092 "\x39\xdd\xd7\xf7\x69\x66\xe9\x28"
32093 "\xe6\x35\x55\x3b\xa7\x6c\x5c\x87"
32094 "\x9d\x7b\x35\xd4\x9e\xb2\xe6\x2b"
32095 "\x08\x71\xcd\xac\x63\x89\x39\xe2"
32096 "\x5e\x8a\x1e\x0e\xf9\xd5\x28\x0f"
32097 "\xa8\xca\x32\x8b\x35\x1c\x3c\x76"
32098 "\x59\x89\xcb\xcf\x3d\xaa\x8b\x6c"
32099 "\xcc\x3a\xaf\x9f\x39\x79\xc9\x2b"
32100 "\x37\x20\xfc\x88\xdc\x95\xed\x84"
32101 "\xa1\xbe\x05\x9c\x64\x99\xb9\xfd"
32102 "\xa2\x36\xe7\xe8\x18\xb0\x4b\x0b"
32103 "\xc3\x9c\x1e\x87\x6b\x19\x3b\xfe"
32104 "\x55\x69\x75\x3f\x88\x12\x8c\xc0"
32105 "\x8a\xaa\x9b\x63\xd1\xa1\x6f\x80"
32106 "\xef\x25\x54\xd7\x18\x9c\x41\x1f"
32107 "\x58\x69\xca\x52\xc5\xb8\x3f\xa3"
32108 "\x6f\xf2\x16\xb9\xc1\xd3\x00\x62"
32109 "\xbe\xbc\xfd\x2d\xc5\xbc\xe0\x91"
32110 "\x19\x34\xfd\xa7\x9a\x86\xf6\xe6"
32111 "\x98\xce\xd7\x59\xc3\xff\x9b\x64"
32112 "\x77\x33\x8f\x3d\xa4\xf9\xcd\x85"
32113 "\x14\xea\x99\x82\xcc\xaf\xb3\x41"
32114 "\xb2\x38\x4d\xd9\x02\xf3\xd1\xab"
32115 "\x7a\xc6\x1d\xd2\x9c\x6f\x21\xba"
32116 "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
32117 "\xc4\xfd\x80\x6c\x22\xf2\x21",
32118 .rlen = 375,
32119 }, { /* RFC7539 A.2. Test Vector #3 */
32120 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
32121 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
32122 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
32123 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
32124 .klen = 32,
32125 .iv = "\x2a\x00\x00\x00\x00\x00\x00\x00"
32126 "\x00\x00\x00\x00\x00\x00\x00\x02",
32127 .input = "\x27\x54\x77\x61\x73\x20\x62\x72"
32128 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
32129 "\x6e\x64\x20\x74\x68\x65\x20\x73"
32130 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
32131 "\x76\x65\x73\x0a\x44\x69\x64\x20"
32132 "\x67\x79\x72\x65\x20\x61\x6e\x64"
32133 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
32134 "\x69\x6e\x20\x74\x68\x65\x20\x77"
32135 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
32136 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
32137 "\x65\x72\x65\x20\x74\x68\x65\x20"
32138 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
32139 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
32140 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
32141 "\x72\x61\x74\x68\x73\x20\x6f\x75"
32142 "\x74\x67\x72\x61\x62\x65\x2e",
32143 .ilen = 127,
32144 .result = "\x62\xe6\x34\x7f\x95\xed\x87\xa4"
32145 "\x5f\xfa\xe7\x42\x6f\x27\xa1\xdf"
32146 "\x5f\xb6\x91\x10\x04\x4c\x0d\x73"
32147 "\x11\x8e\xff\xa9\x5b\x01\xe5\xcf"
32148 "\x16\x6d\x3d\xf2\xd7\x21\xca\xf9"
32149 "\xb2\x1e\x5f\xb1\x4c\x61\x68\x71"
32150 "\xfd\x84\xc5\x4f\x9d\x65\xb2\x83"
32151 "\x19\x6c\x7f\xe4\xf6\x05\x53\xeb"
32152 "\xf3\x9c\x64\x02\xc4\x22\x34\xe3"
32153 "\x2a\x35\x6b\x3e\x76\x43\x12\xa6"
32154 "\x1a\x55\x32\x05\x57\x16\xea\xd6"
32155 "\x96\x25\x68\xf8\x7d\x3f\x3f\x77"
32156 "\x04\xc6\xa8\xd1\xbc\xd1\xbf\x4d"
32157 "\x50\xd6\x15\x4b\x6d\xa7\x31\xb1"
32158 "\x87\xb5\x8d\xfd\x72\x8a\xfa\x36"
32159 "\x75\x7a\x79\x7a\xc1\x88\xd1",
32160 .rlen = 127,
Martin Willi6692cbc2015-07-16 19:14:04 +020032161 }, { /* Self-made test vector for long data */
32162 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
32163 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
32164 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
32165 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
32166 .klen = 32,
32167 .iv = "\x1c\x00\x00\x00\x00\x00\x00\x00"
32168 "\x00\x00\x00\x00\x00\x00\x00\x01",
32169 .input = "\x49\xee\xe0\xdc\x24\x90\x40\xcd"
32170 "\xc5\x40\x8f\x47\x05\xbc\xdd\x81"
32171 "\x47\xc6\x8d\xe6\xb1\x8f\xd7\xcb"
32172 "\x09\x0e\x6e\x22\x48\x1f\xbf\xb8"
32173 "\x5c\xf7\x1e\x8a\xc1\x23\xf2\xd4"
32174 "\x19\x4b\x01\x0f\x4e\xa4\x43\xce"
32175 "\x01\xc6\x67\xda\x03\x91\x18\x90"
32176 "\xa5\xa4\x8e\x45\x03\xb3\x2d\xac"
32177 "\x74\x92\xd3\x53\x47\xc8\xdd\x25"
32178 "\x53\x6c\x02\x03\x87\x0d\x11\x0c"
32179 "\x58\xe3\x12\x18\xfd\x2a\x5b\x40"
32180 "\x0c\x30\xf0\xb8\x3f\x43\xce\xae"
32181 "\x65\x3a\x7d\x7c\xf4\x54\xaa\xcc"
32182 "\x33\x97\xc3\x77\xba\xc5\x70\xde"
32183 "\xd7\xd5\x13\xa5\x65\xc4\x5f\x0f"
32184 "\x46\x1a\x0d\x97\xb5\xf3\xbb\x3c"
32185 "\x84\x0f\x2b\xc5\xaa\xea\xf2\x6c"
32186 "\xc9\xb5\x0c\xee\x15\xf3\x7d\xbe"
32187 "\x9f\x7b\x5a\xa6\xae\x4f\x83\xb6"
32188 "\x79\x49\x41\xf4\x58\x18\xcb\x86"
32189 "\x7f\x30\x0e\xf8\x7d\x44\x36\xea"
32190 "\x75\xeb\x88\x84\x40\x3c\xad\x4f"
32191 "\x6f\x31\x6b\xaa\x5d\xe5\xa5\xc5"
32192 "\x21\x66\xe9\xa7\xe3\xb2\x15\x88"
32193 "\x78\xf6\x79\xa1\x59\x47\x12\x4e"
32194 "\x9f\x9f\x64\x1a\xa0\x22\x5b\x08"
32195 "\xbe\x7c\x36\xc2\x2b\x66\x33\x1b"
32196 "\xdd\x60\x71\xf7\x47\x8c\x61\xc3"
32197 "\xda\x8a\x78\x1e\x16\xfa\x1e\x86"
32198 "\x81\xa6\x17\x2a\xa7\xb5\xc2\xe7"
32199 "\xa4\xc7\x42\xf1\xcf\x6a\xca\xb4"
32200 "\x45\xcf\xf3\x93\xf0\xe7\xea\xf6"
32201 "\xf4\xe6\x33\x43\x84\x93\xa5\x67"
32202 "\x9b\x16\x58\x58\x80\x0f\x2b\x5c"
32203 "\x24\x74\x75\x7f\x95\x81\xb7\x30"
32204 "\x7a\x33\xa7\xf7\x94\x87\x32\x27"
32205 "\x10\x5d\x14\x4c\x43\x29\xdd\x26"
32206 "\xbd\x3e\x3c\x0e\xfe\x0e\xa5\x10"
32207 "\xea\x6b\x64\xfd\x73\xc6\xed\xec"
32208 "\xa8\xc9\xbf\xb3\xba\x0b\x4d\x07"
32209 "\x70\xfc\x16\xfd\x79\x1e\xd7\xc5"
32210 "\x49\x4e\x1c\x8b\x8d\x79\x1b\xb1"
32211 "\xec\xca\x60\x09\x4c\x6a\xd5\x09"
32212 "\x49\x46\x00\x88\x22\x8d\xce\xea"
32213 "\xb1\x17\x11\xde\x42\xd2\x23\xc1"
32214 "\x72\x11\xf5\x50\x73\x04\x40\x47"
32215 "\xf9\x5d\xe7\xa7\x26\xb1\x7e\xb0"
32216 "\x3f\x58\xc1\x52\xab\x12\x67\x9d"
32217 "\x3f\x43\x4b\x68\xd4\x9c\x68\x38"
32218 "\x07\x8a\x2d\x3e\xf3\xaf\x6a\x4b"
32219 "\xf9\xe5\x31\x69\x22\xf9\xa6\x69"
32220 "\xc6\x9c\x96\x9a\x12\x35\x95\x1d"
32221 "\x95\xd5\xdd\xbe\xbf\x93\x53\x24"
32222 "\xfd\xeb\xc2\x0a\x64\xb0\x77\x00"
32223 "\x6f\x88\xc4\x37\x18\x69\x7c\xd7"
32224 "\x41\x92\x55\x4c\x03\xa1\x9a\x4b"
32225 "\x15\xe5\xdf\x7f\x37\x33\x72\xc1"
32226 "\x8b\x10\x67\xa3\x01\x57\x94\x25"
32227 "\x7b\x38\x71\x7e\xdd\x1e\xcc\x73"
32228 "\x55\xd2\x8e\xeb\x07\xdd\xf1\xda"
32229 "\x58\xb1\x47\x90\xfe\x42\x21\x72"
32230 "\xa3\x54\x7a\xa0\x40\xec\x9f\xdd"
32231 "\xc6\x84\x6e\xca\xae\xe3\x68\xb4"
32232 "\x9d\xe4\x78\xff\x57\xf2\xf8\x1b"
32233 "\x03\xa1\x31\xd9\xde\x8d\xf5\x22"
32234 "\x9c\xdd\x20\xa4\x1e\x27\xb1\x76"
32235 "\x4f\x44\x55\xe2\x9b\xa1\x9c\xfe"
32236 "\x54\xf7\x27\x1b\xf4\xde\x02\xf5"
32237 "\x1b\x55\x48\x5c\xdc\x21\x4b\x9e"
32238 "\x4b\x6e\xed\x46\x23\xdc\x65\xb2"
32239 "\xcf\x79\x5f\x28\xe0\x9e\x8b\xe7"
32240 "\x4c\x9d\x8a\xff\xc1\xa6\x28\xb8"
32241 "\x65\x69\x8a\x45\x29\xef\x74\x85"
32242 "\xde\x79\xc7\x08\xae\x30\xb0\xf4"
32243 "\xa3\x1d\x51\x41\xab\xce\xcb\xf6"
32244 "\xb5\xd8\x6d\xe0\x85\xe1\x98\xb3"
32245 "\x43\xbb\x86\x83\x0a\xa0\xf5\xb7"
32246 "\x04\x0b\xfa\x71\x1f\xb0\xf6\xd9"
32247 "\x13\x00\x15\xf0\xc7\xeb\x0d\x5a"
32248 "\x9f\xd7\xb9\x6c\x65\x14\x22\x45"
32249 "\x6e\x45\x32\x3e\x7e\x60\x1a\x12"
32250 "\x97\x82\x14\xfb\xaa\x04\x22\xfa"
32251 "\xa0\xe5\x7e\x8c\x78\x02\x48\x5d"
32252 "\x78\x33\x5a\x7c\xad\xdb\x29\xce"
32253 "\xbb\x8b\x61\xa4\xb7\x42\xe2\xac"
32254 "\x8b\x1a\xd9\x2f\x0b\x8b\x62\x21"
32255 "\x83\x35\x7e\xad\x73\xc2\xb5\x6c"
32256 "\x10\x26\x38\x07\xe5\xc7\x36\x80"
32257 "\xe2\x23\x12\x61\xf5\x48\x4b\x2b"
32258 "\xc5\xdf\x15\xd9\x87\x01\xaa\xac"
32259 "\x1e\x7c\xad\x73\x78\x18\x63\xe0"
32260 "\x8b\x9f\x81\xd8\x12\x6a\x28\x10"
32261 "\xbe\x04\x68\x8a\x09\x7c\x1b\x1c"
32262 "\x83\x66\x80\x47\x80\xe8\xfd\x35"
32263 "\x1c\x97\x6f\xae\x49\x10\x66\xcc"
32264 "\xc6\xd8\xcc\x3a\x84\x91\x20\x77"
32265 "\x72\xe4\x24\xd2\x37\x9f\xc5\xc9"
32266 "\x25\x94\x10\x5f\x40\x00\x64\x99"
32267 "\xdc\xae\xd7\x21\x09\x78\x50\x15"
32268 "\xac\x5f\xc6\x2c\xa2\x0b\xa9\x39"
32269 "\x87\x6e\x6d\xab\xde\x08\x51\x16"
32270 "\xc7\x13\xe9\xea\xed\x06\x8e\x2c"
32271 "\xf8\x37\x8c\xf0\xa6\x96\x8d\x43"
32272 "\xb6\x98\x37\xb2\x43\xed\xde\xdf"
32273 "\x89\x1a\xe7\xeb\x9d\xa1\x7b\x0b"
32274 "\x77\xb0\xe2\x75\xc0\xf1\x98\xd9"
32275 "\x80\x55\xc9\x34\x91\xd1\x59\xe8"
32276 "\x4b\x0f\xc1\xa9\x4b\x7a\x84\x06"
32277 "\x20\xa8\x5d\xfa\xd1\xde\x70\x56"
32278 "\x2f\x9e\x91\x9c\x20\xb3\x24\xd8"
32279 "\x84\x3d\xe1\x8c\x7e\x62\x52\xe5"
32280 "\x44\x4b\x9f\xc2\x93\x03\xea\x2b"
32281 "\x59\xc5\xfa\x3f\x91\x2b\xbb\x23"
32282 "\xf5\xb2\x7b\xf5\x38\xaf\xb3\xee"
32283 "\x63\xdc\x7b\xd1\xff\xaa\x8b\xab"
32284 "\x82\x6b\x37\x04\xeb\x74\xbe\x79"
32285 "\xb9\x83\x90\xef\x20\x59\x46\xff"
32286 "\xe9\x97\x3e\x2f\xee\xb6\x64\x18"
32287 "\x38\x4c\x7a\x4a\xf9\x61\xe8\x9a"
32288 "\xa1\xb5\x01\xa6\x47\xd3\x11\xd4"
32289 "\xce\xd3\x91\x49\x88\xc7\xb8\x4d"
32290 "\xb1\xb9\x07\x6d\x16\x72\xae\x46"
32291 "\x5e\x03\xa1\x4b\xb6\x02\x30\xa8"
32292 "\x3d\xa9\x07\x2a\x7c\x19\xe7\x62"
32293 "\x87\xe3\x82\x2f\x6f\xe1\x09\xd9"
32294 "\x94\x97\xea\xdd\x58\x9e\xae\x76"
32295 "\x7e\x35\xe5\xb4\xda\x7e\xf4\xde"
32296 "\xf7\x32\x87\xcd\x93\xbf\x11\x56"
32297 "\x11\xbe\x08\x74\xe1\x69\xad\xe2"
32298 "\xd7\xf8\x86\x75\x8a\x3c\xa4\xbe"
32299 "\x70\xa7\x1b\xfc\x0b\x44\x2a\x76"
32300 "\x35\xea\x5d\x85\x81\xaf\x85\xeb"
32301 "\xa0\x1c\x61\xc2\xf7\x4f\xa5\xdc"
32302 "\x02\x7f\xf6\x95\x40\x6e\x8a\x9a"
32303 "\xf3\x5d\x25\x6e\x14\x3a\x22\xc9"
32304 "\x37\x1c\xeb\x46\x54\x3f\xa5\x91"
32305 "\xc2\xb5\x8c\xfe\x53\x08\x97\x32"
32306 "\x1b\xb2\x30\x27\xfe\x25\x5d\xdc"
32307 "\x08\x87\xd0\xe5\x94\x1a\xd4\xf1"
32308 "\xfe\xd6\xb4\xa3\xe6\x74\x81\x3c"
32309 "\x1b\xb7\x31\xa7\x22\xfd\xd4\xdd"
32310 "\x20\x4e\x7c\x51\xb0\x60\x73\xb8"
32311 "\x9c\xac\x91\x90\x7e\x01\xb0\xe1"
32312 "\x8a\x2f\x75\x1c\x53\x2a\x98\x2a"
32313 "\x06\x52\x95\x52\xb2\xe9\x25\x2e"
32314 "\x4c\xe2\x5a\x00\xb2\x13\x81\x03"
32315 "\x77\x66\x0d\xa5\x99\xda\x4e\x8c"
32316 "\xac\xf3\x13\x53\x27\x45\xaf\x64"
32317 "\x46\xdc\xea\x23\xda\x97\xd1\xab"
32318 "\x7d\x6c\x30\x96\x1f\xbc\x06\x34"
32319 "\x18\x0b\x5e\x21\x35\x11\x8d\x4c"
32320 "\xe0\x2d\xe9\x50\x16\x74\x81\xa8"
32321 "\xb4\x34\xb9\x72\x42\xa6\xcc\xbc"
32322 "\xca\x34\x83\x27\x10\x5b\x68\x45"
32323 "\x8f\x52\x22\x0c\x55\x3d\x29\x7c"
32324 "\xe3\xc0\x66\x05\x42\x91\x5f\x58"
32325 "\xfe\x4a\x62\xd9\x8c\xa9\x04\x19"
32326 "\x04\xa9\x08\x4b\x57\xfc\x67\x53"
32327 "\x08\x7c\xbc\x66\x8a\xb0\xb6\x9f"
32328 "\x92\xd6\x41\x7c\x5b\x2a\x00\x79"
32329 "\x72",
32330 .ilen = 1281,
32331 .result = "\x45\xe8\xe0\xb6\x9c\xca\xfd\x87"
32332 "\xe8\x1d\x37\x96\x8a\xe3\x40\x35"
32333 "\xcf\x5e\x3a\x46\x3d\xfb\xd0\x69"
32334 "\xde\xaf\x7a\xd5\x0d\xe9\x52\xec"
32335 "\xc2\x82\xe5\x3e\x7d\xb2\x4a\xd9"
32336 "\xbb\xc3\x9f\xc0\x5d\xac\x93\x8d"
32337 "\x0e\x6f\xd3\xd7\xfb\x6a\x0d\xce"
32338 "\x92\x2c\xf7\xbb\x93\x57\xcc\xee"
32339 "\x42\x72\x6f\xc8\x4b\xd2\x76\xbf"
32340 "\xa0\xe3\x7a\x39\xf9\x5c\x8e\xfd"
32341 "\xa1\x1d\x41\xe5\x08\xc1\x1c\x11"
32342 "\x92\xfd\x39\x5c\x51\xd0\x2f\x66"
32343 "\x33\x4a\x71\x15\xfe\xee\x12\x54"
32344 "\x8c\x8f\x34\xd8\x50\x3c\x18\xa6"
32345 "\xc5\xe1\x46\x8a\xfb\x5f\x7e\x25"
32346 "\x9b\xe2\xc3\x66\x41\x2b\xb3\xa5"
32347 "\x57\x0e\x94\x17\x26\x39\xbb\x54"
32348 "\xae\x2e\x6f\x42\xfb\x4d\x89\x6f"
32349 "\x9d\xf1\x16\x2e\xe3\xe7\xfc\xe3"
32350 "\xb2\x4b\x2b\xa6\x7c\x04\x69\x3a"
32351 "\x70\x5a\xa7\xf1\x31\x64\x19\xca"
32352 "\x45\x79\xd8\x58\x23\x61\xaf\xc2"
32353 "\x52\x05\xc3\x0b\xc1\x64\x7c\x81"
32354 "\xd9\x11\xcf\xff\x02\x3d\x51\x84"
32355 "\x01\xac\xc6\x2e\x34\x2b\x09\x3a"
32356 "\xa8\x5d\x98\x0e\x89\xd9\xef\x8f"
32357 "\xd9\xd7\x7d\xdd\x63\x47\x46\x7d"
32358 "\xa1\xda\x0b\x53\x7d\x79\xcd\xc9"
32359 "\x86\xdd\x6b\x13\xa1\x9a\x70\xdd"
32360 "\x5c\xa1\x69\x3c\xe4\x5d\xe3\x8c"
32361 "\xe5\xf4\x87\x9c\x10\xcf\x0f\x0b"
32362 "\xc8\x43\xdc\xf8\x1d\x62\x5e\x5b"
32363 "\xe2\x03\x06\xc5\x71\xb6\x48\xa5"
32364 "\xf0\x0f\x2d\xd5\xa2\x73\x55\x8f"
32365 "\x01\xa7\x59\x80\x5f\x11\x6c\x40"
32366 "\xff\xb1\xf2\xc6\x7e\x01\xbb\x1c"
32367 "\x69\x9c\xc9\x3f\x71\x5f\x07\x7e"
32368 "\xdf\x6f\x99\xca\x9c\xfd\xf9\xb9"
32369 "\x49\xe7\xcc\x91\xd5\x9b\x8f\x03"
32370 "\xae\xe7\x61\x32\xef\x41\x6c\x75"
32371 "\x84\x9b\x8c\xce\x1d\x6b\x93\x21"
32372 "\x41\xec\xc6\xad\x8e\x0c\x48\xa8"
32373 "\xe2\xf5\x57\xde\xf7\x38\xfd\x4a"
32374 "\x6f\xa7\x4a\xf9\xac\x7d\xb1\x85"
32375 "\x7d\x6c\x95\x0a\x5a\xcf\x68\xd2"
32376 "\xe0\x7a\x26\xd9\xc1\x6d\x3e\xc6"
32377 "\x37\xbd\xbe\x24\x36\x77\x9f\x1b"
32378 "\xc1\x22\xf3\x79\xae\x95\x78\x66"
32379 "\x97\x11\xc0\x1a\xf1\xe8\x0d\x38"
32380 "\x09\xc2\xee\xb7\xd3\x46\x7b\x59"
32381 "\x77\x23\xe8\xb4\x92\x3d\x78\xbe"
32382 "\xe2\x25\x63\xa5\x2a\x06\x70\x92"
32383 "\x32\x63\xf9\x19\x21\x68\xe1\x0b"
32384 "\x9a\xd0\xee\x21\xdb\x1f\xe0\xde"
32385 "\x3e\x64\x02\x4d\x0e\xe0\x0a\xa9"
32386 "\xed\x19\x8c\xa8\xbf\xe3\x2e\x75"
32387 "\x24\x2b\xb0\xe5\x82\x6a\x1e\x6f"
32388 "\x71\x2a\x3a\x60\xed\x06\x0d\x17"
32389 "\xa2\xdb\x29\x1d\xae\xb2\xc4\xfb"
32390 "\x94\x04\xd8\x58\xfc\xc4\x04\x4e"
32391 "\xee\xc7\xc1\x0f\xe9\x9b\x63\x2d"
32392 "\x02\x3e\x02\x67\xe5\xd8\xbb\x79"
32393 "\xdf\xd2\xeb\x50\xe9\x0a\x02\x46"
32394 "\xdf\x68\xcf\xe7\x2b\x0a\x56\xd6"
32395 "\xf7\xbc\x44\xad\xb8\xb5\x5f\xeb"
32396 "\xbc\x74\x6b\xe8\x7e\xb0\x60\xc6"
32397 "\x0d\x96\x09\xbb\x19\xba\xe0\x3c"
32398 "\xc4\x6c\xbf\x0f\x58\xc0\x55\x62"
32399 "\x23\xa0\xff\xb5\x1c\xfd\x18\xe1"
32400 "\xcf\x6d\xd3\x52\xb4\xce\xa6\xfa"
32401 "\xaa\xfb\x1b\x0b\x42\x6d\x79\x42"
32402 "\x48\x70\x5b\x0e\xdd\x3a\xc9\x69"
32403 "\x8b\x73\x67\xf6\x95\xdb\x8c\xfb"
32404 "\xfd\xb5\x08\x47\x42\x84\x9a\xfa"
32405 "\xcc\x67\xb2\x3c\xb6\xfd\xd8\x32"
32406 "\xd6\x04\xb6\x4a\xea\x53\x4b\xf5"
32407 "\x94\x16\xad\xf0\x10\x2e\x2d\xb4"
32408 "\x8b\xab\xe5\x89\xc7\x39\x12\xf3"
32409 "\x8d\xb5\x96\x0b\x87\x5d\xa7\x7c"
32410 "\xb0\xc2\xf6\x2e\x57\x97\x2c\xdc"
32411 "\x54\x1c\x34\x72\xde\x0c\x68\x39"
32412 "\x9d\x32\xa5\x75\x92\x13\x32\xea"
32413 "\x90\x27\xbd\x5b\x1d\xb9\x21\x02"
32414 "\x1c\xcc\xba\x97\x5e\x49\x58\xe8"
32415 "\xac\x8b\xf3\xce\x3c\xf0\x00\xe9"
32416 "\x6c\xae\xe9\x77\xdf\xf4\x02\xcd"
32417 "\x55\x25\x89\x9e\x90\xf3\x6b\x8f"
32418 "\xb7\xd6\x47\x98\x26\x2f\x31\x2f"
32419 "\x8d\xbf\x54\xcd\x99\xeb\x80\xd7"
32420 "\xac\xc3\x08\xc2\xa6\x32\xf1\x24"
32421 "\x76\x7c\x4f\x78\x53\x55\xfb\x00"
32422 "\x8a\xd6\x52\x53\x25\x45\xfb\x0a"
32423 "\x6b\xb9\xbe\x3c\x5e\x11\xcc\x6a"
32424 "\xdd\xfc\xa7\xc4\x79\x4d\xbd\xfb"
32425 "\xce\x3a\xf1\x7a\xda\xeb\xfe\x64"
32426 "\x28\x3d\x0f\xee\x80\xba\x0c\xf8"
32427 "\xe9\x5b\x3a\xd4\xae\xc9\xf3\x0e"
32428 "\xe8\x5d\xc5\x5c\x0b\x20\x20\xee"
32429 "\x40\x0d\xde\x07\xa7\x14\xb4\x90"
32430 "\xb6\xbd\x3b\xae\x7d\x2b\xa7\xc7"
32431 "\xdc\x0b\x4c\x5d\x65\xb0\xd2\xc5"
32432 "\x79\x61\x23\xe0\xa2\x99\x73\x55"
32433 "\xad\xc6\xfb\xc7\x54\xb5\x98\x1f"
32434 "\x8c\x86\xc2\x3f\xbe\x5e\xea\x64"
32435 "\xa3\x60\x18\x9f\x80\xaf\x52\x74"
32436 "\x1a\xfe\x22\xc2\x92\x67\x40\x02"
32437 "\x08\xee\x67\x5b\x67\xe0\x3d\xde"
32438 "\x7a\xaf\x8e\x28\xf3\x5e\x0e\xf4"
32439 "\x48\x56\xaa\x85\x22\xd8\x36\xed"
32440 "\x3b\x3d\x68\x69\x30\xbc\x71\x23"
32441 "\xb1\x6e\x61\x03\x89\x44\x03\xf4"
32442 "\x32\xaa\x4c\x40\x9f\x69\xfb\x70"
32443 "\x91\xcc\x1f\x11\xbd\x76\x67\xe6"
32444 "\x10\x8b\x29\x39\x68\xea\x4e\x6d"
32445 "\xae\xfb\x40\xcf\xe2\xd0\x0d\x8d"
32446 "\x6f\xed\x9b\x8d\x64\x7a\x94\x8e"
32447 "\x32\x38\x78\xeb\x7d\x5f\xf9\x4d"
32448 "\x13\xbe\x21\xea\x16\xe7\x5c\xee"
32449 "\xcd\xf6\x5f\xc6\x45\xb2\x8f\x2b"
32450 "\xb5\x93\x3e\x45\xdb\xfd\xa2\x6a"
32451 "\xec\x83\x92\x99\x87\x47\xe0\x7c"
32452 "\xa2\x7b\xc4\x2a\xcd\xc0\x81\x03"
32453 "\x98\xb0\x87\xb6\x86\x13\x64\x33"
32454 "\x4c\xd7\x99\xbf\xdb\x7b\x6e\xaa"
32455 "\x76\xcc\xa0\x74\x1b\xa3\x6e\x83"
32456 "\xd4\xba\x7a\x84\x9d\x91\x71\xcd"
32457 "\x60\x2d\x56\xfd\x26\x35\xcb\xeb"
32458 "\xac\xe9\xee\xa4\xfc\x18\x5b\x91"
32459 "\xd5\xfe\x84\x45\xe0\xc7\xfd\x11"
32460 "\xe9\x00\xb6\x54\xdf\xe1\x94\xde"
32461 "\x2b\x70\x9f\x94\x7f\x15\x0e\x83"
32462 "\x63\x10\xb3\xf5\xea\xd3\xe8\xd1"
32463 "\xa5\xfc\x17\x19\x68\x9a\xbc\x17"
32464 "\x30\x43\x0a\x1a\x33\x92\xd4\x2a"
32465 "\x2e\x68\x99\xbc\x49\xf0\x68\xe3"
32466 "\xf0\x1f\xcb\xcc\xfa\xbb\x05\x56"
32467 "\x46\x84\x8b\x69\x83\x64\xc5\xe0"
32468 "\xc5\x52\x99\x07\x3c\xa6\x5c\xaf"
32469 "\xa3\xde\xd7\xdb\x43\xe6\xb7\x76"
32470 "\x4e\x4d\xd6\x71\x60\x63\x4a\x0c"
32471 "\x5f\xae\x25\x84\x22\x90\x5f\x26"
32472 "\x61\x4d\x8f\xaf\xc9\x22\xf2\x05"
32473 "\xcf\xc1\xdc\x68\xe5\x57\x8e\x24"
32474 "\x1b\x30\x59\xca\xd7\x0d\xc3\xd3"
32475 "\x52\x9e\x09\x3e\x0e\xaf\xdb\x5f"
32476 "\xc7\x2b\xde\x3a\xfd\xad\x93\x04"
32477 "\x74\x06\x89\x0e\x90\xeb\x85\xff"
32478 "\xe6\x3c\x12\x42\xf4\xfa\x80\x75"
32479 "\x5e\x4e\xd7\x2f\x93\x0b\x34\x41"
32480 "\x02\x85\x68\xd0\x03\x12\xde\x92"
32481 "\x54\x7a\x7e\xfb\x55\xe7\x88\xfb"
32482 "\xa4\xa9\xf2\xd1\xc6\x70\x06\x37"
32483 "\x25\xee\xa7\x6e\xd9\x89\x86\x50"
32484 "\x2e\x07\xdb\xfb\x2a\x86\x45\x0e"
32485 "\x91\xf4\x7c\xbb\x12\x60\xe8\x3f"
32486 "\x71\xbe\x8f\x9d\x26\xef\xd9\x89"
32487 "\xc4\x8f\xd8\xc5\x73\xd8\x84\xaa"
32488 "\x2f\xad\x22\x1e\x7e\xcf\xa2\x08"
32489 "\x23\x45\x89\x42\xa0\x30\xeb\xbf"
32490 "\xa1\xed\xad\xd5\x76\xfa\x24\x8f"
32491 "\x98",
32492 .rlen = 1281,
Martin Willi3590ebf2015-06-01 13:43:57 +020032493 },
32494};
32495
Herbert Xuda7f0332008-07-31 17:08:25 +080032496/*
32497 * CTS (Cipher Text Stealing) mode tests
32498 */
32499#define CTS_MODE_ENC_TEST_VECTORS 6
32500#define CTS_MODE_DEC_TEST_VECTORS 6
32501static struct cipher_testvec cts_mode_enc_tv_template[] = {
32502 { /* from rfc3962 */
32503 .klen = 16,
32504 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32505 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32506 .ilen = 17,
32507 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32508 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32509 "\x20",
32510 .rlen = 17,
32511 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
32512 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
32513 "\x97",
32514 }, {
32515 .klen = 16,
32516 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32517 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32518 .ilen = 31,
32519 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32520 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32521 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32522 "\x20\x47\x61\x75\x27\x73\x20",
32523 .rlen = 31,
32524 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
32525 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
32526 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32527 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
32528 }, {
32529 .klen = 16,
32530 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32531 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32532 .ilen = 32,
32533 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32534 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32535 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32536 "\x20\x47\x61\x75\x27\x73\x20\x43",
32537 .rlen = 32,
32538 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32539 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32540 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32541 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
32542 }, {
32543 .klen = 16,
32544 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32545 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32546 .ilen = 47,
32547 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32548 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32549 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32550 "\x20\x47\x61\x75\x27\x73\x20\x43"
32551 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32552 "\x70\x6c\x65\x61\x73\x65\x2c",
32553 .rlen = 47,
32554 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32555 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32556 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
32557 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
32558 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32559 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
32560 }, {
32561 .klen = 16,
32562 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32563 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32564 .ilen = 48,
32565 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32566 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32567 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32568 "\x20\x47\x61\x75\x27\x73\x20\x43"
32569 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32570 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
32571 .rlen = 48,
32572 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32573 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32574 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32575 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
32576 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32577 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
32578 }, {
32579 .klen = 16,
32580 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32581 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32582 .ilen = 64,
32583 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32584 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32585 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32586 "\x20\x47\x61\x75\x27\x73\x20\x43"
32587 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32588 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
32589 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
32590 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
32591 .rlen = 64,
32592 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32593 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32594 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32595 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32596 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
32597 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
32598 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32599 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
32600 }
32601};
32602
32603static struct cipher_testvec cts_mode_dec_tv_template[] = {
32604 { /* from rfc3962 */
32605 .klen = 16,
32606 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32607 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32608 .rlen = 17,
32609 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32610 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32611 "\x20",
32612 .ilen = 17,
32613 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
32614 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
32615 "\x97",
32616 }, {
32617 .klen = 16,
32618 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32619 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32620 .rlen = 31,
32621 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32622 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32623 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32624 "\x20\x47\x61\x75\x27\x73\x20",
32625 .ilen = 31,
32626 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
32627 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
32628 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32629 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
32630 }, {
32631 .klen = 16,
32632 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32633 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32634 .rlen = 32,
32635 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32636 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32637 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32638 "\x20\x47\x61\x75\x27\x73\x20\x43",
32639 .ilen = 32,
32640 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32641 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32642 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32643 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
32644 }, {
32645 .klen = 16,
32646 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32647 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32648 .rlen = 47,
32649 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32650 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32651 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32652 "\x20\x47\x61\x75\x27\x73\x20\x43"
32653 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32654 "\x70\x6c\x65\x61\x73\x65\x2c",
32655 .ilen = 47,
32656 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32657 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32658 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
32659 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
32660 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32661 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
32662 }, {
32663 .klen = 16,
32664 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32665 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32666 .rlen = 48,
32667 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32668 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32669 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32670 "\x20\x47\x61\x75\x27\x73\x20\x43"
32671 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32672 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
32673 .ilen = 48,
32674 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32675 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32676 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32677 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
32678 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32679 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
32680 }, {
32681 .klen = 16,
32682 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32683 "\x74\x65\x72\x69\x79\x61\x6b\x69",
32684 .rlen = 64,
32685 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32686 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32687 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32688 "\x20\x47\x61\x75\x27\x73\x20\x43"
32689 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32690 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
32691 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
32692 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
32693 .ilen = 64,
32694 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32695 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32696 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32697 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32698 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
32699 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
32700 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32701 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
32702 }
32703};
32704
32705/*
32706 * Compression stuff.
32707 */
32708#define COMP_BUF_SIZE 512
32709
32710struct comp_testvec {
32711 int inlen, outlen;
32712 char input[COMP_BUF_SIZE];
32713 char output[COMP_BUF_SIZE];
32714};
32715
32716/*
32717 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110032718 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080032719 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080032720
Herbert Xuda7f0332008-07-31 17:08:25 +080032721#define DEFLATE_COMP_TEST_VECTORS 2
32722#define DEFLATE_DECOMP_TEST_VECTORS 2
32723
32724static struct comp_testvec deflate_comp_tv_template[] = {
32725 {
32726 .inlen = 70,
32727 .outlen = 38,
32728 .input = "Join us now and share the software "
32729 "Join us now and share the software ",
32730 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
32731 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
32732 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
32733 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
32734 "\x71\xbc\x08\x2b\x01\x00",
32735 }, {
32736 .inlen = 191,
32737 .outlen = 122,
32738 .input = "This document describes a compression method based on the DEFLATE"
32739 "compression algorithm. This document defines the application of "
32740 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
32741 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
32742 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
32743 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
32744 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
32745 "\x68\x12\x51\xae\x76\x67\xd6\x27"
32746 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
32747 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
32748 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
32749 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
32750 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
32751 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
32752 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
32753 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
32754 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
32755 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
32756 "\xfa\x02",
32757 },
32758};
32759
32760static struct comp_testvec deflate_decomp_tv_template[] = {
32761 {
32762 .inlen = 122,
32763 .outlen = 191,
32764 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
32765 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
32766 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
32767 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
32768 "\x68\x12\x51\xae\x76\x67\xd6\x27"
32769 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
32770 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
32771 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
32772 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
32773 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
32774 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
32775 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
32776 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
32777 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
32778 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
32779 "\xfa\x02",
32780 .output = "This document describes a compression method based on the DEFLATE"
32781 "compression algorithm. This document defines the application of "
32782 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
32783 }, {
32784 .inlen = 38,
32785 .outlen = 70,
32786 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
32787 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
32788 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
32789 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
32790 "\x71\xbc\x08\x2b\x01\x00",
32791 .output = "Join us now and share the software "
32792 "Join us now and share the software ",
32793 },
32794};
32795
Herbert Xuda7f0332008-07-31 17:08:25 +080032796/*
32797 * LZO test vectors (null-terminated strings).
32798 */
32799#define LZO_COMP_TEST_VECTORS 2
32800#define LZO_DECOMP_TEST_VECTORS 2
32801
32802static struct comp_testvec lzo_comp_tv_template[] = {
32803 {
32804 .inlen = 70,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032805 .outlen = 57,
Herbert Xuda7f0332008-07-31 17:08:25 +080032806 .input = "Join us now and share the software "
32807 "Join us now and share the software ",
32808 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032809 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
32810 "\x64\x20\x73\x68\x61\x72\x65\x20"
32811 "\x74\x68\x65\x20\x73\x6f\x66\x74"
32812 "\x77\x70\x01\x32\x88\x00\x0c\x65"
32813 "\x20\x74\x68\x65\x20\x73\x6f\x66"
32814 "\x74\x77\x61\x72\x65\x20\x11\x00"
32815 "\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080032816 }, {
32817 .inlen = 159,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032818 .outlen = 131,
Herbert Xuda7f0332008-07-31 17:08:25 +080032819 .input = "This document describes a compression method based on the LZO "
32820 "compression algorithm. This document defines the application of "
32821 "the LZO algorithm used in UBIFS.",
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032822 .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
Herbert Xuda7f0332008-07-31 17:08:25 +080032823 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
32824 "\x64\x65\x73\x63\x72\x69\x62\x65"
32825 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
32826 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
32827 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
32828 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020032829 "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
32830 "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
32831 "\x72\x69\x74\x68\x6d\x2e\x20\x20"
32832 "\x2e\x54\x01\x03\x66\x69\x6e\x65"
32833 "\x73\x20\x74\x06\x05\x61\x70\x70"
32834 "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
32835 "\x66\x88\x02\x60\x09\x27\xf0\x00"
32836 "\x0c\x20\x75\x73\x65\x64\x20\x69"
32837 "\x6e\x20\x55\x42\x49\x46\x53\x2e"
32838 "\x11\x00\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080032839 },
32840};
32841
32842static struct comp_testvec lzo_decomp_tv_template[] = {
32843 {
32844 .inlen = 133,
32845 .outlen = 159,
32846 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
32847 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
32848 "\x64\x65\x73\x63\x72\x69\x62\x65"
32849 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
32850 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
32851 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
32852 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
32853 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
32854 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
32855 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
32856 "\x68\x69\x73\x2a\x54\x01\x02\x66"
32857 "\x69\x6e\x65\x73\x94\x06\x05\x61"
32858 "\x70\x70\x6c\x69\x63\x61\x74\x76"
32859 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
32860 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
32861 "\x20\x69\x6e\x20\x55\x42\x49\x46"
32862 "\x53\x2e\x11\x00\x00",
32863 .output = "This document describes a compression method based on the LZO "
32864 "compression algorithm. This document defines the application of "
32865 "the LZO algorithm used in UBIFS.",
32866 }, {
32867 .inlen = 46,
32868 .outlen = 70,
32869 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
32870 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
32871 "\x64\x20\x73\x68\x61\x72\x65\x20"
32872 "\x74\x68\x65\x20\x73\x6f\x66\x74"
32873 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
32874 "\x3d\x88\x00\x11\x00\x00",
32875 .output = "Join us now and share the software "
32876 "Join us now and share the software ",
32877 },
32878};
32879
32880/*
32881 * Michael MIC test vectors from IEEE 802.11i
32882 */
32883#define MICHAEL_MIC_TEST_VECTORS 6
32884
32885static struct hash_testvec michael_mic_tv_template[] = {
32886 {
32887 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
32888 .ksize = 8,
32889 .plaintext = zeroed_string,
32890 .psize = 0,
32891 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
32892 },
32893 {
32894 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
32895 .ksize = 8,
32896 .plaintext = "M",
32897 .psize = 1,
32898 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
32899 },
32900 {
32901 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
32902 .ksize = 8,
32903 .plaintext = "Mi",
32904 .psize = 2,
32905 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
32906 },
32907 {
32908 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
32909 .ksize = 8,
32910 .plaintext = "Mic",
32911 .psize = 3,
32912 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
32913 },
32914 {
32915 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
32916 .ksize = 8,
32917 .plaintext = "Mich",
32918 .psize = 4,
32919 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
32920 },
32921 {
32922 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
32923 .ksize = 8,
32924 .plaintext = "Michael",
32925 .psize = 7,
32926 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
32927 }
32928};
32929
32930/*
Ard Biesheuvelebb34722015-05-04 11:00:17 +020032931 * CRC32 test vectors
32932 */
32933#define CRC32_TEST_VECTORS 14
32934
32935static struct hash_testvec crc32_tv_template[] = {
32936 {
32937 .key = "\x87\xa9\xcb\xed",
32938 .ksize = 4,
32939 .psize = 0,
32940 .digest = "\x87\xa9\xcb\xed",
32941 },
32942 {
32943 .key = "\xff\xff\xff\xff",
32944 .ksize = 4,
32945 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
32946 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
32947 "\x11\x12\x13\x14\x15\x16\x17\x18"
32948 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
32949 "\x21\x22\x23\x24\x25\x26\x27\x28",
32950 .psize = 40,
32951 .digest = "\x3a\xdf\x4b\xb0",
32952 },
32953 {
32954 .key = "\xff\xff\xff\xff",
32955 .ksize = 4,
32956 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32957 "\x31\x32\x33\x34\x35\x36\x37\x38"
32958 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32959 "\x41\x42\x43\x44\x45\x46\x47\x48"
32960 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
32961 .psize = 40,
32962 .digest = "\xa9\x7a\x7f\x7b",
32963 },
32964 {
32965 .key = "\xff\xff\xff\xff",
32966 .ksize = 4,
32967 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
32968 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32969 "\x61\x62\x63\x64\x65\x66\x67\x68"
32970 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32971 "\x71\x72\x73\x74\x75\x76\x77\x78",
32972 .psize = 40,
32973 .digest = "\xba\xd3\xf8\x1c",
32974 },
32975 {
32976 .key = "\xff\xff\xff\xff",
32977 .ksize = 4,
32978 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32979 "\x81\x82\x83\x84\x85\x86\x87\x88"
32980 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32981 "\x91\x92\x93\x94\x95\x96\x97\x98"
32982 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
32983 .psize = 40,
32984 .digest = "\xa8\xa9\xc2\x02",
32985 },
32986 {
32987 .key = "\xff\xff\xff\xff",
32988 .ksize = 4,
32989 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32990 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32991 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32992 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32993 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
32994 .psize = 40,
32995 .digest = "\x27\xf0\x57\xe2",
32996 },
32997 {
32998 .key = "\xff\xff\xff\xff",
32999 .ksize = 4,
33000 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33001 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33002 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33003 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33004 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33005 .psize = 40,
33006 .digest = "\x49\x78\x10\x08",
33007 },
33008 {
33009 .key = "\x80\xea\xd3\xf1",
33010 .ksize = 4,
33011 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33012 "\x31\x32\x33\x34\x35\x36\x37\x38"
33013 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33014 "\x41\x42\x43\x44\x45\x46\x47\x48"
33015 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
33016 .psize = 40,
33017 .digest = "\x9a\xb1\xdc\xf0",
33018 },
33019 {
33020 .key = "\xf3\x4a\x1d\x5d",
33021 .ksize = 4,
33022 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
33023 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33024 "\x61\x62\x63\x64\x65\x66\x67\x68"
33025 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33026 "\x71\x72\x73\x74\x75\x76\x77\x78",
33027 .psize = 40,
33028 .digest = "\xb4\x97\xcc\xd4",
33029 },
33030 {
33031 .key = "\x2e\x80\x04\x59",
33032 .ksize = 4,
33033 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33034 "\x81\x82\x83\x84\x85\x86\x87\x88"
33035 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33036 "\x91\x92\x93\x94\x95\x96\x97\x98"
33037 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
33038 .psize = 40,
33039 .digest = "\x67\x9b\xfa\x79",
33040 },
33041 {
33042 .key = "\xa6\xcc\x19\x85",
33043 .ksize = 4,
33044 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33045 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33046 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33047 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33048 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
33049 .psize = 40,
33050 .digest = "\x24\xb5\x16\xef",
33051 },
33052 {
33053 .key = "\x41\xfc\xfe\x2d",
33054 .ksize = 4,
33055 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33056 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33057 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33058 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33059 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33060 .psize = 40,
33061 .digest = "\x15\x94\x80\x39",
33062 },
33063 {
33064 .key = "\xff\xff\xff\xff",
33065 .ksize = 4,
33066 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33067 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33068 "\x11\x12\x13\x14\x15\x16\x17\x18"
33069 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33070 "\x21\x22\x23\x24\x25\x26\x27\x28"
33071 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33072 "\x31\x32\x33\x34\x35\x36\x37\x38"
33073 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33074 "\x41\x42\x43\x44\x45\x46\x47\x48"
33075 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
33076 "\x51\x52\x53\x54\x55\x56\x57\x58"
33077 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33078 "\x61\x62\x63\x64\x65\x66\x67\x68"
33079 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33080 "\x71\x72\x73\x74\x75\x76\x77\x78"
33081 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33082 "\x81\x82\x83\x84\x85\x86\x87\x88"
33083 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33084 "\x91\x92\x93\x94\x95\x96\x97\x98"
33085 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
33086 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33087 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33088 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33089 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33090 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
33091 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33092 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33093 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33094 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33095 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33096 .psize = 240,
33097 .digest = "\x6c\xc6\x56\xde",
33098 .np = 2,
33099 .tap = { 31, 209 }
33100 }, {
33101 .key = "\xff\xff\xff\xff",
33102 .ksize = 4,
33103 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
33104 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
33105 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
33106 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
33107 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
33108 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
33109 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
33110 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
33111 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
33112 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
33113 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
33114 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
33115 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
33116 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
33117 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
33118 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
33119 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
33120 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
33121 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
33122 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
33123 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
33124 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
33125 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
33126 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
33127 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
33128 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
33129 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
33130 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
33131 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
33132 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
33133 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
33134 "\x47\xde\x75\x0c\x80\x17\xae\x22"
33135 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
33136 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
33137 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
33138 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
33139 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
33140 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
33141 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
33142 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
33143 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
33144 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
33145 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
33146 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
33147 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
33148 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
33149 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
33150 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
33151 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
33152 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
33153 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
33154 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
33155 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
33156 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
33157 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
33158 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
33159 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
33160 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
33161 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
33162 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
33163 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
33164 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
33165 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
33166 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
33167 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
33168 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
33169 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
33170 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
33171 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
33172 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
33173 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
33174 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
33175 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
33176 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
33177 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
33178 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
33179 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
33180 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
33181 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
33182 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
33183 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
33184 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
33185 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
33186 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
33187 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
33188 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
33189 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
33190 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
33191 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
33192 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
33193 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
33194 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
33195 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
33196 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
33197 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
33198 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
33199 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
33200 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
33201 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
33202 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
33203 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
33204 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
33205 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
33206 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
33207 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
33208 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
33209 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
33210 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
33211 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
33212 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
33213 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
33214 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
33215 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
33216 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
33217 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
33218 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
33219 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
33220 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
33221 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
33222 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
33223 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
33224 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
33225 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
33226 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
33227 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
33228 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
33229 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
33230 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
33231 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
33232 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
33233 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
33234 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
33235 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
33236 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
33237 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
33238 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
33239 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
33240 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
33241 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
33242 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
33243 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
33244 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
33245 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
33246 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
33247 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
33248 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
33249 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
33250 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
33251 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
33252 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
33253 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
33254 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
33255 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
33256 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
33257 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
33258 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
33259 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
33260 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
33261 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
33262 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
33263 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
33264 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
33265 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
33266 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
33267 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
33268 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
33269 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
33270 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
33271 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
33272 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
33273 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
33274 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
33275 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
33276 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
33277 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
33278 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
33279 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
33280 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
33281 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
33282 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
33283 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
33284 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
33285 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
33286 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
33287 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
33288 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
33289 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
33290 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
33291 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
33292 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
33293 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
33294 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
33295 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
33296 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
33297 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
33298 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
33299 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
33300 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
33301 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
33302 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
33303 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
33304 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
33305 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
33306 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
33307 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
33308 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
33309 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
33310 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
33311 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
33312 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
33313 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
33314 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
33315 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
33316 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
33317 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
33318 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
33319 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
33320 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
33321 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
33322 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
33323 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
33324 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
33325 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
33326 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
33327 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
33328 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
33329 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
33330 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
33331 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
33332 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
33333 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
33334 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
33335 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
33336 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
33337 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
33338 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
33339 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
33340 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
33341 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
33342 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
33343 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
33344 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
33345 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
33346 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
33347 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
33348 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
33349 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
33350 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
33351 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
33352 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
33353 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
33354 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
33355 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
33356 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
33357 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
33358 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
33359 .psize = 2048,
33360 .digest = "\xfb\x3a\x7a\xda",
33361 }
33362};
33363
33364/*
Herbert Xuda7f0332008-07-31 17:08:25 +080033365 * CRC32C test vectors
33366 */
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020033367#define CRC32C_TEST_VECTORS 15
Herbert Xuda7f0332008-07-31 17:08:25 +080033368
33369static struct hash_testvec crc32c_tv_template[] = {
33370 {
33371 .psize = 0,
33372 .digest = "\x00\x00\x00\x00",
33373 },
33374 {
33375 .key = "\x87\xa9\xcb\xed",
33376 .ksize = 4,
33377 .psize = 0,
33378 .digest = "\x78\x56\x34\x12",
33379 },
33380 {
33381 .key = "\xff\xff\xff\xff",
33382 .ksize = 4,
33383 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33384 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33385 "\x11\x12\x13\x14\x15\x16\x17\x18"
33386 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33387 "\x21\x22\x23\x24\x25\x26\x27\x28",
33388 .psize = 40,
33389 .digest = "\x7f\x15\x2c\x0e",
33390 },
33391 {
33392 .key = "\xff\xff\xff\xff",
33393 .ksize = 4,
33394 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33395 "\x31\x32\x33\x34\x35\x36\x37\x38"
33396 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33397 "\x41\x42\x43\x44\x45\x46\x47\x48"
33398 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
33399 .psize = 40,
33400 .digest = "\xf6\xeb\x80\xe9",
33401 },
33402 {
33403 .key = "\xff\xff\xff\xff",
33404 .ksize = 4,
33405 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
33406 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33407 "\x61\x62\x63\x64\x65\x66\x67\x68"
33408 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33409 "\x71\x72\x73\x74\x75\x76\x77\x78",
33410 .psize = 40,
33411 .digest = "\xed\xbd\x74\xde",
33412 },
33413 {
33414 .key = "\xff\xff\xff\xff",
33415 .ksize = 4,
33416 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33417 "\x81\x82\x83\x84\x85\x86\x87\x88"
33418 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33419 "\x91\x92\x93\x94\x95\x96\x97\x98"
33420 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
33421 .psize = 40,
33422 .digest = "\x62\xc8\x79\xd5",
33423 },
33424 {
33425 .key = "\xff\xff\xff\xff",
33426 .ksize = 4,
33427 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33428 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33429 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33430 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33431 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
33432 .psize = 40,
33433 .digest = "\xd0\x9a\x97\xba",
33434 },
33435 {
33436 .key = "\xff\xff\xff\xff",
33437 .ksize = 4,
33438 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33439 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33440 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33441 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33442 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33443 .psize = 40,
33444 .digest = "\x13\xd9\x29\x2b",
33445 },
33446 {
33447 .key = "\x80\xea\xd3\xf1",
33448 .ksize = 4,
33449 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33450 "\x31\x32\x33\x34\x35\x36\x37\x38"
33451 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33452 "\x41\x42\x43\x44\x45\x46\x47\x48"
33453 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
33454 .psize = 40,
33455 .digest = "\x0c\xb5\xe2\xa2",
33456 },
33457 {
33458 .key = "\xf3\x4a\x1d\x5d",
33459 .ksize = 4,
33460 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
33461 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33462 "\x61\x62\x63\x64\x65\x66\x67\x68"
33463 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33464 "\x71\x72\x73\x74\x75\x76\x77\x78",
33465 .psize = 40,
33466 .digest = "\xd1\x7f\xfb\xa6",
33467 },
33468 {
33469 .key = "\x2e\x80\x04\x59",
33470 .ksize = 4,
33471 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33472 "\x81\x82\x83\x84\x85\x86\x87\x88"
33473 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33474 "\x91\x92\x93\x94\x95\x96\x97\x98"
33475 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
33476 .psize = 40,
33477 .digest = "\x59\x33\xe6\x7a",
33478 },
33479 {
33480 .key = "\xa6\xcc\x19\x85",
33481 .ksize = 4,
33482 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33483 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33484 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33485 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33486 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
33487 .psize = 40,
33488 .digest = "\xbe\x03\x01\xd2",
33489 },
33490 {
33491 .key = "\x41\xfc\xfe\x2d",
33492 .ksize = 4,
33493 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33494 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33495 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33496 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33497 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33498 .psize = 40,
33499 .digest = "\x75\xd3\xc5\x24",
33500 },
33501 {
33502 .key = "\xff\xff\xff\xff",
33503 .ksize = 4,
33504 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33505 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33506 "\x11\x12\x13\x14\x15\x16\x17\x18"
33507 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33508 "\x21\x22\x23\x24\x25\x26\x27\x28"
33509 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33510 "\x31\x32\x33\x34\x35\x36\x37\x38"
33511 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33512 "\x41\x42\x43\x44\x45\x46\x47\x48"
33513 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
33514 "\x51\x52\x53\x54\x55\x56\x57\x58"
33515 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33516 "\x61\x62\x63\x64\x65\x66\x67\x68"
33517 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33518 "\x71\x72\x73\x74\x75\x76\x77\x78"
33519 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33520 "\x81\x82\x83\x84\x85\x86\x87\x88"
33521 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33522 "\x91\x92\x93\x94\x95\x96\x97\x98"
33523 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
33524 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33525 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33526 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33527 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33528 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
33529 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33530 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33531 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33532 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33533 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33534 .psize = 240,
33535 .digest = "\x75\xd3\xc5\x24",
33536 .np = 2,
33537 .tap = { 31, 209 }
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020033538 }, {
33539 .key = "\xff\xff\xff\xff",
33540 .ksize = 4,
33541 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
33542 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
33543 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
33544 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
33545 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
33546 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
33547 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
33548 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
33549 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
33550 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
33551 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
33552 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
33553 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
33554 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
33555 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
33556 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
33557 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
33558 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
33559 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
33560 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
33561 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
33562 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
33563 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
33564 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
33565 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
33566 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
33567 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
33568 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
33569 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
33570 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
33571 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
33572 "\x47\xde\x75\x0c\x80\x17\xae\x22"
33573 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
33574 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
33575 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
33576 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
33577 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
33578 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
33579 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
33580 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
33581 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
33582 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
33583 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
33584 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
33585 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
33586 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
33587 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
33588 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
33589 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
33590 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
33591 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
33592 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
33593 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
33594 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
33595 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
33596 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
33597 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
33598 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
33599 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
33600 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
33601 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
33602 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
33603 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
33604 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
33605 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
33606 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
33607 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
33608 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
33609 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
33610 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
33611 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
33612 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
33613 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
33614 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
33615 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
33616 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
33617 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
33618 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
33619 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
33620 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
33621 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
33622 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
33623 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
33624 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
33625 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
33626 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
33627 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
33628 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
33629 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
33630 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
33631 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
33632 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
33633 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
33634 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
33635 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
33636 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
33637 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
33638 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
33639 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
33640 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
33641 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
33642 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
33643 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
33644 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
33645 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
33646 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
33647 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
33648 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
33649 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
33650 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
33651 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
33652 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
33653 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
33654 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
33655 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
33656 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
33657 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
33658 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
33659 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
33660 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
33661 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
33662 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
33663 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
33664 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
33665 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
33666 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
33667 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
33668 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
33669 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
33670 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
33671 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
33672 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
33673 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
33674 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
33675 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
33676 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
33677 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
33678 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
33679 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
33680 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
33681 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
33682 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
33683 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
33684 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
33685 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
33686 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
33687 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
33688 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
33689 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
33690 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
33691 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
33692 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
33693 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
33694 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
33695 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
33696 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
33697 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
33698 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
33699 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
33700 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
33701 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
33702 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
33703 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
33704 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
33705 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
33706 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
33707 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
33708 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
33709 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
33710 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
33711 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
33712 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
33713 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
33714 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
33715 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
33716 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
33717 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
33718 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
33719 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
33720 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
33721 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
33722 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
33723 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
33724 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
33725 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
33726 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
33727 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
33728 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
33729 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
33730 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
33731 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
33732 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
33733 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
33734 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
33735 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
33736 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
33737 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
33738 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
33739 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
33740 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
33741 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
33742 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
33743 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
33744 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
33745 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
33746 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
33747 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
33748 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
33749 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
33750 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
33751 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
33752 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
33753 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
33754 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
33755 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
33756 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
33757 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
33758 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
33759 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
33760 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
33761 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
33762 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
33763 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
33764 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
33765 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
33766 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
33767 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
33768 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
33769 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
33770 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
33771 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
33772 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
33773 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
33774 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
33775 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
33776 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
33777 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
33778 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
33779 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
33780 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
33781 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
33782 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
33783 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
33784 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
33785 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
33786 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
33787 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
33788 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
33789 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
33790 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
33791 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
33792 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
33793 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
33794 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
33795 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
33796 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
33797 .psize = 2048,
33798 .digest = "\xec\x26\x4d\x95",
33799 }
Herbert Xuda7f0332008-07-31 17:08:25 +080033800};
33801
Sonic Zhanga482b082012-05-25 17:54:13 +080033802/*
33803 * Blakcifn CRC test vectors
33804 */
33805#define BFIN_CRC_TEST_VECTORS 6
33806
33807static struct hash_testvec bfin_crc_tv_template[] = {
33808 {
33809 .psize = 0,
33810 .digest = "\x00\x00\x00\x00",
33811 },
33812 {
33813 .key = "\x87\xa9\xcb\xed",
33814 .ksize = 4,
33815 .psize = 0,
33816 .digest = "\x87\xa9\xcb\xed",
33817 },
33818 {
33819 .key = "\xff\xff\xff\xff",
33820 .ksize = 4,
33821 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33822 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33823 "\x11\x12\x13\x14\x15\x16\x17\x18"
33824 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33825 "\x21\x22\x23\x24\x25\x26\x27\x28",
33826 .psize = 40,
33827 .digest = "\x84\x0c\x8d\xa2",
33828 },
33829 {
33830 .key = "\xff\xff\xff\xff",
33831 .ksize = 4,
33832 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33833 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33834 "\x11\x12\x13\x14\x15\x16\x17\x18"
33835 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33836 "\x21\x22\x23\x24\x25\x26",
33837 .psize = 38,
33838 .digest = "\x8c\x58\xec\xb7",
33839 },
33840 {
33841 .key = "\xff\xff\xff\xff",
33842 .ksize = 4,
33843 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33844 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33845 "\x11\x12\x13\x14\x15\x16\x17\x18"
33846 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33847 "\x21\x22\x23\x24\x25\x26\x27",
33848 .psize = 39,
33849 .digest = "\xdc\x50\x28\x7b",
33850 },
33851 {
33852 .key = "\xff\xff\xff\xff",
33853 .ksize = 4,
33854 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33855 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33856 "\x11\x12\x13\x14\x15\x16\x17\x18"
33857 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33858 "\x21\x22\x23\x24\x25\x26\x27\x28"
33859 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33860 "\x31\x32\x33\x34\x35\x36\x37\x38"
33861 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33862 "\x41\x42\x43\x44\x45\x46\x47\x48"
33863 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
33864 "\x51\x52\x53\x54\x55\x56\x57\x58"
33865 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33866 "\x61\x62\x63\x64\x65\x66\x67\x68"
33867 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33868 "\x71\x72\x73\x74\x75\x76\x77\x78"
33869 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33870 "\x81\x82\x83\x84\x85\x86\x87\x88"
33871 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33872 "\x91\x92\x93\x94\x95\x96\x97\x98"
33873 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
33874 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33875 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33876 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33877 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33878 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
33879 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33880 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33881 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33882 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33883 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33884 .psize = 240,
33885 .digest = "\x10\x19\x4a\x5c",
33886 .np = 2,
33887 .tap = { 31, 209 }
33888 },
33889
33890};
33891
KOVACS Krisztian1443cc92014-08-22 10:44:36 +020033892#define LZ4_COMP_TEST_VECTORS 1
33893#define LZ4_DECOMP_TEST_VECTORS 1
33894
33895static struct comp_testvec lz4_comp_tv_template[] = {
33896 {
33897 .inlen = 70,
33898 .outlen = 45,
33899 .input = "Join us now and share the software "
33900 "Join us now and share the software ",
33901 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33902 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33903 "\x64\x20\x73\x68\x61\x72\x65\x20"
33904 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33905 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33906 "\x77\x61\x72\x65\x20",
33907 },
33908};
33909
33910static struct comp_testvec lz4_decomp_tv_template[] = {
33911 {
33912 .inlen = 45,
33913 .outlen = 70,
33914 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33915 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33916 "\x64\x20\x73\x68\x61\x72\x65\x20"
33917 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33918 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33919 "\x77\x61\x72\x65\x20",
33920 .output = "Join us now and share the software "
33921 "Join us now and share the software ",
33922 },
33923};
33924
33925#define LZ4HC_COMP_TEST_VECTORS 1
33926#define LZ4HC_DECOMP_TEST_VECTORS 1
33927
33928static struct comp_testvec lz4hc_comp_tv_template[] = {
33929 {
33930 .inlen = 70,
33931 .outlen = 45,
33932 .input = "Join us now and share the software "
33933 "Join us now and share the software ",
33934 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33935 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33936 "\x64\x20\x73\x68\x61\x72\x65\x20"
33937 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33938 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33939 "\x77\x61\x72\x65\x20",
33940 },
33941};
33942
33943static struct comp_testvec lz4hc_decomp_tv_template[] = {
33944 {
33945 .inlen = 45,
33946 .outlen = 70,
33947 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33948 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33949 "\x64\x20\x73\x68\x61\x72\x65\x20"
33950 "\x74\x68\x65\x20\x73\x6f\x66\x74"
33951 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33952 "\x77\x61\x72\x65\x20",
33953 .output = "Join us now and share the software "
33954 "Join us now and share the software ",
33955 },
33956};
33957
Herbert Xuda7f0332008-07-31 17:08:25 +080033958#endif /* _CRYPTO_TESTMGR_H */