blob: 868edf11704142deec8e05c44a2edfb37661ad27 [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>
28#include <linux/zlib.h>
29
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080030#include <crypto/compress.h>
31
Herbert Xuda7f0332008-07-31 17:08:25 +080032#define MAX_DIGEST_SIZE 64
33#define MAX_TAP 8
34
Horia Geanta29b77e52014-07-23 11:59:38 +030035#define MAX_KEYLEN 160
Herbert Xuda7f0332008-07-31 17:08:25 +080036#define MAX_IVLEN 32
37
38struct hash_testvec {
39 /* only used with keyed hash algorithms */
40 char *key;
41 char *plaintext;
42 char *digest;
43 unsigned char tap[MAX_TAP];
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020044 unsigned short psize;
Herbert Xuda7f0332008-07-31 17:08:25 +080045 unsigned char np;
46 unsigned char ksize;
47};
48
LABBE Corentina7eed152015-06-05 11:39:22 +020049/*
50 * cipher_testvec: structure to describe a cipher test
51 * @key: A pointer to a key used by the test
52 * @klen: The length of @key
53 * @iv: A pointer to the IV used by the test
54 * @input: A pointer to data used as input
55 * @ilen The length of data in @input
56 * @result: A pointer to what the test need to produce
57 * @rlen: The length of data in @result
58 * @fail: If set to one, the test need to fail
59 * @wk: Does the test need CRYPTO_TFM_REQ_WEAK_KEY
60 * ( e.g. test needs to fail due to a weak key )
61 * @np: numbers of SG to distribute data in (from 1 to MAX_TAP)
62 * @tap: How to distribute data in @np SGs
63 * @also_non_np: if set to 1, the test will be also done without
64 * splitting data in @np SGs
65 */
66
Herbert Xuda7f0332008-07-31 17:08:25 +080067struct cipher_testvec {
68 char *key;
69 char *iv;
70 char *input;
71 char *result;
72 unsigned short tap[MAX_TAP];
73 int np;
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030074 unsigned char also_non_np;
David Howells09e21782015-04-28 15:36:36 +010075 bool fail;
Herbert Xuda7f0332008-07-31 17:08:25 +080076 unsigned char wk; /* weak key flag */
77 unsigned char klen;
78 unsigned short ilen;
79 unsigned short rlen;
80};
81
82struct aead_testvec {
83 char *key;
84 char *iv;
85 char *input;
86 char *assoc;
87 char *result;
88 unsigned char tap[MAX_TAP];
89 unsigned char atap[MAX_TAP];
90 int np;
91 int anp;
David Howells09e21782015-04-28 15:36:36 +010092 bool fail;
Jarod Wilsone44a1b42009-05-04 19:22:11 +080093 unsigned char novrfy; /* ccm dec verification failure expected */
Herbert Xuda7f0332008-07-31 17:08:25 +080094 unsigned char wk; /* weak key flag */
95 unsigned char klen;
96 unsigned short ilen;
97 unsigned short alen;
98 unsigned short rlen;
99};
100
Jarod Wilson7647d6c2009-05-04 19:44:50 +0800101struct cprng_testvec {
102 char *key;
103 char *dt;
104 char *v;
105 char *result;
106 unsigned char klen;
107 unsigned short dtlen;
108 unsigned short vlen;
109 unsigned short rlen;
110 unsigned short loops;
111};
112
Stephan Mueller3332ee22014-05-31 17:24:38 +0200113struct drbg_testvec {
114 unsigned char *entropy;
115 size_t entropylen;
116 unsigned char *entpra;
117 unsigned char *entprb;
118 size_t entprlen;
119 unsigned char *addtla;
120 unsigned char *addtlb;
121 size_t addtllen;
122 unsigned char *pers;
123 size_t perslen;
124 unsigned char *expected;
125 size_t expectedlen;
126};
127
Tadeusz Struk946cc462015-06-16 10:31:06 -0700128struct akcipher_testvec {
129 unsigned char *key;
130 unsigned char *m;
131 unsigned char *c;
132 unsigned int key_len;
133 unsigned int m_size;
134 unsigned int c_size;
135 bool public_key_vec;
136};
137
Herbert Xuda7f0332008-07-31 17:08:25 +0800138static char zeroed_string[48];
139
140/*
Tadeusz Struk946cc462015-06-16 10:31:06 -0700141 * RSA test vectors. Borrowed from openSSL.
142 */
143#ifdef CONFIG_CRYPTO_FIPS
144#define RSA_TEST_VECTORS 2
145#else
146#define RSA_TEST_VECTORS 4
147#endif
148static struct akcipher_testvec rsa_tv_template[] = {
149 {
150#ifndef CONFIG_CRYPTO_FIPS
151 .key =
152 "\x30\x81\x88" /* sequence of 136 bytes */
153 "\x02\x41" /* modulus - integer of 65 bytes */
154 "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
155 "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
156 "\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93"
157 "\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1"
158 "\xF5"
159 "\x02\x01\x11" /* public key - integer of 1 byte */
160 "\x02\x40" /* private key - integer of 64 bytes */
161 "\x0A\x03\x37\x48\x62\x64\x87\x69\x5F\x5F\x30\xBC\x38\xB9\x8B\x44"
162 "\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64"
163 "\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9"
164 "\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51",
165 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
166 .c =
167 "\x63\x1c\xcd\x7b\xe1\x7e\xe4\xde\xc9\xa8\x89\xa1\x74\xcb\x3c\x63"
168 "\x7d\x24\xec\x83\xc3\x15\xe4\x7f\x73\x05\x34\xd1\xec\x22\xbb\x8a"
169 "\x5e\x32\x39\x6d\xc1\x1d\x7d\x50\x3b\x9f\x7a\xad\xf0\x2e\x25\x53"
170 "\x9f\x6e\xbd\x4c\x55\x84\x0c\x9b\xcf\x1a\x4b\x51\x1e\x9e\x0c\x06",
171 .key_len = 139,
172 .m_size = 8,
173 .c_size = 64,
174 }, {
175 .key =
176 "\x30\x82\x01\x0B" /* sequence of 267 bytes */
177 "\x02\x81\x81" /* modulus - integer of 129 bytes */
178 "\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
179 "\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
180 "\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD"
181 "\x48\x76\xED\x52\x0D\x60\xE1\xEC\x46\x19\x71\x9D\x8A\x5B\x8B\x80"
182 "\x7F\xAF\xB8\xE0\xA3\xDF\xC7\x37\x72\x3E\xE6\xB4\xB7\xD9\x3A\x25"
183 "\x84\xEE\x6A\x64\x9D\x06\x09\x53\x74\x88\x34\xB2\x45\x45\x98\x39"
184 "\x4E\xE0\xAA\xB1\x2D\x7B\x61\xA5\x1F\x52\x7A\x9A\x41\xF6\xC1\x68"
185 "\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD"
186 "\xCB"
187 "\x02\x01\x11" /* public key - integer of 1 byte */
188 "\x02\x81\x81" /* private key - integer of 129 bytes */
189 "\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD"
190 "\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41"
191 "\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69"
192 "\xD6\x87\x0D\xA2\xC0\x82\xA9\x39\xE3\x7F\xDC\xB8\x2E\xC9\x3E\xDA"
193 "\xC9\x7F\xF3\xAD\x59\x50\xAC\xCF\xBC\x11\x1C\x76\xF1\xA9\x52\x94"
194 "\x44\xE5\x6A\xAF\x68\xC5\x6C\x09\x2C\xD3\x8D\xC3\xBE\xF5\xD2\x0A"
195 "\x93\x99\x26\xED\x4F\x74\xA1\x3E\xDD\xFB\xE1\xA1\xCE\xCC\x48\x94"
196 "\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3"
197 "\xC1",
198 .key_len = 271,
199 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
200 .c =
201 "\x74\x1b\x55\xac\x47\xb5\x08\x0a\x6e\x2b\x2d\xf7\x94\xb8\x8a\x95"
202 "\xed\xa3\x6b\xc9\x29\xee\xb2\x2c\x80\xc3\x39\x3b\x8c\x62\x45\x72"
203 "\xc2\x7f\x74\x81\x91\x68\x44\x48\x5a\xdc\xa0\x7e\xa7\x0b\x05\x7f"
204 "\x0e\xa0\x6c\xe5\x8f\x19\x4d\xce\x98\x47\x5f\xbd\x5f\xfe\xe5\x34"
205 "\x59\x89\xaf\xf0\xba\x44\xd7\xf1\x1a\x50\x72\xef\x5e\x4a\xb6\xb7"
206 "\x54\x34\xd1\xc4\x83\x09\xdf\x0f\x91\x5f\x7d\x91\x70\x2f\xd4\x13"
207 "\xcc\x5e\xa4\x6c\xc3\x4d\x28\xef\xda\xaf\xec\x14\x92\xfc\xa3\x75"
208 "\x13\xb4\xc1\xa1\x11\xfc\x40\x2f\x4c\x9d\xdf\x16\x76\x11\x20\x6b",
209 .m_size = 8,
210 .c_size = 128,
211 }, {
212#endif
213 .key =
214 "\x30\x82\x02\x0D" /* sequence of 525 bytes */
215 "\x02\x82\x01\x00" /* modulus - integer of 256 bytes */
216 "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
217 "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
218 "\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D"
219 "\x41\xE4\x25\x99\xAC\xFC\xD2\x0F\x02\xD3\xD1\x54\x06\x1A\x51\x77"
220 "\xBD\xB6\xBF\xEA\xA7\x5C\x06\xA9\x5D\x69\x84\x45\xD7\xF5\x05\xBA"
221 "\x47\xF0\x1B\xD7\x2B\x24\xEC\xCB\x9B\x1B\x10\x8D\x81\xA0\xBE\xB1"
222 "\x8C\x33\xE4\x36\xB8\x43\xEB\x19\x2A\x81\x8D\xDE\x81\x0A\x99\x48"
223 "\xB6\xF6\xBC\xCD\x49\x34\x3A\x8F\x26\x94\xE3\x28\x82\x1A\x7C\x8F"
224 "\x59\x9F\x45\xE8\x5D\x1A\x45\x76\x04\x56\x05\xA1\xD0\x1B\x8C\x77"
225 "\x6D\xAF\x53\xFA\x71\xE2\x67\xE0\x9A\xFE\x03\xA9\x85\xD2\xC9\xAA"
226 "\xBA\x2A\xBC\xF4\xA0\x08\xF5\x13\x98\x13\x5D\xF0\xD9\x33\x34\x2A"
227 "\x61\xC3\x89\x55\xF0\xAE\x1A\x9C\x22\xEE\x19\x05\x8D\x32\xFE\xEC"
228 "\x9C\x84\xBA\xB7\xF9\x6C\x3A\x4F\x07\xFC\x45\xEB\x12\xE5\x7B\xFD"
229 "\x55\xE6\x29\x69\xD1\xC2\xE8\xB9\x78\x59\xF6\x79\x10\xC6\x4E\xEB"
230 "\x6A\x5E\xB9\x9A\xC7\xC4\x5B\x63\xDA\xA3\x3F\x5E\x92\x7A\x81\x5E"
231 "\xD6\xB0\xE2\x62\x8F\x74\x26\xC2\x0C\xD3\x9A\x17\x47\xE6\x8E\xAB"
232 "\x02\x03\x01\x00\x01" /* public key - integer of 3 bytes */
233 "\x02\x82\x01\x00" /* private key - integer of 256 bytes */
234 "\x52\x41\xF4\xDA\x7B\xB7\x59\x55\xCA\xD4\x2F\x0F\x3A\xCB\xA4\x0D"
235 "\x93\x6C\xCC\x9D\xC1\xB2\xFB\xFD\xAE\x40\x31\xAC\x69\x52\x21\x92"
236 "\xB3\x27\xDF\xEA\xEE\x2C\x82\xBB\xF7\x40\x32\xD5\x14\xC4\x94\x12"
237 "\xEC\xB8\x1F\xCA\x59\xE3\xC1\x78\xF3\x85\xD8\x47\xA5\xD7\x02\x1A"
238 "\x65\x79\x97\x0D\x24\xF4\xF0\x67\x6E\x75\x2D\xBF\x10\x3D\xA8\x7D"
239 "\xEF\x7F\x60\xE4\xE6\x05\x82\x89\x5D\xDF\xC6\xD2\x6C\x07\x91\x33"
240 "\x98\x42\xF0\x02\x00\x25\x38\xC5\x85\x69\x8A\x7D\x2F\x95\x6C\x43"
241 "\x9A\xB8\x81\xE2\xD0\x07\x35\xAA\x05\x41\xC9\x1E\xAF\xE4\x04\x3B"
242 "\x19\xB8\x73\xA2\xAC\x4B\x1E\x66\x48\xD8\x72\x1F\xAC\xF6\xCB\xBC"
243 "\x90\x09\xCA\xEC\x0C\xDC\xF9\x2C\xD7\xEB\xAE\xA3\xA4\x47\xD7\x33"
244 "\x2F\x8A\xCA\xBC\x5E\xF0\x77\xE4\x97\x98\x97\xC7\x10\x91\x7D\x2A"
245 "\xA6\xFF\x46\x83\x97\xDE\xE9\xE2\x17\x03\x06\x14\xE2\xD7\xB1\x1D"
246 "\x77\xAF\x51\x27\x5B\x5E\x69\xB8\x81\xE6\x11\xC5\x43\x23\x81\x04"
247 "\x62\xFF\xE9\x46\xB8\xD8\x44\xDB\xA5\xCC\x31\x54\x34\xCE\x3E\x82"
248 "\xD6\xBF\x7A\x0B\x64\x21\x6D\x88\x7E\x5B\x45\x12\x1E\x63\x8D\x49"
249 "\xA7\x1D\xD9\x1E\x06\xCD\xE8\xBA\x2C\x8C\x69\x32\xEA\xBE\x60\x71",
250 .key_len = 529,
251 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
252 .c =
253 "\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe"
254 "\xcf\x49\xbc\x48\xd3\x6c\x8f\x0a\x0e\xc1\x73\xbd\x7b\x55\x79\x36"
255 "\x0e\xa1\x87\x88\xb9\x2c\x90\xa6\x53\x5e\xe9\xef\xc4\xe2\x4d\xdd"
256 "\xf7\xa6\x69\x82\x3f\x56\xa4\x7b\xfb\x62\xe0\xae\xb8\xd3\x04\xb3"
257 "\xac\x5a\x15\x2a\xe3\x19\x9b\x03\x9a\x0b\x41\xda\x64\xec\x0a\x69"
258 "\xfc\xf2\x10\x92\xf3\xc1\xbf\x84\x7f\xfd\x2c\xae\xc8\xb5\xf6\x41"
259 "\x70\xc5\x47\x03\x8a\xf8\xff\x6f\x3f\xd2\x6f\x09\xb4\x22\xf3\x30"
260 "\xbe\xa9\x85\xcb\x9c\x8d\xf9\x8f\xeb\x32\x91\xa2\x25\x84\x8f\xf5"
261 "\xdc\xc7\x06\x9c\x2d\xe5\x11\x2c\x09\x09\x87\x09\xa9\xf6\x33\x73"
262 "\x90\xf1\x60\xf2\x65\xdd\x30\xa5\x66\xce\x62\x7b\xd0\xf8\x2d\x3d"
263 "\x19\x82\x77\xe3\x0a\x5f\x75\x2f\x8e\xb1\xe5\xe8\x91\x35\x1b\x3b"
264 "\x33\xb7\x66\x92\xd1\xf2\x8e\x6f\xe5\x75\x0c\xad\x36\xfb\x4e\xd0"
265 "\x66\x61\xbd\x49\xfe\xf4\x1a\xa2\x2b\x49\xfe\x03\x4c\x74\x47\x8d"
266 "\x9a\x66\xb2\x49\x46\x4d\x77\xea\x33\x4d\x6b\x3c\xb4\x49\x4a\xc6"
267 "\x7d\x3d\xb5\xb9\x56\x41\x15\x67\x0f\x94\x3c\x93\x65\x27\xe0\x21"
268 "\x5d\x59\xc3\x62\xd5\xa6\xda\x38\x26\x22\x5e\x34\x1c\x94\xaf\x98",
269 .m_size = 8,
270 .c_size = 256,
271 }, {
272 .key =
273 "\x30\x82\x01\x09" /* sequence of 265 bytes */
274 "\x02\x82\x01\x00" /* modulus - integer of 256 bytes */
275 "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
276 "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
277 "\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D"
278 "\x41\xE4\x25\x99\xAC\xFC\xD2\x0F\x02\xD3\xD1\x54\x06\x1A\x51\x77"
279 "\xBD\xB6\xBF\xEA\xA7\x5C\x06\xA9\x5D\x69\x84\x45\xD7\xF5\x05\xBA"
280 "\x47\xF0\x1B\xD7\x2B\x24\xEC\xCB\x9B\x1B\x10\x8D\x81\xA0\xBE\xB1"
281 "\x8C\x33\xE4\x36\xB8\x43\xEB\x19\x2A\x81\x8D\xDE\x81\x0A\x99\x48"
282 "\xB6\xF6\xBC\xCD\x49\x34\x3A\x8F\x26\x94\xE3\x28\x82\x1A\x7C\x8F"
283 "\x59\x9F\x45\xE8\x5D\x1A\x45\x76\x04\x56\x05\xA1\xD0\x1B\x8C\x77"
284 "\x6D\xAF\x53\xFA\x71\xE2\x67\xE0\x9A\xFE\x03\xA9\x85\xD2\xC9\xAA"
285 "\xBA\x2A\xBC\xF4\xA0\x08\xF5\x13\x98\x13\x5D\xF0\xD9\x33\x34\x2A"
286 "\x61\xC3\x89\x55\xF0\xAE\x1A\x9C\x22\xEE\x19\x05\x8D\x32\xFE\xEC"
287 "\x9C\x84\xBA\xB7\xF9\x6C\x3A\x4F\x07\xFC\x45\xEB\x12\xE5\x7B\xFD"
288 "\x55\xE6\x29\x69\xD1\xC2\xE8\xB9\x78\x59\xF6\x79\x10\xC6\x4E\xEB"
289 "\x6A\x5E\xB9\x9A\xC7\xC4\x5B\x63\xDA\xA3\x3F\x5E\x92\x7A\x81\x5E"
290 "\xD6\xB0\xE2\x62\x8F\x74\x26\xC2\x0C\xD3\x9A\x17\x47\xE6\x8E\xAB"
291 "\x02\x03\x01\x00\x01", /* public key - integer of 3 bytes */
292 .key_len = 269,
293 .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
294 .c =
295 "\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe"
296 "\xcf\x49\xbc\x48\xd3\x6c\x8f\x0a\x0e\xc1\x73\xbd\x7b\x55\x79\x36"
297 "\x0e\xa1\x87\x88\xb9\x2c\x90\xa6\x53\x5e\xe9\xef\xc4\xe2\x4d\xdd"
298 "\xf7\xa6\x69\x82\x3f\x56\xa4\x7b\xfb\x62\xe0\xae\xb8\xd3\x04\xb3"
299 "\xac\x5a\x15\x2a\xe3\x19\x9b\x03\x9a\x0b\x41\xda\x64\xec\x0a\x69"
300 "\xfc\xf2\x10\x92\xf3\xc1\xbf\x84\x7f\xfd\x2c\xae\xc8\xb5\xf6\x41"
301 "\x70\xc5\x47\x03\x8a\xf8\xff\x6f\x3f\xd2\x6f\x09\xb4\x22\xf3\x30"
302 "\xbe\xa9\x85\xcb\x9c\x8d\xf9\x8f\xeb\x32\x91\xa2\x25\x84\x8f\xf5"
303 "\xdc\xc7\x06\x9c\x2d\xe5\x11\x2c\x09\x09\x87\x09\xa9\xf6\x33\x73"
304 "\x90\xf1\x60\xf2\x65\xdd\x30\xa5\x66\xce\x62\x7b\xd0\xf8\x2d\x3d"
305 "\x19\x82\x77\xe3\x0a\x5f\x75\x2f\x8e\xb1\xe5\xe8\x91\x35\x1b\x3b"
306 "\x33\xb7\x66\x92\xd1\xf2\x8e\x6f\xe5\x75\x0c\xad\x36\xfb\x4e\xd0"
307 "\x66\x61\xbd\x49\xfe\xf4\x1a\xa2\x2b\x49\xfe\x03\x4c\x74\x47\x8d"
308 "\x9a\x66\xb2\x49\x46\x4d\x77\xea\x33\x4d\x6b\x3c\xb4\x49\x4a\xc6"
309 "\x7d\x3d\xb5\xb9\x56\x41\x15\x67\x0f\x94\x3c\x93\x65\x27\xe0\x21"
310 "\x5d\x59\xc3\x62\xd5\xa6\xda\x38\x26\x22\x5e\x34\x1c\x94\xaf\x98",
311 .m_size = 8,
312 .c_size = 256,
313 .public_key_vec = true,
314 }
315};
316
317/*
Herbert Xuda7f0332008-07-31 17:08:25 +0800318 * MD4 test vectors from RFC1320
319 */
320#define MD4_TEST_VECTORS 7
321
322static struct hash_testvec md4_tv_template [] = {
323 {
324 .plaintext = "",
325 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
326 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
327 }, {
328 .plaintext = "a",
329 .psize = 1,
330 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
331 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
332 }, {
333 .plaintext = "abc",
334 .psize = 3,
335 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
336 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
337 }, {
338 .plaintext = "message digest",
339 .psize = 14,
340 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
341 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
342 }, {
343 .plaintext = "abcdefghijklmnopqrstuvwxyz",
344 .psize = 26,
345 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
346 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
347 .np = 2,
348 .tap = { 13, 13 },
349 }, {
350 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
351 .psize = 62,
352 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
353 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
354 }, {
355 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
356 "45678901234567890",
357 .psize = 80,
358 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
359 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
360 },
361};
362
363/*
364 * MD5 test vectors from RFC1321
365 */
366#define MD5_TEST_VECTORS 7
367
368static struct hash_testvec md5_tv_template[] = {
369 {
370 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
371 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
372 }, {
373 .plaintext = "a",
374 .psize = 1,
375 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
376 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
377 }, {
378 .plaintext = "abc",
379 .psize = 3,
380 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
381 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
382 }, {
383 .plaintext = "message digest",
384 .psize = 14,
385 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
386 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
387 }, {
388 .plaintext = "abcdefghijklmnopqrstuvwxyz",
389 .psize = 26,
390 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
391 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
392 .np = 2,
393 .tap = {13, 13}
394 }, {
395 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
396 .psize = 62,
397 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
398 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
399 }, {
400 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
401 "345678901234567890",
402 .psize = 80,
403 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
404 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
405 }
406
407};
408
409/*
410 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
411 */
412#define RMD128_TEST_VECTORS 10
413
414static struct hash_testvec rmd128_tv_template[] = {
415 {
416 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
417 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
418 }, {
419 .plaintext = "a",
420 .psize = 1,
421 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
422 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
423 }, {
424 .plaintext = "abc",
425 .psize = 3,
426 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
427 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
428 }, {
429 .plaintext = "message digest",
430 .psize = 14,
431 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
432 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
433 }, {
434 .plaintext = "abcdefghijklmnopqrstuvwxyz",
435 .psize = 26,
436 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
437 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
438 }, {
439 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
440 "fghijklmnopqrstuvwxyz0123456789",
441 .psize = 62,
442 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
443 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
444 }, {
445 .plaintext = "1234567890123456789012345678901234567890"
446 "1234567890123456789012345678901234567890",
447 .psize = 80,
448 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
449 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
450 }, {
451 .plaintext = "abcdbcdecdefdefgefghfghighij"
452 "hijkijkljklmklmnlmnomnopnopq",
453 .psize = 56,
454 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
455 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
456 .np = 2,
457 .tap = { 28, 28 },
458 }, {
459 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
460 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
461 "lmnopqrsmnopqrstnopqrstu",
462 .psize = 112,
463 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
464 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
465 }, {
466 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
467 .psize = 32,
468 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
469 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
470 }
471};
472
473/*
474 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
475 */
476#define RMD160_TEST_VECTORS 10
477
478static struct hash_testvec rmd160_tv_template[] = {
479 {
480 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
481 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
482 }, {
483 .plaintext = "a",
484 .psize = 1,
485 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
486 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
487 }, {
488 .plaintext = "abc",
489 .psize = 3,
490 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
491 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
492 }, {
493 .plaintext = "message digest",
494 .psize = 14,
495 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
496 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
497 }, {
498 .plaintext = "abcdefghijklmnopqrstuvwxyz",
499 .psize = 26,
500 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
501 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
502 }, {
503 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
504 "fghijklmnopqrstuvwxyz0123456789",
505 .psize = 62,
506 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
507 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
508 }, {
509 .plaintext = "1234567890123456789012345678901234567890"
510 "1234567890123456789012345678901234567890",
511 .psize = 80,
512 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
513 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
514 }, {
515 .plaintext = "abcdbcdecdefdefgefghfghighij"
516 "hijkijkljklmklmnlmnomnopnopq",
517 .psize = 56,
518 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
519 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
520 .np = 2,
521 .tap = { 28, 28 },
522 }, {
523 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
524 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
525 "lmnopqrsmnopqrstnopqrstu",
526 .psize = 112,
527 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
528 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
529 }, {
530 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
531 .psize = 32,
532 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
533 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
534 }
535};
536
537/*
538 * RIPEMD-256 test vectors
539 */
540#define RMD256_TEST_VECTORS 8
541
542static struct hash_testvec rmd256_tv_template[] = {
543 {
544 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
545 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
546 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
547 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
548 }, {
549 .plaintext = "a",
550 .psize = 1,
551 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
552 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
553 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
554 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
555 }, {
556 .plaintext = "abc",
557 .psize = 3,
558 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
559 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
560 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
561 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
562 }, {
563 .plaintext = "message digest",
564 .psize = 14,
565 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
566 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
567 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
568 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
569 }, {
570 .plaintext = "abcdefghijklmnopqrstuvwxyz",
571 .psize = 26,
572 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
573 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
574 "\x78\x96\x11\x8a\x51\x97\x96\x87"
575 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
576 }, {
577 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
578 "fghijklmnopqrstuvwxyz0123456789",
579 .psize = 62,
580 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
581 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
582 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
583 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
584 }, {
585 .plaintext = "1234567890123456789012345678901234567890"
586 "1234567890123456789012345678901234567890",
587 .psize = 80,
588 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
589 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
590 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
591 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
592 }, {
593 .plaintext = "abcdbcdecdefdefgefghfghighij"
594 "hijkijkljklmklmnlmnomnopnopq",
595 .psize = 56,
596 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
597 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
598 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
599 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
600 .np = 2,
601 .tap = { 28, 28 },
602 }
603};
604
605/*
606 * RIPEMD-320 test vectors
607 */
608#define RMD320_TEST_VECTORS 8
609
610static struct hash_testvec rmd320_tv_template[] = {
611 {
612 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
613 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
614 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
615 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
616 }, {
617 .plaintext = "a",
618 .psize = 1,
619 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
620 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
621 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
622 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
623 }, {
624 .plaintext = "abc",
625 .psize = 3,
626 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
627 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
628 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
629 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
630 }, {
631 .plaintext = "message digest",
632 .psize = 14,
633 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
634 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
635 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
636 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
637 }, {
638 .plaintext = "abcdefghijklmnopqrstuvwxyz",
639 .psize = 26,
640 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
641 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
642 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
643 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
644 }, {
645 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
646 "fghijklmnopqrstuvwxyz0123456789",
647 .psize = 62,
648 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
649 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
650 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
651 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
652 }, {
653 .plaintext = "1234567890123456789012345678901234567890"
654 "1234567890123456789012345678901234567890",
655 .psize = 80,
656 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
657 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
658 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
659 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
660 }, {
661 .plaintext = "abcdbcdecdefdefgefghfghighij"
662 "hijkijkljklmklmnlmnomnopnopq",
663 .psize = 56,
664 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
665 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
666 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
667 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
668 .np = 2,
669 .tap = { 28, 28 },
670 }
671};
672
Herbert Xu684115212013-09-07 12:56:26 +1000673#define CRCT10DIF_TEST_VECTORS 3
674static struct hash_testvec crct10dif_tv_template[] = {
675 {
676 .plaintext = "abc",
677 .psize = 3,
678#ifdef __LITTLE_ENDIAN
679 .digest = "\x3b\x44",
680#else
681 .digest = "\x44\x3b",
682#endif
683 }, {
684 .plaintext = "1234567890123456789012345678901234567890"
685 "123456789012345678901234567890123456789",
686 .psize = 79,
687#ifdef __LITTLE_ENDIAN
688 .digest = "\x70\x4b",
689#else
690 .digest = "\x4b\x70",
691#endif
692 }, {
693 .plaintext =
694 "abcddddddddddddddddddddddddddddddddddddddddddddddddddddd",
695 .psize = 56,
696#ifdef __LITTLE_ENDIAN
697 .digest = "\xe3\x9c",
698#else
699 .digest = "\x9c\xe3",
700#endif
701 .np = 2,
702 .tap = { 28, 28 }
703 }
704};
705
Herbert Xuda7f0332008-07-31 17:08:25 +0800706/*
707 * SHA1 test vectors from from FIPS PUB 180-1
Herbert Xubd1f2992011-02-17 14:24:45 +1100708 * Long vector from CAVS 5.0
Herbert Xuda7f0332008-07-31 17:08:25 +0800709 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300710#define SHA1_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +0800711
712static struct hash_testvec sha1_tv_template[] = {
713 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300714 .plaintext = "",
715 .psize = 0,
716 .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55"
717 "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09",
718 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800719 .plaintext = "abc",
720 .psize = 3,
721 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
722 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
723 }, {
724 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
725 .psize = 56,
726 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
727 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
728 .np = 2,
729 .tap = { 28, 28 }
Herbert Xubd1f2992011-02-17 14:24:45 +1100730 }, {
731 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
732 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
733 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
734 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
735 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
736 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
737 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
738 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
739 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
740 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
741 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
742 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
743 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
744 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
745 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
746 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
747 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
748 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
749 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
750 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
751 "\x5a\x90\x11",
752 .psize = 163,
753 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
754 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
755 .np = 4,
756 .tap = { 63, 64, 31, 5 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800757 }, {
758 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
759 .psize = 64,
760 .digest = "\xc8\x71\xf6\x9a\x63\xcc\xa9\x84\x84\x82"
761 "\x64\xe7\x79\x95\x5d\xd7\x19\x41\x7c\x91",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300762 }, {
763 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
764 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
765 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
766 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
767 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
768 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
769 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
770 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
771 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
772 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
773 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
774 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
775 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
776 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
777 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
778 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
779 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
780 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
781 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
782 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
783 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
784 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
785 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
786 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
787 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
788 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
789 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
790 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
791 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
792 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
793 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
794 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
795 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
796 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
797 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
798 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
799 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
800 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
801 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
802 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
803 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
804 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
805 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
806 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
807 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
808 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
809 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
810 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
811 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
812 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
813 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
814 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
815 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
816 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
817 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
818 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
819 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
820 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
821 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
822 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
823 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
824 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
825 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
826 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
827 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
828 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
829 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
830 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
831 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
832 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
833 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
834 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
835 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
836 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
837 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
838 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
839 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
840 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
841 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
842 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
843 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
844 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
845 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
846 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
847 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
848 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
849 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
850 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
851 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
852 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
853 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
854 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
855 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
856 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
857 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
858 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
859 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
860 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
861 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
862 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
863 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
864 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
865 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
866 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
867 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
868 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
869 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
870 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
871 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
872 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
873 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
874 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
875 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
876 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
877 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
878 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
879 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
880 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
881 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
882 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
883 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
884 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
885 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
886 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
887 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
888 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
889 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
890 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
891 .psize = 1023,
892 .digest = "\xb8\xe3\x54\xed\xc5\xfc\xef\xa4"
893 "\x55\x73\x4a\x81\x99\xe4\x47\x2a"
894 "\x30\xd6\xc9\x85",
Herbert Xuda7f0332008-07-31 17:08:25 +0800895 }
896};
897
898
899/*
900 * SHA224 test vectors from from FIPS PUB 180-2
901 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300902#define SHA224_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +0800903
904static struct hash_testvec sha224_tv_template[] = {
905 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300906 .plaintext = "",
907 .psize = 0,
908 .digest = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9"
909 "\x47\x61\x02\xbb\x28\x82\x34\xc4"
910 "\x15\xa2\xb0\x1f\x82\x8e\xa6\x2a"
911 "\xc5\xb3\xe4\x2f",
912 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800913 .plaintext = "abc",
914 .psize = 3,
915 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
916 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
917 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
918 "\xE3\x6C\x9D\xA7",
919 }, {
920 .plaintext =
921 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
922 .psize = 56,
923 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
924 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
925 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
926 "\x52\x52\x25\x25",
927 .np = 2,
928 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800929 }, {
930 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
931 .psize = 64,
932 .digest = "\xc4\xdb\x2b\x3a\x58\xc3\x99\x01"
933 "\x42\xfd\x10\x92\xaa\x4e\x04\x08"
934 "\x58\xbb\xbb\xe8\xf8\x14\xa7\x0c"
935 "\xef\x3b\xcb\x0e",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300936 }, {
937 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
938 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
939 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
940 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
941 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
942 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
943 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
944 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
945 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
946 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
947 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
948 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
949 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
950 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
951 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
952 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
953 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
954 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
955 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
956 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
957 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
958 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
959 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
960 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
961 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
962 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
963 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
964 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
965 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
966 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
967 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
968 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
969 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
970 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
971 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
972 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
973 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
974 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
975 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
976 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
977 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
978 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
979 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
980 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
981 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
982 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
983 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
984 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
985 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
986 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
987 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
988 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
989 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
990 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
991 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
992 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
993 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
994 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
995 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
996 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
997 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
998 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
999 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1000 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1001 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1002 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1003 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1004 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1005 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1006 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1007 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1008 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1009 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1010 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1011 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1012 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1013 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1014 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1015 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1016 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1017 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1018 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1019 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1020 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1021 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1022 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1023 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1024 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1025 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1026 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1027 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1028 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1029 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1030 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1031 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1032 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1033 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1034 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1035 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1036 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1037 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1038 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1039 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1040 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1041 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1042 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1043 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1044 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1045 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1046 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1047 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1048 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1049 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1050 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1051 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1052 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1053 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1054 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1055 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1056 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1057 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1058 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1059 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1060 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1061 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1062 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1063 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1064 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1065 .psize = 1023,
1066 .digest = "\x98\x43\x07\x63\x75\xe0\xa7\x1c"
1067 "\x78\xb1\x8b\xfd\x04\xf5\x2d\x91"
1068 "\x20\x48\xa4\x28\xff\x55\xb1\xd3"
1069 "\xe6\xf9\x4f\xcc",
Herbert Xuda7f0332008-07-31 17:08:25 +08001070 }
1071};
1072
1073/*
1074 * SHA256 test vectors from from NIST
1075 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001076#define SHA256_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08001077
1078static struct hash_testvec sha256_tv_template[] = {
1079 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001080 .plaintext = "",
1081 .psize = 0,
1082 .digest = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14"
1083 "\x9a\xfb\xf4\xc8\x99\x6f\xb9\x24"
1084 "\x27\xae\x41\xe4\x64\x9b\x93\x4c"
1085 "\xa4\x95\x99\x1b\x78\x52\xb8\x55",
1086 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001087 .plaintext = "abc",
1088 .psize = 3,
1089 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
1090 "\x41\x41\x40\xde\x5d\xae\x22\x23"
1091 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
1092 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
1093 }, {
1094 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1095 .psize = 56,
1096 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
1097 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
1098 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
1099 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
1100 .np = 2,
1101 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +08001102 }, {
1103 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1104 .psize = 64,
1105 .digest = "\xb5\xfe\xad\x56\x7d\xff\xcb\xa4"
1106 "\x2c\x32\x29\x32\x19\xbb\xfb\xfa"
1107 "\xd6\xff\x94\xa3\x72\x91\x85\x66"
1108 "\x3b\xa7\x87\x77\x58\xa3\x40\x3a",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001109 }, {
1110 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1111 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1112 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1113 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1114 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1115 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1116 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1117 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1118 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1119 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1120 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1121 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1122 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1123 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1124 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1125 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1126 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1127 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1128 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1129 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1130 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1131 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1132 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1133 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1134 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1135 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1136 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1137 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1138 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1139 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1140 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1141 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1142 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1143 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1144 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1145 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1146 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1147 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1148 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1149 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1150 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1151 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1152 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1153 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1154 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1155 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1156 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1157 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1158 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1159 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1160 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1161 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1162 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1163 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1164 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1165 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1166 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1167 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1168 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1169 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1170 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1171 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1172 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1173 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1174 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1175 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1176 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1177 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1178 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1179 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1180 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1181 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1182 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1183 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1184 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1185 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1186 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1187 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1188 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1189 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1190 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1191 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1192 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1193 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1194 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1195 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1196 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1197 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1198 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1199 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1200 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1201 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1202 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1203 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1204 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1205 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1206 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1207 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1208 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1209 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1210 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1211 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1212 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1213 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1214 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1215 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1216 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1217 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1218 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1219 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1220 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1221 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1222 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1223 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1224 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1225 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1226 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1227 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1228 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1229 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1230 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1231 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1232 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1233 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1234 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1235 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1236 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1237 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1238 .psize = 1023,
1239 .digest = "\xc5\xce\x0c\xca\x01\x4f\x53\x3a"
1240 "\x32\x32\x17\xcc\xd4\x6a\x71\xa9"
1241 "\xf3\xed\x50\x10\x64\x8e\x06\xbe"
1242 "\x9b\x4a\xa6\xbb\x05\x89\x59\x51",
Ard Biesheuvel45859882014-04-16 20:40:04 +08001243 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001244};
1245
1246/*
1247 * SHA384 test vectors from from NIST and kerneli
1248 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001249#define SHA384_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001250
1251static struct hash_testvec sha384_tv_template[] = {
1252 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001253 .plaintext = "",
1254 .psize = 0,
1255 .digest = "\x38\xb0\x60\xa7\x51\xac\x96\x38"
1256 "\x4c\xd9\x32\x7e\xb1\xb1\xe3\x6a"
1257 "\x21\xfd\xb7\x11\x14\xbe\x07\x43"
1258 "\x4c\x0c\xc7\xbf\x63\xf6\xe1\xda"
1259 "\x27\x4e\xde\xbf\xe7\x6f\x65\xfb"
1260 "\xd5\x1a\xd2\xf1\x48\x98\xb9\x5b",
1261 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001262 .plaintext= "abc",
1263 .psize = 3,
1264 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
1265 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
1266 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
1267 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
1268 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
1269 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
1270 }, {
1271 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1272 .psize = 56,
1273 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
1274 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
1275 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
1276 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
1277 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
1278 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
1279 }, {
1280 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1281 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1282 .psize = 112,
1283 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
1284 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
1285 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
1286 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
1287 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
1288 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
1289 }, {
1290 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1291 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1292 .psize = 104,
1293 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
1294 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
1295 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
1296 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
1297 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
1298 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
1299 .np = 4,
1300 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001301 }, {
1302 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1303 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1304 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1305 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1306 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1307 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1308 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1309 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1310 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1311 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1312 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1313 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1314 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1315 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1316 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1317 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1318 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1319 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1320 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1321 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1322 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1323 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1324 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1325 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1326 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1327 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1328 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1329 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1330 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1331 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1332 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1333 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1334 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1335 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1336 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1337 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1338 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1339 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1340 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1341 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1342 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1343 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1344 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1345 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1346 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1347 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1348 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1349 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1350 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1351 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1352 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1353 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1354 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1355 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1356 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1357 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1358 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1359 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1360 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1361 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1362 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1363 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1364 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1365 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1366 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1367 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1368 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1369 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1370 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1371 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1372 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1373 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1374 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1375 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1376 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1377 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1378 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1379 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1380 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1381 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1382 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1383 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1384 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1385 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1386 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1387 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1388 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1389 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1390 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1391 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1392 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1393 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1394 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1395 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1396 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1397 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1398 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1399 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1400 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1401 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1402 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1403 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1404 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1405 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1406 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1407 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1408 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1409 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1410 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1411 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1412 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1413 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1414 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1415 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1416 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1417 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1418 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1419 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1420 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1421 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1422 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1423 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1424 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1425 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1426 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1427 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1428 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1429 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1430 .psize = 1023,
1431 .digest = "\x4d\x97\x23\xc8\xea\x7a\x7c\x15"
1432 "\xb8\xff\x97\x9c\xf5\x13\x4f\x31"
1433 "\xde\x67\xf7\x24\x73\xcd\x70\x1c"
1434 "\x03\x4a\xba\x8a\x87\x49\xfe\xdc"
1435 "\x75\x29\x62\x83\xae\x3f\x17\xab"
1436 "\xfd\x10\x4d\x8e\x17\x1c\x1f\xca",
1437 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001438};
1439
1440/*
1441 * SHA512 test vectors from from NIST and kerneli
1442 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001443#define SHA512_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001444
1445static struct hash_testvec sha512_tv_template[] = {
1446 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001447 .plaintext = "",
1448 .psize = 0,
1449 .digest = "\xcf\x83\xe1\x35\x7e\xef\xb8\xbd"
1450 "\xf1\x54\x28\x50\xd6\x6d\x80\x07"
1451 "\xd6\x20\xe4\x05\x0b\x57\x15\xdc"
1452 "\x83\xf4\xa9\x21\xd3\x6c\xe9\xce"
1453 "\x47\xd0\xd1\x3c\x5d\x85\xf2\xb0"
1454 "\xff\x83\x18\xd2\x87\x7e\xec\x2f"
1455 "\x63\xb9\x31\xbd\x47\x41\x7a\x81"
1456 "\xa5\x38\x32\x7a\xf9\x27\xda\x3e",
1457 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001458 .plaintext = "abc",
1459 .psize = 3,
1460 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
1461 "\xcc\x41\x73\x49\xae\x20\x41\x31"
1462 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
1463 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
1464 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
1465 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
1466 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
1467 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
1468 }, {
1469 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1470 .psize = 56,
1471 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
1472 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
1473 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
1474 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
1475 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
1476 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
1477 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
1478 "\x54\xec\x63\x12\x38\xca\x34\x45",
1479 }, {
1480 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1481 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1482 .psize = 112,
1483 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
1484 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
1485 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
1486 "\x72\x99\xae\xad\xb6\x88\x90\x18"
1487 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
1488 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
1489 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
1490 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
1491 }, {
1492 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1493 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1494 .psize = 104,
1495 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
1496 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
1497 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
1498 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
1499 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
1500 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
1501 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
1502 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
1503 .np = 4,
1504 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001505 }, {
1506 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1507 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1508 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1509 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1510 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1511 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1512 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1513 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1514 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1515 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1516 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1517 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1518 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1519 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1520 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1521 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1522 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1523 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1524 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1525 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1526 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1527 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1528 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1529 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1530 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1531 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1532 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1533 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1534 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1535 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1536 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1537 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1538 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1539 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1540 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1541 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1542 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1543 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1544 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1545 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1546 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1547 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1548 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1549 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1550 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1551 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1552 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1553 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1554 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1555 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1556 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1557 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1558 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1559 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1560 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1561 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1562 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1563 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1564 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1565 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1566 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1567 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1568 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1569 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1570 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1571 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1572 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1573 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1574 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1575 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1576 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1577 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1578 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1579 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1580 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1581 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1582 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1583 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1584 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1585 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1586 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1587 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1588 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1589 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1590 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1591 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1592 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1593 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1594 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1595 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1596 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1597 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1598 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1599 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1600 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1601 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1602 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1603 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1604 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1605 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1606 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1607 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1608 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1609 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1610 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1611 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1612 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1613 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1614 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1615 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1616 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1617 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1618 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1619 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1620 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1621 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1622 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1623 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1624 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1625 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1626 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1627 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1628 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1629 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1630 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1631 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1632 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1633 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1634 .psize = 1023,
1635 .digest = "\x76\xc9\xd4\x91\x7a\x5f\x0f\xaa"
1636 "\x13\x39\xf3\x01\x7a\xfa\xe5\x41"
1637 "\x5f\x0b\xf8\xeb\x32\xfc\xbf\xb0"
1638 "\xfa\x8c\xcd\x17\x83\xe2\xfa\xeb"
1639 "\x1c\x19\xde\xe2\x75\xdc\x34\x64"
1640 "\x5f\x35\x9c\x61\x2f\x10\xf9\xec"
1641 "\x59\xca\x9d\xcc\x25\x0c\x43\xba"
1642 "\x85\xa8\xf8\xfe\xb5\x24\xb2\xee",
1643 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001644};
1645
1646
1647/*
1648 * WHIRLPOOL test vectors from Whirlpool package
1649 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
1650 * submission
1651 */
1652#define WP512_TEST_VECTORS 8
1653
1654static struct hash_testvec wp512_tv_template[] = {
1655 {
1656 .plaintext = "",
1657 .psize = 0,
1658 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1659 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1660 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1661 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1662 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1663 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
1664 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
1665 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
1666
1667
1668 }, {
1669 .plaintext = "a",
1670 .psize = 1,
1671 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1672 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1673 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1674 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1675 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1676 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
1677 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
1678 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
1679 }, {
1680 .plaintext = "abc",
1681 .psize = 3,
1682 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1683 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1684 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1685 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1686 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1687 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
1688 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
1689 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
1690 }, {
1691 .plaintext = "message digest",
1692 .psize = 14,
1693 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1694 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1695 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1696 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1697 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1698 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
1699 "\x92\xED\x92\x00\x52\x83\x8F\x33"
1700 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
1701 }, {
1702 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1703 .psize = 26,
1704 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1705 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1706 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1707 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1708 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1709 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
1710 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
1711 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
1712 }, {
1713 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1714 "abcdefghijklmnopqrstuvwxyz0123456789",
1715 .psize = 62,
1716 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1717 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1718 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1719 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1720 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1721 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
1722 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
1723 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
1724 }, {
1725 .plaintext = "1234567890123456789012345678901234567890"
1726 "1234567890123456789012345678901234567890",
1727 .psize = 80,
1728 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1729 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1730 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1731 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1732 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1733 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
1734 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
1735 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
1736 }, {
1737 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1738 .psize = 32,
1739 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1740 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1741 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1742 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1743 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1744 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
1745 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
1746 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
1747 },
1748};
1749
1750#define WP384_TEST_VECTORS 8
1751
1752static struct hash_testvec wp384_tv_template[] = {
1753 {
1754 .plaintext = "",
1755 .psize = 0,
1756 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1757 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1758 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1759 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1760 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1761 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
1762
1763
1764 }, {
1765 .plaintext = "a",
1766 .psize = 1,
1767 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1768 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1769 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1770 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1771 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1772 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
1773 }, {
1774 .plaintext = "abc",
1775 .psize = 3,
1776 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1777 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1778 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1779 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1780 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1781 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
1782 }, {
1783 .plaintext = "message digest",
1784 .psize = 14,
1785 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1786 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1787 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1788 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1789 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1790 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
1791 }, {
1792 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1793 .psize = 26,
1794 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1795 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1796 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1797 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1798 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1799 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
1800 }, {
1801 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1802 "abcdefghijklmnopqrstuvwxyz0123456789",
1803 .psize = 62,
1804 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1805 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1806 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1807 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1808 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1809 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
1810 }, {
1811 .plaintext = "1234567890123456789012345678901234567890"
1812 "1234567890123456789012345678901234567890",
1813 .psize = 80,
1814 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1815 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1816 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1817 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1818 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1819 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
1820 }, {
1821 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1822 .psize = 32,
1823 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1824 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1825 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1826 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1827 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1828 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
1829 },
1830};
1831
1832#define WP256_TEST_VECTORS 8
1833
1834static struct hash_testvec wp256_tv_template[] = {
1835 {
1836 .plaintext = "",
1837 .psize = 0,
1838 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1839 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1840 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1841 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
1842
1843
1844 }, {
1845 .plaintext = "a",
1846 .psize = 1,
1847 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1848 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1849 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1850 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
1851 }, {
1852 .plaintext = "abc",
1853 .psize = 3,
1854 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1855 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1856 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1857 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
1858 }, {
1859 .plaintext = "message digest",
1860 .psize = 14,
1861 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1862 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1863 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1864 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
1865 }, {
1866 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1867 .psize = 26,
1868 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1869 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1870 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1871 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
1872 }, {
1873 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1874 "abcdefghijklmnopqrstuvwxyz0123456789",
1875 .psize = 62,
1876 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1877 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1878 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1879 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
1880 }, {
1881 .plaintext = "1234567890123456789012345678901234567890"
1882 "1234567890123456789012345678901234567890",
1883 .psize = 80,
1884 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1885 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1886 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1887 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
1888 }, {
1889 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1890 .psize = 32,
1891 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1892 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1893 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1894 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
1895 },
1896};
1897
1898/*
1899 * TIGER test vectors from Tiger website
1900 */
1901#define TGR192_TEST_VECTORS 6
1902
1903static struct hash_testvec tgr192_tv_template[] = {
1904 {
1905 .plaintext = "",
1906 .psize = 0,
1907 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1908 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1909 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
1910 }, {
1911 .plaintext = "abc",
1912 .psize = 3,
1913 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1914 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1915 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
1916 }, {
1917 .plaintext = "Tiger",
1918 .psize = 5,
1919 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1920 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1921 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
1922 }, {
1923 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1924 .psize = 64,
1925 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1926 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1927 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
1928 }, {
1929 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1930 .psize = 64,
1931 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1932 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1933 "\x57\x89\x65\x65\x97\x5f\x91\x97",
1934 }, {
1935 .plaintext = "Tiger - A Fast New Hash Function, "
1936 "by Ross Anderson and Eli Biham, "
1937 "proceedings of Fast Software Encryption 3, "
1938 "Cambridge, 1996.",
1939 .psize = 125,
1940 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1941 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1942 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
1943 },
1944};
1945
1946#define TGR160_TEST_VECTORS 6
1947
1948static struct hash_testvec tgr160_tv_template[] = {
1949 {
1950 .plaintext = "",
1951 .psize = 0,
1952 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1953 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1954 "\xf3\x73\xde\x2d",
1955 }, {
1956 .plaintext = "abc",
1957 .psize = 3,
1958 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1959 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1960 "\x93\x5f\x7b\x95",
1961 }, {
1962 .plaintext = "Tiger",
1963 .psize = 5,
1964 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1965 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1966 "\x37\x79\x0c\x11",
1967 }, {
1968 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1969 .psize = 64,
1970 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1971 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1972 "\xb5\x86\x44\x50",
1973 }, {
1974 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1975 .psize = 64,
1976 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1977 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1978 "\x57\x89\x65\x65",
1979 }, {
1980 .plaintext = "Tiger - A Fast New Hash Function, "
1981 "by Ross Anderson and Eli Biham, "
1982 "proceedings of Fast Software Encryption 3, "
1983 "Cambridge, 1996.",
1984 .psize = 125,
1985 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1986 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1987 "\xdd\x68\x15\x1d",
1988 },
1989};
1990
1991#define TGR128_TEST_VECTORS 6
1992
1993static struct hash_testvec tgr128_tv_template[] = {
1994 {
1995 .plaintext = "",
1996 .psize = 0,
1997 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1998 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
1999 }, {
2000 .plaintext = "abc",
2001 .psize = 3,
2002 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
2003 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
2004 }, {
2005 .plaintext = "Tiger",
2006 .psize = 5,
2007 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
2008 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
2009 }, {
2010 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
2011 .psize = 64,
2012 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
2013 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
2014 }, {
2015 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
2016 .psize = 64,
2017 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
2018 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
2019 }, {
2020 .plaintext = "Tiger - A Fast New Hash Function, "
2021 "by Ross Anderson and Eli Biham, "
2022 "proceedings of Fast Software Encryption 3, "
2023 "Cambridge, 1996.",
2024 .psize = 125,
2025 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
2026 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
2027 },
2028};
2029
Harald Freudenberger445a8e02015-05-21 17:34:31 +02002030#define GHASH_TEST_VECTORS 6
Youquan, Song507069c2009-11-23 20:23:04 +08002031
2032static struct hash_testvec ghash_tv_template[] =
2033{
2034 {
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002035 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03"
2036 "\xff\xca\xff\x95\xf8\x30\xf0\x61",
Youquan, Song507069c2009-11-23 20:23:04 +08002037 .ksize = 16,
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002038 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
2039 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
Youquan, Song507069c2009-11-23 20:23:04 +08002040 .psize = 16,
2041 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
2042 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02002043 }, {
2044 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2045 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2046 .ksize = 16,
2047 .plaintext = "what do ya want for nothing?",
2048 .psize = 28,
2049 .digest = "\x3e\x1f\x5c\x4d\x65\xf0\xef\xce"
2050 "\x0d\x61\x06\x27\x66\x51\xd5\xe2",
2051 .np = 2,
2052 .tap = {14, 14}
2053 }, {
2054 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2055 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2056 .ksize = 16,
2057 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2058 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2059 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2060 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2061 .psize = 50,
2062 .digest = "\xfb\x49\x8a\x36\xe1\x96\xe1\x96"
2063 "\xe1\x96\xe1\x96\xe1\x96\xe1\x96",
2064 }, {
2065 .key = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
2066 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
2067 .ksize = 16,
2068 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2069 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2070 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2071 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2072 .psize = 50,
2073 .digest = "\x2b\x5c\x0c\x7f\x52\xd1\x60\xc2"
2074 "\x49\xed\x6e\x32\x7a\xa9\xbe\x08",
2075 }, {
2076 .key = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
2077 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
2078 .ksize = 16,
2079 .plaintext = "Test With Truncation",
2080 .psize = 20,
2081 .digest = "\xf8\x94\x87\x2a\x4b\x63\x99\x28"
2082 "\x23\xf7\x93\xf7\x19\xf5\x96\xd9",
Harald Freudenberger445a8e02015-05-21 17:34:31 +02002083 }, {
2084 .key = "\x0a\x1b\x2c\x3d\x4e\x5f\x64\x71"
2085 "\x82\x93\xa4\xb5\xc6\xd7\xe8\xf9",
2086 .ksize = 16,
2087 .plaintext = "\x56\x6f\x72\x20\x6c\x61\x75\x74"
2088 "\x65\x72\x20\x4c\x61\x75\x73\x63"
2089 "\x68\x65\x6e\x20\x75\x6e\x64\x20"
2090 "\x53\x74\x61\x75\x6e\x65\x6e\x20"
2091 "\x73\x65\x69\x20\x73\x74\x69\x6c"
2092 "\x6c\x2c\x0a\x64\x75\x20\x6d\x65"
2093 "\x69\x6e\x20\x74\x69\x65\x66\x74"
2094 "\x69\x65\x66\x65\x73\x20\x4c\x65"
2095 "\x62\x65\x6e\x3b\x0a\x64\x61\x73"
2096 "\x73\x20\x64\x75\x20\x77\x65\x69"
2097 "\xc3\x9f\x74\x20\x77\x61\x73\x20"
2098 "\x64\x65\x72\x20\x57\x69\x6e\x64"
2099 "\x20\x64\x69\x72\x20\x77\x69\x6c"
2100 "\x6c\x2c\x0a\x65\x68\x20\x6e\x6f"
2101 "\x63\x68\x20\x64\x69\x65\x20\x42"
2102 "\x69\x72\x6b\x65\x6e\x20\x62\x65"
2103 "\x62\x65\x6e\x2e\x0a\x0a\x55\x6e"
2104 "\x64\x20\x77\x65\x6e\x6e\x20\x64"
2105 "\x69\x72\x20\x65\x69\x6e\x6d\x61"
2106 "\x6c\x20\x64\x61\x73\x20\x53\x63"
2107 "\x68\x77\x65\x69\x67\x65\x6e\x20"
2108 "\x73\x70\x72\x61\x63\x68\x2c\x0a"
2109 "\x6c\x61\x73\x73\x20\x64\x65\x69"
2110 "\x6e\x65\x20\x53\x69\x6e\x6e\x65"
2111 "\x20\x62\x65\x73\x69\x65\x67\x65"
2112 "\x6e\x2e\x0a\x4a\x65\x64\x65\x6d"
2113 "\x20\x48\x61\x75\x63\x68\x65\x20"
2114 "\x67\x69\x62\x74\x20\x64\x69\x63"
2115 "\x68\x2c\x20\x67\x69\x62\x20\x6e"
2116 "\x61\x63\x68\x2c\x0a\x65\x72\x20"
2117 "\x77\x69\x72\x64\x20\x64\x69\x63"
2118 "\x68\x20\x6c\x69\x65\x62\x65\x6e"
2119 "\x20\x75\x6e\x64\x20\x77\x69\x65"
2120 "\x67\x65\x6e\x2e\x0a\x0a\x55\x6e"
2121 "\x64\x20\x64\x61\x6e\x6e\x20\x6d"
2122 "\x65\x69\x6e\x65\x20\x53\x65\x65"
2123 "\x6c\x65\x20\x73\x65\x69\x74\x20"
2124 "\x77\x65\x69\x74\x2c\x20\x73\x65"
2125 "\x69\x20\x77\x65\x69\x74\x2c\x0a"
2126 "\x64\x61\x73\x73\x20\x64\x69\x72"
2127 "\x20\x64\x61\x73\x20\x4c\x65\x62"
2128 "\x65\x6e\x20\x67\x65\x6c\x69\x6e"
2129 "\x67\x65\x2c\x0a\x62\x72\x65\x69"
2130 "\x74\x65\x20\x64\x69\x63\x68\x20"
2131 "\x77\x69\x65\x20\x65\x69\x6e\x20"
2132 "\x46\x65\x69\x65\x72\x6b\x6c\x65"
2133 "\x69\x64\x0a\xc3\xbc\x62\x65\x72"
2134 "\x20\x64\x69\x65\x20\x73\x69\x6e"
2135 "\x6e\x65\x6e\x64\x65\x6e\x20\x44"
2136 "\x69\x6e\x67\x65\x2e\x2e\x2e\x0a",
2137 .psize = 400,
2138 .digest = "\xad\xb1\xc1\xe9\x56\x70\x31\x1d"
2139 "\xbb\x5b\xdf\x5e\x70\x72\x1a\x57",
Youquan, Song507069c2009-11-23 20:23:04 +08002140 },
2141};
2142
Herbert Xuda7f0332008-07-31 17:08:25 +08002143/*
2144 * HMAC-MD5 test vectors from RFC2202
2145 * (These need to be fixed to not use strlen).
2146 */
2147#define HMAC_MD5_TEST_VECTORS 7
2148
2149static struct hash_testvec hmac_md5_tv_template[] =
2150{
2151 {
2152 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2153 .ksize = 16,
2154 .plaintext = "Hi There",
2155 .psize = 8,
2156 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
2157 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
2158 }, {
2159 .key = "Jefe",
2160 .ksize = 4,
2161 .plaintext = "what do ya want for nothing?",
2162 .psize = 28,
2163 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
2164 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
2165 .np = 2,
2166 .tap = {14, 14}
2167 }, {
2168 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2169 .ksize = 16,
2170 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2171 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2172 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2173 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2174 .psize = 50,
2175 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
2176 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
2177 }, {
2178 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2179 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2180 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2181 .ksize = 25,
2182 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2183 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2184 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2185 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2186 .psize = 50,
2187 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
2188 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
2189 }, {
2190 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2191 .ksize = 16,
2192 .plaintext = "Test With Truncation",
2193 .psize = 20,
2194 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
2195 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
2196 }, {
2197 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2198 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2199 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2200 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2201 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2202 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2203 "\xaa\xaa",
2204 .ksize = 80,
2205 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2206 .psize = 54,
2207 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
2208 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
2209 }, {
2210 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2211 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2212 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2213 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2214 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2215 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2216 "\xaa\xaa",
2217 .ksize = 80,
2218 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2219 "Block-Size Data",
2220 .psize = 73,
2221 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
2222 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
2223 },
2224};
2225
2226/*
2227 * HMAC-RIPEMD128 test vectors from RFC2286
2228 */
2229#define HMAC_RMD128_TEST_VECTORS 7
2230
2231static struct hash_testvec hmac_rmd128_tv_template[] = {
2232 {
2233 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2234 .ksize = 16,
2235 .plaintext = "Hi There",
2236 .psize = 8,
2237 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
2238 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
2239 }, {
2240 .key = "Jefe",
2241 .ksize = 4,
2242 .plaintext = "what do ya want for nothing?",
2243 .psize = 28,
2244 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
2245 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
2246 .np = 2,
2247 .tap = { 14, 14 },
2248 }, {
2249 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2250 .ksize = 16,
2251 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2252 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2253 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2254 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2255 .psize = 50,
2256 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
2257 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
2258 }, {
2259 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2260 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2261 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2262 .ksize = 25,
2263 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2264 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2265 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2266 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2267 .psize = 50,
2268 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
2269 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
2270 }, {
2271 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2272 .ksize = 16,
2273 .plaintext = "Test With Truncation",
2274 .psize = 20,
2275 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
2276 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
2277 }, {
2278 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2279 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2280 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2281 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2282 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2283 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2284 "\xaa\xaa",
2285 .ksize = 80,
2286 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2287 .psize = 54,
2288 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
2289 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
2290 }, {
2291 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2292 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2293 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2294 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2295 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2296 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2297 "\xaa\xaa",
2298 .ksize = 80,
2299 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2300 "Block-Size Data",
2301 .psize = 73,
2302 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
2303 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
2304 },
2305};
2306
2307/*
2308 * HMAC-RIPEMD160 test vectors from RFC2286
2309 */
2310#define HMAC_RMD160_TEST_VECTORS 7
2311
2312static struct hash_testvec hmac_rmd160_tv_template[] = {
2313 {
2314 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2315 .ksize = 20,
2316 .plaintext = "Hi There",
2317 .psize = 8,
2318 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
2319 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
2320 }, {
2321 .key = "Jefe",
2322 .ksize = 4,
2323 .plaintext = "what do ya want for nothing?",
2324 .psize = 28,
2325 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
2326 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
2327 .np = 2,
2328 .tap = { 14, 14 },
2329 }, {
2330 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2331 .ksize = 20,
2332 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2333 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2334 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2335 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2336 .psize = 50,
2337 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
2338 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
2339 }, {
2340 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2341 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2342 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2343 .ksize = 25,
2344 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2345 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2346 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2347 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2348 .psize = 50,
2349 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
2350 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
2351 }, {
2352 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2353 .ksize = 20,
2354 .plaintext = "Test With Truncation",
2355 .psize = 20,
2356 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
2357 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
2358 }, {
2359 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2360 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2361 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2362 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2363 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2364 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2365 "\xaa\xaa",
2366 .ksize = 80,
2367 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2368 .psize = 54,
2369 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
2370 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
2371 }, {
2372 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2373 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2374 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2375 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2376 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2377 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2378 "\xaa\xaa",
2379 .ksize = 80,
2380 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2381 "Block-Size Data",
2382 .psize = 73,
2383 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
2384 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
2385 },
2386};
2387
2388/*
2389 * HMAC-SHA1 test vectors from RFC2202
2390 */
2391#define HMAC_SHA1_TEST_VECTORS 7
2392
2393static struct hash_testvec hmac_sha1_tv_template[] = {
2394 {
2395 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2396 .ksize = 20,
2397 .plaintext = "Hi There",
2398 .psize = 8,
2399 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
2400 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
2401 "\x46\xbe",
2402 }, {
2403 .key = "Jefe",
2404 .ksize = 4,
2405 .plaintext = "what do ya want for nothing?",
2406 .psize = 28,
2407 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
2408 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
2409 .np = 2,
2410 .tap = { 14, 14 }
2411 }, {
2412 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2413 .ksize = 20,
2414 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2415 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2416 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2417 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2418 .psize = 50,
2419 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
2420 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
2421 }, {
2422 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2423 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2424 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2425 .ksize = 25,
2426 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2427 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2428 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2429 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2430 .psize = 50,
2431 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
2432 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
2433 }, {
2434 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2435 .ksize = 20,
2436 .plaintext = "Test With Truncation",
2437 .psize = 20,
2438 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
2439 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
2440 }, {
2441 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2442 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2443 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2444 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2445 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2446 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2447 "\xaa\xaa",
2448 .ksize = 80,
2449 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2450 .psize = 54,
2451 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
2452 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
2453 }, {
2454 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2455 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2456 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2457 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2458 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2459 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2460 "\xaa\xaa",
2461 .ksize = 80,
2462 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2463 "Block-Size Data",
2464 .psize = 73,
2465 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
2466 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
2467 },
2468};
2469
2470
2471/*
2472 * SHA224 HMAC test vectors from RFC4231
2473 */
2474#define HMAC_SHA224_TEST_VECTORS 4
2475
2476static struct hash_testvec hmac_sha224_tv_template[] = {
2477 {
2478 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2479 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2480 "\x0b\x0b\x0b\x0b",
2481 .ksize = 20,
2482 /* ("Hi There") */
2483 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
2484 .psize = 8,
2485 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
2486 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
2487 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
2488 "\x53\x68\x4b\x22",
2489 }, {
2490 .key = "Jefe",
2491 .ksize = 4,
2492 /* ("what do ya want for nothing?") */
2493 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
2494 "\x79\x61\x20\x77\x61\x6e\x74\x20"
2495 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
2496 "\x69\x6e\x67\x3f",
2497 .psize = 28,
2498 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
2499 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
2500 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
2501 "\x8f\xd0\x5e\x44",
2502 .np = 4,
2503 .tap = { 7, 7, 7, 7 }
2504 }, {
2505 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2506 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2507 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2508 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2509 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2510 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2511 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2512 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2513 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2514 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2515 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2516 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2517 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2518 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2519 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2520 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2521 "\xaa\xaa\xaa",
2522 .ksize = 131,
2523 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
2524 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
2525 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
2526 "\x72\x20\x54\x68\x61\x6e\x20\x42"
2527 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
2528 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
2529 "\x48\x61\x73\x68\x20\x4b\x65\x79"
2530 "\x20\x46\x69\x72\x73\x74",
2531 .psize = 54,
2532 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
2533 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
2534 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
2535 "\x3f\xa6\x87\x0e",
2536 }, {
2537 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2538 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2539 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2540 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2541 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2542 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2543 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2544 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2545 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2546 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2547 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2548 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2549 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2550 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2551 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2552 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2553 "\xaa\xaa\xaa",
2554 .ksize = 131,
2555 /* ("This is a test using a larger than block-size key and a")
2556 (" larger than block-size data. The key needs to be")
2557 (" hashed before being used by the HMAC algorithm.") */
2558 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
2559 "\x61\x20\x74\x65\x73\x74\x20\x75"
2560 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
2561 "\x61\x72\x67\x65\x72\x20\x74\x68"
2562 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
2563 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
2564 "\x79\x20\x61\x6e\x64\x20\x61\x20"
2565 "\x6c\x61\x72\x67\x65\x72\x20\x74"
2566 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
2567 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
2568 "\x61\x74\x61\x2e\x20\x54\x68\x65"
2569 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
2570 "\x64\x73\x20\x74\x6f\x20\x62\x65"
2571 "\x20\x68\x61\x73\x68\x65\x64\x20"
2572 "\x62\x65\x66\x6f\x72\x65\x20\x62"
2573 "\x65\x69\x6e\x67\x20\x75\x73\x65"
2574 "\x64\x20\x62\x79\x20\x74\x68\x65"
2575 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
2576 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
2577 .psize = 152,
2578 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
2579 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
2580 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
2581 "\xf6\xf5\x65\xd1",
2582 },
2583};
2584
2585/*
2586 * HMAC-SHA256 test vectors from
2587 * draft-ietf-ipsec-ciph-sha-256-01.txt
2588 */
2589#define HMAC_SHA256_TEST_VECTORS 10
2590
2591static struct hash_testvec hmac_sha256_tv_template[] = {
2592 {
2593 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2594 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2595 "\x11\x12\x13\x14\x15\x16\x17\x18"
2596 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2597 .ksize = 32,
2598 .plaintext = "abc",
2599 .psize = 3,
2600 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
2601 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
2602 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
2603 "\x92\x75\x90\x21\xcf\xab\x81\x81",
2604 }, {
2605 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2606 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2607 "\x11\x12\x13\x14\x15\x16\x17\x18"
2608 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2609 .ksize = 32,
2610 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2611 .psize = 56,
2612 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
2613 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
2614 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
2615 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
2616 }, {
2617 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2618 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2619 "\x11\x12\x13\x14\x15\x16\x17\x18"
2620 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2621 .ksize = 32,
2622 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
2623 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2624 .psize = 112,
2625 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
2626 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
2627 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
2628 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
2629 }, {
2630 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2631 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2632 "\x0b\x0b\x0b\x0b\x0b\x0b",
2633 .ksize = 32,
2634 .plaintext = "Hi There",
2635 .psize = 8,
2636 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
2637 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
2638 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
2639 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
2640 }, {
2641 .key = "Jefe",
2642 .ksize = 4,
2643 .plaintext = "what do ya want for nothing?",
2644 .psize = 28,
2645 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
2646 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
2647 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
2648 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
2649 .np = 2,
2650 .tap = { 14, 14 }
2651 }, {
2652 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2653 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2654 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2655 .ksize = 32,
2656 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2657 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2658 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2659 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2660 .psize = 50,
2661 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
2662 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
2663 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
2664 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
2665 }, {
2666 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2667 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2668 "\x11\x12\x13\x14\x15\x16\x17\x18"
2669 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
2670 "\x21\x22\x23\x24\x25",
2671 .ksize = 37,
2672 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2673 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2674 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2675 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2676 .psize = 50,
2677 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
2678 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
2679 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
2680 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
2681 }, {
2682 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2683 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2684 "\x0c\x0c\x0c\x0c\x0c\x0c",
2685 .ksize = 32,
2686 .plaintext = "Test With Truncation",
2687 .psize = 20,
2688 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
2689 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
2690 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
2691 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
2692 }, {
2693 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2694 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2695 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2696 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2697 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2698 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2699 "\xaa\xaa",
2700 .ksize = 80,
2701 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2702 .psize = 54,
2703 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
2704 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
2705 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
2706 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
2707 }, {
2708 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2709 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2710 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2711 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2712 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2713 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2714 "\xaa\xaa",
2715 .ksize = 80,
2716 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
2717 "One Block-Size Data",
2718 .psize = 73,
2719 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
2720 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
2721 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
2722 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
2723 },
2724};
2725
Jussi Kivilinna93b5e862013-04-08 10:48:44 +03002726#define CMAC_AES_TEST_VECTORS 6
2727
2728static struct hash_testvec aes_cmac128_tv_template[] = {
2729 { /* From NIST Special Publication 800-38B, AES-128 */
2730 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2731 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2732 .plaintext = zeroed_string,
2733 .digest = "\xbb\x1d\x69\x29\xe9\x59\x37\x28"
2734 "\x7f\xa3\x7d\x12\x9b\x75\x67\x46",
2735 .psize = 0,
2736 .ksize = 16,
2737 }, {
2738 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2739 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2740 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2741 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a",
2742 .digest = "\x07\x0a\x16\xb4\x6b\x4d\x41\x44"
2743 "\xf7\x9b\xdd\x9d\xd0\x4a\x28\x7c",
2744 .psize = 16,
2745 .ksize = 16,
2746 }, {
2747 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2748 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2749 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2750 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2751 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2752 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2753 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11",
2754 .digest = "\xdf\xa6\x67\x47\xde\x9a\xe6\x30"
2755 "\x30\xca\x32\x61\x14\x97\xc8\x27",
2756 .psize = 40,
2757 .ksize = 16,
2758 }, {
2759 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2760 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2761 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2762 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2763 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2764 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2765 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2766 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2767 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2768 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2769 .digest = "\x51\xf0\xbe\xbf\x7e\x3b\x9d\x92"
2770 "\xfc\x49\x74\x17\x79\x36\x3c\xfe",
2771 .psize = 64,
2772 .ksize = 16,
2773 }, { /* From NIST Special Publication 800-38B, AES-256 */
2774 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2775 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2776 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2777 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2778 .plaintext = zeroed_string,
2779 .digest = "\x02\x89\x62\xf6\x1b\x7b\xf8\x9e"
2780 "\xfc\x6b\x55\x1f\x46\x67\xd9\x83",
2781 .psize = 0,
2782 .ksize = 32,
2783 }, {
2784 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2785 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2786 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2787 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2788 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2789 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2790 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2791 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2792 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2793 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2794 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2795 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2796 .digest = "\xe1\x99\x21\x90\x54\x9f\x6e\xd5"
2797 "\x69\x6a\x2c\x05\x6c\x31\x54\x10",
2798 .psize = 64,
2799 .ksize = 32,
2800 }
2801};
2802
2803#define CMAC_DES3_EDE_TEST_VECTORS 4
2804
2805static struct hash_testvec des3_ede_cmac64_tv_template[] = {
2806/*
2807 * From NIST Special Publication 800-38B, Three Key TDEA
2808 * Corrected test vectors from:
2809 * http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf
2810 */
2811 {
2812 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2813 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2814 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2815 .plaintext = zeroed_string,
2816 .digest = "\xb7\xa6\x88\xe1\x22\xff\xaf\x95",
2817 .psize = 0,
2818 .ksize = 24,
2819 }, {
2820 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2821 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2822 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2823 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96",
2824 .digest = "\x8e\x8f\x29\x31\x36\x28\x37\x97",
2825 .psize = 8,
2826 .ksize = 24,
2827 }, {
2828 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2829 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2830 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2831 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2832 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2833 "\xae\x2d\x8a\x57",
2834 .digest = "\x74\x3d\xdb\xe0\xce\x2d\xc2\xed",
2835 .psize = 20,
2836 .ksize = 24,
2837 }, {
2838 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2839 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2840 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2841 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2842 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2843 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2844 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51",
2845 .digest = "\x33\xe6\xb1\x09\x24\x00\xea\xe5",
2846 .psize = 32,
2847 .ksize = 24,
2848 }
2849};
2850
Herbert Xuda7f0332008-07-31 17:08:25 +08002851#define XCBC_AES_TEST_VECTORS 6
2852
2853static struct hash_testvec aes_xcbc128_tv_template[] = {
2854 {
2855 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2856 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2857 .plaintext = zeroed_string,
2858 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
2859 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
2860 .psize = 0,
2861 .ksize = 16,
2862 }, {
2863 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2864 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2865 .plaintext = "\x00\x01\x02",
2866 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
2867 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
2868 .psize = 3,
2869 .ksize = 16,
2870 } , {
2871 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2872 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2873 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2874 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2875 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
2876 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
2877 .psize = 16,
2878 .ksize = 16,
2879 }, {
2880 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2881 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2882 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2883 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2884 "\x10\x11\x12\x13",
2885 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
2886 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
2887 .tap = { 10, 10 },
2888 .psize = 20,
2889 .np = 2,
2890 .ksize = 16,
2891 }, {
2892 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2893 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2894 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2895 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2896 "\x10\x11\x12\x13\x14\x15\x16\x17"
2897 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
2898 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
2899 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
2900 .psize = 32,
2901 .ksize = 16,
2902 }, {
2903 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2904 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2905 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2906 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2907 "\x10\x11\x12\x13\x14\x15\x16\x17"
2908 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
2909 "\x20\x21",
2910 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
2911 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
2912 .tap = { 17, 17 },
2913 .psize = 34,
2914 .np = 2,
2915 .ksize = 16,
2916 }
2917};
2918
Salman Qaziba1ee072012-10-05 14:24:14 -07002919#define VMAC_AES_TEST_VECTORS 11
Shane Wang304a2042010-03-18 20:22:55 +08002920static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
Shane Wangf1939f72009-09-02 20:05:22 +10002921 '\x02', '\x03', '\x02', '\x02',
2922 '\x02', '\x04', '\x01', '\x07',
2923 '\x04', '\x01', '\x04', '\x03',};
Shane Wang304a2042010-03-18 20:22:55 +08002924static char vmac_string2[128] = {'a', 'b', 'c',};
2925static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
2926 'a', 'b', 'c', 'a', 'b', 'c',
2927 'a', 'b', 'c', 'a', 'b', 'c',
2928 'a', 'b', 'c', 'a', 'b', 'c',
2929 'a', 'b', 'c', 'a', 'b', 'c',
2930 'a', 'b', 'c', 'a', 'b', 'c',
2931 'a', 'b', 'c', 'a', 'b', 'c',
2932 'a', 'b', 'c', 'a', 'b', 'c',
2933 };
2934
Salman Qaziba1ee072012-10-05 14:24:14 -07002935static char vmac_string4[17] = {'b', 'c', 'e', 'f',
2936 'i', 'j', 'l', 'm',
2937 'o', 'p', 'r', 's',
2938 't', 'u', 'w', 'x', 'z'};
2939
2940static char vmac_string5[127] = {'r', 'm', 'b', 't', 'c',
2941 'o', 'l', 'k', ']', '%',
2942 '9', '2', '7', '!', 'A'};
2943
2944static char vmac_string6[129] = {'p', 't', '*', '7', 'l',
2945 'i', '!', '#', 'w', '0',
2946 'z', '/', '4', 'A', 'n'};
2947
Shane Wangf1939f72009-09-02 20:05:22 +10002948static struct hash_testvec aes_vmac128_tv_template[] = {
2949 {
Shane Wang304a2042010-03-18 20:22:55 +08002950 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2951 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2952 .plaintext = NULL,
2953 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
2954 .psize = 0,
2955 .ksize = 16,
2956 }, {
Shane Wangf1939f72009-09-02 20:05:22 +10002957 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2958 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Shane Wang304a2042010-03-18 20:22:55 +08002959 .plaintext = vmac_string1,
2960 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
2961 .psize = 128,
2962 .ksize = 16,
2963 }, {
2964 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2965 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2966 .plaintext = vmac_string2,
2967 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
2968 .psize = 128,
2969 .ksize = 16,
2970 }, {
2971 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2972 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2973 .plaintext = vmac_string3,
2974 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
2975 .psize = 128,
2976 .ksize = 16,
2977 }, {
2978 .key = "abcdefghijklmnop",
2979 .plaintext = NULL,
2980 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
2981 .psize = 0,
2982 .ksize = 16,
2983 }, {
2984 .key = "abcdefghijklmnop",
2985 .plaintext = vmac_string1,
2986 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
2987 .psize = 128,
2988 .ksize = 16,
2989 }, {
2990 .key = "abcdefghijklmnop",
2991 .plaintext = vmac_string2,
2992 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
2993 .psize = 128,
2994 .ksize = 16,
2995 }, {
2996 .key = "abcdefghijklmnop",
2997 .plaintext = vmac_string3,
2998 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
Shane Wangf1939f72009-09-02 20:05:22 +10002999 .psize = 128,
3000 .ksize = 16,
Salman Qaziba1ee072012-10-05 14:24:14 -07003001 }, {
3002 .key = "a09b5cd!f#07K\x00\x00\x00",
3003 .plaintext = vmac_string4,
3004 .digest = "\xab\xa5\x0f\xea\x42\x4e\xa1\x5f",
3005 .psize = sizeof(vmac_string4),
3006 .ksize = 16,
3007 }, {
3008 .key = "a09b5cd!f#07K\x00\x00\x00",
3009 .plaintext = vmac_string5,
3010 .digest = "\x25\x31\x98\xbc\x1d\xe8\x67\x60",
3011 .psize = sizeof(vmac_string5),
3012 .ksize = 16,
3013 }, {
3014 .key = "a09b5cd!f#07K\x00\x00\x00",
3015 .plaintext = vmac_string6,
3016 .digest = "\xc4\xae\x9b\x47\x95\x65\xeb\x41",
3017 .psize = sizeof(vmac_string6),
3018 .ksize = 16,
Shane Wangf1939f72009-09-02 20:05:22 +10003019 },
3020};
3021
Herbert Xuda7f0332008-07-31 17:08:25 +08003022/*
3023 * SHA384 HMAC test vectors from RFC4231
3024 */
3025
3026#define HMAC_SHA384_TEST_VECTORS 4
3027
3028static struct hash_testvec hmac_sha384_tv_template[] = {
3029 {
3030 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3031 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3032 "\x0b\x0b\x0b\x0b",
3033 .ksize = 20,
3034 .plaintext = "Hi There",
3035 .psize = 8,
3036 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
3037 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
3038 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
3039 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
3040 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
3041 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
3042 }, {
3043 .key = "Jefe",
3044 .ksize = 4,
3045 .plaintext = "what do ya want for nothing?",
3046 .psize = 28,
3047 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
3048 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
3049 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
3050 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
3051 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
3052 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
3053 .np = 4,
3054 .tap = { 7, 7, 7, 7 }
3055 }, {
3056 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3057 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3058 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3059 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3060 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3061 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3062 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3063 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3064 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3065 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3066 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3067 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3068 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3069 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3070 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3071 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3072 "\xaa\xaa\xaa",
3073 .ksize = 131,
3074 .plaintext = "Test Using Larger Than Block-Siz"
3075 "e Key - Hash Key First",
3076 .psize = 54,
3077 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
3078 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
3079 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
3080 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
3081 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
3082 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
3083 }, {
3084 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3085 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3086 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3087 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3088 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3089 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3090 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3091 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3092 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3093 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3094 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3095 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3096 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3097 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3098 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3099 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3100 "\xaa\xaa\xaa",
3101 .ksize = 131,
3102 .plaintext = "This is a test u"
3103 "sing a larger th"
3104 "an block-size ke"
3105 "y and a larger t"
3106 "han block-size d"
3107 "ata. The key nee"
3108 "ds to be hashed "
3109 "before being use"
3110 "d by the HMAC al"
3111 "gorithm.",
3112 .psize = 152,
3113 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
3114 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
3115 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
3116 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
3117 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
3118 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
3119 },
3120};
3121
3122/*
3123 * SHA512 HMAC test vectors from RFC4231
3124 */
3125
3126#define HMAC_SHA512_TEST_VECTORS 4
3127
3128static struct hash_testvec hmac_sha512_tv_template[] = {
3129 {
3130 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3131 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3132 "\x0b\x0b\x0b\x0b",
3133 .ksize = 20,
3134 .plaintext = "Hi There",
3135 .psize = 8,
3136 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
3137 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
3138 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
3139 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
3140 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
3141 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
3142 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
3143 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
3144 }, {
3145 .key = "Jefe",
3146 .ksize = 4,
3147 .plaintext = "what do ya want for nothing?",
3148 .psize = 28,
3149 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
3150 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
3151 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
3152 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
3153 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
3154 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
3155 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
3156 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
3157 .np = 4,
3158 .tap = { 7, 7, 7, 7 }
3159 }, {
3160 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3161 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3162 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3163 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3164 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3165 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3166 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3167 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3168 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3169 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3170 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3171 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3172 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3173 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3174 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3175 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3176 "\xaa\xaa\xaa",
3177 .ksize = 131,
3178 .plaintext = "Test Using Large"
3179 "r Than Block-Siz"
3180 "e Key - Hash Key"
3181 " First",
3182 .psize = 54,
3183 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
3184 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
3185 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
3186 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
3187 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
3188 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
3189 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
3190 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
3191 }, {
3192 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3193 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3194 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3195 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3196 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3197 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3198 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3199 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3200 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3201 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3202 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3203 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3204 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3205 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3206 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3207 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3208 "\xaa\xaa\xaa",
3209 .ksize = 131,
3210 .plaintext =
3211 "This is a test u"
3212 "sing a larger th"
3213 "an block-size ke"
3214 "y and a larger t"
3215 "han block-size d"
3216 "ata. The key nee"
3217 "ds to be hashed "
3218 "before being use"
3219 "d by the HMAC al"
3220 "gorithm.",
3221 .psize = 152,
3222 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
3223 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
3224 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
3225 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
3226 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
3227 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
3228 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
3229 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
3230 },
3231};
3232
3233/*
Martin Willieee9dc62015-06-01 13:43:59 +02003234 * Poly1305 test vectors from RFC7539 A.3.
3235 */
3236
3237#define POLY1305_TEST_VECTORS 11
3238
3239static struct hash_testvec poly1305_tv_template[] = {
3240 { /* Test Vector #1 */
Martin Willieee9dc62015-06-01 13:43:59 +02003241 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
3242 "\x00\x00\x00\x00\x00\x00\x00\x00"
3243 "\x00\x00\x00\x00\x00\x00\x00\x00"
3244 "\x00\x00\x00\x00\x00\x00\x00\x00"
3245 "\x00\x00\x00\x00\x00\x00\x00\x00"
3246 "\x00\x00\x00\x00\x00\x00\x00\x00"
3247 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003248 "\x00\x00\x00\x00\x00\x00\x00\x00"
3249 "\x00\x00\x00\x00\x00\x00\x00\x00"
3250 "\x00\x00\x00\x00\x00\x00\x00\x00"
3251 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003252 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003253 .psize = 96,
Martin Willieee9dc62015-06-01 13:43:59 +02003254 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3255 "\x00\x00\x00\x00\x00\x00\x00\x00",
3256 }, { /* Test Vector #2 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003257 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003258 "\x00\x00\x00\x00\x00\x00\x00\x00"
3259 "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003260 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3261 "\x41\x6e\x79\x20\x73\x75\x62\x6d"
Martin Willieee9dc62015-06-01 13:43:59 +02003262 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3263 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3264 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3265 "\x64\x65\x64\x20\x62\x79\x20\x74"
3266 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3267 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3268 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3269 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3270 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3271 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3272 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3273 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3274 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3275 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3276 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3277 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3278 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3279 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3280 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3281 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3282 "\x45\x54\x46\x20\x61\x63\x74\x69"
3283 "\x76\x69\x74\x79\x20\x69\x73\x20"
3284 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3285 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3286 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3287 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3288 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3289 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3290 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3291 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3292 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3293 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3294 "\x54\x46\x20\x73\x65\x73\x73\x69"
3295 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3296 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3297 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3298 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3299 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3300 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3301 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3302 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3303 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3304 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3305 "\x20\x77\x68\x69\x63\x68\x20\x61"
3306 "\x72\x65\x20\x61\x64\x64\x72\x65"
3307 "\x73\x73\x65\x64\x20\x74\x6f",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003308 .psize = 407,
Martin Willieee9dc62015-06-01 13:43:59 +02003309 .digest = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3310 "\xf0\xef\xca\x96\x22\x7a\x86\x3e",
3311 }, { /* Test Vector #3 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003312 .plaintext = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
Martin Willieee9dc62015-06-01 13:43:59 +02003313 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3314 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003315 "\x00\x00\x00\x00\x00\x00\x00\x00"
3316 "\x41\x6e\x79\x20\x73\x75\x62\x6d"
Martin Willieee9dc62015-06-01 13:43:59 +02003317 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3318 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3319 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3320 "\x64\x65\x64\x20\x62\x79\x20\x74"
3321 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3322 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3323 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3324 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3325 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3326 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3327 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3328 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3329 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3330 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3331 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3332 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3333 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3334 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3335 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3336 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3337 "\x45\x54\x46\x20\x61\x63\x74\x69"
3338 "\x76\x69\x74\x79\x20\x69\x73\x20"
3339 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3340 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3341 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3342 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3343 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3344 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3345 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3346 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3347 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3348 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3349 "\x54\x46\x20\x73\x65\x73\x73\x69"
3350 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3351 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3352 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3353 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3354 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3355 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3356 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3357 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3358 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3359 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3360 "\x20\x77\x68\x69\x63\x68\x20\x61"
3361 "\x72\x65\x20\x61\x64\x64\x72\x65"
3362 "\x73\x73\x65\x64\x20\x74\x6f",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003363 .psize = 407,
Martin Willieee9dc62015-06-01 13:43:59 +02003364 .digest = "\xf3\x47\x7e\x7c\xd9\x54\x17\xaf"
3365 "\x89\xa6\xb8\x79\x4c\x31\x0c\xf0",
3366 }, { /* Test Vector #4 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003367 .plaintext = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
Martin Willieee9dc62015-06-01 13:43:59 +02003368 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
3369 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003370 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
3371 "\x27\x54\x77\x61\x73\x20\x62\x72"
Martin Willieee9dc62015-06-01 13:43:59 +02003372 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
3373 "\x6e\x64\x20\x74\x68\x65\x20\x73"
3374 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
3375 "\x76\x65\x73\x0a\x44\x69\x64\x20"
3376 "\x67\x79\x72\x65\x20\x61\x6e\x64"
3377 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
3378 "\x69\x6e\x20\x74\x68\x65\x20\x77"
3379 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
3380 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
3381 "\x65\x72\x65\x20\x74\x68\x65\x20"
3382 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
3383 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
3384 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
3385 "\x72\x61\x74\x68\x73\x20\x6f\x75"
3386 "\x74\x67\x72\x61\x62\x65\x2e",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003387 .psize = 159,
Martin Willieee9dc62015-06-01 13:43:59 +02003388 .digest = "\x45\x41\x66\x9a\x7e\xaa\xee\x61"
3389 "\xe7\x08\xdc\x7c\xbc\xc5\xeb\x62",
3390 }, { /* Test Vector #5 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003391 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003392 "\x00\x00\x00\x00\x00\x00\x00\x00"
3393 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003394 "\x00\x00\x00\x00\x00\x00\x00\x00"
3395 "\xff\xff\xff\xff\xff\xff\xff\xff"
3396 "\xff\xff\xff\xff\xff\xff\xff\xff",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003397 .psize = 48,
3398 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003399 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003400 }, { /* Test Vector #6 */
3401 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
3402 "\x00\x00\x00\x00\x00\x00\x00\x00"
3403 "\xff\xff\xff\xff\xff\xff\xff\xff"
3404 "\xff\xff\xff\xff\xff\xff\xff\xff"
3405 "\x02\x00\x00\x00\x00\x00\x00\x00"
3406 "\x00\x00\x00\x00\x00\x00\x00\x00",
3407 .psize = 48,
Martin Willieee9dc62015-06-01 13:43:59 +02003408 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
3409 "\x00\x00\x00\x00\x00\x00\x00\x00",
3410 }, { /* Test Vector #7 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003411 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003412 "\x00\x00\x00\x00\x00\x00\x00\x00"
3413 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003414 "\x00\x00\x00\x00\x00\x00\x00\x00"
3415 "\xff\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003416 "\xff\xff\xff\xff\xff\xff\xff\xff"
3417 "\xf0\xff\xff\xff\xff\xff\xff\xff"
3418 "\xff\xff\xff\xff\xff\xff\xff\xff"
3419 "\x11\x00\x00\x00\x00\x00\x00\x00"
3420 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003421 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003422 .digest = "\x05\x00\x00\x00\x00\x00\x00\x00"
3423 "\x00\x00\x00\x00\x00\x00\x00\x00",
3424 }, { /* Test Vector #8 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003425 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003426 "\x00\x00\x00\x00\x00\x00\x00\x00"
3427 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003428 "\x00\x00\x00\x00\x00\x00\x00\x00"
3429 "\xff\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003430 "\xff\xff\xff\xff\xff\xff\xff\xff"
3431 "\xfb\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3432 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3433 "\x01\x01\x01\x01\x01\x01\x01\x01"
3434 "\x01\x01\x01\x01\x01\x01\x01\x01",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003435 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003436 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3437 "\x00\x00\x00\x00\x00\x00\x00\x00",
3438 }, { /* Test Vector #9 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003439 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003440 "\x00\x00\x00\x00\x00\x00\x00\x00"
3441 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003442 "\x00\x00\x00\x00\x00\x00\x00\x00"
3443 "\xfd\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003444 "\xff\xff\xff\xff\xff\xff\xff\xff",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003445 .psize = 48,
Martin Willieee9dc62015-06-01 13:43:59 +02003446 .digest = "\xfa\xff\xff\xff\xff\xff\xff\xff"
3447 "\xff\xff\xff\xff\xff\xff\xff\xff",
3448 }, { /* Test Vector #10 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003449 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003450 "\x04\x00\x00\x00\x00\x00\x00\x00"
3451 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003452 "\x00\x00\x00\x00\x00\x00\x00\x00"
3453 "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
Martin Willieee9dc62015-06-01 13:43:59 +02003454 "\x00\x00\x00\x00\x00\x00\x00\x00"
3455 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3456 "\x01\x00\x00\x00\x00\x00\x00\x00"
3457 "\x00\x00\x00\x00\x00\x00\x00\x00"
3458 "\x00\x00\x00\x00\x00\x00\x00\x00"
3459 "\x01\x00\x00\x00\x00\x00\x00\x00"
3460 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003461 .psize = 96,
Martin Willieee9dc62015-06-01 13:43:59 +02003462 .digest = "\x14\x00\x00\x00\x00\x00\x00\x00"
3463 "\x55\x00\x00\x00\x00\x00\x00\x00",
3464 }, { /* Test Vector #11 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003465 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003466 "\x04\x00\x00\x00\x00\x00\x00\x00"
3467 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003468 "\x00\x00\x00\x00\x00\x00\x00\x00"
3469 "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
Martin Willieee9dc62015-06-01 13:43:59 +02003470 "\x00\x00\x00\x00\x00\x00\x00\x00"
3471 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3472 "\x01\x00\x00\x00\x00\x00\x00\x00"
3473 "\x00\x00\x00\x00\x00\x00\x00\x00"
3474 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003475 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003476 .digest = "\x13\x00\x00\x00\x00\x00\x00\x00"
3477 "\x00\x00\x00\x00\x00\x00\x00\x00",
3478 },
3479};
3480
3481/*
Herbert Xuda7f0332008-07-31 17:08:25 +08003482 * DES test vectors.
3483 */
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003484#define DES_ENC_TEST_VECTORS 11
3485#define DES_DEC_TEST_VECTORS 5
3486#define DES_CBC_ENC_TEST_VECTORS 6
3487#define DES_CBC_DEC_TEST_VECTORS 5
3488#define DES_CTR_ENC_TEST_VECTORS 2
3489#define DES_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003490#define DES3_EDE_ENC_TEST_VECTORS 4
3491#define DES3_EDE_DEC_TEST_VECTORS 4
3492#define DES3_EDE_CBC_ENC_TEST_VECTORS 2
3493#define DES3_EDE_CBC_DEC_TEST_VECTORS 2
3494#define DES3_EDE_CTR_ENC_TEST_VECTORS 2
3495#define DES3_EDE_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08003496
3497static struct cipher_testvec des_enc_tv_template[] = {
3498 { /* From Applied Cryptography */
3499 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3500 .klen = 8,
3501 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3502 .ilen = 8,
3503 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3504 .rlen = 8,
3505 }, { /* Same key, different plaintext block */
3506 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3507 .klen = 8,
3508 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
3509 .ilen = 8,
3510 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3511 .rlen = 8,
3512 }, { /* Sbox test from NBS */
3513 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3514 .klen = 8,
3515 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3516 .ilen = 8,
3517 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3518 .rlen = 8,
3519 }, { /* Three blocks */
3520 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3521 .klen = 8,
3522 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3523 "\x22\x33\x44\x55\x66\x77\x88\x99"
3524 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3525 .ilen = 24,
3526 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3527 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3528 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3529 .rlen = 24,
3530 }, { /* Weak key */
David Howells09e21782015-04-28 15:36:36 +01003531 .fail = true,
Herbert Xuda7f0332008-07-31 17:08:25 +08003532 .wk = 1,
3533 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
3534 .klen = 8,
3535 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3536 .ilen = 8,
3537 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3538 .rlen = 8,
3539 }, { /* Two blocks -- for testing encryption across pages */
3540 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3541 .klen = 8,
3542 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3543 "\x22\x33\x44\x55\x66\x77\x88\x99",
3544 .ilen = 16,
3545 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3546 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3547 .rlen = 16,
3548 .np = 2,
3549 .tap = { 8, 8 }
3550 }, { /* Four blocks -- for testing encryption with chunking */
3551 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3552 .klen = 8,
3553 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3554 "\x22\x33\x44\x55\x66\x77\x88\x99"
3555 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
3556 "\x22\x33\x44\x55\x66\x77\x88\x99",
3557 .ilen = 32,
3558 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3559 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3560 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
3561 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3562 .rlen = 32,
3563 .np = 3,
3564 .tap = { 14, 10, 8 }
3565 }, {
3566 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3567 .klen = 8,
3568 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3569 "\x22\x33\x44\x55\x66\x77\x88\x99"
3570 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3571 .ilen = 24,
3572 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3573 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3574 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3575 .rlen = 24,
3576 .np = 4,
3577 .tap = { 2, 1, 3, 18 }
3578 }, {
3579 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3580 .klen = 8,
3581 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3582 "\x22\x33\x44\x55\x66\x77\x88\x99",
3583 .ilen = 16,
3584 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3585 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3586 .rlen = 16,
3587 .np = 5,
3588 .tap = { 2, 2, 2, 2, 8 }
3589 }, {
3590 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3591 .klen = 8,
3592 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3593 .ilen = 8,
3594 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3595 .rlen = 8,
3596 .np = 8,
3597 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003598 }, { /* Generated with Crypto++ */
3599 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3600 .klen = 8,
3601 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3602 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3603 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3604 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3605 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3606 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3607 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3608 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3609 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3610 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3611 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3612 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3613 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3614 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3615 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3616 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3617 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3618 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3619 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3620 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3621 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3622 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3623 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3624 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3625 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3626 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3627 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3628 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3629 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3630 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3631 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3632 .ilen = 248,
3633 .result = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3634 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3635 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3636 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3637 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3638 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3639 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3640 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3641 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3642 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3643 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3644 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3645 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3646 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3647 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3648 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3649 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3650 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3651 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3652 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3653 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3654 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3655 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3656 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3657 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3658 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3659 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3660 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3661 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3662 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3663 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3664 .rlen = 248,
3665 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003666 .np = 3,
3667 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003668 },
3669};
3670
3671static struct cipher_testvec des_dec_tv_template[] = {
3672 { /* From Applied Cryptography */
3673 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3674 .klen = 8,
3675 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3676 .ilen = 8,
3677 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3678 .rlen = 8,
3679 }, { /* Sbox test from NBS */
3680 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3681 .klen = 8,
3682 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3683 .ilen = 8,
3684 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3685 .rlen = 8,
3686 }, { /* Two blocks, for chunking test */
3687 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3688 .klen = 8,
3689 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3690 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3691 .ilen = 16,
3692 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3693 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3694 .rlen = 16,
3695 .np = 2,
3696 .tap = { 8, 8 }
3697 }, {
3698 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3699 .klen = 8,
3700 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3701 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3702 .ilen = 16,
3703 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3704 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3705 .rlen = 16,
3706 .np = 3,
3707 .tap = { 3, 12, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003708 }, { /* Generated with Crypto++ */
3709 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3710 .klen = 8,
3711 .input = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3712 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3713 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3714 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3715 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3716 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3717 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3718 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3719 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3720 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3721 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3722 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3723 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3724 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3725 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3726 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3727 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3728 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3729 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3730 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3731 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3732 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3733 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3734 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3735 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3736 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3737 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3738 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3739 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3740 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3741 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3742 .ilen = 248,
3743 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3744 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3745 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3746 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3747 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3748 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3749 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3750 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3751 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3752 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3753 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3754 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3755 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3756 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3757 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3758 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3759 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3760 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3761 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3762 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3763 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3764 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3765 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3766 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3767 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3768 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3769 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3770 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3771 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3772 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3773 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3774 .rlen = 248,
3775 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003776 .np = 3,
3777 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003778 },
3779};
3780
3781static struct cipher_testvec des_cbc_enc_tv_template[] = {
3782 { /* From OpenSSL */
3783 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3784 .klen = 8,
3785 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3786 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3787 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3788 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3789 .ilen = 24,
3790 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3791 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3792 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3793 .rlen = 24,
3794 }, { /* FIPS Pub 81 */
3795 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3796 .klen = 8,
3797 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3798 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3799 .ilen = 8,
3800 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3801 .rlen = 8,
3802 }, {
3803 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3804 .klen = 8,
3805 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3806 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3807 .ilen = 8,
3808 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3809 .rlen = 8,
3810 }, {
3811 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3812 .klen = 8,
3813 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3814 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3815 .ilen = 8,
3816 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3817 .rlen = 8,
3818 }, { /* Copy of openssl vector for chunk testing */
3819 /* From OpenSSL */
3820 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3821 .klen = 8,
3822 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3823 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3824 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3825 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3826 .ilen = 24,
3827 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3828 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3829 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3830 .rlen = 24,
3831 .np = 2,
3832 .tap = { 13, 11 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003833 }, { /* Generated with Crypto++ */
3834 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3835 .klen = 8,
3836 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3837 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3838 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3839 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3840 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3841 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3842 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3843 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3844 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3845 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3846 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3847 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3848 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3849 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3850 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3851 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3852 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3853 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3854 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3855 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3856 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3857 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3858 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3859 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3860 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3861 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3862 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3863 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3864 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3865 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3866 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3867 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3868 .ilen = 248,
3869 .result = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3870 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3871 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3872 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3873 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3874 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3875 "\x81\x72\x74\xDE\x30\x19\x69\x49"
3876 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3877 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3878 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3879 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3880 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3881 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3882 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3883 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3884 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3885 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3886 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3887 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3888 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3889 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3890 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3891 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3892 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3893 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3894 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3895 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3896 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3897 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3898 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3899 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3900 .rlen = 248,
3901 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003902 .np = 3,
3903 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003904 },
3905};
3906
3907static struct cipher_testvec des_cbc_dec_tv_template[] = {
3908 { /* FIPS Pub 81 */
3909 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3910 .klen = 8,
3911 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3912 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3913 .ilen = 8,
3914 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3915 .rlen = 8,
3916 }, {
3917 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3918 .klen = 8,
3919 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3920 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3921 .ilen = 8,
3922 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3923 .rlen = 8,
3924 }, {
3925 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3926 .klen = 8,
3927 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3928 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3929 .ilen = 8,
3930 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3931 .rlen = 8,
3932 }, { /* Copy of above, for chunk testing */
3933 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3934 .klen = 8,
3935 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3936 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3937 .ilen = 8,
3938 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3939 .rlen = 8,
3940 .np = 2,
3941 .tap = { 4, 4 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003942 }, { /* Generated with Crypto++ */
3943 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3944 .klen = 8,
3945 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3946 .input = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3947 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3948 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3949 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3950 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3951 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3952 "\x81\x72\x74\xDE\x30\x19\x69\x49"
3953 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3954 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3955 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3956 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3957 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3958 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3959 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3960 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3961 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3962 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3963 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3964 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3965 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3966 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3967 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3968 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3969 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3970 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3971 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3972 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3973 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3974 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3975 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3976 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3977 .ilen = 248,
3978 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3979 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3980 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3981 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3982 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3983 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3984 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3985 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3986 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3987 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3988 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3989 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3990 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3991 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3992 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3993 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3994 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3995 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3996 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3997 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3998 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3999 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4000 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4001 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4002 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4003 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4004 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4005 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4006 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4007 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4008 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4009 .rlen = 248,
4010 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004011 .np = 3,
4012 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004013 },
4014};
4015
4016static struct cipher_testvec des_ctr_enc_tv_template[] = {
4017 { /* Generated with Crypto++ */
4018 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4019 .klen = 8,
4020 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4021 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4022 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4023 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4024 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4025 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4026 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4027 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4028 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4029 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4030 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4031 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4032 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4033 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4034 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4035 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4036 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4037 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4038 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4039 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4040 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4041 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4042 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4043 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4044 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4045 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4046 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4047 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4048 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4049 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4050 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4051 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4052 .ilen = 248,
4053 .result = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
4054 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
4055 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
4056 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
4057 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
4058 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
4059 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
4060 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
4061 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4062 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4063 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4064 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4065 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4066 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4067 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4068 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4069 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4070 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4071 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4072 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4073 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4074 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4075 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4076 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4077 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4078 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4079 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4080 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4081 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4082 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4083 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4084 .rlen = 248,
4085 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004086 .np = 3,
4087 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004088 }, { /* Generated with Crypto++ */
4089 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4090 .klen = 8,
4091 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4092 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4093 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4094 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4095 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4096 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4097 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4098 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4099 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4100 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4101 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4102 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4103 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4104 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4105 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4106 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4107 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4108 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4109 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4110 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4111 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4112 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4113 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4114 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4115 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4116 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4117 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4118 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4119 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4120 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4121 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4122 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4123 .ilen = 247,
4124 .result = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4125 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4126 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4127 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4128 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4129 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4130 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4131 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4132 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4133 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4134 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4135 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4136 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4137 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4138 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4139 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4140 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4141 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4142 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4143 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4144 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4145 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4146 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4147 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4148 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4149 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4150 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4151 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4152 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4153 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4154 "\x91\x45\x05\x3E\x58\xBF\x32",
4155 .rlen = 247,
4156 .also_non_np = 1,
4157 .np = 2,
4158 .tap = { 247 - 8, 8 },
4159 },
4160};
4161
4162static struct cipher_testvec des_ctr_dec_tv_template[] = {
4163 { /* Generated with Crypto++ */
4164 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4165 .klen = 8,
4166 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4167 .input = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
4168 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
4169 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
4170 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
4171 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
4172 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
4173 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
4174 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
4175 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4176 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4177 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4178 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4179 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4180 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4181 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4182 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4183 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4184 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4185 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4186 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4187 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4188 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4189 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4190 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4191 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4192 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4193 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4194 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4195 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4196 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4197 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4198 .ilen = 248,
4199 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4200 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4201 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4202 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4203 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4204 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4205 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4206 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4207 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4208 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4209 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4210 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4211 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4212 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4213 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4214 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4215 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4216 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4217 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4218 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4219 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4220 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4221 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4222 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4223 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4224 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4225 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4226 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4227 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4228 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4229 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4230 .rlen = 248,
4231 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004232 .np = 3,
4233 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004234 }, { /* Generated with Crypto++ */
4235 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4236 .klen = 8,
4237 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4238 .input = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4239 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4240 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4241 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4242 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4243 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4244 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4245 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4246 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4247 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4248 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4249 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4250 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4251 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4252 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4253 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4254 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4255 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4256 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4257 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4258 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4259 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4260 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4261 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4262 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4263 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4264 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4265 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4266 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4267 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4268 "\x91\x45\x05\x3E\x58\xBF\x32",
4269 .ilen = 247,
4270 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4271 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4272 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4273 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4274 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4275 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4276 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4277 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4278 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4279 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4280 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4281 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4282 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4283 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4284 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4285 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4286 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4287 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4288 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4289 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4290 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4291 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4292 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4293 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4294 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4295 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4296 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4297 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4298 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4299 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4300 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4301 .rlen = 247,
4302 .also_non_np = 1,
4303 .np = 2,
4304 .tap = { 247 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004305 },
4306};
4307
4308static struct cipher_testvec des3_ede_enc_tv_template[] = {
4309 { /* These are from openssl */
4310 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4311 "\x55\x55\x55\x55\x55\x55\x55\x55"
4312 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4313 .klen = 24,
4314 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4315 .ilen = 8,
4316 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4317 .rlen = 8,
4318 }, {
4319 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4320 "\x86\x02\x87\x66\x59\x08\x21\x98"
4321 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4322 .klen = 24,
4323 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4324 .ilen = 8,
4325 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4326 .rlen = 8,
4327 }, {
4328 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4329 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4330 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4331 .klen = 24,
4332 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
4333 .ilen = 8,
4334 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4335 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004336 }, { /* Generated with Crypto++ */
4337 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4338 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4339 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4340 .klen = 24,
4341 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4342 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4343 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4344 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4345 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4346 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4347 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4348 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4349 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4350 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4351 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4352 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4353 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4354 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4355 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4356 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4357 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4358 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4359 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4360 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4361 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4362 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4363 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4364 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4365 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4366 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4367 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4368 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4369 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4370 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4371 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4372 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4373 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4374 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4375 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4376 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4377 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4378 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4379 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4380 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4381 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4382 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4383 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4384 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4385 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4386 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4387 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4388 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4389 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4390 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4391 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4392 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4393 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4394 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4395 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4396 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4397 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4398 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4399 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4400 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4401 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4402 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4403 .ilen = 496,
4404 .result = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4405 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4406 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4407 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4408 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4409 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4410 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4411 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4412 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4413 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4414 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4415 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4416 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4417 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4418 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4419 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4420 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4421 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4422 "\x45\x86\x50\x01\x70\x35\x99\x92"
4423 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4424 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4425 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4426 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4427 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4428 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4429 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4430 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4431 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4432 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4433 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4434 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4435 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4436 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4437 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4438 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4439 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4440 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4441 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4442 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4443 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4444 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4445 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4446 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4447 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4448 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4449 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4450 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4451 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4452 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4453 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4454 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4455 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4456 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4457 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4458 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4459 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4460 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4461 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4462 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4463 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4464 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4465 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4466 .rlen = 496,
4467 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004468 .np = 3,
4469 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004470 },
4471};
4472
4473static struct cipher_testvec des3_ede_dec_tv_template[] = {
4474 { /* These are from openssl */
4475 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4476 "\x55\x55\x55\x55\x55\x55\x55\x55"
4477 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4478 .klen = 24,
4479 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4480 .ilen = 8,
4481 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4482 .rlen = 8,
4483 }, {
4484 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4485 "\x86\x02\x87\x66\x59\x08\x21\x98"
4486 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4487 .klen = 24,
4488 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4489 .ilen = 8,
4490 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4491 .rlen = 8,
4492 }, {
4493 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4494 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4495 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4496 .klen = 24,
4497 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4498 .ilen = 8,
4499 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
4500 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004501 }, { /* Generated with Crypto++ */
4502 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4503 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4504 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4505 .klen = 24,
4506 .input = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4507 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4508 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4509 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4510 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4511 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4512 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4513 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4514 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4515 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4516 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4517 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4518 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4519 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4520 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4521 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4522 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4523 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4524 "\x45\x86\x50\x01\x70\x35\x99\x92"
4525 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4526 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4527 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4528 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4529 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4530 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4531 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4532 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4533 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4534 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4535 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4536 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4537 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4538 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4539 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4540 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4541 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4542 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4543 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4544 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4545 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4546 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4547 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4548 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4549 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4550 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4551 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4552 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4553 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4554 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4555 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4556 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4557 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4558 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4559 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4560 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4561 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4562 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4563 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4564 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4565 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4566 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4567 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4568 .ilen = 496,
4569 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4570 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4571 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4572 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4573 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4574 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4575 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4576 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4577 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4578 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4579 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4580 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4581 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4582 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4583 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4584 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4585 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4586 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4587 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4588 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4589 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4590 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4591 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4592 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4593 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4594 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4595 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4596 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4597 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4598 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4599 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4600 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4601 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4602 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4603 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4604 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4605 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4606 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4607 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4608 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4609 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4610 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4611 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4612 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4613 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4614 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4615 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4616 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4617 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4618 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4619 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4620 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4621 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4622 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4623 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4624 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4625 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4626 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4627 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4628 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4629 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4630 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4631 .rlen = 496,
4632 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004633 .np = 3,
4634 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004635 },
4636};
4637
4638static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
4639 { /* Generated from openssl */
4640 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4641 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4642 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4643 .klen = 24,
4644 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4645 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4646 "\x53\x20\x63\x65\x65\x72\x73\x74"
4647 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4648 "\x20\x79\x65\x53\x72\x63\x74\x65"
4649 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4650 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4651 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4652 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4653 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4654 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4655 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4656 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4657 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4658 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4659 "\x63\x65\x65\x72\x73\x74\x54\x20"
4660 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4661 .ilen = 128,
4662 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4663 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4664 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4665 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4666 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4667 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4668 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4669 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4670 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4671 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4672 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4673 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4674 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4675 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4676 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4677 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4678 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004679 }, { /* Generated with Crypto++ */
4680 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4681 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4682 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4683 .klen = 24,
4684 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4685 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4686 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4687 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4688 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4689 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4690 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4691 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4692 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4693 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4694 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4695 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4696 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4697 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4698 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4699 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4700 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4701 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4702 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4703 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4704 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4705 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4706 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4707 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4708 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4709 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4710 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4711 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4712 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4713 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4714 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4715 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4716 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4717 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4718 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4719 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4720 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4721 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4722 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4723 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4724 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4725 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4726 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4727 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4728 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4729 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4730 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4731 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4732 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4733 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4734 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4735 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4736 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4737 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4738 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4739 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4740 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4741 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4742 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4743 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4744 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4745 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4746 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4747 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4748 .ilen = 496,
4749 .result = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4750 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4751 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4752 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4753 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4754 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4755 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4756 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4757 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4758 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4759 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4760 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4761 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4762 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4763 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4764 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4765 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4766 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4767 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4768 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4769 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4770 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4771 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4772 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4773 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4774 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4775 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4776 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4777 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4778 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4779 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4780 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4781 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4782 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4783 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4784 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4785 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4786 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4787 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4788 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4789 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4790 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4791 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4792 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4793 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4794 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4795 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4796 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4797 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4798 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4799 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4800 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4801 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4802 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4803 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4804 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4805 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4806 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4807 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4808 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4809 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4810 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4811 .rlen = 496,
4812 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004813 .np = 3,
4814 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004815 },
4816};
4817
4818static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
4819 { /* Generated from openssl */
4820 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4821 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4822 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4823 .klen = 24,
4824 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4825 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4826 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4827 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4828 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4829 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4830 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4831 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4832 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4833 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4834 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4835 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4836 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4837 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4838 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4839 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4840 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4841 .ilen = 128,
4842 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4843 "\x53\x20\x63\x65\x65\x72\x73\x74"
4844 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4845 "\x20\x79\x65\x53\x72\x63\x74\x65"
4846 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4847 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4848 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4849 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4850 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4851 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4852 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4853 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4854 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4855 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4856 "\x63\x65\x65\x72\x73\x74\x54\x20"
4857 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4858 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004859 }, { /* Generated with Crypto++ */
4860 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4861 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4862 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4863 .klen = 24,
4864 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4865 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4866 .input = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4867 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4868 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4869 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4870 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4871 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4872 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4873 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4874 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4875 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4876 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4877 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4878 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4879 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4880 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4881 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4882 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4883 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4884 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4885 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4886 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4887 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4888 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4889 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4890 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4891 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4892 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4893 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4894 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4895 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4896 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4897 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4898 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4899 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4900 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4901 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4902 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4903 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4904 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4905 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4906 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4907 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4908 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4909 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4910 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4911 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4912 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4913 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4914 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4915 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4916 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4917 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4918 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4919 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4920 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4921 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4922 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4923 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4924 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4925 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4926 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4927 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4928 .ilen = 496,
4929 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4930 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4931 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4932 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4933 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4934 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4935 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4936 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4937 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4938 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4939 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4940 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4941 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4942 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4943 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4944 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4945 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4946 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4947 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4948 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4949 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4950 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4951 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4952 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4953 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4954 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4955 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4956 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4957 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4958 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4959 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4960 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4961 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4962 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4963 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4964 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4965 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4966 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4967 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4968 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4969 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4970 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4971 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4972 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4973 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4974 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4975 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4976 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4977 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4978 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4979 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4980 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4981 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4982 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4983 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4984 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4985 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4986 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4987 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4988 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4989 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4990 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4991 .rlen = 496,
4992 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004993 .np = 3,
4994 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004995 },
4996};
4997
4998static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
4999 { /* Generated with Crypto++ */
5000 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5001 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5002 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5003 .klen = 24,
5004 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5005 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5006 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5007 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5008 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5009 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5010 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5011 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5012 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5013 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5014 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5015 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5016 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5017 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5018 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5019 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5020 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5021 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5022 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5023 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5024 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5025 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5026 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5027 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5028 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5029 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5030 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5031 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5032 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5033 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5034 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5035 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5036 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5037 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5038 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5039 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5040 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5041 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5042 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5043 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5044 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5045 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5046 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5047 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5048 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5049 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5050 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5051 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5052 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5053 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5054 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5055 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5056 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5057 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5058 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5059 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5060 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5061 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5062 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5063 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5064 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5065 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5066 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5067 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5068 .ilen = 496,
5069 .result = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5070 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5071 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5072 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5073 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5074 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5075 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5076 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5077 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5078 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5079 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5080 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5081 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5082 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5083 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5084 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5085 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5086 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5087 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5088 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5089 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5090 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5091 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5092 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5093 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5094 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5095 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5096 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5097 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5098 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5099 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5100 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5101 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5102 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5103 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5104 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5105 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5106 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5107 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5108 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5109 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5110 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5111 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5112 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5113 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5114 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5115 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5116 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5117 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5118 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5119 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5120 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5121 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5122 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5123 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5124 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5125 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5126 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5127 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5128 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5129 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5130 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5131 .rlen = 496,
5132 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005133 .np = 3,
5134 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005135 }, { /* Generated with Crypto++ */
5136 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5137 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5138 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5139 .klen = 24,
5140 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5141 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5142 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5143 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5144 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5145 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5146 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5147 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5148 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5149 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5150 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5151 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5152 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5153 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5154 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5155 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5156 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5157 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5158 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5159 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5160 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5161 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5162 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5163 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5164 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5165 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5166 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5167 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5168 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5169 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5170 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5171 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5172 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5173 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5174 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5175 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5176 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5177 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5178 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5179 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5180 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5181 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5182 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5183 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5184 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5185 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5186 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5187 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5188 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5189 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5190 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5191 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5192 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5193 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5194 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5195 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5196 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5197 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5198 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5199 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5200 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5201 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5202 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5203 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5204 "\x2E\xB1\x18",
5205 .ilen = 499,
5206 .result = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5207 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5208 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5209 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5210 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5211 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5212 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5213 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5214 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5215 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5216 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5217 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5218 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5219 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5220 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5221 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5222 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5223 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5224 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5225 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5226 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5227 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5228 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5229 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5230 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5231 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5232 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5233 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5234 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5235 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5236 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5237 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5238 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5239 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5240 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5241 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5242 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5243 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5244 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5245 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5246 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5247 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5248 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5249 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5250 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5251 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5252 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5253 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5254 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5255 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5256 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5257 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5258 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5259 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5260 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5261 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5262 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5263 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5264 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5265 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5266 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5267 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5268 "\xF2\x79\xD9",
5269 .rlen = 499,
5270 .also_non_np = 1,
5271 .np = 2,
5272 .tap = { 499 - 16, 16 },
5273 },
5274};
5275
5276static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
5277 { /* Generated with Crypto++ */
5278 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5279 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5280 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5281 .klen = 24,
5282 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5283 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5284 .input = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5285 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5286 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5287 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5288 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5289 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5290 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5291 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5292 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5293 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5294 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5295 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5296 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5297 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5298 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5299 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5300 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5301 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5302 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5303 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5304 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5305 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5306 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5307 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5308 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5309 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5310 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5311 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5312 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5313 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5314 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5315 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5316 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5317 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5318 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5319 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5320 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5321 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5322 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5323 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5324 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5325 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5326 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5327 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5328 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5329 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5330 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5331 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5332 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5333 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5334 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5335 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5336 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5337 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5338 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5339 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5340 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5341 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5342 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5343 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5344 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5345 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5346 .ilen = 496,
5347 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5348 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5349 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5350 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5351 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5352 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5353 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5354 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5355 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5356 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5357 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5358 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5359 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5360 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5361 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5362 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5363 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5364 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5365 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5366 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5367 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5368 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5369 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5370 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5371 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5372 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5373 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5374 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5375 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5376 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5377 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5378 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5379 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5380 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5381 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5382 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5383 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5384 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5385 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5386 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5387 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5388 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5389 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5390 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5391 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5392 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5393 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5394 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5395 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5396 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5397 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5398 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5399 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5400 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5401 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5402 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5403 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5404 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5405 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5406 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5407 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5408 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5409 .rlen = 496,
5410 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005411 .np = 3,
5412 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005413 }, { /* Generated with Crypto++ */
5414 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5415 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5416 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5417 .klen = 24,
5418 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5419 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5420 .input = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5421 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5422 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5423 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5424 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5425 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5426 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5427 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5428 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5429 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5430 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5431 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5432 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5433 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5434 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5435 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5436 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5437 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5438 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5439 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5440 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5441 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5442 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5443 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5444 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5445 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5446 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5447 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5448 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5449 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5450 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5451 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5452 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5453 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5454 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5455 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5456 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5457 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5458 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5459 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5460 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5461 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5462 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5463 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5464 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5465 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5466 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5467 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5468 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5469 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5470 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5471 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5472 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5473 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5474 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5475 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5476 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5477 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5478 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5479 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5480 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5481 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5482 "\xF2\x79\xD9",
5483 .ilen = 499,
5484 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5485 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5486 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5487 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5488 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5489 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5490 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5491 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5492 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5493 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5494 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5495 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5496 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5497 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5498 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5499 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5500 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5501 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5502 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5503 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5504 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5505 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5506 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5507 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5508 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5509 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5510 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5511 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5512 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5513 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5514 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5515 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5516 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5517 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5518 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5519 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5520 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5521 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5522 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5523 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5524 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5525 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5526 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5527 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5528 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5529 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5530 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5531 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5532 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5533 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5534 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5535 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5536 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5537 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5538 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5539 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5540 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5541 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5542 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5543 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5544 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5545 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5546 "\x2E\xB1\x18",
5547 .rlen = 499,
5548 .also_non_np = 1,
5549 .np = 2,
5550 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005551 },
5552};
5553
5554/*
5555 * Blowfish test vectors.
5556 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005557#define BF_ENC_TEST_VECTORS 7
5558#define BF_DEC_TEST_VECTORS 7
5559#define BF_CBC_ENC_TEST_VECTORS 2
5560#define BF_CBC_DEC_TEST_VECTORS 2
5561#define BF_CTR_ENC_TEST_VECTORS 2
5562#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08005563
5564static struct cipher_testvec bf_enc_tv_template[] = {
5565 { /* DES test vectors from OpenSSL */
5566 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5567 .klen = 8,
5568 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
5569 .ilen = 8,
5570 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5571 .rlen = 8,
5572 }, {
5573 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5574 .klen = 8,
5575 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5576 .ilen = 8,
5577 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5578 .rlen = 8,
5579 }, {
5580 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5581 .klen = 8,
5582 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5583 .ilen = 8,
5584 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5585 .rlen = 8,
5586 }, { /* Vary the keylength... */
5587 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5588 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5589 .klen = 16,
5590 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5591 .ilen = 8,
5592 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5593 .rlen = 8,
5594 }, {
5595 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5596 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5597 "\x00\x11\x22\x33\x44",
5598 .klen = 21,
5599 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5600 .ilen = 8,
5601 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5602 .rlen = 8,
5603 }, { /* Generated with bf488 */
5604 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5605 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5606 "\x00\x11\x22\x33\x44\x55\x66\x77"
5607 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5608 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5609 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5610 "\xff\xff\xff\xff\xff\xff\xff\xff",
5611 .klen = 56,
5612 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5613 .ilen = 8,
5614 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5615 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005616 }, { /* Generated with Crypto++ */
5617 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5618 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5619 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5620 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5621 .klen = 32,
5622 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5623 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5624 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5625 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005626 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5627 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5628 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5629 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5630 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5631 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5632 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5633 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5634 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5635 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5636 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5637 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5638 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5639 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5640 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5641 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5642 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5643 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5644 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5645 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5646 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5647 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5648 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5649 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5650 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5651 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5652 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5653 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5654 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5655 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5656 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5657 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5658 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5659 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5660 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5661 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5662 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5663 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5664 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5665 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5666 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5667 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5668 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5669 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5670 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5671 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5672 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5673 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5674 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5675 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5676 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5677 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5678 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5679 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5680 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5681 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5682 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5683 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5684 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5685 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005686 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5687 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5688 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5689 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005690 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5691 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5692 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5693 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5694 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5695 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5696 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5697 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5698 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5699 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5700 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5701 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5702 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5703 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5704 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5705 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5706 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5707 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5708 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5709 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5710 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5711 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5712 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5713 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5714 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5715 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5716 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5717 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5718 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5719 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5720 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5721 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5722 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5723 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5724 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5725 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5726 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5727 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5728 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5729 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5730 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5731 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5732 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5733 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5734 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5735 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5736 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5737 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5738 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5739 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5740 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5741 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5742 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5743 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5744 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5745 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5746 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5747 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5748 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5749 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005750 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005751 .np = 3,
5752 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005753 },
5754};
5755
5756static struct cipher_testvec bf_dec_tv_template[] = {
5757 { /* DES test vectors from OpenSSL */
5758 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5759 .klen = 8,
5760 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5761 .ilen = 8,
5762 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
5763 .rlen = 8,
5764 }, {
5765 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5766 .klen = 8,
5767 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5768 .ilen = 8,
5769 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5770 .rlen = 8,
5771 }, {
5772 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5773 .klen = 8,
5774 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5775 .ilen = 8,
5776 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5777 .rlen = 8,
5778 }, { /* Vary the keylength... */
5779 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5780 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5781 .klen = 16,
5782 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5783 .ilen = 8,
5784 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5785 .rlen = 8,
5786 }, {
5787 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5788 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5789 "\x00\x11\x22\x33\x44",
5790 .klen = 21,
5791 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5792 .ilen = 8,
5793 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5794 .rlen = 8,
5795 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
5796 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5797 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5798 "\x00\x11\x22\x33\x44\x55\x66\x77"
5799 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5800 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5801 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5802 "\xff\xff\xff\xff\xff\xff\xff\xff",
5803 .klen = 56,
5804 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5805 .ilen = 8,
5806 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5807 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005808 }, { /* Generated with Crypto++ */
5809 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5810 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5811 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5812 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5813 .klen = 32,
5814 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5815 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5816 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5817 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005818 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5819 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5820 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5821 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5822 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5823 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5824 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5825 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5826 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5827 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5828 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5829 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5830 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5831 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5832 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5833 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5834 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5835 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5836 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5837 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5838 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5839 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5840 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5841 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5842 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5843 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5844 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5845 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5846 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5847 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5848 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5849 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5850 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5851 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5852 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5853 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5854 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5855 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5856 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5857 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5858 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5859 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5860 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5861 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5862 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5863 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5864 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5865 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5866 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5867 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5868 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5869 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5870 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5871 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5872 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5873 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5874 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5875 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5876 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5877 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005878 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5879 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5880 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5881 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005882 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5883 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5884 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5885 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5886 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5887 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5888 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5889 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5890 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5891 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5892 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5893 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5894 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5895 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5896 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5897 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5898 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5899 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5900 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5901 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5902 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5903 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5904 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5905 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5906 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5907 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5908 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5909 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5910 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5911 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5912 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5913 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5914 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5915 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5916 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5917 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5918 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5919 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5920 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5921 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5922 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5923 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5924 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5925 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5926 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5927 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5928 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5929 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5930 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5931 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5932 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5933 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5934 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5935 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5936 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5937 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5938 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5939 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5940 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5941 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005942 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005943 .np = 3,
5944 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005945 },
5946};
5947
5948static struct cipher_testvec bf_cbc_enc_tv_template[] = {
5949 { /* From OpenSSL */
5950 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5951 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5952 .klen = 16,
5953 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5954 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
5955 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
5956 "\x68\x65\x20\x74\x69\x6d\x65\x20"
5957 "\x66\x6f\x72\x20\x00\x00\x00\x00",
5958 .ilen = 32,
5959 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
5960 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
5961 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
5962 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
5963 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005964 }, { /* Generated with Crypto++ */
5965 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5966 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5967 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5968 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5969 .klen = 32,
5970 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5971 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5972 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5973 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5974 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005975 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5976 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5977 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5978 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5979 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5980 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5981 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5982 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5983 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5984 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5985 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5986 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5987 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5988 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5989 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5990 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5991 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5992 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5993 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5994 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5995 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5996 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5997 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5998 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5999 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6000 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6001 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6002 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6003 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6004 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6005 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6006 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6007 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6008 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6009 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6010 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6011 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6012 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6013 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6014 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6015 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6016 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6017 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6018 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6019 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6020 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6021 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6022 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6023 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6024 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6025 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6026 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6027 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6028 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6029 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6030 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6031 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6032 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6033 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6034 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006035 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
6036 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
6037 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
6038 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006039 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
6040 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
6041 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
6042 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
6043 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
6044 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
6045 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
6046 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
6047 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
6048 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
6049 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
6050 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
6051 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
6052 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
6053 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
6054 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
6055 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
6056 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
6057 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
6058 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
6059 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
6060 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
6061 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
6062 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
6063 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
6064 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
6065 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
6066 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
6067 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
6068 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
6069 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
6070 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
6071 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
6072 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
6073 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
6074 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
6075 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
6076 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
6077 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
6078 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
6079 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
6080 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
6081 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
6082 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6083 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6084 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6085 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6086 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6087 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6088 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6089 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6090 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6091 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6092 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6093 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6094 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6095 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6096 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6097 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6098 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006099 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006100 .np = 3,
6101 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006102 },
6103};
6104
6105static struct cipher_testvec bf_cbc_dec_tv_template[] = {
6106 { /* From OpenSSL */
6107 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6108 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6109 .klen = 16,
6110 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6111 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
6112 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
6113 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
6114 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
6115 .ilen = 32,
6116 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
6117 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
6118 "\x68\x65\x20\x74\x69\x6d\x65\x20"
6119 "\x66\x6f\x72\x20\x00\x00\x00\x00",
6120 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006121 }, { /* Generated with Crypto++ */
6122 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6123 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6124 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6125 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6126 .klen = 32,
6127 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6128 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
6129 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
6130 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
6131 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006132 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
6133 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
6134 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
6135 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
6136 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
6137 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
6138 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
6139 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
6140 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
6141 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
6142 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
6143 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
6144 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
6145 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
6146 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
6147 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
6148 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
6149 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
6150 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
6151 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
6152 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
6153 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
6154 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
6155 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
6156 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
6157 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
6158 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
6159 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
6160 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
6161 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
6162 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
6163 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
6164 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
6165 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
6166 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
6167 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
6168 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
6169 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
6170 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
6171 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
6172 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
6173 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
6174 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
6175 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6176 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6177 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6178 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6179 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6180 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6181 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6182 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6183 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6184 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6185 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6186 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6187 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6188 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6189 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6190 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6191 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006192 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6193 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6194 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6195 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006196 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6197 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6198 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6199 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6200 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6201 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6202 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6203 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6204 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6205 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6206 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6207 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6208 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6209 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6210 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6211 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6212 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6213 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6214 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6215 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6216 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6217 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6218 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6219 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6220 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6221 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6222 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6223 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6224 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6225 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6226 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6227 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6228 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6229 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6230 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6231 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6232 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6233 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6234 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6235 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6236 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6237 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6238 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6239 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6240 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6241 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6242 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6243 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6244 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6245 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6246 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6247 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6248 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6249 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6250 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6251 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6252 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6253 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6254 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6255 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006256 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006257 .np = 3,
6258 .tap = { 504 - 10, 2, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006259 },
6260};
6261
6262static struct cipher_testvec bf_ctr_enc_tv_template[] = {
6263 { /* Generated with Crypto++ */
6264 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6265 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6266 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6267 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6268 .klen = 32,
6269 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6270 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6271 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6272 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6273 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006274 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6275 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6276 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6277 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6278 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6279 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6280 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6281 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6282 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6283 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6284 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6285 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6286 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6287 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6288 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6289 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6290 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6291 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6292 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6293 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6294 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6295 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6296 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6297 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6298 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6299 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6300 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6301 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6302 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6303 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6304 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6305 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6306 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6307 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6308 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6309 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6310 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6311 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6312 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6313 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6314 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6315 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6316 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6317 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6318 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6319 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6320 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6321 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6322 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6323 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6324 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6325 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6326 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6327 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6328 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6329 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6330 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6331 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6332 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6333 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006334 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6335 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6336 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6337 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006338 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6339 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6340 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6341 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6342 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6343 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6344 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6345 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6346 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6347 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6348 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6349 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6350 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6351 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6352 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6353 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6354 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6355 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6356 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6357 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6358 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6359 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6360 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6361 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6362 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6363 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6364 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6365 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6366 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6367 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6368 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6369 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6370 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6371 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6372 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6373 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6374 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6375 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6376 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6377 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6378 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6379 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6380 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6381 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6382 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6383 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6384 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6385 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6386 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6387 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6388 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6389 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6390 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6391 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6392 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6393 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6394 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6395 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6396 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6397 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006398 }, { /* Generated with Crypto++ */
6399 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6400 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6401 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6402 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6403 .klen = 32,
6404 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6405 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6406 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6407 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6408 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6409 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006410 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6411 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6412 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6413 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6414 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6415 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6416 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6417 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6418 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6419 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6420 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6421 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6422 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6423 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6424 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6425 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6426 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6427 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6428 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6429 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6430 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6431 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6432 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6433 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6434 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6435 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6436 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6437 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6438 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6439 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6440 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6441 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6442 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6443 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6444 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6445 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6446 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6447 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6448 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6449 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6450 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6451 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6452 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6453 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6454 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6455 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6456 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6457 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6458 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6459 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6460 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6461 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6462 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6463 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6464 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6465 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6466 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6467 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6468 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006469 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6470 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6471 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6472 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6473 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006474 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6475 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6476 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6477 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6478 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6479 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6480 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6481 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6482 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6483 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6484 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6485 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6486 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6487 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6488 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6489 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6490 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6491 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6492 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6493 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6494 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6495 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6496 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6497 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6498 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6499 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6500 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6501 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6502 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6503 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6504 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6505 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6506 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6507 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6508 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6509 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6510 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6511 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6512 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6513 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6514 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6515 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6516 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6517 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6518 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6519 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6520 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6521 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6522 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6523 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6524 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6525 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6526 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6527 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6528 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6529 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6530 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6531 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6532 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006533 .also_non_np = 1,
6534 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006535 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006536 }, { /* Generated with Crypto++ */
6537 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6538 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6539 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6540 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6541 .klen = 32,
6542 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6543 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6544 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6545 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6546 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6547 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6548 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6549 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6550 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6551 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6552 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6553 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6554 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6555 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6556 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6557 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6558 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6559 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6560 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6561 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6562 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6563 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6564 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6565 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6566 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6567 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6568 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6569 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6570 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6571 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6572 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6573 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6574 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6575 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6576 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6577 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6578 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6579 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6580 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6581 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6582 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6583 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6584 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6585 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6586 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6587 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6588 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6589 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6590 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6591 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6592 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6593 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6594 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6595 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6596 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6597 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6598 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6599 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6600 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6601 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6602 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6603 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6604 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6605 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6606 .ilen = 504,
6607 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6608 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6609 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6610 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6611 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6612 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6613 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6614 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6615 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6616 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6617 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6618 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6619 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6620 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6621 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6622 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6623 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6624 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6625 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6626 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6627 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6628 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6629 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6630 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6631 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6632 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6633 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6634 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6635 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6636 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6637 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6638 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6639 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6640 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6641 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6642 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6643 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6644 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6645 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6646 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6647 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6648 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6649 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6650 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6651 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
6652 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
6653 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
6654 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
6655 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
6656 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
6657 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
6658 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
6659 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
6660 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
6661 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
6662 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
6663 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
6664 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
6665 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
6666 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
6667 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
6668 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
6669 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
6670 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006671 },
6672};
6673
6674static struct cipher_testvec bf_ctr_dec_tv_template[] = {
6675 { /* Generated with Crypto++ */
6676 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6677 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6678 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6679 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6680 .klen = 32,
6681 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6682 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6683 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6684 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6685 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006686 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6687 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6688 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6689 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6690 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6691 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6692 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6693 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6694 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6695 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6696 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6697 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6698 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6699 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6700 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6701 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6702 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6703 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6704 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6705 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6706 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6707 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6708 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6709 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6710 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6711 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6712 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6713 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6714 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6715 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6716 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6717 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6718 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6719 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6720 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6721 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6722 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6723 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6724 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6725 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6726 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6727 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6728 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6729 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6730 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6731 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6732 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6733 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6734 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6735 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6736 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6737 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6738 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6739 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6740 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6741 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6742 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6743 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6744 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6745 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006746 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6747 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6748 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6749 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006750 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6751 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6752 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6753 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6754 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6755 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6756 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6757 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6758 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6759 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6760 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6761 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6762 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6763 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6764 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6765 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6766 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6767 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6768 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6769 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6770 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6771 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6772 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6773 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6774 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6775 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6776 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6777 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6778 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6779 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6780 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6781 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6782 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6783 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6784 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6785 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6786 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6787 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6788 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6789 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6790 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6791 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6792 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6793 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6794 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6795 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6796 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6797 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6798 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6799 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6800 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6801 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6802 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6803 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6804 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6805 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6806 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6807 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6808 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6809 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006810 }, { /* Generated with Crypto++ */
6811 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6812 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6813 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6814 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6815 .klen = 32,
6816 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6817 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6818 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6819 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6820 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6821 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006822 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6823 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6824 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6825 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6826 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6827 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6828 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6829 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6830 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6831 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6832 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6833 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6834 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6835 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6836 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6837 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6838 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6839 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6840 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6841 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6842 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6843 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6844 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6845 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6846 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6847 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6848 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6849 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6850 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6851 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6852 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6853 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6854 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6855 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6856 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6857 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6858 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6859 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6860 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6861 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6862 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6863 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6864 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6865 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6866 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6867 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6868 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6869 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6870 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6871 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6872 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6873 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6874 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6875 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6876 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6877 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6878 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6879 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6880 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006881 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6882 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6883 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6884 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6885 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006886 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6887 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6888 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6889 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6890 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6891 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6892 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6893 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6894 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6895 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6896 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6897 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6898 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6899 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6900 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6901 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6902 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6903 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6904 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6905 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6906 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6907 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6908 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6909 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6910 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6911 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6912 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6913 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6914 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6915 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6916 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6917 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6918 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6919 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6920 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6921 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6922 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6923 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6924 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6925 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6926 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6927 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6928 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6929 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6930 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6931 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6932 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6933 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6934 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6935 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6936 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6937 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6938 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6939 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6940 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6941 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6942 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6943 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6944 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006945 .also_non_np = 1,
6946 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006947 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006948 }, { /* Generated with Crypto++ */
6949 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6950 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6951 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6952 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6953 .klen = 32,
6954 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6955 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6956 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6957 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6958 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6959 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6960 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6961 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6962 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6963 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6964 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6965 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6966 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6967 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6968 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6969 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6970 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6971 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6972 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6973 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6974 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6975 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6976 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6977 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6978 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6979 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6980 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6981 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6982 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6983 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6984 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6985 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6986 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6987 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6988 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6989 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6990 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6991 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6992 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6993 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6994 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6995 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6996 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6997 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6998 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6999 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
7000 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
7001 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
7002 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
7003 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
7004 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
7005 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
7006 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
7007 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
7008 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
7009 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
7010 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
7011 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
7012 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
7013 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
7014 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
7015 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
7016 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
7017 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
7018 .ilen = 504,
7019 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7020 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7021 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7022 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7023 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7024 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7025 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7026 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7027 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7028 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7029 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7030 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7031 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7032 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7033 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7034 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7035 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7036 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7037 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7038 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7039 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7040 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7041 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7042 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7043 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7044 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7045 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7046 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7047 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7048 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7049 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7050 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7051 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7052 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7053 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7054 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7055 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7056 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7057 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7058 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7059 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7060 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7061 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7062 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7063 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7064 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7065 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7066 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7067 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7068 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7069 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7070 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7071 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7072 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7073 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7074 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7075 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7076 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7077 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7078 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7079 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7080 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7081 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
7082 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08007083 },
7084};
7085
7086/*
7087 * Twofish test vectors.
7088 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03007089#define TF_ENC_TEST_VECTORS 4
7090#define TF_DEC_TEST_VECTORS 4
7091#define TF_CBC_ENC_TEST_VECTORS 5
7092#define TF_CBC_DEC_TEST_VECTORS 5
7093#define TF_CTR_ENC_TEST_VECTORS 2
7094#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03007095#define TF_LRW_ENC_TEST_VECTORS 8
7096#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03007097#define TF_XTS_ENC_TEST_VECTORS 5
7098#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08007099
7100static struct cipher_testvec tf_enc_tv_template[] = {
7101 {
7102 .key = zeroed_string,
7103 .klen = 16,
7104 .input = zeroed_string,
7105 .ilen = 16,
7106 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7107 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7108 .rlen = 16,
7109 }, {
7110 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7111 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7112 "\x00\x11\x22\x33\x44\x55\x66\x77",
7113 .klen = 24,
7114 .input = zeroed_string,
7115 .ilen = 16,
7116 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7117 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7118 .rlen = 16,
7119 }, {
7120 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7121 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7122 "\x00\x11\x22\x33\x44\x55\x66\x77"
7123 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7124 .klen = 32,
7125 .input = zeroed_string,
7126 .ilen = 16,
7127 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7128 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7129 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007130 }, { /* Generated with Crypto++ */
7131 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7132 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7133 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7134 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7135 .klen = 32,
7136 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7137 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7138 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7139 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7140 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7141 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7142 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007143 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7144 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7145 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7146 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7147 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7148 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7149 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7150 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7151 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7152 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7153 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7154 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7155 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7156 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7157 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7158 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7159 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7160 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7161 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7162 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7163 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7164 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7165 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7166 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7167 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7168 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7169 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7170 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7171 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7172 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7173 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7174 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7175 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7176 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7177 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7178 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7179 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7180 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7181 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7182 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7183 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7184 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7185 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7186 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7187 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7188 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7189 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7190 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7191 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7192 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7193 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7194 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7195 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7196 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7197 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7198 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007199 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7200 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7201 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7202 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7203 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7204 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7205 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007206 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7207 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7208 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7209 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7210 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7211 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7212 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7213 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7214 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7215 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7216 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7217 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7218 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7219 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7220 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7221 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7222 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7223 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7224 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7225 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7226 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7227 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7228 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7229 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7230 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7231 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7232 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7233 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7234 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7235 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7236 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7237 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7238 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7239 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7240 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7241 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7242 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7243 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7244 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7245 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7246 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7247 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7248 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7249 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7250 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7251 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7252 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7253 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7254 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7255 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7256 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7257 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7258 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7259 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7260 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7261 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007262 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007263 .np = 3,
7264 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007265 },
7266};
7267
7268static struct cipher_testvec tf_dec_tv_template[] = {
7269 {
7270 .key = zeroed_string,
7271 .klen = 16,
7272 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7273 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7274 .ilen = 16,
7275 .result = zeroed_string,
7276 .rlen = 16,
7277 }, {
7278 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7279 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7280 "\x00\x11\x22\x33\x44\x55\x66\x77",
7281 .klen = 24,
7282 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7283 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7284 .ilen = 16,
7285 .result = zeroed_string,
7286 .rlen = 16,
7287 }, {
7288 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7289 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7290 "\x00\x11\x22\x33\x44\x55\x66\x77"
7291 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7292 .klen = 32,
7293 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7294 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7295 .ilen = 16,
7296 .result = zeroed_string,
7297 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007298 }, { /* Generated with Crypto++ */
7299 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7300 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7301 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7302 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7303 .klen = 32,
7304 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7305 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7306 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7307 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7308 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7309 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7310 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007311 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7312 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7313 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7314 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7315 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7316 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7317 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7318 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7319 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7320 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7321 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7322 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7323 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7324 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7325 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7326 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7327 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7328 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7329 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7330 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7331 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7332 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7333 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7334 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7335 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7336 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7337 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7338 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7339 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7340 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7341 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7342 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7343 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7344 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7345 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7346 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7347 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7348 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7349 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7350 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7351 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7352 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7353 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7354 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7355 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7356 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7357 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7358 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7359 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7360 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7361 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7362 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7363 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7364 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7365 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7366 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007367 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7368 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7369 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7370 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7371 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7372 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7373 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007374 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7375 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7376 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7377 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7378 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7379 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7380 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7381 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7382 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7383 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7384 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7385 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7386 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7387 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7388 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7389 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7390 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7391 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7392 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7393 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7394 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7395 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7396 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7397 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7398 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7399 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7400 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7401 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7402 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7403 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7404 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7405 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7406 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7407 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7408 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7409 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7410 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7411 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7412 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7413 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7414 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7415 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7416 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7417 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7418 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7419 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7420 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7421 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7422 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7423 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7424 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7425 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7426 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7427 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7428 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7429 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007430 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007431 .np = 3,
7432 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007433 },
7434};
7435
7436static struct cipher_testvec tf_cbc_enc_tv_template[] = {
7437 { /* Generated with Nettle */
7438 .key = zeroed_string,
7439 .klen = 16,
7440 .iv = zeroed_string,
7441 .input = zeroed_string,
7442 .ilen = 16,
7443 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7444 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7445 .rlen = 16,
7446 }, {
7447 .key = zeroed_string,
7448 .klen = 16,
7449 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7450 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7451 .input = zeroed_string,
7452 .ilen = 16,
7453 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7454 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7455 .rlen = 16,
7456 }, {
7457 .key = zeroed_string,
7458 .klen = 16,
7459 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7460 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7461 .input = zeroed_string,
7462 .ilen = 16,
7463 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7464 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7465 .rlen = 16,
7466 }, {
7467 .key = zeroed_string,
7468 .klen = 16,
7469 .iv = zeroed_string,
7470 .input = zeroed_string,
7471 .ilen = 48,
7472 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7473 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7474 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7475 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7476 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7477 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7478 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007479 }, { /* Generated with Crypto++ */
7480 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7481 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7482 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7483 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7484 .klen = 32,
7485 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7486 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7487 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7488 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7489 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7490 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7491 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7492 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7493 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007494 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7495 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7496 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7497 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7498 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7499 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7500 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7501 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7502 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7503 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7504 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7505 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7506 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7507 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7508 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7509 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7510 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7511 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7512 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7513 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7514 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7515 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7516 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7517 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7518 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7519 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7520 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7521 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7522 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7523 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7524 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7525 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7526 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7527 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7528 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7529 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7530 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7531 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7532 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7533 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7534 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7535 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7536 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7537 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7538 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7539 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7540 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7541 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7542 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7543 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7544 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7545 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7546 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7547 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7548 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7549 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007550 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7551 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7552 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7553 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7554 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7555 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7556 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007557 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7558 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7559 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7560 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7561 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7562 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7563 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7564 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7565 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7566 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7567 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7568 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7569 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7570 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7571 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7572 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7573 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7574 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7575 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7576 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7577 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7578 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7579 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7580 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7581 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7582 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7583 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7584 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7585 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7586 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7587 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7588 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7589 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7590 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7591 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7592 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7593 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7594 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7595 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7596 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7597 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7598 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7599 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7600 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7601 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7602 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7603 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7604 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7605 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7606 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7607 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7608 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7609 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7610 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7611 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7612 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007613 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007614 .np = 3,
7615 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007616 },
7617};
7618
7619static struct cipher_testvec tf_cbc_dec_tv_template[] = {
7620 { /* Reverse of the first four above */
7621 .key = zeroed_string,
7622 .klen = 16,
7623 .iv = zeroed_string,
7624 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7625 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7626 .ilen = 16,
7627 .result = zeroed_string,
7628 .rlen = 16,
7629 }, {
7630 .key = zeroed_string,
7631 .klen = 16,
7632 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7633 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7634 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7635 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7636 .ilen = 16,
7637 .result = zeroed_string,
7638 .rlen = 16,
7639 }, {
7640 .key = zeroed_string,
7641 .klen = 16,
7642 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7643 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7644 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7645 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7646 .ilen = 16,
7647 .result = zeroed_string,
7648 .rlen = 16,
7649 }, {
7650 .key = zeroed_string,
7651 .klen = 16,
7652 .iv = zeroed_string,
7653 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7654 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7655 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7656 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7657 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7658 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7659 .ilen = 48,
7660 .result = zeroed_string,
7661 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007662 }, { /* Generated with Crypto++ */
7663 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7664 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7665 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7666 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7667 .klen = 32,
7668 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7669 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7670 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7671 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7672 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7673 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7674 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7675 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7676 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007677 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7678 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7679 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7680 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7681 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7682 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7683 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7684 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7685 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7686 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7687 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7688 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7689 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7690 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7691 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7692 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7693 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7694 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7695 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7696 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7697 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7698 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7699 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7700 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7701 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7702 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7703 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7704 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7705 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7706 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7707 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7708 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7709 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7710 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7711 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7712 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7713 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7714 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7715 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7716 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7717 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7718 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7719 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7720 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7721 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7722 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7723 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7724 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7725 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7726 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7727 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7728 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7729 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7730 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7731 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7732 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007733 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7734 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7735 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7736 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7737 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7738 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7739 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007740 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7741 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7742 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7743 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7744 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7745 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7746 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7747 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7748 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7749 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7750 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7751 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7752 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7753 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7754 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7755 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7756 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7757 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7758 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7759 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7760 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7761 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7762 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7763 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7764 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7765 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7766 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7767 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7768 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7769 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7770 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7771 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7772 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7773 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7774 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7775 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7776 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7777 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7778 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7779 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7780 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7781 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7782 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7783 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7784 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7785 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7786 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7787 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7788 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7789 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7790 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7791 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7792 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7793 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7794 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7795 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007796 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007797 .np = 3,
7798 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03007799 },
7800};
7801
7802static struct cipher_testvec tf_ctr_enc_tv_template[] = {
7803 { /* Generated with Crypto++ */
7804 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7805 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7806 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7807 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7808 .klen = 32,
7809 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7810 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7811 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7812 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7813 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7814 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7815 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7816 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7817 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007818 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7819 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7820 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7821 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7822 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7823 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7824 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7825 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7826 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7827 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7828 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7829 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7830 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7831 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7832 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7833 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7834 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7835 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7836 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7837 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7838 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7839 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7840 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7841 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7842 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7843 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7844 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7845 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7846 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7847 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7848 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7849 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7850 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7851 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7852 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7853 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7854 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7855 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7856 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7857 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7858 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7859 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7860 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7861 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7862 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7863 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7864 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7865 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7866 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7867 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7868 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7869 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7870 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7871 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7872 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7873 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007874 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7875 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7876 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7877 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7878 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7879 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7880 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007881 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
7882 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7883 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7884 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7885 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7886 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7887 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7888 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7889 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7890 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7891 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7892 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7893 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7894 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7895 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7896 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7897 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7898 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7899 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7900 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7901 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7902 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7903 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7904 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7905 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7906 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
7907 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
7908 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
7909 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
7910 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
7911 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
7912 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
7913 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
7914 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
7915 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
7916 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
7917 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
7918 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
7919 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
7920 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
7921 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
7922 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
7923 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
7924 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
7925 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
7926 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
7927 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
7928 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
7929 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
7930 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
7931 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
7932 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
7933 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
7934 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
7935 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
7936 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007937 }, { /* Generated with Crypto++ */
7938 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7939 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7940 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7941 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7942 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007943 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
7944 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7945 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7946 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7947 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7948 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7949 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7950 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7951 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7952 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7953 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7954 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7955 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7956 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7957 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7958 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7959 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7960 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7961 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7962 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7963 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7964 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7965 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7966 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7967 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7968 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7969 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7970 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7971 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7972 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7973 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7974 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7975 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7976 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7977 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7978 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7979 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7980 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7981 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7982 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7983 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7984 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7985 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7986 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7987 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7988 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7989 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7990 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7991 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7992 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7993 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7994 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7995 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7996 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7997 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7998 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7999 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8000 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8001 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8002 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8003 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8004 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8005 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8006 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8007 .ilen = 496,
8008 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8009 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8010 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8011 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8012 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8013 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8014 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8015 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8016 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8017 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8018 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8019 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8020 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8021 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8022 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8023 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8024 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8025 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8026 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8027 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8028 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8029 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8030 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8031 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8032 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8033 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8034 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8035 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8036 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8037 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8038 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8039 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8040 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8041 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8042 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8043 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8044 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8045 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8046 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8047 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8048 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8049 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8050 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8051 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8052 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8053 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8054 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8055 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8056 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8057 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8058 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8059 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8060 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8061 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8062 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8063 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8064 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8065 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8066 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8067 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8068 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8069 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8070 .rlen = 496,
8071 }, { /* Generated with Crypto++ */
8072 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8073 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8074 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8075 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8076 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008077 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8078 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8079 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8080 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8081 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8082 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8083 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8084 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8085 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8086 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008087 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8088 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8089 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8090 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8091 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8092 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8093 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8094 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8095 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8096 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8097 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8098 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8099 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8100 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8101 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8102 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8103 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8104 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8105 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8106 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8107 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8108 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8109 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8110 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8111 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8112 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8113 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8114 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8115 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8116 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8117 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8118 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8119 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8120 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8121 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8122 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8123 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8124 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8125 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8126 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8127 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8128 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8129 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8130 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8131 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8132 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8133 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8134 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8135 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8136 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8137 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8138 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8139 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8140 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8141 "\x2B\xC2\x59",
8142 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008143 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8144 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8145 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8146 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8147 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8148 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8149 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8150 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008151 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8152 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8153 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8154 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8155 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8156 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8157 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8158 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8159 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8160 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8161 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8162 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8163 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8164 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8165 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8166 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8167 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8168 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8169 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8170 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8171 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8172 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8173 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8174 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8175 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8176 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8177 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8178 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8179 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8180 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8181 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8182 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8183 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8184 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8185 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8186 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8187 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8188 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8189 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8190 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8191 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8192 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8193 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8194 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8195 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8196 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8197 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8198 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8199 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8200 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8201 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8202 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8203 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8204 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8205 "\x6C\x82\x9D",
8206 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008207 .also_non_np = 1,
8208 .np = 2,
8209 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03008210 },
8211};
8212
8213static struct cipher_testvec tf_ctr_dec_tv_template[] = {
8214 { /* Generated with Crypto++ */
8215 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8216 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8217 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8218 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8219 .klen = 32,
8220 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8221 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8222 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8223 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8224 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8225 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8226 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8227 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8228 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008229 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8230 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8231 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8232 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8233 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8234 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8235 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8236 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8237 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8238 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8239 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8240 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8241 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8242 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8243 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8244 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8245 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8246 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8247 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8248 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8249 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8250 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8251 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8252 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8253 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8254 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8255 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8256 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8257 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8258 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8259 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8260 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8261 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8262 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8263 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8264 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8265 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8266 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8267 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8268 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8269 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8270 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8271 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8272 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8273 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8274 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8275 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8276 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8277 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8278 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8279 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8280 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8281 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8282 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8283 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
8284 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008285 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8286 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8287 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8288 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8289 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8290 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8291 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008292 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8293 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8294 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8295 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8296 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8297 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8298 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8299 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8300 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8301 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8302 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8303 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8304 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8305 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8306 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8307 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8308 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8309 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8310 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8311 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8312 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8313 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8314 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8315 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8316 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8317 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8318 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8319 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8320 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8321 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8322 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8323 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8324 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8325 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8326 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8327 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8328 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8329 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8330 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8331 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8332 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8333 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8334 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8335 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8336 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8337 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8338 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8339 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8340 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8341 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8342 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8343 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8344 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8345 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8346 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8347 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008348 }, { /* Generated with Crypto++ */
8349 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8350 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8351 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8352 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8353 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03008354 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
8355 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
8356 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8357 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8358 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8359 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8360 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8361 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8362 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8363 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8364 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8365 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8366 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8367 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8368 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8369 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8370 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8371 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8372 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8373 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8374 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8375 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8376 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8377 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8378 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8379 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8380 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8381 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8382 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8383 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8384 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8385 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8386 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8387 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8388 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8389 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8390 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8391 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8392 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8393 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8394 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8395 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8396 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8397 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8398 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8399 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8400 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8401 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8402 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8403 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8404 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8405 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8406 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8407 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8408 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8409 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8410 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8411 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8412 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8413 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8414 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8415 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8416 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8417 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8418 .ilen = 496,
8419 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8420 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8421 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8422 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8423 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8424 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8425 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8426 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8427 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8428 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8429 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8430 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8431 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8432 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8433 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8434 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8435 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8436 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8437 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8438 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8439 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8440 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8441 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8442 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8443 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8444 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8445 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8446 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8447 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8448 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8449 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8450 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8451 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8452 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8453 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8454 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8455 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8456 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8457 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8458 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8459 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8460 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8461 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8462 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8463 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8464 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8465 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8466 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8467 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8468 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8469 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8470 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8471 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8472 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8473 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8474 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8475 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8476 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8477 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8478 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8479 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8480 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8481 .rlen = 496,
8482 }, { /* Generated with Crypto++ */
8483 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8484 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8485 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8486 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8487 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008488 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8489 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8490 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8491 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8492 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8493 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8494 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8495 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8496 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8497 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008498 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8499 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8500 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8501 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8502 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8503 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8504 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8505 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8506 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8507 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8508 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8509 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8510 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8511 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8512 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8513 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8514 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8515 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8516 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8517 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8518 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8519 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8520 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8521 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8522 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8523 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8524 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8525 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8526 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8527 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8528 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8529 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8530 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8531 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8532 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8533 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8534 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8535 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8536 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8537 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8538 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8539 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8540 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8541 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8542 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8543 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8544 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8545 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8546 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8547 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8548 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8549 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8550 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8551 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8552 "\x6C\x82\x9D",
8553 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008554 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8555 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8556 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8557 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8558 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8559 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8560 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8561 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008562 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8563 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8564 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8565 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8566 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8567 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8568 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8569 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8570 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8571 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8572 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8573 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8574 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8575 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8576 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8577 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8578 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8579 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8580 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8581 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8582 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8583 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8584 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8585 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8586 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8587 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8588 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8589 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8590 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8591 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8592 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8593 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8594 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8595 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8596 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8597 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8598 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8599 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8600 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8601 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8602 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8603 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8604 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8605 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8606 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8607 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8608 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8609 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8610 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8611 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8612 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8613 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8614 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8615 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8616 "\x2B\xC2\x59",
8617 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008618 .also_non_np = 1,
8619 .np = 2,
8620 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008621 },
8622};
8623
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008624static struct cipher_testvec tf_lrw_enc_tv_template[] = {
8625 /* Generated from AES-LRW test vectors */
8626 {
8627 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8628 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8629 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8630 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8631 .klen = 32,
8632 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8633 "\x00\x00\x00\x00\x00\x00\x00\x01",
8634 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8635 "\x38\x39\x41\x42\x43\x44\x45\x46",
8636 .ilen = 16,
8637 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8638 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8639 .rlen = 16,
8640 }, {
8641 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8642 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8643 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8644 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8645 .klen = 32,
8646 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8647 "\x00\x00\x00\x00\x00\x00\x00\x02",
8648 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8649 "\x38\x39\x41\x42\x43\x44\x45\x46",
8650 .ilen = 16,
8651 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8652 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8653 .rlen = 16,
8654 }, {
8655 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8656 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8657 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8658 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8659 .klen = 32,
8660 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8661 "\x00\x00\x00\x02\x00\x00\x00\x00",
8662 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8663 "\x38\x39\x41\x42\x43\x44\x45\x46",
8664 .ilen = 16,
8665 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8666 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8667 .rlen = 16,
8668 }, {
8669 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8670 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8671 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8672 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8673 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8674 .klen = 40,
8675 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8676 "\x00\x00\x00\x00\x00\x00\x00\x01",
8677 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8678 "\x38\x39\x41\x42\x43\x44\x45\x46",
8679 .ilen = 16,
8680 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8681 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8682 .rlen = 16,
8683 }, {
8684 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8685 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8686 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8687 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8688 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8689 .klen = 40,
8690 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8691 "\x00\x00\x00\x02\x00\x00\x00\x00",
8692 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8693 "\x38\x39\x41\x42\x43\x44\x45\x46",
8694 .ilen = 16,
8695 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8696 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8697 .rlen = 16,
8698 }, {
8699 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8700 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8701 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8702 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8703 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8704 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8705 .klen = 48,
8706 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8707 "\x00\x00\x00\x00\x00\x00\x00\x01",
8708 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8709 "\x38\x39\x41\x42\x43\x44\x45\x46",
8710 .ilen = 16,
8711 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8712 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8713 .rlen = 16,
8714 }, {
8715 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8716 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8717 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8718 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8719 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8720 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8721 .klen = 48,
8722 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8723 "\x00\x00\x00\x02\x00\x00\x00\x00",
8724 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8725 "\x38\x39\x41\x42\x43\x44\x45\x46",
8726 .ilen = 16,
8727 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8728 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8729 .rlen = 16,
8730 }, {
8731 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8732 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8733 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8734 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8735 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8736 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8737 .klen = 48,
8738 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8739 "\x00\x00\x00\x00\x00\x00\x00\x01",
8740 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8741 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8742 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8743 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8744 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8745 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8746 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8747 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8748 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8749 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8750 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8751 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8752 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8753 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8754 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8755 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8756 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8757 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8758 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8759 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8760 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8761 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8762 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8763 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8764 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8765 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8766 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8767 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8768 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8769 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8770 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8771 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8772 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8773 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8774 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8775 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8776 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8777 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8778 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8779 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8780 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8781 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8782 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8783 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8784 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8785 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8786 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8787 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8788 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8789 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8790 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8791 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8792 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8793 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8794 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8795 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8796 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8797 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8798 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8799 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8800 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8801 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8802 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8803 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8804 .ilen = 512,
8805 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8806 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8807 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8808 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8809 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8810 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8811 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
8812 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
8813 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
8814 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
8815 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
8816 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
8817 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
8818 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
8819 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
8820 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
8821 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
8822 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
8823 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
8824 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
8825 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
8826 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
8827 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
8828 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
8829 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
8830 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
8831 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
8832 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
8833 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
8834 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
8835 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
8836 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
8837 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
8838 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
8839 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
8840 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
8841 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
8842 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
8843 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
8844 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
8845 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
8846 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
8847 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
8848 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
8849 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
8850 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
8851 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
8852 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
8853 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
8854 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
8855 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
8856 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
8857 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
8858 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
8859 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
8860 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
8861 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
8862 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
8863 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
8864 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
8865 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
8866 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
8867 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
8868 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
8869 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008870 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02008871 .np = 3,
8872 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008873 },
8874};
8875
8876static struct cipher_testvec tf_lrw_dec_tv_template[] = {
8877 /* Generated from AES-LRW test vectors */
8878 /* same as enc vectors with input and result reversed */
8879 {
8880 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8881 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8882 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8883 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8884 .klen = 32,
8885 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8886 "\x00\x00\x00\x00\x00\x00\x00\x01",
8887 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8888 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8889 .ilen = 16,
8890 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8891 "\x38\x39\x41\x42\x43\x44\x45\x46",
8892 .rlen = 16,
8893 }, {
8894 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8895 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8896 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8897 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8898 .klen = 32,
8899 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8900 "\x00\x00\x00\x00\x00\x00\x00\x02",
8901 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8902 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8903 .ilen = 16,
8904 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8905 "\x38\x39\x41\x42\x43\x44\x45\x46",
8906 .rlen = 16,
8907 }, {
8908 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8909 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8910 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8911 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8912 .klen = 32,
8913 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8914 "\x00\x00\x00\x02\x00\x00\x00\x00",
8915 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8916 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8917 .ilen = 16,
8918 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8919 "\x38\x39\x41\x42\x43\x44\x45\x46",
8920 .rlen = 16,
8921 }, {
8922 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8923 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8924 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8925 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8926 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8927 .klen = 40,
8928 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8929 "\x00\x00\x00\x00\x00\x00\x00\x01",
8930 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8931 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8932 .ilen = 16,
8933 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8934 "\x38\x39\x41\x42\x43\x44\x45\x46",
8935 .rlen = 16,
8936 }, {
8937 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8938 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8939 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8940 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8941 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8942 .klen = 40,
8943 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8944 "\x00\x00\x00\x02\x00\x00\x00\x00",
8945 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8946 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8947 .ilen = 16,
8948 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8949 "\x38\x39\x41\x42\x43\x44\x45\x46",
8950 .rlen = 16,
8951 }, {
8952 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8953 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8954 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8955 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8956 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8957 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8958 .klen = 48,
8959 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8960 "\x00\x00\x00\x00\x00\x00\x00\x01",
8961 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8962 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8963 .ilen = 16,
8964 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8965 "\x38\x39\x41\x42\x43\x44\x45\x46",
8966 .rlen = 16,
8967 }, {
8968 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8969 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8970 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8971 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8972 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8973 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8974 .klen = 48,
8975 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8976 "\x00\x00\x00\x02\x00\x00\x00\x00",
8977 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8978 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8979 .ilen = 16,
8980 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8981 "\x38\x39\x41\x42\x43\x44\x45\x46",
8982 .rlen = 16,
8983 }, {
8984 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8985 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8986 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8987 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8988 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8989 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8990 .klen = 48,
8991 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8992 "\x00\x00\x00\x00\x00\x00\x00\x01",
8993 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8994 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8995 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8996 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8997 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8998 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8999 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
9000 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
9001 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
9002 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
9003 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
9004 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
9005 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
9006 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
9007 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
9008 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
9009 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
9010 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
9011 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
9012 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
9013 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
9014 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
9015 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
9016 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
9017 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
9018 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
9019 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
9020 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
9021 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
9022 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
9023 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
9024 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
9025 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
9026 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
9027 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
9028 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
9029 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
9030 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
9031 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
9032 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
9033 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
9034 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
9035 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
9036 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
9037 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
9038 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
9039 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
9040 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
9041 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
9042 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
9043 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
9044 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
9045 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
9046 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
9047 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
9048 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
9049 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
9050 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
9051 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
9052 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
9053 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
9054 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
9055 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
9056 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
9057 .ilen = 512,
9058 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
9059 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
9060 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
9061 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
9062 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
9063 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
9064 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
9065 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
9066 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
9067 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
9068 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
9069 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
9070 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
9071 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
9072 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
9073 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
9074 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
9075 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
9076 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
9077 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
9078 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
9079 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
9080 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
9081 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
9082 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
9083 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
9084 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
9085 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
9086 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
9087 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
9088 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
9089 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
9090 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
9091 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
9092 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
9093 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
9094 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
9095 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
9096 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
9097 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
9098 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
9099 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
9100 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
9101 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9102 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9103 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9104 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9105 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9106 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9107 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9108 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9109 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9110 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9111 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9112 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9113 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9114 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9115 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9116 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9117 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9118 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9119 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9120 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9121 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9122 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009123 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009124 .np = 3,
9125 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03009126 },
9127};
9128
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009129static struct cipher_testvec tf_xts_enc_tv_template[] = {
9130 /* Generated from AES-XTS test vectors */
9131{
9132 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9133 "\x00\x00\x00\x00\x00\x00\x00\x00"
9134 "\x00\x00\x00\x00\x00\x00\x00\x00"
9135 "\x00\x00\x00\x00\x00\x00\x00\x00",
9136 .klen = 32,
9137 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9138 "\x00\x00\x00\x00\x00\x00\x00\x00",
9139 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9140 "\x00\x00\x00\x00\x00\x00\x00\x00"
9141 "\x00\x00\x00\x00\x00\x00\x00\x00"
9142 "\x00\x00\x00\x00\x00\x00\x00\x00",
9143 .ilen = 32,
9144 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9145 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9146 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9147 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9148 .rlen = 32,
9149 }, {
9150 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9151 "\x11\x11\x11\x11\x11\x11\x11\x11"
9152 "\x22\x22\x22\x22\x22\x22\x22\x22"
9153 "\x22\x22\x22\x22\x22\x22\x22\x22",
9154 .klen = 32,
9155 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9156 "\x00\x00\x00\x00\x00\x00\x00\x00",
9157 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
9158 "\x44\x44\x44\x44\x44\x44\x44\x44"
9159 "\x44\x44\x44\x44\x44\x44\x44\x44"
9160 "\x44\x44\x44\x44\x44\x44\x44\x44",
9161 .ilen = 32,
9162 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9163 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9164 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9165 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9166 .rlen = 32,
9167 }, {
9168 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9169 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9170 "\x22\x22\x22\x22\x22\x22\x22\x22"
9171 "\x22\x22\x22\x22\x22\x22\x22\x22",
9172 .klen = 32,
9173 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9174 "\x00\x00\x00\x00\x00\x00\x00\x00",
9175 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
9176 "\x44\x44\x44\x44\x44\x44\x44\x44"
9177 "\x44\x44\x44\x44\x44\x44\x44\x44"
9178 "\x44\x44\x44\x44\x44\x44\x44\x44",
9179 .ilen = 32,
9180 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9181 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9182 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9183 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9184 .rlen = 32,
9185 }, {
9186 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9187 "\x23\x53\x60\x28\x74\x71\x35\x26"
9188 "\x31\x41\x59\x26\x53\x58\x97\x93"
9189 "\x23\x84\x62\x64\x33\x83\x27\x95",
9190 .klen = 32,
9191 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9192 "\x00\x00\x00\x00\x00\x00\x00\x00",
9193 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9194 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9195 "\x10\x11\x12\x13\x14\x15\x16\x17"
9196 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9197 "\x20\x21\x22\x23\x24\x25\x26\x27"
9198 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9199 "\x30\x31\x32\x33\x34\x35\x36\x37"
9200 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9201 "\x40\x41\x42\x43\x44\x45\x46\x47"
9202 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9203 "\x50\x51\x52\x53\x54\x55\x56\x57"
9204 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9205 "\x60\x61\x62\x63\x64\x65\x66\x67"
9206 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9207 "\x70\x71\x72\x73\x74\x75\x76\x77"
9208 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9209 "\x80\x81\x82\x83\x84\x85\x86\x87"
9210 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9211 "\x90\x91\x92\x93\x94\x95\x96\x97"
9212 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9213 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9214 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9215 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9216 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9217 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9218 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9219 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9220 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9221 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9222 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9223 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9224 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9225 "\x00\x01\x02\x03\x04\x05\x06\x07"
9226 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9227 "\x10\x11\x12\x13\x14\x15\x16\x17"
9228 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9229 "\x20\x21\x22\x23\x24\x25\x26\x27"
9230 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9231 "\x30\x31\x32\x33\x34\x35\x36\x37"
9232 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9233 "\x40\x41\x42\x43\x44\x45\x46\x47"
9234 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9235 "\x50\x51\x52\x53\x54\x55\x56\x57"
9236 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9237 "\x60\x61\x62\x63\x64\x65\x66\x67"
9238 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9239 "\x70\x71\x72\x73\x74\x75\x76\x77"
9240 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9241 "\x80\x81\x82\x83\x84\x85\x86\x87"
9242 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9243 "\x90\x91\x92\x93\x94\x95\x96\x97"
9244 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9245 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9246 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9247 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9248 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9249 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9250 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9251 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9252 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9253 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9254 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9255 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9256 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9257 .ilen = 512,
9258 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9259 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9260 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9261 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9262 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9263 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9264 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9265 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9266 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9267 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9268 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9269 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9270 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9271 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9272 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9273 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9274 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9275 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9276 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9277 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9278 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9279 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9280 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9281 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9282 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9283 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9284 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9285 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9286 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9287 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9288 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9289 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9290 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9291 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9292 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9293 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9294 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9295 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9296 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9297 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9298 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9299 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9300 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9301 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9302 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9303 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9304 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9305 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9306 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9307 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9308 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9309 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9310 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9311 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9312 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9313 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9314 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9315 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9316 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9317 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9318 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9319 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9320 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9321 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9322 .rlen = 512,
9323 }, {
9324 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9325 "\x23\x53\x60\x28\x74\x71\x35\x26"
9326 "\x62\x49\x77\x57\x24\x70\x93\x69"
9327 "\x99\x59\x57\x49\x66\x96\x76\x27"
9328 "\x31\x41\x59\x26\x53\x58\x97\x93"
9329 "\x23\x84\x62\x64\x33\x83\x27\x95"
9330 "\x02\x88\x41\x97\x16\x93\x99\x37"
9331 "\x51\x05\x82\x09\x74\x94\x45\x92",
9332 .klen = 64,
9333 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9334 "\x00\x00\x00\x00\x00\x00\x00\x00",
9335 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9336 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9337 "\x10\x11\x12\x13\x14\x15\x16\x17"
9338 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9339 "\x20\x21\x22\x23\x24\x25\x26\x27"
9340 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9341 "\x30\x31\x32\x33\x34\x35\x36\x37"
9342 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9343 "\x40\x41\x42\x43\x44\x45\x46\x47"
9344 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9345 "\x50\x51\x52\x53\x54\x55\x56\x57"
9346 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9347 "\x60\x61\x62\x63\x64\x65\x66\x67"
9348 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9349 "\x70\x71\x72\x73\x74\x75\x76\x77"
9350 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9351 "\x80\x81\x82\x83\x84\x85\x86\x87"
9352 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9353 "\x90\x91\x92\x93\x94\x95\x96\x97"
9354 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9355 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9356 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9357 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9358 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9359 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9360 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9361 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9362 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9363 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9364 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9365 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9366 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9367 "\x00\x01\x02\x03\x04\x05\x06\x07"
9368 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9369 "\x10\x11\x12\x13\x14\x15\x16\x17"
9370 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9371 "\x20\x21\x22\x23\x24\x25\x26\x27"
9372 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9373 "\x30\x31\x32\x33\x34\x35\x36\x37"
9374 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9375 "\x40\x41\x42\x43\x44\x45\x46\x47"
9376 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9377 "\x50\x51\x52\x53\x54\x55\x56\x57"
9378 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9379 "\x60\x61\x62\x63\x64\x65\x66\x67"
9380 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9381 "\x70\x71\x72\x73\x74\x75\x76\x77"
9382 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9383 "\x80\x81\x82\x83\x84\x85\x86\x87"
9384 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9385 "\x90\x91\x92\x93\x94\x95\x96\x97"
9386 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9387 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9388 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9389 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9390 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9391 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9392 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9393 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9394 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9395 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9396 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9397 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9398 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9399 .ilen = 512,
9400 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9401 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9402 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9403 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9404 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9405 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9406 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9407 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9408 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9409 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9410 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9411 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9412 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9413 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9414 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9415 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9416 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9417 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9418 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9419 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9420 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9421 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9422 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9423 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9424 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9425 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9426 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9427 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9428 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9429 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9430 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9431 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9432 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9433 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9434 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9435 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9436 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9437 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9438 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9439 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9440 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9441 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9442 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9443 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9444 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9445 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9446 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9447 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9448 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9449 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9450 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9451 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9452 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9453 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9454 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9455 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9456 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9457 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9458 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9459 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9460 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9461 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9462 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9463 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9464 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009465 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009466 .np = 3,
9467 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009468 },
9469};
9470
9471static struct cipher_testvec tf_xts_dec_tv_template[] = {
9472 /* Generated from AES-XTS test vectors */
9473 /* same as enc vectors with input and result reversed */
9474 {
9475 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9476 "\x00\x00\x00\x00\x00\x00\x00\x00"
9477 "\x00\x00\x00\x00\x00\x00\x00\x00"
9478 "\x00\x00\x00\x00\x00\x00\x00\x00",
9479 .klen = 32,
9480 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9481 "\x00\x00\x00\x00\x00\x00\x00\x00",
9482 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9483 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9484 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9485 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9486 .ilen = 32,
9487 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
9488 "\x00\x00\x00\x00\x00\x00\x00\x00"
9489 "\x00\x00\x00\x00\x00\x00\x00\x00"
9490 "\x00\x00\x00\x00\x00\x00\x00\x00",
9491 .rlen = 32,
9492 }, {
9493 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9494 "\x11\x11\x11\x11\x11\x11\x11\x11"
9495 "\x22\x22\x22\x22\x22\x22\x22\x22"
9496 "\x22\x22\x22\x22\x22\x22\x22\x22",
9497 .klen = 32,
9498 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9499 "\x00\x00\x00\x00\x00\x00\x00\x00",
9500 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9501 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9502 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9503 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9504 .ilen = 32,
9505 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9506 "\x44\x44\x44\x44\x44\x44\x44\x44"
9507 "\x44\x44\x44\x44\x44\x44\x44\x44"
9508 "\x44\x44\x44\x44\x44\x44\x44\x44",
9509 .rlen = 32,
9510 }, {
9511 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9512 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9513 "\x22\x22\x22\x22\x22\x22\x22\x22"
9514 "\x22\x22\x22\x22\x22\x22\x22\x22",
9515 .klen = 32,
9516 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9517 "\x00\x00\x00\x00\x00\x00\x00\x00",
9518 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9519 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9520 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9521 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9522 .ilen = 32,
9523 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9524 "\x44\x44\x44\x44\x44\x44\x44\x44"
9525 "\x44\x44\x44\x44\x44\x44\x44\x44"
9526 "\x44\x44\x44\x44\x44\x44\x44\x44",
9527 .rlen = 32,
9528 }, {
9529 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9530 "\x23\x53\x60\x28\x74\x71\x35\x26"
9531 "\x31\x41\x59\x26\x53\x58\x97\x93"
9532 "\x23\x84\x62\x64\x33\x83\x27\x95",
9533 .klen = 32,
9534 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9535 "\x00\x00\x00\x00\x00\x00\x00\x00",
9536 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9537 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9538 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9539 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9540 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9541 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9542 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9543 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9544 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9545 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9546 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9547 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9548 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9549 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9550 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9551 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9552 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9553 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9554 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9555 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9556 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9557 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9558 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9559 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9560 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9561 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9562 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9563 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9564 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9565 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9566 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9567 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9568 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9569 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9570 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9571 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9572 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9573 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9574 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9575 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9576 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9577 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9578 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9579 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9580 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9581 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9582 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9583 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9584 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9585 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9586 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9587 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9588 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9589 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9590 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9591 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9592 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9593 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9594 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9595 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9596 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9597 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9598 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9599 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9600 .ilen = 512,
9601 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9602 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9603 "\x10\x11\x12\x13\x14\x15\x16\x17"
9604 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9605 "\x20\x21\x22\x23\x24\x25\x26\x27"
9606 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9607 "\x30\x31\x32\x33\x34\x35\x36\x37"
9608 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9609 "\x40\x41\x42\x43\x44\x45\x46\x47"
9610 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9611 "\x50\x51\x52\x53\x54\x55\x56\x57"
9612 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9613 "\x60\x61\x62\x63\x64\x65\x66\x67"
9614 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9615 "\x70\x71\x72\x73\x74\x75\x76\x77"
9616 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9617 "\x80\x81\x82\x83\x84\x85\x86\x87"
9618 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9619 "\x90\x91\x92\x93\x94\x95\x96\x97"
9620 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9621 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9622 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9623 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9624 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9625 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9626 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9627 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9628 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9629 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9630 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9631 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9632 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9633 "\x00\x01\x02\x03\x04\x05\x06\x07"
9634 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9635 "\x10\x11\x12\x13\x14\x15\x16\x17"
9636 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9637 "\x20\x21\x22\x23\x24\x25\x26\x27"
9638 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9639 "\x30\x31\x32\x33\x34\x35\x36\x37"
9640 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9641 "\x40\x41\x42\x43\x44\x45\x46\x47"
9642 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9643 "\x50\x51\x52\x53\x54\x55\x56\x57"
9644 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9645 "\x60\x61\x62\x63\x64\x65\x66\x67"
9646 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9647 "\x70\x71\x72\x73\x74\x75\x76\x77"
9648 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9649 "\x80\x81\x82\x83\x84\x85\x86\x87"
9650 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9651 "\x90\x91\x92\x93\x94\x95\x96\x97"
9652 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9653 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9654 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9655 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9656 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9657 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9658 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9659 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9660 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9661 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9662 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9663 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9664 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9665 .rlen = 512,
9666 }, {
9667 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9668 "\x23\x53\x60\x28\x74\x71\x35\x26"
9669 "\x62\x49\x77\x57\x24\x70\x93\x69"
9670 "\x99\x59\x57\x49\x66\x96\x76\x27"
9671 "\x31\x41\x59\x26\x53\x58\x97\x93"
9672 "\x23\x84\x62\x64\x33\x83\x27\x95"
9673 "\x02\x88\x41\x97\x16\x93\x99\x37"
9674 "\x51\x05\x82\x09\x74\x94\x45\x92",
9675 .klen = 64,
9676 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9677 "\x00\x00\x00\x00\x00\x00\x00\x00",
9678 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9679 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9680 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9681 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9682 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9683 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9684 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9685 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9686 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9687 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9688 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9689 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9690 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9691 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9692 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9693 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9694 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9695 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9696 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9697 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9698 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9699 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9700 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9701 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9702 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9703 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9704 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9705 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9706 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9707 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9708 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9709 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9710 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9711 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9712 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9713 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9714 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9715 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9716 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9717 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9718 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9719 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9720 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9721 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9722 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9723 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9724 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9725 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9726 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9727 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9728 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9729 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9730 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9731 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9732 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9733 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9734 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9735 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9736 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9737 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9738 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9739 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9740 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9741 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9742 .ilen = 512,
9743 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9744 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9745 "\x10\x11\x12\x13\x14\x15\x16\x17"
9746 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9747 "\x20\x21\x22\x23\x24\x25\x26\x27"
9748 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9749 "\x30\x31\x32\x33\x34\x35\x36\x37"
9750 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9751 "\x40\x41\x42\x43\x44\x45\x46\x47"
9752 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9753 "\x50\x51\x52\x53\x54\x55\x56\x57"
9754 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9755 "\x60\x61\x62\x63\x64\x65\x66\x67"
9756 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9757 "\x70\x71\x72\x73\x74\x75\x76\x77"
9758 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9759 "\x80\x81\x82\x83\x84\x85\x86\x87"
9760 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9761 "\x90\x91\x92\x93\x94\x95\x96\x97"
9762 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9763 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9764 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9765 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9766 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9767 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9768 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9769 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9770 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9771 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9772 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9773 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9774 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9775 "\x00\x01\x02\x03\x04\x05\x06\x07"
9776 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9777 "\x10\x11\x12\x13\x14\x15\x16\x17"
9778 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9779 "\x20\x21\x22\x23\x24\x25\x26\x27"
9780 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9781 "\x30\x31\x32\x33\x34\x35\x36\x37"
9782 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9783 "\x40\x41\x42\x43\x44\x45\x46\x47"
9784 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9785 "\x50\x51\x52\x53\x54\x55\x56\x57"
9786 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9787 "\x60\x61\x62\x63\x64\x65\x66\x67"
9788 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9789 "\x70\x71\x72\x73\x74\x75\x76\x77"
9790 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9791 "\x80\x81\x82\x83\x84\x85\x86\x87"
9792 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9793 "\x90\x91\x92\x93\x94\x95\x96\x97"
9794 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9795 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9796 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9797 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9798 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9799 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9800 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9801 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9802 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9803 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9804 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9805 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9806 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9807 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009808 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009809 .np = 3,
9810 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009811 },
9812};
9813
Herbert Xuda7f0332008-07-31 17:08:25 +08009814/*
9815 * Serpent test vectors. These are backwards because Serpent writes
9816 * octet sequences in right-to-left mode.
9817 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009818#define SERPENT_ENC_TEST_VECTORS 5
9819#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08009820
9821#define TNEPRES_ENC_TEST_VECTORS 4
9822#define TNEPRES_DEC_TEST_VECTORS 4
9823
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009824#define SERPENT_CBC_ENC_TEST_VECTORS 1
9825#define SERPENT_CBC_DEC_TEST_VECTORS 1
9826
9827#define SERPENT_CTR_ENC_TEST_VECTORS 2
9828#define SERPENT_CTR_DEC_TEST_VECTORS 2
9829
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03009830#define SERPENT_LRW_ENC_TEST_VECTORS 8
9831#define SERPENT_LRW_DEC_TEST_VECTORS 8
9832
Jussi Kivilinna18be20b2011-10-18 13:33:17 +03009833#define SERPENT_XTS_ENC_TEST_VECTORS 5
9834#define SERPENT_XTS_DEC_TEST_VECTORS 5
9835
Herbert Xuda7f0332008-07-31 17:08:25 +08009836static struct cipher_testvec serpent_enc_tv_template[] = {
9837 {
9838 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9839 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9840 .ilen = 16,
9841 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
9842 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
9843 .rlen = 16,
9844 }, {
9845 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9846 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9847 .klen = 16,
9848 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9849 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9850 .ilen = 16,
9851 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
9852 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
9853 .rlen = 16,
9854 }, {
9855 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9856 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9857 "\x10\x11\x12\x13\x14\x15\x16\x17"
9858 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9859 .klen = 32,
9860 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9861 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9862 .ilen = 16,
9863 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
9864 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
9865 .rlen = 16,
9866 }, {
9867 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
9868 .klen = 16,
9869 .input = zeroed_string,
9870 .ilen = 16,
9871 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
9872 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
9873 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009874 }, { /* Generated with Crypto++ */
9875 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9876 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9877 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9878 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9879 .klen = 32,
9880 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9881 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9882 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9883 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9884 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9885 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9886 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9887 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9888 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9889 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9890 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9891 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9892 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9893 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9894 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9895 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9896 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009897 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9898 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9899 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9900 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9901 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9902 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9903 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9904 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9905 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9906 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9907 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9908 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9909 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9910 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9911 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9912 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9913 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9914 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9915 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9916 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9917 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9918 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9919 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9920 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9921 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9922 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9923 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9924 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9925 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9926 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9927 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9928 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9929 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9930 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9931 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9932 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9933 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9934 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9935 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9936 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9937 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9938 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9939 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9940 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9941 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9942 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009943 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
9944 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
9945 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
9946 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
9947 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
9948 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
9949 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
9950 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
9951 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
9952 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
9953 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
9954 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
9955 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
9956 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
9957 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
9958 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
9959 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009960 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
9961 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
9962 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
9963 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
9964 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
9965 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
9966 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
9967 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
9968 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
9969 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
9970 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
9971 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
9972 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
9973 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
9974 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
9975 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
9976 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
9977 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
9978 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
9979 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
9980 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
9981 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
9982 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
9983 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
9984 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
9985 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
9986 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
9987 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
9988 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
9989 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
9990 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
9991 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
9992 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
9993 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
9994 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
9995 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
9996 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
9997 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
9998 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
9999 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
10000 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
10001 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
10002 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
10003 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10004 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10005 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010006 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010007 .np = 3,
10008 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010009 },
10010};
10011
10012static struct cipher_testvec tnepres_enc_tv_template[] = {
10013 { /* KeySize=128, PT=0, I=1 */
10014 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10015 "\x00\x00\x00\x00\x00\x00\x00\x00",
10016 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10017 "\x00\x00\x00\x00\x00\x00\x00\x00",
10018 .klen = 16,
10019 .ilen = 16,
10020 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
10021 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
10022 .rlen = 16,
10023 }, { /* KeySize=192, PT=0, I=1 */
10024 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10025 "\x00\x00\x00\x00\x00\x00\x00\x00"
10026 "\x00\x00\x00\x00\x00\x00\x00\x00",
10027 .klen = 24,
10028 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10029 "\x00\x00\x00\x00\x00\x00\x00\x00",
10030 .ilen = 16,
10031 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
10032 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
10033 .rlen = 16,
10034 }, { /* KeySize=256, PT=0, I=1 */
10035 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10036 "\x00\x00\x00\x00\x00\x00\x00\x00"
10037 "\x00\x00\x00\x00\x00\x00\x00\x00"
10038 "\x00\x00\x00\x00\x00\x00\x00\x00",
10039 .klen = 32,
10040 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10041 "\x00\x00\x00\x00\x00\x00\x00\x00",
10042 .ilen = 16,
10043 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
10044 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
10045 .rlen = 16,
10046 }, { /* KeySize=256, I=257 */
10047 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
10048 "\x17\x16\x15\x14\x13\x12\x11\x10"
10049 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
10050 "\x07\x06\x05\x04\x03\x02\x01\x00",
10051 .klen = 32,
10052 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
10053 "\x07\x06\x05\x04\x03\x02\x01\x00",
10054 .ilen = 16,
10055 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
10056 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
10057 .rlen = 16,
10058 },
10059};
10060
10061
10062static struct cipher_testvec serpent_dec_tv_template[] = {
10063 {
10064 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
10065 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
10066 .ilen = 16,
10067 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10068 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10069 .rlen = 16,
10070 }, {
10071 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10072 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10073 .klen = 16,
10074 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
10075 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
10076 .ilen = 16,
10077 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10078 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10079 .rlen = 16,
10080 }, {
10081 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10082 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10083 "\x10\x11\x12\x13\x14\x15\x16\x17"
10084 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10085 .klen = 32,
10086 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
10087 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
10088 .ilen = 16,
10089 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10090 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10091 .rlen = 16,
10092 }, {
10093 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10094 .klen = 16,
10095 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
10096 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
10097 .ilen = 16,
10098 .result = zeroed_string,
10099 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010100 }, { /* Generated with Crypto++ */
10101 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10102 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10103 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10104 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10105 .klen = 32,
10106 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
10107 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
10108 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
10109 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
10110 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
10111 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
10112 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
10113 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
10114 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
10115 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
10116 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
10117 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
10118 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
10119 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
10120 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
10121 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
10122 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010123 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
10124 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
10125 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
10126 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
10127 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
10128 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
10129 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
10130 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
10131 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
10132 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
10133 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
10134 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
10135 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
10136 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
10137 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
10138 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
10139 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
10140 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
10141 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
10142 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
10143 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
10144 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
10145 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
10146 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
10147 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
10148 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
10149 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
10150 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
10151 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
10152 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
10153 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
10154 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
10155 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
10156 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
10157 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
10158 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
10159 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
10160 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
10161 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
10162 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
10163 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
10164 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
10165 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
10166 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10167 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10168 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010169 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10170 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10171 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10172 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10173 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10174 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10175 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10176 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10177 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10178 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10179 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10180 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10181 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10182 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10183 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10184 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10185 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010186 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10187 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10188 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10189 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10190 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10191 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10192 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10193 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10194 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10195 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10196 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10197 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10198 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10199 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10200 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10201 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10202 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10203 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10204 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10205 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10206 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10207 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10208 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10209 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10210 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10211 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10212 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10213 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10214 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10215 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10216 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10217 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10218 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10219 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10220 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10221 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10222 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10223 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10224 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10225 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10226 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10227 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10228 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10229 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10230 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10231 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010232 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010233 .np = 3,
10234 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010235 },
10236};
10237
10238static struct cipher_testvec tnepres_dec_tv_template[] = {
10239 {
10240 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
10241 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
10242 .ilen = 16,
10243 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10244 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10245 .rlen = 16,
10246 }, {
10247 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10248 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10249 .klen = 16,
10250 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
10251 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
10252 .ilen = 16,
10253 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10254 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10255 .rlen = 16,
10256 }, {
10257 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10258 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10259 "\x10\x11\x12\x13\x14\x15\x16\x17"
10260 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10261 .klen = 32,
10262 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
10263 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
10264 .ilen = 16,
10265 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10266 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10267 .rlen = 16,
10268 }, { /* KeySize=128, I=121 */
10269 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10270 .klen = 16,
10271 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
10272 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
10273 .ilen = 16,
10274 .result = zeroed_string,
10275 .rlen = 16,
10276 },
10277};
10278
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010279static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
10280 { /* Generated with Crypto++ */
10281 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10282 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10283 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10284 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10285 .klen = 32,
10286 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10287 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10288 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10289 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10290 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10291 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10292 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10293 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10294 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10295 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10296 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10297 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10298 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10299 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10300 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10301 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10302 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10303 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10304 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010305 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10306 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10307 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10308 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10309 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10310 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10311 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10312 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10313 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10314 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10315 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10316 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10317 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10318 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10319 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10320 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10321 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10322 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10323 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10324 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10325 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10326 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10327 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10328 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10329 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10330 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10331 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10332 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10333 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10334 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10335 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10336 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10337 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10338 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10339 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10340 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10341 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10342 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10343 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10344 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10345 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10346 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10347 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10348 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10349 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10350 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010351 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10352 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10353 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10354 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10355 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10356 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10357 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10358 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10359 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10360 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10361 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10362 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10363 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10364 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10365 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10366 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10367 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010368 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10369 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10370 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10371 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10372 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10373 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10374 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10375 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10376 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10377 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10378 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10379 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10380 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10381 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10382 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10383 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10384 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10385 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10386 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10387 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10388 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10389 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10390 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10391 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10392 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10393 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10394 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10395 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10396 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10397 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10398 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10399 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10400 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10401 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10402 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10403 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10404 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10405 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10406 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10407 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10408 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10409 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10410 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10411 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10412 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10413 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010414 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010415 .np = 3,
10416 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010417 },
10418};
10419
10420static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
10421 { /* Generated with Crypto++ */
10422 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10423 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10424 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10425 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10426 .klen = 32,
10427 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10428 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10429 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10430 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10431 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10432 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10433 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10434 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10435 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10436 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10437 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10438 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10439 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10440 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10441 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10442 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10443 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10444 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10445 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010446 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10447 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10448 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10449 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10450 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10451 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10452 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10453 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10454 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10455 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10456 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10457 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10458 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10459 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10460 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10461 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10462 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10463 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10464 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10465 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10466 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10467 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10468 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10469 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10470 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10471 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10472 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10473 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10474 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10475 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10476 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10477 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10478 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10479 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10480 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10481 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10482 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10483 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10484 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10485 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10486 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10487 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10488 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10489 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10490 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10491 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010492 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10493 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10494 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10495 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10496 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10497 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10498 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10499 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10500 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10501 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10502 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10503 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10504 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10505 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10506 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10507 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10508 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010509 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10510 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10511 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10512 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10513 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10514 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10515 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10516 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10517 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10518 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10519 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10520 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10521 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10522 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10523 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10524 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10525 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10526 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10527 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10528 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10529 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10530 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10531 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10532 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10533 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10534 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10535 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10536 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10537 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10538 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10539 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10540 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10541 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10542 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10543 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10544 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10545 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10546 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10547 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10548 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10549 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10550 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10551 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10552 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10553 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10554 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010555 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010556 .np = 3,
10557 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010558 },
10559};
10560
10561static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
10562 { /* Generated with Crypto++ */
10563 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10564 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10565 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10566 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10567 .klen = 32,
10568 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10569 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10570 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10571 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10572 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10573 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10574 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10575 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10576 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10577 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10578 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10579 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10580 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10581 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10582 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10583 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10584 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10585 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10586 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010587 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10588 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10589 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10590 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10591 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10592 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10593 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10594 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10595 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10596 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10597 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10598 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10599 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10600 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10601 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10602 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10603 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10604 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10605 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10606 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10607 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10608 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10609 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10610 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10611 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10612 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10613 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10614 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10615 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10616 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10617 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10618 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10619 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10620 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10621 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10622 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10623 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10624 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10625 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10626 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10627 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10628 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10629 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10630 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10631 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10632 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010633 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10634 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10635 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10636 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10637 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10638 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10639 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10640 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10641 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10642 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10643 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10644 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10645 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10646 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10647 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10648 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10649 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010650 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10651 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10652 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10653 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10654 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10655 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10656 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10657 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10658 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10659 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10660 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10661 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10662 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10663 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10664 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10665 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10666 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10667 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10668 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10669 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10670 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10671 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10672 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10673 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10674 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10675 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10676 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10677 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10678 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10679 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10680 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10681 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10682 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10683 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10684 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10685 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10686 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10687 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10688 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10689 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10690 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10691 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10692 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10693 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10694 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
10695 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010696 }, { /* Generated with Crypto++ */
10697 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10698 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10699 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10700 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10701 .klen = 32,
10702 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10703 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10704 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10705 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10706 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10707 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10708 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10709 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10710 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10711 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10712 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10713 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10714 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10715 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10716 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10717 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10718 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10719 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10720 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10721 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010722 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10723 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10724 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10725 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10726 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10727 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10728 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10729 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10730 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10731 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10732 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10733 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10734 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10735 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10736 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10737 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10738 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10739 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10740 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10741 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10742 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10743 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10744 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10745 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10746 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10747 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10748 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10749 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10750 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10751 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10752 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10753 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10754 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10755 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10756 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10757 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10758 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10759 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10760 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10761 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10762 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10763 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10764 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10765 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
10766 "\x2B\xC2\x59",
10767 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010768 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10769 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10770 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10771 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10772 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10773 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10774 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10775 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10776 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10777 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10778 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10779 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10780 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10781 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10782 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10783 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10784 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10785 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010786 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10787 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10788 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10789 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10790 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10791 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10792 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10793 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10794 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10795 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10796 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10797 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10798 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10799 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10800 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10801 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10802 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10803 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10804 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10805 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10806 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10807 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10808 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10809 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10810 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10811 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10812 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10813 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10814 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10815 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10816 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10817 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10818 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10819 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10820 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10821 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10822 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10823 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10824 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10825 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10826 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10827 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10828 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10829 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
10830 "\x38\xE2\xE5",
10831 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010832 .also_non_np = 1,
10833 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010834 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030010835 }, { /* Generated with Crypto++ */
10836 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10837 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10838 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10839 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10840 .klen = 32,
10841 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
10842 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
10843 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10844 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10845 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10846 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10847 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10848 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10849 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10850 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10851 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10852 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10853 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10854 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10855 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10856 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10857 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10858 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10859 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10860 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10861 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10862 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10863 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10864 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10865 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10866 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10867 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10868 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10869 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10870 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10871 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10872 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10873 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10874 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10875 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10876 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10877 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10878 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10879 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10880 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10881 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10882 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10883 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10884 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10885 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10886 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10887 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10888 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10889 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10890 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10891 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10892 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10893 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10894 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10895 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10896 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10897 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10898 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10899 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10900 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10901 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10902 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10903 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10904 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10905 .ilen = 496,
10906 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
10907 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
10908 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
10909 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
10910 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
10911 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
10912 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
10913 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
10914 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
10915 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
10916 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
10917 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
10918 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
10919 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
10920 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
10921 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
10922 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
10923 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
10924 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
10925 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
10926 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
10927 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
10928 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
10929 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
10930 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
10931 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
10932 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
10933 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
10934 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
10935 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
10936 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
10937 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
10938 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
10939 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
10940 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
10941 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
10942 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
10943 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
10944 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
10945 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
10946 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
10947 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
10948 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
10949 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
10950 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
10951 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
10952 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
10953 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
10954 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
10955 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
10956 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
10957 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
10958 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
10959 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
10960 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
10961 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
10962 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
10963 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
10964 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
10965 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
10966 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
10967 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
10968 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010969 },
10970};
10971
10972static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
10973 { /* Generated with Crypto++ */
10974 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10975 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10976 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10977 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10978 .klen = 32,
10979 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10980 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10981 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10982 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10983 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10984 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10985 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10986 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10987 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10988 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10989 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10990 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10991 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10992 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10993 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10994 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10995 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10996 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10997 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010998 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10999 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11000 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11001 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11002 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11003 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11004 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11005 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11006 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11007 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11008 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11009 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11010 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11011 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11012 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11013 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11014 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11015 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11016 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11017 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11018 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11019 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11020 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11021 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11022 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11023 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11024 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11025 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11026 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11027 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11028 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11029 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11030 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11031 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11032 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11033 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11034 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11035 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11036 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11037 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11038 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11039 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11040 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11041 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11042 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
11043 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011044 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11045 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11046 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11047 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11048 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11049 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11050 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11051 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11052 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11053 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11054 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11055 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11056 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11057 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11058 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11059 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11060 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011061 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11062 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11063 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11064 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11065 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11066 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11067 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11068 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11069 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11070 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11071 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11072 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11073 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11074 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11075 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11076 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11077 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11078 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11079 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11080 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11081 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11082 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11083 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11084 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11085 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11086 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11087 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11088 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11089 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11090 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11091 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11092 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11093 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11094 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11095 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11096 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11097 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11098 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11099 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11100 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11101 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11102 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11103 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11104 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11105 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11106 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011107 }, { /* Generated with Crypto++ */
11108 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11109 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11110 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11111 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11112 .klen = 32,
11113 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11114 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11115 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
11116 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
11117 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
11118 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
11119 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
11120 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
11121 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
11122 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
11123 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
11124 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
11125 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
11126 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
11127 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
11128 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
11129 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
11130 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
11131 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
11132 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011133 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11134 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11135 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11136 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11137 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11138 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11139 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11140 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11141 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11142 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11143 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11144 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11145 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11146 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11147 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11148 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11149 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11150 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11151 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11152 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11153 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11154 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11155 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11156 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11157 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11158 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11159 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11160 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11161 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11162 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11163 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11164 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11165 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11166 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11167 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11168 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11169 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11170 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11171 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11172 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11173 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11174 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11175 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11176 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
11177 "\x38\xE2\xE5",
11178 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011179 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11180 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11181 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11182 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11183 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11184 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11185 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11186 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11187 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11188 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11189 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11190 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11191 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11192 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11193 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11194 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11195 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11196 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011197 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11198 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11199 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11200 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11201 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11202 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11203 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11204 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11205 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11206 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11207 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11208 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11209 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11210 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11211 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11212 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11213 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11214 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11215 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11216 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11217 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11218 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11219 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11220 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11221 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11222 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11223 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11224 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11225 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11226 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11227 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11228 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11229 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11230 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11231 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11232 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11233 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11234 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11235 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11236 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11237 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11238 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11239 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11240 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
11241 "\x2B\xC2\x59",
11242 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011243 .also_non_np = 1,
11244 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011245 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030011246 }, { /* Generated with Crypto++ */
11247 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11248 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11249 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11250 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11251 .klen = 32,
11252 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
11253 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
11254 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
11255 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
11256 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
11257 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
11258 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
11259 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
11260 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
11261 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
11262 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
11263 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
11264 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
11265 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
11266 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
11267 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
11268 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
11269 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
11270 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
11271 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
11272 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
11273 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
11274 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
11275 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
11276 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
11277 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
11278 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
11279 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
11280 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
11281 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
11282 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
11283 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
11284 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
11285 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
11286 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
11287 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
11288 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
11289 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
11290 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
11291 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
11292 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
11293 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
11294 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
11295 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
11296 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
11297 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
11298 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
11299 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
11300 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
11301 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
11302 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
11303 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
11304 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
11305 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
11306 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
11307 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
11308 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
11309 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
11310 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
11311 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
11312 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
11313 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
11314 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
11315 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
11316 .ilen = 496,
11317 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11318 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11319 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11320 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11321 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11322 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11323 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11324 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11325 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11326 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11327 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11328 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11329 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11330 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11331 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11332 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11333 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11334 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11335 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11336 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11337 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11338 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11339 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11340 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11341 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11342 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11343 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11344 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11345 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11346 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11347 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11348 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11349 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11350 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11351 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11352 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11353 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11354 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11355 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11356 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11357 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11358 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11359 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11360 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11361 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11362 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11363 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11364 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11365 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11366 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11367 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11368 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11369 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11370 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11371 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11372 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11373 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11374 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11375 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11376 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11377 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11378 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11379 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011380 },
11381};
Herbert Xuda7f0332008-07-31 17:08:25 +080011382
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011383static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
11384 /* Generated from AES-LRW test vectors */
11385 {
11386 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11387 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11388 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11389 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11390 .klen = 32,
11391 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11392 "\x00\x00\x00\x00\x00\x00\x00\x01",
11393 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11394 "\x38\x39\x41\x42\x43\x44\x45\x46",
11395 .ilen = 16,
11396 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11397 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11398 .rlen = 16,
11399 }, {
11400 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11401 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11402 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11403 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11404 .klen = 32,
11405 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11406 "\x00\x00\x00\x00\x00\x00\x00\x02",
11407 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11408 "\x38\x39\x41\x42\x43\x44\x45\x46",
11409 .ilen = 16,
11410 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11411 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11412 .rlen = 16,
11413 }, {
11414 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11415 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11416 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11417 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11418 .klen = 32,
11419 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11420 "\x00\x00\x00\x02\x00\x00\x00\x00",
11421 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11422 "\x38\x39\x41\x42\x43\x44\x45\x46",
11423 .ilen = 16,
11424 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11425 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11426 .rlen = 16,
11427 }, {
11428 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11429 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11430 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11431 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11432 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11433 .klen = 40,
11434 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11435 "\x00\x00\x00\x00\x00\x00\x00\x01",
11436 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11437 "\x38\x39\x41\x42\x43\x44\x45\x46",
11438 .ilen = 16,
11439 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11440 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11441 .rlen = 16,
11442 }, {
11443 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11444 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11445 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11446 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11447 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11448 .klen = 40,
11449 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11450 "\x00\x00\x00\x02\x00\x00\x00\x00",
11451 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11452 "\x38\x39\x41\x42\x43\x44\x45\x46",
11453 .ilen = 16,
11454 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11455 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11456 .rlen = 16,
11457 }, {
11458 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11459 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11460 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11461 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11462 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11463 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11464 .klen = 48,
11465 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11466 "\x00\x00\x00\x00\x00\x00\x00\x01",
11467 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11468 "\x38\x39\x41\x42\x43\x44\x45\x46",
11469 .ilen = 16,
11470 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11471 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11472 .rlen = 16,
11473 }, {
11474 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11475 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11476 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11477 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11478 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11479 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11480 .klen = 48,
11481 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11482 "\x00\x00\x00\x02\x00\x00\x00\x00",
11483 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11484 "\x38\x39\x41\x42\x43\x44\x45\x46",
11485 .ilen = 16,
11486 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11487 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11488 .rlen = 16,
11489 }, {
11490 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11491 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11492 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11493 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11494 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11495 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11496 .klen = 48,
11497 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11498 "\x00\x00\x00\x00\x00\x00\x00\x01",
11499 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11500 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11501 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11502 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11503 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11504 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11505 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11506 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11507 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11508 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11509 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11510 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11511 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11512 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11513 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11514 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11515 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11516 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11517 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11518 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11519 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11520 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11521 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11522 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11523 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11524 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11525 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11526 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11527 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11528 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11529 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11530 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11531 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11532 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11533 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11534 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11535 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11536 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11537 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11538 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11539 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11540 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11541 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11542 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11543 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11544 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11545 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11546 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11547 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11548 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11549 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11550 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11551 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11552 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11553 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11554 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11555 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11556 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11557 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11558 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11559 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11560 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11561 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11562 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11563 .ilen = 512,
11564 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11565 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11566 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11567 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11568 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11569 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11570 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11571 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11572 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11573 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11574 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11575 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11576 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11577 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11578 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11579 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11580 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11581 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11582 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11583 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11584 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11585 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11586 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11587 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11588 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11589 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11590 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11591 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11592 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11593 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11594 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11595 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11596 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11597 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11598 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11599 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11600 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11601 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11602 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11603 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11604 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11605 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11606 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11607 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11608 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11609 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11610 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11611 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11612 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11613 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11614 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11615 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11616 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11617 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11618 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11619 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11620 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11621 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11622 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11623 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11624 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11625 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11626 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11627 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11628 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011629 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011630 .np = 3,
11631 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011632 },
11633};
11634
11635static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
11636 /* Generated from AES-LRW test vectors */
11637 /* same as enc vectors with input and result reversed */
11638 {
11639 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11640 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11641 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11642 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11643 .klen = 32,
11644 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11645 "\x00\x00\x00\x00\x00\x00\x00\x01",
11646 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11647 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11648 .ilen = 16,
11649 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11650 "\x38\x39\x41\x42\x43\x44\x45\x46",
11651 .rlen = 16,
11652 }, {
11653 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11654 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11655 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11656 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11657 .klen = 32,
11658 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11659 "\x00\x00\x00\x00\x00\x00\x00\x02",
11660 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11661 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11662 .ilen = 16,
11663 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11664 "\x38\x39\x41\x42\x43\x44\x45\x46",
11665 .rlen = 16,
11666 }, {
11667 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11668 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11669 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11670 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11671 .klen = 32,
11672 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11673 "\x00\x00\x00\x02\x00\x00\x00\x00",
11674 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11675 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11676 .ilen = 16,
11677 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11678 "\x38\x39\x41\x42\x43\x44\x45\x46",
11679 .rlen = 16,
11680 }, {
11681 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11682 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11683 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11684 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11685 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11686 .klen = 40,
11687 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11688 "\x00\x00\x00\x00\x00\x00\x00\x01",
11689 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11690 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11691 .ilen = 16,
11692 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11693 "\x38\x39\x41\x42\x43\x44\x45\x46",
11694 .rlen = 16,
11695 }, {
11696 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11697 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11698 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11699 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11700 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11701 .klen = 40,
11702 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11703 "\x00\x00\x00\x02\x00\x00\x00\x00",
11704 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11705 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11706 .ilen = 16,
11707 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11708 "\x38\x39\x41\x42\x43\x44\x45\x46",
11709 .rlen = 16,
11710 }, {
11711 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11712 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11713 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11714 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11715 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11716 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11717 .klen = 48,
11718 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11719 "\x00\x00\x00\x00\x00\x00\x00\x01",
11720 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11721 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11722 .ilen = 16,
11723 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11724 "\x38\x39\x41\x42\x43\x44\x45\x46",
11725 .rlen = 16,
11726 }, {
11727 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11728 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11729 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11730 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11731 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11732 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11733 .klen = 48,
11734 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11735 "\x00\x00\x00\x02\x00\x00\x00\x00",
11736 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11737 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11738 .ilen = 16,
11739 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11740 "\x38\x39\x41\x42\x43\x44\x45\x46",
11741 .rlen = 16,
11742 }, {
11743 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11744 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11745 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11746 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11747 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11748 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11749 .klen = 48,
11750 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11751 "\x00\x00\x00\x00\x00\x00\x00\x01",
11752 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11753 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11754 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11755 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11756 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11757 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11758 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11759 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11760 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11761 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11762 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11763 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11764 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11765 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11766 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11767 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11768 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11769 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11770 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11771 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11772 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11773 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11774 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11775 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11776 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11777 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11778 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11779 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11780 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11781 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11782 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11783 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11784 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11785 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11786 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11787 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11788 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11789 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11790 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11791 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11792 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11793 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11794 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11795 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11796 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11797 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11798 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11799 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11800 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11801 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11802 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11803 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11804 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11805 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11806 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11807 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11808 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11809 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11810 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11811 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11812 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11813 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11814 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11815 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11816 .ilen = 512,
11817 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11818 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11819 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11820 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11821 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11822 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11823 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11824 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11825 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11826 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11827 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11828 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11829 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11830 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11831 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11832 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11833 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11834 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11835 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11836 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11837 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11838 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11839 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11840 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11841 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11842 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11843 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11844 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11845 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11846 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11847 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11848 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11849 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11850 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11851 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11852 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11853 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11854 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11855 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11856 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11857 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11858 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11859 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11860 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11861 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11862 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11863 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11864 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11865 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11866 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11867 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11868 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11869 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11870 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11871 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11872 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11873 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11874 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11875 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11876 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11877 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11878 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11879 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11880 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11881 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011882 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011883 .np = 3,
11884 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011885 },
11886};
11887
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030011888static struct cipher_testvec serpent_xts_enc_tv_template[] = {
11889 /* Generated from AES-XTS test vectors */
11890 {
11891 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
11892 "\x00\x00\x00\x00\x00\x00\x00\x00"
11893 "\x00\x00\x00\x00\x00\x00\x00\x00"
11894 "\x00\x00\x00\x00\x00\x00\x00\x00",
11895 .klen = 32,
11896 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11897 "\x00\x00\x00\x00\x00\x00\x00\x00",
11898 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
11899 "\x00\x00\x00\x00\x00\x00\x00\x00"
11900 "\x00\x00\x00\x00\x00\x00\x00\x00"
11901 "\x00\x00\x00\x00\x00\x00\x00\x00",
11902 .ilen = 32,
11903 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
11904 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
11905 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
11906 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
11907 .rlen = 32,
11908 }, {
11909 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
11910 "\x11\x11\x11\x11\x11\x11\x11\x11"
11911 "\x22\x22\x22\x22\x22\x22\x22\x22"
11912 "\x22\x22\x22\x22\x22\x22\x22\x22",
11913 .klen = 32,
11914 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11915 "\x00\x00\x00\x00\x00\x00\x00\x00",
11916 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11917 "\x44\x44\x44\x44\x44\x44\x44\x44"
11918 "\x44\x44\x44\x44\x44\x44\x44\x44"
11919 "\x44\x44\x44\x44\x44\x44\x44\x44",
11920 .ilen = 32,
11921 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
11922 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
11923 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
11924 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
11925 .rlen = 32,
11926 }, {
11927 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
11928 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
11929 "\x22\x22\x22\x22\x22\x22\x22\x22"
11930 "\x22\x22\x22\x22\x22\x22\x22\x22",
11931 .klen = 32,
11932 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11933 "\x00\x00\x00\x00\x00\x00\x00\x00",
11934 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11935 "\x44\x44\x44\x44\x44\x44\x44\x44"
11936 "\x44\x44\x44\x44\x44\x44\x44\x44"
11937 "\x44\x44\x44\x44\x44\x44\x44\x44",
11938 .ilen = 32,
11939 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
11940 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
11941 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
11942 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
11943 .rlen = 32,
11944 }, {
11945 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11946 "\x23\x53\x60\x28\x74\x71\x35\x26"
11947 "\x31\x41\x59\x26\x53\x58\x97\x93"
11948 "\x23\x84\x62\x64\x33\x83\x27\x95",
11949 .klen = 32,
11950 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11951 "\x00\x00\x00\x00\x00\x00\x00\x00",
11952 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11953 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11954 "\x10\x11\x12\x13\x14\x15\x16\x17"
11955 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11956 "\x20\x21\x22\x23\x24\x25\x26\x27"
11957 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11958 "\x30\x31\x32\x33\x34\x35\x36\x37"
11959 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11960 "\x40\x41\x42\x43\x44\x45\x46\x47"
11961 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11962 "\x50\x51\x52\x53\x54\x55\x56\x57"
11963 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11964 "\x60\x61\x62\x63\x64\x65\x66\x67"
11965 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11966 "\x70\x71\x72\x73\x74\x75\x76\x77"
11967 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11968 "\x80\x81\x82\x83\x84\x85\x86\x87"
11969 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11970 "\x90\x91\x92\x93\x94\x95\x96\x97"
11971 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11972 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11973 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11974 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11975 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11976 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11977 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11978 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11979 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11980 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11981 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11982 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11983 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11984 "\x00\x01\x02\x03\x04\x05\x06\x07"
11985 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11986 "\x10\x11\x12\x13\x14\x15\x16\x17"
11987 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11988 "\x20\x21\x22\x23\x24\x25\x26\x27"
11989 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11990 "\x30\x31\x32\x33\x34\x35\x36\x37"
11991 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11992 "\x40\x41\x42\x43\x44\x45\x46\x47"
11993 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11994 "\x50\x51\x52\x53\x54\x55\x56\x57"
11995 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11996 "\x60\x61\x62\x63\x64\x65\x66\x67"
11997 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11998 "\x70\x71\x72\x73\x74\x75\x76\x77"
11999 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12000 "\x80\x81\x82\x83\x84\x85\x86\x87"
12001 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12002 "\x90\x91\x92\x93\x94\x95\x96\x97"
12003 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12004 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12005 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12006 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12007 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12008 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12009 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12010 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12011 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12012 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12013 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12014 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12015 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12016 .ilen = 512,
12017 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12018 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12019 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12020 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12021 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12022 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12023 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12024 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12025 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12026 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12027 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12028 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12029 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12030 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12031 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12032 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12033 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12034 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12035 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12036 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12037 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12038 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12039 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12040 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12041 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12042 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12043 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12044 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12045 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12046 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12047 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12048 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12049 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12050 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12051 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12052 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12053 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12054 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12055 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12056 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12057 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12058 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12059 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12060 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12061 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12062 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12063 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12064 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12065 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12066 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12067 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12068 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12069 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12070 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12071 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12072 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12073 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12074 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12075 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12076 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12077 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12078 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12079 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12080 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12081 .rlen = 512,
12082 }, {
12083 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12084 "\x23\x53\x60\x28\x74\x71\x35\x26"
12085 "\x62\x49\x77\x57\x24\x70\x93\x69"
12086 "\x99\x59\x57\x49\x66\x96\x76\x27"
12087 "\x31\x41\x59\x26\x53\x58\x97\x93"
12088 "\x23\x84\x62\x64\x33\x83\x27\x95"
12089 "\x02\x88\x41\x97\x16\x93\x99\x37"
12090 "\x51\x05\x82\x09\x74\x94\x45\x92",
12091 .klen = 64,
12092 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12093 "\x00\x00\x00\x00\x00\x00\x00\x00",
12094 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12095 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12096 "\x10\x11\x12\x13\x14\x15\x16\x17"
12097 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12098 "\x20\x21\x22\x23\x24\x25\x26\x27"
12099 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12100 "\x30\x31\x32\x33\x34\x35\x36\x37"
12101 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12102 "\x40\x41\x42\x43\x44\x45\x46\x47"
12103 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12104 "\x50\x51\x52\x53\x54\x55\x56\x57"
12105 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12106 "\x60\x61\x62\x63\x64\x65\x66\x67"
12107 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12108 "\x70\x71\x72\x73\x74\x75\x76\x77"
12109 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12110 "\x80\x81\x82\x83\x84\x85\x86\x87"
12111 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12112 "\x90\x91\x92\x93\x94\x95\x96\x97"
12113 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12114 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12115 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12116 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12117 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12118 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12119 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12120 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12121 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12122 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12123 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12124 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12125 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12126 "\x00\x01\x02\x03\x04\x05\x06\x07"
12127 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12128 "\x10\x11\x12\x13\x14\x15\x16\x17"
12129 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12130 "\x20\x21\x22\x23\x24\x25\x26\x27"
12131 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12132 "\x30\x31\x32\x33\x34\x35\x36\x37"
12133 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12134 "\x40\x41\x42\x43\x44\x45\x46\x47"
12135 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12136 "\x50\x51\x52\x53\x54\x55\x56\x57"
12137 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12138 "\x60\x61\x62\x63\x64\x65\x66\x67"
12139 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12140 "\x70\x71\x72\x73\x74\x75\x76\x77"
12141 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12142 "\x80\x81\x82\x83\x84\x85\x86\x87"
12143 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12144 "\x90\x91\x92\x93\x94\x95\x96\x97"
12145 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12146 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12147 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12148 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12149 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12150 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12151 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12152 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12153 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12154 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12155 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12156 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12157 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12158 .ilen = 512,
12159 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12160 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12161 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12162 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12163 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12164 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12165 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12166 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12167 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12168 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12169 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12170 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12171 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12172 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12173 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12174 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12175 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12176 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12177 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12178 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12179 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12180 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12181 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12182 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12183 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12184 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12185 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12186 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12187 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12188 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12189 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12190 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12191 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12192 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12193 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12194 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12195 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12196 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12197 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12198 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12199 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12200 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12201 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12202 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12203 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12204 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12205 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12206 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12207 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12208 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12209 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12210 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12211 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12212 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12213 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12214 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12215 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12216 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12217 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12218 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12219 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12220 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12221 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12222 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12223 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012224 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012225 .np = 3,
12226 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030012227 },
12228};
12229
12230static struct cipher_testvec serpent_xts_dec_tv_template[] = {
12231 /* Generated from AES-XTS test vectors */
12232 /* same as enc vectors with input and result reversed */
12233 {
12234 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
12235 "\x00\x00\x00\x00\x00\x00\x00\x00"
12236 "\x00\x00\x00\x00\x00\x00\x00\x00"
12237 "\x00\x00\x00\x00\x00\x00\x00\x00",
12238 .klen = 32,
12239 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12240 "\x00\x00\x00\x00\x00\x00\x00\x00",
12241 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
12242 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
12243 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
12244 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
12245 .ilen = 32,
12246 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
12247 "\x00\x00\x00\x00\x00\x00\x00\x00"
12248 "\x00\x00\x00\x00\x00\x00\x00\x00"
12249 "\x00\x00\x00\x00\x00\x00\x00\x00",
12250 .rlen = 32,
12251 }, {
12252 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
12253 "\x11\x11\x11\x11\x11\x11\x11\x11"
12254 "\x22\x22\x22\x22\x22\x22\x22\x22"
12255 "\x22\x22\x22\x22\x22\x22\x22\x22",
12256 .klen = 32,
12257 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12258 "\x00\x00\x00\x00\x00\x00\x00\x00",
12259 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
12260 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
12261 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
12262 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
12263 .ilen = 32,
12264 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12265 "\x44\x44\x44\x44\x44\x44\x44\x44"
12266 "\x44\x44\x44\x44\x44\x44\x44\x44"
12267 "\x44\x44\x44\x44\x44\x44\x44\x44",
12268 .rlen = 32,
12269 }, {
12270 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12271 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12272 "\x22\x22\x22\x22\x22\x22\x22\x22"
12273 "\x22\x22\x22\x22\x22\x22\x22\x22",
12274 .klen = 32,
12275 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12276 "\x00\x00\x00\x00\x00\x00\x00\x00",
12277 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
12278 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
12279 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
12280 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
12281 .ilen = 32,
12282 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12283 "\x44\x44\x44\x44\x44\x44\x44\x44"
12284 "\x44\x44\x44\x44\x44\x44\x44\x44"
12285 "\x44\x44\x44\x44\x44\x44\x44\x44",
12286 .rlen = 32,
12287 }, {
12288 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12289 "\x23\x53\x60\x28\x74\x71\x35\x26"
12290 "\x31\x41\x59\x26\x53\x58\x97\x93"
12291 "\x23\x84\x62\x64\x33\x83\x27\x95",
12292 .klen = 32,
12293 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12294 "\x00\x00\x00\x00\x00\x00\x00\x00",
12295 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12296 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12297 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12298 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12299 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12300 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12301 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12302 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12303 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12304 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12305 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12306 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12307 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12308 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12309 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12310 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12311 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12312 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12313 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12314 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12315 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12316 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12317 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12318 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12319 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12320 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12321 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12322 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12323 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12324 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12325 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12326 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12327 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12328 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12329 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12330 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12331 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12332 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12333 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12334 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12335 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12336 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12337 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12338 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12339 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12340 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12341 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12342 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12343 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12344 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12345 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12346 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12347 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12348 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12349 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12350 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12351 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12352 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12353 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12354 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12355 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12356 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12357 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12358 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12359 .ilen = 512,
12360 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12361 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12362 "\x10\x11\x12\x13\x14\x15\x16\x17"
12363 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12364 "\x20\x21\x22\x23\x24\x25\x26\x27"
12365 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12366 "\x30\x31\x32\x33\x34\x35\x36\x37"
12367 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12368 "\x40\x41\x42\x43\x44\x45\x46\x47"
12369 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12370 "\x50\x51\x52\x53\x54\x55\x56\x57"
12371 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12372 "\x60\x61\x62\x63\x64\x65\x66\x67"
12373 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12374 "\x70\x71\x72\x73\x74\x75\x76\x77"
12375 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12376 "\x80\x81\x82\x83\x84\x85\x86\x87"
12377 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12378 "\x90\x91\x92\x93\x94\x95\x96\x97"
12379 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12380 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12381 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12382 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12383 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12384 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12385 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12386 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12387 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12388 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12389 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12390 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12391 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12392 "\x00\x01\x02\x03\x04\x05\x06\x07"
12393 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12394 "\x10\x11\x12\x13\x14\x15\x16\x17"
12395 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12396 "\x20\x21\x22\x23\x24\x25\x26\x27"
12397 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12398 "\x30\x31\x32\x33\x34\x35\x36\x37"
12399 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12400 "\x40\x41\x42\x43\x44\x45\x46\x47"
12401 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12402 "\x50\x51\x52\x53\x54\x55\x56\x57"
12403 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12404 "\x60\x61\x62\x63\x64\x65\x66\x67"
12405 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12406 "\x70\x71\x72\x73\x74\x75\x76\x77"
12407 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12408 "\x80\x81\x82\x83\x84\x85\x86\x87"
12409 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12410 "\x90\x91\x92\x93\x94\x95\x96\x97"
12411 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12412 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12413 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12414 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12415 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12416 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12417 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12418 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12419 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12420 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12421 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12422 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12423 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12424 .rlen = 512,
12425 }, {
12426 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12427 "\x23\x53\x60\x28\x74\x71\x35\x26"
12428 "\x62\x49\x77\x57\x24\x70\x93\x69"
12429 "\x99\x59\x57\x49\x66\x96\x76\x27"
12430 "\x31\x41\x59\x26\x53\x58\x97\x93"
12431 "\x23\x84\x62\x64\x33\x83\x27\x95"
12432 "\x02\x88\x41\x97\x16\x93\x99\x37"
12433 "\x51\x05\x82\x09\x74\x94\x45\x92",
12434 .klen = 64,
12435 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12436 "\x00\x00\x00\x00\x00\x00\x00\x00",
12437 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12438 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12439 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12440 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12441 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12442 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12443 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12444 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12445 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12446 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12447 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12448 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12449 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12450 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12451 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12452 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12453 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12454 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12455 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12456 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12457 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12458 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12459 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12460 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12461 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12462 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12463 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12464 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12465 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12466 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12467 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12468 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12469 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12470 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12471 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12472 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12473 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12474 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12475 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12476 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12477 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12478 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12479 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12480 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12481 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12482 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12483 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12484 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12485 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12486 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12487 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12488 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12489 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12490 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12491 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12492 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12493 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12494 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12495 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12496 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12497 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12498 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12499 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12500 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12501 .ilen = 512,
12502 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12503 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12504 "\x10\x11\x12\x13\x14\x15\x16\x17"
12505 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12506 "\x20\x21\x22\x23\x24\x25\x26\x27"
12507 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12508 "\x30\x31\x32\x33\x34\x35\x36\x37"
12509 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12510 "\x40\x41\x42\x43\x44\x45\x46\x47"
12511 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12512 "\x50\x51\x52\x53\x54\x55\x56\x57"
12513 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12514 "\x60\x61\x62\x63\x64\x65\x66\x67"
12515 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12516 "\x70\x71\x72\x73\x74\x75\x76\x77"
12517 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12518 "\x80\x81\x82\x83\x84\x85\x86\x87"
12519 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12520 "\x90\x91\x92\x93\x94\x95\x96\x97"
12521 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12522 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12523 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12524 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12525 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12526 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12527 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12528 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12529 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12530 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12531 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12532 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12533 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12534 "\x00\x01\x02\x03\x04\x05\x06\x07"
12535 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12536 "\x10\x11\x12\x13\x14\x15\x16\x17"
12537 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12538 "\x20\x21\x22\x23\x24\x25\x26\x27"
12539 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12540 "\x30\x31\x32\x33\x34\x35\x36\x37"
12541 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12542 "\x40\x41\x42\x43\x44\x45\x46\x47"
12543 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12544 "\x50\x51\x52\x53\x54\x55\x56\x57"
12545 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12546 "\x60\x61\x62\x63\x64\x65\x66\x67"
12547 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12548 "\x70\x71\x72\x73\x74\x75\x76\x77"
12549 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12550 "\x80\x81\x82\x83\x84\x85\x86\x87"
12551 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12552 "\x90\x91\x92\x93\x94\x95\x96\x97"
12553 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12554 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12555 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12556 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12557 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12558 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12559 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12560 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12561 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12562 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12563 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12564 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12565 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12566 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012567 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012568 .np = 3,
12569 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030012570 },
12571};
12572
Herbert Xuda7f0332008-07-31 17:08:25 +080012573/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012574#define CAST6_ENC_TEST_VECTORS 4
12575#define CAST6_DEC_TEST_VECTORS 4
12576#define CAST6_CBC_ENC_TEST_VECTORS 1
12577#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030012578#define CAST6_CTR_ENC_TEST_VECTORS 2
12579#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012580#define CAST6_LRW_ENC_TEST_VECTORS 1
12581#define CAST6_LRW_DEC_TEST_VECTORS 1
12582#define CAST6_XTS_ENC_TEST_VECTORS 1
12583#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +080012584
12585static struct cipher_testvec cast6_enc_tv_template[] = {
12586 {
12587 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12588 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12589 .klen = 16,
12590 .input = zeroed_string,
12591 .ilen = 16,
12592 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12593 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12594 .rlen = 16,
12595 }, {
12596 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12597 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12598 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12599 .klen = 24,
12600 .input = zeroed_string,
12601 .ilen = 16,
12602 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12603 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12604 .rlen = 16,
12605 }, {
12606 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12607 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12608 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12609 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12610 .klen = 32,
12611 .input = zeroed_string,
12612 .ilen = 16,
12613 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12614 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12615 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012616 }, { /* Generated from TF test vectors */
12617 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12618 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12619 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12620 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12621 .klen = 32,
12622 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12623 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12624 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12625 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12626 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12627 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12628 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12629 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12630 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12631 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12632 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12633 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12634 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12635 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12636 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12637 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12638 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12639 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12640 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12641 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12642 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12643 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12644 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12645 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12646 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12647 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12648 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12649 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12650 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12651 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12652 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12653 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12654 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12655 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12656 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12657 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12658 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12659 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12660 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12661 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12662 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12663 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12664 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12665 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12666 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12667 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12668 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12669 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12670 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12671 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12672 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12673 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12674 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12675 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12676 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12677 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12678 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12679 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12680 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12681 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12682 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12683 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12684 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12685 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12686 .ilen = 496,
12687 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12688 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12689 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12690 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12691 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12692 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12693 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12694 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12695 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12696 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12697 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12698 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12699 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12700 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12701 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12702 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12703 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12704 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12705 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12706 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12707 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12708 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12709 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12710 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12711 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12712 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12713 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12714 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12715 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12716 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12717 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12718 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12719 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12720 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12721 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12722 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12723 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12724 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12725 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12726 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12727 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12728 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12729 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12730 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12731 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12732 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12733 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12734 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12735 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12736 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12737 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12738 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12739 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12740 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12741 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12742 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12743 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12744 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12745 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12746 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12747 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12748 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12749 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012750 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012751 .np = 3,
12752 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012753 },
12754};
12755
12756static struct cipher_testvec cast6_dec_tv_template[] = {
12757 {
12758 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12759 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12760 .klen = 16,
12761 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12762 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12763 .ilen = 16,
12764 .result = zeroed_string,
12765 .rlen = 16,
12766 }, {
12767 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12768 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12769 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12770 .klen = 24,
12771 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12772 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12773 .ilen = 16,
12774 .result = zeroed_string,
12775 .rlen = 16,
12776 }, {
12777 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12778 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12779 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12780 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12781 .klen = 32,
12782 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12783 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12784 .ilen = 16,
12785 .result = zeroed_string,
12786 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012787 }, { /* Generated from TF test vectors */
12788 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12789 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12790 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12791 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12792 .klen = 32,
12793 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12794 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12795 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12796 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12797 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12798 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12799 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12800 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12801 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12802 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12803 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12804 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12805 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12806 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12807 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12808 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12809 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12810 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12811 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12812 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12813 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12814 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12815 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12816 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12817 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12818 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12819 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12820 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12821 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12822 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12823 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12824 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12825 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12826 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12827 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12828 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12829 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12830 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12831 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12832 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12833 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12834 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12835 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12836 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12837 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12838 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12839 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12840 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12841 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12842 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12843 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12844 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12845 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12846 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12847 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12848 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12849 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12850 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12851 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12852 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12853 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12854 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12855 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12856 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12857 .ilen = 496,
12858 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12859 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12860 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12861 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12862 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12863 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12864 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12865 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12866 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12867 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12868 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12869 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12870 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12871 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12872 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12873 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12874 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12875 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12876 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12877 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12878 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12879 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12880 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12881 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12882 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12883 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12884 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12885 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12886 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12887 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12888 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12889 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12890 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12891 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12892 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12893 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12894 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12895 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12896 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12897 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12898 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12899 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12900 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12901 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12902 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12903 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12904 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12905 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12906 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12907 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12908 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12909 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12910 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12911 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12912 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12913 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12914 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12915 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12916 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12917 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12918 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12919 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12920 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012921 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012922 .np = 3,
12923 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012924 },
12925};
12926
12927static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
12928 { /* Generated from TF test vectors */
12929 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12930 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12931 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12932 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12933 .klen = 32,
12934 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12935 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12936 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12937 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12938 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12939 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12940 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12941 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12942 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12943 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12944 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12945 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12946 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12947 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12948 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12949 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12950 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12951 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12952 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12953 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12954 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12955 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12956 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12957 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12958 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12959 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12960 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12961 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12962 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12963 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12964 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12965 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12966 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12967 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12968 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12969 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12970 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12971 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12972 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12973 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12974 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12975 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12976 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12977 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12978 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12979 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12980 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12981 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12982 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12983 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12984 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12985 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12986 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12987 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12988 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12989 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12990 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12991 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12992 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12993 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12994 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12995 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12996 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12997 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12998 .ilen = 496,
12999 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
13000 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
13001 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
13002 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
13003 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
13004 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
13005 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
13006 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
13007 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
13008 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
13009 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
13010 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
13011 "\x23\x16\x47\x72\x81\x13\x3A\x72"
13012 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
13013 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
13014 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
13015 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
13016 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
13017 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
13018 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
13019 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
13020 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
13021 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
13022 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
13023 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
13024 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
13025 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
13026 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
13027 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
13028 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
13029 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
13030 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
13031 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
13032 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
13033 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
13034 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
13035 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
13036 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
13037 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
13038 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
13039 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
13040 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
13041 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
13042 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
13043 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
13044 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
13045 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
13046 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
13047 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
13048 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
13049 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
13050 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
13051 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
13052 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
13053 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
13054 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
13055 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
13056 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
13057 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
13058 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
13059 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
13060 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
13061 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013062 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013063 .np = 3,
13064 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013065 },
13066};
13067
13068static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
13069 { /* Generated from TF test vectors */
13070 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13071 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13072 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13073 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13074 .klen = 32,
13075 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13076 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13077 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
13078 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
13079 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
13080 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
13081 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
13082 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
13083 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
13084 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
13085 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
13086 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
13087 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
13088 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
13089 "\x23\x16\x47\x72\x81\x13\x3A\x72"
13090 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
13091 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
13092 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
13093 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
13094 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
13095 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
13096 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
13097 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
13098 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
13099 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
13100 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
13101 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
13102 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
13103 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
13104 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
13105 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
13106 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
13107 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
13108 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
13109 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
13110 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
13111 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
13112 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
13113 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
13114 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
13115 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
13116 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
13117 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
13118 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
13119 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
13120 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
13121 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
13122 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
13123 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
13124 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
13125 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
13126 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
13127 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
13128 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
13129 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
13130 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
13131 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
13132 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
13133 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
13134 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
13135 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
13136 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
13137 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
13138 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
13139 .ilen = 496,
13140 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13141 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13142 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13143 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13144 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13145 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13146 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13147 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13148 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13149 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13150 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13151 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13152 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13153 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13154 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13155 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13156 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13157 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13158 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13159 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13160 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13161 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13162 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13163 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13164 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13165 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13166 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13167 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13168 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13169 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13170 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13171 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13172 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13173 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13174 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13175 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13176 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13177 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13178 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13179 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13180 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13181 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13182 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13183 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13184 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13185 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13186 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13187 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13188 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13189 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13190 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13191 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13192 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13193 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13194 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13195 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13196 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13197 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13198 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13199 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13200 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13201 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13202 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013203 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013204 .np = 3,
13205 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013206 },
13207};
13208
13209static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
13210 { /* Generated from TF test vectors */
13211 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13212 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13213 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13214 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13215 .klen = 32,
13216 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13217 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13218 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13219 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013220 "\x3A",
13221 .ilen = 17,
13222 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13223 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13224 "\x57",
13225 .rlen = 17,
13226 }, { /* Generated from TF test vectors */
13227 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13228 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13229 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13230 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13231 .klen = 32,
13232 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13233 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13234 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13235 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013236 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13237 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13238 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13239 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13240 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13241 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13242 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13243 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13244 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13245 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13246 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13247 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13248 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13249 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13250 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13251 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13252 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13253 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13254 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13255 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13256 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13257 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13258 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13259 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13260 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13261 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13262 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13263 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13264 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13265 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13266 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13267 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13268 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13269 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13270 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13271 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13272 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13273 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13274 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13275 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13276 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13277 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13278 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13279 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13280 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13281 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13282 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13283 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13284 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13285 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13286 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13287 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13288 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13289 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13290 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13291 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13292 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13293 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13294 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13295 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13296 .ilen = 496,
13297 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13298 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13299 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13300 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13301 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13302 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13303 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13304 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13305 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13306 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13307 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13308 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13309 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13310 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13311 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13312 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13313 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13314 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13315 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13316 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13317 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13318 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13319 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13320 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13321 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13322 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13323 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13324 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13325 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13326 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13327 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13328 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13329 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13330 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13331 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13332 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13333 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13334 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13335 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13336 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13337 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13338 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13339 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13340 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13341 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13342 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13343 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13344 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13345 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13346 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13347 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13348 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13349 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13350 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13351 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13352 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13353 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13354 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13355 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13356 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13357 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13358 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13359 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013360 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013361 .np = 3,
13362 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013363 },
13364};
13365
13366static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
13367 { /* Generated from TF test vectors */
13368 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13369 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13370 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13371 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13372 .klen = 32,
13373 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13374 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13375 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13376 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013377 "\x57",
13378 .ilen = 17,
13379 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13380 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13381 "\x3A",
13382 .rlen = 17,
13383 }, { /* Generated from TF test vectors */
13384 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13385 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13386 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13387 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13388 .klen = 32,
13389 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13390 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13391 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13392 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013393 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13394 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13395 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13396 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13397 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13398 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13399 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13400 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13401 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13402 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13403 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13404 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13405 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13406 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13407 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13408 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13409 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13410 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13411 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13412 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13413 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13414 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13415 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13416 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13417 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13418 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13419 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13420 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13421 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13422 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13423 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13424 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13425 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13426 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13427 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13428 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13429 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13430 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13431 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13432 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13433 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13434 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13435 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13436 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13437 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13438 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13439 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13440 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13441 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13442 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13443 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13444 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13445 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13446 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13447 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13448 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13449 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13450 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13451 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13452 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13453 .ilen = 496,
13454 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13455 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13456 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13457 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13458 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13459 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13460 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13461 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13462 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13463 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13464 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13465 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13466 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13467 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13468 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13469 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13470 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13471 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13472 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13473 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13474 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13475 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13476 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13477 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13478 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13479 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13480 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13481 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13482 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13483 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13484 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13485 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13486 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13487 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13488 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13489 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13490 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13491 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13492 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13493 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13494 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13495 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13496 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13497 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13498 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13499 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13500 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13501 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13502 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13503 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13504 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13505 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13506 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13507 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13508 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13509 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13510 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13511 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13512 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13513 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13514 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13515 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13516 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013517 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013518 .np = 3,
13519 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013520 },
13521};
13522
13523static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
13524 { /* Generated from TF test vectors */
13525 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13526 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13527 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13528 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13529 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13530 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13531 .klen = 48,
13532 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13533 "\x00\x00\x00\x00\x00\x00\x00\x01",
13534 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13535 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13536 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13537 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13538 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13539 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13540 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13541 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13542 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13543 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13544 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13545 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13546 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13547 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13548 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13549 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13550 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13551 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13552 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13553 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13554 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13555 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13556 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13557 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13558 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13559 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13560 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13561 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13562 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13563 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13564 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13565 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13566 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13567 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13568 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13569 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13570 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13571 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13572 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13573 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13574 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13575 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13576 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13577 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13578 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13579 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13580 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13581 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13582 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13583 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13584 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13585 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13586 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13587 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13588 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13589 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13590 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13591 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13592 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13593 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13594 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13595 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13596 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13597 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13598 .ilen = 512,
13599 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13600 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13601 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13602 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13603 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13604 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13605 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13606 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13607 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13608 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13609 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13610 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13611 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13612 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13613 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13614 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13615 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13616 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13617 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13618 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13619 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13620 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13621 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13622 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13623 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13624 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13625 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13626 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13627 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13628 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13629 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13630 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13631 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13632 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13633 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13634 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13635 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13636 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13637 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13638 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13639 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13640 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13641 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13642 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13643 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13644 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13645 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13646 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13647 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13648 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13649 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13650 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13651 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13652 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13653 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13654 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13655 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13656 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13657 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13658 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13659 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13660 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13661 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13662 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13663 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013664 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013665 .np = 3,
13666 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013667 },
13668};
13669
13670static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
13671 { /* Generated from TF test vectors */
13672 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13673 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13674 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13675 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13676 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13677 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13678 .klen = 48,
13679 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13680 "\x00\x00\x00\x00\x00\x00\x00\x01",
13681 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13682 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13683 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13684 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13685 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13686 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13687 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13688 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13689 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13690 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13691 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13692 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13693 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13694 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13695 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13696 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13697 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13698 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13699 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13700 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13701 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13702 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13703 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13704 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13705 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13706 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13707 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13708 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13709 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13710 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13711 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13712 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13713 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13714 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13715 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13716 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13717 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13718 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13719 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13720 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13721 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13722 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13723 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13724 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13725 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13726 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13727 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13728 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13729 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13730 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13731 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13732 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13733 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13734 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13735 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13736 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13737 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13738 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13739 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13740 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13741 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13742 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13743 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13744 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13745 .ilen = 512,
13746 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13747 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13748 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13749 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13750 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13751 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13752 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13753 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13754 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13755 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13756 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13757 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13758 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13759 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13760 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13761 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13762 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13763 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13764 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13765 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13766 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13767 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13768 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13769 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13770 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13771 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13772 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13773 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13774 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13775 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13776 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13777 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13778 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13779 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13780 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13781 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13782 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13783 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13784 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13785 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13786 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13787 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13788 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13789 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13790 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13791 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13792 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13793 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13794 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13795 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13796 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13797 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13798 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13799 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13800 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13801 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13802 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13803 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13804 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13805 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13806 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13807 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13808 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13809 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13810 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013811 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013812 .np = 3,
13813 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013814 },
13815};
13816
13817static struct cipher_testvec cast6_xts_enc_tv_template[] = {
13818 { /* Generated from TF test vectors */
13819 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13820 "\x23\x53\x60\x28\x74\x71\x35\x26"
13821 "\x62\x49\x77\x57\x24\x70\x93\x69"
13822 "\x99\x59\x57\x49\x66\x96\x76\x27"
13823 "\x31\x41\x59\x26\x53\x58\x97\x93"
13824 "\x23\x84\x62\x64\x33\x83\x27\x95"
13825 "\x02\x88\x41\x97\x16\x93\x99\x37"
13826 "\x51\x05\x82\x09\x74\x94\x45\x92",
13827 .klen = 64,
13828 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13829 "\x00\x00\x00\x00\x00\x00\x00\x00",
13830 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13831 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13832 "\x10\x11\x12\x13\x14\x15\x16\x17"
13833 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13834 "\x20\x21\x22\x23\x24\x25\x26\x27"
13835 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13836 "\x30\x31\x32\x33\x34\x35\x36\x37"
13837 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13838 "\x40\x41\x42\x43\x44\x45\x46\x47"
13839 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13840 "\x50\x51\x52\x53\x54\x55\x56\x57"
13841 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13842 "\x60\x61\x62\x63\x64\x65\x66\x67"
13843 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13844 "\x70\x71\x72\x73\x74\x75\x76\x77"
13845 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13846 "\x80\x81\x82\x83\x84\x85\x86\x87"
13847 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13848 "\x90\x91\x92\x93\x94\x95\x96\x97"
13849 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13850 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13851 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13852 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13853 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13854 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13855 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13856 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13857 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13858 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13859 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13860 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13861 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
13862 "\x00\x01\x02\x03\x04\x05\x06\x07"
13863 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13864 "\x10\x11\x12\x13\x14\x15\x16\x17"
13865 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13866 "\x20\x21\x22\x23\x24\x25\x26\x27"
13867 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13868 "\x30\x31\x32\x33\x34\x35\x36\x37"
13869 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13870 "\x40\x41\x42\x43\x44\x45\x46\x47"
13871 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13872 "\x50\x51\x52\x53\x54\x55\x56\x57"
13873 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13874 "\x60\x61\x62\x63\x64\x65\x66\x67"
13875 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13876 "\x70\x71\x72\x73\x74\x75\x76\x77"
13877 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13878 "\x80\x81\x82\x83\x84\x85\x86\x87"
13879 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13880 "\x90\x91\x92\x93\x94\x95\x96\x97"
13881 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13882 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13883 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13884 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13885 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13886 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13887 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13888 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13889 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13890 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13891 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13892 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13893 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
13894 .ilen = 512,
13895 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13896 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13897 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13898 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13899 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13900 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13901 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13902 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13903 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13904 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13905 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13906 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13907 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13908 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13909 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13910 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13911 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13912 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13913 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13914 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13915 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
13916 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
13917 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
13918 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
13919 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
13920 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
13921 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
13922 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
13923 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
13924 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
13925 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
13926 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
13927 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
13928 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
13929 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
13930 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
13931 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
13932 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
13933 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
13934 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
13935 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
13936 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
13937 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
13938 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
13939 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
13940 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
13941 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
13942 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
13943 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
13944 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
13945 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
13946 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
13947 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
13948 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
13949 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
13950 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
13951 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
13952 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
13953 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
13954 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
13955 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
13956 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
13957 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
13958 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
13959 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013960 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013961 .np = 3,
13962 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013963 },
13964};
13965
13966static struct cipher_testvec cast6_xts_dec_tv_template[] = {
13967 { /* Generated from TF test vectors */
13968 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13969 "\x23\x53\x60\x28\x74\x71\x35\x26"
13970 "\x62\x49\x77\x57\x24\x70\x93\x69"
13971 "\x99\x59\x57\x49\x66\x96\x76\x27"
13972 "\x31\x41\x59\x26\x53\x58\x97\x93"
13973 "\x23\x84\x62\x64\x33\x83\x27\x95"
13974 "\x02\x88\x41\x97\x16\x93\x99\x37"
13975 "\x51\x05\x82\x09\x74\x94\x45\x92",
13976 .klen = 64,
13977 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13978 "\x00\x00\x00\x00\x00\x00\x00\x00",
13979 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13980 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13981 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13982 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13983 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13984 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13985 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13986 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13987 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13988 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13989 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13990 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13991 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13992 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13993 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13994 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13995 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13996 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13997 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13998 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13999 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
14000 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
14001 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
14002 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
14003 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
14004 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
14005 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
14006 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
14007 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
14008 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
14009 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
14010 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
14011 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
14012 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
14013 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
14014 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
14015 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
14016 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
14017 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
14018 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
14019 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
14020 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
14021 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
14022 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
14023 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
14024 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
14025 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
14026 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
14027 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
14028 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
14029 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
14030 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
14031 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
14032 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
14033 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
14034 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
14035 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
14036 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
14037 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
14038 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
14039 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
14040 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
14041 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
14042 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
14043 .ilen = 512,
14044 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14045 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14046 "\x10\x11\x12\x13\x14\x15\x16\x17"
14047 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14048 "\x20\x21\x22\x23\x24\x25\x26\x27"
14049 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14050 "\x30\x31\x32\x33\x34\x35\x36\x37"
14051 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14052 "\x40\x41\x42\x43\x44\x45\x46\x47"
14053 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14054 "\x50\x51\x52\x53\x54\x55\x56\x57"
14055 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14056 "\x60\x61\x62\x63\x64\x65\x66\x67"
14057 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14058 "\x70\x71\x72\x73\x74\x75\x76\x77"
14059 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14060 "\x80\x81\x82\x83\x84\x85\x86\x87"
14061 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14062 "\x90\x91\x92\x93\x94\x95\x96\x97"
14063 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14064 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14065 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14066 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14067 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14068 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14069 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14070 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14071 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14072 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14073 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14074 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14075 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
14076 "\x00\x01\x02\x03\x04\x05\x06\x07"
14077 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14078 "\x10\x11\x12\x13\x14\x15\x16\x17"
14079 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14080 "\x20\x21\x22\x23\x24\x25\x26\x27"
14081 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14082 "\x30\x31\x32\x33\x34\x35\x36\x37"
14083 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14084 "\x40\x41\x42\x43\x44\x45\x46\x47"
14085 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14086 "\x50\x51\x52\x53\x54\x55\x56\x57"
14087 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14088 "\x60\x61\x62\x63\x64\x65\x66\x67"
14089 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14090 "\x70\x71\x72\x73\x74\x75\x76\x77"
14091 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14092 "\x80\x81\x82\x83\x84\x85\x86\x87"
14093 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14094 "\x90\x91\x92\x93\x94\x95\x96\x97"
14095 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14096 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14097 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14098 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14099 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14100 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14101 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14102 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14103 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14104 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14105 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14106 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14107 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
14108 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014109 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014110 .np = 3,
14111 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014112 },
14113};
14114
14115
14116/*
14117 * AES test vectors.
14118 */
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014119#define AES_ENC_TEST_VECTORS 4
14120#define AES_DEC_TEST_VECTORS 4
14121#define AES_CBC_ENC_TEST_VECTORS 5
14122#define AES_CBC_DEC_TEST_VECTORS 5
Horia Geantabca4feb2014-03-14 17:46:51 +020014123#define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
14124#define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
Nitesh Lal5208ed22014-05-21 17:09:08 +053014125#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2
14126#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2
14127#define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7
14128#define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7
14129#define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7
Herbert Xuda7f0332008-07-31 17:08:25 +080014130#define AES_LRW_ENC_TEST_VECTORS 8
14131#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +100014132#define AES_XTS_ENC_TEST_VECTORS 5
14133#define AES_XTS_DEC_TEST_VECTORS 5
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014134#define AES_CTR_ENC_TEST_VECTORS 5
14135#define AES_CTR_DEC_TEST_VECTORS 5
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100014136#define AES_OFB_ENC_TEST_VECTORS 1
14137#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080014138#define AES_CTR_3686_ENC_TEST_VECTORS 7
14139#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +080014140#define AES_GCM_ENC_TEST_VECTORS 9
14141#define AES_GCM_DEC_TEST_VECTORS 8
Herbert Xu8f69b762015-06-16 13:54:26 +080014142#define AES_GCM_4106_ENC_TEST_VECTORS 23
14143#define AES_GCM_4106_DEC_TEST_VECTORS 23
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030014144#define AES_GCM_4543_ENC_TEST_VECTORS 1
14145#define AES_GCM_4543_DEC_TEST_VECTORS 2
Ard Biesheuvel45859882014-04-16 20:40:04 +080014146#define AES_CCM_ENC_TEST_VECTORS 8
Herbert Xuda7f0332008-07-31 17:08:25 +080014147#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +080014148#define AES_CCM_4309_ENC_TEST_VECTORS 7
14149#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +080014150
14151static struct cipher_testvec aes_enc_tv_template[] = {
14152 { /* From FIPS-197 */
14153 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14154 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14155 .klen = 16,
14156 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14157 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14158 .ilen = 16,
14159 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14160 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14161 .rlen = 16,
14162 }, {
14163 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14164 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14165 "\x10\x11\x12\x13\x14\x15\x16\x17",
14166 .klen = 24,
14167 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14168 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14169 .ilen = 16,
14170 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14171 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14172 .rlen = 16,
14173 }, {
14174 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14175 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14176 "\x10\x11\x12\x13\x14\x15\x16\x17"
14177 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14178 .klen = 32,
14179 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14180 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14181 .ilen = 16,
14182 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14183 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14184 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014185 }, { /* Generated with Crypto++ */
14186 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14187 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14188 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14189 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14190 .klen = 32,
14191 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14192 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14193 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14194 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14195 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14196 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14197 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14198 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14199 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14200 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14201 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14202 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14203 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14204 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14205 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14206 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14207 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14208 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14209 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14210 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14211 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14212 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14213 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14214 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14215 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14216 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14217 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14218 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14219 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14220 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14221 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14222 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14223 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14224 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14225 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14226 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14227 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14228 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14229 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14230 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14231 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14232 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14233 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14234 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14235 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14236 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14237 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14238 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14239 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14240 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14241 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14242 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14243 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14244 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14245 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14246 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14247 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14248 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14249 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14250 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14251 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14252 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14253 .ilen = 496,
14254 .result = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14255 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14256 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14257 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14258 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14259 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14260 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14261 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14262 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14263 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14264 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14265 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14266 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14267 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14268 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14269 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14270 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14271 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14272 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14273 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14274 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14275 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14276 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14277 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14278 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14279 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14280 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14281 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14282 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14283 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14284 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14285 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14286 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14287 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14288 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14289 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14290 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14291 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14292 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14293 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14294 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14295 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14296 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14297 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14298 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14299 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14300 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14301 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14302 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14303 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14304 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14305 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14306 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14307 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14308 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14309 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14310 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14311 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14312 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14313 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14314 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14315 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14316 .rlen = 496,
14317 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014318 .np = 3,
14319 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014320 },
14321};
14322
14323static struct cipher_testvec aes_dec_tv_template[] = {
14324 { /* From FIPS-197 */
14325 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14326 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14327 .klen = 16,
14328 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14329 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14330 .ilen = 16,
14331 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14332 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14333 .rlen = 16,
14334 }, {
14335 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14336 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14337 "\x10\x11\x12\x13\x14\x15\x16\x17",
14338 .klen = 24,
14339 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14340 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14341 .ilen = 16,
14342 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14343 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14344 .rlen = 16,
14345 }, {
14346 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14347 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14348 "\x10\x11\x12\x13\x14\x15\x16\x17"
14349 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14350 .klen = 32,
14351 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14352 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14353 .ilen = 16,
14354 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14355 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14356 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014357 }, { /* Generated with Crypto++ */
14358 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14359 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14360 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14361 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14362 .klen = 32,
14363 .input = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14364 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14365 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14366 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14367 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14368 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14369 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14370 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14371 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14372 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14373 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14374 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14375 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14376 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14377 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14378 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14379 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14380 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14381 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14382 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14383 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14384 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14385 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14386 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14387 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14388 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14389 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14390 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14391 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14392 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14393 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14394 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14395 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14396 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14397 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14398 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14399 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14400 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14401 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14402 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14403 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14404 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14405 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14406 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14407 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14408 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14409 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14410 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14411 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14412 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14413 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14414 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14415 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14416 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14417 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14418 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14419 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14420 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14421 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14422 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14423 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14424 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14425 .ilen = 496,
14426 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14427 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14428 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14429 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14430 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14431 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14432 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14433 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14434 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14435 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14436 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14437 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14438 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14439 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14440 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14441 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14442 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14443 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14444 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14445 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14446 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14447 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14448 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14449 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14450 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14451 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14452 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14453 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14454 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14455 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14456 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14457 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14458 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14459 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14460 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14461 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14462 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14463 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14464 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14465 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14466 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14467 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14468 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14469 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14470 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14471 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14472 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14473 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14474 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14475 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14476 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14477 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14478 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14479 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14480 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14481 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14482 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14483 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14484 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14485 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14486 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14487 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14488 .rlen = 496,
14489 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014490 .np = 3,
14491 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014492 },
14493};
14494
14495static struct cipher_testvec aes_cbc_enc_tv_template[] = {
14496 { /* From RFC 3602 */
14497 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14498 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14499 .klen = 16,
14500 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14501 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14502 .input = "Single block msg",
14503 .ilen = 16,
14504 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14505 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14506 .rlen = 16,
14507 }, {
14508 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14509 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14510 .klen = 16,
14511 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14512 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14513 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14514 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14515 "\x10\x11\x12\x13\x14\x15\x16\x17"
14516 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14517 .ilen = 32,
14518 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14519 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14520 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14521 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14522 .rlen = 32,
14523 }, { /* From NIST SP800-38A */
14524 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14525 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14526 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14527 .klen = 24,
14528 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14529 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14530 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14531 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14532 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14533 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14534 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14535 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14536 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14537 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14538 .ilen = 64,
14539 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14540 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14541 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14542 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14543 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14544 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14545 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14546 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14547 .rlen = 64,
14548 }, {
14549 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14550 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14551 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14552 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14553 .klen = 32,
14554 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14555 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14556 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14557 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14558 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14559 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14560 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14561 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14562 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14563 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14564 .ilen = 64,
14565 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14566 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14567 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14568 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14569 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14570 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14571 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14572 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14573 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014574 }, { /* Generated with Crypto++ */
14575 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14576 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14577 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14578 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14579 .klen = 32,
14580 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14581 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14582 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14583 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14584 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14585 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14586 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14587 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14588 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14589 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14590 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14591 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14592 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14593 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14594 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14595 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14596 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14597 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14598 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14599 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14600 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14601 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14602 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14603 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14604 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14605 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14606 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14607 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14608 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14609 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14610 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14611 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14612 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14613 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14614 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14615 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14616 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14617 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14618 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14619 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14620 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14621 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14622 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14623 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14624 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14625 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14626 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14627 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14628 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14629 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14630 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14631 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14632 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14633 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14634 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14635 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14636 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14637 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14638 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14639 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14640 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14641 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14642 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14643 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14644 .ilen = 496,
14645 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14646 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14647 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14648 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14649 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14650 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14651 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14652 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14653 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14654 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14655 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14656 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14657 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14658 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14659 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14660 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14661 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14662 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14663 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14664 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14665 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14666 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14667 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14668 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14669 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14670 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14671 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14672 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14673 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14674 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14675 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14676 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14677 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14678 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14679 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14680 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14681 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14682 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14683 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14684 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14685 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14686 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14687 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14688 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14689 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14690 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14691 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14692 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14693 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14694 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14695 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14696 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14697 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14698 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14699 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14700 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14701 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14702 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14703 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14704 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14705 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14706 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14707 .rlen = 496,
14708 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014709 .np = 3,
14710 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014711 },
14712};
14713
14714static struct cipher_testvec aes_cbc_dec_tv_template[] = {
14715 { /* From RFC 3602 */
14716 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14717 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14718 .klen = 16,
14719 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14720 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14721 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14722 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14723 .ilen = 16,
14724 .result = "Single block msg",
14725 .rlen = 16,
14726 }, {
14727 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14728 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14729 .klen = 16,
14730 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14731 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14732 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14733 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14734 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14735 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14736 .ilen = 32,
14737 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14738 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14739 "\x10\x11\x12\x13\x14\x15\x16\x17"
14740 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14741 .rlen = 32,
14742 }, { /* From NIST SP800-38A */
14743 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14744 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14745 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14746 .klen = 24,
14747 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14748 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14749 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14750 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14751 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14752 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14753 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14754 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14755 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14756 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14757 .ilen = 64,
14758 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14759 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14760 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14761 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14762 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14763 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14764 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14765 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14766 .rlen = 64,
14767 }, {
14768 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14769 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14770 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14771 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14772 .klen = 32,
14773 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14774 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14775 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14776 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14777 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14778 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14779 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14780 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14781 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14782 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14783 .ilen = 64,
14784 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14785 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14786 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14787 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14788 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14789 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14790 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14791 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14792 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014793 }, { /* Generated with Crypto++ */
14794 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14795 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14796 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14797 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14798 .klen = 32,
14799 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14800 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14801 .input = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14802 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14803 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14804 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14805 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14806 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14807 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14808 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14809 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14810 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14811 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14812 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14813 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14814 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14815 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14816 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14817 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14818 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14819 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14820 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14821 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14822 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14823 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14824 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14825 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14826 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14827 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14828 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14829 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14830 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14831 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14832 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14833 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14834 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14835 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14836 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14837 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14838 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14839 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14840 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14841 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14842 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14843 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14844 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14845 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14846 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14847 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14848 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14849 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14850 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14851 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14852 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14853 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14854 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14855 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14856 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14857 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14858 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14859 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14860 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14861 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14862 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14863 .ilen = 496,
14864 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14865 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14866 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14867 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14868 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14869 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14870 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14871 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14872 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14873 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14874 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14875 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14876 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14877 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14878 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14879 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14880 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14881 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14882 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14883 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14884 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14885 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14886 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14887 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14888 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14889 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14890 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14891 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14892 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14893 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14894 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14895 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14896 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14897 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14898 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14899 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14900 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14901 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14902 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14903 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14904 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14905 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14906 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14907 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14908 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14909 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14910 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14911 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14912 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14913 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14914 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14915 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14916 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14917 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14918 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14919 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14920 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14921 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14922 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14923 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14924 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14925 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14926 .rlen = 496,
14927 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014928 .np = 3,
14929 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014930 },
14931};
14932
Horia Geantabca4feb2014-03-14 17:46:51 +020014933static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
14934 { /* Input data from RFC 2410 Case 1 */
14935#ifdef __LITTLE_ENDIAN
14936 .key = "\x08\x00" /* rta length */
14937 "\x01\x00" /* rta type */
14938#else
14939 .key = "\x00\x08" /* rta length */
14940 "\x00\x01" /* rta type */
14941#endif
14942 "\x00\x00\x00\x00" /* enc key length */
14943 "\x00\x00\x00\x00\x00\x00\x00\x00"
14944 "\x00\x00\x00\x00\x00\x00\x00\x00",
14945 .klen = 8 + 16 + 0,
14946 .iv = "",
14947 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14948 .ilen = 8,
14949 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14950 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14951 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14952 .rlen = 8 + 16,
14953 }, { /* Input data from RFC 2410 Case 2 */
14954#ifdef __LITTLE_ENDIAN
14955 .key = "\x08\x00" /* rta length */
14956 "\x01\x00" /* rta type */
14957#else
14958 .key = "\x00\x08" /* rta length */
14959 "\x00\x01" /* rta type */
14960#endif
14961 "\x00\x00\x00\x00" /* enc key length */
14962 "\x00\x00\x00\x00\x00\x00\x00\x00"
14963 "\x00\x00\x00\x00\x00\x00\x00\x00",
14964 .klen = 8 + 16 + 0,
14965 .iv = "",
14966 .input = "Network Security People Have A Strange Sense Of Humor",
14967 .ilen = 53,
14968 .result = "Network Security People Have A Strange Sense Of Humor"
14969 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
14970 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
14971 .rlen = 53 + 16,
14972 },
14973};
14974
14975static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
14976 {
14977#ifdef __LITTLE_ENDIAN
14978 .key = "\x08\x00" /* rta length */
14979 "\x01\x00" /* rta type */
14980#else
14981 .key = "\x00\x08" /* rta length */
14982 "\x00\x01" /* rta type */
14983#endif
14984 "\x00\x00\x00\x00" /* enc key length */
14985 "\x00\x00\x00\x00\x00\x00\x00\x00"
14986 "\x00\x00\x00\x00\x00\x00\x00\x00",
14987 .klen = 8 + 16 + 0,
14988 .iv = "",
14989 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14990 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14991 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14992 .ilen = 8 + 16,
14993 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14994 .rlen = 8,
14995 }, {
14996#ifdef __LITTLE_ENDIAN
14997 .key = "\x08\x00" /* rta length */
14998 "\x01\x00" /* rta type */
14999#else
15000 .key = "\x00\x08" /* rta length */
15001 "\x00\x01" /* rta type */
15002#endif
15003 "\x00\x00\x00\x00" /* enc key length */
15004 "\x00\x00\x00\x00\x00\x00\x00\x00"
15005 "\x00\x00\x00\x00\x00\x00\x00\x00",
15006 .klen = 8 + 16 + 0,
15007 .iv = "",
15008 .input = "Network Security People Have A Strange Sense Of Humor"
15009 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
15010 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
15011 .ilen = 53 + 16,
15012 .result = "Network Security People Have A Strange Sense Of Humor",
15013 .rlen = 53,
15014 },
15015};
15016
Nitesh Lal5208ed22014-05-21 17:09:08 +053015017static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015018 { /* RFC 3602 Case 1 */
15019#ifdef __LITTLE_ENDIAN
15020 .key = "\x08\x00" /* rta length */
15021 "\x01\x00" /* rta type */
15022#else
15023 .key = "\x00\x08" /* rta length */
15024 "\x00\x01" /* rta type */
15025#endif
15026 "\x00\x00\x00\x10" /* enc key length */
15027 "\x00\x00\x00\x00\x00\x00\x00\x00"
15028 "\x00\x00\x00\x00\x00\x00\x00\x00"
15029 "\x00\x00\x00\x00"
15030 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15031 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15032 .klen = 8 + 20 + 16,
15033 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15034 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15035 .input = "Single block msg",
15036 .ilen = 16,
15037 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15038 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15039 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
15040 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
15041 "\x03\x71\xa2\x06",
15042 .rlen = 16 + 20,
15043 }, { /* RFC 3602 Case 2 */
15044#ifdef __LITTLE_ENDIAN
15045 .key = "\x08\x00" /* rta length */
15046 "\x01\x00" /* rta type */
15047#else
15048 .key = "\x00\x08" /* rta length */
15049 "\x00\x01" /* rta type */
15050#endif
15051 "\x00\x00\x00\x10" /* enc key length */
15052 "\x20\x21\x22\x23\x24\x25\x26\x27"
15053 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15054 "\x30\x31\x32\x33"
15055 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15056 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15057 .klen = 8 + 20 + 16,
15058 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15059 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15060 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15061 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15062 "\x10\x11\x12\x13\x14\x15\x16\x17"
15063 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15064 .ilen = 32,
15065 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15066 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15067 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15068 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15069 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
15070 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
15071 "\x65\x39\xf8\xde",
15072 .rlen = 32 + 20,
15073 }, { /* RFC 3602 Case 3 */
15074#ifdef __LITTLE_ENDIAN
15075 .key = "\x08\x00" /* rta length */
15076 "\x01\x00" /* rta type */
15077#else
15078 .key = "\x00\x08" /* rta length */
15079 "\x00\x01" /* rta type */
15080#endif
15081 "\x00\x00\x00\x10" /* enc key length */
15082 "\x11\x22\x33\x44\x55\x66\x77\x88"
15083 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15084 "\x22\x33\x44\x55"
15085 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15086 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15087 .klen = 8 + 20 + 16,
15088 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15089 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15090 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15091 .ilen = 48,
15092 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15093 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15094 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15095 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15096 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15097 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15098 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
15099 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
15100 "\x8d\x62\xf2\x1e",
15101 .rlen = 48 + 20,
15102 }, { /* RFC 3602 Case 4 */
15103#ifdef __LITTLE_ENDIAN
15104 .key = "\x08\x00" /* rta length */
15105 "\x01\x00" /* rta type */
15106#else
15107 .key = "\x00\x08" /* rta length */
15108 "\x00\x01" /* rta type */
15109#endif
15110 "\x00\x00\x00\x10" /* enc key length */
15111 "\x11\x22\x33\x44\x55\x66\x77\x88"
15112 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15113 "\x22\x33\x44\x55"
15114 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15115 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15116 .klen = 8 + 20 + 16,
15117 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15118 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15119 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15120 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15121 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15122 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15123 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15124 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15125 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15126 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15127 .ilen = 64,
15128 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15129 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15130 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15131 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15132 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15133 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15134 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15135 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15136 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
15137 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
15138 "\x1d\xbe\xc6\xe9",
15139 .rlen = 64 + 20,
15140 }, { /* RFC 3602 Case 5 */
15141#ifdef __LITTLE_ENDIAN
15142 .key = "\x08\x00" /* rta length */
15143 "\x01\x00" /* rta type */
15144#else
15145 .key = "\x00\x08" /* rta length */
15146 "\x00\x01" /* rta type */
15147#endif
15148 "\x00\x00\x00\x10" /* enc key length */
15149 "\x11\x22\x33\x44\x55\x66\x77\x88"
15150 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15151 "\x22\x33\x44\x55"
15152 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15153 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15154 .klen = 8 + 20 + 16,
15155 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15156 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15157 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15158 .alen = 8,
15159 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15160 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15161 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15162 "\x10\x11\x12\x13\x14\x15\x16\x17"
15163 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15164 "\x20\x21\x22\x23\x24\x25\x26\x27"
15165 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15166 "\x30\x31\x32\x33\x34\x35\x36\x37"
15167 "\x01\x02\x03\x04\x05\x06\x07\x08"
15168 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15169 .ilen = 80,
15170 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15171 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15172 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15173 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15174 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15175 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15176 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15177 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15178 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15179 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15180 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
15181 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
15182 "\x85\xe1\x59\xf7",
15183 .rlen = 80 + 20,
15184 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15185#ifdef __LITTLE_ENDIAN
15186 .key = "\x08\x00" /* rta length */
15187 "\x01\x00" /* rta type */
15188#else
15189 .key = "\x00\x08" /* rta length */
15190 "\x00\x01" /* rta type */
15191#endif
15192 "\x00\x00\x00\x18" /* enc key length */
15193 "\x11\x22\x33\x44\x55\x66\x77\x88"
15194 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15195 "\x22\x33\x44\x55"
15196 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15197 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15198 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15199 .klen = 8 + 20 + 24,
15200 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15201 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15202 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15203 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15204 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15205 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15206 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15207 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15208 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15209 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15210 .ilen = 64,
15211 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15212 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15213 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15214 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15215 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15216 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15217 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15218 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15219 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
15220 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
15221 "\x47\x4c\xfc\x36",
15222 .rlen = 64 + 20,
15223 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15224#ifdef __LITTLE_ENDIAN
15225 .key = "\x08\x00" /* rta length */
15226 "\x01\x00" /* rta type */
15227#else
15228 .key = "\x00\x08" /* rta length */
15229 "\x00\x01" /* rta type */
15230#endif
15231 "\x00\x00\x00\x20" /* enc key length */
15232 "\x11\x22\x33\x44\x55\x66\x77\x88"
15233 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15234 "\x22\x33\x44\x55"
15235 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15236 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15237 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15238 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15239 .klen = 8 + 20 + 32,
15240 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15241 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15242 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15243 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15244 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15245 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15246 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15247 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15248 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15249 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15250 .ilen = 64,
15251 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15252 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15253 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15254 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15255 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15256 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15257 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15258 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15259 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
15260 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
15261 "\x51\xee\xd6\x4e",
15262 .rlen = 64 + 20,
15263 },
15264};
15265
Nitesh Lal5208ed22014-05-21 17:09:08 +053015266static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015267 { /* Input data from RFC 2410 Case 1 */
15268#ifdef __LITTLE_ENDIAN
15269 .key = "\x08\x00" /* rta length */
15270 "\x01\x00" /* rta type */
15271#else
15272 .key = "\x00\x08" /* rta length */
15273 "\x00\x01" /* rta type */
15274#endif
15275 "\x00\x00\x00\x00" /* enc key length */
15276 "\x00\x00\x00\x00\x00\x00\x00\x00"
15277 "\x00\x00\x00\x00\x00\x00\x00\x00"
15278 "\x00\x00\x00\x00",
15279 .klen = 8 + 20 + 0,
15280 .iv = "",
15281 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15282 .ilen = 8,
15283 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15284 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15285 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15286 "\x8c\x5e\xe4\x08",
15287 .rlen = 8 + 20,
15288 }, { /* Input data from RFC 2410 Case 2 */
15289#ifdef __LITTLE_ENDIAN
15290 .key = "\x08\x00" /* rta length */
15291 "\x01\x00" /* rta type */
15292#else
15293 .key = "\x00\x08" /* rta length */
15294 "\x00\x01" /* rta type */
15295#endif
15296 "\x00\x00\x00\x00" /* enc key length */
15297 "\x00\x00\x00\x00\x00\x00\x00\x00"
15298 "\x00\x00\x00\x00\x00\x00\x00\x00"
15299 "\x00\x00\x00\x00",
15300 .klen = 8 + 20 + 0,
15301 .iv = "",
15302 .input = "Network Security People Have A Strange Sense Of Humor",
15303 .ilen = 53,
15304 .result = "Network Security People Have A Strange Sense Of Humor"
15305 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15306 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15307 "\x91\x56\xe4\xd6",
15308 .rlen = 53 + 20,
15309 },
15310};
15311
Nitesh Lal5208ed22014-05-21 17:09:08 +053015312static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015313 {
15314#ifdef __LITTLE_ENDIAN
15315 .key = "\x08\x00" /* rta length */
15316 "\x01\x00" /* rta type */
15317#else
15318 .key = "\x00\x08" /* rta length */
15319 "\x00\x01" /* rta type */
15320#endif
15321 "\x00\x00\x00\x00" /* enc key length */
15322 "\x00\x00\x00\x00\x00\x00\x00\x00"
15323 "\x00\x00\x00\x00\x00\x00\x00\x00"
15324 "\x00\x00\x00\x00",
15325 .klen = 8 + 20 + 0,
15326 .iv = "",
15327 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15328 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15329 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15330 "\x8c\x5e\xe4\x08",
15331 .ilen = 8 + 20,
15332 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15333 .rlen = 8,
15334 }, {
15335#ifdef __LITTLE_ENDIAN
15336 .key = "\x08\x00" /* rta length */
15337 "\x01\x00" /* rta type */
15338#else
15339 .key = "\x00\x08" /* rta length */
15340 "\x00\x01" /* rta type */
15341#endif
15342 "\x00\x00\x00\x00" /* enc key length */
15343 "\x00\x00\x00\x00\x00\x00\x00\x00"
15344 "\x00\x00\x00\x00\x00\x00\x00\x00"
15345 "\x00\x00\x00\x00",
15346 .klen = 8 + 20 + 0,
15347 .iv = "",
15348 .input = "Network Security People Have A Strange Sense Of Humor"
15349 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15350 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15351 "\x91\x56\xe4\xd6",
15352 .ilen = 53 + 20,
15353 .result = "Network Security People Have A Strange Sense Of Humor",
15354 .rlen = 53,
15355 },
15356};
15357
Nitesh Lal5208ed22014-05-21 17:09:08 +053015358static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015359 { /* RFC 3602 Case 1 */
15360#ifdef __LITTLE_ENDIAN
15361 .key = "\x08\x00" /* rta length */
15362 "\x01\x00" /* rta type */
15363#else
15364 .key = "\x00\x08" /* rta length */
15365 "\x00\x01" /* rta type */
15366#endif
15367 "\x00\x00\x00\x10" /* enc key length */
15368 "\x00\x00\x00\x00\x00\x00\x00\x00"
15369 "\x00\x00\x00\x00\x00\x00\x00\x00"
15370 "\x00\x00\x00\x00\x00\x00\x00\x00"
15371 "\x00\x00\x00\x00\x00\x00\x00\x00"
15372 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15373 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15374 .klen = 8 + 32 + 16,
15375 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15376 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15377 .input = "Single block msg",
15378 .ilen = 16,
15379 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15380 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15381 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
15382 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
15383 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
15384 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
15385 .rlen = 16 + 32,
15386 }, { /* RFC 3602 Case 2 */
15387#ifdef __LITTLE_ENDIAN
15388 .key = "\x08\x00" /* rta length */
15389 "\x01\x00" /* rta type */
15390#else
15391 .key = "\x00\x08" /* rta length */
15392 "\x00\x01" /* rta type */
15393#endif
15394 "\x00\x00\x00\x10" /* enc key length */
15395 "\x20\x21\x22\x23\x24\x25\x26\x27"
15396 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15397 "\x30\x31\x32\x33\x34\x35\x36\x37"
15398 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15399 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15400 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15401 .klen = 8 + 32 + 16,
15402 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15403 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15404 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15405 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15406 "\x10\x11\x12\x13\x14\x15\x16\x17"
15407 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15408 .ilen = 32,
15409 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15410 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15411 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15412 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15413 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
15414 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
15415 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
15416 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
15417 .rlen = 32 + 32,
15418 }, { /* RFC 3602 Case 3 */
15419#ifdef __LITTLE_ENDIAN
15420 .key = "\x08\x00" /* rta length */
15421 "\x01\x00" /* rta type */
15422#else
15423 .key = "\x00\x08" /* rta length */
15424 "\x00\x01" /* rta type */
15425#endif
15426 "\x00\x00\x00\x10" /* enc key length */
15427 "\x11\x22\x33\x44\x55\x66\x77\x88"
15428 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15429 "\x22\x33\x44\x55\x66\x77\x88\x99"
15430 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15431 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15432 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15433 .klen = 8 + 32 + 16,
15434 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15435 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15436 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15437 .ilen = 48,
15438 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15439 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15440 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15441 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15442 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15443 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15444 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
15445 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
15446 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
15447 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
15448 .rlen = 48 + 32,
15449 }, { /* RFC 3602 Case 4 */
15450#ifdef __LITTLE_ENDIAN
15451 .key = "\x08\x00" /* rta length */
15452 "\x01\x00" /* rta type */
15453#else
15454 .key = "\x00\x08" /* rta length */
15455 "\x00\x01" /* rta type */
15456#endif
15457 "\x00\x00\x00\x10" /* enc key length */
15458 "\x11\x22\x33\x44\x55\x66\x77\x88"
15459 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15460 "\x22\x33\x44\x55\x66\x77\x88\x99"
15461 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15462 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15463 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15464 .klen = 8 + 32 + 16,
15465 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15466 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15467 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15468 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15469 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15470 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15471 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15472 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15473 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15474 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15475 .ilen = 64,
15476 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15477 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15478 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15479 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15480 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15481 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15482 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15483 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15484 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
15485 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
15486 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
15487 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
15488 .rlen = 64 + 32,
15489 }, { /* RFC 3602 Case 5 */
15490#ifdef __LITTLE_ENDIAN
15491 .key = "\x08\x00" /* rta length */
15492 "\x01\x00" /* rta type */
15493#else
15494 .key = "\x00\x08" /* rta length */
15495 "\x00\x01" /* rta type */
15496#endif
15497 "\x00\x00\x00\x10" /* enc key length */
15498 "\x11\x22\x33\x44\x55\x66\x77\x88"
15499 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15500 "\x22\x33\x44\x55\x66\x77\x88\x99"
15501 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15502 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15503 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15504 .klen = 8 + 32 + 16,
15505 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15506 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15507 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15508 .alen = 8,
15509 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15510 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15511 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15512 "\x10\x11\x12\x13\x14\x15\x16\x17"
15513 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15514 "\x20\x21\x22\x23\x24\x25\x26\x27"
15515 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15516 "\x30\x31\x32\x33\x34\x35\x36\x37"
15517 "\x01\x02\x03\x04\x05\x06\x07\x08"
15518 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15519 .ilen = 80,
15520 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15521 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15522 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15523 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15524 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15525 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15526 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15527 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15528 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15529 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15530 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
15531 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
15532 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
15533 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
15534 .rlen = 80 + 32,
15535 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15536#ifdef __LITTLE_ENDIAN
15537 .key = "\x08\x00" /* rta length */
15538 "\x01\x00" /* rta type */
15539#else
15540 .key = "\x00\x08" /* rta length */
15541 "\x00\x01" /* rta type */
15542#endif
15543 "\x00\x00\x00\x18" /* enc key length */
15544 "\x11\x22\x33\x44\x55\x66\x77\x88"
15545 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15546 "\x22\x33\x44\x55\x66\x77\x88\x99"
15547 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15548 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15549 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15550 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15551 .klen = 8 + 32 + 24,
15552 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15553 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15554 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15555 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15556 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15557 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15558 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15559 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15560 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15561 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15562 .ilen = 64,
15563 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15564 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15565 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15566 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15567 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15568 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15569 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15570 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15571 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
15572 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
15573 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
15574 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
15575 .rlen = 64 + 32,
15576 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15577#ifdef __LITTLE_ENDIAN
15578 .key = "\x08\x00" /* rta length */
15579 "\x01\x00" /* rta type */
15580#else
15581 .key = "\x00\x08" /* rta length */
15582 "\x00\x01" /* rta type */
15583#endif
15584 "\x00\x00\x00\x20" /* enc key length */
15585 "\x11\x22\x33\x44\x55\x66\x77\x88"
15586 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15587 "\x22\x33\x44\x55\x66\x77\x88\x99"
15588 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15589 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15590 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15591 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15592 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15593 .klen = 8 + 32 + 32,
15594 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15595 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15596 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15597 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15598 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15599 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15600 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15601 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15602 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15603 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15604 .ilen = 64,
15605 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15606 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15607 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15608 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15609 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15610 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15611 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15612 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15613 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
15614 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
15615 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
15616 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
15617 .rlen = 64 + 32,
15618 },
15619};
15620
Nitesh Lal5208ed22014-05-21 17:09:08 +053015621static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015622 { /* RFC 3602 Case 1 */
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 "\x00\x00\x00\x00\x00\x00\x00\x00"
15632 "\x00\x00\x00\x00\x00\x00\x00\x00"
15633 "\x00\x00\x00\x00\x00\x00\x00\x00"
15634 "\x00\x00\x00\x00\x00\x00\x00\x00"
15635 "\x00\x00\x00\x00\x00\x00\x00\x00"
15636 "\x00\x00\x00\x00\x00\x00\x00\x00"
15637 "\x00\x00\x00\x00\x00\x00\x00\x00"
15638 "\x00\x00\x00\x00\x00\x00\x00\x00"
15639 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15640 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15641 .klen = 8 + 64 + 16,
15642 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15643 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15644 .input = "Single block msg",
15645 .ilen = 16,
15646 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15647 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15648 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
15649 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
15650 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
15651 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
15652 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
15653 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
15654 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
15655 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
15656 .rlen = 16 + 64,
15657 }, { /* RFC 3602 Case 2 */
15658#ifdef __LITTLE_ENDIAN
15659 .key = "\x08\x00" /* rta length */
15660 "\x01\x00" /* rta type */
15661#else
15662 .key = "\x00\x08" /* rta length */
15663 "\x00\x01" /* rta type */
15664#endif
15665 "\x00\x00\x00\x10" /* enc key length */
15666 "\x20\x21\x22\x23\x24\x25\x26\x27"
15667 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15668 "\x30\x31\x32\x33\x34\x35\x36\x37"
15669 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15670 "\x40\x41\x42\x43\x44\x45\x46\x47"
15671 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15672 "\x50\x51\x52\x53\x54\x55\x56\x57"
15673 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15674 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15675 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15676 .klen = 8 + 64 + 16,
15677 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15678 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15679 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15680 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15681 "\x10\x11\x12\x13\x14\x15\x16\x17"
15682 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15683 .ilen = 32,
15684 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15685 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15686 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15687 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15688 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
15689 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
15690 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
15691 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
15692 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
15693 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
15694 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
15695 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
15696 .rlen = 32 + 64,
15697 }, { /* RFC 3602 Case 3 */
15698#ifdef __LITTLE_ENDIAN
15699 .key = "\x08\x00" /* rta length */
15700 "\x01\x00" /* rta type */
15701#else
15702 .key = "\x00\x08" /* rta length */
15703 "\x00\x01" /* rta type */
15704#endif
15705 "\x00\x00\x00\x10" /* enc key length */
15706 "\x11\x22\x33\x44\x55\x66\x77\x88"
15707 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15708 "\x22\x33\x44\x55\x66\x77\x88\x99"
15709 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15710 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15711 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15712 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15713 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15714 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15715 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15716 .klen = 8 + 64 + 16,
15717 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15718 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15719 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15720 .ilen = 48,
15721 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15722 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15723 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15724 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15725 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15726 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15727 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
15728 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
15729 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
15730 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
15731 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
15732 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
15733 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
15734 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
15735 .rlen = 48 + 64,
15736 }, { /* RFC 3602 Case 4 */
15737#ifdef __LITTLE_ENDIAN
15738 .key = "\x08\x00" /* rta length */
15739 "\x01\x00" /* rta type */
15740#else
15741 .key = "\x00\x08" /* rta length */
15742 "\x00\x01" /* rta type */
15743#endif
15744 "\x00\x00\x00\x10" /* enc key length */
15745 "\x11\x22\x33\x44\x55\x66\x77\x88"
15746 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15747 "\x22\x33\x44\x55\x66\x77\x88\x99"
15748 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15749 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15750 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15751 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15752 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15753 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15754 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15755 .klen = 8 + 64 + 16,
15756 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15757 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15758 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15759 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15760 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15761 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15762 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15763 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15764 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15765 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15766 .ilen = 64,
15767 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15768 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15769 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15770 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15771 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15772 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15773 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15774 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15775 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
15776 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
15777 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
15778 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
15779 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
15780 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
15781 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
15782 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
15783 .rlen = 64 + 64,
15784 }, { /* RFC 3602 Case 5 */
15785#ifdef __LITTLE_ENDIAN
15786 .key = "\x08\x00" /* rta length */
15787 "\x01\x00" /* rta type */
15788#else
15789 .key = "\x00\x08" /* rta length */
15790 "\x00\x01" /* rta type */
15791#endif
15792 "\x00\x00\x00\x10" /* enc key length */
15793 "\x11\x22\x33\x44\x55\x66\x77\x88"
15794 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15795 "\x22\x33\x44\x55\x66\x77\x88\x99"
15796 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15797 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15798 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15799 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15800 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15801 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15802 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15803 .klen = 8 + 64 + 16,
15804 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15805 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15806 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15807 .alen = 8,
15808 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15809 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15810 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15811 "\x10\x11\x12\x13\x14\x15\x16\x17"
15812 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15813 "\x20\x21\x22\x23\x24\x25\x26\x27"
15814 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15815 "\x30\x31\x32\x33\x34\x35\x36\x37"
15816 "\x01\x02\x03\x04\x05\x06\x07\x08"
15817 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15818 .ilen = 80,
15819 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15820 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15821 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15822 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15823 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15824 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15825 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15826 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15827 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15828 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15829 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
15830 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
15831 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
15832 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
15833 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
15834 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
15835 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
15836 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
15837 .rlen = 80 + 64,
15838 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15839#ifdef __LITTLE_ENDIAN
15840 .key = "\x08\x00" /* rta length */
15841 "\x01\x00" /* rta type */
15842#else
15843 .key = "\x00\x08" /* rta length */
15844 "\x00\x01" /* rta type */
15845#endif
15846 "\x00\x00\x00\x18" /* enc key length */
15847 "\x11\x22\x33\x44\x55\x66\x77\x88"
15848 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15849 "\x22\x33\x44\x55\x66\x77\x88\x99"
15850 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15851 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15852 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15853 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15854 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15855 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15856 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15857 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15858 .klen = 8 + 64 + 24,
15859 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15860 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15861 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15862 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15863 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15864 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15865 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15866 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15867 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15868 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15869 .ilen = 64,
15870 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15871 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15872 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15873 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15874 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15875 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15876 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15877 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15878 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
15879 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
15880 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
15881 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
15882 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
15883 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
15884 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
15885 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
15886 .rlen = 64 + 64,
15887 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15888#ifdef __LITTLE_ENDIAN
15889 .key = "\x08\x00" /* rta length */
15890 "\x01\x00" /* rta type */
15891#else
15892 .key = "\x00\x08" /* rta length */
15893 "\x00\x01" /* rta type */
15894#endif
15895 "\x00\x00\x00\x20" /* enc key length */
15896 "\x11\x22\x33\x44\x55\x66\x77\x88"
15897 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15898 "\x22\x33\x44\x55\x66\x77\x88\x99"
15899 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15900 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15901 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15902 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15903 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15904 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15905 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15906 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15907 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15908 .klen = 8 + 64 + 32,
15909 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15910 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15911 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15912 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15913 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15914 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15915 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15916 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15917 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15918 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15919 .ilen = 64,
15920 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15921 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15922 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15923 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15924 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15925 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15926 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15927 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15928 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
15929 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
15930 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
15931 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
15932 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
15933 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
15934 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
15935 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
15936 .rlen = 64 + 64,
15937 },
15938};
15939
Nitesh Lal5208ed22014-05-21 17:09:08 +053015940#define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1
15941
15942static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = {
15943 { /*Generated with cryptopp*/
15944#ifdef __LITTLE_ENDIAN
15945 .key = "\x08\x00" /* rta length */
15946 "\x01\x00" /* rta type */
15947#else
15948 .key = "\x00\x08" /* rta length */
15949 "\x00\x01" /* rta type */
15950#endif
15951 "\x00\x00\x00\x08" /* enc key length */
15952 "\x11\x22\x33\x44\x55\x66\x77\x88"
15953 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15954 "\x22\x33\x44\x55"
15955 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15956 .klen = 8 + 20 + 8,
15957 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15958 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15959 .alen = 8,
15960 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15961 "\x53\x20\x63\x65\x65\x72\x73\x74"
15962 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15963 "\x20\x79\x65\x53\x72\x63\x74\x65"
15964 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15965 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15966 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15967 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15968 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15969 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15970 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15971 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15972 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15973 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15974 "\x63\x65\x65\x72\x73\x74\x54\x20"
15975 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15976 .ilen = 128,
15977 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15978 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15979 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15980 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15981 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15982 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15983 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15984 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15985 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15986 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15987 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15988 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15989 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15990 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15991 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15992 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15993 "\x95\x16\x20\x09\xf5\x95\x19\xfd"
15994 "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa"
15995 "\x5c\x44\xa9\x37",
15996 .rlen = 128 + 20,
15997 },
15998};
15999
16000#define HMAC_SHA224_DES_CBC_ENC_TEST_VEC 1
16001
16002static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = {
16003 { /*Generated with cryptopp*/
16004#ifdef __LITTLE_ENDIAN
16005 .key = "\x08\x00" /* rta length */
16006 "\x01\x00" /* rta type */
16007#else
16008 .key = "\x00\x08" /* rta length */
16009 "\x00\x01" /* rta type */
16010#endif
16011 "\x00\x00\x00\x08" /* enc key length */
16012 "\x11\x22\x33\x44\x55\x66\x77\x88"
16013 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16014 "\x22\x33\x44\x55\x66\x77\x88\x99"
16015 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16016 .klen = 8 + 24 + 8,
16017 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16018 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16019 .alen = 8,
16020 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16021 "\x53\x20\x63\x65\x65\x72\x73\x74"
16022 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16023 "\x20\x79\x65\x53\x72\x63\x74\x65"
16024 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16025 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16026 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16027 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16028 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16029 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16030 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16031 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16032 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16033 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16034 "\x63\x65\x65\x72\x73\x74\x54\x20"
16035 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16036 .ilen = 128,
16037 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16038 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16039 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16040 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16041 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16042 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16043 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16044 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16045 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16046 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16047 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16048 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16049 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16050 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16051 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16052 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16053 "\x9c\x2d\x7e\xee\x20\x34\x55\x0a"
16054 "\xce\xb5\x4e\x64\x53\xe7\xbf\x91"
16055 "\xab\xd4\xd9\xda\xc9\x12\xae\xf7",
16056 .rlen = 128 + 24,
16057 },
16058};
16059
16060#define HMAC_SHA256_DES_CBC_ENC_TEST_VEC 1
16061
16062static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = {
16063 { /*Generated with cryptopp*/
16064#ifdef __LITTLE_ENDIAN
16065 .key = "\x08\x00" /* rta length */
16066 "\x01\x00" /* rta type */
16067#else
16068 .key = "\x00\x08" /* rta length */
16069 "\x00\x01" /* rta type */
16070#endif
16071 "\x00\x00\x00\x08" /* enc key length */
16072 "\x11\x22\x33\x44\x55\x66\x77\x88"
16073 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16074 "\x22\x33\x44\x55\x66\x77\x88\x99"
16075 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16076 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16077 .klen = 8 + 32 + 8,
16078 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16079 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16080 .alen = 8,
16081 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16082 "\x53\x20\x63\x65\x65\x72\x73\x74"
16083 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16084 "\x20\x79\x65\x53\x72\x63\x74\x65"
16085 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16086 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16087 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16088 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16089 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16090 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16091 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16092 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16093 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16094 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16095 "\x63\x65\x65\x72\x73\x74\x54\x20"
16096 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16097 .ilen = 128,
16098 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16099 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16100 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16101 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16102 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16103 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16104 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16105 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16106 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16107 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16108 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16109 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16110 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16111 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16112 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16113 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16114 "\xc6\x58\xa1\x60\x70\x91\x39\x36"
16115 "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e"
16116 "\xde\x63\xde\x76\x52\xde\x9f\xba"
16117 "\x90\xcf\x15\xf2\xbb\x6e\x84\x00",
16118 .rlen = 128 + 32,
16119 },
16120};
16121
16122#define HMAC_SHA384_DES_CBC_ENC_TEST_VEC 1
16123
16124static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = {
16125 { /*Generated with cryptopp*/
16126#ifdef __LITTLE_ENDIAN
16127 .key = "\x08\x00" /* rta length */
16128 "\x01\x00" /* rta type */
16129#else
16130 .key = "\x00\x08" /* rta length */
16131 "\x00\x01" /* rta type */
16132#endif
16133 "\x00\x00\x00\x08" /* enc key length */
16134 "\x11\x22\x33\x44\x55\x66\x77\x88"
16135 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16136 "\x22\x33\x44\x55\x66\x77\x88\x99"
16137 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16138 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16139 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16140 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16141 .klen = 8 + 48 + 8,
16142 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16143 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16144 .alen = 8,
16145 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16146 "\x53\x20\x63\x65\x65\x72\x73\x74"
16147 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16148 "\x20\x79\x65\x53\x72\x63\x74\x65"
16149 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16150 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16151 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16152 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16153 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16154 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16155 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16156 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16157 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16158 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16159 "\x63\x65\x65\x72\x73\x74\x54\x20"
16160 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16161 .ilen = 128,
16162 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16163 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16164 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16165 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16166 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16167 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16168 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16169 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16170 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16171 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16172 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16173 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16174 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16175 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16176 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16177 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16178 "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0"
16179 "\xc8\x8c\xef\x25\x07\x83\x11\x3a"
16180 "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe"
16181 "\x5e\x67\xb5\x74\xe7\xe7\x85\x61"
16182 "\x6a\x95\x26\x75\xcc\x53\x89\xf3"
16183 "\x74\xc9\x2a\x76\x20\xa2\x64\x62",
16184 .rlen = 128 + 48,
16185 },
16186};
16187
16188#define HMAC_SHA512_DES_CBC_ENC_TEST_VEC 1
16189
16190static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = {
16191 { /*Generated with cryptopp*/
16192#ifdef __LITTLE_ENDIAN
16193 .key = "\x08\x00" /* rta length */
16194 "\x01\x00" /* rta type */
16195#else
16196 .key = "\x00\x08" /* rta length */
16197 "\x00\x01" /* rta type */
16198#endif
16199 "\x00\x00\x00\x08" /* enc key length */
16200 "\x11\x22\x33\x44\x55\x66\x77\x88"
16201 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16202 "\x22\x33\x44\x55\x66\x77\x88\x99"
16203 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16204 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16205 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16206 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16207 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16208 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16209 .klen = 8 + 64 + 8,
16210 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16211 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16212 .alen = 8,
16213 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16214 "\x53\x20\x63\x65\x65\x72\x73\x74"
16215 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16216 "\x20\x79\x65\x53\x72\x63\x74\x65"
16217 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16218 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16219 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16220 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16221 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16222 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16223 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16224 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16225 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16226 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16227 "\x63\x65\x65\x72\x73\x74\x54\x20"
16228 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16229 .ilen = 128,
16230 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16231 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16232 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16233 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16234 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16235 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16236 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16237 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16238 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16239 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16240 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16241 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16242 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16243 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16244 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16245 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16246 "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e"
16247 "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb"
16248 "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb"
16249 "\x58\x83\xda\x67\xfb\x21\x24\xa2"
16250 "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93"
16251 "\x97\xe2\xe3\xb8\xaa\x48\x85\xee"
16252 "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96"
16253 "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b",
16254 .rlen = 128 + 64,
16255 },
16256};
16257
16258#define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC 1
16259
16260static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = {
16261 { /*Generated with cryptopp*/
16262#ifdef __LITTLE_ENDIAN
16263 .key = "\x08\x00" /* rta length */
16264 "\x01\x00" /* rta type */
16265#else
16266 .key = "\x00\x08" /* rta length */
16267 "\x00\x01" /* rta type */
16268#endif
16269 "\x00\x00\x00\x18" /* enc key length */
16270 "\x11\x22\x33\x44\x55\x66\x77\x88"
16271 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16272 "\x22\x33\x44\x55"
16273 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16274 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16275 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16276 .klen = 8 + 20 + 24,
16277 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16278 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16279 .alen = 8,
16280 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16281 "\x53\x20\x63\x65\x65\x72\x73\x74"
16282 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16283 "\x20\x79\x65\x53\x72\x63\x74\x65"
16284 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16285 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16286 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16287 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16288 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16289 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16290 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16291 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16292 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16293 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16294 "\x63\x65\x65\x72\x73\x74\x54\x20"
16295 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16296 .ilen = 128,
16297 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16298 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16299 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16300 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16301 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16302 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16303 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16304 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16305 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16306 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16307 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16308 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16309 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16310 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16311 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16312 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16313 "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6"
16314 "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf"
16315 "\xd1\x60\x91\xb3",
16316 .rlen = 128 + 20,
16317 },
16318};
16319
16320#define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC 1
16321
16322static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = {
16323 { /*Generated with cryptopp*/
16324#ifdef __LITTLE_ENDIAN
16325 .key = "\x08\x00" /* rta length */
16326 "\x01\x00" /* rta type */
16327#else
16328 .key = "\x00\x08" /* rta length */
16329 "\x00\x01" /* rta type */
16330#endif
16331 "\x00\x00\x00\x18" /* enc key length */
16332 "\x11\x22\x33\x44\x55\x66\x77\x88"
16333 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16334 "\x22\x33\x44\x55\x66\x77\x88\x99"
16335 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16336 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16337 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16338 .klen = 8 + 24 + 24,
16339 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16340 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16341 .alen = 8,
16342 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16343 "\x53\x20\x63\x65\x65\x72\x73\x74"
16344 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16345 "\x20\x79\x65\x53\x72\x63\x74\x65"
16346 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16347 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16348 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16349 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16350 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16351 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16352 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16353 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16354 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16355 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16356 "\x63\x65\x65\x72\x73\x74\x54\x20"
16357 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16358 .ilen = 128,
16359 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16360 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16361 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16362 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16363 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16364 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16365 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16366 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16367 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16368 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16369 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16370 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16371 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16372 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16373 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16374 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16375 "\x15\x24\x7f\x5a\x45\x4a\x66\xce"
16376 "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c"
16377 "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0",
16378 .rlen = 128 + 24,
16379 },
16380};
16381
16382#define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC 1
16383
16384static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = {
16385 { /*Generated with cryptopp*/
16386#ifdef __LITTLE_ENDIAN
16387 .key = "\x08\x00" /* rta length */
16388 "\x01\x00" /* rta type */
16389#else
16390 .key = "\x00\x08" /* rta length */
16391 "\x00\x01" /* rta type */
16392#endif
16393 "\x00\x00\x00\x18" /* enc key length */
16394 "\x11\x22\x33\x44\x55\x66\x77\x88"
16395 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16396 "\x22\x33\x44\x55\x66\x77\x88\x99"
16397 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16398 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16399 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16400 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16401 .klen = 8 + 32 + 24,
16402 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16403 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16404 .alen = 8,
16405 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16406 "\x53\x20\x63\x65\x65\x72\x73\x74"
16407 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16408 "\x20\x79\x65\x53\x72\x63\x74\x65"
16409 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16410 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16411 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16412 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16413 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16414 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16415 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16416 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16417 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16418 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16419 "\x63\x65\x65\x72\x73\x74\x54\x20"
16420 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16421 .ilen = 128,
16422 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16423 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16424 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16425 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16426 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16427 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16428 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16429 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16430 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16431 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16432 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16433 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16434 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16435 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16436 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16437 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16438 "\x73\xb0\xea\x9f\xe8\x18\x80\xd6"
16439 "\x56\x38\x44\xc0\xdb\xe3\x4f\x71"
16440 "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f"
16441 "\xca\x43\x95\xdf\x80\x61\x81\xa9",
16442 .rlen = 128 + 32,
16443 },
16444};
16445
16446#define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC 1
16447
16448static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = {
16449 { /*Generated with cryptopp*/
16450#ifdef __LITTLE_ENDIAN
16451 .key = "\x08\x00" /* rta length */
16452 "\x01\x00" /* rta type */
16453#else
16454 .key = "\x00\x08" /* rta length */
16455 "\x00\x01" /* rta type */
16456#endif
16457 "\x00\x00\x00\x18" /* enc key length */
16458 "\x11\x22\x33\x44\x55\x66\x77\x88"
16459 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16460 "\x22\x33\x44\x55\x66\x77\x88\x99"
16461 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16462 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16463 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16464 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16465 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16466 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16467 .klen = 8 + 48 + 24,
16468 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16469 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16470 .alen = 8,
16471 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16472 "\x53\x20\x63\x65\x65\x72\x73\x74"
16473 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16474 "\x20\x79\x65\x53\x72\x63\x74\x65"
16475 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16476 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16477 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16478 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16479 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16480 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16481 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16482 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16483 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16484 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16485 "\x63\x65\x65\x72\x73\x74\x54\x20"
16486 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16487 .ilen = 128,
16488 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16489 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16490 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16491 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16492 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16493 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16494 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16495 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16496 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16497 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16498 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16499 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16500 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16501 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16502 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16503 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16504 "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7"
16505 "\x70\xe7\x93\xbf\x73\xe6\x9f\x83"
16506 "\x99\x62\x23\xe6\x5b\xd0\xda\x18"
16507 "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39"
16508 "\x36\x5d\x13\x2f\x86\x10\x78\xd6"
16509 "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b",
16510 .rlen = 128 + 48,
16511 },
16512};
16513
16514#define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC 1
16515
16516static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = {
16517 { /*Generated with cryptopp*/
16518#ifdef __LITTLE_ENDIAN
16519 .key = "\x08\x00" /* rta length */
16520 "\x01\x00" /* rta type */
16521#else
16522 .key = "\x00\x08" /* rta length */
16523 "\x00\x01" /* rta type */
16524#endif
16525 "\x00\x00\x00\x18" /* enc key length */
16526 "\x11\x22\x33\x44\x55\x66\x77\x88"
16527 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16528 "\x22\x33\x44\x55\x66\x77\x88\x99"
16529 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16530 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16531 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16532 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16533 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16534 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16535 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16536 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16537 .klen = 8 + 64 + 24,
16538 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16539 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16540 .alen = 8,
16541 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16542 "\x53\x20\x63\x65\x65\x72\x73\x74"
16543 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16544 "\x20\x79\x65\x53\x72\x63\x74\x65"
16545 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16546 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16547 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16548 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16549 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16550 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16551 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16552 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16553 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16554 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16555 "\x63\x65\x65\x72\x73\x74\x54\x20"
16556 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16557 .ilen = 128,
16558 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16559 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16560 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16561 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16562 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16563 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16564 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16565 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16566 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16567 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16568 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16569 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16570 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16571 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16572 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16573 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16574 "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32"
16575 "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e"
16576 "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b"
16577 "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60"
16578 "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0"
16579 "\x2a\x74\xd4\x65\x12\xcb\x55\xf2"
16580 "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2"
16581 "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb",
16582 .rlen = 128 + 64,
16583 },
16584};
16585
Herbert Xuda7f0332008-07-31 17:08:25 +080016586static struct cipher_testvec aes_lrw_enc_tv_template[] = {
16587 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16588 { /* LRW-32-AES 1 */
16589 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16590 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16591 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16592 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16593 .klen = 32,
16594 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16595 "\x00\x00\x00\x00\x00\x00\x00\x01",
16596 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16597 "\x38\x39\x41\x42\x43\x44\x45\x46",
16598 .ilen = 16,
16599 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16600 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16601 .rlen = 16,
16602 }, { /* LRW-32-AES 2 */
16603 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16604 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16605 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16606 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16607 .klen = 32,
16608 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16609 "\x00\x00\x00\x00\x00\x00\x00\x02",
16610 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16611 "\x38\x39\x41\x42\x43\x44\x45\x46",
16612 .ilen = 16,
16613 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16614 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16615 .rlen = 16,
16616 }, { /* LRW-32-AES 3 */
16617 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16618 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16619 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16620 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16621 .klen = 32,
16622 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16623 "\x00\x00\x00\x02\x00\x00\x00\x00",
16624 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16625 "\x38\x39\x41\x42\x43\x44\x45\x46",
16626 .ilen = 16,
16627 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16628 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16629 .rlen = 16,
16630 }, { /* LRW-32-AES 4 */
16631 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16632 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16633 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16634 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16635 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16636 .klen = 40,
16637 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16638 "\x00\x00\x00\x00\x00\x00\x00\x01",
16639 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16640 "\x38\x39\x41\x42\x43\x44\x45\x46",
16641 .ilen = 16,
16642 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16643 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16644 .rlen = 16,
16645 }, { /* LRW-32-AES 5 */
16646 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16647 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16648 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16649 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16650 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16651 .klen = 40,
16652 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16653 "\x00\x00\x00\x02\x00\x00\x00\x00",
16654 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16655 "\x38\x39\x41\x42\x43\x44\x45\x46",
16656 .ilen = 16,
16657 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16658 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16659 .rlen = 16,
16660 }, { /* LRW-32-AES 6 */
16661 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16662 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16663 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16664 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16665 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16666 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16667 .klen = 48,
16668 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16669 "\x00\x00\x00\x00\x00\x00\x00\x01",
16670 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16671 "\x38\x39\x41\x42\x43\x44\x45\x46",
16672 .ilen = 16,
16673 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16674 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16675 .rlen = 16,
16676 }, { /* LRW-32-AES 7 */
16677 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16678 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16679 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16680 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16681 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16682 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16683 .klen = 48,
16684 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16685 "\x00\x00\x00\x02\x00\x00\x00\x00",
16686 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16687 "\x38\x39\x41\x42\x43\x44\x45\x46",
16688 .ilen = 16,
16689 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16690 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16691 .rlen = 16,
16692 }, {
16693/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16694 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16695 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16696 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16697 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16698 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16699 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16700 .klen = 48,
16701 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16702 "\x00\x00\x00\x00\x00\x00\x00\x01",
16703 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16704 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16705 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16706 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16707 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16708 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16709 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16710 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16711 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16712 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16713 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16714 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16715 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16716 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16717 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16718 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16719 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16720 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16721 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16722 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16723 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16724 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16725 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16726 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16727 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16728 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16729 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16730 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16731 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16732 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16733 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16734 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16735 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16736 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16737 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16738 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16739 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16740 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16741 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16742 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16743 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16744 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16745 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16746 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16747 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16748 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16749 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16750 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16751 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16752 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16753 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16754 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16755 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16756 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16757 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16758 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16759 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16760 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16761 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16762 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16763 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16764 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16765 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16766 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16767 .ilen = 512,
16768 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16769 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16770 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16771 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16772 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16773 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16774 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16775 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16776 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16777 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16778 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16779 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16780 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16781 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16782 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16783 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16784 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16785 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16786 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16787 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16788 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16789 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16790 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16791 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16792 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16793 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16794 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16795 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16796 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16797 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16798 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16799 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16800 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16801 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16802 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16803 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16804 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16805 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16806 "\xb8\x79\x78\x97\x94\xff\x72\x13"
16807 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16808 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16809 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16810 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
16811 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
16812 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
16813 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
16814 "\x1e\x86\x53\x11\x53\x94\x00\xee"
16815 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
16816 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
16817 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
16818 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
16819 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
16820 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
16821 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
16822 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
16823 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
16824 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
16825 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
16826 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
16827 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
16828 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
16829 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
16830 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
16831 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
16832 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016833 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020016834 .np = 3,
16835 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016836 }
16837};
16838
16839static struct cipher_testvec aes_lrw_dec_tv_template[] = {
16840 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16841 /* same as enc vectors with input and result reversed */
16842 { /* LRW-32-AES 1 */
16843 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16844 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16845 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16846 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16847 .klen = 32,
16848 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16849 "\x00\x00\x00\x00\x00\x00\x00\x01",
16850 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16851 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16852 .ilen = 16,
16853 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16854 "\x38\x39\x41\x42\x43\x44\x45\x46",
16855 .rlen = 16,
16856 }, { /* LRW-32-AES 2 */
16857 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16858 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16859 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16860 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16861 .klen = 32,
16862 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16863 "\x00\x00\x00\x00\x00\x00\x00\x02",
16864 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16865 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16866 .ilen = 16,
16867 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16868 "\x38\x39\x41\x42\x43\x44\x45\x46",
16869 .rlen = 16,
16870 }, { /* LRW-32-AES 3 */
16871 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16872 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16873 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16874 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16875 .klen = 32,
16876 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16877 "\x00\x00\x00\x02\x00\x00\x00\x00",
16878 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16879 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16880 .ilen = 16,
16881 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16882 "\x38\x39\x41\x42\x43\x44\x45\x46",
16883 .rlen = 16,
16884 }, { /* LRW-32-AES 4 */
16885 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16886 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16887 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16888 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16889 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16890 .klen = 40,
16891 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16892 "\x00\x00\x00\x00\x00\x00\x00\x01",
16893 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16894 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16895 .ilen = 16,
16896 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16897 "\x38\x39\x41\x42\x43\x44\x45\x46",
16898 .rlen = 16,
16899 }, { /* LRW-32-AES 5 */
16900 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16901 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16902 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16903 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16904 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16905 .klen = 40,
16906 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16907 "\x00\x00\x00\x02\x00\x00\x00\x00",
16908 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16909 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16910 .ilen = 16,
16911 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16912 "\x38\x39\x41\x42\x43\x44\x45\x46",
16913 .rlen = 16,
16914 }, { /* LRW-32-AES 6 */
16915 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16916 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16917 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16918 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16919 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16920 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16921 .klen = 48,
16922 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16923 "\x00\x00\x00\x00\x00\x00\x00\x01",
16924 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16925 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16926 .ilen = 16,
16927 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16928 "\x38\x39\x41\x42\x43\x44\x45\x46",
16929 .rlen = 16,
16930 }, { /* LRW-32-AES 7 */
16931 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16932 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16933 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16934 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16935 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16936 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16937 .klen = 48,
16938 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16939 "\x00\x00\x00\x02\x00\x00\x00\x00",
16940 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16941 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16942 .ilen = 16,
16943 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16944 "\x38\x39\x41\x42\x43\x44\x45\x46",
16945 .rlen = 16,
16946 }, {
16947/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16948 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16949 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16950 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16951 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16952 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16953 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16954 .klen = 48,
16955 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16956 "\x00\x00\x00\x00\x00\x00\x00\x01",
16957 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16958 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16959 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16960 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16961 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16962 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16963 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16964 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16965 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16966 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16967 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16968 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16969 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16970 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16971 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16972 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16973 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16974 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16975 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16976 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16977 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16978 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16979 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16980 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16981 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16982 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16983 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16984 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16985 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16986 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16987 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16988 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16989 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16990 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16991 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16992 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16993 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16994 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16995 "\xb8\x79\x78\x97\x94\xff\x72\x13"
16996 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16997 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16998 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16999 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
17000 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
17001 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
17002 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
17003 "\x1e\x86\x53\x11\x53\x94\x00\xee"
17004 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
17005 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
17006 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
17007 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
17008 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
17009 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
17010 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
17011 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
17012 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
17013 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
17014 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
17015 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
17016 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
17017 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
17018 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
17019 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
17020 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
17021 .ilen = 512,
17022 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
17023 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
17024 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
17025 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
17026 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
17027 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
17028 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
17029 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
17030 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
17031 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
17032 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
17033 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
17034 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
17035 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
17036 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
17037 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
17038 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
17039 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
17040 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
17041 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
17042 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
17043 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
17044 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
17045 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
17046 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
17047 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
17048 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
17049 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
17050 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
17051 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
17052 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
17053 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
17054 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
17055 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
17056 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
17057 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
17058 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
17059 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
17060 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
17061 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
17062 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
17063 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
17064 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
17065 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
17066 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
17067 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
17068 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
17069 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
17070 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
17071 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
17072 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
17073 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
17074 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
17075 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
17076 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
17077 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
17078 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
17079 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
17080 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
17081 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
17082 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
17083 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
17084 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
17085 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
17086 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017087 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017088 .np = 3,
17089 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017090 }
17091};
17092
17093static struct cipher_testvec aes_xts_enc_tv_template[] = {
17094 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17095 { /* XTS-AES 1 */
17096 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17097 "\x00\x00\x00\x00\x00\x00\x00\x00"
17098 "\x00\x00\x00\x00\x00\x00\x00\x00"
17099 "\x00\x00\x00\x00\x00\x00\x00\x00",
17100 .klen = 32,
17101 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17102 "\x00\x00\x00\x00\x00\x00\x00\x00",
17103 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
17104 "\x00\x00\x00\x00\x00\x00\x00\x00"
17105 "\x00\x00\x00\x00\x00\x00\x00\x00"
17106 "\x00\x00\x00\x00\x00\x00\x00\x00",
17107 .ilen = 32,
17108 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17109 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17110 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17111 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17112 .rlen = 32,
17113 }, { /* XTS-AES 2 */
17114 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17115 "\x11\x11\x11\x11\x11\x11\x11\x11"
17116 "\x22\x22\x22\x22\x22\x22\x22\x22"
17117 "\x22\x22\x22\x22\x22\x22\x22\x22",
17118 .klen = 32,
17119 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17120 "\x00\x00\x00\x00\x00\x00\x00\x00",
17121 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
17122 "\x44\x44\x44\x44\x44\x44\x44\x44"
17123 "\x44\x44\x44\x44\x44\x44\x44\x44"
17124 "\x44\x44\x44\x44\x44\x44\x44\x44",
17125 .ilen = 32,
17126 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17127 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17128 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17129 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17130 .rlen = 32,
17131 }, { /* XTS-AES 3 */
17132 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17133 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17134 "\x22\x22\x22\x22\x22\x22\x22\x22"
17135 "\x22\x22\x22\x22\x22\x22\x22\x22",
17136 .klen = 32,
17137 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17138 "\x00\x00\x00\x00\x00\x00\x00\x00",
17139 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
17140 "\x44\x44\x44\x44\x44\x44\x44\x44"
17141 "\x44\x44\x44\x44\x44\x44\x44\x44"
17142 "\x44\x44\x44\x44\x44\x44\x44\x44",
17143 .ilen = 32,
17144 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17145 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17146 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17147 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17148 .rlen = 32,
17149 }, { /* XTS-AES 4 */
17150 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17151 "\x23\x53\x60\x28\x74\x71\x35\x26"
17152 "\x31\x41\x59\x26\x53\x58\x97\x93"
17153 "\x23\x84\x62\x64\x33\x83\x27\x95",
17154 .klen = 32,
17155 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17156 "\x00\x00\x00\x00\x00\x00\x00\x00",
17157 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17158 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17159 "\x10\x11\x12\x13\x14\x15\x16\x17"
17160 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17161 "\x20\x21\x22\x23\x24\x25\x26\x27"
17162 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17163 "\x30\x31\x32\x33\x34\x35\x36\x37"
17164 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17165 "\x40\x41\x42\x43\x44\x45\x46\x47"
17166 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17167 "\x50\x51\x52\x53\x54\x55\x56\x57"
17168 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17169 "\x60\x61\x62\x63\x64\x65\x66\x67"
17170 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17171 "\x70\x71\x72\x73\x74\x75\x76\x77"
17172 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17173 "\x80\x81\x82\x83\x84\x85\x86\x87"
17174 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17175 "\x90\x91\x92\x93\x94\x95\x96\x97"
17176 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17177 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17178 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17179 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17180 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17181 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17182 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17183 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17184 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17185 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17186 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17187 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17188 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17189 "\x00\x01\x02\x03\x04\x05\x06\x07"
17190 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17191 "\x10\x11\x12\x13\x14\x15\x16\x17"
17192 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17193 "\x20\x21\x22\x23\x24\x25\x26\x27"
17194 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17195 "\x30\x31\x32\x33\x34\x35\x36\x37"
17196 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17197 "\x40\x41\x42\x43\x44\x45\x46\x47"
17198 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17199 "\x50\x51\x52\x53\x54\x55\x56\x57"
17200 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17201 "\x60\x61\x62\x63\x64\x65\x66\x67"
17202 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17203 "\x70\x71\x72\x73\x74\x75\x76\x77"
17204 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17205 "\x80\x81\x82\x83\x84\x85\x86\x87"
17206 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17207 "\x90\x91\x92\x93\x94\x95\x96\x97"
17208 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17209 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17210 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17211 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17212 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17213 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17214 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17215 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17216 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17217 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17218 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17219 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17220 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17221 .ilen = 512,
17222 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17223 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17224 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17225 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17226 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17227 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17228 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17229 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17230 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17231 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17232 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17233 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17234 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17235 "\x22\x97\x61\x46\xae\x20\xce\x84"
17236 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17237 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17238 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17239 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17240 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17241 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17242 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17243 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17244 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17245 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17246 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17247 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17248 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17249 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17250 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17251 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17252 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17253 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17254 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17255 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17256 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17257 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17258 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17259 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17260 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17261 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17262 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17263 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17264 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17265 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17266 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17267 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17268 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17269 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17270 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17271 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17272 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17273 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17274 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17275 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17276 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17277 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17278 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17279 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17280 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17281 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17282 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17283 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17284 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17285 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17286 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017287 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17288 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17289 "\x23\x53\x60\x28\x74\x71\x35\x26"
17290 "\x62\x49\x77\x57\x24\x70\x93\x69"
17291 "\x99\x59\x57\x49\x66\x96\x76\x27"
17292 "\x31\x41\x59\x26\x53\x58\x97\x93"
17293 "\x23\x84\x62\x64\x33\x83\x27\x95"
17294 "\x02\x88\x41\x97\x16\x93\x99\x37"
17295 "\x51\x05\x82\x09\x74\x94\x45\x92",
17296 .klen = 64,
17297 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17298 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017299 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17300 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17301 "\x10\x11\x12\x13\x14\x15\x16\x17"
17302 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17303 "\x20\x21\x22\x23\x24\x25\x26\x27"
17304 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17305 "\x30\x31\x32\x33\x34\x35\x36\x37"
17306 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17307 "\x40\x41\x42\x43\x44\x45\x46\x47"
17308 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17309 "\x50\x51\x52\x53\x54\x55\x56\x57"
17310 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17311 "\x60\x61\x62\x63\x64\x65\x66\x67"
17312 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17313 "\x70\x71\x72\x73\x74\x75\x76\x77"
17314 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17315 "\x80\x81\x82\x83\x84\x85\x86\x87"
17316 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17317 "\x90\x91\x92\x93\x94\x95\x96\x97"
17318 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17319 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17320 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17321 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17322 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17323 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17324 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17325 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17326 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17327 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17328 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17329 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17330 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17331 "\x00\x01\x02\x03\x04\x05\x06\x07"
17332 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17333 "\x10\x11\x12\x13\x14\x15\x16\x17"
17334 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17335 "\x20\x21\x22\x23\x24\x25\x26\x27"
17336 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17337 "\x30\x31\x32\x33\x34\x35\x36\x37"
17338 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17339 "\x40\x41\x42\x43\x44\x45\x46\x47"
17340 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17341 "\x50\x51\x52\x53\x54\x55\x56\x57"
17342 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17343 "\x60\x61\x62\x63\x64\x65\x66\x67"
17344 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17345 "\x70\x71\x72\x73\x74\x75\x76\x77"
17346 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17347 "\x80\x81\x82\x83\x84\x85\x86\x87"
17348 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17349 "\x90\x91\x92\x93\x94\x95\x96\x97"
17350 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17351 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17352 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17353 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17354 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17355 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17356 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17357 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17358 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17359 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17360 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17361 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17362 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17363 .ilen = 512,
17364 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17365 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17366 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17367 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17368 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17369 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17370 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17371 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17372 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17373 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17374 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17375 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17376 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17377 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17378 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17379 "\x00\x02\x08\x87\x89\x14\x29\xca"
17380 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17381 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17382 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17383 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17384 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17385 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17386 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17387 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17388 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17389 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17390 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17391 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17392 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17393 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17394 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17395 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17396 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17397 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17398 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17399 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17400 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17401 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17402 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17403 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17404 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17405 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17406 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17407 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17408 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17409 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17410 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17411 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17412 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17413 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17414 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17415 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17416 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17417 "\x94\x30\x54\xff\x84\x01\x14\x93"
17418 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17419 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17420 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17421 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17422 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17423 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17424 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17425 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17426 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17427 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17428 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017429 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017430 .np = 3,
17431 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017432 }
17433};
17434
17435static struct cipher_testvec aes_xts_dec_tv_template[] = {
17436 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17437 { /* XTS-AES 1 */
17438 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17439 "\x00\x00\x00\x00\x00\x00\x00\x00"
17440 "\x00\x00\x00\x00\x00\x00\x00\x00"
17441 "\x00\x00\x00\x00\x00\x00\x00\x00",
17442 .klen = 32,
17443 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17444 "\x00\x00\x00\x00\x00\x00\x00\x00",
17445 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17446 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17447 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17448 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17449 .ilen = 32,
17450 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
17451 "\x00\x00\x00\x00\x00\x00\x00\x00"
17452 "\x00\x00\x00\x00\x00\x00\x00\x00"
17453 "\x00\x00\x00\x00\x00\x00\x00\x00",
17454 .rlen = 32,
17455 }, { /* XTS-AES 2 */
17456 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17457 "\x11\x11\x11\x11\x11\x11\x11\x11"
17458 "\x22\x22\x22\x22\x22\x22\x22\x22"
17459 "\x22\x22\x22\x22\x22\x22\x22\x22",
17460 .klen = 32,
17461 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17462 "\x00\x00\x00\x00\x00\x00\x00\x00",
17463 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17464 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17465 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17466 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17467 .ilen = 32,
17468 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17469 "\x44\x44\x44\x44\x44\x44\x44\x44"
17470 "\x44\x44\x44\x44\x44\x44\x44\x44"
17471 "\x44\x44\x44\x44\x44\x44\x44\x44",
17472 .rlen = 32,
17473 }, { /* XTS-AES 3 */
17474 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17475 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17476 "\x22\x22\x22\x22\x22\x22\x22\x22"
17477 "\x22\x22\x22\x22\x22\x22\x22\x22",
17478 .klen = 32,
17479 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17480 "\x00\x00\x00\x00\x00\x00\x00\x00",
17481 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17482 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17483 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17484 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17485 .ilen = 32,
17486 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17487 "\x44\x44\x44\x44\x44\x44\x44\x44"
17488 "\x44\x44\x44\x44\x44\x44\x44\x44"
17489 "\x44\x44\x44\x44\x44\x44\x44\x44",
17490 .rlen = 32,
17491 }, { /* XTS-AES 4 */
17492 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17493 "\x23\x53\x60\x28\x74\x71\x35\x26"
17494 "\x31\x41\x59\x26\x53\x58\x97\x93"
17495 "\x23\x84\x62\x64\x33\x83\x27\x95",
17496 .klen = 32,
17497 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17498 "\x00\x00\x00\x00\x00\x00\x00\x00",
17499 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17500 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17501 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17502 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17503 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17504 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17505 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17506 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17507 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17508 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17509 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17510 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17511 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17512 "\x22\x97\x61\x46\xae\x20\xce\x84"
17513 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17514 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17515 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17516 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17517 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17518 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17519 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17520 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17521 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17522 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17523 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17524 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17525 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17526 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17527 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17528 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17529 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17530 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17531 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17532 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17533 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17534 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17535 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17536 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17537 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17538 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17539 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17540 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17541 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17542 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17543 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17544 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17545 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17546 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17547 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17548 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17549 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17550 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17551 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17552 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17553 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17554 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17555 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17556 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17557 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17558 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17559 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17560 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17561 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17562 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17563 .ilen = 512,
17564 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17565 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17566 "\x10\x11\x12\x13\x14\x15\x16\x17"
17567 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17568 "\x20\x21\x22\x23\x24\x25\x26\x27"
17569 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17570 "\x30\x31\x32\x33\x34\x35\x36\x37"
17571 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17572 "\x40\x41\x42\x43\x44\x45\x46\x47"
17573 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17574 "\x50\x51\x52\x53\x54\x55\x56\x57"
17575 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17576 "\x60\x61\x62\x63\x64\x65\x66\x67"
17577 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17578 "\x70\x71\x72\x73\x74\x75\x76\x77"
17579 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17580 "\x80\x81\x82\x83\x84\x85\x86\x87"
17581 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17582 "\x90\x91\x92\x93\x94\x95\x96\x97"
17583 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17584 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17585 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17586 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17587 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17588 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17589 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17590 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17591 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17592 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17593 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17594 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17595 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17596 "\x00\x01\x02\x03\x04\x05\x06\x07"
17597 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17598 "\x10\x11\x12\x13\x14\x15\x16\x17"
17599 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17600 "\x20\x21\x22\x23\x24\x25\x26\x27"
17601 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17602 "\x30\x31\x32\x33\x34\x35\x36\x37"
17603 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17604 "\x40\x41\x42\x43\x44\x45\x46\x47"
17605 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17606 "\x50\x51\x52\x53\x54\x55\x56\x57"
17607 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17608 "\x60\x61\x62\x63\x64\x65\x66\x67"
17609 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17610 "\x70\x71\x72\x73\x74\x75\x76\x77"
17611 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17612 "\x80\x81\x82\x83\x84\x85\x86\x87"
17613 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17614 "\x90\x91\x92\x93\x94\x95\x96\x97"
17615 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17616 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17617 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17618 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17619 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17620 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17621 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17622 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17623 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17624 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17625 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17626 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17627 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17628 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017629 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17630 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17631 "\x23\x53\x60\x28\x74\x71\x35\x26"
17632 "\x62\x49\x77\x57\x24\x70\x93\x69"
17633 "\x99\x59\x57\x49\x66\x96\x76\x27"
17634 "\x31\x41\x59\x26\x53\x58\x97\x93"
17635 "\x23\x84\x62\x64\x33\x83\x27\x95"
17636 "\x02\x88\x41\x97\x16\x93\x99\x37"
17637 "\x51\x05\x82\x09\x74\x94\x45\x92",
17638 .klen = 64,
17639 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17640 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017641 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17642 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17643 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17644 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17645 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17646 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17647 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17648 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17649 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17650 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17651 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17652 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17653 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17654 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17655 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17656 "\x00\x02\x08\x87\x89\x14\x29\xca"
17657 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17658 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17659 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17660 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17661 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17662 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17663 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17664 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17665 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17666 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17667 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17668 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17669 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17670 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17671 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17672 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17673 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17674 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17675 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17676 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17677 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17678 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17679 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17680 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17681 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17682 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17683 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17684 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17685 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17686 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17687 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17688 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17689 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17690 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17691 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17692 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17693 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17694 "\x94\x30\x54\xff\x84\x01\x14\x93"
17695 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17696 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17697 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17698 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17699 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17700 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17701 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17702 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17703 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17704 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17705 .ilen = 512,
17706 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17707 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17708 "\x10\x11\x12\x13\x14\x15\x16\x17"
17709 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17710 "\x20\x21\x22\x23\x24\x25\x26\x27"
17711 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17712 "\x30\x31\x32\x33\x34\x35\x36\x37"
17713 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17714 "\x40\x41\x42\x43\x44\x45\x46\x47"
17715 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17716 "\x50\x51\x52\x53\x54\x55\x56\x57"
17717 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17718 "\x60\x61\x62\x63\x64\x65\x66\x67"
17719 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17720 "\x70\x71\x72\x73\x74\x75\x76\x77"
17721 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17722 "\x80\x81\x82\x83\x84\x85\x86\x87"
17723 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17724 "\x90\x91\x92\x93\x94\x95\x96\x97"
17725 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17726 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17727 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17728 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17729 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17730 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17731 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17732 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17733 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17734 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17735 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17736 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17737 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17738 "\x00\x01\x02\x03\x04\x05\x06\x07"
17739 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17740 "\x10\x11\x12\x13\x14\x15\x16\x17"
17741 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17742 "\x20\x21\x22\x23\x24\x25\x26\x27"
17743 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17744 "\x30\x31\x32\x33\x34\x35\x36\x37"
17745 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17746 "\x40\x41\x42\x43\x44\x45\x46\x47"
17747 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17748 "\x50\x51\x52\x53\x54\x55\x56\x57"
17749 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17750 "\x60\x61\x62\x63\x64\x65\x66\x67"
17751 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17752 "\x70\x71\x72\x73\x74\x75\x76\x77"
17753 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17754 "\x80\x81\x82\x83\x84\x85\x86\x87"
17755 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17756 "\x90\x91\x92\x93\x94\x95\x96\x97"
17757 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17758 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17759 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17760 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17761 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17762 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17763 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17764 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17765 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17766 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17767 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17768 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17769 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17770 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017771 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017772 .np = 3,
17773 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017774 }
17775};
17776
17777
17778static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017779 { /* From NIST Special Publication 800-38A, Appendix F.5 */
17780 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17781 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17782 .klen = 16,
17783 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17784 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17785 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17786 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17787 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17788 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17789 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17790 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17791 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17792 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17793 .ilen = 64,
17794 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
17795 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
17796 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
17797 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
17798 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
17799 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
17800 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
17801 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
17802 .rlen = 64,
17803 }, {
17804 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
17805 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
17806 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
17807 .klen = 24,
17808 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17809 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17810 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17811 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17812 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17813 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17814 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17815 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17816 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17817 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17818 .ilen = 64,
17819 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
17820 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
17821 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
17822 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
17823 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
17824 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
17825 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
17826 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
17827 .rlen = 64,
17828 }, {
17829 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
17830 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
17831 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
17832 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
17833 .klen = 32,
17834 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17835 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17836 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17837 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17838 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17839 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17840 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17841 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17842 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17843 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17844 .ilen = 64,
17845 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
17846 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
17847 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
17848 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
17849 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
17850 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
17851 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
17852 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
17853 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017854 }, { /* Generated with Crypto++ */
17855 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17856 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17857 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17858 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17859 .klen = 32,
17860 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
17861 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
17862 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
17863 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
17864 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
17865 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
17866 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
17867 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
17868 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
17869 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
17870 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
17871 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
17872 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
17873 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
17874 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
17875 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
17876 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
17877 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
17878 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
17879 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
17880 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
17881 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
17882 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
17883 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
17884 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
17885 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
17886 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
17887 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
17888 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
17889 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
17890 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
17891 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
17892 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
17893 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
17894 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
17895 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
17896 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
17897 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
17898 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
17899 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
17900 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
17901 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
17902 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
17903 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
17904 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
17905 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
17906 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
17907 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
17908 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
17909 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
17910 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
17911 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
17912 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
17913 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
17914 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
17915 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
17916 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
17917 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
17918 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
17919 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
17920 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
17921 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
17922 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
17923 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
17924 .ilen = 496,
17925 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
17926 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
17927 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
17928 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
17929 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
17930 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
17931 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
17932 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
17933 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
17934 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
17935 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
17936 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
17937 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
17938 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
17939 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
17940 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
17941 "\x34\x4B\x31\x69\x84\x66\x96\x44"
17942 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
17943 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
17944 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
17945 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
17946 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
17947 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
17948 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
17949 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
17950 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
17951 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
17952 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
17953 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
17954 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
17955 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
17956 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
17957 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
17958 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
17959 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
17960 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
17961 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
17962 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
17963 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
17964 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
17965 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
17966 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
17967 "\x85\x99\x22\xE8\x91\x38\x70\x83"
17968 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
17969 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
17970 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
17971 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
17972 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
17973 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
17974 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
17975 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
17976 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
17977 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
17978 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
17979 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
17980 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
17981 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
17982 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
17983 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
17984 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
17985 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
17986 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
17987 .rlen = 496,
17988 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017989 .np = 3,
17990 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017991 }, { /* Generated with Crypto++ */
17992 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17993 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17994 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17995 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17996 .klen = 32,
17997 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
17998 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
17999 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18000 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18001 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18002 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18003 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18004 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18005 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18006 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18007 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18008 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18009 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18010 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18011 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18012 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18013 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18014 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18015 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18016 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18017 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18018 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18019 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18020 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18021 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18022 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18023 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18024 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18025 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18026 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18027 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18028 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18029 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18030 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18031 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18032 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18033 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18034 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18035 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18036 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18037 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18038 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18039 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18040 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18041 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18042 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18043 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18044 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18045 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18046 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18047 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18048 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18049 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18050 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18051 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18052 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18053 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18054 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18055 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18056 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18057 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18058 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18059 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18060 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18061 "\x7B\xE4\x4D",
18062 .ilen = 499,
18063 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18064 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18065 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18066 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18067 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18068 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18069 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18070 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18071 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18072 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18073 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18074 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18075 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18076 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18077 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18078 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18079 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18080 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18081 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18082 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18083 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18084 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18085 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18086 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18087 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18088 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18089 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18090 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18091 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18092 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18093 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18094 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18095 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18096 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18097 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18098 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18099 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18100 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18101 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18102 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18103 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18104 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18105 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18106 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18107 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18108 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18109 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18110 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18111 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18112 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18113 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18114 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18115 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18116 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18117 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18118 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18119 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18120 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18121 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18122 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18123 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18124 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18125 "\xFB\xF2\x3F",
18126 .rlen = 499,
18127 .also_non_np = 1,
18128 .np = 2,
18129 .tap = { 499 - 16, 16 },
18130 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018131};
18132
18133static struct cipher_testvec aes_ctr_dec_tv_template[] = {
18134 { /* From NIST Special Publication 800-38A, Appendix F.5 */
18135 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
18136 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
18137 .klen = 16,
18138 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18139 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18140 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
18141 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
18142 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
18143 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
18144 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
18145 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
18146 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
18147 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
18148 .ilen = 64,
18149 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18150 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18151 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18152 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18153 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18154 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18155 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18156 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18157 .rlen = 64,
18158 }, {
18159 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
18160 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
18161 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
18162 .klen = 24,
18163 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18164 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18165 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
18166 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
18167 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
18168 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
18169 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
18170 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
18171 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
18172 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
18173 .ilen = 64,
18174 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18175 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18176 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18177 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18178 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18179 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18180 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18181 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18182 .rlen = 64,
18183 }, {
18184 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
18185 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
18186 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
18187 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
18188 .klen = 32,
18189 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18190 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18191 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
18192 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
18193 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18194 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18195 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18196 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18197 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18198 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18199 .ilen = 64,
18200 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18201 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18202 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18203 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18204 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18205 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18206 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18207 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18208 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018209 }, { /* Generated with Crypto++ */
18210 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18211 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18212 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18213 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18214 .klen = 32,
18215 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18216 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18217 .input = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18218 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18219 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18220 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18221 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18222 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18223 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18224 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18225 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18226 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18227 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18228 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18229 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18230 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18231 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18232 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18233 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18234 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18235 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18236 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18237 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18238 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18239 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18240 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18241 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18242 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18243 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18244 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18245 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18246 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18247 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18248 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18249 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18250 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18251 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18252 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18253 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18254 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18255 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18256 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18257 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18258 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18259 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18260 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18261 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18262 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18263 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18264 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18265 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18266 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18267 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18268 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18269 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18270 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18271 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18272 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18273 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18274 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18275 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18276 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18277 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18278 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18279 .ilen = 496,
18280 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18281 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18282 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18283 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18284 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18285 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18286 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18287 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18288 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18289 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18290 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18291 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18292 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18293 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18294 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18295 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18296 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18297 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18298 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18299 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18300 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18301 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18302 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18303 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18304 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18305 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18306 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18307 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18308 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18309 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18310 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18311 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18312 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18313 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18314 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18315 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18316 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18317 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18318 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18319 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18320 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18321 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18322 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18323 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18324 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18325 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18326 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18327 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18328 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18329 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18330 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18331 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18332 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18333 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18334 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18335 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18336 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18337 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18338 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18339 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18340 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18341 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18342 .rlen = 496,
18343 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018344 .np = 3,
18345 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018346 }, { /* Generated with Crypto++ */
18347 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18348 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18349 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18350 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18351 .klen = 32,
18352 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18353 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18354 .input = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18355 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18356 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18357 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18358 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18359 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18360 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18361 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18362 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18363 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18364 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18365 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18366 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18367 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18368 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18369 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18370 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18371 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18372 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18373 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18374 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18375 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18376 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18377 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18378 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18379 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18380 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18381 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18382 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18383 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18384 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18385 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18386 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18387 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18388 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18389 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18390 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18391 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18392 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18393 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18394 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18395 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18396 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18397 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18398 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18399 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18400 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18401 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18402 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18403 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18404 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18405 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18406 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18407 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18408 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18409 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18410 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18411 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18412 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18413 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18414 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18415 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18416 "\xFB\xF2\x3F",
18417 .ilen = 499,
18418 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18419 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18420 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18421 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18422 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18423 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18424 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18425 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18426 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18427 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18428 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18429 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18430 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18431 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18432 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18433 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18434 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18435 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18436 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18437 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18438 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18439 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18440 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18441 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18442 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18443 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18444 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18445 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18446 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18447 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18448 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18449 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18450 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18451 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18452 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18453 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18454 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18455 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18456 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18457 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18458 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18459 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18460 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18461 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18462 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18463 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18464 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18465 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18466 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18467 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18468 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18469 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18470 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18471 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18472 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18473 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18474 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18475 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18476 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18477 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18478 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18479 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18480 "\x7B\xE4\x4D",
18481 .rlen = 499,
18482 .also_non_np = 1,
18483 .np = 2,
18484 .tap = { 499 - 16, 16 },
18485 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018486};
18487
18488static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080018489 { /* From RFC 3686 */
18490 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
18491 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
18492 "\x00\x00\x00\x30",
18493 .klen = 20,
18494 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18495 .input = "Single block msg",
18496 .ilen = 16,
18497 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
18498 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
18499 .rlen = 16,
18500 }, {
18501 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
18502 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
18503 "\x00\x6c\xb6\xdb",
18504 .klen = 20,
18505 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
18506 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18507 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18508 "\x10\x11\x12\x13\x14\x15\x16\x17"
18509 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18510 .ilen = 32,
18511 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
18512 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
18513 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
18514 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
18515 .rlen = 32,
18516 }, {
18517 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
18518 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
18519 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
18520 "\x00\x00\x00\x48",
18521 .klen = 28,
18522 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
18523 .input = "Single block msg",
18524 .ilen = 16,
18525 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
18526 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
18527 .rlen = 16,
18528 }, {
18529 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
18530 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
18531 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
18532 "\x00\x96\xb0\x3b",
18533 .klen = 28,
18534 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
18535 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18536 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18537 "\x10\x11\x12\x13\x14\x15\x16\x17"
18538 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18539 .ilen = 32,
18540 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
18541 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
18542 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
18543 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
18544 .rlen = 32,
18545 }, {
18546 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
18547 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
18548 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
18549 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
18550 "\x00\x00\x00\x60",
18551 .klen = 36,
18552 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
18553 .input = "Single block msg",
18554 .ilen = 16,
18555 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
18556 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
18557 .rlen = 16,
18558 }, {
18559 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
18560 "\x07\x96\x36\x58\x79\xef\xf8\x86"
18561 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
18562 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
18563 "\x00\xfa\xac\x24",
18564 .klen = 36,
18565 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
18566 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18567 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18568 "\x10\x11\x12\x13\x14\x15\x16\x17"
18569 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18570 .ilen = 32,
18571 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
18572 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
18573 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
18574 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
18575 .rlen = 32,
18576 }, {
18577 // generated using Crypto++
18578 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18579 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18580 "\x10\x11\x12\x13\x14\x15\x16\x17"
18581 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18582 "\x00\x00\x00\x00",
18583 .klen = 32 + 4,
18584 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18585 .input =
18586 "\x00\x01\x02\x03\x04\x05\x06\x07"
18587 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18588 "\x10\x11\x12\x13\x14\x15\x16\x17"
18589 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18590 "\x20\x21\x22\x23\x24\x25\x26\x27"
18591 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18592 "\x30\x31\x32\x33\x34\x35\x36\x37"
18593 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18594 "\x40\x41\x42\x43\x44\x45\x46\x47"
18595 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18596 "\x50\x51\x52\x53\x54\x55\x56\x57"
18597 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18598 "\x60\x61\x62\x63\x64\x65\x66\x67"
18599 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18600 "\x70\x71\x72\x73\x74\x75\x76\x77"
18601 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18602 "\x80\x81\x82\x83\x84\x85\x86\x87"
18603 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18604 "\x90\x91\x92\x93\x94\x95\x96\x97"
18605 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18606 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18607 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18608 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18609 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18610 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18611 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18612 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18613 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18614 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18615 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18616 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18617 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18618 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
18619 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
18620 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
18621 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
18622 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
18623 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
18624 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
18625 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
18626 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
18627 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
18628 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
18629 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
18630 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
18631 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
18632 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
18633 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
18634 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
18635 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
18636 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
18637 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
18638 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
18639 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
18640 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
18641 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
18642 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
18643 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
18644 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
18645 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
18646 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
18647 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
18648 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
18649 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
18650 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
18651 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
18652 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
18653 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
18654 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
18655 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
18656 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
18657 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
18658 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
18659 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
18660 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
18661 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
18662 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
18663 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
18664 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
18665 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
18666 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
18667 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
18668 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
18669 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
18670 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
18671 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
18672 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
18673 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
18674 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
18675 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
18676 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
18677 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
18678 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
18679 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
18680 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
18681 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
18682 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
18683 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
18684 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
18685 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
18686 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
18687 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
18688 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
18689 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
18690 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
18691 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
18692 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
18693 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
18694 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
18695 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
18696 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
18697 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
18698 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
18699 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
18700 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
18701 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
18702 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
18703 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
18704 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
18705 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
18706 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
18707 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
18708 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
18709 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
18710 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
18711 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
18712 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
18713 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
18714 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
18715 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
18716 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
18717 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
18718 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
18719 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
18720 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
18721 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
18722 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
18723 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
18724 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
18725 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
18726 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
18727 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
18728 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
18729 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
18730 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
18731 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
18732 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
18733 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
18734 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
18735 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
18736 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
18737 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
18738 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
18739 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
18740 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
18741 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
18742 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
18743 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
18744 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
18745 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
18746 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
18747 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
18748 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
18749 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
18750 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
18751 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
18752 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
18753 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
18754 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
18755 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
18756 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
18757 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
18758 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
18759 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
18760 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
18761 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
18762 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
18763 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
18764 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
18765 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
18766 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
18767 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
18768 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
18769 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
18770 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
18771 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
18772 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
18773 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
18774 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
18775 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
18776 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
18777 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
18778 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
18779 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
18780 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
18781 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
18782 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
18783 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
18784 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
18785 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
18786 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
18787 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
18788 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
18789 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
18790 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
18791 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
18792 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
18793 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
18794 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
18795 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
18796 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
18797 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
18798 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
18799 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
18800 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
18801 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
18802 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
18803 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
18804 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
18805 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
18806 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
18807 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
18808 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
18809 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
18810 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
18811 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
18812 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
18813 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
18814 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
18815 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
18816 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
18817 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
18818 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
18819 "\x38\x47\x56\x65\x74\x83\x92\xa1"
18820 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
18821 "\x28\x37\x46\x55\x64\x73\x82\x91"
18822 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
18823 "\x18\x27\x36\x45\x54\x63\x72\x81"
18824 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
18825 "\x08\x17\x26\x35\x44\x53\x62\x71"
18826 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
18827 "\xf8\x07\x16\x25\x34\x43\x52\x61"
18828 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
18829 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
18830 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
18831 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
18832 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
18833 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
18834 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
18835 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
18836 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
18837 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
18838 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
18839 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
18840 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
18841 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
18842 "\x00\x11\x22\x33\x44\x55\x66\x77"
18843 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
18844 "\x10\x21\x32\x43\x54\x65\x76\x87"
18845 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
18846 "\x20\x31\x42\x53\x64\x75\x86\x97"
18847 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
18848 "\x30\x41\x52\x63\x74\x85\x96\xa7"
18849 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
18850 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
18851 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
18852 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
18853 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
18854 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
18855 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
18856 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
18857 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
18858 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
18859 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
18860 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
18861 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
18862 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
18863 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
18864 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
18865 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
18866 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
18867 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
18868 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
18869 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
18870 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
18871 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
18872 "\xf0\x01\x12\x23\x34\x45\x56\x67"
18873 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
18874 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
18875 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
18876 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
18877 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
18878 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
18879 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
18880 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
18881 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
18882 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
18883 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
18884 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
18885 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
18886 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
18887 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
18888 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
18889 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
18890 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
18891 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
18892 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
18893 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
18894 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
18895 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
18896 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
18897 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
18898 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
18899 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
18900 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
18901 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
18902 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
18903 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
18904 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
18905 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
18906 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
18907 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
18908 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
18909 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
18910 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
18911 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
18912 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
18913 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
18914 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
18915 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
18916 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
18917 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
18918 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
18919 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
18920 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
18921 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
18922 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
18923 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
18924 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
18925 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
18926 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
18927 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
18928 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
18929 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
18930 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
18931 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
18932 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
18933 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
18934 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
18935 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
18936 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
18937 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
18938 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
18939 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
18940 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
18941 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
18942 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
18943 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
18944 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
18945 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
18946 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
18947 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
18948 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
18949 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
18950 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
18951 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
18952 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
18953 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
18954 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
18955 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
18956 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
18957 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
18958 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
18959 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
18960 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
18961 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
18962 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
18963 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
18964 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
18965 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
18966 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
18967 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
18968 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
18969 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
18970 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
18971 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
18972 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
18973 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
18974 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
18975 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
18976 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
18977 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
18978 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
18979 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
18980 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
18981 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
18982 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
18983 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
18984 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
18985 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
18986 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
18987 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
18988 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
18989 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
18990 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
18991 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
18992 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
18993 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
18994 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
18995 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
18996 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
18997 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
18998 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
18999 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
19000 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
19001 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
19002 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
19003 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
19004 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
19005 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
19006 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
19007 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
19008 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
19009 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
19010 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
19011 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
19012 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
19013 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
19014 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
19015 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
19016 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
19017 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
19018 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
19019 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
19020 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
19021 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
19022 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
19023 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
19024 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
19025 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
19026 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
19027 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
19028 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
19029 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
19030 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
19031 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
19032 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
19033 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
19034 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
19035 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
19036 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
19037 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
19038 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
19039 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
19040 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
19041 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
19042 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
19043 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
19044 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
19045 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
19046 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
19047 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
19048 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
19049 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
19050 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
19051 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
19052 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
19053 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
19054 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
19055 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
19056 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
19057 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
19058 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
19059 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
19060 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
19061 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
19062 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
19063 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
19064 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
19065 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
19066 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
19067 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
19068 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
19069 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
19070 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
19071 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
19072 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
19073 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
19074 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
19075 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
19076 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
19077 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
19078 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
19079 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
19080 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
19081 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
19082 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
19083 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
19084 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
19085 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
19086 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
19087 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
19088 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
19089 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
19090 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
19091 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
19092 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
19093 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
19094 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
19095 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
19096 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
19097 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
19098 "\x00\x21\x42\x63",
19099 .ilen = 4100,
19100 .result =
19101 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
19102 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
19103 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
19104 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
19105 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
19106 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
19107 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
19108 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
19109 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
19110 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
19111 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
19112 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
19113 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
19114 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
19115 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
19116 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
19117 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
19118 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
19119 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
19120 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
19121 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
19122 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
19123 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
19124 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
19125 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
19126 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
19127 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
19128 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
19129 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
19130 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
19131 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
19132 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
19133 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
19134 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
19135 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
19136 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
19137 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
19138 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
19139 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
19140 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
19141 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
19142 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
19143 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
19144 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
19145 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
19146 "\x04\x02\xef\xd3\x44\xde\x76\x31"
19147 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
19148 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
19149 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
19150 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
19151 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
19152 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
19153 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
19154 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
19155 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
19156 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
19157 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
19158 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
19159 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
19160 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
19161 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
19162 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
19163 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
19164 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
19165 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
19166 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
19167 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
19168 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
19169 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
19170 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
19171 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
19172 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
19173 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
19174 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
19175 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
19176 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
19177 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
19178 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
19179 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
19180 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
19181 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
19182 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
19183 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
19184 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
19185 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
19186 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
19187 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
19188 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
19189 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
19190 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
19191 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
19192 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
19193 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
19194 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
19195 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
19196 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
19197 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
19198 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
19199 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
19200 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
19201 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
19202 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
19203 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
19204 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
19205 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
19206 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
19207 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
19208 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
19209 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
19210 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
19211 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
19212 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
19213 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
19214 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
19215 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
19216 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
19217 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
19218 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
19219 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
19220 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
19221 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
19222 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
19223 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
19224 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
19225 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
19226 "\x26\x39\x83\x94\xef\x27\xd8\x53"
19227 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
19228 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
19229 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
19230 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
19231 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
19232 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
19233 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
19234 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
19235 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
19236 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
19237 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
19238 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
19239 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
19240 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
19241 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
19242 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
19243 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
19244 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
19245 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
19246 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
19247 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
19248 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
19249 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
19250 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
19251 "\x35\x12\xe3\x36\x28\x27\x36\x58"
19252 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
19253 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
19254 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
19255 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
19256 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
19257 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
19258 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
19259 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
19260 "\x89\xf3\x78\x35\x44\x62\x78\x72"
19261 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
19262 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
19263 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
19264 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
19265 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
19266 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
19267 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
19268 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
19269 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
19270 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
19271 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
19272 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
19273 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
19274 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
19275 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
19276 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
19277 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
19278 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
19279 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
19280 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
19281 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
19282 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
19283 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
19284 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
19285 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
19286 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
19287 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
19288 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
19289 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
19290 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
19291 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
19292 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
19293 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
19294 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
19295 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
19296 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
19297 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
19298 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
19299 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
19300 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
19301 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
19302 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
19303 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
19304 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
19305 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
19306 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
19307 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
19308 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
19309 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
19310 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
19311 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
19312 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
19313 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
19314 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
19315 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
19316 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
19317 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
19318 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
19319 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
19320 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
19321 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
19322 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
19323 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
19324 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
19325 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
19326 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
19327 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
19328 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
19329 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
19330 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
19331 "\x29\x90\x46\x30\x92\x69\x7d\x13"
19332 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
19333 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
19334 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
19335 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
19336 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
19337 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
19338 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
19339 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
19340 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
19341 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
19342 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
19343 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
19344 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
19345 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
19346 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
19347 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
19348 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
19349 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
19350 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
19351 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
19352 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
19353 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
19354 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
19355 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
19356 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
19357 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
19358 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
19359 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
19360 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
19361 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
19362 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
19363 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
19364 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
19365 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
19366 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
19367 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
19368 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
19369 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
19370 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
19371 "\x73\x02\x3b\x78\x21\x72\x43\x00"
19372 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
19373 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
19374 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
19375 "\x11\x94\x13\x69\x51\x09\x28\xde"
19376 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
19377 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
19378 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
19379 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
19380 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
19381 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
19382 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
19383 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
19384 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
19385 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
19386 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
19387 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
19388 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
19389 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
19390 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
19391 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
19392 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
19393 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
19394 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
19395 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
19396 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
19397 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
19398 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
19399 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
19400 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
19401 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
19402 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
19403 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
19404 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
19405 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
19406 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
19407 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
19408 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
19409 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
19410 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
19411 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
19412 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
19413 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
19414 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
19415 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
19416 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
19417 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
19418 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
19419 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
19420 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
19421 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
19422 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
19423 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
19424 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
19425 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
19426 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
19427 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
19428 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
19429 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
19430 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
19431 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
19432 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
19433 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
19434 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
19435 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
19436 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
19437 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
19438 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
19439 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
19440 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
19441 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
19442 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
19443 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
19444 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
19445 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
19446 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
19447 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
19448 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
19449 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
19450 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
19451 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
19452 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
19453 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
19454 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
19455 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
19456 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
19457 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
19458 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
19459 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
19460 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
19461 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
19462 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
19463 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
19464 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
19465 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
19466 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
19467 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
19468 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
19469 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
19470 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
19471 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
19472 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
19473 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
19474 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
19475 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
19476 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
19477 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
19478 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
19479 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
19480 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
19481 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
19482 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
19483 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
19484 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
19485 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
19486 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
19487 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
19488 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
19489 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
19490 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
19491 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
19492 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
19493 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
19494 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
19495 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
19496 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
19497 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
19498 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
19499 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
19500 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
19501 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
19502 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
19503 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
19504 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
19505 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
19506 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
19507 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
19508 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
19509 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
19510 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
19511 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
19512 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
19513 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
19514 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
19515 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
19516 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
19517 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
19518 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
19519 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
19520 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
19521 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
19522 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
19523 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
19524 "\xae\xed\x39\x88\x42\x11\x3c\xed"
19525 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
19526 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
19527 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
19528 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
19529 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
19530 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
19531 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
19532 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
19533 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
19534 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
19535 "\x34\x17\xde\xba\x47\xf1\x06\x18"
19536 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
19537 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
19538 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
19539 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
19540 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
19541 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
19542 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
19543 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
19544 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
19545 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
19546 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
19547 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
19548 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
19549 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
19550 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
19551 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
19552 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
19553 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
19554 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
19555 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
19556 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
19557 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
19558 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
19559 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
19560 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
19561 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
19562 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
19563 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
19564 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
19565 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
19566 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
19567 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
19568 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
19569 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
19570 "\x74\x56\x58\x40\x02\x37\x52\x2c"
19571 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
19572 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
19573 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
19574 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
19575 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
19576 "\xed\x38\x80\x36\x72\x43\x27\x49"
19577 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
19578 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
19579 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
19580 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
19581 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
19582 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
19583 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
19584 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
19585 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
19586 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
19587 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
19588 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
19589 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
19590 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
19591 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
19592 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
19593 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
19594 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
19595 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
19596 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
19597 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
19598 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
19599 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
19600 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
19601 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
19602 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
19603 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
19604 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
19605 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
19606 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
19607 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
19608 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
19609 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
19610 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
19611 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
19612 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
19613 "\x21\xed\xda\x86",
19614 .rlen = 4100,
19615 .np = 2,
19616 .tap = { 4064, 36 },
19617 },
19618};
19619
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080019620static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080019621 { /* From RFC 3686 */
19622 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
19623 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
19624 "\x00\x00\x00\x30",
19625 .klen = 20,
19626 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19627 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
19628 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
19629 .ilen = 16,
19630 .result = "Single block msg",
19631 .rlen = 16,
19632 }, {
19633 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
19634 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
19635 "\x00\x6c\xb6\xdb",
19636 .klen = 20,
19637 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
19638 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
19639 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
19640 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
19641 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
19642 .ilen = 32,
19643 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19644 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19645 "\x10\x11\x12\x13\x14\x15\x16\x17"
19646 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19647 .rlen = 32,
19648 }, {
19649 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
19650 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
19651 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
19652 "\x00\x00\x00\x48",
19653 .klen = 28,
19654 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
19655 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
19656 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
19657 .ilen = 16,
19658 .result = "Single block msg",
19659 .rlen = 16,
19660 }, {
19661 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
19662 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
19663 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
19664 "\x00\x96\xb0\x3b",
19665 .klen = 28,
19666 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
19667 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
19668 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
19669 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
19670 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
19671 .ilen = 32,
19672 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19673 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19674 "\x10\x11\x12\x13\x14\x15\x16\x17"
19675 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19676 .rlen = 32,
19677 }, {
19678 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
19679 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
19680 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
19681 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
19682 "\x00\x00\x00\x60",
19683 .klen = 36,
19684 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
19685 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
19686 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
19687 .ilen = 16,
19688 .result = "Single block msg",
19689 .rlen = 16,
19690 }, {
19691 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
19692 "\x07\x96\x36\x58\x79\xef\xf8\x86"
19693 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
19694 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
19695 "\x00\xfa\xac\x24",
19696 .klen = 36,
19697 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
19698 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
19699 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
19700 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
19701 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
19702 .ilen = 32,
19703 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19704 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19705 "\x10\x11\x12\x13\x14\x15\x16\x17"
19706 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19707 .rlen = 32,
19708 },
19709};
19710
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100019711static struct cipher_testvec aes_ofb_enc_tv_template[] = {
19712 /* From NIST Special Publication 800-38A, Appendix F.5 */
19713 {
19714 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19715 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19716 .klen = 16,
19717 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19718 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19719 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19720 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19721 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19722 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19723 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19724 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19725 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19726 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19727 .ilen = 64,
19728 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19729 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19730 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19731 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19732 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19733 "\x44\xf7\xa8\x22\x60\xed\xcc"
19734 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19735 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19736 .rlen = 64,
19737 }
19738};
19739
19740static struct cipher_testvec aes_ofb_dec_tv_template[] = {
19741 /* From NIST Special Publication 800-38A, Appendix F.5 */
19742 {
19743 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19744 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19745 .klen = 16,
19746 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19747 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19748 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19749 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19750 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19751 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19752 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19753 "\x44\xf7\xa8\x22\x60\xed\xcc"
19754 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19755 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19756 .ilen = 64,
19757 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19758 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19759 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19760 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19761 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19762 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19763 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19764 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19765 .rlen = 64,
19766 }
19767};
19768
Herbert Xuda7f0332008-07-31 17:08:25 +080019769static struct aead_testvec aes_gcm_enc_tv_template[] = {
19770 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19771 .key = zeroed_string,
19772 .klen = 16,
19773 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
19774 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
19775 .rlen = 16,
19776 }, {
19777 .key = zeroed_string,
19778 .klen = 16,
19779 .input = zeroed_string,
19780 .ilen = 16,
19781 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
19782 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
19783 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
19784 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
19785 .rlen = 32,
19786 }, {
19787 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19788 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19789 .klen = 16,
19790 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19791 "\xde\xca\xf8\x88",
19792 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19793 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19794 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19795 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19796 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19797 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19798 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19799 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19800 .ilen = 64,
19801 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19802 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19803 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19804 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19805 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19806 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19807 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19808 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
19809 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
19810 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
19811 .rlen = 80,
19812 }, {
19813 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19814 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19815 .klen = 16,
19816 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19817 "\xde\xca\xf8\x88",
19818 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19819 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19820 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19821 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19822 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19823 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19824 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19825 "\xba\x63\x7b\x39",
19826 .ilen = 60,
19827 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19828 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19829 "\xab\xad\xda\xd2",
19830 .alen = 20,
19831 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19832 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19833 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19834 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19835 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19836 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19837 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19838 "\x3d\x58\xe0\x91"
19839 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
19840 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
19841 .rlen = 76,
19842 }, {
19843 .key = zeroed_string,
19844 .klen = 24,
19845 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
19846 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
19847 .rlen = 16,
19848 }, {
19849 .key = zeroed_string,
19850 .klen = 24,
19851 .input = zeroed_string,
19852 .ilen = 16,
19853 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
19854 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
19855 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
19856 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
19857 .rlen = 32,
19858 }, {
19859 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19860 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19861 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19862 .klen = 24,
19863 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19864 "\xde\xca\xf8\x88",
19865 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19866 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19867 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19868 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19869 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19870 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19871 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19872 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19873 .ilen = 64,
19874 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19875 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19876 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19877 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19878 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19879 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19880 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19881 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
19882 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
19883 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
19884 .rlen = 80,
19885 }, {
19886 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19887 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19888 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19889 .klen = 24,
19890 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19891 "\xde\xca\xf8\x88",
19892 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19893 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19894 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19895 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19896 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19897 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19898 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19899 "\xba\x63\x7b\x39",
19900 .ilen = 60,
19901 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19902 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19903 "\xab\xad\xda\xd2",
19904 .alen = 20,
19905 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19906 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19907 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19908 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19909 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19910 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19911 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19912 "\xcc\xda\x27\x10"
19913 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
19914 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
19915 .rlen = 76,
19916 .np = 2,
19917 .tap = { 32, 28 },
19918 .anp = 2,
19919 .atap = { 8, 12 }
19920 }, {
19921 .key = zeroed_string,
19922 .klen = 32,
19923 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
19924 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
19925 .rlen = 16,
19926 }
19927};
19928
19929static struct aead_testvec aes_gcm_dec_tv_template[] = {
19930 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19931 .key = zeroed_string,
19932 .klen = 32,
19933 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
19934 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
19935 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
19936 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
19937 .ilen = 32,
19938 .result = zeroed_string,
19939 .rlen = 16,
19940 }, {
19941 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19942 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19943 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19944 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19945 .klen = 32,
19946 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19947 "\xde\xca\xf8\x88",
19948 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
19949 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
19950 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
19951 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
19952 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
19953 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
19954 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
19955 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
19956 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
19957 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
19958 .ilen = 80,
19959 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19960 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19961 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19962 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19963 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19964 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19965 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19966 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19967 .rlen = 64,
19968 }, {
19969 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19970 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19971 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19972 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19973 .klen = 32,
19974 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19975 "\xde\xca\xf8\x88",
19976 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
19977 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
19978 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
19979 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
19980 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
19981 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
19982 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
19983 "\xbc\xc9\xf6\x62"
19984 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
19985 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
19986 .ilen = 76,
19987 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19988 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19989 "\xab\xad\xda\xd2",
19990 .alen = 20,
19991 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19992 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19993 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19994 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19995 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19996 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19997 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19998 "\xba\x63\x7b\x39",
19999 .rlen = 60,
20000 .np = 2,
20001 .tap = { 48, 28 },
20002 .anp = 3,
20003 .atap = { 8, 8, 4 }
20004 }, {
20005 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20006 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20007 .klen = 16,
20008 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20009 "\xde\xca\xf8\x88",
20010 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20011 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20012 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20013 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20014 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20015 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20016 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20017 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
20018 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
20019 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
20020 .ilen = 80,
20021 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20022 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20023 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20024 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20025 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20026 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20027 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20028 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20029 .rlen = 64,
20030 }, {
20031 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20032 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20033 .klen = 16,
20034 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20035 "\xde\xca\xf8\x88",
20036 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20037 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20038 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20039 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20040 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20041 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20042 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20043 "\x3d\x58\xe0\x91"
20044 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
20045 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
20046 .ilen = 76,
20047 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20048 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20049 "\xab\xad\xda\xd2",
20050 .alen = 20,
20051 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20052 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20053 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20054 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20055 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20056 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20057 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20058 "\xba\x63\x7b\x39",
20059 .rlen = 60,
20060 }, {
20061 .key = zeroed_string,
20062 .klen = 24,
20063 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
20064 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
20065 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
20066 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
20067 .ilen = 32,
20068 .result = zeroed_string,
20069 .rlen = 16,
20070 }, {
20071 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20072 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20073 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20074 .klen = 24,
20075 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20076 "\xde\xca\xf8\x88",
20077 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20078 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20079 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20080 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20081 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20082 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20083 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20084 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
20085 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
20086 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
20087 .ilen = 80,
20088 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20089 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20090 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20091 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20092 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20093 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20094 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20095 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20096 .rlen = 64,
20097 }, {
20098 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20099 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20100 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20101 .klen = 24,
20102 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20103 "\xde\xca\xf8\x88",
20104 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20105 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20106 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20107 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20108 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20109 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20110 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20111 "\xcc\xda\x27\x10"
20112 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
20113 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
20114 .ilen = 76,
20115 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20116 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20117 "\xab\xad\xda\xd2",
20118 .alen = 20,
20119 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20120 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20121 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20122 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20123 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20124 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20125 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20126 "\xba\x63\x7b\x39",
20127 .rlen = 60,
20128 }
20129};
20130
Adrian Hoban69435b92010-11-04 15:02:04 -040020131static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
20132 { /* Generated using Crypto++ */
20133 .key = zeroed_string,
20134 .klen = 20,
20135 .iv = zeroed_string,
20136 .input = zeroed_string,
20137 .ilen = 16,
20138 .assoc = zeroed_string,
20139 .alen = 8,
20140 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
20141 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20142 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20143 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
20144 .rlen = 32,
20145 },{
20146 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20147 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20148 "\x00\x00\x00\x00",
20149 .klen = 20,
20150 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20151 "\x00\x00\x00\x00",
20152 .input = zeroed_string,
20153 .ilen = 16,
20154 .assoc = zeroed_string,
20155 .alen = 8,
20156 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
20157 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20158 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20159 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
20160 .rlen = 32,
20161
20162 }, {
20163 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20164 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20165 "\x00\x00\x00\x00",
20166 .klen = 20,
20167 .iv = zeroed_string,
20168 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20169 "\x01\x01\x01\x01\x01\x01\x01\x01",
20170 .ilen = 16,
20171 .assoc = zeroed_string,
20172 .alen = 8,
20173 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20174 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20175 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20176 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
20177 .rlen = 32,
20178 }, {
20179 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20180 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20181 "\x00\x00\x00\x00",
20182 .klen = 20,
20183 .iv = zeroed_string,
20184 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20185 "\x01\x01\x01\x01\x01\x01\x01\x01",
20186 .ilen = 16,
20187 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20188 .alen = 8,
20189 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20190 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20191 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20192 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
20193 .rlen = 32,
20194 }, {
20195 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20196 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20197 "\x00\x00\x00\x00",
20198 .klen = 20,
20199 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20200 "\x00\x00\x00\x00",
20201 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20202 "\x01\x01\x01\x01\x01\x01\x01\x01",
20203 .ilen = 16,
20204 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20205 .alen = 8,
20206 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20207 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20208 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20209 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
20210 .rlen = 32,
20211 }, {
20212 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20213 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20214 "\x00\x00\x00\x00",
20215 .klen = 20,
20216 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20217 "\x00\x00\x00\x00",
20218 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20219 "\x01\x01\x01\x01\x01\x01\x01\x01"
20220 "\x01\x01\x01\x01\x01\x01\x01\x01"
20221 "\x01\x01\x01\x01\x01\x01\x01\x01"
20222 "\x01\x01\x01\x01\x01\x01\x01\x01"
20223 "\x01\x01\x01\x01\x01\x01\x01\x01"
20224 "\x01\x01\x01\x01\x01\x01\x01\x01"
20225 "\x01\x01\x01\x01\x01\x01\x01\x01",
20226 .ilen = 64,
20227 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20228 .alen = 8,
20229 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20230 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20231 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20232 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20233 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20234 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20235 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20236 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20237 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20238 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
20239 .rlen = 80,
20240 }, {
20241 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20242 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20243 "\x00\x00\x00\x00",
20244 .klen = 20,
20245 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
20246 "\x00\x00\x00\x00",
20247 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
20248 "\xff\xff\xff\xff\xff\xff\xff\xff"
20249 "\xff\xff\xff\xff\xff\xff\xff\xff"
20250 "\xff\xff\xff\xff\xff\xff\xff\xff"
20251 "\xff\xff\xff\xff\xff\xff\xff\xff"
20252 "\xff\xff\xff\xff\xff\xff\xff\xff"
20253 "\xff\xff\xff\xff\xff\xff\xff\xff"
20254 "\xff\xff\xff\xff\xff\xff\xff\xff"
20255 "\xff\xff\xff\xff\xff\xff\xff\xff"
20256 "\xff\xff\xff\xff\xff\xff\xff\xff"
20257 "\xff\xff\xff\xff\xff\xff\xff\xff"
20258 "\xff\xff\xff\xff\xff\xff\xff\xff"
20259 "\xff\xff\xff\xff\xff\xff\xff\xff"
20260 "\xff\xff\xff\xff\xff\xff\xff\xff"
20261 "\xff\xff\xff\xff\xff\xff\xff\xff"
20262 "\xff\xff\xff\xff\xff\xff\xff\xff"
20263 "\xff\xff\xff\xff\xff\xff\xff\xff"
20264 "\xff\xff\xff\xff\xff\xff\xff\xff"
20265 "\xff\xff\xff\xff\xff\xff\xff\xff"
20266 "\xff\xff\xff\xff\xff\xff\xff\xff"
20267 "\xff\xff\xff\xff\xff\xff\xff\xff"
20268 "\xff\xff\xff\xff\xff\xff\xff\xff"
20269 "\xff\xff\xff\xff\xff\xff\xff\xff"
20270 "\xff\xff\xff\xff\xff\xff\xff\xff",
20271 .ilen = 192,
20272 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20273 "\xaa\xaa\xaa\xaa",
20274 .alen = 12,
20275 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20276 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20277 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20278 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20279 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20280 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20281 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20282 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20283 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20284 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20285 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20286 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20287 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20288 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20289 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20290 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20291 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20292 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20293 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20294 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20295 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20296 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20297 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20298 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20299 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20300 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20301 .rlen = 208,
Herbert Xu8f69b762015-06-16 13:54:26 +080020302 }, { /* From draft-mcgrew-gcm-test-01 */
20303 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20304 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20305 "\x2E\x44\x3B\x68",
20306 .klen = 20,
20307 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20308 .input = "\x45\x00\x00\x48\x69\x9A\x00\x00"
20309 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
20310 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
20311 "\x38\xD3\x01\x00\x00\x01\x00\x00"
20312 "\x00\x00\x00\x00\x04\x5F\x73\x69"
20313 "\x70\x04\x5F\x75\x64\x70\x03\x73"
20314 "\x69\x70\x09\x63\x79\x62\x65\x72"
20315 "\x63\x69\x74\x79\x02\x64\x6B\x00"
20316 "\x00\x21\x00\x01\x01\x02\x02\x01",
20317 .ilen = 72,
20318 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
20319 "\x00\x00\x00\x00",
20320 .alen = 12,
20321 .result = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
20322 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
20323 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
20324 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
20325 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
20326 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
20327 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
20328 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
20329 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
20330 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
20331 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
20332 .rlen = 88,
20333 }, {
20334 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20335 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20336 "\xCA\xFE\xBA\xBE",
20337 .klen = 20,
20338 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20339 .input = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
20340 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
20341 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
20342 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
20343 "\x00\x01\x00\x00\x00\x00\x00\x00"
20344 "\x03\x73\x69\x70\x09\x63\x79\x62"
20345 "\x65\x72\x63\x69\x74\x79\x02\x64"
20346 "\x6B\x00\x00\x01\x00\x01\x00\x01",
20347 .ilen = 64,
20348 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A",
20349 .alen = 8,
20350 .result = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
20351 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
20352 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
20353 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
20354 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
20355 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
20356 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
20357 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
20358 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
20359 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
20360 .rlen = 80,
20361 }, {
20362 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20363 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20364 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20365 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20366 "\x11\x22\x33\x44",
20367 .klen = 36,
20368 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
20369 .input = "\x45\x00\x00\x30\x69\xA6\x40\x00"
20370 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
20371 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
20372 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
20373 "\x70\x02\x40\x00\x20\xBF\x00\x00"
20374 "\x02\x04\x05\xB4\x01\x01\x04\x02"
20375 "\x01\x02\x02\x01",
20376 .ilen = 52,
20377 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02",
20378 .alen = 8,
20379 .result = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
20380 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
20381 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
20382 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
20383 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
20384 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
20385 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
20386 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
20387 "\x15\x95\x6C\x96",
20388 .rlen = 68,
20389 }, {
20390 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
20391 "\x00\x00\x00\x00\x00\x00\x00\x00"
20392 "\x00\x00\x00\x00",
20393 .klen = 20,
20394 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20395 .input = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
20396 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
20397 "\x01\x01\x01\x01\x08\x00\x07\x5C"
20398 "\x02\x00\x44\x00\x61\x62\x63\x64"
20399 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20400 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20401 "\x75\x76\x77\x61\x62\x63\x64\x65"
20402 "\x66\x67\x68\x69\x01\x02\x02\x01",
20403 .ilen = 64,
20404 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01",
20405 .alen = 8,
20406 .result = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
20407 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
20408 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
20409 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
20410 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
20411 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
20412 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
20413 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
20414 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
20415 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
20416 .rlen = 80,
20417 }, {
20418 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20419 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20420 "\x57\x69\x0E\x43",
20421 .klen = 20,
20422 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20423 .input = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
20424 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
20425 "\x01\x01\x01\x01\x08\x00\x08\x5C"
20426 "\x02\x00\x43\x00\x61\x62\x63\x64"
20427 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20428 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20429 "\x75\x76\x77\x61\x62\x63\x64\x65"
20430 "\x66\x67\x68\x69\x01\x02\x02\x01",
20431 .ilen = 64,
20432 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20433 "\x10\x10\x10\x10",
20434 .alen = 12,
20435 .result = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
20436 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
20437 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
20438 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
20439 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20440 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20441 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
20442 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
20443 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
20444 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
20445 .rlen = 80,
20446 }, {
20447 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20448 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20449 "\x57\x69\x0E\x43",
20450 .klen = 20,
20451 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20452 .input = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
20453 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
20454 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
20455 "\x01\x02\x02\x01",
20456 .ilen = 28,
20457 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20458 "\x10\x10\x10\x10",
20459 .alen = 12,
20460 .result = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
20461 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
20462 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
20463 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
20464 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
20465 "\xE7\xD0\x5D\x35",
20466 .rlen = 44,
20467 }, {
20468 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20469 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20470 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20471 "\xCA\xFE\xBA\xBE",
20472 .klen = 28,
20473 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20474 .input = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
20475 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
20476 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
20477 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
20478 "\x50\x10\x16\xD0\x75\x68\x00\x01",
20479 .ilen = 40,
20480 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A",
20481 .alen = 8,
20482 .result = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
20483 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
20484 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
20485 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
20486 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
20487 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
20488 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
20489 .rlen = 56,
20490 }, {
20491 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20492 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20493 "\xDE\xCA\xF8\x88",
20494 .klen = 20,
20495 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20496 .input = "\x45\x00\x00\x49\x33\xBA\x00\x00"
20497 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
20498 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20499 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
20500 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
20501 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
20502 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
20503 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
20504 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
20505 "\x23\x01\x01\x01",
20506 .ilen = 76,
20507 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
20508 "\x00\x00\x00\x01",
20509 .alen = 12,
20510 .result = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
20511 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
20512 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
20513 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
20514 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
20515 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
20516 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
20517 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
20518 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
20519 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
20520 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
20521 "\x69\x62\x34\x36",
20522 .rlen = 92,
20523 }, {
20524 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20525 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20526 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20527 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20528 "\x73\x61\x6C\x74",
20529 .klen = 36,
20530 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20531 .input = "\x45\x08\x00\x28\x73\x2C\x00\x00"
20532 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
20533 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
20534 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
20535 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
20536 .ilen = 40,
20537 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
20538 "\xDD\x0D\xB9\x9B",
20539 .alen = 12,
20540 .result = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
20541 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
20542 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
20543 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
20544 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
20545 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
20546 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
20547 .rlen = 56,
20548 }, {
20549 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20550 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20551 "\x57\x69\x0E\x43",
20552 .klen = 20,
20553 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20554 .input = "\x45\x00\x00\x49\x33\x3E\x00\x00"
20555 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
20556 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20557 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
20558 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
20559 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
20560 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
20561 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
20562 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
20563 "\x15\x01\x01\x01",
20564 .ilen = 76,
20565 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20566 "\x10\x10\x10\x10",
20567 .alen = 12,
20568 .result = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
20569 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
20570 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
20571 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
20572 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
20573 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
20574 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
20575 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
20576 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
20577 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
20578 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
20579 "\x8C\xAA\x81\xE2",
20580 .rlen = 92,
20581 }, {
20582 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20583 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20584 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20585 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20586 "\x73\x61\x6C\x74",
20587 .klen = 36,
20588 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20589 .input = "\x63\x69\x73\x63\x6F\x01\x72\x75"
20590 "\x6C\x65\x73\x01\x74\x68\x65\x01"
20591 "\x6E\x65\x74\x77\x65\x01\x64\x65"
20592 "\x66\x69\x6E\x65\x01\x74\x68\x65"
20593 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
20594 "\x67\x69\x65\x73\x01\x74\x68\x61"
20595 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
20596 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
20597 "\x72\x72\x6F\x77\x01\x02\x02\x01",
20598 .ilen = 72,
20599 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
20600 "\xDD\x0D\xB9\x9B",
20601 .alen = 12,
20602 .result = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
20603 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
20604 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
20605 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
20606 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
20607 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
20608 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
20609 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
20610 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
20611 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
20612 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
20613 .rlen = 88,
20614 }, {
20615 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
20616 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
20617 "\xD9\x66\x42\x67",
20618 .klen = 20,
20619 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
20620 .input = "\x01\x02\x02\x01",
20621 .ilen = 4,
20622 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF",
20623 .alen = 8,
20624 .result = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
20625 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
20626 "\x04\xBE\xF2\x70",
20627 .rlen = 20,
20628 }, {
20629 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20630 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20631 "\xDE\xCA\xF8\x88",
20632 .klen = 20,
20633 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20634 .input = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
20635 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
20636 "\x62\x65\x00\x01",
20637 .ilen = 20,
20638 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
20639 "\x00\x00\x00\x01",
20640 .alen = 12,
20641 .result = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
20642 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
20643 "\x43\x33\x21\x64\x41\x25\x03\x52"
20644 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
20645 "\x43\xAF\x8C\x3E",
20646 .rlen = 36,
20647 }, {
20648 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
20649 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
20650 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
20651 "\x62\x65\x66\x6F\x72\x65\x69\x61"
20652 "\x74\x75\x72\x6E",
20653 .klen = 36,
20654 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
20655 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20656 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20657 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20658 "\x02\x00\x07\x00\x61\x62\x63\x64"
20659 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20660 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20661 "\x01\x02\x02\x01",
20662 .ilen = 52,
20663 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
20664 "\xFF\xFF\xFF\xFF",
20665 .alen = 12,
20666 .result = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
20667 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
20668 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
20669 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
20670 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
20671 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
20672 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
20673 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
20674 "\x9F\xB4\xC0\x53",
20675 .rlen = 68,
20676 }, {
20677 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20678 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20679 "\x57\x69\x0E\x43",
20680 .klen = 20,
20681 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20682 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20683 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20684 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20685 "\x02\x00\x07\x00\x61\x62\x63\x64"
20686 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20687 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20688 "\x01\x02\x02\x01",
20689 .ilen = 52,
20690 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
20691 "\x10\x10\x10\x10",
20692 .alen = 12,
20693 .result = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
20694 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
20695 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
20696 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
20697 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20698 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20699 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
20700 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
20701 "\x40\xD7\xCB\x05",
20702 .rlen = 68,
20703 }, {
20704 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20705 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20706 "\x22\x43\x3C\x64",
20707 .klen = 20,
20708 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
20709 .input = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
20710 "\x61\x62\x63\x64\x65\x66\x67\x68"
20711 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
20712 "\x71\x72\x73\x74\x01\x02\x02\x01",
20713 .ilen = 32,
20714 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
20715 "\x00\x00\x00\x07",
20716 .alen = 12,
20717 .result = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
20718 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
20719 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
20720 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
20721 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
20722 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
20723 .rlen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040020724 }
20725};
20726
20727static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
20728 { /* Generated using Crypto++ */
20729 .key = zeroed_string,
20730 .klen = 20,
20731 .iv = zeroed_string,
20732 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
20733 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20734 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20735 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
20736 .ilen = 32,
20737 .assoc = zeroed_string,
20738 .alen = 8,
20739 .result = zeroed_string,
20740 .rlen = 16,
20741
20742 },{
20743 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20744 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20745 "\x00\x00\x00\x00",
20746 .klen = 20,
20747 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20748 "\x00\x00\x00\x00",
20749 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
20750 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20751 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20752 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
20753 .ilen = 32,
20754 .assoc = zeroed_string,
20755 .alen = 8,
20756 .result = zeroed_string,
20757 .rlen = 16,
20758 }, {
20759 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20760 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20761 "\x00\x00\x00\x00",
20762 .klen = 20,
20763 .iv = zeroed_string,
20764 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20765 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20766 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20767 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
20768 .ilen = 32,
20769 .assoc = zeroed_string,
20770 .alen = 8,
20771 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20772 "\x01\x01\x01\x01\x01\x01\x01\x01",
20773 .rlen = 16,
20774 }, {
20775 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20776 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20777 "\x00\x00\x00\x00",
20778 .klen = 20,
20779 .iv = zeroed_string,
20780 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20781 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20782 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20783 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
20784 .ilen = 32,
20785 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20786 .alen = 8,
20787 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20788 "\x01\x01\x01\x01\x01\x01\x01\x01",
20789 .rlen = 16,
20790
20791 }, {
20792 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20793 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20794 "\x00\x00\x00\x00",
20795 .klen = 20,
20796 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20797 "\x00\x00\x00\x00",
20798 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20799 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20800 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20801 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
20802 .ilen = 32,
20803 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20804 .alen = 8,
20805 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20806 "\x01\x01\x01\x01\x01\x01\x01\x01",
20807 .rlen = 16,
20808 }, {
20809 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20810 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20811 "\x00\x00\x00\x00",
20812 .klen = 20,
20813 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20814 "\x00\x00\x00\x00",
20815 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20816 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20817 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20818 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20819 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20820 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20821 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20822 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20823 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20824 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
20825 .ilen = 80,
20826 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20827 .alen = 8,
20828 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20829 "\x01\x01\x01\x01\x01\x01\x01\x01"
20830 "\x01\x01\x01\x01\x01\x01\x01\x01"
20831 "\x01\x01\x01\x01\x01\x01\x01\x01"
20832 "\x01\x01\x01\x01\x01\x01\x01\x01"
20833 "\x01\x01\x01\x01\x01\x01\x01\x01"
20834 "\x01\x01\x01\x01\x01\x01\x01\x01"
20835 "\x01\x01\x01\x01\x01\x01\x01\x01",
20836 .rlen = 64,
20837 }, {
20838 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20839 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20840 "\x00\x00\x00\x00",
20841 .klen = 20,
20842 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
20843 "\x00\x00\x00\x00",
20844 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20845 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20846 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20847 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20848 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20849 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20850 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20851 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20852 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20853 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20854 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20855 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20856 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20857 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20858 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20859 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20860 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20861 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20862 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20863 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20864 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20865 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20866 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20867 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20868 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20869 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20870 .ilen = 208,
20871 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20872 "\xaa\xaa\xaa\xaa",
20873 .alen = 12,
20874 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
20875 "\xff\xff\xff\xff\xff\xff\xff\xff"
20876 "\xff\xff\xff\xff\xff\xff\xff\xff"
20877 "\xff\xff\xff\xff\xff\xff\xff\xff"
20878 "\xff\xff\xff\xff\xff\xff\xff\xff"
20879 "\xff\xff\xff\xff\xff\xff\xff\xff"
20880 "\xff\xff\xff\xff\xff\xff\xff\xff"
20881 "\xff\xff\xff\xff\xff\xff\xff\xff"
20882 "\xff\xff\xff\xff\xff\xff\xff\xff"
20883 "\xff\xff\xff\xff\xff\xff\xff\xff"
20884 "\xff\xff\xff\xff\xff\xff\xff\xff"
20885 "\xff\xff\xff\xff\xff\xff\xff\xff"
20886 "\xff\xff\xff\xff\xff\xff\xff\xff"
20887 "\xff\xff\xff\xff\xff\xff\xff\xff"
20888 "\xff\xff\xff\xff\xff\xff\xff\xff"
20889 "\xff\xff\xff\xff\xff\xff\xff\xff"
20890 "\xff\xff\xff\xff\xff\xff\xff\xff"
20891 "\xff\xff\xff\xff\xff\xff\xff\xff"
20892 "\xff\xff\xff\xff\xff\xff\xff\xff"
20893 "\xff\xff\xff\xff\xff\xff\xff\xff"
20894 "\xff\xff\xff\xff\xff\xff\xff\xff"
20895 "\xff\xff\xff\xff\xff\xff\xff\xff"
20896 "\xff\xff\xff\xff\xff\xff\xff\xff"
20897 "\xff\xff\xff\xff\xff\xff\xff\xff",
20898 .rlen = 192,
Herbert Xu8f69b762015-06-16 13:54:26 +080020899 }, {
20900 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20901 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20902 "\x2E\x44\x3B\x68",
20903 .klen = 20,
20904 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20905 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
20906 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
20907 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
20908 "\x38\xD3\x01\x00\x00\x01\x00\x00"
20909 "\x00\x00\x00\x00\x04\x5F\x73\x69"
20910 "\x70\x04\x5F\x75\x64\x70\x03\x73"
20911 "\x69\x70\x09\x63\x79\x62\x65\x72"
20912 "\x63\x69\x74\x79\x02\x64\x6B\x00"
20913 "\x00\x21\x00\x01\x01\x02\x02\x01",
20914 .rlen = 72,
20915 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
20916 "\x00\x00\x00\x00",
20917 .alen = 12,
20918 .input = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
20919 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
20920 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
20921 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
20922 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
20923 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
20924 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
20925 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
20926 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
20927 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
20928 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
20929 .ilen = 88,
20930 }, {
20931 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20932 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20933 "\xCA\xFE\xBA\xBE",
20934 .klen = 20,
20935 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20936 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
20937 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
20938 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
20939 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
20940 "\x00\x01\x00\x00\x00\x00\x00\x00"
20941 "\x03\x73\x69\x70\x09\x63\x79\x62"
20942 "\x65\x72\x63\x69\x74\x79\x02\x64"
20943 "\x6B\x00\x00\x01\x00\x01\x00\x01",
20944 .rlen = 64,
20945 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A",
20946 .alen = 8,
20947 .input = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
20948 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
20949 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
20950 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
20951 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
20952 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
20953 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
20954 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
20955 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
20956 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
20957 .ilen = 80,
20958 }, {
20959 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20960 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20961 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20962 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20963 "\x11\x22\x33\x44",
20964 .klen = 36,
20965 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
20966 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
20967 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
20968 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
20969 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
20970 "\x70\x02\x40\x00\x20\xBF\x00\x00"
20971 "\x02\x04\x05\xB4\x01\x01\x04\x02"
20972 "\x01\x02\x02\x01",
20973 .rlen = 52,
20974 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02",
20975 .alen = 8,
20976 .input = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
20977 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
20978 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
20979 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
20980 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
20981 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
20982 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
20983 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
20984 "\x15\x95\x6C\x96",
20985 .ilen = 68,
20986 }, {
20987 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
20988 "\x00\x00\x00\x00\x00\x00\x00\x00"
20989 "\x00\x00\x00\x00",
20990 .klen = 20,
20991 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20992 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
20993 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
20994 "\x01\x01\x01\x01\x08\x00\x07\x5C"
20995 "\x02\x00\x44\x00\x61\x62\x63\x64"
20996 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20997 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20998 "\x75\x76\x77\x61\x62\x63\x64\x65"
20999 "\x66\x67\x68\x69\x01\x02\x02\x01",
21000 .rlen = 64,
21001 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01",
21002 .alen = 8,
21003 .input = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
21004 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
21005 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
21006 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
21007 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
21008 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
21009 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
21010 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
21011 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
21012 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
21013 .ilen = 80,
21014 }, {
21015 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21016 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21017 "\x57\x69\x0E\x43",
21018 .klen = 20,
21019 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21020 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
21021 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
21022 "\x01\x01\x01\x01\x08\x00\x08\x5C"
21023 "\x02\x00\x43\x00\x61\x62\x63\x64"
21024 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21025 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21026 "\x75\x76\x77\x61\x62\x63\x64\x65"
21027 "\x66\x67\x68\x69\x01\x02\x02\x01",
21028 .rlen = 64,
21029 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
21030 "\x10\x10\x10\x10",
21031 .alen = 12,
21032 .input = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
21033 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
21034 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
21035 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
21036 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21037 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21038 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
21039 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
21040 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
21041 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
21042 .ilen = 80,
21043 }, {
21044 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21045 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21046 "\x57\x69\x0E\x43",
21047 .klen = 20,
21048 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21049 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
21050 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
21051 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
21052 "\x01\x02\x02\x01",
21053 .rlen = 28,
21054 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
21055 "\x10\x10\x10\x10",
21056 .alen = 12,
21057 .input = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
21058 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
21059 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
21060 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
21061 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
21062 "\xE7\xD0\x5D\x35",
21063 .ilen = 44,
21064 }, {
21065 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21066 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21067 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21068 "\xCA\xFE\xBA\xBE",
21069 .klen = 28,
21070 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21071 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
21072 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
21073 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
21074 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
21075 "\x50\x10\x16\xD0\x75\x68\x00\x01",
21076 .rlen = 40,
21077 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A",
21078 .alen = 8,
21079 .input = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
21080 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
21081 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
21082 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
21083 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
21084 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
21085 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
21086 .ilen = 56,
21087 }, {
21088 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21089 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21090 "\xDE\xCA\xF8\x88",
21091 .klen = 20,
21092 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21093 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
21094 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
21095 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21096 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
21097 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
21098 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
21099 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
21100 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
21101 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
21102 "\x23\x01\x01\x01",
21103 .rlen = 76,
21104 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
21105 "\x00\x00\x00\x01",
21106 .alen = 12,
21107 .input = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
21108 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
21109 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
21110 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
21111 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
21112 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
21113 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
21114 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
21115 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
21116 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
21117 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
21118 "\x69\x62\x34\x36",
21119 .ilen = 92,
21120 }, {
21121 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21122 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21123 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21124 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21125 "\x73\x61\x6C\x74",
21126 .klen = 36,
21127 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21128 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
21129 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
21130 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
21131 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
21132 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
21133 .rlen = 40,
21134 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
21135 "\xDD\x0D\xB9\x9B",
21136 .alen = 12,
21137 .input = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
21138 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
21139 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
21140 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
21141 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
21142 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
21143 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
21144 .ilen = 56,
21145 }, {
21146 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21147 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21148 "\x57\x69\x0E\x43",
21149 .klen = 20,
21150 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21151 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
21152 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
21153 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21154 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
21155 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
21156 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
21157 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
21158 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
21159 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
21160 "\x15\x01\x01\x01",
21161 .rlen = 76,
21162 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
21163 "\x10\x10\x10\x10",
21164 .alen = 12,
21165 .input = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
21166 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
21167 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
21168 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
21169 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
21170 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
21171 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
21172 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
21173 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
21174 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
21175 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
21176 "\x8C\xAA\x81\xE2",
21177 .ilen = 92,
21178 }, {
21179 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21180 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21181 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21182 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21183 "\x73\x61\x6C\x74",
21184 .klen = 36,
21185 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21186 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
21187 "\x6C\x65\x73\x01\x74\x68\x65\x01"
21188 "\x6E\x65\x74\x77\x65\x01\x64\x65"
21189 "\x66\x69\x6E\x65\x01\x74\x68\x65"
21190 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
21191 "\x67\x69\x65\x73\x01\x74\x68\x61"
21192 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
21193 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
21194 "\x72\x72\x6F\x77\x01\x02\x02\x01",
21195 .rlen = 72,
21196 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
21197 "\xDD\x0D\xB9\x9B",
21198 .alen = 12,
21199 .input = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
21200 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
21201 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
21202 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
21203 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
21204 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
21205 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
21206 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
21207 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
21208 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
21209 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
21210 .ilen = 88,
21211 }, {
21212 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
21213 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
21214 "\xD9\x66\x42\x67",
21215 .klen = 20,
21216 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21217 .result = "\x01\x02\x02\x01",
21218 .rlen = 4,
21219 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF",
21220 .alen = 8,
21221 .input = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
21222 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
21223 "\x04\xBE\xF2\x70",
21224 .ilen = 20,
21225 }, {
21226 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21227 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21228 "\xDE\xCA\xF8\x88",
21229 .klen = 20,
21230 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21231 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
21232 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
21233 "\x62\x65\x00\x01",
21234 .rlen = 20,
21235 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
21236 "\x00\x00\x00\x01",
21237 .alen = 12,
21238 .input = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
21239 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
21240 "\x43\x33\x21\x64\x41\x25\x03\x52"
21241 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
21242 "\x43\xAF\x8C\x3E",
21243 .ilen = 36,
21244 }, {
21245 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
21246 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
21247 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
21248 "\x62\x65\x66\x6F\x72\x65\x69\x61"
21249 "\x74\x75\x72\x6E",
21250 .klen = 36,
21251 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
21252 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21253 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21254 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21255 "\x02\x00\x07\x00\x61\x62\x63\x64"
21256 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21257 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21258 "\x01\x02\x02\x01",
21259 .rlen = 52,
21260 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
21261 "\xFF\xFF\xFF\xFF",
21262 .alen = 12,
21263 .input = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
21264 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
21265 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
21266 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
21267 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
21268 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
21269 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
21270 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
21271 "\x9F\xB4\xC0\x53",
21272 .ilen = 68,
21273 }, {
21274 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21275 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21276 "\x57\x69\x0E\x43",
21277 .klen = 20,
21278 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21279 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21280 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21281 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21282 "\x02\x00\x07\x00\x61\x62\x63\x64"
21283 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21284 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21285 "\x01\x02\x02\x01",
21286 .rlen = 52,
21287 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
21288 "\x10\x10\x10\x10",
21289 .alen = 12,
21290 .input = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
21291 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
21292 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
21293 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
21294 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21295 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21296 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
21297 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
21298 "\x40\xD7\xCB\x05",
21299 .ilen = 68,
21300 }, {
21301 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21302 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21303 "\x22\x43\x3C\x64",
21304 .klen = 20,
21305 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
21306 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
21307 "\x61\x62\x63\x64\x65\x66\x67\x68"
21308 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
21309 "\x71\x72\x73\x74\x01\x02\x02\x01",
21310 .rlen = 32,
21311 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
21312 "\x00\x00\x00\x07",
21313 .alen = 12,
21314 .input = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
21315 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
21316 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
21317 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
21318 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
21319 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
21320 .ilen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040021321 }
21322};
21323
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021324static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = {
21325 { /* From draft-mcgrew-gcm-test-01 */
21326 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21327 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21328 "\x22\x43\x3c\x64",
21329 .klen = 20,
21330 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021331 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21332 "\x00\x00\x00\x00\x00\x00\x00\x00",
21333 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021334 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21335 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21336 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21337 "\x02\x00\x07\x00\x61\x62\x63\x64"
21338 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21339 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21340 "\x01\x02\x02\x01",
21341 .ilen = 52,
21342 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21343 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21344 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21345 "\x02\x00\x07\x00\x61\x62\x63\x64"
21346 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21347 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21348 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21349 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21350 "\xe4\x09\x9a\xaa",
21351 .rlen = 68,
21352 }
21353};
21354
21355static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = {
21356 { /* From draft-mcgrew-gcm-test-01 */
21357 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21358 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21359 "\x22\x43\x3c\x64",
21360 .klen = 20,
21361 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021362 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21363 "\x00\x00\x00\x00\x00\x00\x00\x00",
21364 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021365 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21366 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21367 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21368 "\x02\x00\x07\x00\x61\x62\x63\x64"
21369 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21370 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21371 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21372 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21373 "\xe4\x09\x9a\xaa",
21374 .ilen = 68,
21375 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21376 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21377 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21378 "\x02\x00\x07\x00\x61\x62\x63\x64"
21379 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21380 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21381 "\x01\x02\x02\x01",
21382 .rlen = 52,
21383 }, { /* nearly same as previous, but should fail */
21384 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21385 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21386 "\x22\x43\x3c\x64",
21387 .klen = 20,
21388 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021389 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21390 "\x00\x00\x00\x00\x00\x00\x00\x00",
21391 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021392 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21393 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21394 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21395 "\x02\x00\x07\x00\x61\x62\x63\x64"
21396 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21397 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21398 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21399 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21400 "\x00\x00\x00\x00",
21401 .ilen = 68,
21402 .novrfy = 1,
21403 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21404 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21405 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21406 "\x02\x00\x07\x00\x61\x62\x63\x64"
21407 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21408 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21409 "\x01\x02\x02\x01",
21410 .rlen = 52,
21411 },
21412};
21413
Herbert Xuda7f0332008-07-31 17:08:25 +080021414static struct aead_testvec aes_ccm_enc_tv_template[] = {
21415 { /* From RFC 3610 */
21416 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21417 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21418 .klen = 16,
21419 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21420 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21421 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21422 .alen = 8,
21423 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21424 "\x10\x11\x12\x13\x14\x15\x16\x17"
21425 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21426 .ilen = 23,
21427 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21428 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21429 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21430 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21431 .rlen = 31,
21432 }, {
21433 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21434 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21435 .klen = 16,
21436 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
21437 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21438 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21439 "\x08\x09\x0a\x0b",
21440 .alen = 12,
21441 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21442 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21443 "\x1c\x1d\x1e\x1f",
21444 .ilen = 20,
21445 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21446 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21447 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21448 "\x7d\x9c\x2d\x93",
21449 .rlen = 28,
21450 }, {
21451 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21452 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21453 .klen = 16,
21454 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21455 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21456 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21457 .alen = 8,
21458 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21459 "\x10\x11\x12\x13\x14\x15\x16\x17"
21460 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21461 "\x20",
21462 .ilen = 25,
21463 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21464 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21465 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21466 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21467 "\x7e\x5f\x4e",
21468 .rlen = 35,
21469 }, {
21470 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21471 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21472 .klen = 16,
21473 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21474 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21475 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21476 "\x08\x09\x0a\x0b",
21477 .alen = 12,
21478 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21479 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21480 "\x1c\x1d\x1e",
21481 .ilen = 19,
21482 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
21483 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21484 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21485 "\x4d\x99\x99\x88\xdd",
21486 .rlen = 29,
21487 }, {
21488 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21489 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21490 .klen = 16,
21491 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21492 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21493 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21494 .alen = 8,
21495 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21496 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21497 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21498 .ilen = 24,
21499 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21500 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21501 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21502 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21503 .rlen = 32,
21504 }, {
21505 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21506 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21507 .klen = 16,
21508 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21509 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21510 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21511 "\x20\xea\x60\xc0",
21512 .alen = 12,
21513 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21514 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21515 "\x3a\x80\x3b\xa8\x7f",
21516 .ilen = 21,
21517 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21518 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21519 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21520 "\x5a\xe0\x70\x45\x51",
21521 .rlen = 29,
21522 }, {
21523 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21524 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21525 .klen = 16,
21526 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21527 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21528 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21529 .alen = 8,
21530 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21531 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21532 "\x98\x09\xd6\x7d\xbe\xdd\x18",
21533 .ilen = 23,
21534 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21535 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21536 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21537 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21538 "\xba",
21539 .rlen = 33,
Ard Biesheuvel45859882014-04-16 20:40:04 +080021540 }, {
21541 /*
21542 * This is the same vector as aes_ccm_rfc4309_enc_tv_template[0]
21543 * below but rewritten to use the ccm algorithm directly.
21544 */
21545 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
21546 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e",
21547 .klen = 16,
21548 .iv = "\x03\x96\xac\x59\x30\x07\xa1\xe2\xa2\xc7\x55\x24\0\0\0\0",
21549 .alen = 0,
21550 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
21551 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
21552 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
21553 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
21554 .ilen = 32,
21555 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
21556 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
21557 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
21558 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
21559 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
21560 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
21561 .rlen = 48,
21562 }
Herbert Xuda7f0332008-07-31 17:08:25 +080021563};
21564
21565static struct aead_testvec aes_ccm_dec_tv_template[] = {
21566 { /* From RFC 3610 */
21567 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21568 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21569 .klen = 16,
21570 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21571 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21572 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21573 .alen = 8,
21574 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21575 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21576 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21577 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21578 .ilen = 31,
21579 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21580 "\x10\x11\x12\x13\x14\x15\x16\x17"
21581 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21582 .rlen = 23,
21583 }, {
21584 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21585 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21586 .klen = 16,
21587 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
21588 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21589 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21590 "\x08\x09\x0a\x0b",
21591 .alen = 12,
21592 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21593 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21594 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21595 "\x7d\x9c\x2d\x93",
21596 .ilen = 28,
21597 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21598 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21599 "\x1c\x1d\x1e\x1f",
21600 .rlen = 20,
21601 }, {
21602 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21603 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21604 .klen = 16,
21605 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21606 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21607 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21608 .alen = 8,
21609 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21610 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21611 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21612 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21613 "\x7e\x5f\x4e",
21614 .ilen = 35,
21615 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21616 "\x10\x11\x12\x13\x14\x15\x16\x17"
21617 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21618 "\x20",
21619 .rlen = 25,
21620 }, {
21621 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21622 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21623 .klen = 16,
21624 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21625 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21626 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21627 "\x08\x09\x0a\x0b",
21628 .alen = 12,
21629 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
21630 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21631 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21632 "\x4d\x99\x99\x88\xdd",
21633 .ilen = 29,
21634 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21635 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21636 "\x1c\x1d\x1e",
21637 .rlen = 19,
21638 }, {
21639 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21640 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21641 .klen = 16,
21642 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21643 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21644 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21645 .alen = 8,
21646 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21647 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21648 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21649 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21650 .ilen = 32,
21651 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21652 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21653 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21654 .rlen = 24,
21655 }, {
21656 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21657 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21658 .klen = 16,
21659 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21660 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21661 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21662 "\x20\xea\x60\xc0",
21663 .alen = 12,
21664 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21665 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21666 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21667 "\x5a\xe0\x70\x45\x51",
21668 .ilen = 29,
21669 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21670 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21671 "\x3a\x80\x3b\xa8\x7f",
21672 .rlen = 21,
21673 }, {
21674 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21675 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21676 .klen = 16,
21677 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21678 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21679 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21680 .alen = 8,
21681 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21682 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21683 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21684 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21685 "\xba",
21686 .ilen = 33,
21687 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21688 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21689 "\x98\x09\xd6\x7d\xbe\xdd\x18",
21690 .rlen = 23,
21691 },
21692};
21693
Jarod Wilson5d667322009-05-04 19:23:40 +080021694/*
21695 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
21696 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
21697 * Special Publication 800-38C's test vectors also use nonce lengths our
21698 * implementation doesn't support. The following are taken from fips cavs
21699 * fax files on hand at Red Hat.
21700 *
21701 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
21702 * part of the nonce which combine w/the iv, but need to be input this way.
21703 */
21704static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
21705 {
21706 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
21707 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
21708 "\x96\xac\x59",
21709 .klen = 19,
21710 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
21711 .alen = 0,
21712 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
21713 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
21714 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
21715 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
21716 .ilen = 32,
21717 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
21718 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
21719 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
21720 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
21721 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
21722 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
21723 .rlen = 48,
21724 }, {
21725 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
21726 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
21727 "\x4f\xa3\x19",
21728 .klen = 19,
21729 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
21730 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
21731 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
21732 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
21733 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
21734 .alen = 32,
21735 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
21736 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
21737 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
21738 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
21739 .ilen = 32,
21740 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
21741 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
21742 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
21743 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
21744 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
21745 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
21746 .rlen = 48,
21747 }, {
21748 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
21749 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
21750 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
21751 "\xa0\x20\x35",
21752 .klen = 27,
21753 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
21754 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
21755 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
21756 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
21757 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
21758 .alen = 32,
21759 .ilen = 0,
21760 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
21761 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
21762 .rlen = 16,
21763 }, {
21764 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
21765 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
21766 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
21767 "\xd6\x3c\x8c",
21768 .klen = 27,
21769 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
21770 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
21771 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
21772 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
21773 "\xe3\x00\x73\x69\x84\x69\x87\x79",
21774 .alen = 32,
21775 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
21776 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
21777 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
21778 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
21779 .ilen = 32,
21780 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
21781 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
21782 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
21783 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
21784 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
21785 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
21786 .rlen = 48,
21787 }, {
21788 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
21789 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
21790 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
21791 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
21792 "\x1e\x29\x91",
21793 .klen = 35,
21794 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
21795 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
21796 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
21797 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
21798 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
21799 .alen = 32,
21800 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
21801 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
21802 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
21803 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
21804 .ilen = 32,
21805 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
21806 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
21807 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
21808 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
21809 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
21810 .rlen = 40,
21811 }, {
21812 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
21813 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
21814 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
21815 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
21816 "\xf9\xd9\x4e",
21817 .klen = 35,
21818 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
21819 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
21820 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
21821 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
21822 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
21823 .alen = 32,
21824 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
21825 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
21826 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
21827 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
21828 .ilen = 32,
21829 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
21830 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
21831 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
21832 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
21833 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
21834 "\x7b\x72\x8a\xf7",
21835 .rlen = 44,
21836 }, {
21837 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
21838 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
21839 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
21840 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
21841 "\x24\xa7\x8b",
21842 .klen = 35,
21843 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
21844 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
21845 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
21846 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
21847 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
21848 .alen = 32,
21849 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
21850 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
21851 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
21852 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
21853 .ilen = 32,
21854 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
21855 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
21856 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
21857 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
21858 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
21859 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
21860 .rlen = 48,
21861 },
21862};
21863
21864static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
21865 {
21866 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
21867 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
21868 "\xc6\xfb\x7d",
21869 .klen = 19,
21870 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
21871 .alen = 0,
21872 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
21873 .ilen = 8,
21874 .result = "\x00",
21875 .rlen = 0,
21876 .novrfy = 1,
21877 }, {
21878 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
21879 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
21880 "\xaf\x94\x87",
21881 .klen = 19,
21882 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
21883 .alen = 0,
21884 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
21885 .ilen = 8,
21886 .result = "\x00",
21887 .rlen = 0,
21888 }, {
21889 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
21890 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
21891 "\xc6\xfb\x7d",
21892 .klen = 19,
21893 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
21894 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
21895 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
21896 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
21897 "\xd8\x94\x99\x91\x81\x54\x62\x57",
21898 .alen = 32,
21899 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
21900 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
21901 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
21902 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
21903 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
21904 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
21905 .ilen = 48,
21906 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
21907 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
21908 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
21909 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
21910 .rlen = 32,
21911 .novrfy = 1,
21912 }, {
21913 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
21914 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
21915 "\x05\xe0\xc9",
21916 .klen = 19,
21917 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
21918 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
21919 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
21920 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
21921 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
21922 .alen = 32,
21923 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
21924 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
21925 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
21926 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
21927 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
21928 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
21929 .ilen = 48,
21930 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
21931 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
21932 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
21933 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
21934 .rlen = 32,
21935 }, {
21936 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
21937 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
21938 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
21939 "\xee\x49\x83",
21940 .klen = 27,
21941 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
21942 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
21943 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
21944 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
21945 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
21946 .alen = 32,
21947 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
21948 .ilen = 8,
21949 .result = "\x00",
21950 .rlen = 0,
21951 }, {
21952 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
21953 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
21954 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
21955 "\xee\x49\x83",
21956 .klen = 27,
21957 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
21958 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
21959 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
21960 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
21961 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
21962 .alen = 32,
21963 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
21964 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
21965 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
21966 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
21967 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
21968 .ilen = 40,
21969 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
21970 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
21971 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
21972 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
21973 .rlen = 32,
21974 }, {
21975 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
21976 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
21977 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
21978 "\xd1\xfc\x57",
21979 .klen = 27,
21980 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
21981 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
21982 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
21983 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
21984 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
21985 .alen = 32,
21986 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
21987 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
21988 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
21989 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
21990 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
21991 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
21992 .ilen = 48,
21993 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
21994 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
21995 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
21996 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
21997 .rlen = 32,
21998 .novrfy = 1,
21999 }, {
22000 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
22001 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
22002 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
22003 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
22004 "\xee\x49\x83",
22005 .klen = 35,
22006 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
22007 .alen = 0,
22008 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
22009 .ilen = 8,
22010 .result = "\x00",
22011 .rlen = 0,
22012 }, {
22013 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
22014 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
22015 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
22016 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
22017 "\x85\x34\x66",
22018 .klen = 35,
22019 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
22020 .alen = 0,
22021 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
22022 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
22023 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
22024 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
22025 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
22026 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
22027 .ilen = 48,
22028 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
22029 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
22030 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
22031 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
22032 .rlen = 32,
22033 .novrfy = 1,
22034 }, {
22035 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22036 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
22037 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
22038 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
22039 "\xcf\x76\x3f",
22040 .klen = 35,
22041 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
22042 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
22043 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
22044 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
22045 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
22046 .alen = 32,
22047 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
22048 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
22049 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
22050 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
22051 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
22052 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
22053 .ilen = 48,
22054 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
22055 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
22056 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
22057 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
22058 .rlen = 32,
22059 },
22060};
22061
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080022062/*
Martin Williaf2b76b2015-06-01 13:44:01 +020022063 * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5.
22064 */
22065#define RFC7539_ENC_TEST_VECTORS 2
22066#define RFC7539_DEC_TEST_VECTORS 2
22067static struct aead_testvec rfc7539_enc_tv_template[] = {
22068 {
22069 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
22070 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
22071 "\x90\x91\x92\x93\x94\x95\x96\x97"
22072 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
22073 .klen = 32,
22074 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
22075 "\x44\x45\x46\x47",
22076 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
22077 "\xc4\xc5\xc6\xc7",
22078 .alen = 12,
22079 .input = "\x4c\x61\x64\x69\x65\x73\x20\x61"
22080 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
22081 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
22082 "\x74\x68\x65\x20\x63\x6c\x61\x73"
22083 "\x73\x20\x6f\x66\x20\x27\x39\x39"
22084 "\x3a\x20\x49\x66\x20\x49\x20\x63"
22085 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
22086 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
22087 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
22088 "\x74\x69\x70\x20\x66\x6f\x72\x20"
22089 "\x74\x68\x65\x20\x66\x75\x74\x75"
22090 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
22091 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
22092 "\x75\x6c\x64\x20\x62\x65\x20\x69"
22093 "\x74\x2e",
22094 .ilen = 114,
22095 .result = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
22096 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
22097 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
22098 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
22099 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
22100 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
22101 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
22102 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
22103 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
22104 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
22105 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
22106 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
22107 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
22108 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
22109 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
22110 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
22111 "\x06\x91",
22112 .rlen = 130,
22113 }, {
22114 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22115 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22116 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22117 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
22118 .klen = 32,
22119 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
22120 "\x05\x06\x07\x08",
22121 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22122 "\x00\x00\x4e\x91",
22123 .alen = 12,
22124 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22125 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22126 "\x61\x72\x65\x20\x64\x72\x61\x66"
22127 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22128 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22129 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22130 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22131 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22132 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22133 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22134 "\x20\x75\x70\x64\x61\x74\x65\x64"
22135 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22136 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22137 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22138 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22139 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22140 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22141 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22142 "\x20\x49\x74\x20\x69\x73\x20\x69"
22143 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22144 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22145 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22146 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22147 "\x66\x74\x73\x20\x61\x73\x20\x72"
22148 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22149 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22150 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22151 "\x63\x69\x74\x65\x20\x74\x68\x65"
22152 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22153 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22154 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22155 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22156 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22157 "\x9d",
22158 .ilen = 265,
22159 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22160 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22161 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22162 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22163 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22164 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22165 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22166 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22167 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22168 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22169 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22170 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22171 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22172 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22173 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22174 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22175 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22176 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22177 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22178 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22179 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22180 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22181 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22182 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22183 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22184 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22185 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22186 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22187 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22188 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22189 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22190 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22191 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22192 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22193 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22194 "\x38",
22195 .rlen = 281,
22196 },
22197};
22198
22199static struct aead_testvec rfc7539_dec_tv_template[] = {
22200 {
22201 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
22202 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
22203 "\x90\x91\x92\x93\x94\x95\x96\x97"
22204 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
22205 .klen = 32,
22206 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
22207 "\x44\x45\x46\x47",
22208 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
22209 "\xc4\xc5\xc6\xc7",
22210 .alen = 12,
22211 .input = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
22212 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
22213 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
22214 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
22215 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
22216 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
22217 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
22218 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
22219 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
22220 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
22221 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
22222 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
22223 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
22224 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
22225 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
22226 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
22227 "\x06\x91",
22228 .ilen = 130,
22229 .result = "\x4c\x61\x64\x69\x65\x73\x20\x61"
22230 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
22231 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
22232 "\x74\x68\x65\x20\x63\x6c\x61\x73"
22233 "\x73\x20\x6f\x66\x20\x27\x39\x39"
22234 "\x3a\x20\x49\x66\x20\x49\x20\x63"
22235 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
22236 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
22237 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
22238 "\x74\x69\x70\x20\x66\x6f\x72\x20"
22239 "\x74\x68\x65\x20\x66\x75\x74\x75"
22240 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
22241 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
22242 "\x75\x6c\x64\x20\x62\x65\x20\x69"
22243 "\x74\x2e",
22244 .rlen = 114,
22245 }, {
22246 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22247 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22248 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22249 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
22250 .klen = 32,
22251 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
22252 "\x05\x06\x07\x08",
22253 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22254 "\x00\x00\x4e\x91",
22255 .alen = 12,
22256 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22257 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22258 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22259 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22260 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22261 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22262 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22263 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22264 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22265 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22266 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22267 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22268 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22269 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22270 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22271 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22272 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22273 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22274 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22275 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22276 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22277 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22278 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22279 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22280 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22281 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22282 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22283 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22284 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22285 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22286 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22287 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22288 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22289 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22290 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22291 "\x38",
22292 .ilen = 281,
22293 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22294 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22295 "\x61\x72\x65\x20\x64\x72\x61\x66"
22296 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22297 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22298 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22299 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22300 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22301 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22302 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22303 "\x20\x75\x70\x64\x61\x74\x65\x64"
22304 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22305 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22306 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22307 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22308 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22309 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22310 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22311 "\x20\x49\x74\x20\x69\x73\x20\x69"
22312 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22313 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22314 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22315 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22316 "\x66\x74\x73\x20\x61\x73\x20\x72"
22317 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22318 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22319 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22320 "\x63\x69\x74\x65\x20\x74\x68\x65"
22321 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22322 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22323 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22324 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22325 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22326 "\x9d",
22327 .rlen = 265,
22328 },
22329};
22330
22331/*
Martin Willi59007582015-06-01 13:44:03 +020022332 * draft-irtf-cfrg-chacha20-poly1305
22333 */
22334#define RFC7539ESP_DEC_TEST_VECTORS 1
22335#define RFC7539ESP_ENC_TEST_VECTORS 1
22336static struct aead_testvec rfc7539esp_enc_tv_template[] = {
22337 {
22338 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22339 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22340 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22341 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
22342 "\x00\x00\x00\x00",
22343 .klen = 36,
22344 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
22345 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22346 "\x00\x00\x4e\x91",
22347 .alen = 12,
22348 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22349 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22350 "\x61\x72\x65\x20\x64\x72\x61\x66"
22351 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22352 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22353 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22354 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22355 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22356 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22357 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22358 "\x20\x75\x70\x64\x61\x74\x65\x64"
22359 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22360 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22361 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22362 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22363 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22364 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22365 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22366 "\x20\x49\x74\x20\x69\x73\x20\x69"
22367 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22368 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22369 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22370 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22371 "\x66\x74\x73\x20\x61\x73\x20\x72"
22372 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22373 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22374 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22375 "\x63\x69\x74\x65\x20\x74\x68\x65"
22376 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22377 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22378 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22379 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22380 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22381 "\x9d",
22382 .ilen = 265,
22383 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22384 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22385 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22386 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22387 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22388 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22389 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22390 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22391 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22392 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22393 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22394 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22395 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22396 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22397 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22398 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22399 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22400 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22401 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22402 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22403 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22404 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22405 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22406 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22407 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22408 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22409 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22410 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22411 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22412 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22413 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22414 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22415 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22416 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22417 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22418 "\x38",
22419 .rlen = 281,
22420 },
22421};
22422
22423static struct aead_testvec rfc7539esp_dec_tv_template[] = {
22424 {
22425 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22426 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22427 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22428 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
22429 "\x00\x00\x00\x00",
22430 .klen = 36,
22431 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
22432 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22433 "\x00\x00\x4e\x91",
22434 .alen = 12,
22435 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22436 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22437 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22438 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22439 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22440 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22441 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22442 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22443 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22444 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22445 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22446 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22447 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22448 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22449 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22450 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22451 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22452 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22453 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22454 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22455 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22456 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22457 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22458 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22459 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22460 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22461 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22462 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22463 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22464 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22465 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22466 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22467 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22468 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22469 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22470 "\x38",
22471 .ilen = 281,
22472 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22473 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22474 "\x61\x72\x65\x20\x64\x72\x61\x66"
22475 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22476 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22477 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22478 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22479 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22480 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22481 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22482 "\x20\x75\x70\x64\x61\x74\x65\x64"
22483 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22484 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22485 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22486 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22487 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22488 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22489 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22490 "\x20\x49\x74\x20\x69\x73\x20\x69"
22491 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22492 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22493 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22494 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22495 "\x66\x74\x73\x20\x61\x73\x20\x72"
22496 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22497 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22498 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22499 "\x63\x69\x74\x65\x20\x74\x68\x65"
22500 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22501 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22502 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22503 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22504 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22505 "\x9d",
22506 .rlen = 265,
22507 },
22508};
22509
22510/*
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080022511 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
22512 * test vectors, taken from Appendix B.2.9 and B.2.10:
22513 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
22514 * Only AES-128 is supported at this time.
22515 */
22516#define ANSI_CPRNG_AES_TEST_VECTORS 6
22517
22518static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
22519 {
22520 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22521 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22522 .klen = 16,
22523 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22524 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
22525 .dtlen = 16,
22526 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
22527 "\x00\x00\x00\x00\x00\x00\x00\x00",
22528 .vlen = 16,
22529 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
22530 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
22531 .rlen = 16,
22532 .loops = 1,
22533 }, {
22534 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22535 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22536 .klen = 16,
22537 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22538 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
22539 .dtlen = 16,
22540 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
22541 "\x00\x00\x00\x00\x00\x00\x00\x00",
22542 .vlen = 16,
22543 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
22544 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
22545 .rlen = 16,
22546 .loops = 1,
22547 }, {
22548 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22549 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22550 .klen = 16,
22551 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22552 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
22553 .dtlen = 16,
22554 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
22555 "\x00\x00\x00\x00\x00\x00\x00\x00",
22556 .vlen = 16,
22557 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
22558 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
22559 .rlen = 16,
22560 .loops = 1,
22561 }, {
22562 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22563 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22564 .klen = 16,
22565 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22566 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
22567 .dtlen = 16,
22568 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
22569 "\x00\x00\x00\x00\x00\x00\x00\x00",
22570 .vlen = 16,
22571 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
22572 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
22573 .rlen = 16,
22574 .loops = 1,
22575 }, {
22576 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22577 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22578 .klen = 16,
22579 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22580 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
22581 .dtlen = 16,
22582 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
22583 "\x00\x00\x00\x00\x00\x00\x00\x00",
22584 .vlen = 16,
22585 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
22586 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
22587 .rlen = 16,
22588 .loops = 1,
22589 }, { /* Monte Carlo Test */
22590 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
22591 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
22592 .klen = 16,
22593 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
22594 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
22595 .dtlen = 16,
22596 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
22597 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
22598 .vlen = 16,
22599 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
22600 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
22601 .rlen = 16,
22602 .loops = 10000,
22603 },
22604};
22605
Stephan Mueller3332ee22014-05-31 17:24:38 +020022606/*
22607 * SP800-90A DRBG Test vectors from
22608 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
22609 *
22610 * Test vectors for DRBG with prediction resistance. All types of DRBGs
22611 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
22612 * w/o personalization string, w/ and w/o additional input string).
22613 */
22614static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
22615 {
22616 .entropy = (unsigned char *)
22617 "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
22618 "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
22619 "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
22620 "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
22621 .entropylen = 48,
22622 .entpra = (unsigned char *)
22623 "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
22624 "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
22625 "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
22626 .entprb = (unsigned char *)
22627 "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
22628 "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
22629 "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
22630 .entprlen = 32,
22631 .expected = (unsigned char *)
22632 "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
22633 "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
22634 "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
22635 "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
22636 "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
22637 "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
22638 "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
22639 "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
22640 "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
22641 "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
22642 "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
22643 .expectedlen = 128,
22644 .addtla = NULL,
22645 .addtlb = NULL,
22646 .addtllen = 0,
22647 .pers = NULL,
22648 .perslen = 0,
22649 }, {
22650 .entropy = (unsigned char *)
22651 "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
22652 "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
22653 "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
22654 "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
22655 .entropylen = 48,
22656 .entpra = (unsigned char *)
22657 "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
22658 "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
22659 "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
22660 .entprb = (unsigned char *)
22661 "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
22662 "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
22663 "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
22664 .entprlen = 32,
22665 .expected = (unsigned char *)
22666 "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
22667 "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
22668 "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
22669 "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
22670 "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
22671 "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
22672 "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
22673 "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
22674 "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
22675 "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
22676 "\x50\x47\xa3\x63\x81\x16\xaf\x19",
22677 .expectedlen = 128,
22678 .addtla = (unsigned char *)
22679 "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
22680 "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
22681 "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
22682 .addtlb = (unsigned char *)
22683 "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
22684 "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
22685 "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
22686 .addtllen = 32,
22687 .pers = NULL,
22688 .perslen = 0,
22689 }, {
22690 .entropy = (unsigned char *)
22691 "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
22692 "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
22693 "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
22694 "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
22695 .entropylen = 48,
22696 .entpra = (unsigned char *)
22697 "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
22698 "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
22699 "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
22700 .entprb = (unsigned char *)
22701 "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
22702 "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
22703 "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
22704 .entprlen = 32,
22705 .expected = (unsigned char *)
22706 "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
22707 "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
22708 "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
22709 "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
22710 "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
22711 "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
22712 "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
22713 "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
22714 "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
22715 "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
22716 "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
22717 .expectedlen = 128,
22718 .addtla = NULL,
22719 .addtlb = NULL,
22720 .addtllen = 0,
22721 .pers = (unsigned char *)
22722 "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
22723 "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
22724 "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
22725 .perslen = 32,
22726 }, {
22727 .entropy = (unsigned char *)
22728 "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
22729 "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
22730 "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
22731 "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
22732 .entropylen = 48,
22733 .entpra = (unsigned char *)
22734 "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
22735 "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
22736 "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
22737 .entprb = (unsigned char *)
22738 "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
22739 "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
22740 "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
22741 .entprlen = 32,
22742 .expected = (unsigned char *)
22743 "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
22744 "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
22745 "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
22746 "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
22747 "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
22748 "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
22749 "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
22750 "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
22751 "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
22752 "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
22753 "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
22754 .expectedlen = 128,
22755 .addtla = (unsigned char *)
22756 "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
22757 "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
22758 "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
22759 .addtlb = (unsigned char *)
22760 "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
22761 "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
22762 "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
22763 .addtllen = 32,
22764 .pers = (unsigned char *)
22765 "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
22766 "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
22767 "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
22768 .perslen = 32,
22769 },
22770};
22771
22772static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
22773 {
22774 .entropy = (unsigned char *)
22775 "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
22776 "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
22777 "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
22778 "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
22779 .entropylen = 48,
22780 .entpra = (unsigned char *)
22781 "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
22782 "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
22783 "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
22784 .entprb = (unsigned char *)
22785 "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
22786 "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
22787 "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
22788 .entprlen = 32,
22789 .expected = (unsigned char *)
22790 "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
22791 "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
22792 "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
22793 "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
22794 "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
22795 "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
22796 "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
22797 "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
22798 "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
22799 "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
22800 "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
22801 .expectedlen = 128,
22802 .addtla = NULL,
22803 .addtlb = NULL,
22804 .addtllen = 0,
22805 .pers = NULL,
22806 .perslen = 0,
22807 }, {
22808 .entropy = (unsigned char *)
22809 "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
22810 "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
22811 "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
22812 "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
22813 .entropylen = 48,
22814 .entpra = (unsigned char *)
22815 "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
22816 "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
22817 "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
22818 .entprb = (unsigned char *)
22819 "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
22820 "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
22821 "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
22822 .entprlen = 32,
22823 .expected = (unsigned char *)
22824 "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
22825 "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
22826 "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
22827 "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
22828 "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
22829 "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
22830 "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
22831 "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
22832 "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
22833 "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
22834 "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
22835 .expectedlen = 128,
22836 .addtla = (unsigned char *)
22837 "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
22838 "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
22839 "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
22840 .addtlb = (unsigned char *)
22841 "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
22842 "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
22843 "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
22844 .addtllen = 32,
22845 .pers = NULL,
22846 .perslen = 0,
22847 }, {
22848 .entropy = (unsigned char *)
22849 "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
22850 "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
22851 "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
22852 "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
22853 .entropylen = 48,
22854 .entpra = (unsigned char *)
22855 "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
22856 "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
22857 "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
22858 .entprb = (unsigned char *)
22859 "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
22860 "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
22861 "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
22862 .entprlen = 32,
22863 .expected = (unsigned char *)
22864 "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
22865 "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
22866 "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
22867 "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
22868 "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
22869 "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
22870 "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
22871 "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
22872 "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
22873 "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
22874 "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
22875 .expectedlen = 128,
22876 .addtla = NULL,
22877 .addtlb = NULL,
22878 .addtllen = 0,
22879 .pers = (unsigned char *)
22880 "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
22881 "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
22882 "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
22883 .perslen = 32,
22884 }, {
22885 .entropy = (unsigned char *)
22886 "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
22887 "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
22888 "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
22889 "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
22890 .entropylen = 48,
22891 .entpra = (unsigned char *)
22892 "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
22893 "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
22894 "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
22895 .entprb = (unsigned char *)
22896 "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
22897 "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
22898 "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
22899 .entprlen = 32,
22900 .expected = (unsigned char *)
22901 "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
22902 "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
22903 "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
22904 "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
22905 "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
22906 "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
22907 "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
22908 "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
22909 "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
22910 "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
22911 "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
22912 .expectedlen = 128,
22913 .addtla = (unsigned char *)
22914 "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
22915 "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
22916 "\x86\x88\x55\x28\xc1\x69\xdd\x76",
22917 .addtlb = (unsigned char *)
22918 "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
22919 "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
22920 "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
22921 .addtllen = 32,
22922 .pers = (unsigned char *)
22923 "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
22924 "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
22925 "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
22926 .perslen = 32,
22927 },
22928};
22929
22930static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
22931 {
22932 .entropy = (unsigned char *)
22933 "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
22934 "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
22935 .entropylen = 24,
22936 .entpra = (unsigned char *)
22937 "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
22938 "\xb4\xec\x80\xb1",
22939 .entprb = (unsigned char *)
22940 "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
22941 "\x28\x07\xeb\xc2",
22942 .entprlen = 16,
22943 .expected = (unsigned char *)
22944 "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
22945 "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
22946 "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
22947 "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
22948 "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
22949 "\x8a\xf1\x23\xa8",
22950 .expectedlen = 64,
22951 .addtla = NULL,
22952 .addtlb = NULL,
22953 .addtllen = 0,
22954 .pers = NULL,
22955 .perslen = 0,
22956 }, {
22957 .entropy = (unsigned char *)
22958 "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
22959 "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
22960 .entropylen = 24,
22961 .entpra = (unsigned char *)
22962 "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
22963 "\x67\xd1\x08\xf8",
22964 .entprb = (unsigned char *)
22965 "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
22966 "\xd4\xba\x04\x58",
22967 .entprlen = 16,
22968 .expected = (unsigned char *)
22969 "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
22970 "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
22971 "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
22972 "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
22973 "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
22974 "\xc1\x02\x41\x82",
22975 .expectedlen = 64,
22976 .addtla = (unsigned char *)
22977 "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
22978 "\xeb\xb3\x01\x76",
22979 .addtlb = (unsigned char *)
22980 "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
22981 "\xd0\x7f\xcc\x43",
22982 .addtllen = 16,
22983 .pers = NULL,
22984 .perslen = 0,
22985 }, {
22986 .entropy = (unsigned char *)
22987 "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
22988 "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
22989 .entropylen = 24,
22990 .entpra = (unsigned char *)
22991 "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
22992 "\xc3\x0f\xe3\xb0",
22993 .entprb = (unsigned char *)
22994 "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
22995 "\xd6\x9c\x9d\xe8",
22996 .entprlen = 16,
22997 .expected = (unsigned char *)
22998 "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
22999 "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
23000 "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
23001 "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
23002 "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
23003 "\x72\x82\x0c\xcf",
23004 .expectedlen = 64,
23005 .addtla = NULL,
23006 .addtlb = NULL,
23007 .addtllen = 0,
23008 .pers = (unsigned char *)
23009 "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
23010 "\x21\x52\xb3\xad",
23011 .perslen = 16,
23012 }, {
23013 .entropy = (unsigned char *)
23014 "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
23015 "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
23016 .entropylen = 24,
23017 .entpra = (unsigned char *)
23018 "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
23019 "\xc4\x2c\xe8\x10",
23020 .entprb = (unsigned char *)
23021 "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
23022 "\x08\xf7\xa5\x01",
23023 .entprlen = 16,
23024 .expected = (unsigned char *)
23025 "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
23026 "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
23027 "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
23028 "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
23029 "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
23030 "\x23\xc5\x1f\x68",
23031 .expectedlen = 64,
23032 .addtla = (unsigned char *)
23033 "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
23034 "\x23\x6d\xad\x1d",
23035 .addtlb = (unsigned char *)
23036 "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
23037 "\xbc\x59\x31\x8c",
23038 .addtllen = 16,
23039 .pers = (unsigned char *)
23040 "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
23041 "\x37\x3c\x5c\x0b",
23042 .perslen = 16,
23043 },
23044};
23045
23046/*
23047 * SP800-90A DRBG Test vectors from
23048 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
23049 *
23050 * Test vectors for DRBG without prediction resistance. All types of DRBGs
23051 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
23052 * w/o personalization string, w/ and w/o additional input string).
23053 */
23054static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
23055 {
23056 .entropy = (unsigned char *)
23057 "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
23058 "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
23059 "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
23060 "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
23061 .entropylen = 48,
23062 .expected = (unsigned char *)
23063 "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
23064 "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
23065 "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
23066 "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
23067 "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
23068 "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
23069 "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
23070 "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
23071 "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
23072 "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
23073 "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
23074 .expectedlen = 128,
23075 .addtla = NULL,
23076 .addtlb = NULL,
23077 .addtllen = 0,
23078 .pers = NULL,
23079 .perslen = 0,
23080 }, {
23081 .entropy = (unsigned char *)
23082 "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
23083 "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
23084 "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
23085 "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
23086 .entropylen = 48,
23087 .expected = (unsigned char *)
23088 "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
23089 "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
23090 "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
23091 "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
23092 "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
23093 "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
23094 "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
23095 "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
23096 "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
23097 "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
23098 "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
23099 .expectedlen = 128,
23100 .addtla = (unsigned char *)
23101 "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
23102 "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
23103 "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
23104 .addtlb = (unsigned char *)
23105 "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
23106 "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
23107 "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
23108 .addtllen = 32,
23109 .pers = NULL,
23110 .perslen = 0,
23111 }, {
23112 .entropy = (unsigned char *)
23113 "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
23114 "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
23115 "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
23116 "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
23117 .entropylen = 48,
23118 .expected = (unsigned char *)
23119 "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
23120 "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
23121 "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
23122 "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
23123 "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
23124 "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
23125 "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
23126 "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
23127 "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
23128 "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
23129 "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
23130 .expectedlen = 128,
23131 .addtla = NULL,
23132 .addtlb = NULL,
23133 .addtllen = 0,
23134 .pers = (unsigned char *)
23135 "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
23136 "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
23137 "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
23138 .perslen = 32,
23139 }, {
23140 .entropy = (unsigned char *)
23141 "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
23142 "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
23143 "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
23144 "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
23145 .entropylen = 48,
23146 .expected = (unsigned char *)
23147 "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
23148 "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
23149 "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
23150 "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
23151 "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
23152 "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
23153 "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
23154 "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
23155 "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
23156 "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
23157 "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
23158 .expectedlen = 128,
23159 .addtla = (unsigned char *)
23160 "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
23161 "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
23162 "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
23163 .addtlb = (unsigned char *)
23164 "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
23165 "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
23166 "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
23167 .addtllen = 32,
23168 .pers = (unsigned char *)
23169 "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
23170 "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
23171 "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
23172 .perslen = 32,
23173 },
23174};
23175
23176static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
23177 {
23178 .entropy = (unsigned char *)
23179 "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
23180 "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
23181 "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
23182 "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
23183 .entropylen = 48,
23184 .expected = (unsigned char *)
23185 "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
23186 "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
23187 "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
23188 "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
23189 "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
23190 "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
23191 "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
23192 "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
23193 "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
23194 "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
23195 "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
23196 .expectedlen = 128,
23197 .addtla = NULL,
23198 .addtlb = NULL,
23199 .addtllen = 0,
23200 .pers = NULL,
23201 .perslen = 0,
23202 }, {
23203 .entropy = (unsigned char *)
23204 "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
23205 "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
23206 "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
23207 "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
23208 .entropylen = 48,
23209 .expected = (unsigned char *)
23210 "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
23211 "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
23212 "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
23213 "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
23214 "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
23215 "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
23216 "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
23217 "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
23218 "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
23219 "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
23220 "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
23221 .expectedlen = 128,
23222 .addtla = (unsigned char *)
23223 "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
23224 "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
23225 "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
23226 .addtlb = (unsigned char *)
23227 "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
23228 "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
23229 "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
23230 .addtllen = 32,
23231 .pers = NULL,
23232 .perslen = 0,
23233 }, {
23234 .entropy = (unsigned char *)
23235 "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
23236 "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
23237 "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
23238 "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
23239 .entropylen = 48,
23240 .expected = (unsigned char *)
23241 "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
23242 "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
23243 "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
23244 "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
23245 "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
23246 "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
23247 "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
23248 "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
23249 "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
23250 "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
23251 "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
23252 .expectedlen = 128,
23253 .addtla = NULL,
23254 .addtlb = NULL,
23255 .addtllen = 0,
23256 .pers = (unsigned char *)
23257 "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
23258 "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
23259 "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
23260 .perslen = 32,
23261 }, {
23262 .entropy = (unsigned char *)
23263 "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
23264 "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
23265 "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
23266 "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
23267 .entropylen = 48,
23268 .expected = (unsigned char *)
23269 "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
23270 "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
23271 "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
23272 "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
23273 "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
23274 "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
23275 "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
23276 "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
23277 "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
23278 "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
23279 "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
23280 .expectedlen = 128,
23281 .addtla = (unsigned char *)
23282 "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
23283 "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
23284 "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
23285 .addtlb = (unsigned char *)
23286 "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
23287 "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
23288 "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
23289 .addtllen = 32,
23290 .pers = (unsigned char *)
23291 "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
23292 "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
23293 "\x36\x60\x3b\xca\x37\xc9\xee\x29",
23294 .perslen = 32,
23295 },
23296};
23297
23298static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
23299 {
23300 .entropy = (unsigned char *)
23301 "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
23302 "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
23303 "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
23304 "\xac\x9b\xbb\x00",
23305 .entropylen = 40,
23306 .expected = (unsigned char *)
23307 "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
23308 "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
23309 "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
23310 "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
23311 "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
23312 "\x9a\x9d\xf1\x0d",
23313 .expectedlen = 64,
23314 .addtla = NULL,
23315 .addtlb = NULL,
23316 .addtllen = 0,
23317 .pers = NULL,
23318 .perslen = 0,
23319 },
23320};
23321
23322static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
23323 {
23324 .entropy = (unsigned char *)
23325 "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
23326 "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
23327 "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
23328 "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
23329 .entropylen = 48,
23330 .expected = (unsigned char *)
23331 "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
23332 "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
23333 "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
23334 "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
23335 "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
23336 "\xb4\xf0\x7e\x1d",
23337 .expectedlen = 64,
23338 .addtla = NULL,
23339 .addtlb = NULL,
23340 .addtllen = 0,
23341 .pers = NULL,
23342 .perslen = 0,
23343 },
23344};
23345
23346static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
23347 {
23348 .entropy = (unsigned char *)
23349 "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
23350 "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
23351 .entropylen = 24,
23352 .expected = (unsigned char *)
23353 "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
23354 "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
23355 "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
23356 "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
23357 "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
23358 "\xcb\x2d\xd6\xb0",
23359 .expectedlen = 64,
23360 .addtla = NULL,
23361 .addtlb = NULL,
23362 .addtllen = 0,
23363 .pers = NULL,
23364 .perslen = 0,
23365 }, {
23366 .entropy = (unsigned char *)
23367 "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
23368 "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
23369 .entropylen = 24,
23370 .expected = (unsigned char *)
23371 "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
23372 "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
23373 "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
23374 "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
23375 "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
23376 "\xc3\xdf\xb3\x81",
23377 .expectedlen = 64,
23378 .addtla = (unsigned char *)
23379 "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
23380 "\x91\x4d\x81\x56",
23381 .addtlb = (unsigned char *)
23382 "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
23383 "\x4a\x55\xd1\xc6",
23384 .addtllen = 16,
23385 .pers = NULL,
23386 .perslen = 0,
23387 }, {
23388 .entropy = (unsigned char *)
23389 "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
23390 "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
23391 .entropylen = 24,
23392 .expected = (unsigned char *)
23393 "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
23394 "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
23395 "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
23396 "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
23397 "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
23398 "\x34\x30\x0c\x3d",
23399 .expectedlen = 64,
23400 .addtla = NULL,
23401 .addtlb = NULL,
23402 .addtllen = 0,
23403 .pers = (unsigned char *)
23404 "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
23405 "\x0b\xc6\x97\x54",
23406 .perslen = 16,
23407 }, {
23408 .entropy = (unsigned char *)
23409 "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
23410 "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
23411 .entropylen = 24,
23412 .expected = (unsigned char *)
23413 "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
23414 "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
23415 "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
23416 "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
23417 "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
23418 "\x2b\x49\x1e\x5c",
23419 .expectedlen = 64,
23420 .addtla = (unsigned char *)
23421 "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
23422 "\x44\x85\xe7\xfe",
23423 .addtlb = (unsigned char *)
23424 "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
23425 "\x82\x16\x62\x7f",
23426 .addtllen = 16,
23427 .pers = (unsigned char *)
23428 "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
23429 "\x8e\xcf\xe0\x02",
23430 .perslen = 16,
23431 },
23432};
23433
Herbert Xuda7f0332008-07-31 17:08:25 +080023434/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023435#define CAST5_ENC_TEST_VECTORS 4
23436#define CAST5_DEC_TEST_VECTORS 4
23437#define CAST5_CBC_ENC_TEST_VECTORS 1
23438#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030023439#define CAST5_CTR_ENC_TEST_VECTORS 2
23440#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080023441
23442static struct cipher_testvec cast5_enc_tv_template[] = {
23443 {
23444 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23445 "\x23\x45\x67\x89\x34\x56\x78\x9a",
23446 .klen = 16,
23447 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23448 .ilen = 8,
23449 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
23450 .rlen = 8,
23451 }, {
23452 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23453 "\x23\x45",
23454 .klen = 10,
23455 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23456 .ilen = 8,
23457 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
23458 .rlen = 8,
23459 }, {
23460 .key = "\x01\x23\x45\x67\x12",
23461 .klen = 5,
23462 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23463 .ilen = 8,
23464 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
23465 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023466 }, { /* Generated from TF test vectors */
23467 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23468 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23469 .klen = 16,
23470 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23471 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23472 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23473 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23474 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23475 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23476 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23477 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23478 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23479 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23480 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23481 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23482 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23483 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23484 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23485 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23486 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23487 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23488 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23489 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23490 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23491 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23492 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23493 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23494 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23495 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23496 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23497 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23498 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23499 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23500 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23501 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23502 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23503 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23504 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23505 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23506 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23507 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23508 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23509 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23510 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23511 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23512 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23513 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23514 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23515 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23516 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23517 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23518 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23519 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23520 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23521 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23522 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23523 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23524 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23525 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23526 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23527 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23528 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23529 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23530 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23531 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23532 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23533 .ilen = 496,
23534 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
23535 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
23536 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
23537 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
23538 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
23539 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
23540 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
23541 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
23542 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
23543 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
23544 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
23545 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
23546 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
23547 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
23548 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
23549 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
23550 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
23551 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
23552 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
23553 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
23554 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
23555 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
23556 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
23557 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
23558 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
23559 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
23560 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
23561 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
23562 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
23563 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
23564 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
23565 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
23566 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
23567 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
23568 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
23569 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
23570 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
23571 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
23572 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
23573 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
23574 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
23575 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
23576 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
23577 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
23578 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
23579 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
23580 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
23581 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
23582 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
23583 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
23584 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
23585 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
23586 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
23587 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
23588 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
23589 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
23590 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
23591 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
23592 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
23593 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
23594 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
23595 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
23596 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023597 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023598 .np = 3,
23599 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080023600 },
23601};
23602
23603static struct cipher_testvec cast5_dec_tv_template[] = {
23604 {
23605 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23606 "\x23\x45\x67\x89\x34\x56\x78\x9a",
23607 .klen = 16,
23608 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
23609 .ilen = 8,
23610 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23611 .rlen = 8,
23612 }, {
23613 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23614 "\x23\x45",
23615 .klen = 10,
23616 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
23617 .ilen = 8,
23618 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23619 .rlen = 8,
23620 }, {
23621 .key = "\x01\x23\x45\x67\x12",
23622 .klen = 5,
23623 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
23624 .ilen = 8,
23625 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23626 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023627 }, { /* Generated from TF test vectors */
23628 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23629 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23630 .klen = 16,
23631 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23632 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
23633 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
23634 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
23635 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
23636 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
23637 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
23638 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
23639 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
23640 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
23641 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
23642 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
23643 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
23644 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
23645 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
23646 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
23647 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
23648 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
23649 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
23650 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
23651 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
23652 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
23653 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
23654 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
23655 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
23656 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
23657 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
23658 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
23659 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
23660 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
23661 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
23662 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
23663 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
23664 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
23665 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
23666 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
23667 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
23668 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
23669 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
23670 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
23671 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
23672 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
23673 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
23674 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
23675 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
23676 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
23677 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
23678 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
23679 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
23680 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
23681 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
23682 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
23683 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
23684 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
23685 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
23686 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
23687 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
23688 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
23689 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
23690 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
23691 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
23692 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
23693 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
23694 .ilen = 496,
23695 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23696 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23697 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23698 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23699 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23700 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23701 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23702 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23703 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23704 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23705 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23706 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23707 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23708 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23709 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23710 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23711 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23712 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23713 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23714 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23715 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23716 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23717 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23718 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23719 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23720 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23721 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23722 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23723 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23724 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23725 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23726 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23727 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23728 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23729 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23730 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23731 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23732 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23733 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23734 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23735 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23736 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23737 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23738 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23739 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23740 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23741 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23742 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23743 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23744 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23745 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23746 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23747 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23748 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23749 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23750 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23751 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23752 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23753 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23754 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23755 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23756 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23757 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023758 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023759 .np = 3,
23760 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023761 },
23762};
23763
23764static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
23765 { /* Generated from TF test vectors */
23766 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23767 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23768 .klen = 16,
23769 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23770 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23771 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23772 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23773 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23774 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23775 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23776 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23777 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23778 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23779 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23780 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23781 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23782 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23783 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23784 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23785 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23786 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23787 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23788 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23789 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23790 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23791 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23792 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23793 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23794 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23795 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23796 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23797 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23798 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23799 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23800 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23801 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23802 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23803 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23804 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23805 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23806 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23807 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23808 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23809 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23810 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23811 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23812 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23813 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23814 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23815 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23816 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23817 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23818 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23819 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23820 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23821 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23822 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23823 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23824 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23825 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23826 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23827 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23828 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23829 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23830 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23831 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23832 .ilen = 496,
23833 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
23834 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
23835 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
23836 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
23837 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
23838 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
23839 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
23840 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
23841 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
23842 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
23843 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
23844 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
23845 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
23846 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
23847 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
23848 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
23849 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
23850 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
23851 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
23852 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
23853 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
23854 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
23855 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
23856 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
23857 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
23858 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
23859 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
23860 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
23861 "\x90\x12\x37\x49\x27\x98\x69\x18"
23862 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
23863 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
23864 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
23865 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
23866 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
23867 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
23868 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
23869 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
23870 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
23871 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
23872 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
23873 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
23874 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
23875 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
23876 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
23877 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
23878 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
23879 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
23880 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
23881 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
23882 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
23883 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
23884 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
23885 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
23886 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
23887 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
23888 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
23889 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
23890 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
23891 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
23892 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
23893 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
23894 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
23895 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023896 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023897 .np = 3,
23898 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023899 },
23900};
23901
23902static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
23903 { /* Generated from TF test vectors */
23904 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23905 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23906 .klen = 16,
23907 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23908 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
23909 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
23910 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
23911 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
23912 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
23913 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
23914 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
23915 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
23916 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
23917 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
23918 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
23919 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
23920 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
23921 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
23922 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
23923 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
23924 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
23925 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
23926 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
23927 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
23928 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
23929 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
23930 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
23931 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
23932 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
23933 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
23934 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
23935 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
23936 "\x90\x12\x37\x49\x27\x98\x69\x18"
23937 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
23938 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
23939 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
23940 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
23941 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
23942 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
23943 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
23944 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
23945 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
23946 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
23947 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
23948 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
23949 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
23950 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
23951 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
23952 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
23953 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
23954 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
23955 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
23956 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
23957 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
23958 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
23959 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
23960 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
23961 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
23962 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
23963 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
23964 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
23965 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
23966 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
23967 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
23968 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
23969 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
23970 .ilen = 496,
23971 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23972 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23973 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23974 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23975 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23976 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23977 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23978 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23979 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23980 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23981 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23982 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23983 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23984 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23985 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23986 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23987 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23988 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23989 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23990 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23991 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23992 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23993 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23994 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23995 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23996 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23997 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23998 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23999 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24000 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24001 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24002 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24003 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24004 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24005 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24006 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24007 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24008 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24009 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24010 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24011 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24012 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24013 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24014 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24015 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24016 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24017 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24018 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24019 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24020 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24021 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24022 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24023 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24024 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24025 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24026 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24027 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24028 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24029 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24030 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24031 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
24032 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
24033 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024034 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024035 .np = 3,
24036 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024037 },
24038};
24039
24040static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
24041 { /* Generated from TF test vectors */
24042 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24043 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24044 .klen = 16,
24045 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24046 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24047 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030024048 "\x3A",
24049 .ilen = 17,
24050 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
24051 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
24052 "\x0C",
24053 .rlen = 17,
24054 }, { /* Generated from TF test vectors */
24055 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24056 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24057 .klen = 16,
24058 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24059 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24060 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024061 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24062 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24063 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
24064 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24065 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24066 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24067 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24068 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24069 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24070 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24071 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24072 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24073 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24074 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24075 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24076 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24077 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24078 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24079 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24080 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24081 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24082 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24083 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24084 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24085 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24086 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24087 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24088 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24089 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24090 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24091 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24092 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24093 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24094 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24095 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24096 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24097 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24098 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24099 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24100 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24101 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24102 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24103 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24104 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24105 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24106 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24107 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24108 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24109 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24110 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24111 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24112 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24113 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24114 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24115 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24116 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24117 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24118 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24119 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
24120 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
24121 .ilen = 496,
24122 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
24123 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
24124 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
24125 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
24126 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
24127 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
24128 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
24129 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
24130 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
24131 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
24132 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
24133 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
24134 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
24135 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
24136 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
24137 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
24138 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
24139 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
24140 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
24141 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
24142 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
24143 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
24144 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
24145 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
24146 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
24147 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
24148 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
24149 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
24150 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
24151 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
24152 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
24153 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
24154 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
24155 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
24156 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
24157 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
24158 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
24159 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
24160 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
24161 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
24162 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
24163 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
24164 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
24165 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
24166 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
24167 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
24168 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
24169 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
24170 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
24171 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
24172 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
24173 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
24174 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
24175 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
24176 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
24177 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
24178 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
24179 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
24180 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
24181 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
24182 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
24183 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
24184 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024185 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024186 .np = 3,
24187 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024188 },
24189};
24190
24191static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
24192 { /* Generated from TF test vectors */
24193 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24194 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24195 .klen = 16,
24196 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24197 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
24198 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030024199 "\x0C",
24200 .ilen = 17,
24201 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24202 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24203 "\x3A",
24204 .rlen = 17,
24205 }, { /* Generated from TF test vectors */
24206 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24207 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24208 .klen = 16,
24209 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24210 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
24211 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024212 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
24213 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
24214 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
24215 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
24216 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
24217 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
24218 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
24219 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
24220 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
24221 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
24222 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
24223 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
24224 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
24225 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
24226 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
24227 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
24228 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
24229 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
24230 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
24231 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
24232 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
24233 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
24234 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
24235 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
24236 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
24237 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
24238 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
24239 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
24240 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
24241 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
24242 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
24243 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
24244 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
24245 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
24246 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
24247 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
24248 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
24249 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
24250 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
24251 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
24252 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
24253 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
24254 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
24255 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
24256 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
24257 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
24258 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
24259 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
24260 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
24261 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
24262 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
24263 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
24264 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
24265 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
24266 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
24267 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
24268 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
24269 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
24270 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
24271 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
24272 .ilen = 496,
24273 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24274 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24275 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24276 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24277 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
24278 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24279 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24280 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24281 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24282 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24283 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24284 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24285 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24286 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24287 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24288 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24289 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24290 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24291 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24292 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24293 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24294 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24295 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24296 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24297 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24298 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24299 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24300 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24301 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24302 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24303 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24304 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24305 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24306 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24307 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24308 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24309 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24310 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24311 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24312 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24313 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24314 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24315 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24316 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24317 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24318 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24319 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24320 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24321 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24322 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24323 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24324 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24325 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24326 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24327 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24328 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24329 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24330 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24331 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24332 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24333 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
24334 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
24335 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024336 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024337 .np = 3,
24338 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080024339 },
24340};
24341
24342/*
24343 * ARC4 test vectors from OpenSSL
24344 */
24345#define ARC4_ENC_TEST_VECTORS 7
24346#define ARC4_DEC_TEST_VECTORS 7
24347
24348static struct cipher_testvec arc4_enc_tv_template[] = {
24349 {
24350 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24351 .klen = 8,
24352 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24353 .ilen = 8,
24354 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
24355 .rlen = 8,
24356 }, {
24357 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24358 .klen = 8,
24359 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24360 .ilen = 8,
24361 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
24362 .rlen = 8,
24363 }, {
24364 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24365 .klen = 8,
24366 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24367 .ilen = 8,
24368 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
24369 .rlen = 8,
24370 }, {
24371 .key = "\xef\x01\x23\x45",
24372 .klen = 4,
24373 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
24374 "\x00\x00\x00\x00\x00\x00\x00\x00"
24375 "\x00\x00\x00\x00",
24376 .ilen = 20,
24377 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24378 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
24379 "\x36\xb6\x78\x58",
24380 .rlen = 20,
24381 }, {
24382 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24383 .klen = 8,
24384 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24385 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24386 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24387 "\x12\x34\x56\x78",
24388 .ilen = 28,
24389 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
24390 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
24391 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
24392 "\x40\x01\x1e\xcf",
24393 .rlen = 28,
24394 }, {
24395 .key = "\xef\x01\x23\x45",
24396 .klen = 4,
24397 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
24398 "\x00\x00",
24399 .ilen = 10,
24400 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24401 "\xbd\x61",
24402 .rlen = 10,
24403 }, {
24404 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
24405 "\x00\x00\x00\x00\x00\x00\x00\x00",
24406 .klen = 16,
24407 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
24408 .ilen = 8,
24409 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
24410 .rlen = 8,
24411 },
24412};
24413
24414static struct cipher_testvec arc4_dec_tv_template[] = {
24415 {
24416 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24417 .klen = 8,
24418 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
24419 .ilen = 8,
24420 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24421 .rlen = 8,
24422 }, {
24423 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24424 .klen = 8,
24425 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
24426 .ilen = 8,
24427 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24428 .rlen = 8,
24429 }, {
24430 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24431 .klen = 8,
24432 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
24433 .ilen = 8,
24434 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24435 .rlen = 8,
24436 }, {
24437 .key = "\xef\x01\x23\x45",
24438 .klen = 4,
24439 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24440 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
24441 "\x36\xb6\x78\x58",
24442 .ilen = 20,
24443 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
24444 "\x00\x00\x00\x00\x00\x00\x00\x00"
24445 "\x00\x00\x00\x00",
24446 .rlen = 20,
24447 }, {
24448 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24449 .klen = 8,
24450 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
24451 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
24452 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
24453 "\x40\x01\x1e\xcf",
24454 .ilen = 28,
24455 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24456 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24457 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24458 "\x12\x34\x56\x78",
24459 .rlen = 28,
24460 }, {
24461 .key = "\xef\x01\x23\x45",
24462 .klen = 4,
24463 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24464 "\xbd\x61",
24465 .ilen = 10,
24466 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
24467 "\x00\x00",
24468 .rlen = 10,
24469 }, {
24470 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
24471 "\x00\x00\x00\x00\x00\x00\x00\x00",
24472 .klen = 16,
24473 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
24474 .ilen = 8,
24475 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
24476 .rlen = 8,
24477 },
24478};
24479
24480/*
24481 * TEA test vectors
24482 */
24483#define TEA_ENC_TEST_VECTORS 4
24484#define TEA_DEC_TEST_VECTORS 4
24485
24486static struct cipher_testvec tea_enc_tv_template[] = {
24487 {
24488 .key = zeroed_string,
24489 .klen = 16,
24490 .input = zeroed_string,
24491 .ilen = 8,
24492 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
24493 .rlen = 8,
24494 }, {
24495 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24496 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24497 .klen = 16,
24498 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24499 .ilen = 8,
24500 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
24501 .rlen = 8,
24502 }, {
24503 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24504 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24505 .klen = 16,
24506 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24507 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24508 .ilen = 16,
24509 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
24510 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
24511 .rlen = 16,
24512 }, {
24513 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24514 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24515 .klen = 16,
24516 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
24517 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24518 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24519 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24520 .ilen = 32,
24521 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
24522 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
24523 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
24524 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
24525 .rlen = 32,
24526 }
24527};
24528
24529static struct cipher_testvec tea_dec_tv_template[] = {
24530 {
24531 .key = zeroed_string,
24532 .klen = 16,
24533 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
24534 .ilen = 8,
24535 .result = zeroed_string,
24536 .rlen = 8,
24537 }, {
24538 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24539 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24540 .klen = 16,
24541 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
24542 .ilen = 8,
24543 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24544 .rlen = 8,
24545 }, {
24546 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24547 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24548 .klen = 16,
24549 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
24550 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
24551 .ilen = 16,
24552 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24553 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24554 .rlen = 16,
24555 }, {
24556 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24557 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24558 .klen = 16,
24559 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
24560 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
24561 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
24562 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
24563 .ilen = 32,
24564 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
24565 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24566 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24567 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24568 .rlen = 32,
24569 }
24570};
24571
24572/*
24573 * XTEA test vectors
24574 */
24575#define XTEA_ENC_TEST_VECTORS 4
24576#define XTEA_DEC_TEST_VECTORS 4
24577
24578static struct cipher_testvec xtea_enc_tv_template[] = {
24579 {
24580 .key = zeroed_string,
24581 .klen = 16,
24582 .input = zeroed_string,
24583 .ilen = 8,
24584 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
24585 .rlen = 8,
24586 }, {
24587 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24588 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24589 .klen = 16,
24590 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24591 .ilen = 8,
24592 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
24593 .rlen = 8,
24594 }, {
24595 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24596 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24597 .klen = 16,
24598 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24599 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24600 .ilen = 16,
24601 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
24602 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
24603 .rlen = 16,
24604 }, {
24605 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24606 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24607 .klen = 16,
24608 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
24609 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24610 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24611 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24612 .ilen = 32,
24613 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
24614 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
24615 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
24616 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
24617 .rlen = 32,
24618 }
24619};
24620
24621static struct cipher_testvec xtea_dec_tv_template[] = {
24622 {
24623 .key = zeroed_string,
24624 .klen = 16,
24625 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
24626 .ilen = 8,
24627 .result = zeroed_string,
24628 .rlen = 8,
24629 }, {
24630 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24631 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24632 .klen = 16,
24633 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
24634 .ilen = 8,
24635 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24636 .rlen = 8,
24637 }, {
24638 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24639 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24640 .klen = 16,
24641 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
24642 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
24643 .ilen = 16,
24644 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24645 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24646 .rlen = 16,
24647 }, {
24648 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24649 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24650 .klen = 16,
24651 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
24652 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
24653 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
24654 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
24655 .ilen = 32,
24656 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
24657 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24658 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24659 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24660 .rlen = 32,
24661 }
24662};
24663
24664/*
24665 * KHAZAD test vectors.
24666 */
24667#define KHAZAD_ENC_TEST_VECTORS 5
24668#define KHAZAD_DEC_TEST_VECTORS 5
24669
24670static struct cipher_testvec khazad_enc_tv_template[] = {
24671 {
24672 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
24673 "\x00\x00\x00\x00\x00\x00\x00\x00",
24674 .klen = 16,
24675 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24676 .ilen = 8,
24677 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
24678 .rlen = 8,
24679 }, {
24680 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
24681 "\x38\x38\x38\x38\x38\x38\x38\x38",
24682 .klen = 16,
24683 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
24684 .ilen = 8,
24685 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
24686 .rlen = 8,
24687 }, {
24688 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
24689 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24690 .klen = 16,
24691 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24692 .ilen = 8,
24693 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
24694 .rlen = 8,
24695 }, {
24696 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24697 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24698 .klen = 16,
24699 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24700 .ilen = 8,
24701 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24702 .rlen = 8,
24703 }, {
24704 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24705 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24706 .klen = 16,
24707 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24708 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24709 .ilen = 16,
24710 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
24711 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24712 .rlen = 16,
24713 },
24714};
24715
24716static struct cipher_testvec khazad_dec_tv_template[] = {
24717 {
24718 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
24719 "\x00\x00\x00\x00\x00\x00\x00\x00",
24720 .klen = 16,
24721 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
24722 .ilen = 8,
24723 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24724 .rlen = 8,
24725 }, {
24726 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
24727 "\x38\x38\x38\x38\x38\x38\x38\x38",
24728 .klen = 16,
24729 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
24730 .ilen = 8,
24731 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
24732 .rlen = 8,
24733 }, {
24734 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
24735 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24736 .klen = 16,
24737 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
24738 .ilen = 8,
24739 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24740 .rlen = 8,
24741 }, {
24742 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24743 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24744 .klen = 16,
24745 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24746 .ilen = 8,
24747 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24748 .rlen = 8,
24749 }, {
24750 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24751 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24752 .klen = 16,
24753 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
24754 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24755 .ilen = 16,
24756 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24757 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24758 .rlen = 16,
24759 },
24760};
24761
24762/*
24763 * Anubis test vectors.
24764 */
24765
24766#define ANUBIS_ENC_TEST_VECTORS 5
24767#define ANUBIS_DEC_TEST_VECTORS 5
24768#define ANUBIS_CBC_ENC_TEST_VECTORS 2
24769#define ANUBIS_CBC_DEC_TEST_VECTORS 2
24770
24771static struct cipher_testvec anubis_enc_tv_template[] = {
24772 {
24773 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24774 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24775 .klen = 16,
24776 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24777 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24778 .ilen = 16,
24779 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24780 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
24781 .rlen = 16,
24782 }, {
24783
24784 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
24785 "\x03\x03\x03\x03\x03\x03\x03\x03"
24786 "\x03\x03\x03\x03",
24787 .klen = 20,
24788 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
24789 "\x03\x03\x03\x03\x03\x03\x03\x03",
24790 .ilen = 16,
24791 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
24792 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
24793 .rlen = 16,
24794 }, {
24795 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
24796 "\x24\x24\x24\x24\x24\x24\x24\x24"
24797 "\x24\x24\x24\x24\x24\x24\x24\x24"
24798 "\x24\x24\x24\x24",
24799 .klen = 28,
24800 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
24801 "\x24\x24\x24\x24\x24\x24\x24\x24",
24802 .ilen = 16,
24803 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
24804 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
24805 .rlen = 16,
24806 }, {
24807 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
24808 "\x25\x25\x25\x25\x25\x25\x25\x25"
24809 "\x25\x25\x25\x25\x25\x25\x25\x25"
24810 "\x25\x25\x25\x25\x25\x25\x25\x25",
24811 .klen = 32,
24812 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
24813 "\x25\x25\x25\x25\x25\x25\x25\x25",
24814 .ilen = 16,
24815 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
24816 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
24817 .rlen = 16,
24818 }, {
24819 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24820 "\x35\x35\x35\x35\x35\x35\x35\x35"
24821 "\x35\x35\x35\x35\x35\x35\x35\x35"
24822 "\x35\x35\x35\x35\x35\x35\x35\x35"
24823 "\x35\x35\x35\x35\x35\x35\x35\x35",
24824 .klen = 40,
24825 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
24826 "\x35\x35\x35\x35\x35\x35\x35\x35",
24827 .ilen = 16,
24828 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24829 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
24830 .rlen = 16,
24831 },
24832};
24833
24834static struct cipher_testvec anubis_dec_tv_template[] = {
24835 {
24836 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24837 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24838 .klen = 16,
24839 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24840 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
24841 .ilen = 16,
24842 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24843 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24844 .rlen = 16,
24845 }, {
24846
24847 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
24848 "\x03\x03\x03\x03\x03\x03\x03\x03"
24849 "\x03\x03\x03\x03",
24850 .klen = 20,
24851 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
24852 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
24853 .ilen = 16,
24854 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
24855 "\x03\x03\x03\x03\x03\x03\x03\x03",
24856 .rlen = 16,
24857 }, {
24858 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
24859 "\x24\x24\x24\x24\x24\x24\x24\x24"
24860 "\x24\x24\x24\x24\x24\x24\x24\x24"
24861 "\x24\x24\x24\x24",
24862 .klen = 28,
24863 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
24864 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
24865 .ilen = 16,
24866 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
24867 "\x24\x24\x24\x24\x24\x24\x24\x24",
24868 .rlen = 16,
24869 }, {
24870 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
24871 "\x25\x25\x25\x25\x25\x25\x25\x25"
24872 "\x25\x25\x25\x25\x25\x25\x25\x25"
24873 "\x25\x25\x25\x25\x25\x25\x25\x25",
24874 .klen = 32,
24875 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
24876 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
24877 .ilen = 16,
24878 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
24879 "\x25\x25\x25\x25\x25\x25\x25\x25",
24880 .rlen = 16,
24881 }, {
24882 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24883 "\x35\x35\x35\x35\x35\x35\x35\x35"
24884 "\x35\x35\x35\x35\x35\x35\x35\x35"
24885 "\x35\x35\x35\x35\x35\x35\x35\x35"
24886 "\x35\x35\x35\x35\x35\x35\x35\x35",
24887 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24888 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
24889 .klen = 40,
24890 .ilen = 16,
24891 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
24892 "\x35\x35\x35\x35\x35\x35\x35\x35",
24893 .rlen = 16,
24894 },
24895};
24896
24897static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
24898 {
24899 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24900 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24901 .klen = 16,
24902 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24903 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24904 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24905 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24906 .ilen = 32,
24907 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24908 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
24909 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
24910 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
24911 .rlen = 32,
24912 }, {
24913 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24914 "\x35\x35\x35\x35\x35\x35\x35\x35"
24915 "\x35\x35\x35\x35\x35\x35\x35\x35"
24916 "\x35\x35\x35\x35\x35\x35\x35\x35"
24917 "\x35\x35\x35\x35\x35\x35\x35\x35",
24918 .klen = 40,
24919 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
24920 "\x35\x35\x35\x35\x35\x35\x35\x35"
24921 "\x35\x35\x35\x35\x35\x35\x35\x35"
24922 "\x35\x35\x35\x35\x35\x35\x35\x35",
24923 .ilen = 32,
24924 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24925 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
24926 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
24927 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
24928 .rlen = 32,
24929 },
24930};
24931
24932static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
24933 {
24934 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24935 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24936 .klen = 16,
24937 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24938 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
24939 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
24940 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
24941 .ilen = 32,
24942 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24943 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24944 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24945 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24946 .rlen = 32,
24947 }, {
24948 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24949 "\x35\x35\x35\x35\x35\x35\x35\x35"
24950 "\x35\x35\x35\x35\x35\x35\x35\x35"
24951 "\x35\x35\x35\x35\x35\x35\x35\x35"
24952 "\x35\x35\x35\x35\x35\x35\x35\x35",
24953 .klen = 40,
24954 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24955 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
24956 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
24957 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
24958 .ilen = 32,
24959 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
24960 "\x35\x35\x35\x35\x35\x35\x35\x35"
24961 "\x35\x35\x35\x35\x35\x35\x35\x35"
24962 "\x35\x35\x35\x35\x35\x35\x35\x35",
24963 .rlen = 32,
24964 },
24965};
24966
24967/*
24968 * XETA test vectors
24969 */
24970#define XETA_ENC_TEST_VECTORS 4
24971#define XETA_DEC_TEST_VECTORS 4
24972
24973static struct cipher_testvec xeta_enc_tv_template[] = {
24974 {
24975 .key = zeroed_string,
24976 .klen = 16,
24977 .input = zeroed_string,
24978 .ilen = 8,
24979 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
24980 .rlen = 8,
24981 }, {
24982 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24983 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24984 .klen = 16,
24985 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24986 .ilen = 8,
24987 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
24988 .rlen = 8,
24989 }, {
24990 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24991 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24992 .klen = 16,
24993 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24994 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24995 .ilen = 16,
24996 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
24997 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
24998 .rlen = 16,
24999 }, {
25000 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25001 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25002 .klen = 16,
25003 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
25004 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25005 "\x79\x6f\x75\x21\x21\x21\x20\x72"
25006 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25007 .ilen = 32,
25008 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
25009 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
25010 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
25011 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
25012 .rlen = 32,
25013 }
25014};
25015
25016static struct cipher_testvec xeta_dec_tv_template[] = {
25017 {
25018 .key = zeroed_string,
25019 .klen = 16,
25020 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
25021 .ilen = 8,
25022 .result = zeroed_string,
25023 .rlen = 8,
25024 }, {
25025 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25026 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25027 .klen = 16,
25028 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
25029 .ilen = 8,
25030 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25031 .rlen = 8,
25032 }, {
25033 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
25034 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25035 .klen = 16,
25036 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
25037 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
25038 .ilen = 16,
25039 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25040 "\x65\x73\x74\x5f\x76\x65\x63\x74",
25041 .rlen = 16,
25042 }, {
25043 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25044 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25045 .klen = 16,
25046 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
25047 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
25048 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
25049 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
25050 .ilen = 32,
25051 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
25052 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25053 "\x79\x6f\x75\x21\x21\x21\x20\x72"
25054 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25055 .rlen = 32,
25056 }
25057};
25058
25059/*
25060 * FCrypt test vectors
25061 */
25062#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
25063#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
25064
25065static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
25066 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
25067 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
25068 .klen = 8,
25069 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
25070 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
25071 .ilen = 8,
25072 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
25073 .rlen = 8,
25074 }, {
25075 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
25076 .klen = 8,
25077 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
25078 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
25079 .ilen = 8,
25080 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
25081 .rlen = 8,
25082 }, { /* From Arla */
25083 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25084 .klen = 8,
25085 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25086 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
25087 .ilen = 48,
25088 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
25089 "\xee\xac\x98\x62\x44\x51\xe4\x84"
25090 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
25091 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
25092 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
25093 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
25094 .rlen = 48,
25095 }, {
25096 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25097 .klen = 8,
25098 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25099 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
25100 .ilen = 48,
25101 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
25102 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
25103 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
25104 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
25105 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
25106 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
25107 .rlen = 48,
25108 }, { /* split-page version */
25109 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25110 .klen = 8,
25111 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25112 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
25113 .ilen = 48,
25114 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
25115 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
25116 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
25117 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
25118 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
25119 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
25120 .rlen = 48,
25121 .np = 2,
25122 .tap = { 20, 28 },
25123 }
25124};
25125
25126static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
25127 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
25128 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
25129 .klen = 8,
25130 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
25131 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
25132 .ilen = 8,
25133 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
25134 .rlen = 8,
25135 }, {
25136 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
25137 .klen = 8,
25138 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
25139 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
25140 .ilen = 8,
25141 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
25142 .rlen = 8,
25143 }, { /* From Arla */
25144 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25145 .klen = 8,
25146 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25147 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
25148 "\xee\xac\x98\x62\x44\x51\xe4\x84"
25149 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
25150 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
25151 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
25152 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
25153 .ilen = 48,
25154 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
25155 .rlen = 48,
25156 }, {
25157 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25158 .klen = 8,
25159 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25160 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
25161 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
25162 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
25163 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
25164 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
25165 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
25166 .ilen = 48,
25167 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
25168 .rlen = 48,
25169 }, { /* split-page version */
25170 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25171 .klen = 8,
25172 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25173 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
25174 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
25175 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
25176 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
25177 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
25178 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
25179 .ilen = 48,
25180 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
25181 .rlen = 48,
25182 .np = 2,
25183 .tap = { 20, 28 },
25184 }
25185};
25186
25187/*
25188 * CAMELLIA test vectors.
25189 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025190#define CAMELLIA_ENC_TEST_VECTORS 4
25191#define CAMELLIA_DEC_TEST_VECTORS 4
25192#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
25193#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
25194#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
25195#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
25196#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
25197#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
25198#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
25199#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080025200
25201static struct cipher_testvec camellia_enc_tv_template[] = {
25202 {
25203 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25204 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25205 .klen = 16,
25206 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25207 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25208 .ilen = 16,
25209 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
25210 "\x08\x57\x06\x56\x48\xea\xbe\x43",
25211 .rlen = 16,
25212 }, {
25213 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25214 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25215 "\x00\x11\x22\x33\x44\x55\x66\x77",
25216 .klen = 24,
25217 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25218 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25219 .ilen = 16,
25220 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
25221 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
25222 .rlen = 16,
25223 }, {
25224 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25225 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25226 "\x00\x11\x22\x33\x44\x55\x66\x77"
25227 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
25228 .klen = 32,
25229 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25230 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25231 .ilen = 16,
25232 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
25233 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
25234 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025235 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025236 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
25237 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
25238 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
25239 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
25240 .klen = 32,
25241 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25242 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25243 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25244 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25245 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025246 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25247 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25248 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25249 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25250 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25251 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25252 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25253 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25254 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25255 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25256 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25257 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25258 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25259 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25260 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25261 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25262 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25263 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25264 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25265 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25266 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25267 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25268 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25269 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25270 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25271 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25272 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25273 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25274 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25275 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25276 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25277 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25278 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25279 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25280 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25281 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25282 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25283 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25284 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25285 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25286 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25287 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25288 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25289 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25290 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25291 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25292 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25293 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25294 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25295 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25296 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25297 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25298 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25299 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25300 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25301 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025302 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25303 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25304 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25305 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25306 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25307 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25308 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25309 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25310 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25311 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25312 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25313 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25314 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25315 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25316 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25317 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25318 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25319 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25320 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25321 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25322 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25323 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25324 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25325 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25326 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25327 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25328 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25329 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25330 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25331 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25332 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25333 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25334 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25335 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25336 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25337 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25338 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25339 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25340 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25341 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25342 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25343 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25344 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25345 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25346 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25347 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25348 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25349 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25350 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25351 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25352 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25353 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25354 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25355 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25356 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25357 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25358 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25359 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25360 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25361 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25362 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25363 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25364 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25365 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25366 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25367 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025368 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
25369 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
25370 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
25371 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
25372 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025373 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
25374 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
25375 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
25376 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
25377 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
25378 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
25379 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
25380 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
25381 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
25382 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
25383 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
25384 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
25385 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
25386 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
25387 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
25388 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
25389 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
25390 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
25391 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
25392 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
25393 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
25394 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
25395 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
25396 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
25397 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
25398 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
25399 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
25400 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
25401 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
25402 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
25403 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
25404 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
25405 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
25406 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
25407 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
25408 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
25409 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
25410 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
25411 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
25412 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
25413 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
25414 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
25415 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
25416 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
25417 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
25418 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
25419 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
25420 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
25421 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
25422 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
25423 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
25424 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
25425 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
25426 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
25427 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
25428 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025429 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
25430 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
25431 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
25432 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
25433 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
25434 "\xED\x28\x39\xE9\x63\xED\x41\x70"
25435 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
25436 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
25437 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
25438 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
25439 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
25440 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
25441 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
25442 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
25443 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
25444 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
25445 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
25446 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
25447 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
25448 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
25449 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
25450 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
25451 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
25452 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
25453 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
25454 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
25455 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
25456 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
25457 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
25458 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
25459 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
25460 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
25461 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
25462 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
25463 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
25464 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
25465 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
25466 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
25467 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
25468 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
25469 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
25470 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
25471 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
25472 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
25473 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
25474 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
25475 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
25476 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
25477 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
25478 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
25479 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
25480 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
25481 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
25482 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
25483 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
25484 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
25485 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
25486 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
25487 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
25488 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
25489 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
25490 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
25491 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
25492 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
25493 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
25494 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025495 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025496 .np = 3,
25497 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025498 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025499};
25500
25501static struct cipher_testvec camellia_dec_tv_template[] = {
25502 {
25503 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25504 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25505 .klen = 16,
25506 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
25507 "\x08\x57\x06\x56\x48\xea\xbe\x43",
25508 .ilen = 16,
25509 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25510 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25511 .rlen = 16,
25512 }, {
25513 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25514 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25515 "\x00\x11\x22\x33\x44\x55\x66\x77",
25516 .klen = 24,
25517 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
25518 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
25519 .ilen = 16,
25520 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25521 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25522 .rlen = 16,
25523 }, {
25524 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25525 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25526 "\x00\x11\x22\x33\x44\x55\x66\x77"
25527 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
25528 .klen = 32,
25529 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
25530 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
25531 .ilen = 16,
25532 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25533 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25534 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025535 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025536 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
25537 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
25538 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
25539 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
25540 .klen = 32,
25541 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
25542 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
25543 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
25544 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
25545 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025546 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
25547 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
25548 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
25549 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
25550 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
25551 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
25552 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
25553 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
25554 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
25555 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
25556 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
25557 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
25558 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
25559 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
25560 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
25561 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
25562 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
25563 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
25564 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
25565 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
25566 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
25567 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
25568 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
25569 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
25570 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
25571 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
25572 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
25573 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
25574 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
25575 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
25576 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
25577 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
25578 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
25579 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
25580 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
25581 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
25582 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
25583 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
25584 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
25585 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
25586 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
25587 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
25588 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
25589 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
25590 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
25591 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
25592 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
25593 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
25594 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
25595 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
25596 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
25597 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
25598 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
25599 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
25600 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
25601 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025602 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
25603 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
25604 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
25605 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
25606 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
25607 "\xED\x28\x39\xE9\x63\xED\x41\x70"
25608 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
25609 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
25610 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
25611 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
25612 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
25613 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
25614 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
25615 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
25616 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
25617 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
25618 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
25619 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
25620 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
25621 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
25622 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
25623 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
25624 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
25625 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
25626 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
25627 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
25628 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
25629 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
25630 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
25631 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
25632 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
25633 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
25634 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
25635 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
25636 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
25637 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
25638 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
25639 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
25640 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
25641 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
25642 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
25643 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
25644 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
25645 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
25646 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
25647 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
25648 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
25649 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
25650 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
25651 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
25652 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
25653 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
25654 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
25655 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
25656 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
25657 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
25658 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
25659 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
25660 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
25661 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
25662 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
25663 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
25664 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
25665 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
25666 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
25667 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025668 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25669 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25670 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25671 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25672 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025673 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25674 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25675 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25676 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25677 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25678 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25679 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25680 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25681 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25682 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25683 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25684 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25685 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25686 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25687 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25688 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25689 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25690 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25691 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25692 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25693 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25694 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25695 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25696 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25697 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25698 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25699 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25700 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25701 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25702 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25703 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25704 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25705 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25706 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25707 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25708 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25709 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25710 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25711 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25712 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25713 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25714 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25715 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25716 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25717 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25718 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25719 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25720 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25721 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25722 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25723 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25724 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25725 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25726 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25727 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25728 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025729 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25730 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25731 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25732 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25733 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25734 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25735 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25736 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25737 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25738 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25739 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25740 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25741 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25742 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25743 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25744 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25745 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25746 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25747 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25748 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25749 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25750 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25751 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25752 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25753 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25754 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25755 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25756 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25757 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25758 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25759 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25760 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25761 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25762 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25763 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25764 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25765 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25766 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25767 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25768 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25769 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25770 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25771 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25772 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25773 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25774 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25775 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25776 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25777 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25778 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25779 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25780 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25781 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25782 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25783 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25784 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25785 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25786 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25787 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25788 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25789 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25790 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25791 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25792 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25793 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25794 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025795 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025796 .np = 3,
25797 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025798 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025799};
25800
25801static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
25802 {
25803 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
25804 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
25805 .klen = 16,
25806 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
25807 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
25808 .input = "Single block msg",
25809 .ilen = 16,
25810 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
25811 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
25812 .rlen = 16,
25813 }, {
25814 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
25815 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
25816 .klen = 16,
25817 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
25818 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
25819 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
25820 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
25821 "\x10\x11\x12\x13\x14\x15\x16\x17"
25822 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
25823 .ilen = 32,
25824 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
25825 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
25826 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
25827 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
25828 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025829 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025830 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25831 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25832 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25833 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25834 .klen = 32,
25835 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
25836 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
25837 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25838 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25839 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25840 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25841 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025842 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25843 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25844 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25845 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25846 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25847 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25848 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25849 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25850 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25851 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25852 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25853 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25854 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25855 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25856 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25857 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25858 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25859 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25860 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25861 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25862 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25863 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25864 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25865 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25866 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25867 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25868 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25869 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25870 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25871 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25872 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25873 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25874 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25875 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25876 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25877 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25878 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25879 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25880 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25881 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25882 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25883 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25884 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25885 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25886 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25887 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25888 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25889 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25890 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25891 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25892 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25893 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25894 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25895 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25896 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25897 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025898 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25899 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25900 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25901 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25902 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25903 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25904 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25905 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25906 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25907 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25908 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25909 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25910 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25911 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25912 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25913 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25914 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25915 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25916 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25917 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25918 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25919 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25920 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25921 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25922 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25923 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25924 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25925 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25926 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25927 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25928 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25929 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25930 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25931 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25932 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25933 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25934 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25935 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25936 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25937 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25938 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25939 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25940 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25941 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25942 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25943 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25944 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25945 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25946 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25947 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25948 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25949 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25950 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25951 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25952 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25953 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25954 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25955 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25956 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25957 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25958 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25959 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25960 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25961 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25962 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25963 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025964 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
25965 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
25966 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
25967 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
25968 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025969 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
25970 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
25971 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
25972 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
25973 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
25974 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
25975 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
25976 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
25977 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
25978 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
25979 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
25980 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
25981 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
25982 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
25983 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
25984 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
25985 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
25986 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
25987 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
25988 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
25989 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
25990 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
25991 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
25992 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
25993 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
25994 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
25995 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
25996 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
25997 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
25998 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
25999 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
26000 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
26001 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
26002 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
26003 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
26004 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
26005 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
26006 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
26007 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
26008 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
26009 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
26010 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
26011 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
26012 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
26013 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
26014 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
26015 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
26016 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
26017 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
26018 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
26019 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
26020 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
26021 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
26022 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
26023 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
26024 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026025 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
26026 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
26027 "\x21\x41\x56\x72\x13\xE1\x86\x07"
26028 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
26029 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
26030 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
26031 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
26032 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
26033 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
26034 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
26035 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
26036 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
26037 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
26038 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
26039 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
26040 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
26041 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
26042 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
26043 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
26044 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
26045 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
26046 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
26047 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
26048 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
26049 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
26050 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
26051 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
26052 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
26053 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
26054 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
26055 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
26056 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
26057 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
26058 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
26059 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
26060 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
26061 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
26062 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
26063 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
26064 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
26065 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
26066 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
26067 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
26068 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
26069 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
26070 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
26071 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
26072 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
26073 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
26074 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
26075 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
26076 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
26077 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
26078 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
26079 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
26080 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
26081 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
26082 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
26083 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
26084 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
26085 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
26086 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
26087 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
26088 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
26089 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
26090 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026091 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020026092 .np = 3,
26093 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026094 },
Herbert Xuda7f0332008-07-31 17:08:25 +080026095};
26096
26097static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
26098 {
26099 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
26100 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
26101 .klen = 16,
26102 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
26103 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
26104 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
26105 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
26106 .ilen = 16,
26107 .result = "Single block msg",
26108 .rlen = 16,
26109 }, {
26110 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
26111 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
26112 .klen = 16,
26113 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
26114 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
26115 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
26116 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
26117 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
26118 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
26119 .ilen = 32,
26120 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
26121 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
26122 "\x10\x11\x12\x13\x14\x15\x16\x17"
26123 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
26124 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026125 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026126 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26127 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26128 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26129 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26130 .klen = 32,
26131 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26132 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26133 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
26134 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
26135 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
26136 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
26137 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026138 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
26139 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
26140 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
26141 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
26142 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
26143 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
26144 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
26145 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
26146 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
26147 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
26148 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
26149 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
26150 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
26151 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
26152 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
26153 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
26154 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
26155 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
26156 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
26157 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
26158 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
26159 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
26160 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
26161 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
26162 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
26163 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
26164 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
26165 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
26166 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
26167 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
26168 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
26169 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
26170 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
26171 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
26172 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
26173 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
26174 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
26175 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
26176 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
26177 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
26178 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
26179 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
26180 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
26181 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
26182 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
26183 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
26184 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
26185 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
26186 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
26187 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
26188 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
26189 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
26190 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
26191 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
26192 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
26193 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026194 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
26195 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
26196 "\x21\x41\x56\x72\x13\xE1\x86\x07"
26197 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
26198 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
26199 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
26200 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
26201 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
26202 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
26203 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
26204 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
26205 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
26206 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
26207 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
26208 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
26209 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
26210 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
26211 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
26212 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
26213 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
26214 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
26215 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
26216 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
26217 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
26218 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
26219 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
26220 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
26221 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
26222 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
26223 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
26224 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
26225 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
26226 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
26227 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
26228 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
26229 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
26230 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
26231 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
26232 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
26233 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
26234 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
26235 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
26236 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
26237 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
26238 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
26239 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
26240 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
26241 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
26242 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
26243 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
26244 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
26245 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
26246 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
26247 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
26248 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
26249 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
26250 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
26251 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
26252 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
26253 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
26254 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
26255 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
26256 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
26257 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
26258 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
26259 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026260 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26261 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26262 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26263 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26264 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026265 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26266 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26267 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26268 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26269 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26270 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26271 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26272 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26273 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26274 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26275 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26276 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26277 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26278 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26279 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26280 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26281 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26282 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26283 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26284 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26285 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26286 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26287 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26288 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26289 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26290 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26291 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26292 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26293 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26294 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26295 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26296 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26297 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26298 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26299 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26300 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26301 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26302 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26303 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26304 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26305 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26306 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26307 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26308 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26309 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26310 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26311 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26312 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26313 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26314 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26315 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26316 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26317 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26318 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26319 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26320 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026321 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26322 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26323 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26324 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26325 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26326 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26327 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26328 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26329 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26330 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26331 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26332 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26333 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26334 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26335 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26336 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26337 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26338 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26339 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26340 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26341 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26342 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26343 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26344 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26345 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26346 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26347 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26348 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26349 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26350 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26351 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26352 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26353 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26354 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26355 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26356 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26357 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26358 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26359 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26360 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26361 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26362 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26363 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26364 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26365 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26366 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26367 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26368 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26369 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26370 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26371 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26372 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26373 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26374 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26375 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26376 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26377 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26378 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26379 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26380 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26381 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26382 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26383 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26384 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26385 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26386 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026387 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020026388 .np = 3,
26389 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026390 },
26391};
26392
26393static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
26394 { /* Generated with Crypto++ */
26395 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26396 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26397 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26398 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26399 .klen = 32,
26400 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26401 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26402 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26403 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26404 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26405 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26406 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026407 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26408 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26409 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26410 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26411 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26412 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26413 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26414 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26415 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26416 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26417 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26418 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26419 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26420 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26421 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26422 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26423 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26424 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26425 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26426 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26427 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26428 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26429 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26430 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26431 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26432 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26433 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26434 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26435 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26436 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26437 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26438 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26439 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26440 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26441 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26442 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26443 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26444 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26445 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26446 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26447 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26448 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26449 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26450 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26451 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26452 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26453 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26454 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26455 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26456 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26457 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26458 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26459 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26460 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26461 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26462 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26463 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
26464 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026465 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26466 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26467 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26468 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26469 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026470 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
26471 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26472 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26473 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26474 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26475 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26476 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26477 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26478 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26479 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26480 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26481 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26482 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26483 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26484 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26485 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26486 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26487 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26488 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26489 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26490 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26491 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26492 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26493 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26494 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26495 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26496 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26497 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26498 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26499 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26500 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26501 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26502 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26503 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26504 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26505 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26506 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26507 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26508 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26509 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26510 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26511 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26512 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26513 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26514 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26515 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26516 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26517 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26518 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26519 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26520 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26521 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26522 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26523 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26524 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26525 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26526 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
26527 .rlen = 496,
26528 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026529 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26530 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26531 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26532 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26533 .klen = 32,
26534 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26535 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26536 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26537 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26538 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26539 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26540 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26541 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026542 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26543 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26544 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26545 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26546 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26547 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26548 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26549 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26550 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26551 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26552 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26553 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26554 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26555 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26556 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26557 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26558 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26559 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26560 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26561 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26562 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26563 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26564 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26565 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26566 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26567 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26568 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26569 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26570 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26571 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26572 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26573 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26574 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26575 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26576 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26577 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26578 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26579 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26580 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26581 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26582 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26583 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26584 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26585 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26586 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26587 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26588 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26589 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26590 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26591 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26592 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26593 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26594 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26595 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26596 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26597 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026598 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26599 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26600 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26601 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26602 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26603 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26604 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26605 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26606 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26607 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26608 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26609 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26610 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26611 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26612 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26613 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26614 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26615 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26616 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26617 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26618 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26619 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26620 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26621 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26622 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26623 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26624 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26625 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26626 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26627 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26628 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26629 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26630 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26631 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26632 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26633 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26634 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26635 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26636 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26637 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26638 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26639 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26640 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26641 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26642 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26643 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26644 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26645 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26646 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26647 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26648 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26649 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26650 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26651 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26652 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26653 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26654 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26655 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26656 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26657 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26658 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26659 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26660 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26661 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
26662 "\xE4\x7B\x12",
26663 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026664 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26665 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26666 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26667 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26668 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
26669 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026670 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26671 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26672 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26673 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26674 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26675 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26676 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26677 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26678 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26679 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26680 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26681 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26682 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26683 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26684 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26685 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26686 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26687 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26688 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26689 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26690 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26691 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26692 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26693 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26694 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26695 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26696 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26697 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26698 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26699 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26700 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26701 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26702 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26703 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26704 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26705 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26706 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26707 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26708 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26709 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26710 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26711 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26712 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26713 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26714 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26715 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26716 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26717 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26718 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26719 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26720 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26721 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26722 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26723 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26724 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26725 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026726 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
26727 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
26728 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
26729 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
26730 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
26731 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
26732 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
26733 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
26734 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
26735 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
26736 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
26737 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
26738 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
26739 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
26740 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
26741 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
26742 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
26743 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
26744 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
26745 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
26746 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
26747 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
26748 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
26749 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
26750 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
26751 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
26752 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
26753 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
26754 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
26755 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
26756 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
26757 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
26758 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
26759 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
26760 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
26761 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
26762 "\x00\x70\x12\x56\x56\x50\xAD\x14"
26763 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
26764 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
26765 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
26766 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
26767 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
26768 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
26769 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
26770 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
26771 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
26772 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
26773 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
26774 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
26775 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
26776 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
26777 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
26778 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
26779 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
26780 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
26781 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
26782 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
26783 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
26784 "\x74\x28\x9D\x05\x30\x20\x62\x41"
26785 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
26786 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
26787 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
26788 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
26789 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
26790 "\xF1\x6B\xD9",
26791 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026792 .also_non_np = 1,
26793 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026794 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030026795 }, { /* Generated with Crypto++ */
26796 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26797 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26798 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26799 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26800 .klen = 32,
26801 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
26802 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
26803 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26804 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26805 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26806 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26807 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26808 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26809 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26810 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26811 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26812 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26813 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26814 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26815 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26816 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26817 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26818 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26819 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26820 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26821 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26822 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26823 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26824 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26825 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26826 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26827 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26828 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26829 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26830 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26831 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26832 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26833 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26834 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26835 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26836 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26837 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26838 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26839 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26840 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26841 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26842 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26843 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26844 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26845 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26846 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26847 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26848 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26849 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26850 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26851 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26852 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26853 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26854 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26855 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26856 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26857 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26858 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26859 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26860 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26861 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26862 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26863 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026864 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26865 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26866 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26867 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26868 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26869 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26870 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26871 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26872 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26873 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26874 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26875 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26876 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26877 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26878 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26879 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26880 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26881 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26882 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26883 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26884 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26885 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26886 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26887 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26888 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26889 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26890 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26891 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26892 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26893 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26894 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26895 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26896 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26897 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26898 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26899 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26900 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26901 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26902 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26903 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26904 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26905 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26906 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26907 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26908 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26909 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26910 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26911 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26912 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26913 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26914 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26915 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26916 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26917 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26918 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26919 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26920 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26921 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26922 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26923 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26924 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26925 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26926 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26927 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26928 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26929 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030026930 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
26931 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
26932 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
26933 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
26934 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
26935 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
26936 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
26937 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
26938 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
26939 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
26940 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
26941 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
26942 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
26943 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
26944 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
26945 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
26946 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
26947 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
26948 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
26949 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
26950 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
26951 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
26952 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
26953 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
26954 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
26955 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
26956 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
26957 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
26958 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
26959 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
26960 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
26961 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
26962 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
26963 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
26964 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
26965 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
26966 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
26967 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
26968 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
26969 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
26970 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
26971 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
26972 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
26973 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
26974 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
26975 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
26976 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
26977 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
26978 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
26979 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
26980 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
26981 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
26982 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
26983 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
26984 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
26985 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
26986 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
26987 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
26988 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
26989 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
26990 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026991 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
26992 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
26993 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
26994 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
26995 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
26996 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
26997 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
26998 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
26999 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
27000 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
27001 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
27002 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
27003 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
27004 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
27005 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
27006 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
27007 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
27008 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
27009 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
27010 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
27011 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
27012 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
27013 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
27014 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
27015 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
27016 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
27017 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
27018 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
27019 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
27020 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
27021 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
27022 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
27023 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
27024 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
27025 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
27026 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
27027 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
27028 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
27029 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
27030 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
27031 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
27032 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
27033 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
27034 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
27035 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
27036 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
27037 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
27038 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
27039 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
27040 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
27041 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
27042 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
27043 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
27044 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
27045 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
27046 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
27047 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
27048 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
27049 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
27050 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
27051 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
27052 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
27053 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
27054 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
27055 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
27056 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027057 },
27058};
27059
27060static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
27061 { /* Generated with Crypto++ */
27062 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27063 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27064 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27065 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27066 .klen = 32,
27067 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27068 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27069 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
27070 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
27071 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
27072 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
27073 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027074 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
27075 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
27076 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
27077 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
27078 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
27079 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
27080 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
27081 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
27082 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
27083 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
27084 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
27085 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
27086 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
27087 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
27088 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
27089 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
27090 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
27091 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
27092 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
27093 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
27094 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
27095 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
27096 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
27097 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
27098 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
27099 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
27100 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
27101 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
27102 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
27103 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
27104 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
27105 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
27106 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
27107 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
27108 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
27109 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
27110 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
27111 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
27112 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
27113 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
27114 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
27115 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
27116 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
27117 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
27118 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
27119 "\x76\x44\x45\xF3\x24\x11\x57\x98"
27120 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
27121 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
27122 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
27123 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
27124 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
27125 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
27126 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
27127 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
27128 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
27129 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
27130 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
27131 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027132 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27133 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27134 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27135 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27136 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027137 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27138 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27139 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27140 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27141 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27142 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27143 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27144 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27145 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27146 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27147 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27148 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27149 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27150 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27151 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27152 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27153 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27154 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27155 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27156 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27157 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27158 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27159 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27160 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27161 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27162 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27163 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27164 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27165 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27166 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27167 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27168 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27169 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27170 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27171 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27172 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27173 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27174 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27175 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27176 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27177 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27178 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27179 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27180 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27181 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27182 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27183 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27184 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27185 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27186 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27187 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27188 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27189 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27190 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27191 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27192 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27193 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
27194 .rlen = 496,
27195 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027196 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27197 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27198 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27199 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27200 .klen = 32,
27201 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27202 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27203 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
27204 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
27205 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
27206 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
27207 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
27208 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027209 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
27210 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
27211 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
27212 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
27213 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
27214 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
27215 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
27216 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
27217 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
27218 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
27219 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
27220 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
27221 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
27222 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
27223 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
27224 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
27225 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
27226 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
27227 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
27228 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
27229 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
27230 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
27231 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
27232 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
27233 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
27234 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
27235 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
27236 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
27237 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
27238 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
27239 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
27240 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
27241 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
27242 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
27243 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
27244 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
27245 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
27246 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
27247 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
27248 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
27249 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
27250 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
27251 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
27252 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
27253 "\x76\x44\x45\xF3\x24\x11\x57\x98"
27254 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
27255 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
27256 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
27257 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
27258 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
27259 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
27260 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
27261 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
27262 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
27263 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
27264 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027265 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
27266 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
27267 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
27268 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
27269 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
27270 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
27271 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
27272 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
27273 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
27274 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
27275 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
27276 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
27277 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
27278 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
27279 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
27280 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
27281 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
27282 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
27283 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
27284 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
27285 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
27286 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
27287 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
27288 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
27289 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
27290 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
27291 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
27292 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
27293 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
27294 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
27295 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
27296 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
27297 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
27298 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
27299 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
27300 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
27301 "\x00\x70\x12\x56\x56\x50\xAD\x14"
27302 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
27303 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
27304 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
27305 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
27306 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
27307 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
27308 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
27309 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
27310 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
27311 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
27312 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
27313 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
27314 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
27315 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
27316 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
27317 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
27318 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
27319 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
27320 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
27321 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
27322 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
27323 "\x74\x28\x9D\x05\x30\x20\x62\x41"
27324 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
27325 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
27326 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
27327 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
27328 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
27329 "\xF1\x6B\xD9",
27330 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027331 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27332 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27333 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27334 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27335 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27336 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027337 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27338 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27339 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27340 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27341 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27342 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27343 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27344 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27345 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27346 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27347 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27348 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27349 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27350 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27351 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27352 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27353 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27354 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27355 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27356 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27357 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27358 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27359 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27360 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27361 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27362 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27363 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27364 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27365 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27366 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27367 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27368 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27369 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27370 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27371 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27372 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27373 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27374 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27375 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27376 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27377 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27378 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27379 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27380 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27381 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27382 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27383 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27384 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27385 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27386 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27387 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27388 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27389 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27390 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27391 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27392 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027393 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27394 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27395 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27396 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27397 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27398 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27399 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27400 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27401 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27402 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27403 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27404 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27405 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27406 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27407 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27408 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27409 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27410 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27411 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27412 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27413 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27414 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27415 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27416 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27417 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27418 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27419 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27420 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27421 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27422 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27423 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27424 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27425 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27426 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27427 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27428 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27429 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27430 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27431 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27432 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27433 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27434 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27435 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27436 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27437 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27438 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27439 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27440 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27441 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27442 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27443 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27444 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27445 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27446 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27447 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27448 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27449 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27450 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27451 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27452 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27453 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27454 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27455 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27456 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
27457 "\xE4\x7B\x12",
27458 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027459 .also_non_np = 1,
27460 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027461 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030027462 }, { /* Generated with Crypto++ */
27463 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27464 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27465 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27466 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27467 .klen = 32,
27468 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
27469 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
27470 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
27471 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
27472 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
27473 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
27474 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
27475 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
27476 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
27477 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
27478 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
27479 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
27480 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
27481 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
27482 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
27483 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
27484 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
27485 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
27486 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
27487 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
27488 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
27489 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
27490 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
27491 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
27492 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
27493 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
27494 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
27495 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
27496 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
27497 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
27498 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
27499 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
27500 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
27501 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
27502 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
27503 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
27504 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
27505 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
27506 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
27507 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
27508 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
27509 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
27510 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
27511 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
27512 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
27513 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
27514 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
27515 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
27516 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
27517 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
27518 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
27519 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
27520 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
27521 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
27522 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
27523 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
27524 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
27525 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
27526 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
27527 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
27528 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
27529 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
27530 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027531 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
27532 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
27533 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
27534 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
27535 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
27536 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
27537 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
27538 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
27539 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
27540 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
27541 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
27542 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
27543 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
27544 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
27545 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
27546 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
27547 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
27548 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
27549 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
27550 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
27551 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
27552 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
27553 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
27554 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
27555 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
27556 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
27557 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
27558 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
27559 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
27560 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
27561 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
27562 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
27563 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
27564 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
27565 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
27566 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
27567 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
27568 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
27569 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
27570 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
27571 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
27572 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
27573 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
27574 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
27575 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
27576 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
27577 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
27578 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
27579 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
27580 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
27581 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
27582 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
27583 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
27584 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
27585 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
27586 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
27587 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
27588 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
27589 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
27590 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
27591 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
27592 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
27593 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
27594 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
27595 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
27596 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030027597 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27598 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27599 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27600 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27601 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27602 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27603 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27604 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27605 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27606 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27607 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27608 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27609 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27610 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27611 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27612 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27613 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27614 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27615 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27616 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27617 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27618 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27619 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27620 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27621 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27622 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27623 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27624 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27625 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27626 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27627 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27628 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27629 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27630 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27631 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27632 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27633 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27634 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27635 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27636 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27637 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27638 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27639 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27640 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27641 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27642 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27643 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27644 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27645 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27646 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27647 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27648 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27649 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27650 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27651 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27652 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27653 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27654 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27655 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27656 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27657 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027658 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27659 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27660 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27661 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27662 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27663 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27664 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27665 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27666 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27667 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27668 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27669 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27670 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27671 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27672 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27673 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27674 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27675 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27676 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27677 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27678 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27679 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27680 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27681 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27682 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27683 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27684 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27685 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27686 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27687 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27688 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27689 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27690 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27691 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27692 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27693 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27694 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27695 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27696 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27697 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27698 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27699 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27700 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27701 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27702 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27703 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27704 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27705 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27706 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27707 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27708 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27709 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27710 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27711 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27712 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27713 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27714 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27715 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27716 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27717 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27718 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27719 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27720 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27721 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27722 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27723 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027724 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027725};
27726
27727static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
27728 /* Generated from AES-LRW test vectors */
27729 {
27730 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
27731 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
27732 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
27733 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
27734 .klen = 32,
27735 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27736 "\x00\x00\x00\x00\x00\x00\x00\x01",
27737 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27738 "\x38\x39\x41\x42\x43\x44\x45\x46",
27739 .ilen = 16,
27740 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
27741 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
27742 .rlen = 16,
27743 }, {
27744 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
27745 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
27746 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
27747 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
27748 .klen = 32,
27749 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27750 "\x00\x00\x00\x00\x00\x00\x00\x02",
27751 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27752 "\x38\x39\x41\x42\x43\x44\x45\x46",
27753 .ilen = 16,
27754 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
27755 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
27756 .rlen = 16,
27757 }, {
27758 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
27759 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
27760 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
27761 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
27762 .klen = 32,
27763 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27764 "\x00\x00\x00\x02\x00\x00\x00\x00",
27765 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27766 "\x38\x39\x41\x42\x43\x44\x45\x46",
27767 .ilen = 16,
27768 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
27769 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
27770 .rlen = 16,
27771 }, {
27772 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
27773 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
27774 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
27775 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
27776 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
27777 .klen = 40,
27778 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27779 "\x00\x00\x00\x00\x00\x00\x00\x01",
27780 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27781 "\x38\x39\x41\x42\x43\x44\x45\x46",
27782 .ilen = 16,
27783 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
27784 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
27785 .rlen = 16,
27786 }, {
27787 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
27788 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
27789 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
27790 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
27791 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
27792 .klen = 40,
27793 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27794 "\x00\x00\x00\x02\x00\x00\x00\x00",
27795 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27796 "\x38\x39\x41\x42\x43\x44\x45\x46",
27797 .ilen = 16,
27798 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
27799 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
27800 .rlen = 16,
27801 }, {
27802 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27803 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27804 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27805 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27806 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27807 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27808 .klen = 48,
27809 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27810 "\x00\x00\x00\x00\x00\x00\x00\x01",
27811 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27812 "\x38\x39\x41\x42\x43\x44\x45\x46",
27813 .ilen = 16,
27814 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
27815 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
27816 .rlen = 16,
27817 }, {
27818 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
27819 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
27820 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
27821 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
27822 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
27823 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
27824 .klen = 48,
27825 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27826 "\x00\x00\x00\x02\x00\x00\x00\x00",
27827 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27828 "\x38\x39\x41\x42\x43\x44\x45\x46",
27829 .ilen = 16,
27830 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
27831 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
27832 .rlen = 16,
27833 }, {
27834 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27835 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27836 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27837 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27838 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27839 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27840 .klen = 48,
27841 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27842 "\x00\x00\x00\x00\x00\x00\x00\x01",
27843 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
27844 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
27845 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
27846 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
27847 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
27848 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
27849 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
27850 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
27851 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
27852 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
27853 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
27854 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
27855 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
27856 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
27857 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
27858 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
27859 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
27860 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
27861 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
27862 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
27863 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
27864 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
27865 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
27866 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
27867 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
27868 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
27869 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
27870 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
27871 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
27872 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
27873 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
27874 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
27875 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
27876 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
27877 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
27878 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
27879 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
27880 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
27881 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
27882 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
27883 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
27884 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
27885 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
27886 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
27887 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
27888 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
27889 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
27890 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
27891 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
27892 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
27893 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
27894 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
27895 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
27896 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
27897 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
27898 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
27899 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
27900 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
27901 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
27902 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
27903 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
27904 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
27905 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
27906 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
27907 .ilen = 512,
27908 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
27909 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
27910 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
27911 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
27912 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
27913 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
27914 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
27915 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
27916 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
27917 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
27918 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
27919 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
27920 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
27921 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
27922 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
27923 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
27924 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
27925 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
27926 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
27927 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
27928 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
27929 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
27930 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
27931 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
27932 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
27933 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
27934 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
27935 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
27936 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
27937 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
27938 "\xed\x14\xa9\x57\x19\x63\x40\x04"
27939 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
27940 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
27941 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
27942 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
27943 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
27944 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
27945 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
27946 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
27947 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
27948 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
27949 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
27950 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
27951 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
27952 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
27953 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
27954 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
27955 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
27956 "\x35\xa5\x83\x04\x84\x01\x99\x56"
27957 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
27958 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
27959 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
27960 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
27961 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
27962 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
27963 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
27964 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
27965 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
27966 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
27967 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
27968 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
27969 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
27970 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
27971 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
27972 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027973 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027974 .np = 3,
27975 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027976 },
27977};
27978
27979static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
27980 /* Generated from AES-LRW test vectors */
27981 /* same as enc vectors with input and result reversed */
27982 {
27983 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
27984 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
27985 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
27986 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
27987 .klen = 32,
27988 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27989 "\x00\x00\x00\x00\x00\x00\x00\x01",
27990 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
27991 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
27992 .ilen = 16,
27993 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27994 "\x38\x39\x41\x42\x43\x44\x45\x46",
27995 .rlen = 16,
27996 }, {
27997 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
27998 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
27999 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
28000 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
28001 .klen = 32,
28002 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28003 "\x00\x00\x00\x00\x00\x00\x00\x02",
28004 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
28005 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
28006 .ilen = 16,
28007 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28008 "\x38\x39\x41\x42\x43\x44\x45\x46",
28009 .rlen = 16,
28010 }, {
28011 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
28012 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
28013 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
28014 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
28015 .klen = 32,
28016 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28017 "\x00\x00\x00\x02\x00\x00\x00\x00",
28018 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
28019 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
28020 .ilen = 16,
28021 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28022 "\x38\x39\x41\x42\x43\x44\x45\x46",
28023 .rlen = 16,
28024 }, {
28025 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
28026 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
28027 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
28028 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
28029 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
28030 .klen = 40,
28031 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28032 "\x00\x00\x00\x00\x00\x00\x00\x01",
28033 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
28034 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
28035 .ilen = 16,
28036 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28037 "\x38\x39\x41\x42\x43\x44\x45\x46",
28038 .rlen = 16,
28039 }, {
28040 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
28041 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
28042 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
28043 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
28044 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
28045 .klen = 40,
28046 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28047 "\x00\x00\x00\x02\x00\x00\x00\x00",
28048 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
28049 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
28050 .ilen = 16,
28051 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28052 "\x38\x39\x41\x42\x43\x44\x45\x46",
28053 .rlen = 16,
28054 }, {
28055 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
28056 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
28057 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
28058 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
28059 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
28060 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
28061 .klen = 48,
28062 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28063 "\x00\x00\x00\x00\x00\x00\x00\x01",
28064 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
28065 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
28066 .ilen = 16,
28067 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28068 "\x38\x39\x41\x42\x43\x44\x45\x46",
28069 .rlen = 16,
28070 }, {
28071 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
28072 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
28073 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
28074 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
28075 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
28076 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
28077 .klen = 48,
28078 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28079 "\x00\x00\x00\x02\x00\x00\x00\x00",
28080 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
28081 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
28082 .ilen = 16,
28083 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28084 "\x38\x39\x41\x42\x43\x44\x45\x46",
28085 .rlen = 16,
28086 }, {
28087 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
28088 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
28089 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
28090 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
28091 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
28092 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
28093 .klen = 48,
28094 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28095 "\x00\x00\x00\x00\x00\x00\x00\x01",
28096 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
28097 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
28098 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
28099 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
28100 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
28101 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
28102 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
28103 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
28104 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
28105 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
28106 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
28107 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
28108 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
28109 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
28110 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
28111 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
28112 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
28113 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
28114 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
28115 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
28116 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
28117 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
28118 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
28119 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
28120 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
28121 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
28122 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
28123 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
28124 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
28125 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
28126 "\xed\x14\xa9\x57\x19\x63\x40\x04"
28127 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
28128 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
28129 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
28130 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
28131 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
28132 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
28133 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
28134 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
28135 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
28136 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
28137 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
28138 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
28139 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
28140 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
28141 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
28142 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
28143 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
28144 "\x35\xa5\x83\x04\x84\x01\x99\x56"
28145 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
28146 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
28147 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
28148 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
28149 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
28150 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
28151 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
28152 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
28153 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
28154 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
28155 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
28156 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
28157 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
28158 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
28159 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
28160 .ilen = 512,
28161 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
28162 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
28163 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
28164 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
28165 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
28166 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
28167 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
28168 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
28169 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
28170 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
28171 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
28172 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
28173 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
28174 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
28175 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
28176 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
28177 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
28178 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
28179 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
28180 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
28181 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
28182 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
28183 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
28184 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
28185 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
28186 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
28187 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
28188 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
28189 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
28190 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
28191 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
28192 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
28193 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
28194 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
28195 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
28196 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
28197 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
28198 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
28199 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
28200 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
28201 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
28202 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
28203 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
28204 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
28205 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
28206 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
28207 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
28208 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
28209 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
28210 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
28211 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
28212 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
28213 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
28214 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
28215 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
28216 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
28217 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
28218 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
28219 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
28220 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
28221 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
28222 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
28223 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
28224 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
28225 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028226 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028227 .np = 3,
28228 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028229 },
28230};
28231
28232static struct cipher_testvec camellia_xts_enc_tv_template[] = {
28233 /* Generated from AES-XTS test vectors */
28234 {
28235 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
28236 "\x00\x00\x00\x00\x00\x00\x00\x00"
28237 "\x00\x00\x00\x00\x00\x00\x00\x00"
28238 "\x00\x00\x00\x00\x00\x00\x00\x00",
28239 .klen = 32,
28240 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28241 "\x00\x00\x00\x00\x00\x00\x00\x00",
28242 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28243 "\x00\x00\x00\x00\x00\x00\x00\x00"
28244 "\x00\x00\x00\x00\x00\x00\x00\x00"
28245 "\x00\x00\x00\x00\x00\x00\x00\x00",
28246 .ilen = 32,
28247 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
28248 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
28249 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
28250 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
28251 .rlen = 32,
28252 }, {
28253 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
28254 "\x11\x11\x11\x11\x11\x11\x11\x11"
28255 "\x22\x22\x22\x22\x22\x22\x22\x22"
28256 "\x22\x22\x22\x22\x22\x22\x22\x22",
28257 .klen = 32,
28258 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28259 "\x00\x00\x00\x00\x00\x00\x00\x00",
28260 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
28261 "\x44\x44\x44\x44\x44\x44\x44\x44"
28262 "\x44\x44\x44\x44\x44\x44\x44\x44"
28263 "\x44\x44\x44\x44\x44\x44\x44\x44",
28264 .ilen = 32,
28265 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
28266 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
28267 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
28268 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
28269 .rlen = 32,
28270 }, {
28271 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
28272 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
28273 "\x22\x22\x22\x22\x22\x22\x22\x22"
28274 "\x22\x22\x22\x22\x22\x22\x22\x22",
28275 .klen = 32,
28276 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28277 "\x00\x00\x00\x00\x00\x00\x00\x00",
28278 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
28279 "\x44\x44\x44\x44\x44\x44\x44\x44"
28280 "\x44\x44\x44\x44\x44\x44\x44\x44"
28281 "\x44\x44\x44\x44\x44\x44\x44\x44",
28282 .ilen = 32,
28283 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
28284 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
28285 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
28286 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
28287 .rlen = 32,
28288 }, {
28289 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28290 "\x23\x53\x60\x28\x74\x71\x35\x26"
28291 "\x31\x41\x59\x26\x53\x58\x97\x93"
28292 "\x23\x84\x62\x64\x33\x83\x27\x95",
28293 .klen = 32,
28294 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28295 "\x00\x00\x00\x00\x00\x00\x00\x00",
28296 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
28297 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28298 "\x10\x11\x12\x13\x14\x15\x16\x17"
28299 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28300 "\x20\x21\x22\x23\x24\x25\x26\x27"
28301 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28302 "\x30\x31\x32\x33\x34\x35\x36\x37"
28303 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28304 "\x40\x41\x42\x43\x44\x45\x46\x47"
28305 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28306 "\x50\x51\x52\x53\x54\x55\x56\x57"
28307 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28308 "\x60\x61\x62\x63\x64\x65\x66\x67"
28309 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28310 "\x70\x71\x72\x73\x74\x75\x76\x77"
28311 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28312 "\x80\x81\x82\x83\x84\x85\x86\x87"
28313 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28314 "\x90\x91\x92\x93\x94\x95\x96\x97"
28315 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28316 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28317 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28318 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28319 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28320 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28321 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28322 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28323 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28324 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28325 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28326 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28327 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28328 "\x00\x01\x02\x03\x04\x05\x06\x07"
28329 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28330 "\x10\x11\x12\x13\x14\x15\x16\x17"
28331 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28332 "\x20\x21\x22\x23\x24\x25\x26\x27"
28333 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28334 "\x30\x31\x32\x33\x34\x35\x36\x37"
28335 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28336 "\x40\x41\x42\x43\x44\x45\x46\x47"
28337 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28338 "\x50\x51\x52\x53\x54\x55\x56\x57"
28339 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28340 "\x60\x61\x62\x63\x64\x65\x66\x67"
28341 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28342 "\x70\x71\x72\x73\x74\x75\x76\x77"
28343 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28344 "\x80\x81\x82\x83\x84\x85\x86\x87"
28345 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28346 "\x90\x91\x92\x93\x94\x95\x96\x97"
28347 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28348 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28349 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28350 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28351 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28352 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28353 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28354 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28355 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28356 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28357 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28358 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28359 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28360 .ilen = 512,
28361 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
28362 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
28363 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
28364 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
28365 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
28366 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
28367 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
28368 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
28369 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
28370 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
28371 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
28372 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
28373 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
28374 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
28375 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
28376 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
28377 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
28378 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
28379 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
28380 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
28381 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
28382 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
28383 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
28384 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
28385 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
28386 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
28387 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
28388 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
28389 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
28390 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
28391 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
28392 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
28393 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
28394 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
28395 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
28396 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
28397 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
28398 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
28399 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
28400 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
28401 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
28402 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
28403 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
28404 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
28405 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
28406 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
28407 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
28408 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
28409 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
28410 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
28411 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
28412 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
28413 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
28414 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
28415 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
28416 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
28417 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
28418 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
28419 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
28420 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
28421 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
28422 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
28423 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
28424 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
28425 .rlen = 512,
28426 }, {
28427 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28428 "\x23\x53\x60\x28\x74\x71\x35\x26"
28429 "\x62\x49\x77\x57\x24\x70\x93\x69"
28430 "\x99\x59\x57\x49\x66\x96\x76\x27"
28431 "\x31\x41\x59\x26\x53\x58\x97\x93"
28432 "\x23\x84\x62\x64\x33\x83\x27\x95"
28433 "\x02\x88\x41\x97\x16\x93\x99\x37"
28434 "\x51\x05\x82\x09\x74\x94\x45\x92",
28435 .klen = 64,
28436 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
28437 "\x00\x00\x00\x00\x00\x00\x00\x00",
28438 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
28439 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28440 "\x10\x11\x12\x13\x14\x15\x16\x17"
28441 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28442 "\x20\x21\x22\x23\x24\x25\x26\x27"
28443 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28444 "\x30\x31\x32\x33\x34\x35\x36\x37"
28445 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28446 "\x40\x41\x42\x43\x44\x45\x46\x47"
28447 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28448 "\x50\x51\x52\x53\x54\x55\x56\x57"
28449 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28450 "\x60\x61\x62\x63\x64\x65\x66\x67"
28451 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28452 "\x70\x71\x72\x73\x74\x75\x76\x77"
28453 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28454 "\x80\x81\x82\x83\x84\x85\x86\x87"
28455 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28456 "\x90\x91\x92\x93\x94\x95\x96\x97"
28457 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28458 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28459 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28460 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28461 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28462 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28463 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28464 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28465 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28466 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28467 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28468 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28469 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28470 "\x00\x01\x02\x03\x04\x05\x06\x07"
28471 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28472 "\x10\x11\x12\x13\x14\x15\x16\x17"
28473 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28474 "\x20\x21\x22\x23\x24\x25\x26\x27"
28475 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28476 "\x30\x31\x32\x33\x34\x35\x36\x37"
28477 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28478 "\x40\x41\x42\x43\x44\x45\x46\x47"
28479 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28480 "\x50\x51\x52\x53\x54\x55\x56\x57"
28481 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28482 "\x60\x61\x62\x63\x64\x65\x66\x67"
28483 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28484 "\x70\x71\x72\x73\x74\x75\x76\x77"
28485 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28486 "\x80\x81\x82\x83\x84\x85\x86\x87"
28487 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28488 "\x90\x91\x92\x93\x94\x95\x96\x97"
28489 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28490 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28491 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28492 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28493 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28494 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28495 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28496 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28497 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28498 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28499 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28500 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28501 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28502 .ilen = 512,
28503 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
28504 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
28505 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
28506 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
28507 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
28508 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
28509 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
28510 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
28511 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
28512 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
28513 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
28514 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
28515 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
28516 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
28517 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
28518 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
28519 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
28520 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
28521 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
28522 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
28523 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
28524 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
28525 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
28526 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
28527 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
28528 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
28529 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
28530 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
28531 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
28532 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
28533 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
28534 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
28535 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
28536 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
28537 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
28538 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
28539 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
28540 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
28541 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
28542 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
28543 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
28544 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
28545 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
28546 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
28547 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
28548 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
28549 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
28550 "\x21\x17\xf8\x59\x15\x24\x64\x22"
28551 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
28552 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
28553 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
28554 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
28555 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
28556 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
28557 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
28558 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
28559 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
28560 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
28561 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
28562 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
28563 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
28564 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
28565 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
28566 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
28567 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028568 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028569 .np = 3,
28570 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028571 },
28572};
28573
28574static struct cipher_testvec camellia_xts_dec_tv_template[] = {
28575 /* Generated from AES-XTS test vectors */
28576 /* same as enc vectors with input and result reversed */
28577 {
28578 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
28579 "\x00\x00\x00\x00\x00\x00\x00\x00"
28580 "\x00\x00\x00\x00\x00\x00\x00\x00"
28581 "\x00\x00\x00\x00\x00\x00\x00\x00",
28582 .klen = 32,
28583 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28584 "\x00\x00\x00\x00\x00\x00\x00\x00",
28585 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
28586 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
28587 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
28588 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
28589 .ilen = 32,
28590 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
28591 "\x00\x00\x00\x00\x00\x00\x00\x00"
28592 "\x00\x00\x00\x00\x00\x00\x00\x00"
28593 "\x00\x00\x00\x00\x00\x00\x00\x00",
28594 .rlen = 32,
28595 }, {
28596 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
28597 "\x11\x11\x11\x11\x11\x11\x11\x11"
28598 "\x22\x22\x22\x22\x22\x22\x22\x22"
28599 "\x22\x22\x22\x22\x22\x22\x22\x22",
28600 .klen = 32,
28601 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28602 "\x00\x00\x00\x00\x00\x00\x00\x00",
28603 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
28604 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
28605 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
28606 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
28607 .ilen = 32,
28608 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
28609 "\x44\x44\x44\x44\x44\x44\x44\x44"
28610 "\x44\x44\x44\x44\x44\x44\x44\x44"
28611 "\x44\x44\x44\x44\x44\x44\x44\x44",
28612 .rlen = 32,
28613 }, {
28614 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
28615 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
28616 "\x22\x22\x22\x22\x22\x22\x22\x22"
28617 "\x22\x22\x22\x22\x22\x22\x22\x22",
28618 .klen = 32,
28619 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28620 "\x00\x00\x00\x00\x00\x00\x00\x00",
28621 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
28622 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
28623 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
28624 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
28625 .ilen = 32,
28626 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
28627 "\x44\x44\x44\x44\x44\x44\x44\x44"
28628 "\x44\x44\x44\x44\x44\x44\x44\x44"
28629 "\x44\x44\x44\x44\x44\x44\x44\x44",
28630 .rlen = 32,
28631 }, {
28632 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28633 "\x23\x53\x60\x28\x74\x71\x35\x26"
28634 "\x31\x41\x59\x26\x53\x58\x97\x93"
28635 "\x23\x84\x62\x64\x33\x83\x27\x95",
28636 .klen = 32,
28637 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28638 "\x00\x00\x00\x00\x00\x00\x00\x00",
28639 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
28640 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
28641 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
28642 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
28643 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
28644 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
28645 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
28646 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
28647 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
28648 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
28649 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
28650 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
28651 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
28652 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
28653 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
28654 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
28655 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
28656 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
28657 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
28658 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
28659 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
28660 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
28661 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
28662 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
28663 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
28664 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
28665 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
28666 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
28667 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
28668 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
28669 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
28670 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
28671 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
28672 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
28673 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
28674 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
28675 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
28676 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
28677 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
28678 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
28679 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
28680 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
28681 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
28682 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
28683 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
28684 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
28685 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
28686 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
28687 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
28688 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
28689 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
28690 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
28691 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
28692 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
28693 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
28694 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
28695 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
28696 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
28697 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
28698 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
28699 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
28700 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
28701 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
28702 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
28703 .ilen = 512,
28704 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
28705 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28706 "\x10\x11\x12\x13\x14\x15\x16\x17"
28707 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28708 "\x20\x21\x22\x23\x24\x25\x26\x27"
28709 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28710 "\x30\x31\x32\x33\x34\x35\x36\x37"
28711 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28712 "\x40\x41\x42\x43\x44\x45\x46\x47"
28713 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28714 "\x50\x51\x52\x53\x54\x55\x56\x57"
28715 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28716 "\x60\x61\x62\x63\x64\x65\x66\x67"
28717 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28718 "\x70\x71\x72\x73\x74\x75\x76\x77"
28719 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28720 "\x80\x81\x82\x83\x84\x85\x86\x87"
28721 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28722 "\x90\x91\x92\x93\x94\x95\x96\x97"
28723 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28724 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28725 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28726 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28727 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28728 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28729 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28730 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28731 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28732 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28733 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28734 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28735 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28736 "\x00\x01\x02\x03\x04\x05\x06\x07"
28737 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28738 "\x10\x11\x12\x13\x14\x15\x16\x17"
28739 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28740 "\x20\x21\x22\x23\x24\x25\x26\x27"
28741 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28742 "\x30\x31\x32\x33\x34\x35\x36\x37"
28743 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28744 "\x40\x41\x42\x43\x44\x45\x46\x47"
28745 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28746 "\x50\x51\x52\x53\x54\x55\x56\x57"
28747 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28748 "\x60\x61\x62\x63\x64\x65\x66\x67"
28749 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28750 "\x70\x71\x72\x73\x74\x75\x76\x77"
28751 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28752 "\x80\x81\x82\x83\x84\x85\x86\x87"
28753 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28754 "\x90\x91\x92\x93\x94\x95\x96\x97"
28755 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28756 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28757 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28758 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28759 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28760 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28761 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28762 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28763 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28764 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28765 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28766 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28767 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28768 .rlen = 512,
28769 }, {
28770 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28771 "\x23\x53\x60\x28\x74\x71\x35\x26"
28772 "\x62\x49\x77\x57\x24\x70\x93\x69"
28773 "\x99\x59\x57\x49\x66\x96\x76\x27"
28774 "\x31\x41\x59\x26\x53\x58\x97\x93"
28775 "\x23\x84\x62\x64\x33\x83\x27\x95"
28776 "\x02\x88\x41\x97\x16\x93\x99\x37"
28777 "\x51\x05\x82\x09\x74\x94\x45\x92",
28778 .klen = 64,
28779 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
28780 "\x00\x00\x00\x00\x00\x00\x00\x00",
28781 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
28782 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
28783 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
28784 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
28785 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
28786 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
28787 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
28788 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
28789 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
28790 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
28791 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
28792 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
28793 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
28794 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
28795 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
28796 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
28797 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
28798 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
28799 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
28800 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
28801 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
28802 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
28803 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
28804 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
28805 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
28806 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
28807 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
28808 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
28809 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
28810 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
28811 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
28812 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
28813 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
28814 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
28815 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
28816 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
28817 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
28818 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
28819 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
28820 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
28821 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
28822 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
28823 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
28824 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
28825 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
28826 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
28827 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
28828 "\x21\x17\xf8\x59\x15\x24\x64\x22"
28829 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
28830 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
28831 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
28832 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
28833 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
28834 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
28835 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
28836 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
28837 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
28838 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
28839 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
28840 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
28841 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
28842 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
28843 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
28844 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
28845 .ilen = 512,
28846 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
28847 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28848 "\x10\x11\x12\x13\x14\x15\x16\x17"
28849 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28850 "\x20\x21\x22\x23\x24\x25\x26\x27"
28851 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28852 "\x30\x31\x32\x33\x34\x35\x36\x37"
28853 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28854 "\x40\x41\x42\x43\x44\x45\x46\x47"
28855 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28856 "\x50\x51\x52\x53\x54\x55\x56\x57"
28857 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28858 "\x60\x61\x62\x63\x64\x65\x66\x67"
28859 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28860 "\x70\x71\x72\x73\x74\x75\x76\x77"
28861 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28862 "\x80\x81\x82\x83\x84\x85\x86\x87"
28863 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28864 "\x90\x91\x92\x93\x94\x95\x96\x97"
28865 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28866 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28867 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28868 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28869 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28870 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28871 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28872 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28873 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28874 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28875 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28876 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28877 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28878 "\x00\x01\x02\x03\x04\x05\x06\x07"
28879 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28880 "\x10\x11\x12\x13\x14\x15\x16\x17"
28881 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28882 "\x20\x21\x22\x23\x24\x25\x26\x27"
28883 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28884 "\x30\x31\x32\x33\x34\x35\x36\x37"
28885 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28886 "\x40\x41\x42\x43\x44\x45\x46\x47"
28887 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28888 "\x50\x51\x52\x53\x54\x55\x56\x57"
28889 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28890 "\x60\x61\x62\x63\x64\x65\x66\x67"
28891 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28892 "\x70\x71\x72\x73\x74\x75\x76\x77"
28893 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28894 "\x80\x81\x82\x83\x84\x85\x86\x87"
28895 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28896 "\x90\x91\x92\x93\x94\x95\x96\x97"
28897 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28898 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28899 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28900 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28901 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28902 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28903 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28904 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28905 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28906 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28907 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28908 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28909 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28910 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028911 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028912 .np = 3,
28913 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028914 },
Herbert Xuda7f0332008-07-31 17:08:25 +080028915};
28916
28917/*
28918 * SEED test vectors
28919 */
28920#define SEED_ENC_TEST_VECTORS 4
28921#define SEED_DEC_TEST_VECTORS 4
28922
28923static struct cipher_testvec seed_enc_tv_template[] = {
28924 {
28925 .key = zeroed_string,
28926 .klen = 16,
28927 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
28928 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
28929 .ilen = 16,
28930 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
28931 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
28932 .rlen = 16,
28933 }, {
28934 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
28935 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
28936 .klen = 16,
28937 .input = zeroed_string,
28938 .ilen = 16,
28939 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
28940 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
28941 .rlen = 16,
28942 }, {
28943 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
28944 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
28945 .klen = 16,
28946 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
28947 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
28948 .ilen = 16,
28949 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
28950 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
28951 .rlen = 16,
28952 }, {
28953 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
28954 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
28955 .klen = 16,
28956 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
28957 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
28958 .ilen = 16,
28959 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
28960 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
28961 .rlen = 16,
28962 }
28963};
28964
28965static struct cipher_testvec seed_dec_tv_template[] = {
28966 {
28967 .key = zeroed_string,
28968 .klen = 16,
28969 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
28970 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
28971 .ilen = 16,
28972 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
28973 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
28974 .rlen = 16,
28975 }, {
28976 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
28977 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
28978 .klen = 16,
28979 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
28980 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
28981 .ilen = 16,
28982 .result = zeroed_string,
28983 .rlen = 16,
28984 }, {
28985 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
28986 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
28987 .klen = 16,
28988 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
28989 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
28990 .ilen = 16,
28991 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
28992 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
28993 .rlen = 16,
28994 }, {
28995 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
28996 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
28997 .klen = 16,
28998 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
28999 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
29000 .ilen = 16,
29001 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
29002 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
29003 .rlen = 16,
29004 }
29005};
29006
29007#define SALSA20_STREAM_ENC_TEST_VECTORS 5
29008static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
29009 /*
29010 * Testvectors from verified.test-vectors submitted to ECRYPT.
29011 * They are truncated to size 39, 64, 111, 129 to test a variety
29012 * of input length.
29013 */
29014 { /* Set 3, vector 0 */
29015 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
29016 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
29017 .klen = 16,
29018 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
29019 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29020 "\x00\x00\x00\x00\x00\x00\x00\x00"
29021 "\x00\x00\x00\x00\x00\x00\x00\x00"
29022 "\x00\x00\x00\x00\x00\x00\x00\x00"
29023 "\x00\x00\x00\x00\x00\x00\x00",
29024 .ilen = 39,
29025 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
29026 "\x68\x02\x41\x0C\x68\x86\x88\x89"
29027 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
29028 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
29029 "\x58\x3F\x52\x79\x70\xEB\xC1",
29030 .rlen = 39,
29031 }, { /* Set 5, vector 0 */
29032 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29033 "\x00\x00\x00\x00\x00\x00\x00\x00",
29034 .klen = 16,
29035 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
29036 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29037 "\x00\x00\x00\x00\x00\x00\x00\x00"
29038 "\x00\x00\x00\x00\x00\x00\x00\x00"
29039 "\x00\x00\x00\x00\x00\x00\x00\x00"
29040 "\x00\x00\x00\x00\x00\x00\x00\x00"
29041 "\x00\x00\x00\x00\x00\x00\x00\x00"
29042 "\x00\x00\x00\x00\x00\x00\x00\x00"
29043 "\x00\x00\x00\x00\x00\x00\x00\x00",
29044 .ilen = 64,
29045 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
29046 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
29047 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
29048 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
29049 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
29050 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
29051 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
29052 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
29053 .rlen = 64,
29054 }, { /* Set 3, vector 27 */
29055 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
29056 "\x23\x24\x25\x26\x27\x28\x29\x2A"
29057 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
29058 "\x33\x34\x35\x36\x37\x38\x39\x3A",
29059 .klen = 32,
29060 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
29061 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29062 "\x00\x00\x00\x00\x00\x00\x00\x00"
29063 "\x00\x00\x00\x00\x00\x00\x00\x00"
29064 "\x00\x00\x00\x00\x00\x00\x00\x00"
29065 "\x00\x00\x00\x00\x00\x00\x00\x00"
29066 "\x00\x00\x00\x00\x00\x00\x00\x00"
29067 "\x00\x00\x00\x00\x00\x00\x00\x00"
29068 "\x00\x00\x00\x00\x00\x00\x00\x00"
29069 "\x00\x00\x00\x00\x00\x00\x00\x00"
29070 "\x00\x00\x00\x00\x00\x00\x00\x00"
29071 "\x00\x00\x00\x00\x00\x00\x00\x00"
29072 "\x00\x00\x00\x00\x00\x00\x00\x00"
29073 "\x00\x00\x00\x00\x00\x00\x00\x00"
29074 "\x00\x00\x00\x00\x00\x00\x00",
29075 .ilen = 111,
29076 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
29077 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
29078 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
29079 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
29080 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
29081 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
29082 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
29083 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
29084 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
29085 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
29086 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
29087 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
29088 "\x95\x46\x45\x54\xE9\x75\x03\x08"
29089 "\x44\xAF\xE5\x8A\x81\x12\x09",
29090 .rlen = 111,
29091 }, { /* Set 5, vector 27 */
29092 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29093 "\x00\x00\x00\x00\x00\x00\x00\x00"
29094 "\x00\x00\x00\x00\x00\x00\x00\x00"
29095 "\x00\x00\x00\x00\x00\x00\x00\x00",
29096 .klen = 32,
29097 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
29098 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29099 "\x00\x00\x00\x00\x00\x00\x00\x00"
29100 "\x00\x00\x00\x00\x00\x00\x00\x00"
29101 "\x00\x00\x00\x00\x00\x00\x00\x00"
29102 "\x00\x00\x00\x00\x00\x00\x00\x00"
29103 "\x00\x00\x00\x00\x00\x00\x00\x00"
29104 "\x00\x00\x00\x00\x00\x00\x00\x00"
29105 "\x00\x00\x00\x00\x00\x00\x00\x00"
29106 "\x00\x00\x00\x00\x00\x00\x00\x00"
29107 "\x00\x00\x00\x00\x00\x00\x00\x00"
29108 "\x00\x00\x00\x00\x00\x00\x00\x00"
29109 "\x00\x00\x00\x00\x00\x00\x00\x00"
29110 "\x00\x00\x00\x00\x00\x00\x00\x00"
29111 "\x00\x00\x00\x00\x00\x00\x00\x00"
29112 "\x00\x00\x00\x00\x00\x00\x00\x00"
29113 "\x00\x00\x00\x00\x00\x00\x00\x00"
29114 "\x00",
29115 .ilen = 129,
29116 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
29117 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
29118 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
29119 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
29120 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
29121 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
29122 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
29123 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
29124 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
29125 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
29126 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
29127 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
29128 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
29129 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
29130 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
29131 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
29132 "\x5A",
29133 .rlen = 129,
29134 }, { /* large test vector generated using Crypto++ */
29135 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
29136 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29137 "\x10\x11\x12\x13\x14\x15\x16\x17"
29138 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
29139 .klen = 32,
29140 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29141 "\x00\x00\x00\x00\x00\x00\x00\x00",
29142 .input =
29143 "\x00\x01\x02\x03\x04\x05\x06\x07"
29144 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29145 "\x10\x11\x12\x13\x14\x15\x16\x17"
29146 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29147 "\x20\x21\x22\x23\x24\x25\x26\x27"
29148 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29149 "\x30\x31\x32\x33\x34\x35\x36\x37"
29150 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29151 "\x40\x41\x42\x43\x44\x45\x46\x47"
29152 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29153 "\x50\x51\x52\x53\x54\x55\x56\x57"
29154 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29155 "\x60\x61\x62\x63\x64\x65\x66\x67"
29156 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29157 "\x70\x71\x72\x73\x74\x75\x76\x77"
29158 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29159 "\x80\x81\x82\x83\x84\x85\x86\x87"
29160 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29161 "\x90\x91\x92\x93\x94\x95\x96\x97"
29162 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29163 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29164 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29165 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29166 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29167 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29168 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29169 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29170 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29171 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29172 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29173 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29174 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
29175 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
29176 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
29177 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
29178 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
29179 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
29180 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
29181 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
29182 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
29183 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
29184 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
29185 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
29186 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
29187 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
29188 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
29189 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
29190 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
29191 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
29192 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
29193 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
29194 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
29195 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
29196 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
29197 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
29198 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
29199 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
29200 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
29201 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
29202 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
29203 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
29204 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
29205 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
29206 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
29207 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
29208 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
29209 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
29210 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
29211 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
29212 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
29213 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
29214 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
29215 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
29216 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
29217 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
29218 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
29219 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
29220 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
29221 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
29222 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
29223 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
29224 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
29225 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
29226 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
29227 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
29228 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
29229 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
29230 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
29231 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
29232 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
29233 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
29234 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
29235 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
29236 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
29237 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
29238 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
29239 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
29240 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
29241 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
29242 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
29243 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
29244 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
29245 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
29246 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
29247 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
29248 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
29249 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
29250 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
29251 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
29252 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
29253 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
29254 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
29255 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
29256 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
29257 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
29258 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
29259 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
29260 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
29261 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
29262 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
29263 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
29264 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
29265 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
29266 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
29267 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
29268 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
29269 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
29270 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
29271 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
29272 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
29273 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
29274 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
29275 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
29276 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
29277 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
29278 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
29279 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
29280 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
29281 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
29282 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
29283 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
29284 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
29285 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
29286 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
29287 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
29288 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
29289 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
29290 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
29291 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
29292 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
29293 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
29294 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
29295 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
29296 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
29297 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
29298 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
29299 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
29300 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
29301 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
29302 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
29303 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
29304 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
29305 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
29306 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
29307 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
29308 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
29309 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
29310 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
29311 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
29312 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
29313 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
29314 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
29315 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
29316 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
29317 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
29318 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
29319 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
29320 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
29321 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
29322 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
29323 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
29324 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
29325 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
29326 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
29327 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
29328 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
29329 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
29330 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
29331 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
29332 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
29333 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
29334 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
29335 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
29336 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
29337 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
29338 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
29339 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
29340 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
29341 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
29342 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
29343 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
29344 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
29345 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
29346 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
29347 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
29348 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
29349 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
29350 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
29351 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
29352 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
29353 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
29354 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
29355 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
29356 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
29357 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
29358 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
29359 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
29360 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
29361 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
29362 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
29363 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
29364 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
29365 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
29366 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
29367 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
29368 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
29369 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
29370 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
29371 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
29372 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
29373 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
29374 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
29375 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
29376 "\x38\x47\x56\x65\x74\x83\x92\xa1"
29377 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
29378 "\x28\x37\x46\x55\x64\x73\x82\x91"
29379 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
29380 "\x18\x27\x36\x45\x54\x63\x72\x81"
29381 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
29382 "\x08\x17\x26\x35\x44\x53\x62\x71"
29383 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
29384 "\xf8\x07\x16\x25\x34\x43\x52\x61"
29385 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
29386 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
29387 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
29388 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
29389 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
29390 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
29391 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
29392 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
29393 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
29394 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
29395 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
29396 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
29397 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
29398 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
29399 "\x00\x11\x22\x33\x44\x55\x66\x77"
29400 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
29401 "\x10\x21\x32\x43\x54\x65\x76\x87"
29402 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
29403 "\x20\x31\x42\x53\x64\x75\x86\x97"
29404 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
29405 "\x30\x41\x52\x63\x74\x85\x96\xa7"
29406 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
29407 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
29408 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
29409 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
29410 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
29411 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
29412 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
29413 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
29414 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
29415 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
29416 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
29417 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
29418 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
29419 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
29420 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
29421 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
29422 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
29423 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
29424 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
29425 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
29426 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
29427 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
29428 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
29429 "\xf0\x01\x12\x23\x34\x45\x56\x67"
29430 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
29431 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
29432 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
29433 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
29434 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
29435 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
29436 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
29437 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
29438 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
29439 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
29440 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
29441 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
29442 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
29443 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
29444 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
29445 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
29446 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
29447 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
29448 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
29449 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
29450 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
29451 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
29452 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
29453 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
29454 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
29455 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
29456 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
29457 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
29458 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
29459 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
29460 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
29461 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
29462 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
29463 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
29464 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
29465 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
29466 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
29467 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
29468 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
29469 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
29470 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
29471 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
29472 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
29473 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
29474 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
29475 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
29476 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
29477 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
29478 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
29479 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
29480 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
29481 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
29482 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
29483 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
29484 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
29485 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
29486 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
29487 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
29488 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
29489 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
29490 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
29491 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
29492 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
29493 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
29494 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
29495 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
29496 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
29497 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
29498 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
29499 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
29500 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
29501 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
29502 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
29503 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
29504 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
29505 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
29506 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
29507 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
29508 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
29509 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
29510 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
29511 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
29512 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
29513 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
29514 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
29515 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
29516 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
29517 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
29518 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
29519 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
29520 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
29521 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
29522 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
29523 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
29524 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
29525 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
29526 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
29527 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
29528 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
29529 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
29530 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
29531 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
29532 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
29533 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
29534 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
29535 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
29536 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
29537 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
29538 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
29539 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
29540 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
29541 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
29542 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
29543 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
29544 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
29545 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
29546 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
29547 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
29548 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
29549 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
29550 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
29551 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
29552 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
29553 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
29554 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
29555 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
29556 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
29557 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
29558 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
29559 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
29560 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
29561 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
29562 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
29563 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
29564 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
29565 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
29566 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
29567 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
29568 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
29569 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
29570 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
29571 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
29572 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
29573 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
29574 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
29575 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
29576 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
29577 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
29578 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
29579 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
29580 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
29581 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
29582 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
29583 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
29584 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
29585 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
29586 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
29587 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
29588 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
29589 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
29590 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
29591 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
29592 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
29593 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
29594 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
29595 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
29596 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
29597 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
29598 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
29599 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
29600 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
29601 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
29602 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
29603 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
29604 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
29605 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
29606 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
29607 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
29608 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
29609 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
29610 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
29611 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
29612 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
29613 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
29614 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
29615 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
29616 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
29617 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
29618 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
29619 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
29620 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
29621 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
29622 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
29623 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
29624 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
29625 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
29626 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
29627 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
29628 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
29629 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
29630 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
29631 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
29632 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
29633 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
29634 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
29635 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
29636 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
29637 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
29638 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
29639 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
29640 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
29641 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
29642 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
29643 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
29644 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
29645 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
29646 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
29647 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
29648 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
29649 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
29650 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
29651 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
29652 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
29653 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
29654 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
29655 "\x00\x21\x42\x63",
29656 .ilen = 4100,
29657 .result =
29658 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
29659 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
29660 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
29661 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
29662 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
29663 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
29664 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
29665 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
29666 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
29667 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
29668 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
29669 "\xbb\xde\x56\x86\xab\x65\x21\x30"
29670 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
29671 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
29672 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
29673 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
29674 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
29675 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
29676 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
29677 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
29678 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
29679 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
29680 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
29681 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
29682 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
29683 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
29684 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
29685 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
29686 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
29687 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
29688 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
29689 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
29690 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
29691 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
29692 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
29693 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
29694 "\x62\x08\x18\x7a\x25\x49\x28\xac"
29695 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
29696 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
29697 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
29698 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
29699 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
29700 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
29701 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
29702 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
29703 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
29704 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
29705 "\x33\xee\x14\x19\x22\x52\x89\xa7"
29706 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
29707 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
29708 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
29709 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
29710 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
29711 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
29712 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
29713 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
29714 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
29715 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
29716 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
29717 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
29718 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
29719 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
29720 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
29721 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
29722 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
29723 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
29724 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
29725 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
29726 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
29727 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
29728 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
29729 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
29730 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
29731 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
29732 "\x49\x97\x33\xab\x36\x14\x0a\x70"
29733 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
29734 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
29735 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
29736 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
29737 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
29738 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
29739 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
29740 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
29741 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
29742 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
29743 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
29744 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
29745 "\xad\x04\x07\xae\x22\x90\x4a\x93"
29746 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
29747 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
29748 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
29749 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
29750 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
29751 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
29752 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
29753 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
29754 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
29755 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
29756 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
29757 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
29758 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
29759 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
29760 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
29761 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
29762 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
29763 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
29764 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
29765 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
29766 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
29767 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
29768 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
29769 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
29770 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
29771 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
29772 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
29773 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
29774 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
29775 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
29776 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
29777 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
29778 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
29779 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
29780 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
29781 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
29782 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
29783 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
29784 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
29785 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
29786 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
29787 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
29788 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
29789 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
29790 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
29791 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
29792 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
29793 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
29794 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
29795 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
29796 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
29797 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
29798 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
29799 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
29800 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
29801 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
29802 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
29803 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
29804 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
29805 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
29806 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
29807 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
29808 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
29809 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
29810 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
29811 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
29812 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
29813 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
29814 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
29815 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
29816 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
29817 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
29818 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
29819 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
29820 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
29821 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
29822 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
29823 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
29824 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
29825 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
29826 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
29827 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
29828 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
29829 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
29830 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
29831 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
29832 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
29833 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
29834 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
29835 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
29836 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
29837 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
29838 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
29839 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
29840 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
29841 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
29842 "\x2e\x53\x49\x97\x94\x33\xae\x40"
29843 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
29844 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
29845 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
29846 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
29847 "\xce\x87\xad\xcc\x72\x05\x00\x29"
29848 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
29849 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
29850 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
29851 "\xac\xc0\x79\x50\x69\xca\x59\x32"
29852 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
29853 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
29854 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
29855 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
29856 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
29857 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
29858 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
29859 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
29860 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
29861 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
29862 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
29863 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
29864 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
29865 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
29866 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
29867 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
29868 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
29869 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
29870 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
29871 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
29872 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
29873 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
29874 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
29875 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
29876 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
29877 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
29878 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
29879 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
29880 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
29881 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
29882 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
29883 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
29884 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
29885 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
29886 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
29887 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
29888 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
29889 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
29890 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
29891 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
29892 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
29893 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
29894 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
29895 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
29896 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
29897 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
29898 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
29899 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
29900 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
29901 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
29902 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
29903 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
29904 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
29905 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
29906 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
29907 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
29908 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
29909 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
29910 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
29911 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
29912 "\x38\x55\xab\x33\x26\xef\x9f\x43"
29913 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
29914 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
29915 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
29916 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
29917 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
29918 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
29919 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
29920 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
29921 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
29922 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
29923 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
29924 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
29925 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
29926 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
29927 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
29928 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
29929 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
29930 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
29931 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
29932 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
29933 "\x62\x36\x43\xb2\x82\x15\x75\x50"
29934 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
29935 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
29936 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
29937 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
29938 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
29939 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
29940 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
29941 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
29942 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
29943 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
29944 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
29945 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
29946 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
29947 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
29948 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
29949 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
29950 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
29951 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
29952 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
29953 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
29954 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
29955 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
29956 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
29957 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
29958 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
29959 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
29960 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
29961 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
29962 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
29963 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
29964 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
29965 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
29966 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
29967 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
29968 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
29969 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
29970 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
29971 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
29972 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
29973 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
29974 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
29975 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
29976 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
29977 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
29978 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
29979 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
29980 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
29981 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
29982 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
29983 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
29984 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
29985 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
29986 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
29987 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
29988 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
29989 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
29990 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
29991 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
29992 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
29993 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
29994 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
29995 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
29996 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
29997 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
29998 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
29999 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
30000 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
30001 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
30002 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
30003 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
30004 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
30005 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
30006 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
30007 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
30008 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
30009 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
30010 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
30011 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
30012 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
30013 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
30014 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
30015 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
30016 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
30017 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
30018 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
30019 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
30020 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
30021 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
30022 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
30023 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
30024 "\x73\x2e\x71\x79\x16\x06\x63\x28"
30025 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
30026 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
30027 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
30028 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
30029 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
30030 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
30031 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
30032 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
30033 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
30034 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
30035 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
30036 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
30037 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
30038 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
30039 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
30040 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
30041 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
30042 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
30043 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
30044 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
30045 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
30046 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
30047 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
30048 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
30049 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
30050 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
30051 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
30052 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
30053 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
30054 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
30055 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
30056 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
30057 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
30058 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
30059 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
30060 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
30061 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
30062 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
30063 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
30064 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
30065 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
30066 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
30067 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
30068 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
30069 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
30070 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
30071 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
30072 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
30073 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
30074 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
30075 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
30076 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
30077 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
30078 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
30079 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
30080 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
30081 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
30082 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
30083 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
30084 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
30085 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
30086 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
30087 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
30088 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
30089 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
30090 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
30091 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
30092 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
30093 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
30094 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
30095 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
30096 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
30097 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
30098 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
30099 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
30100 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
30101 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
30102 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
30103 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
30104 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
30105 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
30106 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
30107 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
30108 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
30109 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
30110 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
30111 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
30112 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
30113 "\x85\x73\x78\x45\x20\x7f\xae\x13"
30114 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
30115 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
30116 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
30117 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
30118 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
30119 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
30120 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
30121 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
30122 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
30123 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
30124 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
30125 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
30126 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
30127 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
30128 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
30129 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
30130 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
30131 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
30132 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
30133 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
30134 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
30135 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
30136 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
30137 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
30138 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
30139 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
30140 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
30141 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
30142 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
30143 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
30144 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
30145 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
30146 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
30147 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
30148 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
30149 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
30150 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
30151 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
30152 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
30153 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
30154 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
30155 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
30156 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
30157 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
30158 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
30159 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
30160 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
30161 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
30162 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
30163 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
30164 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
30165 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
30166 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
30167 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
30168 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
30169 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
30170 "\xaf\xdf\x11\x95",
30171 .rlen = 4100,
30172 .np = 2,
30173 .tap = { 4064, 36 },
30174 },
30175};
30176
Martin Willi3590ebf2015-06-01 13:43:57 +020030177#define CHACHA20_ENC_TEST_VECTORS 3
30178static struct cipher_testvec chacha20_enc_tv_template[] = {
30179 { /* RFC7539 A.2. Test Vector #1 */
30180 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30181 "\x00\x00\x00\x00\x00\x00\x00\x00"
30182 "\x00\x00\x00\x00\x00\x00\x00\x00"
30183 "\x00\x00\x00\x00\x00\x00\x00\x00",
30184 .klen = 32,
30185 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30186 "\x00\x00\x00\x00\x00\x00\x00\x00",
30187 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30188 "\x00\x00\x00\x00\x00\x00\x00\x00"
30189 "\x00\x00\x00\x00\x00\x00\x00\x00"
30190 "\x00\x00\x00\x00\x00\x00\x00\x00"
30191 "\x00\x00\x00\x00\x00\x00\x00\x00"
30192 "\x00\x00\x00\x00\x00\x00\x00\x00"
30193 "\x00\x00\x00\x00\x00\x00\x00\x00"
30194 "\x00\x00\x00\x00\x00\x00\x00\x00",
30195 .ilen = 64,
30196 .result = "\x76\xb8\xe0\xad\xa0\xf1\x3d\x90"
30197 "\x40\x5d\x6a\xe5\x53\x86\xbd\x28"
30198 "\xbd\xd2\x19\xb8\xa0\x8d\xed\x1a"
30199 "\xa8\x36\xef\xcc\x8b\x77\x0d\xc7"
30200 "\xda\x41\x59\x7c\x51\x57\x48\x8d"
30201 "\x77\x24\xe0\x3f\xb8\xd8\x4a\x37"
30202 "\x6a\x43\xb8\xf4\x15\x18\xa1\x1c"
30203 "\xc3\x87\xb6\x69\xb2\xee\x65\x86",
30204 .rlen = 64,
30205 }, { /* RFC7539 A.2. Test Vector #2 */
30206 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30207 "\x00\x00\x00\x00\x00\x00\x00\x00"
30208 "\x00\x00\x00\x00\x00\x00\x00\x00"
30209 "\x00\x00\x00\x00\x00\x00\x00\x01",
30210 .klen = 32,
30211 .iv = "\x01\x00\x00\x00\x00\x00\x00\x00"
30212 "\x00\x00\x00\x00\x00\x00\x00\x02",
30213 .input = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
30214 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
30215 "\x6f\x20\x74\x68\x65\x20\x49\x45"
30216 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
30217 "\x64\x65\x64\x20\x62\x79\x20\x74"
30218 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
30219 "\x69\x62\x75\x74\x6f\x72\x20\x66"
30220 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
30221 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
30222 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
30223 "\x20\x70\x61\x72\x74\x20\x6f\x66"
30224 "\x20\x61\x6e\x20\x49\x45\x54\x46"
30225 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
30226 "\x74\x2d\x44\x72\x61\x66\x74\x20"
30227 "\x6f\x72\x20\x52\x46\x43\x20\x61"
30228 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
30229 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
30230 "\x20\x6d\x61\x64\x65\x20\x77\x69"
30231 "\x74\x68\x69\x6e\x20\x74\x68\x65"
30232 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
30233 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
30234 "\x45\x54\x46\x20\x61\x63\x74\x69"
30235 "\x76\x69\x74\x79\x20\x69\x73\x20"
30236 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
30237 "\x65\x64\x20\x61\x6e\x20\x22\x49"
30238 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
30239 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
30240 "\x22\x2e\x20\x53\x75\x63\x68\x20"
30241 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
30242 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
30243 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
30244 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
30245 "\x74\x73\x20\x69\x6e\x20\x49\x45"
30246 "\x54\x46\x20\x73\x65\x73\x73\x69"
30247 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
30248 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
30249 "\x77\x72\x69\x74\x74\x65\x6e\x20"
30250 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
30251 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
30252 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
30253 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
30254 "\x64\x65\x20\x61\x74\x20\x61\x6e"
30255 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
30256 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
30257 "\x20\x77\x68\x69\x63\x68\x20\x61"
30258 "\x72\x65\x20\x61\x64\x64\x72\x65"
30259 "\x73\x73\x65\x64\x20\x74\x6f",
30260 .ilen = 375,
30261 .result = "\xa3\xfb\xf0\x7d\xf3\xfa\x2f\xde"
30262 "\x4f\x37\x6c\xa2\x3e\x82\x73\x70"
30263 "\x41\x60\x5d\x9f\x4f\x4f\x57\xbd"
30264 "\x8c\xff\x2c\x1d\x4b\x79\x55\xec"
30265 "\x2a\x97\x94\x8b\xd3\x72\x29\x15"
30266 "\xc8\xf3\xd3\x37\xf7\xd3\x70\x05"
30267 "\x0e\x9e\x96\xd6\x47\xb7\xc3\x9f"
30268 "\x56\xe0\x31\xca\x5e\xb6\x25\x0d"
30269 "\x40\x42\xe0\x27\x85\xec\xec\xfa"
30270 "\x4b\x4b\xb5\xe8\xea\xd0\x44\x0e"
30271 "\x20\xb6\xe8\xdb\x09\xd8\x81\xa7"
30272 "\xc6\x13\x2f\x42\x0e\x52\x79\x50"
30273 "\x42\xbd\xfa\x77\x73\xd8\xa9\x05"
30274 "\x14\x47\xb3\x29\x1c\xe1\x41\x1c"
30275 "\x68\x04\x65\x55\x2a\xa6\xc4\x05"
30276 "\xb7\x76\x4d\x5e\x87\xbe\xa8\x5a"
30277 "\xd0\x0f\x84\x49\xed\x8f\x72\xd0"
30278 "\xd6\x62\xab\x05\x26\x91\xca\x66"
30279 "\x42\x4b\xc8\x6d\x2d\xf8\x0e\xa4"
30280 "\x1f\x43\xab\xf9\x37\xd3\x25\x9d"
30281 "\xc4\xb2\xd0\xdf\xb4\x8a\x6c\x91"
30282 "\x39\xdd\xd7\xf7\x69\x66\xe9\x28"
30283 "\xe6\x35\x55\x3b\xa7\x6c\x5c\x87"
30284 "\x9d\x7b\x35\xd4\x9e\xb2\xe6\x2b"
30285 "\x08\x71\xcd\xac\x63\x89\x39\xe2"
30286 "\x5e\x8a\x1e\x0e\xf9\xd5\x28\x0f"
30287 "\xa8\xca\x32\x8b\x35\x1c\x3c\x76"
30288 "\x59\x89\xcb\xcf\x3d\xaa\x8b\x6c"
30289 "\xcc\x3a\xaf\x9f\x39\x79\xc9\x2b"
30290 "\x37\x20\xfc\x88\xdc\x95\xed\x84"
30291 "\xa1\xbe\x05\x9c\x64\x99\xb9\xfd"
30292 "\xa2\x36\xe7\xe8\x18\xb0\x4b\x0b"
30293 "\xc3\x9c\x1e\x87\x6b\x19\x3b\xfe"
30294 "\x55\x69\x75\x3f\x88\x12\x8c\xc0"
30295 "\x8a\xaa\x9b\x63\xd1\xa1\x6f\x80"
30296 "\xef\x25\x54\xd7\x18\x9c\x41\x1f"
30297 "\x58\x69\xca\x52\xc5\xb8\x3f\xa3"
30298 "\x6f\xf2\x16\xb9\xc1\xd3\x00\x62"
30299 "\xbe\xbc\xfd\x2d\xc5\xbc\xe0\x91"
30300 "\x19\x34\xfd\xa7\x9a\x86\xf6\xe6"
30301 "\x98\xce\xd7\x59\xc3\xff\x9b\x64"
30302 "\x77\x33\x8f\x3d\xa4\xf9\xcd\x85"
30303 "\x14\xea\x99\x82\xcc\xaf\xb3\x41"
30304 "\xb2\x38\x4d\xd9\x02\xf3\xd1\xab"
30305 "\x7a\xc6\x1d\xd2\x9c\x6f\x21\xba"
30306 "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
30307 "\xc4\xfd\x80\x6c\x22\xf2\x21",
30308 .rlen = 375,
30309 }, { /* RFC7539 A.2. Test Vector #3 */
30310 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
30311 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
30312 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
30313 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
30314 .klen = 32,
30315 .iv = "\x2a\x00\x00\x00\x00\x00\x00\x00"
30316 "\x00\x00\x00\x00\x00\x00\x00\x02",
30317 .input = "\x27\x54\x77\x61\x73\x20\x62\x72"
30318 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
30319 "\x6e\x64\x20\x74\x68\x65\x20\x73"
30320 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
30321 "\x76\x65\x73\x0a\x44\x69\x64\x20"
30322 "\x67\x79\x72\x65\x20\x61\x6e\x64"
30323 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
30324 "\x69\x6e\x20\x74\x68\x65\x20\x77"
30325 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
30326 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
30327 "\x65\x72\x65\x20\x74\x68\x65\x20"
30328 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
30329 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
30330 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
30331 "\x72\x61\x74\x68\x73\x20\x6f\x75"
30332 "\x74\x67\x72\x61\x62\x65\x2e",
30333 .ilen = 127,
30334 .result = "\x62\xe6\x34\x7f\x95\xed\x87\xa4"
30335 "\x5f\xfa\xe7\x42\x6f\x27\xa1\xdf"
30336 "\x5f\xb6\x91\x10\x04\x4c\x0d\x73"
30337 "\x11\x8e\xff\xa9\x5b\x01\xe5\xcf"
30338 "\x16\x6d\x3d\xf2\xd7\x21\xca\xf9"
30339 "\xb2\x1e\x5f\xb1\x4c\x61\x68\x71"
30340 "\xfd\x84\xc5\x4f\x9d\x65\xb2\x83"
30341 "\x19\x6c\x7f\xe4\xf6\x05\x53\xeb"
30342 "\xf3\x9c\x64\x02\xc4\x22\x34\xe3"
30343 "\x2a\x35\x6b\x3e\x76\x43\x12\xa6"
30344 "\x1a\x55\x32\x05\x57\x16\xea\xd6"
30345 "\x96\x25\x68\xf8\x7d\x3f\x3f\x77"
30346 "\x04\xc6\xa8\xd1\xbc\xd1\xbf\x4d"
30347 "\x50\xd6\x15\x4b\x6d\xa7\x31\xb1"
30348 "\x87\xb5\x8d\xfd\x72\x8a\xfa\x36"
30349 "\x75\x7a\x79\x7a\xc1\x88\xd1",
30350 .rlen = 127,
30351 },
30352};
30353
Herbert Xuda7f0332008-07-31 17:08:25 +080030354/*
30355 * CTS (Cipher Text Stealing) mode tests
30356 */
30357#define CTS_MODE_ENC_TEST_VECTORS 6
30358#define CTS_MODE_DEC_TEST_VECTORS 6
30359static struct cipher_testvec cts_mode_enc_tv_template[] = {
30360 { /* from rfc3962 */
30361 .klen = 16,
30362 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30363 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30364 .ilen = 17,
30365 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30366 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30367 "\x20",
30368 .rlen = 17,
30369 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
30370 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
30371 "\x97",
30372 }, {
30373 .klen = 16,
30374 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30375 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30376 .ilen = 31,
30377 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30378 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30379 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30380 "\x20\x47\x61\x75\x27\x73\x20",
30381 .rlen = 31,
30382 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
30383 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
30384 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30385 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
30386 }, {
30387 .klen = 16,
30388 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30389 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30390 .ilen = 32,
30391 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30392 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30393 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30394 "\x20\x47\x61\x75\x27\x73\x20\x43",
30395 .rlen = 32,
30396 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30397 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30398 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30399 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
30400 }, {
30401 .klen = 16,
30402 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30403 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30404 .ilen = 47,
30405 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30406 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30407 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30408 "\x20\x47\x61\x75\x27\x73\x20\x43"
30409 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30410 "\x70\x6c\x65\x61\x73\x65\x2c",
30411 .rlen = 47,
30412 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30413 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30414 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
30415 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
30416 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30417 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
30418 }, {
30419 .klen = 16,
30420 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30421 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30422 .ilen = 48,
30423 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30424 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30425 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30426 "\x20\x47\x61\x75\x27\x73\x20\x43"
30427 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30428 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
30429 .rlen = 48,
30430 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30431 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30432 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30433 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
30434 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30435 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
30436 }, {
30437 .klen = 16,
30438 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30439 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30440 .ilen = 64,
30441 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30442 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30443 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30444 "\x20\x47\x61\x75\x27\x73\x20\x43"
30445 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30446 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
30447 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
30448 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
30449 .rlen = 64,
30450 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30451 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30452 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30453 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30454 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
30455 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
30456 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30457 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
30458 }
30459};
30460
30461static struct cipher_testvec cts_mode_dec_tv_template[] = {
30462 { /* from rfc3962 */
30463 .klen = 16,
30464 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30465 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30466 .rlen = 17,
30467 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30468 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30469 "\x20",
30470 .ilen = 17,
30471 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
30472 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
30473 "\x97",
30474 }, {
30475 .klen = 16,
30476 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30477 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30478 .rlen = 31,
30479 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30480 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30481 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30482 "\x20\x47\x61\x75\x27\x73\x20",
30483 .ilen = 31,
30484 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
30485 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
30486 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30487 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
30488 }, {
30489 .klen = 16,
30490 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30491 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30492 .rlen = 32,
30493 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30494 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30495 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30496 "\x20\x47\x61\x75\x27\x73\x20\x43",
30497 .ilen = 32,
30498 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30499 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30500 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30501 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
30502 }, {
30503 .klen = 16,
30504 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30505 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30506 .rlen = 47,
30507 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30508 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30509 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30510 "\x20\x47\x61\x75\x27\x73\x20\x43"
30511 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30512 "\x70\x6c\x65\x61\x73\x65\x2c",
30513 .ilen = 47,
30514 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30515 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30516 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
30517 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
30518 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30519 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
30520 }, {
30521 .klen = 16,
30522 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30523 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30524 .rlen = 48,
30525 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30526 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30527 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30528 "\x20\x47\x61\x75\x27\x73\x20\x43"
30529 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30530 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
30531 .ilen = 48,
30532 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30533 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30534 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30535 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
30536 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30537 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
30538 }, {
30539 .klen = 16,
30540 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30541 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30542 .rlen = 64,
30543 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30544 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30545 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30546 "\x20\x47\x61\x75\x27\x73\x20\x43"
30547 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30548 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
30549 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
30550 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
30551 .ilen = 64,
30552 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30553 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30554 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30555 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30556 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
30557 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
30558 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30559 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
30560 }
30561};
30562
30563/*
30564 * Compression stuff.
30565 */
30566#define COMP_BUF_SIZE 512
30567
30568struct comp_testvec {
30569 int inlen, outlen;
30570 char input[COMP_BUF_SIZE];
30571 char output[COMP_BUF_SIZE];
30572};
30573
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080030574struct pcomp_testvec {
David Howellsf94a3592015-04-28 15:36:30 +010030575 const void *params;
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080030576 unsigned int paramsize;
30577 int inlen, outlen;
30578 char input[COMP_BUF_SIZE];
30579 char output[COMP_BUF_SIZE];
30580};
30581
Herbert Xuda7f0332008-07-31 17:08:25 +080030582/*
30583 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110030584 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080030585 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080030586
Herbert Xuda7f0332008-07-31 17:08:25 +080030587#define DEFLATE_COMP_TEST_VECTORS 2
30588#define DEFLATE_DECOMP_TEST_VECTORS 2
30589
30590static struct comp_testvec deflate_comp_tv_template[] = {
30591 {
30592 .inlen = 70,
30593 .outlen = 38,
30594 .input = "Join us now and share the software "
30595 "Join us now and share the software ",
30596 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30597 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30598 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30599 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30600 "\x71\xbc\x08\x2b\x01\x00",
30601 }, {
30602 .inlen = 191,
30603 .outlen = 122,
30604 .input = "This document describes a compression method based on the DEFLATE"
30605 "compression algorithm. This document defines the application of "
30606 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30607 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30608 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30609 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30610 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30611 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30612 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30613 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30614 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30615 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30616 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30617 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30618 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30619 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30620 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30621 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30622 "\xfa\x02",
30623 },
30624};
30625
30626static struct comp_testvec deflate_decomp_tv_template[] = {
30627 {
30628 .inlen = 122,
30629 .outlen = 191,
30630 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30631 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30632 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30633 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30634 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30635 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30636 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30637 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30638 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30639 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30640 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30641 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30642 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30643 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30644 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30645 "\xfa\x02",
30646 .output = "This document describes a compression method based on the DEFLATE"
30647 "compression algorithm. This document defines the application of "
30648 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30649 }, {
30650 .inlen = 38,
30651 .outlen = 70,
30652 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30653 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30654 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30655 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30656 "\x71\xbc\x08\x2b\x01\x00",
30657 .output = "Join us now and share the software "
30658 "Join us now and share the software ",
30659 },
30660};
30661
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080030662#define ZLIB_COMP_TEST_VECTORS 2
30663#define ZLIB_DECOMP_TEST_VECTORS 2
30664
30665static const struct {
30666 struct nlattr nla;
30667 int val;
30668} deflate_comp_params[] = {
30669 {
30670 .nla = {
30671 .nla_len = NLA_HDRLEN + sizeof(int),
30672 .nla_type = ZLIB_COMP_LEVEL,
30673 },
30674 .val = Z_DEFAULT_COMPRESSION,
30675 }, {
30676 .nla = {
30677 .nla_len = NLA_HDRLEN + sizeof(int),
30678 .nla_type = ZLIB_COMP_METHOD,
30679 },
30680 .val = Z_DEFLATED,
30681 }, {
30682 .nla = {
30683 .nla_len = NLA_HDRLEN + sizeof(int),
30684 .nla_type = ZLIB_COMP_WINDOWBITS,
30685 },
30686 .val = -11,
30687 }, {
30688 .nla = {
30689 .nla_len = NLA_HDRLEN + sizeof(int),
30690 .nla_type = ZLIB_COMP_MEMLEVEL,
30691 },
30692 .val = MAX_MEM_LEVEL,
30693 }, {
30694 .nla = {
30695 .nla_len = NLA_HDRLEN + sizeof(int),
30696 .nla_type = ZLIB_COMP_STRATEGY,
30697 },
30698 .val = Z_DEFAULT_STRATEGY,
30699 }
30700};
30701
30702static const struct {
30703 struct nlattr nla;
30704 int val;
30705} deflate_decomp_params[] = {
30706 {
30707 .nla = {
30708 .nla_len = NLA_HDRLEN + sizeof(int),
30709 .nla_type = ZLIB_DECOMP_WINDOWBITS,
30710 },
30711 .val = -11,
30712 }
30713};
30714
30715static struct pcomp_testvec zlib_comp_tv_template[] = {
30716 {
30717 .params = &deflate_comp_params,
30718 .paramsize = sizeof(deflate_comp_params),
30719 .inlen = 70,
30720 .outlen = 38,
30721 .input = "Join us now and share the software "
30722 "Join us now and share the software ",
30723 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30724 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30725 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30726 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30727 "\x71\xbc\x08\x2b\x01\x00",
30728 }, {
30729 .params = &deflate_comp_params,
30730 .paramsize = sizeof(deflate_comp_params),
30731 .inlen = 191,
30732 .outlen = 122,
30733 .input = "This document describes a compression method based on the DEFLATE"
30734 "compression algorithm. This document defines the application of "
30735 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30736 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30737 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30738 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30739 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30740 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30741 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30742 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30743 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30744 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30745 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30746 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30747 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30748 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30749 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30750 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30751 "\xfa\x02",
30752 },
30753};
30754
30755static struct pcomp_testvec zlib_decomp_tv_template[] = {
30756 {
30757 .params = &deflate_decomp_params,
30758 .paramsize = sizeof(deflate_decomp_params),
30759 .inlen = 122,
30760 .outlen = 191,
30761 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30762 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30763 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30764 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30765 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30766 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30767 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30768 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30769 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30770 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30771 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30772 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30773 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30774 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30775 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30776 "\xfa\x02",
30777 .output = "This document describes a compression method based on the DEFLATE"
30778 "compression algorithm. This document defines the application of "
30779 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30780 }, {
30781 .params = &deflate_decomp_params,
30782 .paramsize = sizeof(deflate_decomp_params),
30783 .inlen = 38,
30784 .outlen = 70,
30785 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30786 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30787 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30788 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30789 "\x71\xbc\x08\x2b\x01\x00",
30790 .output = "Join us now and share the software "
30791 "Join us now and share the software ",
30792 },
30793};
30794
Herbert Xuda7f0332008-07-31 17:08:25 +080030795/*
30796 * LZO test vectors (null-terminated strings).
30797 */
30798#define LZO_COMP_TEST_VECTORS 2
30799#define LZO_DECOMP_TEST_VECTORS 2
30800
30801static struct comp_testvec lzo_comp_tv_template[] = {
30802 {
30803 .inlen = 70,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030804 .outlen = 57,
Herbert Xuda7f0332008-07-31 17:08:25 +080030805 .input = "Join us now and share the software "
30806 "Join us now and share the software ",
30807 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030808 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30809 "\x64\x20\x73\x68\x61\x72\x65\x20"
30810 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30811 "\x77\x70\x01\x32\x88\x00\x0c\x65"
30812 "\x20\x74\x68\x65\x20\x73\x6f\x66"
30813 "\x74\x77\x61\x72\x65\x20\x11\x00"
30814 "\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080030815 }, {
30816 .inlen = 159,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030817 .outlen = 131,
Herbert Xuda7f0332008-07-31 17:08:25 +080030818 .input = "This document describes a compression method based on the LZO "
30819 "compression algorithm. This document defines the application of "
30820 "the LZO algorithm used in UBIFS.",
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030821 .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
Herbert Xuda7f0332008-07-31 17:08:25 +080030822 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
30823 "\x64\x65\x73\x63\x72\x69\x62\x65"
30824 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
30825 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
30826 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
30827 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030828 "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
30829 "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
30830 "\x72\x69\x74\x68\x6d\x2e\x20\x20"
30831 "\x2e\x54\x01\x03\x66\x69\x6e\x65"
30832 "\x73\x20\x74\x06\x05\x61\x70\x70"
30833 "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
30834 "\x66\x88\x02\x60\x09\x27\xf0\x00"
30835 "\x0c\x20\x75\x73\x65\x64\x20\x69"
30836 "\x6e\x20\x55\x42\x49\x46\x53\x2e"
30837 "\x11\x00\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080030838 },
30839};
30840
30841static struct comp_testvec lzo_decomp_tv_template[] = {
30842 {
30843 .inlen = 133,
30844 .outlen = 159,
30845 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
30846 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
30847 "\x64\x65\x73\x63\x72\x69\x62\x65"
30848 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
30849 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
30850 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
30851 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
30852 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
30853 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
30854 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
30855 "\x68\x69\x73\x2a\x54\x01\x02\x66"
30856 "\x69\x6e\x65\x73\x94\x06\x05\x61"
30857 "\x70\x70\x6c\x69\x63\x61\x74\x76"
30858 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
30859 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
30860 "\x20\x69\x6e\x20\x55\x42\x49\x46"
30861 "\x53\x2e\x11\x00\x00",
30862 .output = "This document describes a compression method based on the LZO "
30863 "compression algorithm. This document defines the application of "
30864 "the LZO algorithm used in UBIFS.",
30865 }, {
30866 .inlen = 46,
30867 .outlen = 70,
30868 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
30869 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30870 "\x64\x20\x73\x68\x61\x72\x65\x20"
30871 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30872 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
30873 "\x3d\x88\x00\x11\x00\x00",
30874 .output = "Join us now and share the software "
30875 "Join us now and share the software ",
30876 },
30877};
30878
30879/*
30880 * Michael MIC test vectors from IEEE 802.11i
30881 */
30882#define MICHAEL_MIC_TEST_VECTORS 6
30883
30884static struct hash_testvec michael_mic_tv_template[] = {
30885 {
30886 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
30887 .ksize = 8,
30888 .plaintext = zeroed_string,
30889 .psize = 0,
30890 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
30891 },
30892 {
30893 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
30894 .ksize = 8,
30895 .plaintext = "M",
30896 .psize = 1,
30897 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
30898 },
30899 {
30900 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
30901 .ksize = 8,
30902 .plaintext = "Mi",
30903 .psize = 2,
30904 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
30905 },
30906 {
30907 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
30908 .ksize = 8,
30909 .plaintext = "Mic",
30910 .psize = 3,
30911 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
30912 },
30913 {
30914 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
30915 .ksize = 8,
30916 .plaintext = "Mich",
30917 .psize = 4,
30918 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
30919 },
30920 {
30921 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
30922 .ksize = 8,
30923 .plaintext = "Michael",
30924 .psize = 7,
30925 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
30926 }
30927};
30928
30929/*
Ard Biesheuvelebb34722015-05-04 11:00:17 +020030930 * CRC32 test vectors
30931 */
30932#define CRC32_TEST_VECTORS 14
30933
30934static struct hash_testvec crc32_tv_template[] = {
30935 {
30936 .key = "\x87\xa9\xcb\xed",
30937 .ksize = 4,
30938 .psize = 0,
30939 .digest = "\x87\xa9\xcb\xed",
30940 },
30941 {
30942 .key = "\xff\xff\xff\xff",
30943 .ksize = 4,
30944 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30945 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30946 "\x11\x12\x13\x14\x15\x16\x17\x18"
30947 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30948 "\x21\x22\x23\x24\x25\x26\x27\x28",
30949 .psize = 40,
30950 .digest = "\x3a\xdf\x4b\xb0",
30951 },
30952 {
30953 .key = "\xff\xff\xff\xff",
30954 .ksize = 4,
30955 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30956 "\x31\x32\x33\x34\x35\x36\x37\x38"
30957 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30958 "\x41\x42\x43\x44\x45\x46\x47\x48"
30959 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
30960 .psize = 40,
30961 .digest = "\xa9\x7a\x7f\x7b",
30962 },
30963 {
30964 .key = "\xff\xff\xff\xff",
30965 .ksize = 4,
30966 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
30967 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30968 "\x61\x62\x63\x64\x65\x66\x67\x68"
30969 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30970 "\x71\x72\x73\x74\x75\x76\x77\x78",
30971 .psize = 40,
30972 .digest = "\xba\xd3\xf8\x1c",
30973 },
30974 {
30975 .key = "\xff\xff\xff\xff",
30976 .ksize = 4,
30977 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30978 "\x81\x82\x83\x84\x85\x86\x87\x88"
30979 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30980 "\x91\x92\x93\x94\x95\x96\x97\x98"
30981 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
30982 .psize = 40,
30983 .digest = "\xa8\xa9\xc2\x02",
30984 },
30985 {
30986 .key = "\xff\xff\xff\xff",
30987 .ksize = 4,
30988 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30989 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30990 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30991 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30992 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
30993 .psize = 40,
30994 .digest = "\x27\xf0\x57\xe2",
30995 },
30996 {
30997 .key = "\xff\xff\xff\xff",
30998 .ksize = 4,
30999 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31000 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31001 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31002 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31003 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31004 .psize = 40,
31005 .digest = "\x49\x78\x10\x08",
31006 },
31007 {
31008 .key = "\x80\xea\xd3\xf1",
31009 .ksize = 4,
31010 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31011 "\x31\x32\x33\x34\x35\x36\x37\x38"
31012 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31013 "\x41\x42\x43\x44\x45\x46\x47\x48"
31014 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
31015 .psize = 40,
31016 .digest = "\x9a\xb1\xdc\xf0",
31017 },
31018 {
31019 .key = "\xf3\x4a\x1d\x5d",
31020 .ksize = 4,
31021 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
31022 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31023 "\x61\x62\x63\x64\x65\x66\x67\x68"
31024 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31025 "\x71\x72\x73\x74\x75\x76\x77\x78",
31026 .psize = 40,
31027 .digest = "\xb4\x97\xcc\xd4",
31028 },
31029 {
31030 .key = "\x2e\x80\x04\x59",
31031 .ksize = 4,
31032 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31033 "\x81\x82\x83\x84\x85\x86\x87\x88"
31034 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31035 "\x91\x92\x93\x94\x95\x96\x97\x98"
31036 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
31037 .psize = 40,
31038 .digest = "\x67\x9b\xfa\x79",
31039 },
31040 {
31041 .key = "\xa6\xcc\x19\x85",
31042 .ksize = 4,
31043 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31044 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31045 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31046 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31047 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
31048 .psize = 40,
31049 .digest = "\x24\xb5\x16\xef",
31050 },
31051 {
31052 .key = "\x41\xfc\xfe\x2d",
31053 .ksize = 4,
31054 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31055 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31056 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31057 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31058 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31059 .psize = 40,
31060 .digest = "\x15\x94\x80\x39",
31061 },
31062 {
31063 .key = "\xff\xff\xff\xff",
31064 .ksize = 4,
31065 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31066 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31067 "\x11\x12\x13\x14\x15\x16\x17\x18"
31068 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31069 "\x21\x22\x23\x24\x25\x26\x27\x28"
31070 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31071 "\x31\x32\x33\x34\x35\x36\x37\x38"
31072 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31073 "\x41\x42\x43\x44\x45\x46\x47\x48"
31074 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
31075 "\x51\x52\x53\x54\x55\x56\x57\x58"
31076 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31077 "\x61\x62\x63\x64\x65\x66\x67\x68"
31078 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31079 "\x71\x72\x73\x74\x75\x76\x77\x78"
31080 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31081 "\x81\x82\x83\x84\x85\x86\x87\x88"
31082 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31083 "\x91\x92\x93\x94\x95\x96\x97\x98"
31084 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
31085 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31086 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31087 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31088 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31089 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
31090 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31091 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31092 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31093 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31094 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31095 .psize = 240,
31096 .digest = "\x6c\xc6\x56\xde",
31097 .np = 2,
31098 .tap = { 31, 209 }
31099 }, {
31100 .key = "\xff\xff\xff\xff",
31101 .ksize = 4,
31102 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
31103 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
31104 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
31105 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
31106 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
31107 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
31108 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
31109 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
31110 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
31111 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
31112 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
31113 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
31114 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
31115 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
31116 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
31117 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
31118 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
31119 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
31120 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
31121 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
31122 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
31123 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
31124 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
31125 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
31126 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
31127 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
31128 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
31129 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
31130 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
31131 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
31132 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
31133 "\x47\xde\x75\x0c\x80\x17\xae\x22"
31134 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
31135 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
31136 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
31137 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
31138 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
31139 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
31140 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
31141 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
31142 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
31143 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
31144 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
31145 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
31146 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
31147 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
31148 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
31149 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
31150 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
31151 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
31152 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
31153 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
31154 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
31155 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
31156 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
31157 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
31158 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
31159 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
31160 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
31161 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
31162 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
31163 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
31164 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
31165 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
31166 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
31167 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
31168 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
31169 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
31170 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
31171 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
31172 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
31173 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
31174 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
31175 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
31176 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
31177 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
31178 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
31179 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
31180 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
31181 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
31182 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
31183 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
31184 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
31185 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
31186 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
31187 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
31188 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
31189 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
31190 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
31191 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
31192 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
31193 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
31194 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
31195 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
31196 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
31197 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
31198 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
31199 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
31200 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
31201 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
31202 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
31203 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
31204 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
31205 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
31206 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
31207 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
31208 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
31209 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
31210 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
31211 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
31212 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
31213 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
31214 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
31215 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
31216 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
31217 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
31218 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
31219 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
31220 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
31221 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
31222 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
31223 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
31224 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
31225 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
31226 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
31227 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
31228 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
31229 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
31230 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
31231 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
31232 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
31233 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
31234 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
31235 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
31236 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
31237 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
31238 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
31239 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
31240 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
31241 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
31242 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
31243 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
31244 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
31245 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
31246 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
31247 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
31248 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
31249 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
31250 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
31251 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
31252 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
31253 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
31254 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
31255 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
31256 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
31257 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
31258 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
31259 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
31260 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
31261 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
31262 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
31263 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
31264 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
31265 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
31266 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
31267 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
31268 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
31269 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
31270 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
31271 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
31272 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
31273 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
31274 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
31275 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
31276 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
31277 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
31278 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
31279 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
31280 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
31281 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
31282 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
31283 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
31284 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
31285 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
31286 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
31287 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
31288 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
31289 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
31290 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
31291 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
31292 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
31293 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
31294 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
31295 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
31296 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
31297 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
31298 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
31299 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
31300 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
31301 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
31302 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
31303 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
31304 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
31305 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
31306 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
31307 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
31308 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
31309 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
31310 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
31311 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
31312 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
31313 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
31314 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
31315 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
31316 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
31317 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
31318 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
31319 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
31320 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
31321 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
31322 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
31323 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
31324 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
31325 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
31326 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
31327 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
31328 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
31329 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
31330 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
31331 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
31332 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
31333 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
31334 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
31335 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
31336 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
31337 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
31338 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
31339 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
31340 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
31341 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
31342 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
31343 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
31344 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
31345 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
31346 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
31347 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
31348 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
31349 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
31350 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
31351 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
31352 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
31353 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
31354 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
31355 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
31356 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
31357 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
31358 .psize = 2048,
31359 .digest = "\xfb\x3a\x7a\xda",
31360 }
31361};
31362
31363/*
Herbert Xuda7f0332008-07-31 17:08:25 +080031364 * CRC32C test vectors
31365 */
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020031366#define CRC32C_TEST_VECTORS 15
Herbert Xuda7f0332008-07-31 17:08:25 +080031367
31368static struct hash_testvec crc32c_tv_template[] = {
31369 {
31370 .psize = 0,
31371 .digest = "\x00\x00\x00\x00",
31372 },
31373 {
31374 .key = "\x87\xa9\xcb\xed",
31375 .ksize = 4,
31376 .psize = 0,
31377 .digest = "\x78\x56\x34\x12",
31378 },
31379 {
31380 .key = "\xff\xff\xff\xff",
31381 .ksize = 4,
31382 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31383 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31384 "\x11\x12\x13\x14\x15\x16\x17\x18"
31385 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31386 "\x21\x22\x23\x24\x25\x26\x27\x28",
31387 .psize = 40,
31388 .digest = "\x7f\x15\x2c\x0e",
31389 },
31390 {
31391 .key = "\xff\xff\xff\xff",
31392 .ksize = 4,
31393 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31394 "\x31\x32\x33\x34\x35\x36\x37\x38"
31395 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31396 "\x41\x42\x43\x44\x45\x46\x47\x48"
31397 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
31398 .psize = 40,
31399 .digest = "\xf6\xeb\x80\xe9",
31400 },
31401 {
31402 .key = "\xff\xff\xff\xff",
31403 .ksize = 4,
31404 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
31405 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31406 "\x61\x62\x63\x64\x65\x66\x67\x68"
31407 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31408 "\x71\x72\x73\x74\x75\x76\x77\x78",
31409 .psize = 40,
31410 .digest = "\xed\xbd\x74\xde",
31411 },
31412 {
31413 .key = "\xff\xff\xff\xff",
31414 .ksize = 4,
31415 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31416 "\x81\x82\x83\x84\x85\x86\x87\x88"
31417 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31418 "\x91\x92\x93\x94\x95\x96\x97\x98"
31419 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
31420 .psize = 40,
31421 .digest = "\x62\xc8\x79\xd5",
31422 },
31423 {
31424 .key = "\xff\xff\xff\xff",
31425 .ksize = 4,
31426 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31427 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31428 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31429 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31430 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
31431 .psize = 40,
31432 .digest = "\xd0\x9a\x97\xba",
31433 },
31434 {
31435 .key = "\xff\xff\xff\xff",
31436 .ksize = 4,
31437 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31438 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31439 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31440 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31441 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31442 .psize = 40,
31443 .digest = "\x13\xd9\x29\x2b",
31444 },
31445 {
31446 .key = "\x80\xea\xd3\xf1",
31447 .ksize = 4,
31448 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31449 "\x31\x32\x33\x34\x35\x36\x37\x38"
31450 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31451 "\x41\x42\x43\x44\x45\x46\x47\x48"
31452 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
31453 .psize = 40,
31454 .digest = "\x0c\xb5\xe2\xa2",
31455 },
31456 {
31457 .key = "\xf3\x4a\x1d\x5d",
31458 .ksize = 4,
31459 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
31460 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31461 "\x61\x62\x63\x64\x65\x66\x67\x68"
31462 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31463 "\x71\x72\x73\x74\x75\x76\x77\x78",
31464 .psize = 40,
31465 .digest = "\xd1\x7f\xfb\xa6",
31466 },
31467 {
31468 .key = "\x2e\x80\x04\x59",
31469 .ksize = 4,
31470 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31471 "\x81\x82\x83\x84\x85\x86\x87\x88"
31472 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31473 "\x91\x92\x93\x94\x95\x96\x97\x98"
31474 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
31475 .psize = 40,
31476 .digest = "\x59\x33\xe6\x7a",
31477 },
31478 {
31479 .key = "\xa6\xcc\x19\x85",
31480 .ksize = 4,
31481 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31482 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31483 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31484 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31485 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
31486 .psize = 40,
31487 .digest = "\xbe\x03\x01\xd2",
31488 },
31489 {
31490 .key = "\x41\xfc\xfe\x2d",
31491 .ksize = 4,
31492 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31493 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31494 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31495 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31496 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31497 .psize = 40,
31498 .digest = "\x75\xd3\xc5\x24",
31499 },
31500 {
31501 .key = "\xff\xff\xff\xff",
31502 .ksize = 4,
31503 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31504 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31505 "\x11\x12\x13\x14\x15\x16\x17\x18"
31506 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31507 "\x21\x22\x23\x24\x25\x26\x27\x28"
31508 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31509 "\x31\x32\x33\x34\x35\x36\x37\x38"
31510 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31511 "\x41\x42\x43\x44\x45\x46\x47\x48"
31512 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
31513 "\x51\x52\x53\x54\x55\x56\x57\x58"
31514 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31515 "\x61\x62\x63\x64\x65\x66\x67\x68"
31516 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31517 "\x71\x72\x73\x74\x75\x76\x77\x78"
31518 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31519 "\x81\x82\x83\x84\x85\x86\x87\x88"
31520 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31521 "\x91\x92\x93\x94\x95\x96\x97\x98"
31522 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
31523 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31524 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31525 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31526 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31527 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
31528 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31529 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31530 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31531 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31532 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31533 .psize = 240,
31534 .digest = "\x75\xd3\xc5\x24",
31535 .np = 2,
31536 .tap = { 31, 209 }
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020031537 }, {
31538 .key = "\xff\xff\xff\xff",
31539 .ksize = 4,
31540 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
31541 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
31542 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
31543 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
31544 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
31545 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
31546 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
31547 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
31548 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
31549 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
31550 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
31551 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
31552 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
31553 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
31554 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
31555 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
31556 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
31557 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
31558 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
31559 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
31560 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
31561 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
31562 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
31563 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
31564 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
31565 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
31566 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
31567 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
31568 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
31569 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
31570 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
31571 "\x47\xde\x75\x0c\x80\x17\xae\x22"
31572 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
31573 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
31574 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
31575 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
31576 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
31577 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
31578 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
31579 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
31580 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
31581 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
31582 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
31583 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
31584 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
31585 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
31586 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
31587 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
31588 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
31589 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
31590 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
31591 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
31592 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
31593 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
31594 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
31595 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
31596 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
31597 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
31598 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
31599 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
31600 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
31601 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
31602 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
31603 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
31604 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
31605 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
31606 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
31607 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
31608 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
31609 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
31610 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
31611 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
31612 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
31613 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
31614 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
31615 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
31616 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
31617 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
31618 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
31619 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
31620 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
31621 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
31622 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
31623 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
31624 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
31625 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
31626 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
31627 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
31628 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
31629 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
31630 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
31631 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
31632 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
31633 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
31634 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
31635 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
31636 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
31637 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
31638 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
31639 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
31640 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
31641 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
31642 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
31643 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
31644 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
31645 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
31646 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
31647 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
31648 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
31649 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
31650 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
31651 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
31652 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
31653 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
31654 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
31655 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
31656 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
31657 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
31658 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
31659 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
31660 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
31661 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
31662 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
31663 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
31664 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
31665 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
31666 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
31667 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
31668 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
31669 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
31670 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
31671 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
31672 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
31673 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
31674 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
31675 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
31676 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
31677 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
31678 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
31679 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
31680 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
31681 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
31682 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
31683 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
31684 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
31685 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
31686 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
31687 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
31688 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
31689 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
31690 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
31691 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
31692 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
31693 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
31694 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
31695 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
31696 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
31697 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
31698 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
31699 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
31700 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
31701 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
31702 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
31703 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
31704 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
31705 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
31706 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
31707 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
31708 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
31709 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
31710 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
31711 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
31712 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
31713 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
31714 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
31715 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
31716 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
31717 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
31718 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
31719 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
31720 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
31721 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
31722 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
31723 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
31724 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
31725 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
31726 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
31727 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
31728 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
31729 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
31730 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
31731 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
31732 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
31733 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
31734 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
31735 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
31736 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
31737 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
31738 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
31739 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
31740 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
31741 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
31742 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
31743 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
31744 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
31745 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
31746 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
31747 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
31748 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
31749 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
31750 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
31751 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
31752 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
31753 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
31754 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
31755 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
31756 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
31757 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
31758 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
31759 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
31760 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
31761 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
31762 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
31763 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
31764 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
31765 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
31766 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
31767 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
31768 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
31769 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
31770 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
31771 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
31772 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
31773 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
31774 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
31775 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
31776 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
31777 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
31778 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
31779 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
31780 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
31781 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
31782 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
31783 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
31784 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
31785 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
31786 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
31787 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
31788 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
31789 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
31790 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
31791 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
31792 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
31793 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
31794 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
31795 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
31796 .psize = 2048,
31797 .digest = "\xec\x26\x4d\x95",
31798 }
Herbert Xuda7f0332008-07-31 17:08:25 +080031799};
31800
Sonic Zhanga482b082012-05-25 17:54:13 +080031801/*
31802 * Blakcifn CRC test vectors
31803 */
31804#define BFIN_CRC_TEST_VECTORS 6
31805
31806static struct hash_testvec bfin_crc_tv_template[] = {
31807 {
31808 .psize = 0,
31809 .digest = "\x00\x00\x00\x00",
31810 },
31811 {
31812 .key = "\x87\xa9\xcb\xed",
31813 .ksize = 4,
31814 .psize = 0,
31815 .digest = "\x87\xa9\xcb\xed",
31816 },
31817 {
31818 .key = "\xff\xff\xff\xff",
31819 .ksize = 4,
31820 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31821 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31822 "\x11\x12\x13\x14\x15\x16\x17\x18"
31823 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31824 "\x21\x22\x23\x24\x25\x26\x27\x28",
31825 .psize = 40,
31826 .digest = "\x84\x0c\x8d\xa2",
31827 },
31828 {
31829 .key = "\xff\xff\xff\xff",
31830 .ksize = 4,
31831 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31832 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31833 "\x11\x12\x13\x14\x15\x16\x17\x18"
31834 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31835 "\x21\x22\x23\x24\x25\x26",
31836 .psize = 38,
31837 .digest = "\x8c\x58\xec\xb7",
31838 },
31839 {
31840 .key = "\xff\xff\xff\xff",
31841 .ksize = 4,
31842 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31843 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31844 "\x11\x12\x13\x14\x15\x16\x17\x18"
31845 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31846 "\x21\x22\x23\x24\x25\x26\x27",
31847 .psize = 39,
31848 .digest = "\xdc\x50\x28\x7b",
31849 },
31850 {
31851 .key = "\xff\xff\xff\xff",
31852 .ksize = 4,
31853 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31854 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31855 "\x11\x12\x13\x14\x15\x16\x17\x18"
31856 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31857 "\x21\x22\x23\x24\x25\x26\x27\x28"
31858 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31859 "\x31\x32\x33\x34\x35\x36\x37\x38"
31860 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31861 "\x41\x42\x43\x44\x45\x46\x47\x48"
31862 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
31863 "\x51\x52\x53\x54\x55\x56\x57\x58"
31864 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31865 "\x61\x62\x63\x64\x65\x66\x67\x68"
31866 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31867 "\x71\x72\x73\x74\x75\x76\x77\x78"
31868 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31869 "\x81\x82\x83\x84\x85\x86\x87\x88"
31870 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31871 "\x91\x92\x93\x94\x95\x96\x97\x98"
31872 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
31873 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31874 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31875 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31876 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31877 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
31878 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31879 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31880 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31881 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31882 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31883 .psize = 240,
31884 .digest = "\x10\x19\x4a\x5c",
31885 .np = 2,
31886 .tap = { 31, 209 }
31887 },
31888
31889};
31890
KOVACS Krisztian1443cc92014-08-22 10:44:36 +020031891#define LZ4_COMP_TEST_VECTORS 1
31892#define LZ4_DECOMP_TEST_VECTORS 1
31893
31894static struct comp_testvec lz4_comp_tv_template[] = {
31895 {
31896 .inlen = 70,
31897 .outlen = 45,
31898 .input = "Join us now and share the software "
31899 "Join us now and share the software ",
31900 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31901 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31902 "\x64\x20\x73\x68\x61\x72\x65\x20"
31903 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31904 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31905 "\x77\x61\x72\x65\x20",
31906 },
31907};
31908
31909static struct comp_testvec lz4_decomp_tv_template[] = {
31910 {
31911 .inlen = 45,
31912 .outlen = 70,
31913 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31914 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31915 "\x64\x20\x73\x68\x61\x72\x65\x20"
31916 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31917 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31918 "\x77\x61\x72\x65\x20",
31919 .output = "Join us now and share the software "
31920 "Join us now and share the software ",
31921 },
31922};
31923
31924#define LZ4HC_COMP_TEST_VECTORS 1
31925#define LZ4HC_DECOMP_TEST_VECTORS 1
31926
31927static struct comp_testvec lz4hc_comp_tv_template[] = {
31928 {
31929 .inlen = 70,
31930 .outlen = 45,
31931 .input = "Join us now and share the software "
31932 "Join us now and share the software ",
31933 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31934 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31935 "\x64\x20\x73\x68\x61\x72\x65\x20"
31936 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31937 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31938 "\x77\x61\x72\x65\x20",
31939 },
31940};
31941
31942static struct comp_testvec lz4hc_decomp_tv_template[] = {
31943 {
31944 .inlen = 45,
31945 .outlen = 70,
31946 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31947 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31948 "\x64\x20\x73\x68\x61\x72\x65\x20"
31949 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31950 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31951 "\x77\x61\x72\x65\x20",
31952 .output = "Join us now and share the software "
31953 "Join us now and share the software ",
31954 },
31955};
31956
Herbert Xuda7f0332008-07-31 17:08:25 +080031957#endif /* _CRYPTO_TESTMGR_H */