blob: c0c02436c78316e280eb4f580d22eca904d4c2b9 [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 Kivilinna18be20b92011-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 Kivilinna18be20b92011-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 Kivilinna18be20b92011-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 Kivilinna18be20b92011-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,
LABBE Corentin0d8dc962015-07-06 13:37:33 +020014507 .also_non_np = 1,
14508 .np = 8,
14509 .tap = { 3, 2, 3, 2, 3, 1, 1, 1 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014510 }, {
14511 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14512 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14513 .klen = 16,
14514 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14515 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14516 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14517 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14518 "\x10\x11\x12\x13\x14\x15\x16\x17"
14519 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14520 .ilen = 32,
14521 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14522 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14523 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14524 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14525 .rlen = 32,
14526 }, { /* From NIST SP800-38A */
14527 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14528 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14529 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14530 .klen = 24,
14531 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14532 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14533 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14534 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14535 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14536 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14537 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14538 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14539 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14540 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14541 .ilen = 64,
14542 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14543 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14544 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14545 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14546 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14547 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14548 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14549 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14550 .rlen = 64,
14551 }, {
14552 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14553 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14554 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14555 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14556 .klen = 32,
14557 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14558 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14559 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14560 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14561 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14562 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14563 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14564 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14565 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14566 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14567 .ilen = 64,
14568 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14569 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14570 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14571 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14572 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14573 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14574 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14575 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14576 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014577 }, { /* Generated with Crypto++ */
14578 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14579 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14580 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14581 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14582 .klen = 32,
14583 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14584 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14585 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14586 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14587 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14588 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14589 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14590 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14591 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14592 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14593 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14594 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14595 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14596 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14597 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14598 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14599 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14600 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14601 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14602 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14603 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14604 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14605 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14606 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14607 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14608 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14609 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14610 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14611 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14612 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14613 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14614 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14615 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14616 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14617 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14618 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14619 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14620 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14621 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14622 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14623 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14624 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14625 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14626 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14627 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14628 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14629 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14630 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14631 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14632 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14633 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14634 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14635 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14636 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14637 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14638 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14639 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14640 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14641 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14642 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14643 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14644 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14645 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14646 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14647 .ilen = 496,
14648 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14649 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14650 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14651 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14652 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14653 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14654 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14655 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14656 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14657 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14658 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14659 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14660 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14661 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14662 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14663 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14664 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14665 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14666 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14667 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14668 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14669 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14670 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14671 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14672 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14673 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14674 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14675 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14676 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14677 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14678 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14679 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14680 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14681 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14682 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14683 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14684 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14685 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14686 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14687 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14688 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14689 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14690 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14691 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14692 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14693 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14694 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14695 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14696 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14697 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14698 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14699 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14700 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14701 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14702 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14703 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14704 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14705 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14706 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14707 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14708 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14709 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14710 .rlen = 496,
14711 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014712 .np = 3,
14713 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014714 },
14715};
14716
14717static struct cipher_testvec aes_cbc_dec_tv_template[] = {
14718 { /* From RFC 3602 */
14719 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14720 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14721 .klen = 16,
14722 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14723 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14724 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14725 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14726 .ilen = 16,
14727 .result = "Single block msg",
14728 .rlen = 16,
LABBE Corentin0d8dc962015-07-06 13:37:33 +020014729 .also_non_np = 1,
14730 .np = 8,
14731 .tap = { 3, 2, 3, 2, 3, 1, 1, 1 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014732 }, {
14733 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14734 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14735 .klen = 16,
14736 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14737 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14738 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14739 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14740 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14741 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14742 .ilen = 32,
14743 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14744 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14745 "\x10\x11\x12\x13\x14\x15\x16\x17"
14746 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14747 .rlen = 32,
14748 }, { /* From NIST SP800-38A */
14749 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14750 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14751 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14752 .klen = 24,
14753 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14754 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14755 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14756 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14757 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14758 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14759 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14760 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14761 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14762 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14763 .ilen = 64,
14764 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14765 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14766 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14767 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14768 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14769 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14770 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14771 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14772 .rlen = 64,
14773 }, {
14774 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14775 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14776 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14777 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14778 .klen = 32,
14779 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14780 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14781 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14782 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14783 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14784 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14785 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14786 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14787 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14788 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14789 .ilen = 64,
14790 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14791 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14792 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14793 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14794 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14795 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14796 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14797 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14798 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014799 }, { /* Generated with Crypto++ */
14800 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14801 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14802 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14803 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14804 .klen = 32,
14805 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14806 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14807 .input = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14808 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14809 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14810 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14811 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14812 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14813 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14814 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14815 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14816 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14817 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14818 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14819 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14820 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14821 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14822 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14823 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14824 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14825 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14826 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14827 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14828 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14829 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14830 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14831 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14832 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14833 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14834 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14835 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14836 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14837 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14838 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14839 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14840 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14841 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14842 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14843 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14844 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14845 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14846 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14847 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14848 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14849 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14850 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14851 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14852 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14853 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14854 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14855 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14856 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14857 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14858 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14859 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14860 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14861 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14862 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14863 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14864 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14865 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14866 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14867 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14868 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14869 .ilen = 496,
14870 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14871 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14872 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14873 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14874 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14875 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14876 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14877 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14878 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14879 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14880 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14881 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14882 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14883 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14884 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14885 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14886 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14887 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14888 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14889 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14890 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14891 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14892 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14893 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14894 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14895 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14896 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14897 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14898 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14899 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14900 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14901 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14902 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14903 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14904 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14905 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14906 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14907 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14908 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14909 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14910 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14911 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14912 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14913 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14914 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14915 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14916 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14917 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14918 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14919 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14920 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14921 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14922 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14923 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14924 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14925 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14926 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14927 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14928 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14929 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14930 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14931 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14932 .rlen = 496,
14933 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014934 .np = 3,
14935 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014936 },
14937};
14938
Horia Geantabca4feb2014-03-14 17:46:51 +020014939static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
14940 { /* Input data from RFC 2410 Case 1 */
14941#ifdef __LITTLE_ENDIAN
14942 .key = "\x08\x00" /* rta length */
14943 "\x01\x00" /* rta type */
14944#else
14945 .key = "\x00\x08" /* rta length */
14946 "\x00\x01" /* rta type */
14947#endif
14948 "\x00\x00\x00\x00" /* enc key length */
14949 "\x00\x00\x00\x00\x00\x00\x00\x00"
14950 "\x00\x00\x00\x00\x00\x00\x00\x00",
14951 .klen = 8 + 16 + 0,
14952 .iv = "",
14953 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14954 .ilen = 8,
14955 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14956 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14957 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14958 .rlen = 8 + 16,
14959 }, { /* Input data from RFC 2410 Case 2 */
14960#ifdef __LITTLE_ENDIAN
14961 .key = "\x08\x00" /* rta length */
14962 "\x01\x00" /* rta type */
14963#else
14964 .key = "\x00\x08" /* rta length */
14965 "\x00\x01" /* rta type */
14966#endif
14967 "\x00\x00\x00\x00" /* enc key length */
14968 "\x00\x00\x00\x00\x00\x00\x00\x00"
14969 "\x00\x00\x00\x00\x00\x00\x00\x00",
14970 .klen = 8 + 16 + 0,
14971 .iv = "",
14972 .input = "Network Security People Have A Strange Sense Of Humor",
14973 .ilen = 53,
14974 .result = "Network Security People Have A Strange Sense Of Humor"
14975 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
14976 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
14977 .rlen = 53 + 16,
14978 },
14979};
14980
14981static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
14982 {
14983#ifdef __LITTLE_ENDIAN
14984 .key = "\x08\x00" /* rta length */
14985 "\x01\x00" /* rta type */
14986#else
14987 .key = "\x00\x08" /* rta length */
14988 "\x00\x01" /* rta type */
14989#endif
14990 "\x00\x00\x00\x00" /* enc key length */
14991 "\x00\x00\x00\x00\x00\x00\x00\x00"
14992 "\x00\x00\x00\x00\x00\x00\x00\x00",
14993 .klen = 8 + 16 + 0,
14994 .iv = "",
14995 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14996 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14997 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14998 .ilen = 8 + 16,
14999 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15000 .rlen = 8,
15001 }, {
15002#ifdef __LITTLE_ENDIAN
15003 .key = "\x08\x00" /* rta length */
15004 "\x01\x00" /* rta type */
15005#else
15006 .key = "\x00\x08" /* rta length */
15007 "\x00\x01" /* rta type */
15008#endif
15009 "\x00\x00\x00\x00" /* enc key length */
15010 "\x00\x00\x00\x00\x00\x00\x00\x00"
15011 "\x00\x00\x00\x00\x00\x00\x00\x00",
15012 .klen = 8 + 16 + 0,
15013 .iv = "",
15014 .input = "Network Security People Have A Strange Sense Of Humor"
15015 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
15016 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
15017 .ilen = 53 + 16,
15018 .result = "Network Security People Have A Strange Sense Of Humor",
15019 .rlen = 53,
15020 },
15021};
15022
Nitesh Lal5208ed22014-05-21 17:09:08 +053015023static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015024 { /* RFC 3602 Case 1 */
15025#ifdef __LITTLE_ENDIAN
15026 .key = "\x08\x00" /* rta length */
15027 "\x01\x00" /* rta type */
15028#else
15029 .key = "\x00\x08" /* rta length */
15030 "\x00\x01" /* rta type */
15031#endif
15032 "\x00\x00\x00\x10" /* enc key length */
15033 "\x00\x00\x00\x00\x00\x00\x00\x00"
15034 "\x00\x00\x00\x00\x00\x00\x00\x00"
15035 "\x00\x00\x00\x00"
15036 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15037 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15038 .klen = 8 + 20 + 16,
15039 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15040 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15041 .input = "Single block msg",
15042 .ilen = 16,
15043 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15044 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15045 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
15046 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
15047 "\x03\x71\xa2\x06",
15048 .rlen = 16 + 20,
15049 }, { /* RFC 3602 Case 2 */
15050#ifdef __LITTLE_ENDIAN
15051 .key = "\x08\x00" /* rta length */
15052 "\x01\x00" /* rta type */
15053#else
15054 .key = "\x00\x08" /* rta length */
15055 "\x00\x01" /* rta type */
15056#endif
15057 "\x00\x00\x00\x10" /* enc key length */
15058 "\x20\x21\x22\x23\x24\x25\x26\x27"
15059 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15060 "\x30\x31\x32\x33"
15061 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15062 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15063 .klen = 8 + 20 + 16,
15064 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15065 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15066 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15067 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15068 "\x10\x11\x12\x13\x14\x15\x16\x17"
15069 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15070 .ilen = 32,
15071 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15072 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15073 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15074 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15075 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
15076 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
15077 "\x65\x39\xf8\xde",
15078 .rlen = 32 + 20,
15079 }, { /* RFC 3602 Case 3 */
15080#ifdef __LITTLE_ENDIAN
15081 .key = "\x08\x00" /* rta length */
15082 "\x01\x00" /* rta type */
15083#else
15084 .key = "\x00\x08" /* rta length */
15085 "\x00\x01" /* rta type */
15086#endif
15087 "\x00\x00\x00\x10" /* enc key length */
15088 "\x11\x22\x33\x44\x55\x66\x77\x88"
15089 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15090 "\x22\x33\x44\x55"
15091 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15092 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15093 .klen = 8 + 20 + 16,
15094 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15095 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15096 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15097 .ilen = 48,
15098 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15099 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15100 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15101 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15102 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15103 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15104 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
15105 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
15106 "\x8d\x62\xf2\x1e",
15107 .rlen = 48 + 20,
15108 }, { /* RFC 3602 Case 4 */
15109#ifdef __LITTLE_ENDIAN
15110 .key = "\x08\x00" /* rta length */
15111 "\x01\x00" /* rta type */
15112#else
15113 .key = "\x00\x08" /* rta length */
15114 "\x00\x01" /* rta type */
15115#endif
15116 "\x00\x00\x00\x10" /* enc key length */
15117 "\x11\x22\x33\x44\x55\x66\x77\x88"
15118 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15119 "\x22\x33\x44\x55"
15120 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15121 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15122 .klen = 8 + 20 + 16,
15123 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15124 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15125 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15126 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15127 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15128 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15129 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15130 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15131 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15132 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15133 .ilen = 64,
15134 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15135 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15136 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15137 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15138 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15139 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15140 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15141 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15142 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
15143 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
15144 "\x1d\xbe\xc6\xe9",
15145 .rlen = 64 + 20,
15146 }, { /* RFC 3602 Case 5 */
15147#ifdef __LITTLE_ENDIAN
15148 .key = "\x08\x00" /* rta length */
15149 "\x01\x00" /* rta type */
15150#else
15151 .key = "\x00\x08" /* rta length */
15152 "\x00\x01" /* rta type */
15153#endif
15154 "\x00\x00\x00\x10" /* enc key length */
15155 "\x11\x22\x33\x44\x55\x66\x77\x88"
15156 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15157 "\x22\x33\x44\x55"
15158 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15159 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15160 .klen = 8 + 20 + 16,
15161 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15162 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15163 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15164 .alen = 8,
15165 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15166 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15167 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15168 "\x10\x11\x12\x13\x14\x15\x16\x17"
15169 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15170 "\x20\x21\x22\x23\x24\x25\x26\x27"
15171 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15172 "\x30\x31\x32\x33\x34\x35\x36\x37"
15173 "\x01\x02\x03\x04\x05\x06\x07\x08"
15174 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15175 .ilen = 80,
15176 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15177 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15178 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15179 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15180 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15181 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15182 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15183 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15184 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15185 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15186 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
15187 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
15188 "\x85\xe1\x59\xf7",
15189 .rlen = 80 + 20,
15190 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15191#ifdef __LITTLE_ENDIAN
15192 .key = "\x08\x00" /* rta length */
15193 "\x01\x00" /* rta type */
15194#else
15195 .key = "\x00\x08" /* rta length */
15196 "\x00\x01" /* rta type */
15197#endif
15198 "\x00\x00\x00\x18" /* enc key length */
15199 "\x11\x22\x33\x44\x55\x66\x77\x88"
15200 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15201 "\x22\x33\x44\x55"
15202 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15203 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15204 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15205 .klen = 8 + 20 + 24,
15206 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15207 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15208 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15209 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15210 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15211 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15212 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15213 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15214 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15215 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15216 .ilen = 64,
15217 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15218 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15219 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15220 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15221 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15222 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15223 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15224 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15225 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
15226 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
15227 "\x47\x4c\xfc\x36",
15228 .rlen = 64 + 20,
15229 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15230#ifdef __LITTLE_ENDIAN
15231 .key = "\x08\x00" /* rta length */
15232 "\x01\x00" /* rta type */
15233#else
15234 .key = "\x00\x08" /* rta length */
15235 "\x00\x01" /* rta type */
15236#endif
15237 "\x00\x00\x00\x20" /* enc key length */
15238 "\x11\x22\x33\x44\x55\x66\x77\x88"
15239 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15240 "\x22\x33\x44\x55"
15241 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15242 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15243 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15244 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15245 .klen = 8 + 20 + 32,
15246 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15247 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15248 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15249 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15250 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15251 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15252 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15253 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15254 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15255 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15256 .ilen = 64,
15257 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15258 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15259 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15260 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15261 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15262 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15263 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15264 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15265 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
15266 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
15267 "\x51\xee\xd6\x4e",
15268 .rlen = 64 + 20,
15269 },
15270};
15271
Nitesh Lal5208ed22014-05-21 17:09:08 +053015272static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015273 { /* Input data from RFC 2410 Case 1 */
15274#ifdef __LITTLE_ENDIAN
15275 .key = "\x08\x00" /* rta length */
15276 "\x01\x00" /* rta type */
15277#else
15278 .key = "\x00\x08" /* rta length */
15279 "\x00\x01" /* rta type */
15280#endif
15281 "\x00\x00\x00\x00" /* enc key length */
15282 "\x00\x00\x00\x00\x00\x00\x00\x00"
15283 "\x00\x00\x00\x00\x00\x00\x00\x00"
15284 "\x00\x00\x00\x00",
15285 .klen = 8 + 20 + 0,
15286 .iv = "",
15287 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15288 .ilen = 8,
15289 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15290 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15291 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15292 "\x8c\x5e\xe4\x08",
15293 .rlen = 8 + 20,
15294 }, { /* Input data from RFC 2410 Case 2 */
15295#ifdef __LITTLE_ENDIAN
15296 .key = "\x08\x00" /* rta length */
15297 "\x01\x00" /* rta type */
15298#else
15299 .key = "\x00\x08" /* rta length */
15300 "\x00\x01" /* rta type */
15301#endif
15302 "\x00\x00\x00\x00" /* enc key length */
15303 "\x00\x00\x00\x00\x00\x00\x00\x00"
15304 "\x00\x00\x00\x00\x00\x00\x00\x00"
15305 "\x00\x00\x00\x00",
15306 .klen = 8 + 20 + 0,
15307 .iv = "",
15308 .input = "Network Security People Have A Strange Sense Of Humor",
15309 .ilen = 53,
15310 .result = "Network Security People Have A Strange Sense Of Humor"
15311 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15312 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15313 "\x91\x56\xe4\xd6",
15314 .rlen = 53 + 20,
15315 },
15316};
15317
Nitesh Lal5208ed22014-05-21 17:09:08 +053015318static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015319 {
15320#ifdef __LITTLE_ENDIAN
15321 .key = "\x08\x00" /* rta length */
15322 "\x01\x00" /* rta type */
15323#else
15324 .key = "\x00\x08" /* rta length */
15325 "\x00\x01" /* rta type */
15326#endif
15327 "\x00\x00\x00\x00" /* enc key length */
15328 "\x00\x00\x00\x00\x00\x00\x00\x00"
15329 "\x00\x00\x00\x00\x00\x00\x00\x00"
15330 "\x00\x00\x00\x00",
15331 .klen = 8 + 20 + 0,
15332 .iv = "",
15333 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15334 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15335 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15336 "\x8c\x5e\xe4\x08",
15337 .ilen = 8 + 20,
15338 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15339 .rlen = 8,
15340 }, {
15341#ifdef __LITTLE_ENDIAN
15342 .key = "\x08\x00" /* rta length */
15343 "\x01\x00" /* rta type */
15344#else
15345 .key = "\x00\x08" /* rta length */
15346 "\x00\x01" /* rta type */
15347#endif
15348 "\x00\x00\x00\x00" /* enc key length */
15349 "\x00\x00\x00\x00\x00\x00\x00\x00"
15350 "\x00\x00\x00\x00\x00\x00\x00\x00"
15351 "\x00\x00\x00\x00",
15352 .klen = 8 + 20 + 0,
15353 .iv = "",
15354 .input = "Network Security People Have A Strange Sense Of Humor"
15355 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15356 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15357 "\x91\x56\xe4\xd6",
15358 .ilen = 53 + 20,
15359 .result = "Network Security People Have A Strange Sense Of Humor",
15360 .rlen = 53,
15361 },
15362};
15363
Nitesh Lal5208ed22014-05-21 17:09:08 +053015364static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015365 { /* RFC 3602 Case 1 */
15366#ifdef __LITTLE_ENDIAN
15367 .key = "\x08\x00" /* rta length */
15368 "\x01\x00" /* rta type */
15369#else
15370 .key = "\x00\x08" /* rta length */
15371 "\x00\x01" /* rta type */
15372#endif
15373 "\x00\x00\x00\x10" /* enc key length */
15374 "\x00\x00\x00\x00\x00\x00\x00\x00"
15375 "\x00\x00\x00\x00\x00\x00\x00\x00"
15376 "\x00\x00\x00\x00\x00\x00\x00\x00"
15377 "\x00\x00\x00\x00\x00\x00\x00\x00"
15378 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15379 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15380 .klen = 8 + 32 + 16,
15381 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15382 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15383 .input = "Single block msg",
15384 .ilen = 16,
15385 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15386 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15387 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
15388 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
15389 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
15390 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
15391 .rlen = 16 + 32,
15392 }, { /* RFC 3602 Case 2 */
15393#ifdef __LITTLE_ENDIAN
15394 .key = "\x08\x00" /* rta length */
15395 "\x01\x00" /* rta type */
15396#else
15397 .key = "\x00\x08" /* rta length */
15398 "\x00\x01" /* rta type */
15399#endif
15400 "\x00\x00\x00\x10" /* enc key length */
15401 "\x20\x21\x22\x23\x24\x25\x26\x27"
15402 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15403 "\x30\x31\x32\x33\x34\x35\x36\x37"
15404 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15405 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15406 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15407 .klen = 8 + 32 + 16,
15408 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15409 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15410 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15411 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15412 "\x10\x11\x12\x13\x14\x15\x16\x17"
15413 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15414 .ilen = 32,
15415 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15416 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15417 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15418 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15419 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
15420 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
15421 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
15422 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
15423 .rlen = 32 + 32,
15424 }, { /* RFC 3602 Case 3 */
15425#ifdef __LITTLE_ENDIAN
15426 .key = "\x08\x00" /* rta length */
15427 "\x01\x00" /* rta type */
15428#else
15429 .key = "\x00\x08" /* rta length */
15430 "\x00\x01" /* rta type */
15431#endif
15432 "\x00\x00\x00\x10" /* enc key length */
15433 "\x11\x22\x33\x44\x55\x66\x77\x88"
15434 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15435 "\x22\x33\x44\x55\x66\x77\x88\x99"
15436 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15437 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15438 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15439 .klen = 8 + 32 + 16,
15440 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15441 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15442 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15443 .ilen = 48,
15444 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15445 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15446 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15447 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15448 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15449 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15450 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
15451 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
15452 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
15453 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
15454 .rlen = 48 + 32,
15455 }, { /* RFC 3602 Case 4 */
15456#ifdef __LITTLE_ENDIAN
15457 .key = "\x08\x00" /* rta length */
15458 "\x01\x00" /* rta type */
15459#else
15460 .key = "\x00\x08" /* rta length */
15461 "\x00\x01" /* rta type */
15462#endif
15463 "\x00\x00\x00\x10" /* enc key length */
15464 "\x11\x22\x33\x44\x55\x66\x77\x88"
15465 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15466 "\x22\x33\x44\x55\x66\x77\x88\x99"
15467 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15468 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15469 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15470 .klen = 8 + 32 + 16,
15471 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15472 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15473 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15474 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15475 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15476 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15477 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15478 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15479 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15480 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15481 .ilen = 64,
15482 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15483 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15484 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15485 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15486 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15487 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15488 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15489 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15490 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
15491 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
15492 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
15493 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
15494 .rlen = 64 + 32,
15495 }, { /* RFC 3602 Case 5 */
15496#ifdef __LITTLE_ENDIAN
15497 .key = "\x08\x00" /* rta length */
15498 "\x01\x00" /* rta type */
15499#else
15500 .key = "\x00\x08" /* rta length */
15501 "\x00\x01" /* rta type */
15502#endif
15503 "\x00\x00\x00\x10" /* enc key length */
15504 "\x11\x22\x33\x44\x55\x66\x77\x88"
15505 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15506 "\x22\x33\x44\x55\x66\x77\x88\x99"
15507 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15508 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15509 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15510 .klen = 8 + 32 + 16,
15511 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15512 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15513 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15514 .alen = 8,
15515 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15516 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15517 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15518 "\x10\x11\x12\x13\x14\x15\x16\x17"
15519 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15520 "\x20\x21\x22\x23\x24\x25\x26\x27"
15521 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15522 "\x30\x31\x32\x33\x34\x35\x36\x37"
15523 "\x01\x02\x03\x04\x05\x06\x07\x08"
15524 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15525 .ilen = 80,
15526 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15527 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15528 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15529 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15530 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15531 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15532 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15533 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15534 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15535 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15536 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
15537 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
15538 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
15539 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
15540 .rlen = 80 + 32,
15541 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15542#ifdef __LITTLE_ENDIAN
15543 .key = "\x08\x00" /* rta length */
15544 "\x01\x00" /* rta type */
15545#else
15546 .key = "\x00\x08" /* rta length */
15547 "\x00\x01" /* rta type */
15548#endif
15549 "\x00\x00\x00\x18" /* enc key length */
15550 "\x11\x22\x33\x44\x55\x66\x77\x88"
15551 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15552 "\x22\x33\x44\x55\x66\x77\x88\x99"
15553 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15554 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15555 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15556 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15557 .klen = 8 + 32 + 24,
15558 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15559 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15560 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15561 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15562 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15563 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15564 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15565 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15566 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15567 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15568 .ilen = 64,
15569 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15570 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15571 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15572 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15573 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15574 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15575 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15576 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15577 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
15578 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
15579 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
15580 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
15581 .rlen = 64 + 32,
15582 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15583#ifdef __LITTLE_ENDIAN
15584 .key = "\x08\x00" /* rta length */
15585 "\x01\x00" /* rta type */
15586#else
15587 .key = "\x00\x08" /* rta length */
15588 "\x00\x01" /* rta type */
15589#endif
15590 "\x00\x00\x00\x20" /* enc key length */
15591 "\x11\x22\x33\x44\x55\x66\x77\x88"
15592 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15593 "\x22\x33\x44\x55\x66\x77\x88\x99"
15594 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15595 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15596 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15597 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15598 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15599 .klen = 8 + 32 + 32,
15600 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15601 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15602 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15603 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15604 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15605 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15606 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15607 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15608 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15609 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15610 .ilen = 64,
15611 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15612 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15613 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15614 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15615 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15616 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15617 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15618 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15619 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
15620 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
15621 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
15622 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
15623 .rlen = 64 + 32,
15624 },
15625};
15626
Nitesh Lal5208ed22014-05-21 17:09:08 +053015627static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015628 { /* RFC 3602 Case 1 */
15629#ifdef __LITTLE_ENDIAN
15630 .key = "\x08\x00" /* rta length */
15631 "\x01\x00" /* rta type */
15632#else
15633 .key = "\x00\x08" /* rta length */
15634 "\x00\x01" /* rta type */
15635#endif
15636 "\x00\x00\x00\x10" /* enc key length */
15637 "\x00\x00\x00\x00\x00\x00\x00\x00"
15638 "\x00\x00\x00\x00\x00\x00\x00\x00"
15639 "\x00\x00\x00\x00\x00\x00\x00\x00"
15640 "\x00\x00\x00\x00\x00\x00\x00\x00"
15641 "\x00\x00\x00\x00\x00\x00\x00\x00"
15642 "\x00\x00\x00\x00\x00\x00\x00\x00"
15643 "\x00\x00\x00\x00\x00\x00\x00\x00"
15644 "\x00\x00\x00\x00\x00\x00\x00\x00"
15645 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15646 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15647 .klen = 8 + 64 + 16,
15648 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15649 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15650 .input = "Single block msg",
15651 .ilen = 16,
15652 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15653 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15654 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
15655 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
15656 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
15657 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
15658 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
15659 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
15660 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
15661 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
15662 .rlen = 16 + 64,
15663 }, { /* RFC 3602 Case 2 */
15664#ifdef __LITTLE_ENDIAN
15665 .key = "\x08\x00" /* rta length */
15666 "\x01\x00" /* rta type */
15667#else
15668 .key = "\x00\x08" /* rta length */
15669 "\x00\x01" /* rta type */
15670#endif
15671 "\x00\x00\x00\x10" /* enc key length */
15672 "\x20\x21\x22\x23\x24\x25\x26\x27"
15673 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15674 "\x30\x31\x32\x33\x34\x35\x36\x37"
15675 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15676 "\x40\x41\x42\x43\x44\x45\x46\x47"
15677 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15678 "\x50\x51\x52\x53\x54\x55\x56\x57"
15679 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15680 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15681 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15682 .klen = 8 + 64 + 16,
15683 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15684 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15685 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15686 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15687 "\x10\x11\x12\x13\x14\x15\x16\x17"
15688 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15689 .ilen = 32,
15690 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15691 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15692 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15693 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15694 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
15695 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
15696 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
15697 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
15698 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
15699 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
15700 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
15701 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
15702 .rlen = 32 + 64,
15703 }, { /* RFC 3602 Case 3 */
15704#ifdef __LITTLE_ENDIAN
15705 .key = "\x08\x00" /* rta length */
15706 "\x01\x00" /* rta type */
15707#else
15708 .key = "\x00\x08" /* rta length */
15709 "\x00\x01" /* rta type */
15710#endif
15711 "\x00\x00\x00\x10" /* enc key length */
15712 "\x11\x22\x33\x44\x55\x66\x77\x88"
15713 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15714 "\x22\x33\x44\x55\x66\x77\x88\x99"
15715 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15716 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15717 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15718 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15719 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15720 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15721 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15722 .klen = 8 + 64 + 16,
15723 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15724 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15725 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15726 .ilen = 48,
15727 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15728 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15729 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15730 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15731 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15732 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15733 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
15734 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
15735 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
15736 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
15737 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
15738 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
15739 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
15740 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
15741 .rlen = 48 + 64,
15742 }, { /* RFC 3602 Case 4 */
15743#ifdef __LITTLE_ENDIAN
15744 .key = "\x08\x00" /* rta length */
15745 "\x01\x00" /* rta type */
15746#else
15747 .key = "\x00\x08" /* rta length */
15748 "\x00\x01" /* rta type */
15749#endif
15750 "\x00\x00\x00\x10" /* enc key length */
15751 "\x11\x22\x33\x44\x55\x66\x77\x88"
15752 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15753 "\x22\x33\x44\x55\x66\x77\x88\x99"
15754 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15755 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15756 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15757 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15758 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15759 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15760 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15761 .klen = 8 + 64 + 16,
15762 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15763 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15764 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15765 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15766 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15767 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15768 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15769 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15770 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15771 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15772 .ilen = 64,
15773 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15774 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15775 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15776 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15777 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15778 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15779 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15780 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15781 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
15782 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
15783 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
15784 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
15785 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
15786 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
15787 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
15788 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
15789 .rlen = 64 + 64,
15790 }, { /* RFC 3602 Case 5 */
15791#ifdef __LITTLE_ENDIAN
15792 .key = "\x08\x00" /* rta length */
15793 "\x01\x00" /* rta type */
15794#else
15795 .key = "\x00\x08" /* rta length */
15796 "\x00\x01" /* rta type */
15797#endif
15798 "\x00\x00\x00\x10" /* enc key length */
15799 "\x11\x22\x33\x44\x55\x66\x77\x88"
15800 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15801 "\x22\x33\x44\x55\x66\x77\x88\x99"
15802 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15803 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15804 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15805 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15806 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15807 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15808 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15809 .klen = 8 + 64 + 16,
15810 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15811 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15812 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15813 .alen = 8,
15814 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15815 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15816 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15817 "\x10\x11\x12\x13\x14\x15\x16\x17"
15818 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15819 "\x20\x21\x22\x23\x24\x25\x26\x27"
15820 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15821 "\x30\x31\x32\x33\x34\x35\x36\x37"
15822 "\x01\x02\x03\x04\x05\x06\x07\x08"
15823 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15824 .ilen = 80,
15825 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15826 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15827 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15828 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15829 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15830 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15831 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15832 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15833 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15834 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15835 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
15836 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
15837 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
15838 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
15839 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
15840 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
15841 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
15842 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
15843 .rlen = 80 + 64,
15844 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15845#ifdef __LITTLE_ENDIAN
15846 .key = "\x08\x00" /* rta length */
15847 "\x01\x00" /* rta type */
15848#else
15849 .key = "\x00\x08" /* rta length */
15850 "\x00\x01" /* rta type */
15851#endif
15852 "\x00\x00\x00\x18" /* enc key length */
15853 "\x11\x22\x33\x44\x55\x66\x77\x88"
15854 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15855 "\x22\x33\x44\x55\x66\x77\x88\x99"
15856 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15857 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15858 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15859 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15860 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15861 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15862 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15863 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15864 .klen = 8 + 64 + 24,
15865 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15866 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15867 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15868 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15869 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15870 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15871 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15872 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15873 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15874 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15875 .ilen = 64,
15876 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15877 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15878 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15879 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15880 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15881 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15882 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15883 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15884 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
15885 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
15886 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
15887 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
15888 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
15889 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
15890 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
15891 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
15892 .rlen = 64 + 64,
15893 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15894#ifdef __LITTLE_ENDIAN
15895 .key = "\x08\x00" /* rta length */
15896 "\x01\x00" /* rta type */
15897#else
15898 .key = "\x00\x08" /* rta length */
15899 "\x00\x01" /* rta type */
15900#endif
15901 "\x00\x00\x00\x20" /* enc key length */
15902 "\x11\x22\x33\x44\x55\x66\x77\x88"
15903 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15904 "\x22\x33\x44\x55\x66\x77\x88\x99"
15905 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15906 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15907 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15908 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15909 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15910 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15911 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15912 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15913 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15914 .klen = 8 + 64 + 32,
15915 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15916 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15917 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15918 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15919 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15920 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15921 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15922 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15923 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15924 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15925 .ilen = 64,
15926 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15927 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15928 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15929 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15930 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15931 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15932 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15933 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15934 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
15935 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
15936 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
15937 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
15938 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
15939 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
15940 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
15941 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
15942 .rlen = 64 + 64,
15943 },
15944};
15945
Nitesh Lal5208ed22014-05-21 17:09:08 +053015946#define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1
15947
15948static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = {
15949 { /*Generated with cryptopp*/
15950#ifdef __LITTLE_ENDIAN
15951 .key = "\x08\x00" /* rta length */
15952 "\x01\x00" /* rta type */
15953#else
15954 .key = "\x00\x08" /* rta length */
15955 "\x00\x01" /* rta type */
15956#endif
15957 "\x00\x00\x00\x08" /* enc key length */
15958 "\x11\x22\x33\x44\x55\x66\x77\x88"
15959 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15960 "\x22\x33\x44\x55"
15961 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15962 .klen = 8 + 20 + 8,
15963 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15964 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15965 .alen = 8,
15966 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15967 "\x53\x20\x63\x65\x65\x72\x73\x74"
15968 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15969 "\x20\x79\x65\x53\x72\x63\x74\x65"
15970 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15971 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15972 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15973 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15974 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15975 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15976 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15977 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15978 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15979 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15980 "\x63\x65\x65\x72\x73\x74\x54\x20"
15981 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15982 .ilen = 128,
15983 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15984 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15985 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15986 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15987 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15988 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15989 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15990 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15991 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15992 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15993 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15994 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15995 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15996 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15997 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15998 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15999 "\x95\x16\x20\x09\xf5\x95\x19\xfd"
16000 "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa"
16001 "\x5c\x44\xa9\x37",
16002 .rlen = 128 + 20,
16003 },
16004};
16005
16006#define HMAC_SHA224_DES_CBC_ENC_TEST_VEC 1
16007
16008static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = {
16009 { /*Generated with cryptopp*/
16010#ifdef __LITTLE_ENDIAN
16011 .key = "\x08\x00" /* rta length */
16012 "\x01\x00" /* rta type */
16013#else
16014 .key = "\x00\x08" /* rta length */
16015 "\x00\x01" /* rta type */
16016#endif
16017 "\x00\x00\x00\x08" /* enc key length */
16018 "\x11\x22\x33\x44\x55\x66\x77\x88"
16019 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16020 "\x22\x33\x44\x55\x66\x77\x88\x99"
16021 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16022 .klen = 8 + 24 + 8,
16023 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16024 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16025 .alen = 8,
16026 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16027 "\x53\x20\x63\x65\x65\x72\x73\x74"
16028 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16029 "\x20\x79\x65\x53\x72\x63\x74\x65"
16030 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16031 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16032 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16033 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16034 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16035 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16036 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16037 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16038 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16039 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16040 "\x63\x65\x65\x72\x73\x74\x54\x20"
16041 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16042 .ilen = 128,
16043 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16044 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16045 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16046 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16047 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16048 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16049 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16050 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16051 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16052 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16053 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16054 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16055 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16056 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16057 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16058 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16059 "\x9c\x2d\x7e\xee\x20\x34\x55\x0a"
16060 "\xce\xb5\x4e\x64\x53\xe7\xbf\x91"
16061 "\xab\xd4\xd9\xda\xc9\x12\xae\xf7",
16062 .rlen = 128 + 24,
16063 },
16064};
16065
16066#define HMAC_SHA256_DES_CBC_ENC_TEST_VEC 1
16067
16068static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = {
16069 { /*Generated with cryptopp*/
16070#ifdef __LITTLE_ENDIAN
16071 .key = "\x08\x00" /* rta length */
16072 "\x01\x00" /* rta type */
16073#else
16074 .key = "\x00\x08" /* rta length */
16075 "\x00\x01" /* rta type */
16076#endif
16077 "\x00\x00\x00\x08" /* enc key length */
16078 "\x11\x22\x33\x44\x55\x66\x77\x88"
16079 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16080 "\x22\x33\x44\x55\x66\x77\x88\x99"
16081 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16082 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16083 .klen = 8 + 32 + 8,
16084 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16085 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16086 .alen = 8,
16087 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16088 "\x53\x20\x63\x65\x65\x72\x73\x74"
16089 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16090 "\x20\x79\x65\x53\x72\x63\x74\x65"
16091 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16092 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16093 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16094 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16095 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16096 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16097 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16098 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16099 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16100 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16101 "\x63\x65\x65\x72\x73\x74\x54\x20"
16102 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16103 .ilen = 128,
16104 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16105 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16106 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16107 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16108 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16109 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16110 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16111 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16112 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16113 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16114 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16115 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16116 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16117 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16118 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16119 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16120 "\xc6\x58\xa1\x60\x70\x91\x39\x36"
16121 "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e"
16122 "\xde\x63\xde\x76\x52\xde\x9f\xba"
16123 "\x90\xcf\x15\xf2\xbb\x6e\x84\x00",
16124 .rlen = 128 + 32,
16125 },
16126};
16127
16128#define HMAC_SHA384_DES_CBC_ENC_TEST_VEC 1
16129
16130static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = {
16131 { /*Generated with cryptopp*/
16132#ifdef __LITTLE_ENDIAN
16133 .key = "\x08\x00" /* rta length */
16134 "\x01\x00" /* rta type */
16135#else
16136 .key = "\x00\x08" /* rta length */
16137 "\x00\x01" /* rta type */
16138#endif
16139 "\x00\x00\x00\x08" /* enc key length */
16140 "\x11\x22\x33\x44\x55\x66\x77\x88"
16141 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16142 "\x22\x33\x44\x55\x66\x77\x88\x99"
16143 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16144 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16145 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16146 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16147 .klen = 8 + 48 + 8,
16148 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16149 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16150 .alen = 8,
16151 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16152 "\x53\x20\x63\x65\x65\x72\x73\x74"
16153 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16154 "\x20\x79\x65\x53\x72\x63\x74\x65"
16155 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16156 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16157 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16158 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16159 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16160 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16161 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16162 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16163 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16164 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16165 "\x63\x65\x65\x72\x73\x74\x54\x20"
16166 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16167 .ilen = 128,
16168 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16169 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16170 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16171 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16172 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16173 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16174 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16175 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16176 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16177 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16178 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16179 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16180 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16181 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16182 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16183 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16184 "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0"
16185 "\xc8\x8c\xef\x25\x07\x83\x11\x3a"
16186 "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe"
16187 "\x5e\x67\xb5\x74\xe7\xe7\x85\x61"
16188 "\x6a\x95\x26\x75\xcc\x53\x89\xf3"
16189 "\x74\xc9\x2a\x76\x20\xa2\x64\x62",
16190 .rlen = 128 + 48,
16191 },
16192};
16193
16194#define HMAC_SHA512_DES_CBC_ENC_TEST_VEC 1
16195
16196static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = {
16197 { /*Generated with cryptopp*/
16198#ifdef __LITTLE_ENDIAN
16199 .key = "\x08\x00" /* rta length */
16200 "\x01\x00" /* rta type */
16201#else
16202 .key = "\x00\x08" /* rta length */
16203 "\x00\x01" /* rta type */
16204#endif
16205 "\x00\x00\x00\x08" /* enc key length */
16206 "\x11\x22\x33\x44\x55\x66\x77\x88"
16207 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16208 "\x22\x33\x44\x55\x66\x77\x88\x99"
16209 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16210 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16211 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16212 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16213 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16214 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16215 .klen = 8 + 64 + 8,
16216 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16217 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16218 .alen = 8,
16219 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16220 "\x53\x20\x63\x65\x65\x72\x73\x74"
16221 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16222 "\x20\x79\x65\x53\x72\x63\x74\x65"
16223 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16224 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16225 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16226 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16227 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16228 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16229 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16230 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16231 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16232 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16233 "\x63\x65\x65\x72\x73\x74\x54\x20"
16234 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16235 .ilen = 128,
16236 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16237 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16238 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16239 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16240 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16241 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16242 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16243 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16244 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16245 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16246 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16247 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16248 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16249 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16250 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16251 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16252 "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e"
16253 "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb"
16254 "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb"
16255 "\x58\x83\xda\x67\xfb\x21\x24\xa2"
16256 "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93"
16257 "\x97\xe2\xe3\xb8\xaa\x48\x85\xee"
16258 "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96"
16259 "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b",
16260 .rlen = 128 + 64,
16261 },
16262};
16263
16264#define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC 1
16265
16266static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = {
16267 { /*Generated with cryptopp*/
16268#ifdef __LITTLE_ENDIAN
16269 .key = "\x08\x00" /* rta length */
16270 "\x01\x00" /* rta type */
16271#else
16272 .key = "\x00\x08" /* rta length */
16273 "\x00\x01" /* rta type */
16274#endif
16275 "\x00\x00\x00\x18" /* enc key length */
16276 "\x11\x22\x33\x44\x55\x66\x77\x88"
16277 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16278 "\x22\x33\x44\x55"
16279 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16280 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16281 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16282 .klen = 8 + 20 + 24,
16283 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16284 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16285 .alen = 8,
16286 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16287 "\x53\x20\x63\x65\x65\x72\x73\x74"
16288 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16289 "\x20\x79\x65\x53\x72\x63\x74\x65"
16290 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16291 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16292 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16293 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16294 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16295 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16296 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16297 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16298 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16299 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16300 "\x63\x65\x65\x72\x73\x74\x54\x20"
16301 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16302 .ilen = 128,
16303 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16304 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16305 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16306 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16307 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16308 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16309 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16310 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16311 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16312 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16313 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16314 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16315 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16316 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16317 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16318 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16319 "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6"
16320 "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf"
16321 "\xd1\x60\x91\xb3",
16322 .rlen = 128 + 20,
16323 },
16324};
16325
16326#define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC 1
16327
16328static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = {
16329 { /*Generated with cryptopp*/
16330#ifdef __LITTLE_ENDIAN
16331 .key = "\x08\x00" /* rta length */
16332 "\x01\x00" /* rta type */
16333#else
16334 .key = "\x00\x08" /* rta length */
16335 "\x00\x01" /* rta type */
16336#endif
16337 "\x00\x00\x00\x18" /* enc key length */
16338 "\x11\x22\x33\x44\x55\x66\x77\x88"
16339 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16340 "\x22\x33\x44\x55\x66\x77\x88\x99"
16341 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16342 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16343 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16344 .klen = 8 + 24 + 24,
16345 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16346 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16347 .alen = 8,
16348 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16349 "\x53\x20\x63\x65\x65\x72\x73\x74"
16350 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16351 "\x20\x79\x65\x53\x72\x63\x74\x65"
16352 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16353 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16354 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16355 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16356 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16357 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16358 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16359 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16360 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16361 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16362 "\x63\x65\x65\x72\x73\x74\x54\x20"
16363 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16364 .ilen = 128,
16365 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16366 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16367 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16368 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16369 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16370 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16371 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16372 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16373 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16374 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16375 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16376 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16377 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16378 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16379 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16380 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16381 "\x15\x24\x7f\x5a\x45\x4a\x66\xce"
16382 "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c"
16383 "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0",
16384 .rlen = 128 + 24,
16385 },
16386};
16387
16388#define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC 1
16389
16390static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = {
16391 { /*Generated with cryptopp*/
16392#ifdef __LITTLE_ENDIAN
16393 .key = "\x08\x00" /* rta length */
16394 "\x01\x00" /* rta type */
16395#else
16396 .key = "\x00\x08" /* rta length */
16397 "\x00\x01" /* rta type */
16398#endif
16399 "\x00\x00\x00\x18" /* enc key length */
16400 "\x11\x22\x33\x44\x55\x66\x77\x88"
16401 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16402 "\x22\x33\x44\x55\x66\x77\x88\x99"
16403 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16404 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16405 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16406 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16407 .klen = 8 + 32 + 24,
16408 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16409 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16410 .alen = 8,
16411 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16412 "\x53\x20\x63\x65\x65\x72\x73\x74"
16413 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16414 "\x20\x79\x65\x53\x72\x63\x74\x65"
16415 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16416 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16417 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16418 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16419 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16420 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16421 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16422 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16423 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16424 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16425 "\x63\x65\x65\x72\x73\x74\x54\x20"
16426 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16427 .ilen = 128,
16428 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16429 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16430 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16431 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16432 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16433 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16434 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16435 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16436 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16437 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16438 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16439 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16440 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16441 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16442 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16443 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16444 "\x73\xb0\xea\x9f\xe8\x18\x80\xd6"
16445 "\x56\x38\x44\xc0\xdb\xe3\x4f\x71"
16446 "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f"
16447 "\xca\x43\x95\xdf\x80\x61\x81\xa9",
16448 .rlen = 128 + 32,
16449 },
16450};
16451
16452#define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC 1
16453
16454static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = {
16455 { /*Generated with cryptopp*/
16456#ifdef __LITTLE_ENDIAN
16457 .key = "\x08\x00" /* rta length */
16458 "\x01\x00" /* rta type */
16459#else
16460 .key = "\x00\x08" /* rta length */
16461 "\x00\x01" /* rta type */
16462#endif
16463 "\x00\x00\x00\x18" /* enc key length */
16464 "\x11\x22\x33\x44\x55\x66\x77\x88"
16465 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16466 "\x22\x33\x44\x55\x66\x77\x88\x99"
16467 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16468 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16469 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16470 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16471 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16472 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16473 .klen = 8 + 48 + 24,
16474 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16475 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16476 .alen = 8,
16477 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16478 "\x53\x20\x63\x65\x65\x72\x73\x74"
16479 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16480 "\x20\x79\x65\x53\x72\x63\x74\x65"
16481 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16482 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16483 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16484 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16485 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16486 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16487 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16488 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16489 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16490 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16491 "\x63\x65\x65\x72\x73\x74\x54\x20"
16492 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16493 .ilen = 128,
16494 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16495 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16496 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16497 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16498 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16499 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16500 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16501 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16502 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16503 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16504 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16505 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16506 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16507 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16508 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16509 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16510 "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7"
16511 "\x70\xe7\x93\xbf\x73\xe6\x9f\x83"
16512 "\x99\x62\x23\xe6\x5b\xd0\xda\x18"
16513 "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39"
16514 "\x36\x5d\x13\x2f\x86\x10\x78\xd6"
16515 "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b",
16516 .rlen = 128 + 48,
16517 },
16518};
16519
16520#define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC 1
16521
16522static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = {
16523 { /*Generated with cryptopp*/
16524#ifdef __LITTLE_ENDIAN
16525 .key = "\x08\x00" /* rta length */
16526 "\x01\x00" /* rta type */
16527#else
16528 .key = "\x00\x08" /* rta length */
16529 "\x00\x01" /* rta type */
16530#endif
16531 "\x00\x00\x00\x18" /* enc key length */
16532 "\x11\x22\x33\x44\x55\x66\x77\x88"
16533 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16534 "\x22\x33\x44\x55\x66\x77\x88\x99"
16535 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16536 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16537 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16538 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16539 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16540 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16541 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16542 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16543 .klen = 8 + 64 + 24,
16544 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16545 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16546 .alen = 8,
16547 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16548 "\x53\x20\x63\x65\x65\x72\x73\x74"
16549 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16550 "\x20\x79\x65\x53\x72\x63\x74\x65"
16551 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16552 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16553 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16554 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16555 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16556 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16557 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16558 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16559 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16560 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16561 "\x63\x65\x65\x72\x73\x74\x54\x20"
16562 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16563 .ilen = 128,
16564 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16565 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16566 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16567 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16568 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16569 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16570 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16571 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16572 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16573 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16574 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16575 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16576 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16577 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16578 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16579 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16580 "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32"
16581 "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e"
16582 "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b"
16583 "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60"
16584 "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0"
16585 "\x2a\x74\xd4\x65\x12\xcb\x55\xf2"
16586 "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2"
16587 "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb",
16588 .rlen = 128 + 64,
16589 },
16590};
16591
Herbert Xuda7f0332008-07-31 17:08:25 +080016592static struct cipher_testvec aes_lrw_enc_tv_template[] = {
16593 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16594 { /* LRW-32-AES 1 */
16595 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16596 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16597 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16598 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16599 .klen = 32,
16600 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16601 "\x00\x00\x00\x00\x00\x00\x00\x01",
16602 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16603 "\x38\x39\x41\x42\x43\x44\x45\x46",
16604 .ilen = 16,
16605 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16606 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16607 .rlen = 16,
16608 }, { /* LRW-32-AES 2 */
16609 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16610 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16611 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16612 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16613 .klen = 32,
16614 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16615 "\x00\x00\x00\x00\x00\x00\x00\x02",
16616 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16617 "\x38\x39\x41\x42\x43\x44\x45\x46",
16618 .ilen = 16,
16619 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16620 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16621 .rlen = 16,
16622 }, { /* LRW-32-AES 3 */
16623 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16624 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16625 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16626 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16627 .klen = 32,
16628 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16629 "\x00\x00\x00\x02\x00\x00\x00\x00",
16630 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16631 "\x38\x39\x41\x42\x43\x44\x45\x46",
16632 .ilen = 16,
16633 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16634 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16635 .rlen = 16,
16636 }, { /* LRW-32-AES 4 */
16637 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16638 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16639 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16640 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16641 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16642 .klen = 40,
16643 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16644 "\x00\x00\x00\x00\x00\x00\x00\x01",
16645 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16646 "\x38\x39\x41\x42\x43\x44\x45\x46",
16647 .ilen = 16,
16648 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16649 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16650 .rlen = 16,
16651 }, { /* LRW-32-AES 5 */
16652 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16653 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16654 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16655 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16656 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16657 .klen = 40,
16658 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16659 "\x00\x00\x00\x02\x00\x00\x00\x00",
16660 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16661 "\x38\x39\x41\x42\x43\x44\x45\x46",
16662 .ilen = 16,
16663 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16664 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16665 .rlen = 16,
16666 }, { /* LRW-32-AES 6 */
16667 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16668 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16669 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16670 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16671 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16672 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16673 .klen = 48,
16674 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16675 "\x00\x00\x00\x00\x00\x00\x00\x01",
16676 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16677 "\x38\x39\x41\x42\x43\x44\x45\x46",
16678 .ilen = 16,
16679 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16680 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16681 .rlen = 16,
16682 }, { /* LRW-32-AES 7 */
16683 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16684 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16685 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16686 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16687 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16688 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16689 .klen = 48,
16690 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16691 "\x00\x00\x00\x02\x00\x00\x00\x00",
16692 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16693 "\x38\x39\x41\x42\x43\x44\x45\x46",
16694 .ilen = 16,
16695 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16696 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16697 .rlen = 16,
16698 }, {
16699/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16700 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16701 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16702 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16703 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16704 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16705 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16706 .klen = 48,
16707 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16708 "\x00\x00\x00\x00\x00\x00\x00\x01",
16709 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16710 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16711 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16712 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16713 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16714 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16715 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16716 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16717 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16718 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16719 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16720 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16721 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16722 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16723 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16724 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16725 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16726 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16727 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16728 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16729 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16730 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16731 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16732 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16733 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16734 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16735 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16736 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16737 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16738 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16739 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16740 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16741 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16742 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16743 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16744 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16745 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16746 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16747 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16748 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16749 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16750 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16751 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16752 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16753 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16754 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16755 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16756 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16757 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16758 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16759 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16760 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16761 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16762 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16763 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16764 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16765 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16766 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16767 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16768 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16769 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16770 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16771 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16772 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16773 .ilen = 512,
16774 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16775 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16776 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16777 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16778 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16779 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16780 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16781 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16782 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16783 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16784 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16785 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16786 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16787 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16788 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16789 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16790 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16791 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16792 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16793 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16794 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16795 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16796 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16797 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16798 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16799 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16800 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16801 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16802 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16803 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16804 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16805 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16806 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16807 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16808 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16809 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16810 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16811 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16812 "\xb8\x79\x78\x97\x94\xff\x72\x13"
16813 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16814 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16815 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16816 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
16817 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
16818 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
16819 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
16820 "\x1e\x86\x53\x11\x53\x94\x00\xee"
16821 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
16822 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
16823 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
16824 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
16825 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
16826 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
16827 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
16828 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
16829 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
16830 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
16831 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
16832 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
16833 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
16834 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
16835 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
16836 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
16837 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
16838 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016839 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020016840 .np = 3,
16841 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016842 }
16843};
16844
16845static struct cipher_testvec aes_lrw_dec_tv_template[] = {
16846 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16847 /* same as enc vectors with input and result reversed */
16848 { /* LRW-32-AES 1 */
16849 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16850 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16851 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16852 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16853 .klen = 32,
16854 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16855 "\x00\x00\x00\x00\x00\x00\x00\x01",
16856 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16857 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16858 .ilen = 16,
16859 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16860 "\x38\x39\x41\x42\x43\x44\x45\x46",
16861 .rlen = 16,
16862 }, { /* LRW-32-AES 2 */
16863 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16864 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16865 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16866 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16867 .klen = 32,
16868 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16869 "\x00\x00\x00\x00\x00\x00\x00\x02",
16870 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16871 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16872 .ilen = 16,
16873 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16874 "\x38\x39\x41\x42\x43\x44\x45\x46",
16875 .rlen = 16,
16876 }, { /* LRW-32-AES 3 */
16877 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16878 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16879 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16880 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16881 .klen = 32,
16882 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16883 "\x00\x00\x00\x02\x00\x00\x00\x00",
16884 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16885 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16886 .ilen = 16,
16887 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16888 "\x38\x39\x41\x42\x43\x44\x45\x46",
16889 .rlen = 16,
16890 }, { /* LRW-32-AES 4 */
16891 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16892 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16893 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16894 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16895 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16896 .klen = 40,
16897 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16898 "\x00\x00\x00\x00\x00\x00\x00\x01",
16899 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16900 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16901 .ilen = 16,
16902 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16903 "\x38\x39\x41\x42\x43\x44\x45\x46",
16904 .rlen = 16,
16905 }, { /* LRW-32-AES 5 */
16906 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16907 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16908 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16909 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16910 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16911 .klen = 40,
16912 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16913 "\x00\x00\x00\x02\x00\x00\x00\x00",
16914 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16915 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16916 .ilen = 16,
16917 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16918 "\x38\x39\x41\x42\x43\x44\x45\x46",
16919 .rlen = 16,
16920 }, { /* LRW-32-AES 6 */
16921 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16922 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16923 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16924 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16925 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16926 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16927 .klen = 48,
16928 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16929 "\x00\x00\x00\x00\x00\x00\x00\x01",
16930 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16931 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16932 .ilen = 16,
16933 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16934 "\x38\x39\x41\x42\x43\x44\x45\x46",
16935 .rlen = 16,
16936 }, { /* LRW-32-AES 7 */
16937 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16938 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16939 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16940 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16941 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16942 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16943 .klen = 48,
16944 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16945 "\x00\x00\x00\x02\x00\x00\x00\x00",
16946 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16947 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16948 .ilen = 16,
16949 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16950 "\x38\x39\x41\x42\x43\x44\x45\x46",
16951 .rlen = 16,
16952 }, {
16953/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16954 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16955 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16956 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16957 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16958 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16959 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16960 .klen = 48,
16961 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16962 "\x00\x00\x00\x00\x00\x00\x00\x01",
16963 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16964 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16965 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16966 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16967 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16968 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16969 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16970 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16971 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16972 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16973 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16974 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16975 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16976 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16977 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16978 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16979 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16980 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16981 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16982 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16983 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16984 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16985 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16986 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16987 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16988 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16989 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16990 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16991 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16992 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16993 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16994 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16995 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16996 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16997 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16998 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16999 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
17000 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
17001 "\xb8\x79\x78\x97\x94\xff\x72\x13"
17002 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
17003 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
17004 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
17005 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
17006 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
17007 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
17008 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
17009 "\x1e\x86\x53\x11\x53\x94\x00\xee"
17010 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
17011 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
17012 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
17013 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
17014 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
17015 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
17016 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
17017 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
17018 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
17019 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
17020 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
17021 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
17022 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
17023 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
17024 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
17025 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
17026 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
17027 .ilen = 512,
17028 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
17029 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
17030 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
17031 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
17032 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
17033 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
17034 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
17035 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
17036 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
17037 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
17038 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
17039 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
17040 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
17041 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
17042 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
17043 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
17044 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
17045 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
17046 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
17047 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
17048 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
17049 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
17050 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
17051 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
17052 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
17053 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
17054 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
17055 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
17056 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
17057 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
17058 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
17059 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
17060 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
17061 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
17062 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
17063 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
17064 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
17065 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
17066 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
17067 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
17068 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
17069 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
17070 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
17071 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
17072 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
17073 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
17074 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
17075 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
17076 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
17077 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
17078 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
17079 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
17080 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
17081 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
17082 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
17083 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
17084 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
17085 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
17086 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
17087 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
17088 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
17089 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
17090 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
17091 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
17092 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017093 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017094 .np = 3,
17095 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017096 }
17097};
17098
17099static struct cipher_testvec aes_xts_enc_tv_template[] = {
17100 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17101 { /* XTS-AES 1 */
17102 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17103 "\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 .klen = 32,
17107 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17108 "\x00\x00\x00\x00\x00\x00\x00\x00",
17109 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
17110 "\x00\x00\x00\x00\x00\x00\x00\x00"
17111 "\x00\x00\x00\x00\x00\x00\x00\x00"
17112 "\x00\x00\x00\x00\x00\x00\x00\x00",
17113 .ilen = 32,
17114 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17115 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17116 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17117 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17118 .rlen = 32,
17119 }, { /* XTS-AES 2 */
17120 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17121 "\x11\x11\x11\x11\x11\x11\x11\x11"
17122 "\x22\x22\x22\x22\x22\x22\x22\x22"
17123 "\x22\x22\x22\x22\x22\x22\x22\x22",
17124 .klen = 32,
17125 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17126 "\x00\x00\x00\x00\x00\x00\x00\x00",
17127 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
17128 "\x44\x44\x44\x44\x44\x44\x44\x44"
17129 "\x44\x44\x44\x44\x44\x44\x44\x44"
17130 "\x44\x44\x44\x44\x44\x44\x44\x44",
17131 .ilen = 32,
17132 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17133 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17134 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17135 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17136 .rlen = 32,
17137 }, { /* XTS-AES 3 */
17138 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17139 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17140 "\x22\x22\x22\x22\x22\x22\x22\x22"
17141 "\x22\x22\x22\x22\x22\x22\x22\x22",
17142 .klen = 32,
17143 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17144 "\x00\x00\x00\x00\x00\x00\x00\x00",
17145 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
17146 "\x44\x44\x44\x44\x44\x44\x44\x44"
17147 "\x44\x44\x44\x44\x44\x44\x44\x44"
17148 "\x44\x44\x44\x44\x44\x44\x44\x44",
17149 .ilen = 32,
17150 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17151 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17152 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17153 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17154 .rlen = 32,
17155 }, { /* XTS-AES 4 */
17156 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17157 "\x23\x53\x60\x28\x74\x71\x35\x26"
17158 "\x31\x41\x59\x26\x53\x58\x97\x93"
17159 "\x23\x84\x62\x64\x33\x83\x27\x95",
17160 .klen = 32,
17161 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17162 "\x00\x00\x00\x00\x00\x00\x00\x00",
17163 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17164 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17165 "\x10\x11\x12\x13\x14\x15\x16\x17"
17166 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17167 "\x20\x21\x22\x23\x24\x25\x26\x27"
17168 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17169 "\x30\x31\x32\x33\x34\x35\x36\x37"
17170 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17171 "\x40\x41\x42\x43\x44\x45\x46\x47"
17172 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17173 "\x50\x51\x52\x53\x54\x55\x56\x57"
17174 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17175 "\x60\x61\x62\x63\x64\x65\x66\x67"
17176 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17177 "\x70\x71\x72\x73\x74\x75\x76\x77"
17178 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17179 "\x80\x81\x82\x83\x84\x85\x86\x87"
17180 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17181 "\x90\x91\x92\x93\x94\x95\x96\x97"
17182 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17183 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17184 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17185 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17186 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17187 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17188 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17189 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17190 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17191 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17192 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17193 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17194 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17195 "\x00\x01\x02\x03\x04\x05\x06\x07"
17196 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17197 "\x10\x11\x12\x13\x14\x15\x16\x17"
17198 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17199 "\x20\x21\x22\x23\x24\x25\x26\x27"
17200 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17201 "\x30\x31\x32\x33\x34\x35\x36\x37"
17202 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17203 "\x40\x41\x42\x43\x44\x45\x46\x47"
17204 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17205 "\x50\x51\x52\x53\x54\x55\x56\x57"
17206 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17207 "\x60\x61\x62\x63\x64\x65\x66\x67"
17208 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17209 "\x70\x71\x72\x73\x74\x75\x76\x77"
17210 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17211 "\x80\x81\x82\x83\x84\x85\x86\x87"
17212 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17213 "\x90\x91\x92\x93\x94\x95\x96\x97"
17214 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17215 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17216 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17217 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17218 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17219 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17220 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17221 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17222 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17223 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17224 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17225 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17226 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17227 .ilen = 512,
17228 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17229 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17230 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17231 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17232 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17233 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17234 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17235 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17236 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17237 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17238 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17239 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17240 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17241 "\x22\x97\x61\x46\xae\x20\xce\x84"
17242 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17243 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17244 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17245 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17246 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17247 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17248 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17249 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17250 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17251 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17252 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17253 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17254 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17255 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17256 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17257 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17258 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17259 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17260 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17261 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17262 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17263 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17264 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17265 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17266 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17267 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17268 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17269 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17270 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17271 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17272 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17273 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17274 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17275 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17276 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17277 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17278 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17279 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17280 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17281 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17282 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17283 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17284 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17285 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17286 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17287 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17288 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17289 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17290 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17291 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17292 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017293 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17294 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17295 "\x23\x53\x60\x28\x74\x71\x35\x26"
17296 "\x62\x49\x77\x57\x24\x70\x93\x69"
17297 "\x99\x59\x57\x49\x66\x96\x76\x27"
17298 "\x31\x41\x59\x26\x53\x58\x97\x93"
17299 "\x23\x84\x62\x64\x33\x83\x27\x95"
17300 "\x02\x88\x41\x97\x16\x93\x99\x37"
17301 "\x51\x05\x82\x09\x74\x94\x45\x92",
17302 .klen = 64,
17303 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17304 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017305 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17306 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17307 "\x10\x11\x12\x13\x14\x15\x16\x17"
17308 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17309 "\x20\x21\x22\x23\x24\x25\x26\x27"
17310 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17311 "\x30\x31\x32\x33\x34\x35\x36\x37"
17312 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17313 "\x40\x41\x42\x43\x44\x45\x46\x47"
17314 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17315 "\x50\x51\x52\x53\x54\x55\x56\x57"
17316 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17317 "\x60\x61\x62\x63\x64\x65\x66\x67"
17318 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17319 "\x70\x71\x72\x73\x74\x75\x76\x77"
17320 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17321 "\x80\x81\x82\x83\x84\x85\x86\x87"
17322 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17323 "\x90\x91\x92\x93\x94\x95\x96\x97"
17324 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17325 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17326 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17327 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17328 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17329 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17330 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17331 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17332 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17333 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17334 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17335 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17336 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17337 "\x00\x01\x02\x03\x04\x05\x06\x07"
17338 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17339 "\x10\x11\x12\x13\x14\x15\x16\x17"
17340 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17341 "\x20\x21\x22\x23\x24\x25\x26\x27"
17342 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17343 "\x30\x31\x32\x33\x34\x35\x36\x37"
17344 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17345 "\x40\x41\x42\x43\x44\x45\x46\x47"
17346 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17347 "\x50\x51\x52\x53\x54\x55\x56\x57"
17348 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17349 "\x60\x61\x62\x63\x64\x65\x66\x67"
17350 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17351 "\x70\x71\x72\x73\x74\x75\x76\x77"
17352 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17353 "\x80\x81\x82\x83\x84\x85\x86\x87"
17354 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17355 "\x90\x91\x92\x93\x94\x95\x96\x97"
17356 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17357 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17358 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17359 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17360 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17361 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17362 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17363 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17364 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17365 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17366 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17367 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17368 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17369 .ilen = 512,
17370 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17371 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17372 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17373 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17374 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17375 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17376 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17377 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17378 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17379 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17380 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17381 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17382 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17383 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17384 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17385 "\x00\x02\x08\x87\x89\x14\x29\xca"
17386 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17387 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17388 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17389 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17390 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17391 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17392 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17393 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17394 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17395 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17396 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17397 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17398 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17399 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17400 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17401 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17402 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17403 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17404 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17405 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17406 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17407 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17408 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17409 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17410 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17411 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17412 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17413 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17414 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17415 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17416 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17417 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17418 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17419 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17420 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17421 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17422 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17423 "\x94\x30\x54\xff\x84\x01\x14\x93"
17424 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17425 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17426 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17427 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17428 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17429 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17430 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17431 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17432 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17433 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17434 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017435 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017436 .np = 3,
17437 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017438 }
17439};
17440
17441static struct cipher_testvec aes_xts_dec_tv_template[] = {
17442 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17443 { /* XTS-AES 1 */
17444 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17445 "\x00\x00\x00\x00\x00\x00\x00\x00"
17446 "\x00\x00\x00\x00\x00\x00\x00\x00"
17447 "\x00\x00\x00\x00\x00\x00\x00\x00",
17448 .klen = 32,
17449 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17450 "\x00\x00\x00\x00\x00\x00\x00\x00",
17451 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17452 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17453 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17454 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17455 .ilen = 32,
17456 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
17457 "\x00\x00\x00\x00\x00\x00\x00\x00"
17458 "\x00\x00\x00\x00\x00\x00\x00\x00"
17459 "\x00\x00\x00\x00\x00\x00\x00\x00",
17460 .rlen = 32,
17461 }, { /* XTS-AES 2 */
17462 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17463 "\x11\x11\x11\x11\x11\x11\x11\x11"
17464 "\x22\x22\x22\x22\x22\x22\x22\x22"
17465 "\x22\x22\x22\x22\x22\x22\x22\x22",
17466 .klen = 32,
17467 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17468 "\x00\x00\x00\x00\x00\x00\x00\x00",
17469 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17470 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17471 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17472 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17473 .ilen = 32,
17474 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17475 "\x44\x44\x44\x44\x44\x44\x44\x44"
17476 "\x44\x44\x44\x44\x44\x44\x44\x44"
17477 "\x44\x44\x44\x44\x44\x44\x44\x44",
17478 .rlen = 32,
17479 }, { /* XTS-AES 3 */
17480 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17481 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17482 "\x22\x22\x22\x22\x22\x22\x22\x22"
17483 "\x22\x22\x22\x22\x22\x22\x22\x22",
17484 .klen = 32,
17485 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17486 "\x00\x00\x00\x00\x00\x00\x00\x00",
17487 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17488 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17489 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17490 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17491 .ilen = 32,
17492 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17493 "\x44\x44\x44\x44\x44\x44\x44\x44"
17494 "\x44\x44\x44\x44\x44\x44\x44\x44"
17495 "\x44\x44\x44\x44\x44\x44\x44\x44",
17496 .rlen = 32,
17497 }, { /* XTS-AES 4 */
17498 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17499 "\x23\x53\x60\x28\x74\x71\x35\x26"
17500 "\x31\x41\x59\x26\x53\x58\x97\x93"
17501 "\x23\x84\x62\x64\x33\x83\x27\x95",
17502 .klen = 32,
17503 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17504 "\x00\x00\x00\x00\x00\x00\x00\x00",
17505 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17506 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17507 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17508 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17509 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17510 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17511 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17512 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17513 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17514 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17515 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17516 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17517 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17518 "\x22\x97\x61\x46\xae\x20\xce\x84"
17519 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17520 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17521 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17522 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17523 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17524 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17525 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17526 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17527 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17528 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17529 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17530 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17531 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17532 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17533 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17534 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17535 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17536 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17537 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17538 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17539 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17540 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17541 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17542 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17543 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17544 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17545 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17546 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17547 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17548 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17549 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17550 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17551 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17552 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17553 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17554 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17555 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17556 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17557 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17558 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17559 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17560 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17561 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17562 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17563 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17564 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17565 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17566 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17567 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17568 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17569 .ilen = 512,
17570 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17571 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17572 "\x10\x11\x12\x13\x14\x15\x16\x17"
17573 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17574 "\x20\x21\x22\x23\x24\x25\x26\x27"
17575 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17576 "\x30\x31\x32\x33\x34\x35\x36\x37"
17577 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17578 "\x40\x41\x42\x43\x44\x45\x46\x47"
17579 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17580 "\x50\x51\x52\x53\x54\x55\x56\x57"
17581 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17582 "\x60\x61\x62\x63\x64\x65\x66\x67"
17583 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17584 "\x70\x71\x72\x73\x74\x75\x76\x77"
17585 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17586 "\x80\x81\x82\x83\x84\x85\x86\x87"
17587 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17588 "\x90\x91\x92\x93\x94\x95\x96\x97"
17589 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17590 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17591 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17592 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17593 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17594 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17595 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17596 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17597 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17598 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17599 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17600 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17601 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17602 "\x00\x01\x02\x03\x04\x05\x06\x07"
17603 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17604 "\x10\x11\x12\x13\x14\x15\x16\x17"
17605 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17606 "\x20\x21\x22\x23\x24\x25\x26\x27"
17607 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17608 "\x30\x31\x32\x33\x34\x35\x36\x37"
17609 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17610 "\x40\x41\x42\x43\x44\x45\x46\x47"
17611 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17612 "\x50\x51\x52\x53\x54\x55\x56\x57"
17613 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17614 "\x60\x61\x62\x63\x64\x65\x66\x67"
17615 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17616 "\x70\x71\x72\x73\x74\x75\x76\x77"
17617 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17618 "\x80\x81\x82\x83\x84\x85\x86\x87"
17619 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17620 "\x90\x91\x92\x93\x94\x95\x96\x97"
17621 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17622 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17623 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17624 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17625 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17626 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17627 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17628 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17629 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17630 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17631 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17632 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17633 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17634 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017635 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17636 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17637 "\x23\x53\x60\x28\x74\x71\x35\x26"
17638 "\x62\x49\x77\x57\x24\x70\x93\x69"
17639 "\x99\x59\x57\x49\x66\x96\x76\x27"
17640 "\x31\x41\x59\x26\x53\x58\x97\x93"
17641 "\x23\x84\x62\x64\x33\x83\x27\x95"
17642 "\x02\x88\x41\x97\x16\x93\x99\x37"
17643 "\x51\x05\x82\x09\x74\x94\x45\x92",
17644 .klen = 64,
17645 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17646 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017647 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17648 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17649 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17650 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17651 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17652 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17653 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17654 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17655 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17656 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17657 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17658 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17659 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17660 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17661 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17662 "\x00\x02\x08\x87\x89\x14\x29\xca"
17663 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17664 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17665 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17666 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17667 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17668 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17669 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17670 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17671 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17672 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17673 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17674 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17675 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17676 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17677 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17678 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17679 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17680 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17681 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17682 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17683 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17684 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17685 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17686 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17687 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17688 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17689 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17690 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17691 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17692 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17693 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17694 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17695 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17696 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17697 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17698 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17699 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17700 "\x94\x30\x54\xff\x84\x01\x14\x93"
17701 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17702 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17703 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17704 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17705 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17706 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17707 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17708 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17709 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17710 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17711 .ilen = 512,
17712 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17713 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17714 "\x10\x11\x12\x13\x14\x15\x16\x17"
17715 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17716 "\x20\x21\x22\x23\x24\x25\x26\x27"
17717 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17718 "\x30\x31\x32\x33\x34\x35\x36\x37"
17719 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17720 "\x40\x41\x42\x43\x44\x45\x46\x47"
17721 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17722 "\x50\x51\x52\x53\x54\x55\x56\x57"
17723 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17724 "\x60\x61\x62\x63\x64\x65\x66\x67"
17725 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17726 "\x70\x71\x72\x73\x74\x75\x76\x77"
17727 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17728 "\x80\x81\x82\x83\x84\x85\x86\x87"
17729 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17730 "\x90\x91\x92\x93\x94\x95\x96\x97"
17731 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17732 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17733 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17734 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17735 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17736 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17737 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17738 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17739 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17740 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17741 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17742 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17743 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17744 "\x00\x01\x02\x03\x04\x05\x06\x07"
17745 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17746 "\x10\x11\x12\x13\x14\x15\x16\x17"
17747 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17748 "\x20\x21\x22\x23\x24\x25\x26\x27"
17749 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17750 "\x30\x31\x32\x33\x34\x35\x36\x37"
17751 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17752 "\x40\x41\x42\x43\x44\x45\x46\x47"
17753 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17754 "\x50\x51\x52\x53\x54\x55\x56\x57"
17755 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17756 "\x60\x61\x62\x63\x64\x65\x66\x67"
17757 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17758 "\x70\x71\x72\x73\x74\x75\x76\x77"
17759 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17760 "\x80\x81\x82\x83\x84\x85\x86\x87"
17761 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17762 "\x90\x91\x92\x93\x94\x95\x96\x97"
17763 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17764 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17765 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17766 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17767 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17768 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17769 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17770 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17771 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17772 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17773 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17774 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17775 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17776 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017777 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017778 .np = 3,
17779 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017780 }
17781};
17782
17783
17784static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017785 { /* From NIST Special Publication 800-38A, Appendix F.5 */
17786 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17787 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17788 .klen = 16,
17789 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17790 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17791 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17792 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17793 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17794 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17795 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17796 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17797 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17798 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17799 .ilen = 64,
17800 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
17801 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
17802 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
17803 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
17804 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
17805 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
17806 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
17807 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
17808 .rlen = 64,
17809 }, {
17810 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
17811 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
17812 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
17813 .klen = 24,
17814 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17815 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17816 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17817 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17818 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17819 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17820 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17821 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17822 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17823 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17824 .ilen = 64,
17825 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
17826 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
17827 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
17828 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
17829 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
17830 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
17831 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
17832 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
17833 .rlen = 64,
17834 }, {
17835 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
17836 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
17837 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
17838 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
17839 .klen = 32,
17840 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17841 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17842 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17843 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17844 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17845 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17846 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17847 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17848 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17849 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17850 .ilen = 64,
17851 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
17852 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
17853 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
17854 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
17855 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
17856 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
17857 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
17858 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
17859 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017860 }, { /* Generated with Crypto++ */
17861 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17862 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17863 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17864 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17865 .klen = 32,
17866 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
17867 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
17868 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
17869 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
17870 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
17871 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
17872 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
17873 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
17874 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
17875 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
17876 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
17877 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
17878 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
17879 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
17880 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
17881 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
17882 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
17883 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
17884 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
17885 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
17886 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
17887 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
17888 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
17889 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
17890 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
17891 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
17892 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
17893 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
17894 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
17895 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
17896 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
17897 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
17898 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
17899 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
17900 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
17901 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
17902 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
17903 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
17904 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
17905 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
17906 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
17907 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
17908 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
17909 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
17910 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
17911 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
17912 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
17913 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
17914 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
17915 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
17916 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
17917 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
17918 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
17919 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
17920 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
17921 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
17922 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
17923 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
17924 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
17925 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
17926 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
17927 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
17928 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
17929 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
17930 .ilen = 496,
17931 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
17932 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
17933 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
17934 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
17935 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
17936 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
17937 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
17938 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
17939 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
17940 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
17941 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
17942 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
17943 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
17944 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
17945 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
17946 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
17947 "\x34\x4B\x31\x69\x84\x66\x96\x44"
17948 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
17949 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
17950 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
17951 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
17952 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
17953 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
17954 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
17955 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
17956 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
17957 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
17958 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
17959 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
17960 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
17961 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
17962 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
17963 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
17964 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
17965 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
17966 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
17967 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
17968 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
17969 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
17970 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
17971 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
17972 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
17973 "\x85\x99\x22\xE8\x91\x38\x70\x83"
17974 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
17975 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
17976 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
17977 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
17978 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
17979 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
17980 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
17981 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
17982 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
17983 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
17984 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
17985 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
17986 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
17987 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
17988 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
17989 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
17990 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
17991 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
17992 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
17993 .rlen = 496,
17994 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017995 .np = 3,
17996 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017997 }, { /* Generated with Crypto++ */
17998 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17999 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18000 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18001 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18002 .klen = 32,
18003 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18004 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18005 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18006 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18007 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18008 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18009 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18010 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18011 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18012 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18013 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18014 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18015 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18016 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18017 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18018 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18019 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18020 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18021 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18022 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18023 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18024 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18025 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18026 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18027 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18028 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18029 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18030 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18031 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18032 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18033 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18034 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18035 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18036 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18037 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18038 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18039 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18040 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18041 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18042 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18043 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18044 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18045 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18046 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18047 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18048 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18049 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18050 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18051 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18052 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18053 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18054 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18055 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18056 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18057 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18058 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18059 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18060 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18061 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18062 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18063 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18064 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18065 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18066 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18067 "\x7B\xE4\x4D",
18068 .ilen = 499,
18069 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18070 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18071 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18072 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18073 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18074 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18075 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18076 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18077 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18078 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18079 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18080 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18081 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18082 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18083 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18084 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18085 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18086 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18087 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18088 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18089 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18090 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18091 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18092 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18093 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18094 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18095 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18096 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18097 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18098 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18099 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18100 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18101 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18102 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18103 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18104 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18105 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18106 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18107 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18108 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18109 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18110 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18111 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18112 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18113 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18114 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18115 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18116 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18117 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18118 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18119 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18120 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18121 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18122 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18123 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18124 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18125 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18126 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18127 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18128 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18129 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18130 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18131 "\xFB\xF2\x3F",
18132 .rlen = 499,
18133 .also_non_np = 1,
18134 .np = 2,
18135 .tap = { 499 - 16, 16 },
18136 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018137};
18138
18139static struct cipher_testvec aes_ctr_dec_tv_template[] = {
18140 { /* From NIST Special Publication 800-38A, Appendix F.5 */
18141 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
18142 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
18143 .klen = 16,
18144 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18145 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18146 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
18147 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
18148 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
18149 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
18150 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
18151 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
18152 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
18153 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
18154 .ilen = 64,
18155 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18156 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18157 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18158 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18159 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18160 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18161 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18162 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18163 .rlen = 64,
18164 }, {
18165 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
18166 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
18167 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
18168 .klen = 24,
18169 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18170 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18171 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
18172 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
18173 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
18174 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
18175 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
18176 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
18177 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
18178 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
18179 .ilen = 64,
18180 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18181 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18182 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18183 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18184 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18185 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18186 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18187 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18188 .rlen = 64,
18189 }, {
18190 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
18191 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
18192 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
18193 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
18194 .klen = 32,
18195 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18196 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18197 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
18198 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
18199 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18200 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18201 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18202 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18203 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18204 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18205 .ilen = 64,
18206 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18207 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18208 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18209 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18210 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18211 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18212 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18213 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18214 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018215 }, { /* Generated with Crypto++ */
18216 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18217 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18218 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18219 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18220 .klen = 32,
18221 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18222 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18223 .input = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18224 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18225 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18226 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18227 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18228 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18229 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18230 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18231 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18232 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18233 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18234 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18235 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18236 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18237 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18238 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18239 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18240 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18241 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18242 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18243 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18244 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18245 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18246 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18247 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18248 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18249 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18250 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18251 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18252 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18253 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18254 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18255 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18256 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18257 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18258 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18259 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18260 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18261 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18262 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18263 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18264 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18265 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18266 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18267 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18268 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18269 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18270 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18271 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18272 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18273 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18274 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18275 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18276 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18277 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18278 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18279 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18280 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18281 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18282 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18283 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18284 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18285 .ilen = 496,
18286 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18287 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18288 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18289 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18290 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18291 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18292 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18293 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18294 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18295 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18296 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18297 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18298 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18299 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18300 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18301 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18302 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18303 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18304 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18305 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18306 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18307 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18308 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18309 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18310 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18311 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18312 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18313 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18314 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18315 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18316 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18317 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18318 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18319 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18320 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18321 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18322 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18323 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18324 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18325 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18326 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18327 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18328 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18329 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18330 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18331 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18332 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18333 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18334 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18335 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18336 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18337 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18338 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18339 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18340 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18341 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18342 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18343 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18344 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18345 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18346 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18347 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18348 .rlen = 496,
18349 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018350 .np = 3,
18351 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018352 }, { /* Generated with Crypto++ */
18353 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18354 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18355 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18356 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18357 .klen = 32,
18358 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18359 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18360 .input = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18361 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18362 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18363 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18364 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18365 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18366 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18367 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18368 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18369 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18370 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18371 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18372 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18373 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18374 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18375 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18376 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18377 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18378 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18379 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18380 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18381 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18382 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18383 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18384 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18385 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18386 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18387 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18388 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18389 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18390 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18391 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18392 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18393 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18394 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18395 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18396 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18397 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18398 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18399 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18400 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18401 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18402 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18403 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18404 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18405 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18406 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18407 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18408 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18409 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18410 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18411 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18412 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18413 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18414 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18415 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18416 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18417 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18418 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18419 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18420 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18421 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18422 "\xFB\xF2\x3F",
18423 .ilen = 499,
18424 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18425 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18426 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18427 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18428 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18429 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18430 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18431 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18432 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18433 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18434 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18435 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18436 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18437 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18438 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18439 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18440 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18441 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18442 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18443 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18444 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18445 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18446 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18447 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18448 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18449 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18450 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18451 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18452 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18453 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18454 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18455 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18456 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18457 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18458 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18459 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18460 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18461 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18462 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18463 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18464 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18465 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18466 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18467 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18468 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18469 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18470 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18471 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18472 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18473 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18474 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18475 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18476 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18477 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18478 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18479 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18480 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18481 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18482 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18483 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18484 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18485 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18486 "\x7B\xE4\x4D",
18487 .rlen = 499,
18488 .also_non_np = 1,
18489 .np = 2,
18490 .tap = { 499 - 16, 16 },
18491 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018492};
18493
18494static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080018495 { /* From RFC 3686 */
18496 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
18497 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
18498 "\x00\x00\x00\x30",
18499 .klen = 20,
18500 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18501 .input = "Single block msg",
18502 .ilen = 16,
18503 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
18504 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
18505 .rlen = 16,
18506 }, {
18507 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
18508 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
18509 "\x00\x6c\xb6\xdb",
18510 .klen = 20,
18511 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
18512 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18513 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18514 "\x10\x11\x12\x13\x14\x15\x16\x17"
18515 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18516 .ilen = 32,
18517 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
18518 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
18519 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
18520 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
18521 .rlen = 32,
18522 }, {
18523 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
18524 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
18525 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
18526 "\x00\x00\x00\x48",
18527 .klen = 28,
18528 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
18529 .input = "Single block msg",
18530 .ilen = 16,
18531 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
18532 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
18533 .rlen = 16,
18534 }, {
18535 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
18536 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
18537 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
18538 "\x00\x96\xb0\x3b",
18539 .klen = 28,
18540 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
18541 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18542 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18543 "\x10\x11\x12\x13\x14\x15\x16\x17"
18544 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18545 .ilen = 32,
18546 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
18547 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
18548 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
18549 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
18550 .rlen = 32,
18551 }, {
18552 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
18553 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
18554 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
18555 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
18556 "\x00\x00\x00\x60",
18557 .klen = 36,
18558 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
18559 .input = "Single block msg",
18560 .ilen = 16,
18561 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
18562 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
18563 .rlen = 16,
18564 }, {
18565 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
18566 "\x07\x96\x36\x58\x79\xef\xf8\x86"
18567 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
18568 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
18569 "\x00\xfa\xac\x24",
18570 .klen = 36,
18571 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
18572 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18573 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18574 "\x10\x11\x12\x13\x14\x15\x16\x17"
18575 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18576 .ilen = 32,
18577 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
18578 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
18579 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
18580 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
18581 .rlen = 32,
18582 }, {
18583 // generated using Crypto++
18584 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18585 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18586 "\x10\x11\x12\x13\x14\x15\x16\x17"
18587 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18588 "\x00\x00\x00\x00",
18589 .klen = 32 + 4,
18590 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18591 .input =
18592 "\x00\x01\x02\x03\x04\x05\x06\x07"
18593 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18594 "\x10\x11\x12\x13\x14\x15\x16\x17"
18595 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18596 "\x20\x21\x22\x23\x24\x25\x26\x27"
18597 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18598 "\x30\x31\x32\x33\x34\x35\x36\x37"
18599 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18600 "\x40\x41\x42\x43\x44\x45\x46\x47"
18601 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18602 "\x50\x51\x52\x53\x54\x55\x56\x57"
18603 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18604 "\x60\x61\x62\x63\x64\x65\x66\x67"
18605 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18606 "\x70\x71\x72\x73\x74\x75\x76\x77"
18607 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18608 "\x80\x81\x82\x83\x84\x85\x86\x87"
18609 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18610 "\x90\x91\x92\x93\x94\x95\x96\x97"
18611 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18612 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18613 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18614 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18615 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18616 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18617 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18618 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18619 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18620 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18621 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18622 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18623 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18624 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
18625 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
18626 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
18627 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
18628 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
18629 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
18630 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
18631 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
18632 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
18633 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
18634 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
18635 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
18636 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
18637 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
18638 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
18639 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
18640 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
18641 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
18642 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
18643 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
18644 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
18645 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
18646 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
18647 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
18648 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
18649 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
18650 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
18651 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
18652 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
18653 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
18654 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
18655 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
18656 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
18657 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
18658 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
18659 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
18660 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
18661 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
18662 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
18663 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
18664 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
18665 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
18666 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
18667 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
18668 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
18669 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
18670 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
18671 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
18672 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
18673 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
18674 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
18675 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
18676 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
18677 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
18678 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
18679 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
18680 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
18681 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
18682 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
18683 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
18684 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
18685 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
18686 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
18687 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
18688 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
18689 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
18690 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
18691 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
18692 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
18693 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
18694 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
18695 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
18696 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
18697 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
18698 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
18699 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
18700 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
18701 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
18702 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
18703 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
18704 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
18705 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
18706 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
18707 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
18708 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
18709 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
18710 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
18711 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
18712 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
18713 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
18714 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
18715 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
18716 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
18717 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
18718 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
18719 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
18720 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
18721 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
18722 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
18723 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
18724 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
18725 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
18726 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
18727 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
18728 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
18729 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
18730 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
18731 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
18732 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
18733 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
18734 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
18735 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
18736 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
18737 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
18738 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
18739 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
18740 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
18741 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
18742 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
18743 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
18744 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
18745 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
18746 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
18747 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
18748 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
18749 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
18750 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
18751 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
18752 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
18753 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
18754 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
18755 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
18756 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
18757 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
18758 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
18759 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
18760 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
18761 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
18762 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
18763 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
18764 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
18765 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
18766 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
18767 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
18768 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
18769 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
18770 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
18771 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
18772 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
18773 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
18774 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
18775 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
18776 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
18777 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
18778 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
18779 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
18780 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
18781 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
18782 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
18783 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
18784 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
18785 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
18786 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
18787 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
18788 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
18789 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
18790 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
18791 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
18792 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
18793 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
18794 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
18795 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
18796 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
18797 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
18798 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
18799 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
18800 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
18801 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
18802 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
18803 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
18804 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
18805 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
18806 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
18807 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
18808 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
18809 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
18810 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
18811 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
18812 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
18813 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
18814 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
18815 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
18816 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
18817 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
18818 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
18819 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
18820 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
18821 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
18822 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
18823 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
18824 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
18825 "\x38\x47\x56\x65\x74\x83\x92\xa1"
18826 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
18827 "\x28\x37\x46\x55\x64\x73\x82\x91"
18828 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
18829 "\x18\x27\x36\x45\x54\x63\x72\x81"
18830 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
18831 "\x08\x17\x26\x35\x44\x53\x62\x71"
18832 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
18833 "\xf8\x07\x16\x25\x34\x43\x52\x61"
18834 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
18835 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
18836 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
18837 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
18838 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
18839 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
18840 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
18841 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
18842 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
18843 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
18844 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
18845 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
18846 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
18847 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
18848 "\x00\x11\x22\x33\x44\x55\x66\x77"
18849 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
18850 "\x10\x21\x32\x43\x54\x65\x76\x87"
18851 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
18852 "\x20\x31\x42\x53\x64\x75\x86\x97"
18853 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
18854 "\x30\x41\x52\x63\x74\x85\x96\xa7"
18855 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
18856 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
18857 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
18858 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
18859 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
18860 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
18861 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
18862 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
18863 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
18864 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
18865 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
18866 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
18867 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
18868 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
18869 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
18870 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
18871 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
18872 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
18873 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
18874 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
18875 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
18876 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
18877 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
18878 "\xf0\x01\x12\x23\x34\x45\x56\x67"
18879 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
18880 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
18881 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
18882 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
18883 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
18884 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
18885 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
18886 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
18887 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
18888 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
18889 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
18890 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
18891 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
18892 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
18893 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
18894 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
18895 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
18896 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
18897 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
18898 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
18899 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
18900 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
18901 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
18902 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
18903 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
18904 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
18905 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
18906 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
18907 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
18908 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
18909 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
18910 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
18911 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
18912 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
18913 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
18914 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
18915 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
18916 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
18917 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
18918 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
18919 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
18920 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
18921 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
18922 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
18923 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
18924 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
18925 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
18926 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
18927 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
18928 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
18929 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
18930 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
18931 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
18932 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
18933 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
18934 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
18935 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
18936 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
18937 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
18938 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
18939 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
18940 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
18941 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
18942 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
18943 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
18944 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
18945 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
18946 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
18947 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
18948 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
18949 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
18950 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
18951 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
18952 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
18953 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
18954 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
18955 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
18956 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
18957 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
18958 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
18959 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
18960 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
18961 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
18962 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
18963 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
18964 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
18965 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
18966 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
18967 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
18968 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
18969 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
18970 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
18971 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
18972 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
18973 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
18974 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
18975 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
18976 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
18977 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
18978 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
18979 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
18980 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
18981 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
18982 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
18983 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
18984 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
18985 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
18986 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
18987 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
18988 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
18989 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
18990 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
18991 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
18992 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
18993 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
18994 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
18995 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
18996 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
18997 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
18998 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
18999 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
19000 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
19001 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
19002 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
19003 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
19004 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
19005 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
19006 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
19007 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
19008 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
19009 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
19010 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
19011 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
19012 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
19013 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
19014 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
19015 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
19016 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
19017 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
19018 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
19019 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
19020 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
19021 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
19022 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
19023 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
19024 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
19025 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
19026 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
19027 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
19028 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
19029 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
19030 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
19031 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
19032 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
19033 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
19034 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
19035 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
19036 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
19037 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
19038 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
19039 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
19040 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
19041 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
19042 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
19043 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
19044 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
19045 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
19046 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
19047 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
19048 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
19049 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
19050 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
19051 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
19052 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
19053 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
19054 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
19055 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
19056 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
19057 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
19058 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
19059 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
19060 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
19061 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
19062 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
19063 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
19064 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
19065 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
19066 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
19067 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
19068 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
19069 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
19070 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
19071 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
19072 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
19073 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
19074 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
19075 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
19076 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
19077 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
19078 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
19079 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
19080 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
19081 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
19082 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
19083 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
19084 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
19085 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
19086 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
19087 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
19088 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
19089 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
19090 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
19091 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
19092 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
19093 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
19094 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
19095 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
19096 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
19097 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
19098 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
19099 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
19100 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
19101 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
19102 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
19103 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
19104 "\x00\x21\x42\x63",
19105 .ilen = 4100,
19106 .result =
19107 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
19108 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
19109 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
19110 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
19111 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
19112 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
19113 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
19114 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
19115 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
19116 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
19117 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
19118 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
19119 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
19120 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
19121 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
19122 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
19123 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
19124 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
19125 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
19126 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
19127 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
19128 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
19129 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
19130 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
19131 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
19132 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
19133 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
19134 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
19135 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
19136 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
19137 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
19138 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
19139 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
19140 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
19141 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
19142 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
19143 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
19144 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
19145 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
19146 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
19147 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
19148 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
19149 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
19150 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
19151 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
19152 "\x04\x02\xef\xd3\x44\xde\x76\x31"
19153 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
19154 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
19155 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
19156 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
19157 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
19158 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
19159 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
19160 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
19161 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
19162 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
19163 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
19164 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
19165 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
19166 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
19167 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
19168 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
19169 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
19170 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
19171 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
19172 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
19173 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
19174 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
19175 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
19176 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
19177 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
19178 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
19179 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
19180 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
19181 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
19182 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
19183 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
19184 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
19185 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
19186 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
19187 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
19188 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
19189 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
19190 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
19191 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
19192 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
19193 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
19194 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
19195 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
19196 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
19197 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
19198 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
19199 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
19200 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
19201 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
19202 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
19203 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
19204 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
19205 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
19206 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
19207 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
19208 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
19209 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
19210 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
19211 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
19212 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
19213 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
19214 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
19215 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
19216 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
19217 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
19218 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
19219 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
19220 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
19221 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
19222 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
19223 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
19224 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
19225 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
19226 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
19227 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
19228 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
19229 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
19230 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
19231 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
19232 "\x26\x39\x83\x94\xef\x27\xd8\x53"
19233 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
19234 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
19235 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
19236 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
19237 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
19238 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
19239 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
19240 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
19241 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
19242 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
19243 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
19244 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
19245 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
19246 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
19247 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
19248 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
19249 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
19250 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
19251 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
19252 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
19253 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
19254 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
19255 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
19256 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
19257 "\x35\x12\xe3\x36\x28\x27\x36\x58"
19258 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
19259 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
19260 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
19261 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
19262 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
19263 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
19264 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
19265 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
19266 "\x89\xf3\x78\x35\x44\x62\x78\x72"
19267 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
19268 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
19269 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
19270 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
19271 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
19272 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
19273 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
19274 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
19275 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
19276 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
19277 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
19278 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
19279 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
19280 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
19281 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
19282 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
19283 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
19284 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
19285 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
19286 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
19287 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
19288 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
19289 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
19290 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
19291 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
19292 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
19293 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
19294 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
19295 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
19296 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
19297 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
19298 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
19299 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
19300 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
19301 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
19302 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
19303 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
19304 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
19305 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
19306 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
19307 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
19308 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
19309 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
19310 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
19311 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
19312 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
19313 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
19314 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
19315 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
19316 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
19317 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
19318 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
19319 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
19320 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
19321 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
19322 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
19323 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
19324 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
19325 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
19326 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
19327 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
19328 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
19329 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
19330 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
19331 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
19332 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
19333 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
19334 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
19335 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
19336 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
19337 "\x29\x90\x46\x30\x92\x69\x7d\x13"
19338 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
19339 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
19340 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
19341 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
19342 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
19343 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
19344 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
19345 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
19346 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
19347 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
19348 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
19349 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
19350 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
19351 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
19352 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
19353 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
19354 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
19355 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
19356 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
19357 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
19358 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
19359 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
19360 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
19361 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
19362 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
19363 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
19364 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
19365 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
19366 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
19367 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
19368 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
19369 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
19370 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
19371 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
19372 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
19373 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
19374 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
19375 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
19376 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
19377 "\x73\x02\x3b\x78\x21\x72\x43\x00"
19378 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
19379 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
19380 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
19381 "\x11\x94\x13\x69\x51\x09\x28\xde"
19382 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
19383 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
19384 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
19385 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
19386 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
19387 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
19388 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
19389 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
19390 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
19391 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
19392 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
19393 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
19394 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
19395 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
19396 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
19397 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
19398 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
19399 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
19400 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
19401 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
19402 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
19403 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
19404 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
19405 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
19406 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
19407 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
19408 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
19409 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
19410 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
19411 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
19412 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
19413 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
19414 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
19415 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
19416 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
19417 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
19418 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
19419 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
19420 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
19421 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
19422 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
19423 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
19424 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
19425 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
19426 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
19427 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
19428 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
19429 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
19430 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
19431 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
19432 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
19433 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
19434 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
19435 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
19436 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
19437 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
19438 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
19439 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
19440 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
19441 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
19442 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
19443 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
19444 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
19445 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
19446 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
19447 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
19448 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
19449 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
19450 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
19451 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
19452 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
19453 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
19454 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
19455 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
19456 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
19457 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
19458 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
19459 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
19460 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
19461 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
19462 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
19463 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
19464 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
19465 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
19466 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
19467 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
19468 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
19469 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
19470 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
19471 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
19472 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
19473 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
19474 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
19475 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
19476 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
19477 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
19478 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
19479 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
19480 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
19481 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
19482 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
19483 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
19484 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
19485 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
19486 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
19487 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
19488 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
19489 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
19490 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
19491 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
19492 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
19493 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
19494 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
19495 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
19496 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
19497 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
19498 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
19499 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
19500 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
19501 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
19502 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
19503 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
19504 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
19505 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
19506 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
19507 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
19508 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
19509 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
19510 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
19511 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
19512 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
19513 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
19514 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
19515 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
19516 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
19517 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
19518 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
19519 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
19520 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
19521 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
19522 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
19523 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
19524 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
19525 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
19526 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
19527 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
19528 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
19529 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
19530 "\xae\xed\x39\x88\x42\x11\x3c\xed"
19531 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
19532 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
19533 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
19534 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
19535 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
19536 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
19537 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
19538 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
19539 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
19540 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
19541 "\x34\x17\xde\xba\x47\xf1\x06\x18"
19542 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
19543 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
19544 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
19545 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
19546 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
19547 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
19548 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
19549 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
19550 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
19551 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
19552 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
19553 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
19554 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
19555 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
19556 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
19557 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
19558 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
19559 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
19560 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
19561 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
19562 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
19563 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
19564 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
19565 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
19566 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
19567 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
19568 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
19569 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
19570 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
19571 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
19572 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
19573 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
19574 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
19575 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
19576 "\x74\x56\x58\x40\x02\x37\x52\x2c"
19577 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
19578 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
19579 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
19580 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
19581 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
19582 "\xed\x38\x80\x36\x72\x43\x27\x49"
19583 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
19584 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
19585 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
19586 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
19587 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
19588 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
19589 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
19590 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
19591 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
19592 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
19593 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
19594 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
19595 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
19596 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
19597 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
19598 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
19599 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
19600 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
19601 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
19602 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
19603 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
19604 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
19605 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
19606 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
19607 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
19608 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
19609 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
19610 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
19611 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
19612 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
19613 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
19614 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
19615 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
19616 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
19617 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
19618 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
19619 "\x21\xed\xda\x86",
19620 .rlen = 4100,
19621 .np = 2,
19622 .tap = { 4064, 36 },
19623 },
19624};
19625
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080019626static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080019627 { /* From RFC 3686 */
19628 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
19629 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
19630 "\x00\x00\x00\x30",
19631 .klen = 20,
19632 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19633 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
19634 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
19635 .ilen = 16,
19636 .result = "Single block msg",
19637 .rlen = 16,
19638 }, {
19639 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
19640 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
19641 "\x00\x6c\xb6\xdb",
19642 .klen = 20,
19643 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
19644 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
19645 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
19646 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
19647 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
19648 .ilen = 32,
19649 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19650 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19651 "\x10\x11\x12\x13\x14\x15\x16\x17"
19652 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19653 .rlen = 32,
19654 }, {
19655 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
19656 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
19657 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
19658 "\x00\x00\x00\x48",
19659 .klen = 28,
19660 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
19661 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
19662 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
19663 .ilen = 16,
19664 .result = "Single block msg",
19665 .rlen = 16,
19666 }, {
19667 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
19668 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
19669 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
19670 "\x00\x96\xb0\x3b",
19671 .klen = 28,
19672 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
19673 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
19674 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
19675 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
19676 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
19677 .ilen = 32,
19678 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19679 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19680 "\x10\x11\x12\x13\x14\x15\x16\x17"
19681 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19682 .rlen = 32,
19683 }, {
19684 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
19685 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
19686 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
19687 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
19688 "\x00\x00\x00\x60",
19689 .klen = 36,
19690 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
19691 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
19692 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
19693 .ilen = 16,
19694 .result = "Single block msg",
19695 .rlen = 16,
19696 }, {
19697 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
19698 "\x07\x96\x36\x58\x79\xef\xf8\x86"
19699 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
19700 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
19701 "\x00\xfa\xac\x24",
19702 .klen = 36,
19703 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
19704 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
19705 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
19706 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
19707 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
19708 .ilen = 32,
19709 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19710 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19711 "\x10\x11\x12\x13\x14\x15\x16\x17"
19712 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19713 .rlen = 32,
19714 },
19715};
19716
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100019717static struct cipher_testvec aes_ofb_enc_tv_template[] = {
19718 /* From NIST Special Publication 800-38A, Appendix F.5 */
19719 {
19720 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19721 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19722 .klen = 16,
19723 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19724 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19725 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19726 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19727 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19728 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19729 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19730 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19731 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19732 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19733 .ilen = 64,
19734 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19735 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19736 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19737 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19738 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19739 "\x44\xf7\xa8\x22\x60\xed\xcc"
19740 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19741 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19742 .rlen = 64,
19743 }
19744};
19745
19746static struct cipher_testvec aes_ofb_dec_tv_template[] = {
19747 /* From NIST Special Publication 800-38A, Appendix F.5 */
19748 {
19749 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19750 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19751 .klen = 16,
19752 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19753 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19754 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19755 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19756 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19757 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19758 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19759 "\x44\xf7\xa8\x22\x60\xed\xcc"
19760 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19761 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19762 .ilen = 64,
19763 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19764 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19765 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19766 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19767 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19768 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19769 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19770 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19771 .rlen = 64,
19772 }
19773};
19774
Herbert Xuda7f0332008-07-31 17:08:25 +080019775static struct aead_testvec aes_gcm_enc_tv_template[] = {
19776 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19777 .key = zeroed_string,
19778 .klen = 16,
19779 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
19780 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
19781 .rlen = 16,
19782 }, {
19783 .key = zeroed_string,
19784 .klen = 16,
19785 .input = zeroed_string,
19786 .ilen = 16,
19787 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
19788 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
19789 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
19790 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
19791 .rlen = 32,
19792 }, {
19793 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19794 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19795 .klen = 16,
19796 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19797 "\xde\xca\xf8\x88",
19798 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19799 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19800 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19801 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19802 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19803 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19804 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19805 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19806 .ilen = 64,
19807 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19808 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19809 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19810 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19811 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19812 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19813 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19814 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
19815 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
19816 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
19817 .rlen = 80,
19818 }, {
19819 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19820 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19821 .klen = 16,
19822 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19823 "\xde\xca\xf8\x88",
19824 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19825 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19826 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19827 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19828 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19829 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19830 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19831 "\xba\x63\x7b\x39",
19832 .ilen = 60,
19833 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19834 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19835 "\xab\xad\xda\xd2",
19836 .alen = 20,
19837 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19838 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19839 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19840 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19841 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19842 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19843 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19844 "\x3d\x58\xe0\x91"
19845 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
19846 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
19847 .rlen = 76,
19848 }, {
19849 .key = zeroed_string,
19850 .klen = 24,
19851 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
19852 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
19853 .rlen = 16,
19854 }, {
19855 .key = zeroed_string,
19856 .klen = 24,
19857 .input = zeroed_string,
19858 .ilen = 16,
19859 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
19860 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
19861 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
19862 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
19863 .rlen = 32,
19864 }, {
19865 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19866 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19867 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19868 .klen = 24,
19869 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19870 "\xde\xca\xf8\x88",
19871 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19872 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19873 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19874 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19875 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19876 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19877 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19878 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19879 .ilen = 64,
19880 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19881 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19882 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19883 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19884 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19885 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19886 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19887 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
19888 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
19889 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
19890 .rlen = 80,
19891 }, {
19892 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19893 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19894 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19895 .klen = 24,
19896 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19897 "\xde\xca\xf8\x88",
19898 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19899 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19900 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19901 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19902 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19903 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19904 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19905 "\xba\x63\x7b\x39",
19906 .ilen = 60,
19907 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19908 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19909 "\xab\xad\xda\xd2",
19910 .alen = 20,
19911 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19912 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19913 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19914 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19915 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19916 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19917 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19918 "\xcc\xda\x27\x10"
19919 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
19920 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
19921 .rlen = 76,
19922 .np = 2,
19923 .tap = { 32, 28 },
19924 .anp = 2,
19925 .atap = { 8, 12 }
19926 }, {
19927 .key = zeroed_string,
19928 .klen = 32,
19929 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
19930 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
19931 .rlen = 16,
19932 }
19933};
19934
19935static struct aead_testvec aes_gcm_dec_tv_template[] = {
19936 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19937 .key = zeroed_string,
19938 .klen = 32,
19939 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
19940 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
19941 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
19942 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
19943 .ilen = 32,
19944 .result = zeroed_string,
19945 .rlen = 16,
19946 }, {
19947 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19948 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19949 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19950 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19951 .klen = 32,
19952 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19953 "\xde\xca\xf8\x88",
19954 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
19955 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
19956 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
19957 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
19958 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
19959 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
19960 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
19961 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
19962 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
19963 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
19964 .ilen = 80,
19965 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19966 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19967 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19968 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19969 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19970 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19971 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19972 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19973 .rlen = 64,
19974 }, {
19975 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19976 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19977 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19978 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19979 .klen = 32,
19980 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19981 "\xde\xca\xf8\x88",
19982 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
19983 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
19984 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
19985 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
19986 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
19987 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
19988 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
19989 "\xbc\xc9\xf6\x62"
19990 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
19991 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
19992 .ilen = 76,
19993 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19994 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19995 "\xab\xad\xda\xd2",
19996 .alen = 20,
19997 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19998 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19999 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20000 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20001 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20002 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20003 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20004 "\xba\x63\x7b\x39",
20005 .rlen = 60,
20006 .np = 2,
20007 .tap = { 48, 28 },
20008 .anp = 3,
20009 .atap = { 8, 8, 4 }
20010 }, {
20011 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20012 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20013 .klen = 16,
20014 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20015 "\xde\xca\xf8\x88",
20016 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20017 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20018 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20019 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20020 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20021 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20022 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20023 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
20024 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
20025 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
20026 .ilen = 80,
20027 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20028 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20029 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20030 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20031 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20032 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20033 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20034 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20035 .rlen = 64,
20036 }, {
20037 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20038 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20039 .klen = 16,
20040 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20041 "\xde\xca\xf8\x88",
20042 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20043 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20044 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20045 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20046 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20047 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20048 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20049 "\x3d\x58\xe0\x91"
20050 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
20051 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
20052 .ilen = 76,
20053 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20054 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20055 "\xab\xad\xda\xd2",
20056 .alen = 20,
20057 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20058 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20059 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20060 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20061 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20062 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20063 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20064 "\xba\x63\x7b\x39",
20065 .rlen = 60,
20066 }, {
20067 .key = zeroed_string,
20068 .klen = 24,
20069 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
20070 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
20071 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
20072 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
20073 .ilen = 32,
20074 .result = zeroed_string,
20075 .rlen = 16,
20076 }, {
20077 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20078 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20079 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20080 .klen = 24,
20081 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20082 "\xde\xca\xf8\x88",
20083 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20084 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20085 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20086 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20087 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20088 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20089 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20090 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
20091 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
20092 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
20093 .ilen = 80,
20094 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20095 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20096 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20097 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20098 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20099 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20100 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20101 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20102 .rlen = 64,
20103 }, {
20104 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20105 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20106 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20107 .klen = 24,
20108 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20109 "\xde\xca\xf8\x88",
20110 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20111 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20112 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20113 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20114 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20115 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20116 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20117 "\xcc\xda\x27\x10"
20118 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
20119 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
20120 .ilen = 76,
20121 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20122 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20123 "\xab\xad\xda\xd2",
20124 .alen = 20,
20125 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20126 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20127 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20128 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20129 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20130 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20131 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20132 "\xba\x63\x7b\x39",
20133 .rlen = 60,
20134 }
20135};
20136
Adrian Hoban69435b92010-11-04 15:02:04 -040020137static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
Herbert Xu85375442015-07-09 07:17:25 +080020138 { /* Generated using Crypto++ */
Adrian Hoban69435b92010-11-04 15:02:04 -040020139 .key = zeroed_string,
20140 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020141 .iv = zeroed_string,
20142 .input = zeroed_string,
20143 .ilen = 16,
20144 .assoc = zeroed_string,
20145 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020146 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
Herbert Xu85375442015-07-09 07:17:25 +080020147 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20148 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20149 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
Adrian Hoban69435b92010-11-04 15:02:04 -040020150 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020151 },{
Adrian Hoban69435b92010-11-04 15:02:04 -040020152 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20153 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020154 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020155 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020156 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20157 .input = zeroed_string,
20158 .ilen = 16,
20159 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
20160 "\x00\x00\x00\x00\x00\x00\x00\x01",
20161 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020162 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
Herbert Xu85375442015-07-09 07:17:25 +080020163 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20164 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20165 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
Adrian Hoban69435b92010-11-04 15:02:04 -040020166 .rlen = 32,
20167
Herbert Xu85375442015-07-09 07:17:25 +080020168 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020169 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20170 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020171 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020172 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020173 .iv = zeroed_string,
20174 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20175 "\x01\x01\x01\x01\x01\x01\x01\x01",
20176 .ilen = 16,
20177 .assoc = zeroed_string,
20178 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020179 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020180 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20181 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20182 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
Adrian Hoban69435b92010-11-04 15:02:04 -040020183 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020184 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020185 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20186 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020187 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020188 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020189 .iv = zeroed_string,
20190 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20191 "\x01\x01\x01\x01\x01\x01\x01\x01",
20192 .ilen = 16,
20193 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20194 "\x00\x00\x00\x00\x00\x00\x00\x00",
20195 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020196 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020197 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20198 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20199 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
Adrian Hoban69435b92010-11-04 15:02:04 -040020200 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020201 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020202 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20203 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020204 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020205 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020206 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20207 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20208 "\x01\x01\x01\x01\x01\x01\x01\x01",
20209 .ilen = 16,
20210 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20211 "\x00\x00\x00\x00\x00\x00\x00\x01",
20212 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020213 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020214 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20215 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20216 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
Adrian Hoban69435b92010-11-04 15:02:04 -040020217 .rlen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020218 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020219 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20220 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020221 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020222 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020223 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
20224 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20225 "\x01\x01\x01\x01\x01\x01\x01\x01"
20226 "\x01\x01\x01\x01\x01\x01\x01\x01"
20227 "\x01\x01\x01\x01\x01\x01\x01\x01"
20228 "\x01\x01\x01\x01\x01\x01\x01\x01"
20229 "\x01\x01\x01\x01\x01\x01\x01\x01"
20230 "\x01\x01\x01\x01\x01\x01\x01\x01"
20231 "\x01\x01\x01\x01\x01\x01\x01\x01",
20232 .ilen = 64,
20233 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20234 "\x00\x00\x00\x00\x00\x00\x00\x01",
20235 .alen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020236 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020237 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20238 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20239 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20240 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20241 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20242 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20243 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20244 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20245 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
Adrian Hoban69435b92010-11-04 15:02:04 -040020246 .rlen = 80,
Herbert Xu85375442015-07-09 07:17:25 +080020247 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020248 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20249 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
Herbert Xu85375442015-07-09 07:17:25 +080020250 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020251 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020252 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
20253 .input = "\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 "\xff\xff\xff\xff\xff\xff\xff\xff"
20272 "\xff\xff\xff\xff\xff\xff\xff\xff"
20273 "\xff\xff\xff\xff\xff\xff\xff\xff"
20274 "\xff\xff\xff\xff\xff\xff\xff\xff"
20275 "\xff\xff\xff\xff\xff\xff\xff\xff"
20276 "\xff\xff\xff\xff\xff\xff\xff\xff",
20277 .ilen = 192,
20278 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20279 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
20280 "\x89\xab\xcd\xef",
20281 .alen = 20,
Adrian Hoban69435b92010-11-04 15:02:04 -040020282 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20283 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20284 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20285 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20286 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20287 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20288 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20289 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20290 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20291 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20292 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20293 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20294 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20295 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20296 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20297 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20298 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20299 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20300 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20301 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20302 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20303 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20304 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20305 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20306 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20307 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20308 .rlen = 208,
Herbert Xu8f69b762015-06-16 13:54:26 +080020309 }, { /* From draft-mcgrew-gcm-test-01 */
20310 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20311 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20312 "\x2E\x44\x3B\x68",
20313 .klen = 20,
20314 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20315 .input = "\x45\x00\x00\x48\x69\x9A\x00\x00"
20316 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
20317 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
20318 "\x38\xD3\x01\x00\x00\x01\x00\x00"
20319 "\x00\x00\x00\x00\x04\x5F\x73\x69"
20320 "\x70\x04\x5F\x75\x64\x70\x03\x73"
20321 "\x69\x70\x09\x63\x79\x62\x65\x72"
20322 "\x63\x69\x74\x79\x02\x64\x6B\x00"
20323 "\x00\x21\x00\x01\x01\x02\x02\x01",
20324 .ilen = 72,
20325 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080020326 "\x00\x00\x00\x00\x49\x56\xED\x7E"
20327 "\x3B\x24\x4C\xFE",
20328 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020329 .result = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
20330 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
20331 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
20332 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
20333 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
20334 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
20335 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
20336 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
20337 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
20338 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
20339 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
20340 .rlen = 88,
20341 }, {
20342 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20343 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20344 "\xCA\xFE\xBA\xBE",
20345 .klen = 20,
20346 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20347 .input = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
20348 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
20349 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
20350 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
20351 "\x00\x01\x00\x00\x00\x00\x00\x00"
20352 "\x03\x73\x69\x70\x09\x63\x79\x62"
20353 "\x65\x72\x63\x69\x74\x79\x02\x64"
20354 "\x6B\x00\x00\x01\x00\x01\x00\x01",
20355 .ilen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080020356 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
20357 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20358 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020359 .result = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
20360 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
20361 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
20362 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
20363 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
20364 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
20365 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
20366 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
20367 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
20368 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
20369 .rlen = 80,
20370 }, {
20371 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20372 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20373 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20374 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20375 "\x11\x22\x33\x44",
20376 .klen = 36,
20377 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
20378 .input = "\x45\x00\x00\x30\x69\xA6\x40\x00"
20379 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
20380 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
20381 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
20382 "\x70\x02\x40\x00\x20\xBF\x00\x00"
20383 "\x02\x04\x05\xB4\x01\x01\x04\x02"
20384 "\x01\x02\x02\x01",
20385 .ilen = 52,
Herbert Xu85375442015-07-09 07:17:25 +080020386 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
20387 "\x01\x02\x03\x04\x05\x06\x07\x08",
20388 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020389 .result = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
20390 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
20391 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
20392 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
20393 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
20394 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
20395 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
20396 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
20397 "\x15\x95\x6C\x96",
20398 .rlen = 68,
20399 }, {
20400 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
20401 "\x00\x00\x00\x00\x00\x00\x00\x00"
20402 "\x00\x00\x00\x00",
20403 .klen = 20,
20404 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20405 .input = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
20406 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
20407 "\x01\x01\x01\x01\x08\x00\x07\x5C"
20408 "\x02\x00\x44\x00\x61\x62\x63\x64"
20409 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20410 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20411 "\x75\x76\x77\x61\x62\x63\x64\x65"
20412 "\x66\x67\x68\x69\x01\x02\x02\x01",
20413 .ilen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080020414 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
20415 "\x00\x00\x00\x00\x00\x00\x00\x00",
20416 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020417 .result = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
20418 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
20419 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
20420 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
20421 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
20422 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
20423 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
20424 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
20425 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
20426 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
20427 .rlen = 80,
20428 }, {
20429 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20430 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20431 "\x57\x69\x0E\x43",
20432 .klen = 20,
20433 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20434 .input = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
20435 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
20436 "\x01\x01\x01\x01\x08\x00\x08\x5C"
20437 "\x02\x00\x43\x00\x61\x62\x63\x64"
20438 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20439 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20440 "\x75\x76\x77\x61\x62\x63\x64\x65"
20441 "\x66\x67\x68\x69\x01\x02\x02\x01",
20442 .ilen = 64,
20443 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020444 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20445 "\xA2\xFC\xA1\xA3",
20446 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020447 .result = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
20448 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
20449 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
20450 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
20451 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20452 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20453 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
20454 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
20455 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
20456 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
20457 .rlen = 80,
20458 }, {
20459 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20460 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20461 "\x57\x69\x0E\x43",
20462 .klen = 20,
20463 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20464 .input = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
20465 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
20466 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
20467 "\x01\x02\x02\x01",
20468 .ilen = 28,
20469 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020470 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20471 "\xA2\xFC\xA1\xA3",
20472 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020473 .result = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
20474 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
20475 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
20476 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
20477 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
20478 "\xE7\xD0\x5D\x35",
20479 .rlen = 44,
20480 }, {
20481 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20482 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20483 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20484 "\xCA\xFE\xBA\xBE",
20485 .klen = 28,
20486 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20487 .input = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
20488 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
20489 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
20490 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
20491 "\x50\x10\x16\xD0\x75\x68\x00\x01",
20492 .ilen = 40,
Herbert Xu85375442015-07-09 07:17:25 +080020493 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
20494 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20495 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020496 .result = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
20497 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
20498 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
20499 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
20500 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
20501 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
20502 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
20503 .rlen = 56,
20504 }, {
20505 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20506 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20507 "\xDE\xCA\xF8\x88",
20508 .klen = 20,
20509 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20510 .input = "\x45\x00\x00\x49\x33\xBA\x00\x00"
20511 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
20512 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20513 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
20514 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
20515 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
20516 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
20517 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
20518 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
20519 "\x23\x01\x01\x01",
20520 .ilen = 76,
20521 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080020522 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
20523 "\xCE\xFA\xCE\x74",
20524 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020525 .result = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
20526 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
20527 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
20528 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
20529 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
20530 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
20531 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
20532 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
20533 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
20534 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
20535 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
20536 "\x69\x62\x34\x36",
20537 .rlen = 92,
20538 }, {
20539 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20540 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20541 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20542 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20543 "\x73\x61\x6C\x74",
20544 .klen = 36,
20545 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20546 .input = "\x45\x08\x00\x28\x73\x2C\x00\x00"
20547 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
20548 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
20549 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
20550 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
20551 .ilen = 40,
20552 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080020553 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
20554 "\x69\x76\x65\x63",
20555 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020556 .result = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
20557 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
20558 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
20559 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
20560 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
20561 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
20562 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
20563 .rlen = 56,
20564 }, {
20565 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20566 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20567 "\x57\x69\x0E\x43",
20568 .klen = 20,
20569 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20570 .input = "\x45\x00\x00\x49\x33\x3E\x00\x00"
20571 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
20572 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20573 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
20574 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
20575 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
20576 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
20577 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
20578 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
20579 "\x15\x01\x01\x01",
20580 .ilen = 76,
20581 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020582 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20583 "\xA2\xFC\xA1\xA3",
20584 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020585 .result = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
20586 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
20587 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
20588 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
20589 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
20590 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
20591 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
20592 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
20593 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
20594 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
20595 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
20596 "\x8C\xAA\x81\xE2",
20597 .rlen = 92,
20598 }, {
20599 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20600 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20601 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20602 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20603 "\x73\x61\x6C\x74",
20604 .klen = 36,
20605 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20606 .input = "\x63\x69\x73\x63\x6F\x01\x72\x75"
20607 "\x6C\x65\x73\x01\x74\x68\x65\x01"
20608 "\x6E\x65\x74\x77\x65\x01\x64\x65"
20609 "\x66\x69\x6E\x65\x01\x74\x68\x65"
20610 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
20611 "\x67\x69\x65\x73\x01\x74\x68\x61"
20612 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
20613 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
20614 "\x72\x72\x6F\x77\x01\x02\x02\x01",
20615 .ilen = 72,
20616 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080020617 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
20618 "\x69\x76\x65\x63",
20619 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020620 .result = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
20621 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
20622 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
20623 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
20624 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
20625 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
20626 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
20627 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
20628 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
20629 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
20630 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
20631 .rlen = 88,
20632 }, {
20633 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
20634 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
20635 "\xD9\x66\x42\x67",
20636 .klen = 20,
20637 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
20638 .input = "\x01\x02\x02\x01",
20639 .ilen = 4,
Herbert Xu85375442015-07-09 07:17:25 +080020640 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
20641 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
20642 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020643 .result = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
20644 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
20645 "\x04\xBE\xF2\x70",
20646 .rlen = 20,
20647 }, {
20648 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20649 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20650 "\xDE\xCA\xF8\x88",
20651 .klen = 20,
20652 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20653 .input = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
20654 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
20655 "\x62\x65\x00\x01",
20656 .ilen = 20,
20657 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080020658 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
20659 "\xCE\xFA\xCE\x74",
20660 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020661 .result = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
20662 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
20663 "\x43\x33\x21\x64\x41\x25\x03\x52"
20664 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
20665 "\x43\xAF\x8C\x3E",
20666 .rlen = 36,
20667 }, {
20668 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
20669 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
20670 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
20671 "\x62\x65\x66\x6F\x72\x65\x69\x61"
20672 "\x74\x75\x72\x6E",
20673 .klen = 36,
20674 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
20675 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20676 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20677 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20678 "\x02\x00\x07\x00\x61\x62\x63\x64"
20679 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20680 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20681 "\x01\x02\x02\x01",
20682 .ilen = 52,
20683 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
Herbert Xu85375442015-07-09 07:17:25 +080020684 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
20685 "\x67\x65\x74\x6D",
20686 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020687 .result = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
20688 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
20689 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
20690 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
20691 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
20692 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
20693 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
20694 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
20695 "\x9F\xB4\xC0\x53",
20696 .rlen = 68,
20697 }, {
20698 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20699 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20700 "\x57\x69\x0E\x43",
20701 .klen = 20,
20702 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20703 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20704 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20705 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20706 "\x02\x00\x07\x00\x61\x62\x63\x64"
20707 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20708 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20709 "\x01\x02\x02\x01",
20710 .ilen = 52,
20711 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080020712 "\x10\x10\x10\x10\x4E\x28\x00\x00"
20713 "\xA2\xFC\xA1\xA3",
20714 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020715 .result = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
20716 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
20717 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
20718 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
20719 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20720 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20721 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
20722 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
20723 "\x40\xD7\xCB\x05",
20724 .rlen = 68,
20725 }, {
20726 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20727 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20728 "\x22\x43\x3C\x64",
20729 .klen = 20,
20730 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
20731 .input = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
20732 "\x61\x62\x63\x64\x65\x66\x67\x68"
20733 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
20734 "\x71\x72\x73\x74\x01\x02\x02\x01",
20735 .ilen = 32,
20736 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080020737 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
20738 "\x3A\x23\x4B\xFD",
20739 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020740 .result = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
20741 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
20742 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
20743 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
20744 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
20745 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
20746 .rlen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040020747 }
20748};
20749
20750static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
Herbert Xu85375442015-07-09 07:17:25 +080020751 { /* Generated using Crypto++ */
Adrian Hoban69435b92010-11-04 15:02:04 -040020752 .key = zeroed_string,
20753 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020754 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040020755 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
Herbert Xu85375442015-07-09 07:17:25 +080020756 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20757 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20758 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
Adrian Hoban69435b92010-11-04 15:02:04 -040020759 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020760 .assoc = zeroed_string,
20761 .alen = 16,
20762 .result = zeroed_string,
20763 .rlen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020764
Herbert Xu85375442015-07-09 07:17:25 +080020765 },{
Adrian Hoban69435b92010-11-04 15:02:04 -040020766 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20767 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020768 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020769 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020770 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040020771 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
Herbert Xu85375442015-07-09 07:17:25 +080020772 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20773 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20774 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
Adrian Hoban69435b92010-11-04 15:02:04 -040020775 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020776 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x00"
20777 "\x00\x00\x00\x00\x00\x00\x00\x01",
20778 .alen = 16,
20779 .result = zeroed_string,
20780 .rlen = 16,
20781 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020782 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20783 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020784 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020785 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020786 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040020787 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020788 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20789 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20790 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
Adrian Hoban69435b92010-11-04 15:02:04 -040020791 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020792 .assoc = zeroed_string,
20793 .alen = 16,
20794 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20795 "\x01\x01\x01\x01\x01\x01\x01\x01",
20796 .rlen = 16,
20797 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020798 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20799 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020800 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020801 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020802 .iv = zeroed_string,
Adrian Hoban69435b92010-11-04 15:02:04 -040020803 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
Herbert Xu85375442015-07-09 07:17:25 +080020804 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20805 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20806 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
Adrian Hoban69435b92010-11-04 15:02:04 -040020807 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020808 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20809 "\x00\x00\x00\x00\x00\x00\x00\x00",
20810 .alen = 16,
20811 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20812 "\x01\x01\x01\x01\x01\x01\x01\x01",
20813 .rlen = 16,
Adrian Hoban69435b92010-11-04 15:02:04 -040020814
Herbert Xu85375442015-07-09 07:17:25 +080020815 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020816 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20817 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020818 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020819 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020820 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040020821 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020822 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20823 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20824 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
Adrian Hoban69435b92010-11-04 15:02:04 -040020825 .ilen = 32,
Herbert Xu85375442015-07-09 07:17:25 +080020826 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20827 "\x00\x00\x00\x00\x00\x00\x00\x01",
20828 .alen = 16,
20829 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20830 "\x01\x01\x01\x01\x01\x01\x01\x01",
20831 .rlen = 16,
20832 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020833 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20834 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
Herbert Xu85375442015-07-09 07:17:25 +080020835 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020836 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020837 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01",
Adrian Hoban69435b92010-11-04 15:02:04 -040020838 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
Herbert Xu85375442015-07-09 07:17:25 +080020839 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20840 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20841 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20842 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20843 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20844 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20845 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20846 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20847 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
Adrian Hoban69435b92010-11-04 15:02:04 -040020848 .ilen = 80,
Herbert Xu85375442015-07-09 07:17:25 +080020849 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01"
20850 "\x00\x00\x00\x00\x00\x00\x00\x01",
20851 .alen = 16,
20852 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20853 "\x01\x01\x01\x01\x01\x01\x01\x01"
20854 "\x01\x01\x01\x01\x01\x01\x01\x01"
20855 "\x01\x01\x01\x01\x01\x01\x01\x01"
20856 "\x01\x01\x01\x01\x01\x01\x01\x01"
20857 "\x01\x01\x01\x01\x01\x01\x01\x01"
20858 "\x01\x01\x01\x01\x01\x01\x01\x01"
20859 "\x01\x01\x01\x01\x01\x01\x01\x01",
20860 .rlen = 64,
20861 }, {
Adrian Hoban69435b92010-11-04 15:02:04 -040020862 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20863 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
Herbert Xu85375442015-07-09 07:17:25 +080020864 "\x00\x00\x00\x00",
Adrian Hoban69435b92010-11-04 15:02:04 -040020865 .klen = 20,
Herbert Xu85375442015-07-09 07:17:25 +080020866 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef",
Adrian Hoban69435b92010-11-04 15:02:04 -040020867 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20868 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20869 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20870 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20871 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20872 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20873 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20874 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20875 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20876 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20877 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20878 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20879 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20880 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20881 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20882 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20883 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20884 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20885 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20886 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20887 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20888 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20889 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20890 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20891 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20892 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20893 .ilen = 208,
Herbert Xu85375442015-07-09 07:17:25 +080020894 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20895 "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
20896 "\x89\xab\xcd\xef",
20897 .alen = 20,
20898 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
20899 "\xff\xff\xff\xff\xff\xff\xff\xff"
20900 "\xff\xff\xff\xff\xff\xff\xff\xff"
20901 "\xff\xff\xff\xff\xff\xff\xff\xff"
20902 "\xff\xff\xff\xff\xff\xff\xff\xff"
20903 "\xff\xff\xff\xff\xff\xff\xff\xff"
20904 "\xff\xff\xff\xff\xff\xff\xff\xff"
20905 "\xff\xff\xff\xff\xff\xff\xff\xff"
20906 "\xff\xff\xff\xff\xff\xff\xff\xff"
20907 "\xff\xff\xff\xff\xff\xff\xff\xff"
20908 "\xff\xff\xff\xff\xff\xff\xff\xff"
20909 "\xff\xff\xff\xff\xff\xff\xff\xff"
20910 "\xff\xff\xff\xff\xff\xff\xff\xff"
20911 "\xff\xff\xff\xff\xff\xff\xff\xff"
20912 "\xff\xff\xff\xff\xff\xff\xff\xff"
20913 "\xff\xff\xff\xff\xff\xff\xff\xff"
20914 "\xff\xff\xff\xff\xff\xff\xff\xff"
20915 "\xff\xff\xff\xff\xff\xff\xff\xff"
20916 "\xff\xff\xff\xff\xff\xff\xff\xff"
20917 "\xff\xff\xff\xff\xff\xff\xff\xff"
20918 "\xff\xff\xff\xff\xff\xff\xff\xff"
20919 "\xff\xff\xff\xff\xff\xff\xff\xff"
20920 "\xff\xff\xff\xff\xff\xff\xff\xff"
20921 "\xff\xff\xff\xff\xff\xff\xff\xff",
20922 .rlen = 192,
Herbert Xu8f69b762015-06-16 13:54:26 +080020923 }, {
20924 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20925 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20926 "\x2E\x44\x3B\x68",
20927 .klen = 20,
20928 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20929 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
20930 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
20931 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
20932 "\x38\xD3\x01\x00\x00\x01\x00\x00"
20933 "\x00\x00\x00\x00\x04\x5F\x73\x69"
20934 "\x70\x04\x5F\x75\x64\x70\x03\x73"
20935 "\x69\x70\x09\x63\x79\x62\x65\x72"
20936 "\x63\x69\x74\x79\x02\x64\x6B\x00"
20937 "\x00\x21\x00\x01\x01\x02\x02\x01",
20938 .rlen = 72,
20939 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080020940 "\x00\x00\x00\x00\x49\x56\xED\x7E"
20941 "\x3B\x24\x4C\xFE",
20942 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080020943 .input = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
20944 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
20945 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
20946 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
20947 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
20948 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
20949 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
20950 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
20951 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
20952 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
20953 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
20954 .ilen = 88,
20955 }, {
20956 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20957 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20958 "\xCA\xFE\xBA\xBE",
20959 .klen = 20,
20960 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20961 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
20962 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
20963 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
20964 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
20965 "\x00\x01\x00\x00\x00\x00\x00\x00"
20966 "\x03\x73\x69\x70\x09\x63\x79\x62"
20967 "\x65\x72\x63\x69\x74\x79\x02\x64"
20968 "\x6B\x00\x00\x01\x00\x01\x00\x01",
20969 .rlen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080020970 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
20971 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20972 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080020973 .input = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
20974 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
20975 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
20976 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
20977 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
20978 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
20979 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
20980 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
20981 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
20982 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
20983 .ilen = 80,
20984 }, {
20985 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20986 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20987 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20988 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20989 "\x11\x22\x33\x44",
20990 .klen = 36,
20991 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
20992 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
20993 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
20994 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
20995 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
20996 "\x70\x02\x40\x00\x20\xBF\x00\x00"
20997 "\x02\x04\x05\xB4\x01\x01\x04\x02"
20998 "\x01\x02\x02\x01",
20999 .rlen = 52,
Herbert Xu85375442015-07-09 07:17:25 +080021000 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
21001 "\x01\x02\x03\x04\x05\x06\x07\x08",
21002 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021003 .input = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
21004 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
21005 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
21006 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
21007 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
21008 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
21009 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
21010 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
21011 "\x15\x95\x6C\x96",
21012 .ilen = 68,
21013 }, {
21014 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
21015 "\x00\x00\x00\x00\x00\x00\x00\x00"
21016 "\x00\x00\x00\x00",
21017 .klen = 20,
21018 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
21019 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
21020 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
21021 "\x01\x01\x01\x01\x08\x00\x07\x5C"
21022 "\x02\x00\x44\x00\x61\x62\x63\x64"
21023 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21024 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21025 "\x75\x76\x77\x61\x62\x63\x64\x65"
21026 "\x66\x67\x68\x69\x01\x02\x02\x01",
21027 .rlen = 64,
Herbert Xu85375442015-07-09 07:17:25 +080021028 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01"
21029 "\x00\x00\x00\x00\x00\x00\x00\x00",
21030 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021031 .input = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
21032 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
21033 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
21034 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
21035 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
21036 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
21037 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
21038 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
21039 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
21040 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
21041 .ilen = 80,
21042 }, {
21043 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21044 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21045 "\x57\x69\x0E\x43",
21046 .klen = 20,
21047 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21048 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
21049 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
21050 "\x01\x01\x01\x01\x08\x00\x08\x5C"
21051 "\x02\x00\x43\x00\x61\x62\x63\x64"
21052 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21053 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21054 "\x75\x76\x77\x61\x62\x63\x64\x65"
21055 "\x66\x67\x68\x69\x01\x02\x02\x01",
21056 .rlen = 64,
21057 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021058 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21059 "\xA2\xFC\xA1\xA3",
21060 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021061 .input = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
21062 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
21063 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
21064 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
21065 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21066 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21067 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
21068 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
21069 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
21070 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
21071 .ilen = 80,
21072 }, {
21073 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21074 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21075 "\x57\x69\x0E\x43",
21076 .klen = 20,
21077 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21078 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
21079 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
21080 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
21081 "\x01\x02\x02\x01",
21082 .rlen = 28,
21083 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021084 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21085 "\xA2\xFC\xA1\xA3",
21086 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021087 .input = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
21088 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
21089 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
21090 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
21091 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
21092 "\xE7\xD0\x5D\x35",
21093 .ilen = 44,
21094 }, {
21095 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21096 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21097 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21098 "\xCA\xFE\xBA\xBE",
21099 .klen = 28,
21100 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21101 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
21102 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
21103 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
21104 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
21105 "\x50\x10\x16\xD0\x75\x68\x00\x01",
21106 .rlen = 40,
Herbert Xu85375442015-07-09 07:17:25 +080021107 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
21108 "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21109 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021110 .input = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
21111 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
21112 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
21113 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
21114 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
21115 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
21116 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
21117 .ilen = 56,
21118 }, {
21119 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21120 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21121 "\xDE\xCA\xF8\x88",
21122 .klen = 20,
21123 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21124 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
21125 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
21126 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21127 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
21128 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
21129 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
21130 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
21131 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
21132 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
21133 "\x23\x01\x01\x01",
21134 .rlen = 76,
21135 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080021136 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21137 "\xCE\xFA\xCE\x74",
21138 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021139 .input = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
21140 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
21141 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
21142 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
21143 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
21144 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
21145 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
21146 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
21147 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
21148 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
21149 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
21150 "\x69\x62\x34\x36",
21151 .ilen = 92,
21152 }, {
21153 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21154 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21155 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21156 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21157 "\x73\x61\x6C\x74",
21158 .klen = 36,
21159 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21160 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
21161 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
21162 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
21163 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
21164 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
21165 .rlen = 40,
21166 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080021167 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21168 "\x69\x76\x65\x63",
21169 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021170 .input = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
21171 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
21172 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
21173 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
21174 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
21175 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
21176 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
21177 .ilen = 56,
21178 }, {
21179 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21180 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21181 "\x57\x69\x0E\x43",
21182 .klen = 20,
21183 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21184 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
21185 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
21186 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21187 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
21188 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
21189 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
21190 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
21191 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
21192 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
21193 "\x15\x01\x01\x01",
21194 .rlen = 76,
21195 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021196 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21197 "\xA2\xFC\xA1\xA3",
21198 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021199 .input = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
21200 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
21201 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
21202 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
21203 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
21204 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
21205 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
21206 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
21207 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
21208 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
21209 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
21210 "\x8C\xAA\x81\xE2",
21211 .ilen = 92,
21212 }, {
21213 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21214 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21215 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21216 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21217 "\x73\x61\x6C\x74",
21218 .klen = 36,
21219 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21220 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
21221 "\x6C\x65\x73\x01\x74\x68\x65\x01"
21222 "\x6E\x65\x74\x77\x65\x01\x64\x65"
21223 "\x66\x69\x6E\x65\x01\x74\x68\x65"
21224 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
21225 "\x67\x69\x65\x73\x01\x74\x68\x61"
21226 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
21227 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
21228 "\x72\x72\x6F\x77\x01\x02\x02\x01",
21229 .rlen = 72,
21230 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
Herbert Xu85375442015-07-09 07:17:25 +080021231 "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21232 "\x69\x76\x65\x63",
21233 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021234 .input = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
21235 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
21236 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
21237 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
21238 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
21239 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
21240 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
21241 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
21242 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
21243 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
21244 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
21245 .ilen = 88,
21246 }, {
21247 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
21248 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
21249 "\xD9\x66\x42\x67",
21250 .klen = 20,
21251 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21252 .result = "\x01\x02\x02\x01",
21253 .rlen = 4,
Herbert Xu85375442015-07-09 07:17:25 +080021254 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
21255 "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21256 .alen = 16,
Herbert Xu8f69b762015-06-16 13:54:26 +080021257 .input = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
21258 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
21259 "\x04\xBE\xF2\x70",
21260 .ilen = 20,
21261 }, {
21262 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21263 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21264 "\xDE\xCA\xF8\x88",
21265 .klen = 20,
21266 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21267 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
21268 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
21269 "\x62\x65\x00\x01",
21270 .rlen = 20,
21271 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
Herbert Xu85375442015-07-09 07:17:25 +080021272 "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21273 "\xCE\xFA\xCE\x74",
21274 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021275 .input = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
21276 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
21277 "\x43\x33\x21\x64\x41\x25\x03\x52"
21278 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
21279 "\x43\xAF\x8C\x3E",
21280 .ilen = 36,
21281 }, {
21282 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
21283 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
21284 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
21285 "\x62\x65\x66\x6F\x72\x65\x69\x61"
21286 "\x74\x75\x72\x6E",
21287 .klen = 36,
21288 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
21289 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21290 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21291 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21292 "\x02\x00\x07\x00\x61\x62\x63\x64"
21293 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21294 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21295 "\x01\x02\x02\x01",
21296 .rlen = 52,
21297 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
Herbert Xu85375442015-07-09 07:17:25 +080021298 "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
21299 "\x67\x65\x74\x6D",
21300 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021301 .input = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
21302 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
21303 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
21304 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
21305 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
21306 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
21307 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
21308 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
21309 "\x9F\xB4\xC0\x53",
21310 .ilen = 68,
21311 }, {
21312 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21313 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21314 "\x57\x69\x0E\x43",
21315 .klen = 20,
21316 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21317 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21318 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21319 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21320 "\x02\x00\x07\x00\x61\x62\x63\x64"
21321 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21322 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21323 "\x01\x02\x02\x01",
21324 .rlen = 52,
21325 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
Herbert Xu85375442015-07-09 07:17:25 +080021326 "\x10\x10\x10\x10\x4E\x28\x00\x00"
21327 "\xA2\xFC\xA1\xA3",
21328 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021329 .input = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
21330 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
21331 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
21332 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
21333 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21334 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21335 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
21336 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
21337 "\x40\xD7\xCB\x05",
21338 .ilen = 68,
21339 }, {
21340 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21341 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21342 "\x22\x43\x3C\x64",
21343 .klen = 20,
21344 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
21345 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
21346 "\x61\x62\x63\x64\x65\x66\x67\x68"
21347 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
21348 "\x71\x72\x73\x74\x01\x02\x02\x01",
21349 .rlen = 32,
21350 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
Herbert Xu85375442015-07-09 07:17:25 +080021351 "\x00\x00\x00\x07\x48\x55\xEC\x7D"
21352 "\x3A\x23\x4B\xFD",
21353 .alen = 20,
Herbert Xu8f69b762015-06-16 13:54:26 +080021354 .input = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
21355 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
21356 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
21357 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
21358 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
21359 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
21360 .ilen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040021361 }
21362};
21363
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021364static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = {
21365 { /* From draft-mcgrew-gcm-test-01 */
21366 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21367 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21368 "\x22\x43\x3c\x64",
21369 .klen = 20,
21370 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021371 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21372 "\x00\x00\x00\x00\x00\x00\x00\x00",
21373 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021374 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21375 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21376 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21377 "\x02\x00\x07\x00\x61\x62\x63\x64"
21378 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21379 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21380 "\x01\x02\x02\x01",
21381 .ilen = 52,
21382 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21383 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21384 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21385 "\x02\x00\x07\x00\x61\x62\x63\x64"
21386 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21387 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21388 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21389 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21390 "\xe4\x09\x9a\xaa",
21391 .rlen = 68,
21392 }
21393};
21394
21395static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = {
21396 { /* From draft-mcgrew-gcm-test-01 */
21397 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21398 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21399 "\x22\x43\x3c\x64",
21400 .klen = 20,
21401 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021402 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21403 "\x00\x00\x00\x00\x00\x00\x00\x00",
21404 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021405 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21406 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21407 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21408 "\x02\x00\x07\x00\x61\x62\x63\x64"
21409 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21410 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21411 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21412 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21413 "\xe4\x09\x9a\xaa",
21414 .ilen = 68,
21415 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21416 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21417 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21418 "\x02\x00\x07\x00\x61\x62\x63\x64"
21419 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21420 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21421 "\x01\x02\x02\x01",
21422 .rlen = 52,
21423 }, { /* nearly same as previous, but should fail */
21424 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21425 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21426 "\x22\x43\x3c\x64",
21427 .klen = 20,
21428 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021429 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21430 "\x00\x00\x00\x00\x00\x00\x00\x00",
21431 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021432 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21433 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21434 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21435 "\x02\x00\x07\x00\x61\x62\x63\x64"
21436 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21437 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21438 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21439 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21440 "\x00\x00\x00\x00",
21441 .ilen = 68,
21442 .novrfy = 1,
21443 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21444 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21445 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21446 "\x02\x00\x07\x00\x61\x62\x63\x64"
21447 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21448 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21449 "\x01\x02\x02\x01",
21450 .rlen = 52,
21451 },
21452};
21453
Herbert Xuda7f0332008-07-31 17:08:25 +080021454static struct aead_testvec aes_ccm_enc_tv_template[] = {
21455 { /* From RFC 3610 */
21456 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21457 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21458 .klen = 16,
21459 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21460 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21461 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21462 .alen = 8,
21463 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21464 "\x10\x11\x12\x13\x14\x15\x16\x17"
21465 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21466 .ilen = 23,
21467 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21468 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21469 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21470 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21471 .rlen = 31,
21472 }, {
21473 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21474 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21475 .klen = 16,
21476 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
21477 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21478 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21479 "\x08\x09\x0a\x0b",
21480 .alen = 12,
21481 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21482 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21483 "\x1c\x1d\x1e\x1f",
21484 .ilen = 20,
21485 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21486 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21487 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21488 "\x7d\x9c\x2d\x93",
21489 .rlen = 28,
21490 }, {
21491 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21492 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21493 .klen = 16,
21494 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21495 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21496 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21497 .alen = 8,
21498 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21499 "\x10\x11\x12\x13\x14\x15\x16\x17"
21500 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21501 "\x20",
21502 .ilen = 25,
21503 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21504 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21505 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21506 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21507 "\x7e\x5f\x4e",
21508 .rlen = 35,
21509 }, {
21510 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21511 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21512 .klen = 16,
21513 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21514 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21515 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21516 "\x08\x09\x0a\x0b",
21517 .alen = 12,
21518 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21519 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21520 "\x1c\x1d\x1e",
21521 .ilen = 19,
21522 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
21523 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21524 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21525 "\x4d\x99\x99\x88\xdd",
21526 .rlen = 29,
21527 }, {
21528 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21529 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21530 .klen = 16,
21531 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21532 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21533 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21534 .alen = 8,
21535 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21536 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21537 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21538 .ilen = 24,
21539 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21540 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21541 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21542 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21543 .rlen = 32,
21544 }, {
21545 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21546 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21547 .klen = 16,
21548 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21549 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21550 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21551 "\x20\xea\x60\xc0",
21552 .alen = 12,
21553 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21554 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21555 "\x3a\x80\x3b\xa8\x7f",
21556 .ilen = 21,
21557 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21558 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21559 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21560 "\x5a\xe0\x70\x45\x51",
21561 .rlen = 29,
21562 }, {
21563 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21564 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21565 .klen = 16,
21566 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21567 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21568 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21569 .alen = 8,
21570 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21571 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21572 "\x98\x09\xd6\x7d\xbe\xdd\x18",
21573 .ilen = 23,
21574 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21575 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21576 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21577 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21578 "\xba",
21579 .rlen = 33,
Ard Biesheuvel45859882014-04-16 20:40:04 +080021580 }, {
21581 /*
21582 * This is the same vector as aes_ccm_rfc4309_enc_tv_template[0]
21583 * below but rewritten to use the ccm algorithm directly.
21584 */
21585 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
21586 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e",
21587 .klen = 16,
21588 .iv = "\x03\x96\xac\x59\x30\x07\xa1\xe2\xa2\xc7\x55\x24\0\0\0\0",
21589 .alen = 0,
21590 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
21591 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
21592 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
21593 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
21594 .ilen = 32,
21595 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
21596 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
21597 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
21598 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
21599 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
21600 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
21601 .rlen = 48,
21602 }
Herbert Xuda7f0332008-07-31 17:08:25 +080021603};
21604
21605static struct aead_testvec aes_ccm_dec_tv_template[] = {
21606 { /* From RFC 3610 */
21607 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21608 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21609 .klen = 16,
21610 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21611 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21612 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21613 .alen = 8,
21614 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21615 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21616 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21617 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21618 .ilen = 31,
21619 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21620 "\x10\x11\x12\x13\x14\x15\x16\x17"
21621 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21622 .rlen = 23,
21623 }, {
21624 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21625 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21626 .klen = 16,
21627 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
21628 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21629 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21630 "\x08\x09\x0a\x0b",
21631 .alen = 12,
21632 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21633 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21634 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21635 "\x7d\x9c\x2d\x93",
21636 .ilen = 28,
21637 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21638 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21639 "\x1c\x1d\x1e\x1f",
21640 .rlen = 20,
21641 }, {
21642 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21643 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21644 .klen = 16,
21645 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21646 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21647 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21648 .alen = 8,
21649 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21650 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21651 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21652 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21653 "\x7e\x5f\x4e",
21654 .ilen = 35,
21655 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21656 "\x10\x11\x12\x13\x14\x15\x16\x17"
21657 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21658 "\x20",
21659 .rlen = 25,
21660 }, {
21661 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21662 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21663 .klen = 16,
21664 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21665 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21666 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21667 "\x08\x09\x0a\x0b",
21668 .alen = 12,
21669 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
21670 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21671 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21672 "\x4d\x99\x99\x88\xdd",
21673 .ilen = 29,
21674 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21675 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21676 "\x1c\x1d\x1e",
21677 .rlen = 19,
21678 }, {
21679 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21680 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21681 .klen = 16,
21682 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21683 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21684 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21685 .alen = 8,
21686 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21687 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21688 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21689 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21690 .ilen = 32,
21691 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21692 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21693 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21694 .rlen = 24,
21695 }, {
21696 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21697 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21698 .klen = 16,
21699 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21700 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21701 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21702 "\x20\xea\x60\xc0",
21703 .alen = 12,
21704 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21705 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21706 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21707 "\x5a\xe0\x70\x45\x51",
21708 .ilen = 29,
21709 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21710 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21711 "\x3a\x80\x3b\xa8\x7f",
21712 .rlen = 21,
21713 }, {
21714 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21715 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21716 .klen = 16,
21717 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21718 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21719 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21720 .alen = 8,
21721 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21722 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21723 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21724 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21725 "\xba",
21726 .ilen = 33,
21727 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21728 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21729 "\x98\x09\xd6\x7d\xbe\xdd\x18",
21730 .rlen = 23,
21731 },
21732};
21733
Jarod Wilson5d667322009-05-04 19:23:40 +080021734/*
21735 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
21736 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
21737 * Special Publication 800-38C's test vectors also use nonce lengths our
21738 * implementation doesn't support. The following are taken from fips cavs
21739 * fax files on hand at Red Hat.
21740 *
21741 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
21742 * part of the nonce which combine w/the iv, but need to be input this way.
21743 */
21744static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
21745 {
21746 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
21747 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
21748 "\x96\xac\x59",
21749 .klen = 19,
21750 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
21751 .alen = 0,
21752 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
21753 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
21754 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
21755 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
21756 .ilen = 32,
21757 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
21758 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
21759 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
21760 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
21761 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
21762 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
21763 .rlen = 48,
21764 }, {
21765 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
21766 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
21767 "\x4f\xa3\x19",
21768 .klen = 19,
21769 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
21770 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
21771 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
21772 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
21773 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
21774 .alen = 32,
21775 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
21776 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
21777 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
21778 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
21779 .ilen = 32,
21780 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
21781 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
21782 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
21783 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
21784 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
21785 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
21786 .rlen = 48,
21787 }, {
21788 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
21789 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
21790 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
21791 "\xa0\x20\x35",
21792 .klen = 27,
21793 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
21794 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
21795 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
21796 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
21797 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
21798 .alen = 32,
21799 .ilen = 0,
21800 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
21801 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
21802 .rlen = 16,
21803 }, {
21804 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
21805 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
21806 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
21807 "\xd6\x3c\x8c",
21808 .klen = 27,
21809 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
21810 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
21811 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
21812 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
21813 "\xe3\x00\x73\x69\x84\x69\x87\x79",
21814 .alen = 32,
21815 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
21816 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
21817 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
21818 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
21819 .ilen = 32,
21820 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
21821 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
21822 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
21823 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
21824 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
21825 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
21826 .rlen = 48,
21827 }, {
21828 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
21829 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
21830 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
21831 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
21832 "\x1e\x29\x91",
21833 .klen = 35,
21834 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
21835 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
21836 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
21837 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
21838 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
21839 .alen = 32,
21840 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
21841 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
21842 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
21843 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
21844 .ilen = 32,
21845 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
21846 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
21847 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
21848 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
21849 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
21850 .rlen = 40,
21851 }, {
21852 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
21853 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
21854 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
21855 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
21856 "\xf9\xd9\x4e",
21857 .klen = 35,
21858 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
21859 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
21860 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
21861 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
21862 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
21863 .alen = 32,
21864 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
21865 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
21866 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
21867 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
21868 .ilen = 32,
21869 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
21870 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
21871 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
21872 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
21873 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
21874 "\x7b\x72\x8a\xf7",
21875 .rlen = 44,
21876 }, {
21877 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
21878 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
21879 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
21880 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
21881 "\x24\xa7\x8b",
21882 .klen = 35,
21883 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
21884 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
21885 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
21886 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
21887 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
21888 .alen = 32,
21889 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
21890 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
21891 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
21892 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
21893 .ilen = 32,
21894 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
21895 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
21896 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
21897 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
21898 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
21899 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
21900 .rlen = 48,
21901 },
21902};
21903
21904static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
21905 {
21906 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
21907 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
21908 "\xc6\xfb\x7d",
21909 .klen = 19,
21910 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
21911 .alen = 0,
21912 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
21913 .ilen = 8,
21914 .result = "\x00",
21915 .rlen = 0,
21916 .novrfy = 1,
21917 }, {
21918 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
21919 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
21920 "\xaf\x94\x87",
21921 .klen = 19,
21922 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
21923 .alen = 0,
21924 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
21925 .ilen = 8,
21926 .result = "\x00",
21927 .rlen = 0,
21928 }, {
21929 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
21930 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
21931 "\xc6\xfb\x7d",
21932 .klen = 19,
21933 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
21934 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
21935 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
21936 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
21937 "\xd8\x94\x99\x91\x81\x54\x62\x57",
21938 .alen = 32,
21939 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
21940 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
21941 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
21942 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
21943 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
21944 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
21945 .ilen = 48,
21946 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
21947 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
21948 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
21949 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
21950 .rlen = 32,
21951 .novrfy = 1,
21952 }, {
21953 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
21954 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
21955 "\x05\xe0\xc9",
21956 .klen = 19,
21957 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
21958 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
21959 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
21960 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
21961 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
21962 .alen = 32,
21963 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
21964 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
21965 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
21966 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
21967 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
21968 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
21969 .ilen = 48,
21970 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
21971 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
21972 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
21973 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
21974 .rlen = 32,
21975 }, {
21976 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
21977 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
21978 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
21979 "\xee\x49\x83",
21980 .klen = 27,
21981 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
21982 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
21983 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
21984 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
21985 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
21986 .alen = 32,
21987 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
21988 .ilen = 8,
21989 .result = "\x00",
21990 .rlen = 0,
21991 }, {
21992 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
21993 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
21994 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
21995 "\xee\x49\x83",
21996 .klen = 27,
21997 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
21998 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
21999 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
22000 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
22001 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
22002 .alen = 32,
22003 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
22004 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
22005 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
22006 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
22007 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
22008 .ilen = 40,
22009 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
22010 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
22011 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
22012 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
22013 .rlen = 32,
22014 }, {
22015 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22016 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
22017 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
22018 "\xd1\xfc\x57",
22019 .klen = 27,
22020 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
22021 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
22022 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
22023 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
22024 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
22025 .alen = 32,
22026 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
22027 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
22028 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
22029 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
22030 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
22031 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
22032 .ilen = 48,
22033 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
22034 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
22035 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
22036 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
22037 .rlen = 32,
22038 .novrfy = 1,
22039 }, {
22040 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
22041 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
22042 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
22043 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
22044 "\xee\x49\x83",
22045 .klen = 35,
22046 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
22047 .alen = 0,
22048 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
22049 .ilen = 8,
22050 .result = "\x00",
22051 .rlen = 0,
22052 }, {
22053 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
22054 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
22055 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
22056 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
22057 "\x85\x34\x66",
22058 .klen = 35,
22059 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
22060 .alen = 0,
22061 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
22062 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
22063 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
22064 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
22065 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
22066 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
22067 .ilen = 48,
22068 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
22069 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
22070 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
22071 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
22072 .rlen = 32,
22073 .novrfy = 1,
22074 }, {
22075 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22076 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
22077 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
22078 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
22079 "\xcf\x76\x3f",
22080 .klen = 35,
22081 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
22082 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
22083 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
22084 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
22085 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
22086 .alen = 32,
22087 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
22088 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
22089 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
22090 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
22091 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
22092 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
22093 .ilen = 48,
22094 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
22095 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
22096 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
22097 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
22098 .rlen = 32,
22099 },
22100};
22101
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080022102/*
Martin Williaf2b76b2015-06-01 13:44:01 +020022103 * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5.
22104 */
22105#define RFC7539_ENC_TEST_VECTORS 2
22106#define RFC7539_DEC_TEST_VECTORS 2
22107static struct aead_testvec rfc7539_enc_tv_template[] = {
22108 {
22109 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
22110 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
22111 "\x90\x91\x92\x93\x94\x95\x96\x97"
22112 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
22113 .klen = 32,
22114 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
22115 "\x44\x45\x46\x47",
22116 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
22117 "\xc4\xc5\xc6\xc7",
22118 .alen = 12,
22119 .input = "\x4c\x61\x64\x69\x65\x73\x20\x61"
22120 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
22121 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
22122 "\x74\x68\x65\x20\x63\x6c\x61\x73"
22123 "\x73\x20\x6f\x66\x20\x27\x39\x39"
22124 "\x3a\x20\x49\x66\x20\x49\x20\x63"
22125 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
22126 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
22127 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
22128 "\x74\x69\x70\x20\x66\x6f\x72\x20"
22129 "\x74\x68\x65\x20\x66\x75\x74\x75"
22130 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
22131 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
22132 "\x75\x6c\x64\x20\x62\x65\x20\x69"
22133 "\x74\x2e",
22134 .ilen = 114,
22135 .result = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
22136 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
22137 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
22138 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
22139 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
22140 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
22141 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
22142 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
22143 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
22144 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
22145 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
22146 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
22147 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
22148 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
22149 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
22150 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
22151 "\x06\x91",
22152 .rlen = 130,
22153 }, {
22154 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22155 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22156 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22157 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
22158 .klen = 32,
22159 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
22160 "\x05\x06\x07\x08",
22161 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22162 "\x00\x00\x4e\x91",
22163 .alen = 12,
22164 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22165 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22166 "\x61\x72\x65\x20\x64\x72\x61\x66"
22167 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22168 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22169 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22170 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22171 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22172 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22173 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22174 "\x20\x75\x70\x64\x61\x74\x65\x64"
22175 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22176 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22177 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22178 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22179 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22180 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22181 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22182 "\x20\x49\x74\x20\x69\x73\x20\x69"
22183 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22184 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22185 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22186 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22187 "\x66\x74\x73\x20\x61\x73\x20\x72"
22188 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22189 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22190 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22191 "\x63\x69\x74\x65\x20\x74\x68\x65"
22192 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22193 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22194 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22195 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22196 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22197 "\x9d",
22198 .ilen = 265,
22199 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22200 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22201 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22202 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22203 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22204 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22205 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22206 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22207 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22208 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22209 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22210 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22211 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22212 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22213 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22214 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22215 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22216 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22217 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22218 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22219 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22220 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22221 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22222 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22223 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22224 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22225 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22226 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22227 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22228 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22229 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22230 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22231 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22232 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22233 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22234 "\x38",
22235 .rlen = 281,
22236 },
22237};
22238
22239static struct aead_testvec rfc7539_dec_tv_template[] = {
22240 {
22241 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
22242 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
22243 "\x90\x91\x92\x93\x94\x95\x96\x97"
22244 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
22245 .klen = 32,
22246 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
22247 "\x44\x45\x46\x47",
22248 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
22249 "\xc4\xc5\xc6\xc7",
22250 .alen = 12,
22251 .input = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
22252 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
22253 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
22254 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
22255 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
22256 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
22257 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
22258 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
22259 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
22260 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
22261 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
22262 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
22263 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
22264 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
22265 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
22266 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
22267 "\x06\x91",
22268 .ilen = 130,
22269 .result = "\x4c\x61\x64\x69\x65\x73\x20\x61"
22270 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
22271 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
22272 "\x74\x68\x65\x20\x63\x6c\x61\x73"
22273 "\x73\x20\x6f\x66\x20\x27\x39\x39"
22274 "\x3a\x20\x49\x66\x20\x49\x20\x63"
22275 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
22276 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
22277 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
22278 "\x74\x69\x70\x20\x66\x6f\x72\x20"
22279 "\x74\x68\x65\x20\x66\x75\x74\x75"
22280 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
22281 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
22282 "\x75\x6c\x64\x20\x62\x65\x20\x69"
22283 "\x74\x2e",
22284 .rlen = 114,
22285 }, {
22286 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22287 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22288 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22289 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
22290 .klen = 32,
22291 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
22292 "\x05\x06\x07\x08",
22293 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22294 "\x00\x00\x4e\x91",
22295 .alen = 12,
22296 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22297 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22298 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22299 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22300 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22301 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22302 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22303 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22304 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22305 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22306 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22307 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22308 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22309 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22310 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22311 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22312 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22313 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22314 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22315 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22316 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22317 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22318 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22319 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22320 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22321 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22322 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22323 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22324 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22325 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22326 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22327 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22328 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22329 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22330 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22331 "\x38",
22332 .ilen = 281,
22333 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22334 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22335 "\x61\x72\x65\x20\x64\x72\x61\x66"
22336 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22337 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22338 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22339 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22340 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22341 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22342 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22343 "\x20\x75\x70\x64\x61\x74\x65\x64"
22344 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22345 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22346 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22347 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22348 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22349 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22350 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22351 "\x20\x49\x74\x20\x69\x73\x20\x69"
22352 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22353 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22354 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22355 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22356 "\x66\x74\x73\x20\x61\x73\x20\x72"
22357 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22358 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22359 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22360 "\x63\x69\x74\x65\x20\x74\x68\x65"
22361 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22362 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22363 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22364 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22365 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22366 "\x9d",
22367 .rlen = 265,
22368 },
22369};
22370
22371/*
Martin Willi59007582015-06-01 13:44:03 +020022372 * draft-irtf-cfrg-chacha20-poly1305
22373 */
22374#define RFC7539ESP_DEC_TEST_VECTORS 1
22375#define RFC7539ESP_ENC_TEST_VECTORS 1
22376static struct aead_testvec rfc7539esp_enc_tv_template[] = {
22377 {
22378 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22379 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22380 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22381 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
22382 "\x00\x00\x00\x00",
22383 .klen = 36,
22384 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
22385 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22386 "\x00\x00\x4e\x91",
22387 .alen = 12,
22388 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22389 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22390 "\x61\x72\x65\x20\x64\x72\x61\x66"
22391 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22392 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22393 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22394 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22395 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22396 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22397 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22398 "\x20\x75\x70\x64\x61\x74\x65\x64"
22399 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22400 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22401 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22402 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22403 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22404 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22405 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22406 "\x20\x49\x74\x20\x69\x73\x20\x69"
22407 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22408 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22409 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22410 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22411 "\x66\x74\x73\x20\x61\x73\x20\x72"
22412 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22413 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22414 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22415 "\x63\x69\x74\x65\x20\x74\x68\x65"
22416 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22417 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22418 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22419 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22420 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22421 "\x9d",
22422 .ilen = 265,
22423 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22424 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22425 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22426 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22427 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22428 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22429 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22430 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22431 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22432 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22433 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22434 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22435 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22436 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22437 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22438 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22439 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22440 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22441 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22442 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22443 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22444 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22445 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22446 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22447 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22448 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22449 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22450 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22451 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22452 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22453 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22454 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22455 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22456 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22457 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22458 "\x38",
22459 .rlen = 281,
22460 },
22461};
22462
22463static struct aead_testvec rfc7539esp_dec_tv_template[] = {
22464 {
22465 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22466 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22467 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22468 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
22469 "\x00\x00\x00\x00",
22470 .klen = 36,
22471 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
22472 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22473 "\x00\x00\x4e\x91",
22474 .alen = 12,
22475 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22476 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22477 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22478 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22479 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22480 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22481 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22482 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22483 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22484 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22485 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22486 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22487 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22488 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22489 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22490 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22491 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22492 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22493 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22494 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22495 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22496 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22497 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22498 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22499 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22500 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22501 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22502 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22503 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22504 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22505 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22506 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22507 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22508 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22509 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22510 "\x38",
22511 .ilen = 281,
22512 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22513 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22514 "\x61\x72\x65\x20\x64\x72\x61\x66"
22515 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22516 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22517 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22518 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22519 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22520 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22521 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22522 "\x20\x75\x70\x64\x61\x74\x65\x64"
22523 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22524 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22525 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22526 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22527 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22528 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22529 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22530 "\x20\x49\x74\x20\x69\x73\x20\x69"
22531 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22532 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22533 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22534 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22535 "\x66\x74\x73\x20\x61\x73\x20\x72"
22536 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22537 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22538 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22539 "\x63\x69\x74\x65\x20\x74\x68\x65"
22540 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22541 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22542 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22543 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22544 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22545 "\x9d",
22546 .rlen = 265,
22547 },
22548};
22549
22550/*
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080022551 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
22552 * test vectors, taken from Appendix B.2.9 and B.2.10:
22553 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
22554 * Only AES-128 is supported at this time.
22555 */
22556#define ANSI_CPRNG_AES_TEST_VECTORS 6
22557
22558static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
22559 {
22560 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22561 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22562 .klen = 16,
22563 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22564 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
22565 .dtlen = 16,
22566 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
22567 "\x00\x00\x00\x00\x00\x00\x00\x00",
22568 .vlen = 16,
22569 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
22570 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
22571 .rlen = 16,
22572 .loops = 1,
22573 }, {
22574 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22575 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22576 .klen = 16,
22577 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22578 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
22579 .dtlen = 16,
22580 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
22581 "\x00\x00\x00\x00\x00\x00\x00\x00",
22582 .vlen = 16,
22583 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
22584 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
22585 .rlen = 16,
22586 .loops = 1,
22587 }, {
22588 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22589 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22590 .klen = 16,
22591 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22592 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
22593 .dtlen = 16,
22594 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
22595 "\x00\x00\x00\x00\x00\x00\x00\x00",
22596 .vlen = 16,
22597 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
22598 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
22599 .rlen = 16,
22600 .loops = 1,
22601 }, {
22602 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22603 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22604 .klen = 16,
22605 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22606 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
22607 .dtlen = 16,
22608 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
22609 "\x00\x00\x00\x00\x00\x00\x00\x00",
22610 .vlen = 16,
22611 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
22612 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
22613 .rlen = 16,
22614 .loops = 1,
22615 }, {
22616 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22617 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22618 .klen = 16,
22619 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22620 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
22621 .dtlen = 16,
22622 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
22623 "\x00\x00\x00\x00\x00\x00\x00\x00",
22624 .vlen = 16,
22625 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
22626 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
22627 .rlen = 16,
22628 .loops = 1,
22629 }, { /* Monte Carlo Test */
22630 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
22631 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
22632 .klen = 16,
22633 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
22634 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
22635 .dtlen = 16,
22636 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
22637 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
22638 .vlen = 16,
22639 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
22640 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
22641 .rlen = 16,
22642 .loops = 10000,
22643 },
22644};
22645
Stephan Mueller3332ee22014-05-31 17:24:38 +020022646/*
22647 * SP800-90A DRBG Test vectors from
22648 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
22649 *
22650 * Test vectors for DRBG with prediction resistance. All types of DRBGs
22651 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
22652 * w/o personalization string, w/ and w/o additional input string).
22653 */
22654static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
22655 {
22656 .entropy = (unsigned char *)
22657 "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
22658 "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
22659 "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
22660 "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
22661 .entropylen = 48,
22662 .entpra = (unsigned char *)
22663 "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
22664 "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
22665 "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
22666 .entprb = (unsigned char *)
22667 "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
22668 "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
22669 "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
22670 .entprlen = 32,
22671 .expected = (unsigned char *)
22672 "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
22673 "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
22674 "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
22675 "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
22676 "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
22677 "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
22678 "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
22679 "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
22680 "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
22681 "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
22682 "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
22683 .expectedlen = 128,
22684 .addtla = NULL,
22685 .addtlb = NULL,
22686 .addtllen = 0,
22687 .pers = NULL,
22688 .perslen = 0,
22689 }, {
22690 .entropy = (unsigned char *)
22691 "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
22692 "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
22693 "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
22694 "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
22695 .entropylen = 48,
22696 .entpra = (unsigned char *)
22697 "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
22698 "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
22699 "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
22700 .entprb = (unsigned char *)
22701 "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
22702 "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
22703 "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
22704 .entprlen = 32,
22705 .expected = (unsigned char *)
22706 "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
22707 "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
22708 "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
22709 "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
22710 "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
22711 "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
22712 "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
22713 "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
22714 "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
22715 "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
22716 "\x50\x47\xa3\x63\x81\x16\xaf\x19",
22717 .expectedlen = 128,
22718 .addtla = (unsigned char *)
22719 "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
22720 "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
22721 "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
22722 .addtlb = (unsigned char *)
22723 "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
22724 "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
22725 "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
22726 .addtllen = 32,
22727 .pers = NULL,
22728 .perslen = 0,
22729 }, {
22730 .entropy = (unsigned char *)
22731 "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
22732 "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
22733 "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
22734 "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
22735 .entropylen = 48,
22736 .entpra = (unsigned char *)
22737 "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
22738 "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
22739 "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
22740 .entprb = (unsigned char *)
22741 "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
22742 "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
22743 "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
22744 .entprlen = 32,
22745 .expected = (unsigned char *)
22746 "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
22747 "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
22748 "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
22749 "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
22750 "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
22751 "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
22752 "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
22753 "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
22754 "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
22755 "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
22756 "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
22757 .expectedlen = 128,
22758 .addtla = NULL,
22759 .addtlb = NULL,
22760 .addtllen = 0,
22761 .pers = (unsigned char *)
22762 "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
22763 "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
22764 "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
22765 .perslen = 32,
22766 }, {
22767 .entropy = (unsigned char *)
22768 "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
22769 "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
22770 "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
22771 "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
22772 .entropylen = 48,
22773 .entpra = (unsigned char *)
22774 "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
22775 "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
22776 "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
22777 .entprb = (unsigned char *)
22778 "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
22779 "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
22780 "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
22781 .entprlen = 32,
22782 .expected = (unsigned char *)
22783 "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
22784 "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
22785 "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
22786 "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
22787 "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
22788 "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
22789 "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
22790 "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
22791 "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
22792 "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
22793 "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
22794 .expectedlen = 128,
22795 .addtla = (unsigned char *)
22796 "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
22797 "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
22798 "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
22799 .addtlb = (unsigned char *)
22800 "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
22801 "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
22802 "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
22803 .addtllen = 32,
22804 .pers = (unsigned char *)
22805 "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
22806 "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
22807 "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
22808 .perslen = 32,
22809 },
22810};
22811
22812static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
22813 {
22814 .entropy = (unsigned char *)
22815 "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
22816 "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
22817 "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
22818 "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
22819 .entropylen = 48,
22820 .entpra = (unsigned char *)
22821 "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
22822 "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
22823 "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
22824 .entprb = (unsigned char *)
22825 "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
22826 "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
22827 "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
22828 .entprlen = 32,
22829 .expected = (unsigned char *)
22830 "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
22831 "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
22832 "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
22833 "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
22834 "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
22835 "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
22836 "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
22837 "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
22838 "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
22839 "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
22840 "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
22841 .expectedlen = 128,
22842 .addtla = NULL,
22843 .addtlb = NULL,
22844 .addtllen = 0,
22845 .pers = NULL,
22846 .perslen = 0,
22847 }, {
22848 .entropy = (unsigned char *)
22849 "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
22850 "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
22851 "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
22852 "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
22853 .entropylen = 48,
22854 .entpra = (unsigned char *)
22855 "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
22856 "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
22857 "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
22858 .entprb = (unsigned char *)
22859 "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
22860 "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
22861 "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
22862 .entprlen = 32,
22863 .expected = (unsigned char *)
22864 "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
22865 "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
22866 "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
22867 "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
22868 "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
22869 "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
22870 "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
22871 "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
22872 "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
22873 "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
22874 "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
22875 .expectedlen = 128,
22876 .addtla = (unsigned char *)
22877 "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
22878 "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
22879 "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
22880 .addtlb = (unsigned char *)
22881 "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
22882 "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
22883 "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
22884 .addtllen = 32,
22885 .pers = NULL,
22886 .perslen = 0,
22887 }, {
22888 .entropy = (unsigned char *)
22889 "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
22890 "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
22891 "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
22892 "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
22893 .entropylen = 48,
22894 .entpra = (unsigned char *)
22895 "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
22896 "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
22897 "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
22898 .entprb = (unsigned char *)
22899 "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
22900 "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
22901 "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
22902 .entprlen = 32,
22903 .expected = (unsigned char *)
22904 "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
22905 "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
22906 "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
22907 "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
22908 "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
22909 "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
22910 "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
22911 "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
22912 "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
22913 "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
22914 "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
22915 .expectedlen = 128,
22916 .addtla = NULL,
22917 .addtlb = NULL,
22918 .addtllen = 0,
22919 .pers = (unsigned char *)
22920 "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
22921 "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
22922 "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
22923 .perslen = 32,
22924 }, {
22925 .entropy = (unsigned char *)
22926 "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
22927 "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
22928 "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
22929 "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
22930 .entropylen = 48,
22931 .entpra = (unsigned char *)
22932 "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
22933 "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
22934 "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
22935 .entprb = (unsigned char *)
22936 "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
22937 "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
22938 "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
22939 .entprlen = 32,
22940 .expected = (unsigned char *)
22941 "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
22942 "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
22943 "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
22944 "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
22945 "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
22946 "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
22947 "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
22948 "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
22949 "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
22950 "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
22951 "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
22952 .expectedlen = 128,
22953 .addtla = (unsigned char *)
22954 "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
22955 "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
22956 "\x86\x88\x55\x28\xc1\x69\xdd\x76",
22957 .addtlb = (unsigned char *)
22958 "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
22959 "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
22960 "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
22961 .addtllen = 32,
22962 .pers = (unsigned char *)
22963 "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
22964 "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
22965 "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
22966 .perslen = 32,
22967 },
22968};
22969
22970static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
22971 {
22972 .entropy = (unsigned char *)
22973 "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
22974 "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
22975 .entropylen = 24,
22976 .entpra = (unsigned char *)
22977 "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
22978 "\xb4\xec\x80\xb1",
22979 .entprb = (unsigned char *)
22980 "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
22981 "\x28\x07\xeb\xc2",
22982 .entprlen = 16,
22983 .expected = (unsigned char *)
22984 "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
22985 "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
22986 "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
22987 "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
22988 "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
22989 "\x8a\xf1\x23\xa8",
22990 .expectedlen = 64,
22991 .addtla = NULL,
22992 .addtlb = NULL,
22993 .addtllen = 0,
22994 .pers = NULL,
22995 .perslen = 0,
22996 }, {
22997 .entropy = (unsigned char *)
22998 "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
22999 "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
23000 .entropylen = 24,
23001 .entpra = (unsigned char *)
23002 "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
23003 "\x67\xd1\x08\xf8",
23004 .entprb = (unsigned char *)
23005 "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
23006 "\xd4\xba\x04\x58",
23007 .entprlen = 16,
23008 .expected = (unsigned char *)
23009 "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
23010 "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
23011 "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
23012 "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
23013 "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
23014 "\xc1\x02\x41\x82",
23015 .expectedlen = 64,
23016 .addtla = (unsigned char *)
23017 "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
23018 "\xeb\xb3\x01\x76",
23019 .addtlb = (unsigned char *)
23020 "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
23021 "\xd0\x7f\xcc\x43",
23022 .addtllen = 16,
23023 .pers = NULL,
23024 .perslen = 0,
23025 }, {
23026 .entropy = (unsigned char *)
23027 "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
23028 "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
23029 .entropylen = 24,
23030 .entpra = (unsigned char *)
23031 "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
23032 "\xc3\x0f\xe3\xb0",
23033 .entprb = (unsigned char *)
23034 "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
23035 "\xd6\x9c\x9d\xe8",
23036 .entprlen = 16,
23037 .expected = (unsigned char *)
23038 "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
23039 "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
23040 "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
23041 "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
23042 "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
23043 "\x72\x82\x0c\xcf",
23044 .expectedlen = 64,
23045 .addtla = NULL,
23046 .addtlb = NULL,
23047 .addtllen = 0,
23048 .pers = (unsigned char *)
23049 "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
23050 "\x21\x52\xb3\xad",
23051 .perslen = 16,
23052 }, {
23053 .entropy = (unsigned char *)
23054 "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
23055 "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
23056 .entropylen = 24,
23057 .entpra = (unsigned char *)
23058 "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
23059 "\xc4\x2c\xe8\x10",
23060 .entprb = (unsigned char *)
23061 "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
23062 "\x08\xf7\xa5\x01",
23063 .entprlen = 16,
23064 .expected = (unsigned char *)
23065 "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
23066 "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
23067 "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
23068 "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
23069 "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
23070 "\x23\xc5\x1f\x68",
23071 .expectedlen = 64,
23072 .addtla = (unsigned char *)
23073 "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
23074 "\x23\x6d\xad\x1d",
23075 .addtlb = (unsigned char *)
23076 "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
23077 "\xbc\x59\x31\x8c",
23078 .addtllen = 16,
23079 .pers = (unsigned char *)
23080 "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
23081 "\x37\x3c\x5c\x0b",
23082 .perslen = 16,
23083 },
23084};
23085
23086/*
23087 * SP800-90A DRBG Test vectors from
23088 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
23089 *
23090 * Test vectors for DRBG without prediction resistance. All types of DRBGs
23091 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
23092 * w/o personalization string, w/ and w/o additional input string).
23093 */
23094static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
23095 {
23096 .entropy = (unsigned char *)
23097 "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
23098 "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
23099 "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
23100 "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
23101 .entropylen = 48,
23102 .expected = (unsigned char *)
23103 "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
23104 "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
23105 "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
23106 "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
23107 "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
23108 "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
23109 "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
23110 "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
23111 "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
23112 "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
23113 "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
23114 .expectedlen = 128,
23115 .addtla = NULL,
23116 .addtlb = NULL,
23117 .addtllen = 0,
23118 .pers = NULL,
23119 .perslen = 0,
23120 }, {
23121 .entropy = (unsigned char *)
23122 "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
23123 "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
23124 "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
23125 "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
23126 .entropylen = 48,
23127 .expected = (unsigned char *)
23128 "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
23129 "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
23130 "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
23131 "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
23132 "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
23133 "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
23134 "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
23135 "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
23136 "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
23137 "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
23138 "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
23139 .expectedlen = 128,
23140 .addtla = (unsigned char *)
23141 "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
23142 "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
23143 "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
23144 .addtlb = (unsigned char *)
23145 "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
23146 "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
23147 "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
23148 .addtllen = 32,
23149 .pers = NULL,
23150 .perslen = 0,
23151 }, {
23152 .entropy = (unsigned char *)
23153 "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
23154 "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
23155 "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
23156 "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
23157 .entropylen = 48,
23158 .expected = (unsigned char *)
23159 "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
23160 "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
23161 "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
23162 "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
23163 "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
23164 "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
23165 "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
23166 "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
23167 "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
23168 "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
23169 "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
23170 .expectedlen = 128,
23171 .addtla = NULL,
23172 .addtlb = NULL,
23173 .addtllen = 0,
23174 .pers = (unsigned char *)
23175 "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
23176 "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
23177 "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
23178 .perslen = 32,
23179 }, {
23180 .entropy = (unsigned char *)
23181 "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
23182 "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
23183 "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
23184 "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
23185 .entropylen = 48,
23186 .expected = (unsigned char *)
23187 "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
23188 "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
23189 "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
23190 "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
23191 "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
23192 "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
23193 "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
23194 "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
23195 "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
23196 "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
23197 "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
23198 .expectedlen = 128,
23199 .addtla = (unsigned char *)
23200 "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
23201 "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
23202 "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
23203 .addtlb = (unsigned char *)
23204 "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
23205 "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
23206 "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
23207 .addtllen = 32,
23208 .pers = (unsigned char *)
23209 "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
23210 "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
23211 "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
23212 .perslen = 32,
23213 },
23214};
23215
23216static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
23217 {
23218 .entropy = (unsigned char *)
23219 "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
23220 "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
23221 "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
23222 "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
23223 .entropylen = 48,
23224 .expected = (unsigned char *)
23225 "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
23226 "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
23227 "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
23228 "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
23229 "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
23230 "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
23231 "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
23232 "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
23233 "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
23234 "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
23235 "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
23236 .expectedlen = 128,
23237 .addtla = NULL,
23238 .addtlb = NULL,
23239 .addtllen = 0,
23240 .pers = NULL,
23241 .perslen = 0,
23242 }, {
23243 .entropy = (unsigned char *)
23244 "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
23245 "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
23246 "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
23247 "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
23248 .entropylen = 48,
23249 .expected = (unsigned char *)
23250 "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
23251 "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
23252 "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
23253 "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
23254 "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
23255 "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
23256 "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
23257 "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
23258 "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
23259 "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
23260 "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
23261 .expectedlen = 128,
23262 .addtla = (unsigned char *)
23263 "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
23264 "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
23265 "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
23266 .addtlb = (unsigned char *)
23267 "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
23268 "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
23269 "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
23270 .addtllen = 32,
23271 .pers = NULL,
23272 .perslen = 0,
23273 }, {
23274 .entropy = (unsigned char *)
23275 "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
23276 "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
23277 "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
23278 "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
23279 .entropylen = 48,
23280 .expected = (unsigned char *)
23281 "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
23282 "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
23283 "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
23284 "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
23285 "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
23286 "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
23287 "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
23288 "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
23289 "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
23290 "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
23291 "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
23292 .expectedlen = 128,
23293 .addtla = NULL,
23294 .addtlb = NULL,
23295 .addtllen = 0,
23296 .pers = (unsigned char *)
23297 "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
23298 "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
23299 "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
23300 .perslen = 32,
23301 }, {
23302 .entropy = (unsigned char *)
23303 "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
23304 "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
23305 "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
23306 "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
23307 .entropylen = 48,
23308 .expected = (unsigned char *)
23309 "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
23310 "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
23311 "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
23312 "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
23313 "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
23314 "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
23315 "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
23316 "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
23317 "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
23318 "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
23319 "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
23320 .expectedlen = 128,
23321 .addtla = (unsigned char *)
23322 "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
23323 "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
23324 "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
23325 .addtlb = (unsigned char *)
23326 "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
23327 "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
23328 "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
23329 .addtllen = 32,
23330 .pers = (unsigned char *)
23331 "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
23332 "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
23333 "\x36\x60\x3b\xca\x37\xc9\xee\x29",
23334 .perslen = 32,
23335 },
23336};
23337
23338static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
23339 {
23340 .entropy = (unsigned char *)
23341 "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
23342 "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
23343 "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
23344 "\xac\x9b\xbb\x00",
23345 .entropylen = 40,
23346 .expected = (unsigned char *)
23347 "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
23348 "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
23349 "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
23350 "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
23351 "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
23352 "\x9a\x9d\xf1\x0d",
23353 .expectedlen = 64,
23354 .addtla = NULL,
23355 .addtlb = NULL,
23356 .addtllen = 0,
23357 .pers = NULL,
23358 .perslen = 0,
23359 },
23360};
23361
23362static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
23363 {
23364 .entropy = (unsigned char *)
23365 "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
23366 "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
23367 "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
23368 "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
23369 .entropylen = 48,
23370 .expected = (unsigned char *)
23371 "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
23372 "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
23373 "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
23374 "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
23375 "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
23376 "\xb4\xf0\x7e\x1d",
23377 .expectedlen = 64,
23378 .addtla = NULL,
23379 .addtlb = NULL,
23380 .addtllen = 0,
23381 .pers = NULL,
23382 .perslen = 0,
23383 },
23384};
23385
23386static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
23387 {
23388 .entropy = (unsigned char *)
23389 "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
23390 "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
23391 .entropylen = 24,
23392 .expected = (unsigned char *)
23393 "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
23394 "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
23395 "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
23396 "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
23397 "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
23398 "\xcb\x2d\xd6\xb0",
23399 .expectedlen = 64,
23400 .addtla = NULL,
23401 .addtlb = NULL,
23402 .addtllen = 0,
23403 .pers = NULL,
23404 .perslen = 0,
23405 }, {
23406 .entropy = (unsigned char *)
23407 "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
23408 "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
23409 .entropylen = 24,
23410 .expected = (unsigned char *)
23411 "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
23412 "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
23413 "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
23414 "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
23415 "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
23416 "\xc3\xdf\xb3\x81",
23417 .expectedlen = 64,
23418 .addtla = (unsigned char *)
23419 "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
23420 "\x91\x4d\x81\x56",
23421 .addtlb = (unsigned char *)
23422 "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
23423 "\x4a\x55\xd1\xc6",
23424 .addtllen = 16,
23425 .pers = NULL,
23426 .perslen = 0,
23427 }, {
23428 .entropy = (unsigned char *)
23429 "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
23430 "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
23431 .entropylen = 24,
23432 .expected = (unsigned char *)
23433 "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
23434 "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
23435 "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
23436 "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
23437 "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
23438 "\x34\x30\x0c\x3d",
23439 .expectedlen = 64,
23440 .addtla = NULL,
23441 .addtlb = NULL,
23442 .addtllen = 0,
23443 .pers = (unsigned char *)
23444 "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
23445 "\x0b\xc6\x97\x54",
23446 .perslen = 16,
23447 }, {
23448 .entropy = (unsigned char *)
23449 "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
23450 "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
23451 .entropylen = 24,
23452 .expected = (unsigned char *)
23453 "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
23454 "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
23455 "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
23456 "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
23457 "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
23458 "\x2b\x49\x1e\x5c",
23459 .expectedlen = 64,
23460 .addtla = (unsigned char *)
23461 "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
23462 "\x44\x85\xe7\xfe",
23463 .addtlb = (unsigned char *)
23464 "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
23465 "\x82\x16\x62\x7f",
23466 .addtllen = 16,
23467 .pers = (unsigned char *)
23468 "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
23469 "\x8e\xcf\xe0\x02",
23470 .perslen = 16,
23471 },
23472};
23473
Herbert Xuda7f0332008-07-31 17:08:25 +080023474/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023475#define CAST5_ENC_TEST_VECTORS 4
23476#define CAST5_DEC_TEST_VECTORS 4
23477#define CAST5_CBC_ENC_TEST_VECTORS 1
23478#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030023479#define CAST5_CTR_ENC_TEST_VECTORS 2
23480#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080023481
23482static struct cipher_testvec cast5_enc_tv_template[] = {
23483 {
23484 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23485 "\x23\x45\x67\x89\x34\x56\x78\x9a",
23486 .klen = 16,
23487 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23488 .ilen = 8,
23489 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
23490 .rlen = 8,
23491 }, {
23492 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23493 "\x23\x45",
23494 .klen = 10,
23495 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23496 .ilen = 8,
23497 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
23498 .rlen = 8,
23499 }, {
23500 .key = "\x01\x23\x45\x67\x12",
23501 .klen = 5,
23502 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23503 .ilen = 8,
23504 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
23505 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023506 }, { /* Generated from TF test vectors */
23507 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23508 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23509 .klen = 16,
23510 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23511 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23512 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23513 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23514 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23515 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23516 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23517 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23518 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23519 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23520 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23521 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23522 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23523 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23524 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23525 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23526 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23527 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23528 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23529 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23530 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23531 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23532 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23533 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23534 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23535 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23536 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23537 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23538 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23539 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23540 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23541 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23542 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23543 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23544 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23545 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23546 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23547 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23548 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23549 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23550 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23551 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23552 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23553 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23554 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23555 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23556 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23557 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23558 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23559 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23560 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23561 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23562 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23563 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23564 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23565 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23566 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23567 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23568 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23569 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23570 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23571 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23572 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23573 .ilen = 496,
23574 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
23575 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
23576 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
23577 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
23578 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
23579 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
23580 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
23581 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
23582 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
23583 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
23584 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
23585 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
23586 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
23587 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
23588 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
23589 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
23590 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
23591 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
23592 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
23593 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
23594 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
23595 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
23596 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
23597 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
23598 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
23599 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
23600 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
23601 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
23602 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
23603 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
23604 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
23605 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
23606 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
23607 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
23608 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
23609 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
23610 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
23611 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
23612 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
23613 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
23614 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
23615 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
23616 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
23617 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
23618 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
23619 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
23620 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
23621 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
23622 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
23623 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
23624 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
23625 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
23626 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
23627 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
23628 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
23629 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
23630 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
23631 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
23632 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
23633 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
23634 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
23635 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
23636 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023637 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023638 .np = 3,
23639 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080023640 },
23641};
23642
23643static struct cipher_testvec cast5_dec_tv_template[] = {
23644 {
23645 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23646 "\x23\x45\x67\x89\x34\x56\x78\x9a",
23647 .klen = 16,
23648 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
23649 .ilen = 8,
23650 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23651 .rlen = 8,
23652 }, {
23653 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23654 "\x23\x45",
23655 .klen = 10,
23656 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
23657 .ilen = 8,
23658 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23659 .rlen = 8,
23660 }, {
23661 .key = "\x01\x23\x45\x67\x12",
23662 .klen = 5,
23663 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
23664 .ilen = 8,
23665 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23666 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023667 }, { /* Generated from TF test vectors */
23668 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23669 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23670 .klen = 16,
23671 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23672 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
23673 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
23674 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
23675 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
23676 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
23677 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
23678 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
23679 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
23680 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
23681 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
23682 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
23683 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
23684 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
23685 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
23686 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
23687 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
23688 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
23689 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
23690 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
23691 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
23692 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
23693 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
23694 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
23695 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
23696 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
23697 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
23698 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
23699 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
23700 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
23701 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
23702 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
23703 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
23704 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
23705 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
23706 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
23707 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
23708 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
23709 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
23710 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
23711 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
23712 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
23713 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
23714 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
23715 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
23716 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
23717 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
23718 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
23719 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
23720 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
23721 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
23722 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
23723 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
23724 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
23725 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
23726 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
23727 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
23728 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
23729 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
23730 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
23731 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
23732 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
23733 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
23734 .ilen = 496,
23735 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23736 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23737 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23738 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23739 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23740 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23741 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23742 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23743 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23744 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23745 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23746 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23747 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23748 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23749 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23750 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23751 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23752 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23753 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23754 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23755 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23756 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23757 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23758 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23759 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23760 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23761 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23762 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23763 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23764 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23765 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23766 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23767 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23768 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23769 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23770 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23771 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23772 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23773 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23774 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23775 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23776 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23777 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23778 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23779 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23780 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23781 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23782 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23783 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23784 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23785 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23786 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23787 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23788 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23789 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23790 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23791 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23792 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23793 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23794 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23795 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23796 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23797 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023798 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023799 .np = 3,
23800 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023801 },
23802};
23803
23804static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
23805 { /* Generated from TF test vectors */
23806 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23807 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23808 .klen = 16,
23809 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23810 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23811 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23812 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23813 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23814 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23815 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23816 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23817 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23818 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23819 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23820 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23821 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23822 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23823 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23824 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23825 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23826 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23827 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23828 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23829 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23830 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23831 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23832 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23833 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23834 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23835 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23836 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23837 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23838 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23839 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23840 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23841 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23842 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23843 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23844 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23845 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23846 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23847 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23848 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23849 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23850 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23851 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23852 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23853 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23854 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23855 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23856 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23857 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23858 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23859 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23860 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23861 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23862 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23863 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23864 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23865 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23866 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23867 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23868 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23869 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23870 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23871 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23872 .ilen = 496,
23873 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
23874 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
23875 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
23876 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
23877 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
23878 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
23879 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
23880 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
23881 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
23882 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
23883 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
23884 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
23885 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
23886 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
23887 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
23888 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
23889 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
23890 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
23891 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
23892 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
23893 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
23894 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
23895 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
23896 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
23897 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
23898 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
23899 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
23900 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
23901 "\x90\x12\x37\x49\x27\x98\x69\x18"
23902 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
23903 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
23904 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
23905 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
23906 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
23907 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
23908 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
23909 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
23910 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
23911 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
23912 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
23913 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
23914 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
23915 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
23916 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
23917 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
23918 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
23919 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
23920 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
23921 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
23922 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
23923 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
23924 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
23925 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
23926 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
23927 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
23928 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
23929 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
23930 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
23931 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
23932 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
23933 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
23934 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
23935 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023936 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023937 .np = 3,
23938 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023939 },
23940};
23941
23942static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
23943 { /* Generated from TF test vectors */
23944 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23945 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23946 .klen = 16,
23947 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23948 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
23949 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
23950 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
23951 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
23952 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
23953 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
23954 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
23955 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
23956 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
23957 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
23958 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
23959 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
23960 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
23961 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
23962 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
23963 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
23964 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
23965 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
23966 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
23967 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
23968 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
23969 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
23970 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
23971 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
23972 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
23973 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
23974 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
23975 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
23976 "\x90\x12\x37\x49\x27\x98\x69\x18"
23977 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
23978 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
23979 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
23980 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
23981 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
23982 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
23983 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
23984 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
23985 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
23986 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
23987 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
23988 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
23989 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
23990 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
23991 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
23992 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
23993 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
23994 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
23995 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
23996 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
23997 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
23998 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
23999 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
24000 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
24001 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
24002 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
24003 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
24004 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
24005 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
24006 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
24007 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
24008 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
24009 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
24010 .ilen = 496,
24011 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24012 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24013 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24014 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24015 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
24016 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24017 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24018 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24019 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24020 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24021 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24022 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24023 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24024 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24025 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24026 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24027 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24028 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24029 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24030 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24031 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24032 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24033 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24034 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24035 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24036 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24037 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24038 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24039 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24040 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24041 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24042 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24043 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24044 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24045 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24046 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24047 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24048 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24049 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24050 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24051 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24052 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24053 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24054 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24055 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24056 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24057 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24058 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24059 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24060 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24061 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24062 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24063 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24064 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24065 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24066 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24067 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24068 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24069 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24070 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24071 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
24072 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
24073 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024074 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024075 .np = 3,
24076 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024077 },
24078};
24079
24080static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
24081 { /* Generated from TF test vectors */
24082 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24083 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24084 .klen = 16,
24085 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24086 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24087 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030024088 "\x3A",
24089 .ilen = 17,
24090 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
24091 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
24092 "\x0C",
24093 .rlen = 17,
24094 }, { /* Generated from TF test vectors */
24095 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24096 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24097 .klen = 16,
24098 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24099 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24100 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024101 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24102 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24103 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
24104 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24105 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24106 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24107 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24108 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24109 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24110 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24111 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24112 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24113 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24114 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24115 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24116 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24117 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24118 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24119 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24120 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24121 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24122 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24123 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24124 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24125 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24126 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24127 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24128 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24129 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24130 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24131 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24132 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24133 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24134 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24135 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24136 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24137 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24138 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24139 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24140 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24141 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24142 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24143 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24144 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24145 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24146 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24147 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24148 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24149 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24150 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24151 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24152 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24153 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24154 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24155 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24156 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24157 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24158 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24159 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
24160 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
24161 .ilen = 496,
24162 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
24163 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
24164 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
24165 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
24166 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
24167 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
24168 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
24169 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
24170 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
24171 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
24172 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
24173 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
24174 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
24175 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
24176 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
24177 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
24178 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
24179 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
24180 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
24181 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
24182 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
24183 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
24184 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
24185 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
24186 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
24187 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
24188 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
24189 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
24190 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
24191 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
24192 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
24193 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
24194 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
24195 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
24196 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
24197 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
24198 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
24199 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
24200 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
24201 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
24202 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
24203 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
24204 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
24205 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
24206 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
24207 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
24208 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
24209 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
24210 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
24211 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
24212 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
24213 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
24214 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
24215 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
24216 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
24217 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
24218 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
24219 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
24220 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
24221 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
24222 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
24223 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
24224 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024225 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024226 .np = 3,
24227 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024228 },
24229};
24230
24231static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
24232 { /* Generated from TF test vectors */
24233 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24234 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24235 .klen = 16,
24236 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24237 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
24238 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030024239 "\x0C",
24240 .ilen = 17,
24241 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24242 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24243 "\x3A",
24244 .rlen = 17,
24245 }, { /* Generated from TF test vectors */
24246 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24247 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24248 .klen = 16,
24249 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24250 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
24251 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024252 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
24253 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
24254 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
24255 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
24256 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
24257 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
24258 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
24259 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
24260 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
24261 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
24262 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
24263 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
24264 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
24265 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
24266 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
24267 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
24268 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
24269 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
24270 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
24271 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
24272 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
24273 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
24274 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
24275 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
24276 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
24277 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
24278 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
24279 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
24280 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
24281 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
24282 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
24283 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
24284 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
24285 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
24286 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
24287 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
24288 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
24289 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
24290 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
24291 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
24292 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
24293 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
24294 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
24295 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
24296 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
24297 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
24298 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
24299 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
24300 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
24301 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
24302 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
24303 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
24304 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
24305 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
24306 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
24307 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
24308 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
24309 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
24310 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
24311 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
24312 .ilen = 496,
24313 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24314 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24315 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24316 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24317 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
24318 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24319 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24320 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24321 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24322 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24323 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24324 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24325 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24326 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24327 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24328 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24329 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24330 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24331 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24332 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24333 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24334 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24335 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24336 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24337 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24338 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24339 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24340 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24341 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24342 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24343 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24344 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24345 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24346 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24347 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24348 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24349 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24350 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24351 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24352 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24353 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24354 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24355 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24356 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24357 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24358 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24359 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24360 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24361 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24362 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24363 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24364 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24365 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24366 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24367 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24368 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24369 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24370 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24371 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24372 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24373 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
24374 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
24375 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024376 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024377 .np = 3,
24378 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080024379 },
24380};
24381
24382/*
24383 * ARC4 test vectors from OpenSSL
24384 */
24385#define ARC4_ENC_TEST_VECTORS 7
24386#define ARC4_DEC_TEST_VECTORS 7
24387
24388static struct cipher_testvec arc4_enc_tv_template[] = {
24389 {
24390 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24391 .klen = 8,
24392 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24393 .ilen = 8,
24394 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
24395 .rlen = 8,
24396 }, {
24397 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24398 .klen = 8,
24399 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24400 .ilen = 8,
24401 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
24402 .rlen = 8,
24403 }, {
24404 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24405 .klen = 8,
24406 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24407 .ilen = 8,
24408 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
24409 .rlen = 8,
24410 }, {
24411 .key = "\xef\x01\x23\x45",
24412 .klen = 4,
24413 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
24414 "\x00\x00\x00\x00\x00\x00\x00\x00"
24415 "\x00\x00\x00\x00",
24416 .ilen = 20,
24417 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24418 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
24419 "\x36\xb6\x78\x58",
24420 .rlen = 20,
24421 }, {
24422 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24423 .klen = 8,
24424 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24425 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24426 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24427 "\x12\x34\x56\x78",
24428 .ilen = 28,
24429 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
24430 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
24431 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
24432 "\x40\x01\x1e\xcf",
24433 .rlen = 28,
24434 }, {
24435 .key = "\xef\x01\x23\x45",
24436 .klen = 4,
24437 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
24438 "\x00\x00",
24439 .ilen = 10,
24440 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24441 "\xbd\x61",
24442 .rlen = 10,
24443 }, {
24444 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
24445 "\x00\x00\x00\x00\x00\x00\x00\x00",
24446 .klen = 16,
24447 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
24448 .ilen = 8,
24449 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
24450 .rlen = 8,
24451 },
24452};
24453
24454static struct cipher_testvec arc4_dec_tv_template[] = {
24455 {
24456 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24457 .klen = 8,
24458 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
24459 .ilen = 8,
24460 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24461 .rlen = 8,
24462 }, {
24463 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24464 .klen = 8,
24465 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
24466 .ilen = 8,
24467 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24468 .rlen = 8,
24469 }, {
24470 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24471 .klen = 8,
24472 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
24473 .ilen = 8,
24474 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24475 .rlen = 8,
24476 }, {
24477 .key = "\xef\x01\x23\x45",
24478 .klen = 4,
24479 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24480 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
24481 "\x36\xb6\x78\x58",
24482 .ilen = 20,
24483 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
24484 "\x00\x00\x00\x00\x00\x00\x00\x00"
24485 "\x00\x00\x00\x00",
24486 .rlen = 20,
24487 }, {
24488 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24489 .klen = 8,
24490 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
24491 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
24492 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
24493 "\x40\x01\x1e\xcf",
24494 .ilen = 28,
24495 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24496 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24497 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24498 "\x12\x34\x56\x78",
24499 .rlen = 28,
24500 }, {
24501 .key = "\xef\x01\x23\x45",
24502 .klen = 4,
24503 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24504 "\xbd\x61",
24505 .ilen = 10,
24506 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
24507 "\x00\x00",
24508 .rlen = 10,
24509 }, {
24510 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
24511 "\x00\x00\x00\x00\x00\x00\x00\x00",
24512 .klen = 16,
24513 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
24514 .ilen = 8,
24515 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
24516 .rlen = 8,
24517 },
24518};
24519
24520/*
24521 * TEA test vectors
24522 */
24523#define TEA_ENC_TEST_VECTORS 4
24524#define TEA_DEC_TEST_VECTORS 4
24525
24526static struct cipher_testvec tea_enc_tv_template[] = {
24527 {
24528 .key = zeroed_string,
24529 .klen = 16,
24530 .input = zeroed_string,
24531 .ilen = 8,
24532 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
24533 .rlen = 8,
24534 }, {
24535 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24536 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24537 .klen = 16,
24538 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24539 .ilen = 8,
24540 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
24541 .rlen = 8,
24542 }, {
24543 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24544 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24545 .klen = 16,
24546 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24547 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24548 .ilen = 16,
24549 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
24550 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
24551 .rlen = 16,
24552 }, {
24553 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24554 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24555 .klen = 16,
24556 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
24557 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24558 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24559 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24560 .ilen = 32,
24561 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
24562 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
24563 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
24564 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
24565 .rlen = 32,
24566 }
24567};
24568
24569static struct cipher_testvec tea_dec_tv_template[] = {
24570 {
24571 .key = zeroed_string,
24572 .klen = 16,
24573 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
24574 .ilen = 8,
24575 .result = zeroed_string,
24576 .rlen = 8,
24577 }, {
24578 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24579 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24580 .klen = 16,
24581 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
24582 .ilen = 8,
24583 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24584 .rlen = 8,
24585 }, {
24586 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24587 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24588 .klen = 16,
24589 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
24590 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
24591 .ilen = 16,
24592 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24593 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24594 .rlen = 16,
24595 }, {
24596 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24597 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24598 .klen = 16,
24599 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
24600 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
24601 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
24602 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
24603 .ilen = 32,
24604 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
24605 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24606 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24607 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24608 .rlen = 32,
24609 }
24610};
24611
24612/*
24613 * XTEA test vectors
24614 */
24615#define XTEA_ENC_TEST_VECTORS 4
24616#define XTEA_DEC_TEST_VECTORS 4
24617
24618static struct cipher_testvec xtea_enc_tv_template[] = {
24619 {
24620 .key = zeroed_string,
24621 .klen = 16,
24622 .input = zeroed_string,
24623 .ilen = 8,
24624 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
24625 .rlen = 8,
24626 }, {
24627 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24628 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24629 .klen = 16,
24630 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24631 .ilen = 8,
24632 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
24633 .rlen = 8,
24634 }, {
24635 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24636 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24637 .klen = 16,
24638 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24639 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24640 .ilen = 16,
24641 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
24642 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
24643 .rlen = 16,
24644 }, {
24645 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24646 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24647 .klen = 16,
24648 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
24649 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24650 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24651 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24652 .ilen = 32,
24653 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
24654 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
24655 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
24656 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
24657 .rlen = 32,
24658 }
24659};
24660
24661static struct cipher_testvec xtea_dec_tv_template[] = {
24662 {
24663 .key = zeroed_string,
24664 .klen = 16,
24665 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
24666 .ilen = 8,
24667 .result = zeroed_string,
24668 .rlen = 8,
24669 }, {
24670 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24671 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24672 .klen = 16,
24673 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
24674 .ilen = 8,
24675 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24676 .rlen = 8,
24677 }, {
24678 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24679 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24680 .klen = 16,
24681 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
24682 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
24683 .ilen = 16,
24684 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24685 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24686 .rlen = 16,
24687 }, {
24688 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24689 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24690 .klen = 16,
24691 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
24692 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
24693 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
24694 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
24695 .ilen = 32,
24696 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
24697 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24698 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24699 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24700 .rlen = 32,
24701 }
24702};
24703
24704/*
24705 * KHAZAD test vectors.
24706 */
24707#define KHAZAD_ENC_TEST_VECTORS 5
24708#define KHAZAD_DEC_TEST_VECTORS 5
24709
24710static struct cipher_testvec khazad_enc_tv_template[] = {
24711 {
24712 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
24713 "\x00\x00\x00\x00\x00\x00\x00\x00",
24714 .klen = 16,
24715 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24716 .ilen = 8,
24717 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
24718 .rlen = 8,
24719 }, {
24720 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
24721 "\x38\x38\x38\x38\x38\x38\x38\x38",
24722 .klen = 16,
24723 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
24724 .ilen = 8,
24725 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
24726 .rlen = 8,
24727 }, {
24728 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
24729 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24730 .klen = 16,
24731 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24732 .ilen = 8,
24733 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
24734 .rlen = 8,
24735 }, {
24736 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24737 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24738 .klen = 16,
24739 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24740 .ilen = 8,
24741 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24742 .rlen = 8,
24743 }, {
24744 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24745 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24746 .klen = 16,
24747 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24748 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24749 .ilen = 16,
24750 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
24751 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24752 .rlen = 16,
24753 },
24754};
24755
24756static struct cipher_testvec khazad_dec_tv_template[] = {
24757 {
24758 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
24759 "\x00\x00\x00\x00\x00\x00\x00\x00",
24760 .klen = 16,
24761 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
24762 .ilen = 8,
24763 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24764 .rlen = 8,
24765 }, {
24766 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
24767 "\x38\x38\x38\x38\x38\x38\x38\x38",
24768 .klen = 16,
24769 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
24770 .ilen = 8,
24771 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
24772 .rlen = 8,
24773 }, {
24774 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
24775 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24776 .klen = 16,
24777 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
24778 .ilen = 8,
24779 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24780 .rlen = 8,
24781 }, {
24782 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24783 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24784 .klen = 16,
24785 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24786 .ilen = 8,
24787 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24788 .rlen = 8,
24789 }, {
24790 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24791 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24792 .klen = 16,
24793 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
24794 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24795 .ilen = 16,
24796 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24797 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24798 .rlen = 16,
24799 },
24800};
24801
24802/*
24803 * Anubis test vectors.
24804 */
24805
24806#define ANUBIS_ENC_TEST_VECTORS 5
24807#define ANUBIS_DEC_TEST_VECTORS 5
24808#define ANUBIS_CBC_ENC_TEST_VECTORS 2
24809#define ANUBIS_CBC_DEC_TEST_VECTORS 2
24810
24811static struct cipher_testvec anubis_enc_tv_template[] = {
24812 {
24813 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24814 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24815 .klen = 16,
24816 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24817 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24818 .ilen = 16,
24819 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24820 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
24821 .rlen = 16,
24822 }, {
24823
24824 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
24825 "\x03\x03\x03\x03\x03\x03\x03\x03"
24826 "\x03\x03\x03\x03",
24827 .klen = 20,
24828 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
24829 "\x03\x03\x03\x03\x03\x03\x03\x03",
24830 .ilen = 16,
24831 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
24832 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
24833 .rlen = 16,
24834 }, {
24835 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
24836 "\x24\x24\x24\x24\x24\x24\x24\x24"
24837 "\x24\x24\x24\x24\x24\x24\x24\x24"
24838 "\x24\x24\x24\x24",
24839 .klen = 28,
24840 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
24841 "\x24\x24\x24\x24\x24\x24\x24\x24",
24842 .ilen = 16,
24843 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
24844 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
24845 .rlen = 16,
24846 }, {
24847 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
24848 "\x25\x25\x25\x25\x25\x25\x25\x25"
24849 "\x25\x25\x25\x25\x25\x25\x25\x25"
24850 "\x25\x25\x25\x25\x25\x25\x25\x25",
24851 .klen = 32,
24852 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
24853 "\x25\x25\x25\x25\x25\x25\x25\x25",
24854 .ilen = 16,
24855 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
24856 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
24857 .rlen = 16,
24858 }, {
24859 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24860 "\x35\x35\x35\x35\x35\x35\x35\x35"
24861 "\x35\x35\x35\x35\x35\x35\x35\x35"
24862 "\x35\x35\x35\x35\x35\x35\x35\x35"
24863 "\x35\x35\x35\x35\x35\x35\x35\x35",
24864 .klen = 40,
24865 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
24866 "\x35\x35\x35\x35\x35\x35\x35\x35",
24867 .ilen = 16,
24868 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24869 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
24870 .rlen = 16,
24871 },
24872};
24873
24874static struct cipher_testvec anubis_dec_tv_template[] = {
24875 {
24876 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24877 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24878 .klen = 16,
24879 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24880 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
24881 .ilen = 16,
24882 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24883 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24884 .rlen = 16,
24885 }, {
24886
24887 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
24888 "\x03\x03\x03\x03\x03\x03\x03\x03"
24889 "\x03\x03\x03\x03",
24890 .klen = 20,
24891 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
24892 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
24893 .ilen = 16,
24894 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
24895 "\x03\x03\x03\x03\x03\x03\x03\x03",
24896 .rlen = 16,
24897 }, {
24898 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
24899 "\x24\x24\x24\x24\x24\x24\x24\x24"
24900 "\x24\x24\x24\x24\x24\x24\x24\x24"
24901 "\x24\x24\x24\x24",
24902 .klen = 28,
24903 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
24904 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
24905 .ilen = 16,
24906 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
24907 "\x24\x24\x24\x24\x24\x24\x24\x24",
24908 .rlen = 16,
24909 }, {
24910 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
24911 "\x25\x25\x25\x25\x25\x25\x25\x25"
24912 "\x25\x25\x25\x25\x25\x25\x25\x25"
24913 "\x25\x25\x25\x25\x25\x25\x25\x25",
24914 .klen = 32,
24915 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
24916 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
24917 .ilen = 16,
24918 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
24919 "\x25\x25\x25\x25\x25\x25\x25\x25",
24920 .rlen = 16,
24921 }, {
24922 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24923 "\x35\x35\x35\x35\x35\x35\x35\x35"
24924 "\x35\x35\x35\x35\x35\x35\x35\x35"
24925 "\x35\x35\x35\x35\x35\x35\x35\x35"
24926 "\x35\x35\x35\x35\x35\x35\x35\x35",
24927 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24928 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
24929 .klen = 40,
24930 .ilen = 16,
24931 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
24932 "\x35\x35\x35\x35\x35\x35\x35\x35",
24933 .rlen = 16,
24934 },
24935};
24936
24937static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
24938 {
24939 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24940 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24941 .klen = 16,
24942 .input = "\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 .ilen = 32,
24947 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24948 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
24949 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
24950 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
24951 .rlen = 32,
24952 }, {
24953 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24954 "\x35\x35\x35\x35\x35\x35\x35\x35"
24955 "\x35\x35\x35\x35\x35\x35\x35\x35"
24956 "\x35\x35\x35\x35\x35\x35\x35\x35"
24957 "\x35\x35\x35\x35\x35\x35\x35\x35",
24958 .klen = 40,
24959 .input = "\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 .ilen = 32,
24964 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24965 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
24966 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
24967 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
24968 .rlen = 32,
24969 },
24970};
24971
24972static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
24973 {
24974 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24975 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24976 .klen = 16,
24977 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24978 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
24979 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
24980 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
24981 .ilen = 32,
24982 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24983 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24984 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24985 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24986 .rlen = 32,
24987 }, {
24988 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24989 "\x35\x35\x35\x35\x35\x35\x35\x35"
24990 "\x35\x35\x35\x35\x35\x35\x35\x35"
24991 "\x35\x35\x35\x35\x35\x35\x35\x35"
24992 "\x35\x35\x35\x35\x35\x35\x35\x35",
24993 .klen = 40,
24994 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24995 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
24996 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
24997 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
24998 .ilen = 32,
24999 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
25000 "\x35\x35\x35\x35\x35\x35\x35\x35"
25001 "\x35\x35\x35\x35\x35\x35\x35\x35"
25002 "\x35\x35\x35\x35\x35\x35\x35\x35",
25003 .rlen = 32,
25004 },
25005};
25006
25007/*
25008 * XETA test vectors
25009 */
25010#define XETA_ENC_TEST_VECTORS 4
25011#define XETA_DEC_TEST_VECTORS 4
25012
25013static struct cipher_testvec xeta_enc_tv_template[] = {
25014 {
25015 .key = zeroed_string,
25016 .klen = 16,
25017 .input = zeroed_string,
25018 .ilen = 8,
25019 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
25020 .rlen = 8,
25021 }, {
25022 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25023 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25024 .klen = 16,
25025 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25026 .ilen = 8,
25027 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
25028 .rlen = 8,
25029 }, {
25030 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
25031 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25032 .klen = 16,
25033 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25034 "\x65\x73\x74\x5f\x76\x65\x63\x74",
25035 .ilen = 16,
25036 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
25037 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
25038 .rlen = 16,
25039 }, {
25040 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25041 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25042 .klen = 16,
25043 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
25044 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25045 "\x79\x6f\x75\x21\x21\x21\x20\x72"
25046 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25047 .ilen = 32,
25048 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
25049 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
25050 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
25051 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
25052 .rlen = 32,
25053 }
25054};
25055
25056static struct cipher_testvec xeta_dec_tv_template[] = {
25057 {
25058 .key = zeroed_string,
25059 .klen = 16,
25060 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
25061 .ilen = 8,
25062 .result = zeroed_string,
25063 .rlen = 8,
25064 }, {
25065 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25066 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25067 .klen = 16,
25068 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
25069 .ilen = 8,
25070 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25071 .rlen = 8,
25072 }, {
25073 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
25074 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25075 .klen = 16,
25076 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
25077 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
25078 .ilen = 16,
25079 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25080 "\x65\x73\x74\x5f\x76\x65\x63\x74",
25081 .rlen = 16,
25082 }, {
25083 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25084 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25085 .klen = 16,
25086 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
25087 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
25088 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
25089 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
25090 .ilen = 32,
25091 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
25092 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25093 "\x79\x6f\x75\x21\x21\x21\x20\x72"
25094 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25095 .rlen = 32,
25096 }
25097};
25098
25099/*
25100 * FCrypt test vectors
25101 */
25102#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
25103#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
25104
25105static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
25106 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
25107 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
25108 .klen = 8,
25109 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
25110 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
25111 .ilen = 8,
25112 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
25113 .rlen = 8,
25114 }, {
25115 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
25116 .klen = 8,
25117 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
25118 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
25119 .ilen = 8,
25120 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
25121 .rlen = 8,
25122 }, { /* From Arla */
25123 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25124 .klen = 8,
25125 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25126 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
25127 .ilen = 48,
25128 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
25129 "\xee\xac\x98\x62\x44\x51\xe4\x84"
25130 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
25131 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
25132 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
25133 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
25134 .rlen = 48,
25135 }, {
25136 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25137 .klen = 8,
25138 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25139 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
25140 .ilen = 48,
25141 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
25142 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
25143 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
25144 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
25145 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
25146 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
25147 .rlen = 48,
25148 }, { /* split-page version */
25149 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25150 .klen = 8,
25151 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25152 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
25153 .ilen = 48,
25154 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
25155 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
25156 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
25157 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
25158 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
25159 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
25160 .rlen = 48,
25161 .np = 2,
25162 .tap = { 20, 28 },
25163 }
25164};
25165
25166static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
25167 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
25168 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
25169 .klen = 8,
25170 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
25171 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
25172 .ilen = 8,
25173 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
25174 .rlen = 8,
25175 }, {
25176 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
25177 .klen = 8,
25178 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
25179 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
25180 .ilen = 8,
25181 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
25182 .rlen = 8,
25183 }, { /* From Arla */
25184 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25185 .klen = 8,
25186 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25187 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
25188 "\xee\xac\x98\x62\x44\x51\xe4\x84"
25189 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
25190 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
25191 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
25192 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
25193 .ilen = 48,
25194 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
25195 .rlen = 48,
25196 }, {
25197 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25198 .klen = 8,
25199 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25200 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
25201 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
25202 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
25203 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
25204 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
25205 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
25206 .ilen = 48,
25207 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
25208 .rlen = 48,
25209 }, { /* split-page version */
25210 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25211 .klen = 8,
25212 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
25213 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
25214 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
25215 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
25216 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
25217 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
25218 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
25219 .ilen = 48,
25220 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
25221 .rlen = 48,
25222 .np = 2,
25223 .tap = { 20, 28 },
25224 }
25225};
25226
25227/*
25228 * CAMELLIA test vectors.
25229 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025230#define CAMELLIA_ENC_TEST_VECTORS 4
25231#define CAMELLIA_DEC_TEST_VECTORS 4
25232#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
25233#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
25234#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
25235#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
25236#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
25237#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
25238#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
25239#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080025240
25241static struct cipher_testvec camellia_enc_tv_template[] = {
25242 {
25243 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25244 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25245 .klen = 16,
25246 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25247 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25248 .ilen = 16,
25249 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
25250 "\x08\x57\x06\x56\x48\xea\xbe\x43",
25251 .rlen = 16,
25252 }, {
25253 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25254 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25255 "\x00\x11\x22\x33\x44\x55\x66\x77",
25256 .klen = 24,
25257 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25258 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25259 .ilen = 16,
25260 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
25261 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
25262 .rlen = 16,
25263 }, {
25264 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25265 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25266 "\x00\x11\x22\x33\x44\x55\x66\x77"
25267 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
25268 .klen = 32,
25269 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25270 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25271 .ilen = 16,
25272 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
25273 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
25274 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025275 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025276 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
25277 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
25278 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
25279 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
25280 .klen = 32,
25281 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25282 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25283 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25284 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25285 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025286 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25287 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25288 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25289 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25290 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25291 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25292 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25293 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25294 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25295 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25296 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25297 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25298 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25299 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25300 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25301 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25302 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25303 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25304 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25305 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25306 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25307 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25308 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25309 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25310 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25311 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25312 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25313 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25314 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25315 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25316 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25317 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25318 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25319 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25320 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25321 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25322 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25323 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25324 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25325 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25326 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25327 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25328 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25329 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25330 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25331 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25332 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25333 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25334 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25335 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25336 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25337 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25338 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25339 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25340 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25341 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025342 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25343 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25344 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25345 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25346 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25347 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25348 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25349 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25350 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25351 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25352 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25353 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25354 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25355 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25356 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25357 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25358 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25359 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25360 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25361 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25362 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25363 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25364 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25365 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25366 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25367 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25368 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25369 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25370 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25371 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25372 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25373 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25374 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25375 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25376 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25377 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25378 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25379 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25380 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25381 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25382 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25383 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25384 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25385 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25386 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25387 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25388 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25389 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25390 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25391 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25392 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25393 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25394 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25395 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25396 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25397 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25398 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25399 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25400 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25401 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25402 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25403 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25404 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25405 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25406 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25407 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025408 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
25409 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
25410 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
25411 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
25412 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025413 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
25414 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
25415 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
25416 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
25417 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
25418 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
25419 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
25420 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
25421 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
25422 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
25423 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
25424 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
25425 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
25426 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
25427 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
25428 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
25429 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
25430 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
25431 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
25432 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
25433 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
25434 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
25435 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
25436 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
25437 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
25438 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
25439 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
25440 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
25441 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
25442 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
25443 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
25444 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
25445 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
25446 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
25447 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
25448 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
25449 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
25450 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
25451 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
25452 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
25453 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
25454 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
25455 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
25456 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
25457 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
25458 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
25459 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
25460 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
25461 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
25462 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
25463 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
25464 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
25465 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
25466 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
25467 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
25468 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025469 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
25470 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
25471 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
25472 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
25473 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
25474 "\xED\x28\x39\xE9\x63\xED\x41\x70"
25475 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
25476 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
25477 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
25478 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
25479 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
25480 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
25481 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
25482 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
25483 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
25484 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
25485 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
25486 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
25487 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
25488 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
25489 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
25490 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
25491 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
25492 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
25493 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
25494 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
25495 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
25496 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
25497 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
25498 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
25499 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
25500 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
25501 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
25502 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
25503 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
25504 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
25505 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
25506 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
25507 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
25508 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
25509 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
25510 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
25511 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
25512 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
25513 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
25514 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
25515 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
25516 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
25517 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
25518 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
25519 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
25520 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
25521 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
25522 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
25523 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
25524 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
25525 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
25526 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
25527 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
25528 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
25529 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
25530 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
25531 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
25532 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
25533 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
25534 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025535 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025536 .np = 3,
25537 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025538 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025539};
25540
25541static struct cipher_testvec camellia_dec_tv_template[] = {
25542 {
25543 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25544 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25545 .klen = 16,
25546 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
25547 "\x08\x57\x06\x56\x48\xea\xbe\x43",
25548 .ilen = 16,
25549 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25550 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25551 .rlen = 16,
25552 }, {
25553 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25554 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25555 "\x00\x11\x22\x33\x44\x55\x66\x77",
25556 .klen = 24,
25557 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
25558 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
25559 .ilen = 16,
25560 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25561 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25562 .rlen = 16,
25563 }, {
25564 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25565 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25566 "\x00\x11\x22\x33\x44\x55\x66\x77"
25567 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
25568 .klen = 32,
25569 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
25570 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
25571 .ilen = 16,
25572 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25573 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25574 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025575 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025576 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
25577 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
25578 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
25579 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
25580 .klen = 32,
25581 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
25582 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
25583 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
25584 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
25585 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025586 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
25587 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
25588 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
25589 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
25590 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
25591 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
25592 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
25593 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
25594 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
25595 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
25596 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
25597 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
25598 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
25599 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
25600 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
25601 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
25602 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
25603 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
25604 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
25605 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
25606 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
25607 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
25608 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
25609 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
25610 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
25611 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
25612 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
25613 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
25614 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
25615 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
25616 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
25617 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
25618 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
25619 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
25620 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
25621 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
25622 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
25623 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
25624 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
25625 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
25626 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
25627 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
25628 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
25629 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
25630 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
25631 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
25632 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
25633 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
25634 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
25635 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
25636 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
25637 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
25638 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
25639 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
25640 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
25641 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025642 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
25643 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
25644 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
25645 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
25646 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
25647 "\xED\x28\x39\xE9\x63\xED\x41\x70"
25648 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
25649 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
25650 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
25651 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
25652 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
25653 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
25654 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
25655 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
25656 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
25657 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
25658 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
25659 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
25660 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
25661 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
25662 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
25663 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
25664 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
25665 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
25666 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
25667 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
25668 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
25669 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
25670 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
25671 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
25672 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
25673 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
25674 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
25675 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
25676 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
25677 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
25678 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
25679 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
25680 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
25681 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
25682 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
25683 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
25684 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
25685 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
25686 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
25687 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
25688 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
25689 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
25690 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
25691 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
25692 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
25693 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
25694 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
25695 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
25696 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
25697 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
25698 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
25699 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
25700 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
25701 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
25702 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
25703 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
25704 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
25705 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
25706 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
25707 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025708 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25709 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25710 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25711 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25712 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025713 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25714 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25715 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25716 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25717 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25718 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25719 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25720 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25721 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25722 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25723 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25724 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25725 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25726 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25727 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25728 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25729 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25730 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25731 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25732 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25733 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25734 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25735 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25736 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25737 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25738 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25739 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25740 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25741 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25742 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25743 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25744 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25745 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25746 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25747 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25748 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25749 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25750 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25751 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25752 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25753 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25754 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25755 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25756 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25757 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25758 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25759 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25760 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25761 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25762 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25763 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25764 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25765 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25766 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25767 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25768 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025769 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25770 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25771 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25772 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25773 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25774 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25775 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25776 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25777 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25778 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25779 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25780 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25781 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25782 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25783 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25784 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25785 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25786 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25787 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25788 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25789 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25790 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25791 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25792 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25793 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25794 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25795 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25796 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25797 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25798 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25799 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25800 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25801 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25802 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25803 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25804 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25805 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25806 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25807 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25808 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25809 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25810 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25811 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25812 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25813 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25814 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25815 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25816 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25817 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25818 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25819 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25820 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25821 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25822 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25823 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25824 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25825 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25826 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25827 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25828 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25829 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25830 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25831 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25832 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25833 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25834 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025835 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025836 .np = 3,
25837 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025838 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025839};
25840
25841static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
25842 {
25843 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
25844 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
25845 .klen = 16,
25846 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
25847 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
25848 .input = "Single block msg",
25849 .ilen = 16,
25850 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
25851 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
25852 .rlen = 16,
25853 }, {
25854 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
25855 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
25856 .klen = 16,
25857 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
25858 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
25859 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
25860 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
25861 "\x10\x11\x12\x13\x14\x15\x16\x17"
25862 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
25863 .ilen = 32,
25864 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
25865 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
25866 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
25867 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
25868 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025869 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025870 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25871 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25872 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25873 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25874 .klen = 32,
25875 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
25876 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
25877 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25878 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25879 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25880 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25881 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025882 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25883 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25884 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25885 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25886 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25887 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25888 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25889 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25890 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25891 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25892 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25893 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25894 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25895 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25896 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25897 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25898 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25899 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25900 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25901 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25902 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25903 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25904 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25905 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25906 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25907 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25908 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25909 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25910 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25911 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25912 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25913 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25914 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25915 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25916 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25917 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25918 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25919 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25920 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25921 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25922 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25923 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25924 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25925 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25926 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25927 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25928 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25929 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25930 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25931 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25932 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25933 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25934 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25935 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25936 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25937 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025938 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25939 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25940 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25941 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25942 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25943 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25944 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25945 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25946 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25947 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25948 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25949 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25950 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25951 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25952 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25953 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25954 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25955 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25956 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25957 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25958 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25959 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25960 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25961 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25962 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25963 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25964 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25965 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25966 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25967 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25968 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25969 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25970 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25971 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25972 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25973 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25974 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25975 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25976 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25977 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25978 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25979 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25980 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25981 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25982 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25983 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25984 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25985 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25986 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25987 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25988 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25989 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25990 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25991 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25992 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25993 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25994 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25995 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25996 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25997 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25998 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25999 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26000 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26001 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26002 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26003 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026004 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
26005 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
26006 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
26007 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
26008 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026009 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
26010 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
26011 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
26012 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
26013 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
26014 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
26015 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
26016 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
26017 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
26018 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
26019 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
26020 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
26021 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
26022 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
26023 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
26024 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
26025 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
26026 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
26027 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
26028 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
26029 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
26030 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
26031 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
26032 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
26033 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
26034 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
26035 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
26036 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
26037 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
26038 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
26039 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
26040 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
26041 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
26042 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
26043 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
26044 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
26045 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
26046 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
26047 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
26048 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
26049 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
26050 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
26051 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
26052 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
26053 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
26054 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
26055 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
26056 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
26057 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
26058 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
26059 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
26060 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
26061 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
26062 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
26063 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
26064 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026065 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
26066 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
26067 "\x21\x41\x56\x72\x13\xE1\x86\x07"
26068 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
26069 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
26070 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
26071 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
26072 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
26073 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
26074 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
26075 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
26076 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
26077 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
26078 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
26079 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
26080 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
26081 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
26082 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
26083 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
26084 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
26085 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
26086 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
26087 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
26088 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
26089 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
26090 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
26091 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
26092 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
26093 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
26094 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
26095 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
26096 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
26097 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
26098 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
26099 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
26100 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
26101 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
26102 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
26103 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
26104 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
26105 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
26106 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
26107 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
26108 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
26109 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
26110 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
26111 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
26112 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
26113 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
26114 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
26115 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
26116 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
26117 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
26118 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
26119 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
26120 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
26121 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
26122 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
26123 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
26124 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
26125 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
26126 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
26127 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
26128 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
26129 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
26130 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026131 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020026132 .np = 3,
26133 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026134 },
Herbert Xuda7f0332008-07-31 17:08:25 +080026135};
26136
26137static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
26138 {
26139 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
26140 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
26141 .klen = 16,
26142 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
26143 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
26144 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
26145 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
26146 .ilen = 16,
26147 .result = "Single block msg",
26148 .rlen = 16,
26149 }, {
26150 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
26151 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
26152 .klen = 16,
26153 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
26154 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
26155 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
26156 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
26157 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
26158 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
26159 .ilen = 32,
26160 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
26161 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
26162 "\x10\x11\x12\x13\x14\x15\x16\x17"
26163 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
26164 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026165 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026166 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26167 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26168 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26169 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26170 .klen = 32,
26171 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26172 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26173 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
26174 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
26175 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
26176 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
26177 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026178 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
26179 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
26180 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
26181 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
26182 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
26183 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
26184 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
26185 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
26186 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
26187 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
26188 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
26189 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
26190 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
26191 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
26192 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
26193 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
26194 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
26195 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
26196 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
26197 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
26198 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
26199 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
26200 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
26201 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
26202 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
26203 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
26204 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
26205 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
26206 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
26207 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
26208 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
26209 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
26210 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
26211 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
26212 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
26213 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
26214 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
26215 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
26216 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
26217 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
26218 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
26219 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
26220 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
26221 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
26222 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
26223 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
26224 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
26225 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
26226 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
26227 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
26228 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
26229 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
26230 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
26231 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
26232 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
26233 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026234 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
26235 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
26236 "\x21\x41\x56\x72\x13\xE1\x86\x07"
26237 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
26238 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
26239 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
26240 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
26241 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
26242 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
26243 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
26244 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
26245 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
26246 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
26247 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
26248 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
26249 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
26250 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
26251 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
26252 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
26253 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
26254 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
26255 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
26256 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
26257 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
26258 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
26259 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
26260 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
26261 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
26262 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
26263 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
26264 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
26265 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
26266 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
26267 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
26268 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
26269 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
26270 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
26271 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
26272 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
26273 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
26274 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
26275 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
26276 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
26277 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
26278 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
26279 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
26280 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
26281 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
26282 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
26283 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
26284 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
26285 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
26286 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
26287 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
26288 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
26289 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
26290 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
26291 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
26292 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
26293 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
26294 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
26295 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
26296 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
26297 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
26298 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
26299 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026300 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26301 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26302 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26303 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26304 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026305 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26306 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26307 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26308 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26309 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26310 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26311 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26312 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26313 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26314 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26315 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26316 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26317 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26318 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26319 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26320 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26321 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26322 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26323 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26324 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26325 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26326 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26327 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26328 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26329 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26330 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26331 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26332 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26333 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26334 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26335 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26336 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26337 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26338 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26339 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26340 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26341 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26342 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26343 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26344 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26345 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26346 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26347 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26348 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26349 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26350 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26351 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26352 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26353 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26354 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26355 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26356 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26357 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26358 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26359 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26360 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026361 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26362 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26363 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26364 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26365 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26366 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26367 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26368 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26369 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26370 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26371 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26372 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26373 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26374 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26375 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26376 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26377 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26378 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26379 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26380 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26381 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26382 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26383 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26384 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26385 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26386 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26387 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26388 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26389 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26390 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26391 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26392 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26393 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26394 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26395 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26396 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26397 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26398 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26399 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26400 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26401 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26402 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26403 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26404 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26405 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26406 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26407 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26408 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26409 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26410 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26411 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26412 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26413 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26414 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26415 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26416 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26417 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26418 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26419 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26420 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26421 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26422 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26423 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26424 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26425 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26426 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026427 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020026428 .np = 3,
26429 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026430 },
26431};
26432
26433static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
26434 { /* Generated with Crypto++ */
26435 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26436 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26437 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26438 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26439 .klen = 32,
26440 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26441 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26442 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26443 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26444 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26445 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26446 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026447 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26448 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26449 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26450 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26451 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26452 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26453 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26454 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26455 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26456 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26457 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26458 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26459 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26460 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26461 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26462 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26463 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26464 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26465 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26466 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26467 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26468 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26469 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26470 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26471 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26472 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26473 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26474 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26475 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26476 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26477 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26478 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26479 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26480 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26481 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26482 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26483 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26484 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26485 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26486 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26487 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26488 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26489 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26490 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26491 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26492 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26493 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26494 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26495 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26496 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26497 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26498 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26499 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26500 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26501 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26502 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26503 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
26504 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026505 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26506 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26507 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26508 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26509 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026510 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
26511 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26512 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26513 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26514 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26515 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26516 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26517 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26518 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26519 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26520 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26521 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26522 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26523 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26524 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26525 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26526 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26527 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26528 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26529 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26530 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26531 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26532 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26533 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26534 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26535 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26536 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26537 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26538 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26539 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26540 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26541 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26542 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26543 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26544 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26545 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26546 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26547 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26548 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26549 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26550 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26551 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26552 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26553 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26554 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26555 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26556 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26557 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26558 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26559 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26560 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26561 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26562 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26563 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26564 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26565 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26566 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
26567 .rlen = 496,
26568 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026569 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26570 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26571 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26572 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26573 .klen = 32,
26574 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26575 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26576 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26577 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26578 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26579 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26580 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26581 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026582 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26583 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26584 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26585 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26586 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26587 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26588 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26589 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26590 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26591 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26592 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26593 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26594 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26595 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26596 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26597 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26598 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26599 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26600 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26601 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26602 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26603 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26604 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26605 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26606 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26607 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26608 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26609 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26610 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26611 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26612 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26613 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26614 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26615 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26616 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26617 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26618 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26619 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26620 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26621 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26622 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26623 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26624 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26625 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26626 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26627 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26628 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26629 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26630 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26631 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26632 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26633 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26634 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26635 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26636 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26637 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026638 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26639 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26640 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26641 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26642 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26643 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26644 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26645 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26646 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26647 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26648 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26649 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26650 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26651 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26652 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26653 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26654 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26655 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26656 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26657 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26658 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26659 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26660 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26661 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26662 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26663 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26664 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26665 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26666 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26667 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26668 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26669 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26670 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26671 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26672 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26673 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26674 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26675 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26676 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26677 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26678 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26679 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26680 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26681 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26682 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26683 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26684 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26685 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26686 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26687 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26688 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26689 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26690 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26691 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26692 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26693 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26694 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26695 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26696 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26697 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26698 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26699 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26700 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26701 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
26702 "\xE4\x7B\x12",
26703 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026704 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26705 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26706 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26707 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26708 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
26709 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026710 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26711 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26712 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26713 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26714 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26715 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26716 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26717 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26718 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26719 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26720 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26721 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26722 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26723 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26724 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26725 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26726 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26727 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26728 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26729 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26730 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26731 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26732 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26733 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26734 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26735 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26736 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26737 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26738 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26739 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26740 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26741 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26742 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26743 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26744 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26745 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26746 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26747 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26748 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26749 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26750 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26751 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26752 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26753 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26754 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26755 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26756 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26757 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26758 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26759 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26760 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26761 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26762 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26763 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26764 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26765 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026766 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
26767 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
26768 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
26769 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
26770 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
26771 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
26772 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
26773 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
26774 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
26775 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
26776 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
26777 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
26778 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
26779 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
26780 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
26781 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
26782 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
26783 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
26784 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
26785 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
26786 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
26787 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
26788 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
26789 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
26790 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
26791 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
26792 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
26793 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
26794 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
26795 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
26796 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
26797 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
26798 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
26799 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
26800 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
26801 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
26802 "\x00\x70\x12\x56\x56\x50\xAD\x14"
26803 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
26804 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
26805 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
26806 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
26807 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
26808 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
26809 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
26810 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
26811 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
26812 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
26813 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
26814 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
26815 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
26816 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
26817 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
26818 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
26819 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
26820 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
26821 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
26822 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
26823 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
26824 "\x74\x28\x9D\x05\x30\x20\x62\x41"
26825 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
26826 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
26827 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
26828 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
26829 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
26830 "\xF1\x6B\xD9",
26831 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026832 .also_non_np = 1,
26833 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026834 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030026835 }, { /* Generated with Crypto++ */
26836 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26837 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26838 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26839 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26840 .klen = 32,
26841 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
26842 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
26843 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26844 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26845 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26846 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26847 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26848 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26849 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26850 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26851 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26852 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26853 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26854 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26855 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26856 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26857 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26858 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26859 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26860 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26861 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26862 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26863 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26864 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26865 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26866 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26867 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26868 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26869 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26870 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26871 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26872 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26873 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26874 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26875 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26876 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26877 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26878 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26879 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26880 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26881 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26882 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26883 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26884 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26885 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26886 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26887 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26888 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26889 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26890 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26891 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26892 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26893 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26894 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26895 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26896 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26897 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26898 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26899 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26900 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26901 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26902 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26903 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026904 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26905 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26906 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26907 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26908 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26909 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26910 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26911 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26912 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26913 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26914 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26915 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26916 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26917 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26918 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26919 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26920 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26921 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26922 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26923 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26924 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26925 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26926 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26927 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26928 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26929 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26930 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26931 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26932 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26933 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26934 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26935 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26936 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26937 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26938 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26939 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26940 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26941 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26942 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26943 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26944 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26945 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26946 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26947 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26948 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26949 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26950 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26951 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26952 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26953 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26954 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26955 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26956 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26957 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26958 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26959 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26960 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26961 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26962 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26963 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26964 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26965 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26966 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26967 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26968 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26969 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030026970 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
26971 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
26972 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
26973 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
26974 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
26975 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
26976 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
26977 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
26978 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
26979 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
26980 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
26981 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
26982 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
26983 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
26984 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
26985 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
26986 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
26987 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
26988 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
26989 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
26990 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
26991 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
26992 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
26993 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
26994 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
26995 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
26996 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
26997 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
26998 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
26999 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
27000 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
27001 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
27002 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
27003 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
27004 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
27005 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
27006 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
27007 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
27008 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
27009 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
27010 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
27011 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
27012 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
27013 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
27014 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
27015 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
27016 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
27017 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
27018 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
27019 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
27020 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
27021 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
27022 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
27023 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
27024 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
27025 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
27026 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
27027 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
27028 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
27029 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
27030 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027031 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
27032 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
27033 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
27034 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
27035 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
27036 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
27037 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
27038 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
27039 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
27040 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
27041 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
27042 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
27043 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
27044 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
27045 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
27046 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
27047 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
27048 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
27049 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
27050 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
27051 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
27052 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
27053 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
27054 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
27055 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
27056 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
27057 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
27058 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
27059 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
27060 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
27061 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
27062 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
27063 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
27064 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
27065 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
27066 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
27067 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
27068 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
27069 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
27070 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
27071 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
27072 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
27073 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
27074 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
27075 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
27076 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
27077 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
27078 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
27079 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
27080 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
27081 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
27082 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
27083 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
27084 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
27085 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
27086 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
27087 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
27088 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
27089 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
27090 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
27091 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
27092 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
27093 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
27094 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
27095 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
27096 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027097 },
27098};
27099
27100static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
27101 { /* Generated with Crypto++ */
27102 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27103 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27104 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27105 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27106 .klen = 32,
27107 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27108 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27109 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
27110 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
27111 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
27112 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
27113 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027114 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
27115 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
27116 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
27117 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
27118 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
27119 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
27120 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
27121 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
27122 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
27123 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
27124 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
27125 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
27126 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
27127 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
27128 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
27129 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
27130 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
27131 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
27132 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
27133 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
27134 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
27135 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
27136 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
27137 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
27138 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
27139 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
27140 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
27141 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
27142 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
27143 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
27144 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
27145 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
27146 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
27147 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
27148 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
27149 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
27150 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
27151 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
27152 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
27153 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
27154 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
27155 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
27156 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
27157 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
27158 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
27159 "\x76\x44\x45\xF3\x24\x11\x57\x98"
27160 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
27161 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
27162 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
27163 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
27164 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
27165 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
27166 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
27167 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
27168 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
27169 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
27170 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
27171 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027172 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27173 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27174 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27175 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27176 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027177 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27178 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27179 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27180 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27181 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27182 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27183 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27184 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27185 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27186 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27187 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27188 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27189 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27190 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27191 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27192 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27193 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27194 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27195 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27196 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27197 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27198 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27199 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27200 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27201 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27202 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27203 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27204 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27205 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27206 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27207 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27208 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27209 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27210 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27211 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27212 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27213 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27214 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27215 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27216 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27217 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27218 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27219 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27220 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27221 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27222 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27223 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27224 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27225 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27226 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27227 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27228 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27229 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27230 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27231 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27232 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27233 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
27234 .rlen = 496,
27235 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027236 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27237 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27238 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27239 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27240 .klen = 32,
27241 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27242 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27243 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
27244 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
27245 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
27246 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
27247 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
27248 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027249 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
27250 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
27251 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
27252 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
27253 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
27254 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
27255 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
27256 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
27257 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
27258 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
27259 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
27260 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
27261 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
27262 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
27263 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
27264 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
27265 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
27266 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
27267 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
27268 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
27269 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
27270 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
27271 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
27272 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
27273 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
27274 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
27275 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
27276 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
27277 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
27278 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
27279 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
27280 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
27281 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
27282 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
27283 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
27284 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
27285 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
27286 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
27287 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
27288 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
27289 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
27290 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
27291 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
27292 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
27293 "\x76\x44\x45\xF3\x24\x11\x57\x98"
27294 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
27295 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
27296 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
27297 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
27298 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
27299 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
27300 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
27301 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
27302 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
27303 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
27304 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027305 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
27306 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
27307 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
27308 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
27309 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
27310 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
27311 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
27312 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
27313 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
27314 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
27315 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
27316 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
27317 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
27318 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
27319 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
27320 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
27321 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
27322 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
27323 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
27324 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
27325 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
27326 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
27327 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
27328 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
27329 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
27330 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
27331 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
27332 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
27333 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
27334 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
27335 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
27336 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
27337 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
27338 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
27339 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
27340 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
27341 "\x00\x70\x12\x56\x56\x50\xAD\x14"
27342 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
27343 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
27344 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
27345 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
27346 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
27347 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
27348 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
27349 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
27350 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
27351 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
27352 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
27353 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
27354 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
27355 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
27356 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
27357 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
27358 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
27359 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
27360 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
27361 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
27362 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
27363 "\x74\x28\x9D\x05\x30\x20\x62\x41"
27364 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
27365 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
27366 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
27367 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
27368 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
27369 "\xF1\x6B\xD9",
27370 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027371 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27372 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27373 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27374 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27375 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27376 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027377 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27378 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27379 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27380 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27381 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27382 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27383 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27384 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27385 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27386 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27387 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27388 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27389 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27390 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27391 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27392 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27393 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27394 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27395 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27396 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27397 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27398 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27399 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27400 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27401 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27402 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27403 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27404 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27405 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27406 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27407 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27408 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27409 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27410 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27411 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27412 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27413 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27414 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27415 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27416 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27417 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27418 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27419 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27420 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27421 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27422 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27423 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27424 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27425 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27426 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27427 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27428 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27429 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27430 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27431 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27432 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027433 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27434 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27435 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27436 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27437 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27438 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27439 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27440 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27441 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27442 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27443 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27444 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27445 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27446 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27447 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27448 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27449 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27450 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27451 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27452 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27453 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27454 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27455 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27456 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27457 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27458 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27459 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27460 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27461 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27462 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27463 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27464 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27465 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27466 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27467 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27468 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27469 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27470 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27471 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27472 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27473 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27474 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27475 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27476 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27477 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27478 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27479 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27480 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27481 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27482 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27483 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27484 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27485 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27486 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27487 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27488 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27489 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27490 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27491 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27492 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27493 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27494 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27495 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27496 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
27497 "\xE4\x7B\x12",
27498 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027499 .also_non_np = 1,
27500 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027501 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030027502 }, { /* Generated with Crypto++ */
27503 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27504 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27505 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27506 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27507 .klen = 32,
27508 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
27509 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
27510 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
27511 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
27512 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
27513 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
27514 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
27515 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
27516 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
27517 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
27518 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
27519 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
27520 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
27521 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
27522 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
27523 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
27524 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
27525 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
27526 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
27527 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
27528 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
27529 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
27530 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
27531 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
27532 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
27533 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
27534 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
27535 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
27536 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
27537 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
27538 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
27539 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
27540 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
27541 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
27542 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
27543 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
27544 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
27545 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
27546 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
27547 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
27548 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
27549 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
27550 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
27551 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
27552 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
27553 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
27554 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
27555 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
27556 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
27557 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
27558 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
27559 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
27560 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
27561 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
27562 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
27563 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
27564 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
27565 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
27566 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
27567 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
27568 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
27569 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
27570 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027571 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
27572 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
27573 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
27574 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
27575 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
27576 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
27577 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
27578 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
27579 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
27580 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
27581 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
27582 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
27583 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
27584 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
27585 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
27586 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
27587 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
27588 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
27589 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
27590 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
27591 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
27592 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
27593 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
27594 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
27595 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
27596 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
27597 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
27598 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
27599 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
27600 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
27601 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
27602 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
27603 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
27604 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
27605 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
27606 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
27607 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
27608 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
27609 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
27610 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
27611 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
27612 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
27613 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
27614 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
27615 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
27616 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
27617 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
27618 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
27619 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
27620 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
27621 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
27622 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
27623 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
27624 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
27625 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
27626 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
27627 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
27628 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
27629 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
27630 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
27631 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
27632 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
27633 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
27634 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
27635 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
27636 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030027637 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27638 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27639 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27640 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27641 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27642 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27643 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27644 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27645 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27646 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27647 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27648 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27649 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27650 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27651 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27652 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27653 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27654 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27655 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27656 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27657 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27658 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27659 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27660 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27661 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27662 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27663 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27664 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27665 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27666 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27667 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27668 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27669 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27670 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27671 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27672 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27673 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27674 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27675 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27676 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27677 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27678 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27679 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27680 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27681 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27682 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27683 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27684 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27685 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27686 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27687 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27688 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27689 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27690 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27691 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27692 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27693 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27694 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27695 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27696 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27697 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027698 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27699 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27700 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27701 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27702 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27703 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27704 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27705 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27706 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27707 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27708 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27709 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27710 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27711 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27712 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27713 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27714 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27715 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27716 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27717 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27718 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27719 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27720 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27721 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27722 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27723 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27724 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27725 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27726 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27727 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27728 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27729 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27730 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27731 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27732 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27733 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27734 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27735 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27736 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27737 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27738 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27739 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27740 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27741 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27742 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27743 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27744 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27745 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27746 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27747 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27748 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27749 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27750 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27751 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27752 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27753 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27754 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27755 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27756 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27757 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27758 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27759 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27760 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27761 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27762 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27763 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027764 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027765};
27766
27767static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
27768 /* Generated from AES-LRW test vectors */
27769 {
27770 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
27771 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
27772 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
27773 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
27774 .klen = 32,
27775 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27776 "\x00\x00\x00\x00\x00\x00\x00\x01",
27777 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27778 "\x38\x39\x41\x42\x43\x44\x45\x46",
27779 .ilen = 16,
27780 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
27781 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
27782 .rlen = 16,
27783 }, {
27784 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
27785 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
27786 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
27787 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
27788 .klen = 32,
27789 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27790 "\x00\x00\x00\x00\x00\x00\x00\x02",
27791 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27792 "\x38\x39\x41\x42\x43\x44\x45\x46",
27793 .ilen = 16,
27794 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
27795 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
27796 .rlen = 16,
27797 }, {
27798 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
27799 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
27800 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
27801 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
27802 .klen = 32,
27803 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27804 "\x00\x00\x00\x02\x00\x00\x00\x00",
27805 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27806 "\x38\x39\x41\x42\x43\x44\x45\x46",
27807 .ilen = 16,
27808 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
27809 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
27810 .rlen = 16,
27811 }, {
27812 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
27813 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
27814 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
27815 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
27816 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
27817 .klen = 40,
27818 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27819 "\x00\x00\x00\x00\x00\x00\x00\x01",
27820 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27821 "\x38\x39\x41\x42\x43\x44\x45\x46",
27822 .ilen = 16,
27823 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
27824 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
27825 .rlen = 16,
27826 }, {
27827 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
27828 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
27829 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
27830 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
27831 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
27832 .klen = 40,
27833 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27834 "\x00\x00\x00\x02\x00\x00\x00\x00",
27835 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27836 "\x38\x39\x41\x42\x43\x44\x45\x46",
27837 .ilen = 16,
27838 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
27839 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
27840 .rlen = 16,
27841 }, {
27842 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27843 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27844 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27845 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27846 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27847 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27848 .klen = 48,
27849 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27850 "\x00\x00\x00\x00\x00\x00\x00\x01",
27851 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27852 "\x38\x39\x41\x42\x43\x44\x45\x46",
27853 .ilen = 16,
27854 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
27855 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
27856 .rlen = 16,
27857 }, {
27858 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
27859 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
27860 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
27861 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
27862 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
27863 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
27864 .klen = 48,
27865 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27866 "\x00\x00\x00\x02\x00\x00\x00\x00",
27867 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27868 "\x38\x39\x41\x42\x43\x44\x45\x46",
27869 .ilen = 16,
27870 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
27871 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
27872 .rlen = 16,
27873 }, {
27874 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27875 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27876 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27877 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27878 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27879 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27880 .klen = 48,
27881 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27882 "\x00\x00\x00\x00\x00\x00\x00\x01",
27883 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
27884 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
27885 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
27886 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
27887 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
27888 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
27889 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
27890 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
27891 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
27892 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
27893 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
27894 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
27895 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
27896 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
27897 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
27898 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
27899 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
27900 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
27901 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
27902 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
27903 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
27904 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
27905 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
27906 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
27907 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
27908 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
27909 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
27910 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
27911 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
27912 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
27913 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
27914 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
27915 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
27916 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
27917 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
27918 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
27919 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
27920 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
27921 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
27922 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
27923 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
27924 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
27925 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
27926 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
27927 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
27928 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
27929 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
27930 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
27931 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
27932 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
27933 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
27934 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
27935 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
27936 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
27937 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
27938 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
27939 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
27940 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
27941 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
27942 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
27943 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
27944 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
27945 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
27946 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
27947 .ilen = 512,
27948 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
27949 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
27950 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
27951 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
27952 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
27953 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
27954 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
27955 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
27956 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
27957 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
27958 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
27959 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
27960 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
27961 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
27962 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
27963 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
27964 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
27965 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
27966 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
27967 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
27968 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
27969 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
27970 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
27971 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
27972 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
27973 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
27974 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
27975 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
27976 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
27977 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
27978 "\xed\x14\xa9\x57\x19\x63\x40\x04"
27979 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
27980 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
27981 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
27982 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
27983 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
27984 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
27985 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
27986 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
27987 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
27988 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
27989 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
27990 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
27991 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
27992 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
27993 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
27994 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
27995 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
27996 "\x35\xa5\x83\x04\x84\x01\x99\x56"
27997 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
27998 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
27999 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
28000 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
28001 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
28002 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
28003 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
28004 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
28005 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
28006 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
28007 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
28008 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
28009 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
28010 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
28011 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
28012 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028013 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028014 .np = 3,
28015 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028016 },
28017};
28018
28019static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
28020 /* Generated from AES-LRW test vectors */
28021 /* same as enc vectors with input and result reversed */
28022 {
28023 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
28024 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
28025 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
28026 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
28027 .klen = 32,
28028 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28029 "\x00\x00\x00\x00\x00\x00\x00\x01",
28030 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
28031 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
28032 .ilen = 16,
28033 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28034 "\x38\x39\x41\x42\x43\x44\x45\x46",
28035 .rlen = 16,
28036 }, {
28037 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
28038 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
28039 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
28040 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
28041 .klen = 32,
28042 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28043 "\x00\x00\x00\x00\x00\x00\x00\x02",
28044 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
28045 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
28046 .ilen = 16,
28047 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28048 "\x38\x39\x41\x42\x43\x44\x45\x46",
28049 .rlen = 16,
28050 }, {
28051 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
28052 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
28053 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
28054 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
28055 .klen = 32,
28056 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28057 "\x00\x00\x00\x02\x00\x00\x00\x00",
28058 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
28059 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
28060 .ilen = 16,
28061 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28062 "\x38\x39\x41\x42\x43\x44\x45\x46",
28063 .rlen = 16,
28064 }, {
28065 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
28066 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
28067 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
28068 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
28069 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
28070 .klen = 40,
28071 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28072 "\x00\x00\x00\x00\x00\x00\x00\x01",
28073 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
28074 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
28075 .ilen = 16,
28076 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28077 "\x38\x39\x41\x42\x43\x44\x45\x46",
28078 .rlen = 16,
28079 }, {
28080 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
28081 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
28082 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
28083 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
28084 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
28085 .klen = 40,
28086 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28087 "\x00\x00\x00\x02\x00\x00\x00\x00",
28088 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
28089 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
28090 .ilen = 16,
28091 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28092 "\x38\x39\x41\x42\x43\x44\x45\x46",
28093 .rlen = 16,
28094 }, {
28095 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
28096 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
28097 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
28098 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
28099 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
28100 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
28101 .klen = 48,
28102 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28103 "\x00\x00\x00\x00\x00\x00\x00\x01",
28104 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
28105 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
28106 .ilen = 16,
28107 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28108 "\x38\x39\x41\x42\x43\x44\x45\x46",
28109 .rlen = 16,
28110 }, {
28111 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
28112 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
28113 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
28114 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
28115 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
28116 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
28117 .klen = 48,
28118 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28119 "\x00\x00\x00\x02\x00\x00\x00\x00",
28120 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
28121 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
28122 .ilen = 16,
28123 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
28124 "\x38\x39\x41\x42\x43\x44\x45\x46",
28125 .rlen = 16,
28126 }, {
28127 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
28128 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
28129 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
28130 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
28131 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
28132 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
28133 .klen = 48,
28134 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28135 "\x00\x00\x00\x00\x00\x00\x00\x01",
28136 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
28137 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
28138 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
28139 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
28140 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
28141 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
28142 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
28143 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
28144 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
28145 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
28146 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
28147 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
28148 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
28149 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
28150 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
28151 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
28152 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
28153 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
28154 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
28155 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
28156 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
28157 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
28158 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
28159 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
28160 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
28161 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
28162 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
28163 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
28164 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
28165 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
28166 "\xed\x14\xa9\x57\x19\x63\x40\x04"
28167 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
28168 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
28169 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
28170 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
28171 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
28172 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
28173 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
28174 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
28175 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
28176 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
28177 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
28178 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
28179 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
28180 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
28181 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
28182 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
28183 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
28184 "\x35\xa5\x83\x04\x84\x01\x99\x56"
28185 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
28186 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
28187 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
28188 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
28189 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
28190 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
28191 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
28192 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
28193 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
28194 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
28195 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
28196 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
28197 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
28198 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
28199 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
28200 .ilen = 512,
28201 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
28202 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
28203 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
28204 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
28205 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
28206 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
28207 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
28208 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
28209 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
28210 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
28211 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
28212 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
28213 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
28214 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
28215 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
28216 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
28217 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
28218 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
28219 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
28220 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
28221 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
28222 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
28223 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
28224 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
28225 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
28226 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
28227 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
28228 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
28229 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
28230 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
28231 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
28232 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
28233 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
28234 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
28235 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
28236 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
28237 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
28238 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
28239 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
28240 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
28241 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
28242 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
28243 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
28244 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
28245 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
28246 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
28247 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
28248 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
28249 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
28250 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
28251 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
28252 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
28253 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
28254 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
28255 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
28256 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
28257 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
28258 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
28259 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
28260 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
28261 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
28262 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
28263 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
28264 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
28265 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028266 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028267 .np = 3,
28268 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028269 },
28270};
28271
28272static struct cipher_testvec camellia_xts_enc_tv_template[] = {
28273 /* Generated from AES-XTS test vectors */
28274 {
28275 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
28276 "\x00\x00\x00\x00\x00\x00\x00\x00"
28277 "\x00\x00\x00\x00\x00\x00\x00\x00"
28278 "\x00\x00\x00\x00\x00\x00\x00\x00",
28279 .klen = 32,
28280 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28281 "\x00\x00\x00\x00\x00\x00\x00\x00",
28282 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28283 "\x00\x00\x00\x00\x00\x00\x00\x00"
28284 "\x00\x00\x00\x00\x00\x00\x00\x00"
28285 "\x00\x00\x00\x00\x00\x00\x00\x00",
28286 .ilen = 32,
28287 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
28288 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
28289 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
28290 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
28291 .rlen = 32,
28292 }, {
28293 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
28294 "\x11\x11\x11\x11\x11\x11\x11\x11"
28295 "\x22\x22\x22\x22\x22\x22\x22\x22"
28296 "\x22\x22\x22\x22\x22\x22\x22\x22",
28297 .klen = 32,
28298 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28299 "\x00\x00\x00\x00\x00\x00\x00\x00",
28300 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
28301 "\x44\x44\x44\x44\x44\x44\x44\x44"
28302 "\x44\x44\x44\x44\x44\x44\x44\x44"
28303 "\x44\x44\x44\x44\x44\x44\x44\x44",
28304 .ilen = 32,
28305 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
28306 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
28307 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
28308 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
28309 .rlen = 32,
28310 }, {
28311 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
28312 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
28313 "\x22\x22\x22\x22\x22\x22\x22\x22"
28314 "\x22\x22\x22\x22\x22\x22\x22\x22",
28315 .klen = 32,
28316 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28317 "\x00\x00\x00\x00\x00\x00\x00\x00",
28318 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
28319 "\x44\x44\x44\x44\x44\x44\x44\x44"
28320 "\x44\x44\x44\x44\x44\x44\x44\x44"
28321 "\x44\x44\x44\x44\x44\x44\x44\x44",
28322 .ilen = 32,
28323 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
28324 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
28325 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
28326 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
28327 .rlen = 32,
28328 }, {
28329 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28330 "\x23\x53\x60\x28\x74\x71\x35\x26"
28331 "\x31\x41\x59\x26\x53\x58\x97\x93"
28332 "\x23\x84\x62\x64\x33\x83\x27\x95",
28333 .klen = 32,
28334 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28335 "\x00\x00\x00\x00\x00\x00\x00\x00",
28336 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
28337 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28338 "\x10\x11\x12\x13\x14\x15\x16\x17"
28339 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28340 "\x20\x21\x22\x23\x24\x25\x26\x27"
28341 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28342 "\x30\x31\x32\x33\x34\x35\x36\x37"
28343 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28344 "\x40\x41\x42\x43\x44\x45\x46\x47"
28345 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28346 "\x50\x51\x52\x53\x54\x55\x56\x57"
28347 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28348 "\x60\x61\x62\x63\x64\x65\x66\x67"
28349 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28350 "\x70\x71\x72\x73\x74\x75\x76\x77"
28351 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28352 "\x80\x81\x82\x83\x84\x85\x86\x87"
28353 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28354 "\x90\x91\x92\x93\x94\x95\x96\x97"
28355 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28356 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28357 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28358 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28359 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28360 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28361 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28362 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28363 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28364 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28365 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28366 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28367 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28368 "\x00\x01\x02\x03\x04\x05\x06\x07"
28369 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28370 "\x10\x11\x12\x13\x14\x15\x16\x17"
28371 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28372 "\x20\x21\x22\x23\x24\x25\x26\x27"
28373 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28374 "\x30\x31\x32\x33\x34\x35\x36\x37"
28375 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28376 "\x40\x41\x42\x43\x44\x45\x46\x47"
28377 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28378 "\x50\x51\x52\x53\x54\x55\x56\x57"
28379 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28380 "\x60\x61\x62\x63\x64\x65\x66\x67"
28381 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28382 "\x70\x71\x72\x73\x74\x75\x76\x77"
28383 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28384 "\x80\x81\x82\x83\x84\x85\x86\x87"
28385 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28386 "\x90\x91\x92\x93\x94\x95\x96\x97"
28387 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28388 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28389 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28390 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28391 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28392 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28393 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28394 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28395 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28396 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28397 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28398 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28399 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28400 .ilen = 512,
28401 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
28402 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
28403 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
28404 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
28405 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
28406 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
28407 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
28408 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
28409 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
28410 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
28411 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
28412 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
28413 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
28414 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
28415 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
28416 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
28417 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
28418 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
28419 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
28420 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
28421 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
28422 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
28423 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
28424 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
28425 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
28426 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
28427 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
28428 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
28429 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
28430 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
28431 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
28432 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
28433 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
28434 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
28435 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
28436 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
28437 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
28438 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
28439 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
28440 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
28441 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
28442 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
28443 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
28444 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
28445 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
28446 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
28447 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
28448 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
28449 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
28450 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
28451 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
28452 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
28453 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
28454 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
28455 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
28456 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
28457 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
28458 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
28459 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
28460 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
28461 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
28462 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
28463 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
28464 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
28465 .rlen = 512,
28466 }, {
28467 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28468 "\x23\x53\x60\x28\x74\x71\x35\x26"
28469 "\x62\x49\x77\x57\x24\x70\x93\x69"
28470 "\x99\x59\x57\x49\x66\x96\x76\x27"
28471 "\x31\x41\x59\x26\x53\x58\x97\x93"
28472 "\x23\x84\x62\x64\x33\x83\x27\x95"
28473 "\x02\x88\x41\x97\x16\x93\x99\x37"
28474 "\x51\x05\x82\x09\x74\x94\x45\x92",
28475 .klen = 64,
28476 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
28477 "\x00\x00\x00\x00\x00\x00\x00\x00",
28478 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
28479 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28480 "\x10\x11\x12\x13\x14\x15\x16\x17"
28481 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28482 "\x20\x21\x22\x23\x24\x25\x26\x27"
28483 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28484 "\x30\x31\x32\x33\x34\x35\x36\x37"
28485 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28486 "\x40\x41\x42\x43\x44\x45\x46\x47"
28487 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28488 "\x50\x51\x52\x53\x54\x55\x56\x57"
28489 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28490 "\x60\x61\x62\x63\x64\x65\x66\x67"
28491 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28492 "\x70\x71\x72\x73\x74\x75\x76\x77"
28493 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28494 "\x80\x81\x82\x83\x84\x85\x86\x87"
28495 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28496 "\x90\x91\x92\x93\x94\x95\x96\x97"
28497 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28498 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28499 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28500 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28501 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28502 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28503 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28504 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28505 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28506 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28507 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28508 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28509 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28510 "\x00\x01\x02\x03\x04\x05\x06\x07"
28511 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28512 "\x10\x11\x12\x13\x14\x15\x16\x17"
28513 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28514 "\x20\x21\x22\x23\x24\x25\x26\x27"
28515 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28516 "\x30\x31\x32\x33\x34\x35\x36\x37"
28517 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28518 "\x40\x41\x42\x43\x44\x45\x46\x47"
28519 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28520 "\x50\x51\x52\x53\x54\x55\x56\x57"
28521 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28522 "\x60\x61\x62\x63\x64\x65\x66\x67"
28523 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28524 "\x70\x71\x72\x73\x74\x75\x76\x77"
28525 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28526 "\x80\x81\x82\x83\x84\x85\x86\x87"
28527 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28528 "\x90\x91\x92\x93\x94\x95\x96\x97"
28529 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28530 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28531 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28532 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28533 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28534 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28535 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28536 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28537 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28538 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28539 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28540 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28541 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28542 .ilen = 512,
28543 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
28544 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
28545 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
28546 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
28547 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
28548 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
28549 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
28550 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
28551 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
28552 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
28553 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
28554 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
28555 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
28556 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
28557 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
28558 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
28559 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
28560 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
28561 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
28562 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
28563 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
28564 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
28565 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
28566 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
28567 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
28568 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
28569 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
28570 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
28571 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
28572 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
28573 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
28574 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
28575 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
28576 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
28577 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
28578 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
28579 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
28580 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
28581 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
28582 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
28583 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
28584 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
28585 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
28586 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
28587 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
28588 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
28589 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
28590 "\x21\x17\xf8\x59\x15\x24\x64\x22"
28591 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
28592 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
28593 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
28594 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
28595 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
28596 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
28597 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
28598 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
28599 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
28600 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
28601 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
28602 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
28603 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
28604 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
28605 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
28606 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
28607 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028608 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028609 .np = 3,
28610 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028611 },
28612};
28613
28614static struct cipher_testvec camellia_xts_dec_tv_template[] = {
28615 /* Generated from AES-XTS test vectors */
28616 /* same as enc vectors with input and result reversed */
28617 {
28618 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
28619 "\x00\x00\x00\x00\x00\x00\x00\x00"
28620 "\x00\x00\x00\x00\x00\x00\x00\x00"
28621 "\x00\x00\x00\x00\x00\x00\x00\x00",
28622 .klen = 32,
28623 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28624 "\x00\x00\x00\x00\x00\x00\x00\x00",
28625 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
28626 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
28627 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
28628 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
28629 .ilen = 32,
28630 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
28631 "\x00\x00\x00\x00\x00\x00\x00\x00"
28632 "\x00\x00\x00\x00\x00\x00\x00\x00"
28633 "\x00\x00\x00\x00\x00\x00\x00\x00",
28634 .rlen = 32,
28635 }, {
28636 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
28637 "\x11\x11\x11\x11\x11\x11\x11\x11"
28638 "\x22\x22\x22\x22\x22\x22\x22\x22"
28639 "\x22\x22\x22\x22\x22\x22\x22\x22",
28640 .klen = 32,
28641 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28642 "\x00\x00\x00\x00\x00\x00\x00\x00",
28643 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
28644 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
28645 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
28646 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
28647 .ilen = 32,
28648 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
28649 "\x44\x44\x44\x44\x44\x44\x44\x44"
28650 "\x44\x44\x44\x44\x44\x44\x44\x44"
28651 "\x44\x44\x44\x44\x44\x44\x44\x44",
28652 .rlen = 32,
28653 }, {
28654 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
28655 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
28656 "\x22\x22\x22\x22\x22\x22\x22\x22"
28657 "\x22\x22\x22\x22\x22\x22\x22\x22",
28658 .klen = 32,
28659 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28660 "\x00\x00\x00\x00\x00\x00\x00\x00",
28661 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
28662 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
28663 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
28664 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
28665 .ilen = 32,
28666 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
28667 "\x44\x44\x44\x44\x44\x44\x44\x44"
28668 "\x44\x44\x44\x44\x44\x44\x44\x44"
28669 "\x44\x44\x44\x44\x44\x44\x44\x44",
28670 .rlen = 32,
28671 }, {
28672 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28673 "\x23\x53\x60\x28\x74\x71\x35\x26"
28674 "\x31\x41\x59\x26\x53\x58\x97\x93"
28675 "\x23\x84\x62\x64\x33\x83\x27\x95",
28676 .klen = 32,
28677 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28678 "\x00\x00\x00\x00\x00\x00\x00\x00",
28679 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
28680 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
28681 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
28682 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
28683 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
28684 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
28685 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
28686 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
28687 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
28688 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
28689 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
28690 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
28691 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
28692 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
28693 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
28694 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
28695 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
28696 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
28697 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
28698 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
28699 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
28700 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
28701 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
28702 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
28703 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
28704 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
28705 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
28706 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
28707 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
28708 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
28709 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
28710 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
28711 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
28712 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
28713 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
28714 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
28715 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
28716 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
28717 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
28718 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
28719 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
28720 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
28721 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
28722 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
28723 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
28724 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
28725 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
28726 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
28727 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
28728 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
28729 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
28730 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
28731 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
28732 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
28733 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
28734 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
28735 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
28736 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
28737 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
28738 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
28739 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
28740 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
28741 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
28742 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
28743 .ilen = 512,
28744 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
28745 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28746 "\x10\x11\x12\x13\x14\x15\x16\x17"
28747 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28748 "\x20\x21\x22\x23\x24\x25\x26\x27"
28749 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28750 "\x30\x31\x32\x33\x34\x35\x36\x37"
28751 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28752 "\x40\x41\x42\x43\x44\x45\x46\x47"
28753 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28754 "\x50\x51\x52\x53\x54\x55\x56\x57"
28755 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28756 "\x60\x61\x62\x63\x64\x65\x66\x67"
28757 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28758 "\x70\x71\x72\x73\x74\x75\x76\x77"
28759 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28760 "\x80\x81\x82\x83\x84\x85\x86\x87"
28761 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28762 "\x90\x91\x92\x93\x94\x95\x96\x97"
28763 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28764 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28765 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28766 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28767 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28768 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28769 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28770 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28771 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28772 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28773 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28774 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28775 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28776 "\x00\x01\x02\x03\x04\x05\x06\x07"
28777 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28778 "\x10\x11\x12\x13\x14\x15\x16\x17"
28779 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28780 "\x20\x21\x22\x23\x24\x25\x26\x27"
28781 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28782 "\x30\x31\x32\x33\x34\x35\x36\x37"
28783 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28784 "\x40\x41\x42\x43\x44\x45\x46\x47"
28785 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28786 "\x50\x51\x52\x53\x54\x55\x56\x57"
28787 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28788 "\x60\x61\x62\x63\x64\x65\x66\x67"
28789 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28790 "\x70\x71\x72\x73\x74\x75\x76\x77"
28791 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28792 "\x80\x81\x82\x83\x84\x85\x86\x87"
28793 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28794 "\x90\x91\x92\x93\x94\x95\x96\x97"
28795 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28796 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28797 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28798 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28799 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28800 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28801 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28802 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28803 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28804 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28805 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28806 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28807 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28808 .rlen = 512,
28809 }, {
28810 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28811 "\x23\x53\x60\x28\x74\x71\x35\x26"
28812 "\x62\x49\x77\x57\x24\x70\x93\x69"
28813 "\x99\x59\x57\x49\x66\x96\x76\x27"
28814 "\x31\x41\x59\x26\x53\x58\x97\x93"
28815 "\x23\x84\x62\x64\x33\x83\x27\x95"
28816 "\x02\x88\x41\x97\x16\x93\x99\x37"
28817 "\x51\x05\x82\x09\x74\x94\x45\x92",
28818 .klen = 64,
28819 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
28820 "\x00\x00\x00\x00\x00\x00\x00\x00",
28821 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
28822 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
28823 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
28824 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
28825 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
28826 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
28827 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
28828 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
28829 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
28830 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
28831 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
28832 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
28833 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
28834 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
28835 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
28836 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
28837 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
28838 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
28839 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
28840 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
28841 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
28842 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
28843 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
28844 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
28845 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
28846 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
28847 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
28848 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
28849 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
28850 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
28851 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
28852 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
28853 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
28854 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
28855 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
28856 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
28857 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
28858 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
28859 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
28860 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
28861 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
28862 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
28863 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
28864 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
28865 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
28866 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
28867 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
28868 "\x21\x17\xf8\x59\x15\x24\x64\x22"
28869 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
28870 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
28871 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
28872 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
28873 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
28874 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
28875 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
28876 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
28877 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
28878 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
28879 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
28880 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
28881 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
28882 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
28883 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
28884 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
28885 .ilen = 512,
28886 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
28887 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28888 "\x10\x11\x12\x13\x14\x15\x16\x17"
28889 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28890 "\x20\x21\x22\x23\x24\x25\x26\x27"
28891 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28892 "\x30\x31\x32\x33\x34\x35\x36\x37"
28893 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28894 "\x40\x41\x42\x43\x44\x45\x46\x47"
28895 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28896 "\x50\x51\x52\x53\x54\x55\x56\x57"
28897 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28898 "\x60\x61\x62\x63\x64\x65\x66\x67"
28899 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28900 "\x70\x71\x72\x73\x74\x75\x76\x77"
28901 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28902 "\x80\x81\x82\x83\x84\x85\x86\x87"
28903 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28904 "\x90\x91\x92\x93\x94\x95\x96\x97"
28905 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28906 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28907 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28908 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28909 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28910 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28911 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28912 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28913 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28914 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28915 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28916 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28917 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28918 "\x00\x01\x02\x03\x04\x05\x06\x07"
28919 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28920 "\x10\x11\x12\x13\x14\x15\x16\x17"
28921 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28922 "\x20\x21\x22\x23\x24\x25\x26\x27"
28923 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28924 "\x30\x31\x32\x33\x34\x35\x36\x37"
28925 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28926 "\x40\x41\x42\x43\x44\x45\x46\x47"
28927 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28928 "\x50\x51\x52\x53\x54\x55\x56\x57"
28929 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28930 "\x60\x61\x62\x63\x64\x65\x66\x67"
28931 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28932 "\x70\x71\x72\x73\x74\x75\x76\x77"
28933 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28934 "\x80\x81\x82\x83\x84\x85\x86\x87"
28935 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28936 "\x90\x91\x92\x93\x94\x95\x96\x97"
28937 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28938 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28939 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28940 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28941 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28942 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28943 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28944 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28945 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28946 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28947 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28948 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28949 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28950 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028951 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028952 .np = 3,
28953 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028954 },
Herbert Xuda7f0332008-07-31 17:08:25 +080028955};
28956
28957/*
28958 * SEED test vectors
28959 */
28960#define SEED_ENC_TEST_VECTORS 4
28961#define SEED_DEC_TEST_VECTORS 4
28962
28963static struct cipher_testvec seed_enc_tv_template[] = {
28964 {
28965 .key = zeroed_string,
28966 .klen = 16,
28967 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
28968 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
28969 .ilen = 16,
28970 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
28971 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
28972 .rlen = 16,
28973 }, {
28974 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
28975 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
28976 .klen = 16,
28977 .input = zeroed_string,
28978 .ilen = 16,
28979 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
28980 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
28981 .rlen = 16,
28982 }, {
28983 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
28984 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
28985 .klen = 16,
28986 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
28987 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
28988 .ilen = 16,
28989 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
28990 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
28991 .rlen = 16,
28992 }, {
28993 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
28994 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
28995 .klen = 16,
28996 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
28997 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
28998 .ilen = 16,
28999 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
29000 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
29001 .rlen = 16,
29002 }
29003};
29004
29005static struct cipher_testvec seed_dec_tv_template[] = {
29006 {
29007 .key = zeroed_string,
29008 .klen = 16,
29009 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
29010 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
29011 .ilen = 16,
29012 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
29013 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
29014 .rlen = 16,
29015 }, {
29016 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
29017 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
29018 .klen = 16,
29019 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
29020 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
29021 .ilen = 16,
29022 .result = zeroed_string,
29023 .rlen = 16,
29024 }, {
29025 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
29026 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
29027 .klen = 16,
29028 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
29029 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
29030 .ilen = 16,
29031 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
29032 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
29033 .rlen = 16,
29034 }, {
29035 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
29036 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
29037 .klen = 16,
29038 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
29039 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
29040 .ilen = 16,
29041 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
29042 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
29043 .rlen = 16,
29044 }
29045};
29046
29047#define SALSA20_STREAM_ENC_TEST_VECTORS 5
29048static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
29049 /*
29050 * Testvectors from verified.test-vectors submitted to ECRYPT.
29051 * They are truncated to size 39, 64, 111, 129 to test a variety
29052 * of input length.
29053 */
29054 { /* Set 3, vector 0 */
29055 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
29056 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
29057 .klen = 16,
29058 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
29059 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29060 "\x00\x00\x00\x00\x00\x00\x00\x00"
29061 "\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",
29064 .ilen = 39,
29065 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
29066 "\x68\x02\x41\x0C\x68\x86\x88\x89"
29067 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
29068 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
29069 "\x58\x3F\x52\x79\x70\xEB\xC1",
29070 .rlen = 39,
29071 }, { /* Set 5, vector 0 */
29072 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29073 "\x00\x00\x00\x00\x00\x00\x00\x00",
29074 .klen = 16,
29075 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
29076 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29077 "\x00\x00\x00\x00\x00\x00\x00\x00"
29078 "\x00\x00\x00\x00\x00\x00\x00\x00"
29079 "\x00\x00\x00\x00\x00\x00\x00\x00"
29080 "\x00\x00\x00\x00\x00\x00\x00\x00"
29081 "\x00\x00\x00\x00\x00\x00\x00\x00"
29082 "\x00\x00\x00\x00\x00\x00\x00\x00"
29083 "\x00\x00\x00\x00\x00\x00\x00\x00",
29084 .ilen = 64,
29085 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
29086 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
29087 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
29088 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
29089 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
29090 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
29091 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
29092 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
29093 .rlen = 64,
29094 }, { /* Set 3, vector 27 */
29095 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
29096 "\x23\x24\x25\x26\x27\x28\x29\x2A"
29097 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
29098 "\x33\x34\x35\x36\x37\x38\x39\x3A",
29099 .klen = 32,
29100 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
29101 .input = "\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\x00\x00\x00\x00\x00\x00",
29115 .ilen = 111,
29116 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
29117 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
29118 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
29119 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
29120 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
29121 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
29122 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
29123 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
29124 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
29125 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
29126 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
29127 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
29128 "\x95\x46\x45\x54\xE9\x75\x03\x08"
29129 "\x44\xAF\xE5\x8A\x81\x12\x09",
29130 .rlen = 111,
29131 }, { /* Set 5, vector 27 */
29132 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29133 "\x00\x00\x00\x00\x00\x00\x00\x00"
29134 "\x00\x00\x00\x00\x00\x00\x00\x00"
29135 "\x00\x00\x00\x00\x00\x00\x00\x00",
29136 .klen = 32,
29137 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
29138 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29139 "\x00\x00\x00\x00\x00\x00\x00\x00"
29140 "\x00\x00\x00\x00\x00\x00\x00\x00"
29141 "\x00\x00\x00\x00\x00\x00\x00\x00"
29142 "\x00\x00\x00\x00\x00\x00\x00\x00"
29143 "\x00\x00\x00\x00\x00\x00\x00\x00"
29144 "\x00\x00\x00\x00\x00\x00\x00\x00"
29145 "\x00\x00\x00\x00\x00\x00\x00\x00"
29146 "\x00\x00\x00\x00\x00\x00\x00\x00"
29147 "\x00\x00\x00\x00\x00\x00\x00\x00"
29148 "\x00\x00\x00\x00\x00\x00\x00\x00"
29149 "\x00\x00\x00\x00\x00\x00\x00\x00"
29150 "\x00\x00\x00\x00\x00\x00\x00\x00"
29151 "\x00\x00\x00\x00\x00\x00\x00\x00"
29152 "\x00\x00\x00\x00\x00\x00\x00\x00"
29153 "\x00\x00\x00\x00\x00\x00\x00\x00"
29154 "\x00",
29155 .ilen = 129,
29156 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
29157 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
29158 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
29159 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
29160 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
29161 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
29162 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
29163 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
29164 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
29165 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
29166 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
29167 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
29168 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
29169 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
29170 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
29171 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
29172 "\x5A",
29173 .rlen = 129,
29174 }, { /* large test vector generated using Crypto++ */
29175 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
29176 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29177 "\x10\x11\x12\x13\x14\x15\x16\x17"
29178 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
29179 .klen = 32,
29180 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29181 "\x00\x00\x00\x00\x00\x00\x00\x00",
29182 .input =
29183 "\x00\x01\x02\x03\x04\x05\x06\x07"
29184 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29185 "\x10\x11\x12\x13\x14\x15\x16\x17"
29186 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29187 "\x20\x21\x22\x23\x24\x25\x26\x27"
29188 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29189 "\x30\x31\x32\x33\x34\x35\x36\x37"
29190 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29191 "\x40\x41\x42\x43\x44\x45\x46\x47"
29192 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29193 "\x50\x51\x52\x53\x54\x55\x56\x57"
29194 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29195 "\x60\x61\x62\x63\x64\x65\x66\x67"
29196 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29197 "\x70\x71\x72\x73\x74\x75\x76\x77"
29198 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29199 "\x80\x81\x82\x83\x84\x85\x86\x87"
29200 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29201 "\x90\x91\x92\x93\x94\x95\x96\x97"
29202 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29203 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29204 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29205 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29206 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29207 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29208 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29209 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29210 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29211 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29212 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29213 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29214 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
29215 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
29216 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
29217 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
29218 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
29219 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
29220 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
29221 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
29222 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
29223 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
29224 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
29225 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
29226 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
29227 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
29228 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
29229 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
29230 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
29231 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
29232 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
29233 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
29234 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
29235 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
29236 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
29237 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
29238 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
29239 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
29240 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
29241 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
29242 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
29243 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
29244 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
29245 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
29246 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
29247 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
29248 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
29249 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
29250 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
29251 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
29252 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
29253 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
29254 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
29255 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
29256 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
29257 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
29258 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
29259 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
29260 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
29261 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
29262 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
29263 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
29264 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
29265 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
29266 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
29267 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
29268 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
29269 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
29270 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
29271 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
29272 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
29273 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
29274 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
29275 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
29276 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
29277 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
29278 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
29279 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
29280 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
29281 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
29282 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
29283 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
29284 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
29285 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
29286 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
29287 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
29288 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
29289 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
29290 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
29291 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
29292 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
29293 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
29294 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
29295 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
29296 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
29297 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
29298 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
29299 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
29300 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
29301 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
29302 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
29303 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
29304 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
29305 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
29306 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
29307 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
29308 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
29309 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
29310 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
29311 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
29312 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
29313 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
29314 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
29315 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
29316 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
29317 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
29318 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
29319 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
29320 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
29321 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
29322 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
29323 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
29324 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
29325 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
29326 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
29327 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
29328 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
29329 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
29330 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
29331 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
29332 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
29333 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
29334 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
29335 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
29336 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
29337 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
29338 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
29339 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
29340 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
29341 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
29342 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
29343 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
29344 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
29345 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
29346 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
29347 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
29348 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
29349 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
29350 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
29351 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
29352 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
29353 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
29354 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
29355 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
29356 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
29357 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
29358 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
29359 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
29360 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
29361 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
29362 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
29363 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
29364 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
29365 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
29366 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
29367 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
29368 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
29369 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
29370 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
29371 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
29372 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
29373 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
29374 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
29375 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
29376 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
29377 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
29378 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
29379 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
29380 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
29381 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
29382 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
29383 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
29384 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
29385 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
29386 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
29387 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
29388 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
29389 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
29390 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
29391 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
29392 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
29393 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
29394 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
29395 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
29396 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
29397 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
29398 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
29399 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
29400 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
29401 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
29402 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
29403 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
29404 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
29405 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
29406 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
29407 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
29408 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
29409 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
29410 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
29411 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
29412 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
29413 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
29414 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
29415 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
29416 "\x38\x47\x56\x65\x74\x83\x92\xa1"
29417 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
29418 "\x28\x37\x46\x55\x64\x73\x82\x91"
29419 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
29420 "\x18\x27\x36\x45\x54\x63\x72\x81"
29421 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
29422 "\x08\x17\x26\x35\x44\x53\x62\x71"
29423 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
29424 "\xf8\x07\x16\x25\x34\x43\x52\x61"
29425 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
29426 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
29427 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
29428 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
29429 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
29430 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
29431 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
29432 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
29433 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
29434 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
29435 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
29436 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
29437 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
29438 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
29439 "\x00\x11\x22\x33\x44\x55\x66\x77"
29440 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
29441 "\x10\x21\x32\x43\x54\x65\x76\x87"
29442 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
29443 "\x20\x31\x42\x53\x64\x75\x86\x97"
29444 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
29445 "\x30\x41\x52\x63\x74\x85\x96\xa7"
29446 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
29447 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
29448 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
29449 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
29450 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
29451 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
29452 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
29453 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
29454 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
29455 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
29456 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
29457 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
29458 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
29459 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
29460 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
29461 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
29462 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
29463 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
29464 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
29465 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
29466 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
29467 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
29468 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
29469 "\xf0\x01\x12\x23\x34\x45\x56\x67"
29470 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
29471 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
29472 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
29473 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
29474 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
29475 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
29476 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
29477 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
29478 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
29479 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
29480 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
29481 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
29482 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
29483 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
29484 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
29485 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
29486 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
29487 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
29488 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
29489 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
29490 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
29491 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
29492 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
29493 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
29494 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
29495 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
29496 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
29497 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
29498 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
29499 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
29500 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
29501 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
29502 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
29503 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
29504 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
29505 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
29506 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
29507 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
29508 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
29509 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
29510 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
29511 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
29512 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
29513 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
29514 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
29515 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
29516 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
29517 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
29518 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
29519 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
29520 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
29521 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
29522 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
29523 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
29524 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
29525 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
29526 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
29527 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
29528 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
29529 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
29530 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
29531 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
29532 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
29533 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
29534 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
29535 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
29536 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
29537 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
29538 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
29539 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
29540 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
29541 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
29542 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
29543 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
29544 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
29545 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
29546 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
29547 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
29548 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
29549 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
29550 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
29551 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
29552 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
29553 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
29554 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
29555 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
29556 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
29557 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
29558 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
29559 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
29560 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
29561 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
29562 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
29563 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
29564 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
29565 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
29566 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
29567 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
29568 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
29569 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
29570 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
29571 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
29572 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
29573 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
29574 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
29575 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
29576 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
29577 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
29578 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
29579 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
29580 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
29581 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
29582 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
29583 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
29584 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
29585 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
29586 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
29587 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
29588 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
29589 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
29590 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
29591 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
29592 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
29593 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
29594 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
29595 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
29596 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
29597 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
29598 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
29599 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
29600 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
29601 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
29602 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
29603 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
29604 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
29605 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
29606 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
29607 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
29608 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
29609 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
29610 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
29611 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
29612 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
29613 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
29614 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
29615 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
29616 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
29617 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
29618 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
29619 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
29620 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
29621 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
29622 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
29623 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
29624 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
29625 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
29626 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
29627 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
29628 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
29629 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
29630 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
29631 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
29632 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
29633 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
29634 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
29635 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
29636 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
29637 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
29638 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
29639 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
29640 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
29641 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
29642 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
29643 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
29644 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
29645 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
29646 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
29647 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
29648 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
29649 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
29650 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
29651 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
29652 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
29653 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
29654 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
29655 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
29656 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
29657 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
29658 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
29659 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
29660 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
29661 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
29662 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
29663 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
29664 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
29665 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
29666 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
29667 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
29668 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
29669 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
29670 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
29671 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
29672 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
29673 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
29674 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
29675 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
29676 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
29677 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
29678 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
29679 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
29680 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
29681 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
29682 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
29683 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
29684 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
29685 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
29686 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
29687 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
29688 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
29689 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
29690 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
29691 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
29692 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
29693 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
29694 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
29695 "\x00\x21\x42\x63",
29696 .ilen = 4100,
29697 .result =
29698 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
29699 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
29700 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
29701 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
29702 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
29703 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
29704 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
29705 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
29706 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
29707 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
29708 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
29709 "\xbb\xde\x56\x86\xab\x65\x21\x30"
29710 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
29711 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
29712 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
29713 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
29714 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
29715 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
29716 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
29717 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
29718 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
29719 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
29720 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
29721 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
29722 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
29723 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
29724 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
29725 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
29726 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
29727 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
29728 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
29729 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
29730 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
29731 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
29732 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
29733 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
29734 "\x62\x08\x18\x7a\x25\x49\x28\xac"
29735 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
29736 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
29737 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
29738 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
29739 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
29740 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
29741 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
29742 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
29743 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
29744 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
29745 "\x33\xee\x14\x19\x22\x52\x89\xa7"
29746 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
29747 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
29748 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
29749 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
29750 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
29751 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
29752 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
29753 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
29754 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
29755 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
29756 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
29757 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
29758 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
29759 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
29760 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
29761 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
29762 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
29763 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
29764 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
29765 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
29766 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
29767 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
29768 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
29769 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
29770 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
29771 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
29772 "\x49\x97\x33\xab\x36\x14\x0a\x70"
29773 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
29774 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
29775 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
29776 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
29777 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
29778 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
29779 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
29780 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
29781 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
29782 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
29783 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
29784 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
29785 "\xad\x04\x07\xae\x22\x90\x4a\x93"
29786 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
29787 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
29788 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
29789 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
29790 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
29791 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
29792 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
29793 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
29794 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
29795 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
29796 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
29797 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
29798 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
29799 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
29800 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
29801 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
29802 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
29803 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
29804 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
29805 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
29806 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
29807 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
29808 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
29809 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
29810 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
29811 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
29812 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
29813 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
29814 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
29815 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
29816 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
29817 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
29818 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
29819 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
29820 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
29821 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
29822 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
29823 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
29824 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
29825 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
29826 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
29827 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
29828 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
29829 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
29830 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
29831 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
29832 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
29833 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
29834 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
29835 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
29836 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
29837 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
29838 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
29839 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
29840 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
29841 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
29842 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
29843 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
29844 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
29845 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
29846 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
29847 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
29848 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
29849 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
29850 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
29851 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
29852 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
29853 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
29854 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
29855 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
29856 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
29857 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
29858 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
29859 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
29860 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
29861 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
29862 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
29863 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
29864 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
29865 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
29866 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
29867 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
29868 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
29869 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
29870 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
29871 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
29872 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
29873 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
29874 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
29875 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
29876 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
29877 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
29878 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
29879 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
29880 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
29881 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
29882 "\x2e\x53\x49\x97\x94\x33\xae\x40"
29883 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
29884 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
29885 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
29886 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
29887 "\xce\x87\xad\xcc\x72\x05\x00\x29"
29888 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
29889 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
29890 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
29891 "\xac\xc0\x79\x50\x69\xca\x59\x32"
29892 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
29893 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
29894 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
29895 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
29896 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
29897 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
29898 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
29899 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
29900 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
29901 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
29902 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
29903 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
29904 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
29905 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
29906 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
29907 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
29908 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
29909 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
29910 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
29911 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
29912 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
29913 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
29914 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
29915 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
29916 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
29917 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
29918 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
29919 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
29920 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
29921 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
29922 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
29923 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
29924 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
29925 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
29926 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
29927 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
29928 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
29929 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
29930 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
29931 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
29932 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
29933 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
29934 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
29935 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
29936 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
29937 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
29938 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
29939 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
29940 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
29941 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
29942 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
29943 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
29944 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
29945 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
29946 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
29947 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
29948 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
29949 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
29950 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
29951 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
29952 "\x38\x55\xab\x33\x26\xef\x9f\x43"
29953 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
29954 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
29955 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
29956 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
29957 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
29958 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
29959 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
29960 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
29961 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
29962 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
29963 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
29964 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
29965 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
29966 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
29967 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
29968 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
29969 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
29970 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
29971 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
29972 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
29973 "\x62\x36\x43\xb2\x82\x15\x75\x50"
29974 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
29975 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
29976 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
29977 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
29978 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
29979 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
29980 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
29981 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
29982 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
29983 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
29984 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
29985 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
29986 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
29987 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
29988 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
29989 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
29990 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
29991 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
29992 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
29993 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
29994 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
29995 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
29996 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
29997 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
29998 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
29999 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
30000 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
30001 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
30002 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
30003 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
30004 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
30005 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
30006 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
30007 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
30008 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
30009 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
30010 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
30011 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
30012 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
30013 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
30014 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
30015 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
30016 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
30017 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
30018 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
30019 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
30020 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
30021 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
30022 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
30023 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
30024 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
30025 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
30026 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
30027 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
30028 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
30029 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
30030 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
30031 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
30032 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
30033 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
30034 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
30035 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
30036 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
30037 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
30038 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
30039 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
30040 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
30041 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
30042 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
30043 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
30044 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
30045 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
30046 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
30047 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
30048 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
30049 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
30050 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
30051 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
30052 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
30053 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
30054 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
30055 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
30056 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
30057 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
30058 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
30059 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
30060 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
30061 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
30062 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
30063 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
30064 "\x73\x2e\x71\x79\x16\x06\x63\x28"
30065 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
30066 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
30067 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
30068 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
30069 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
30070 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
30071 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
30072 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
30073 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
30074 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
30075 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
30076 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
30077 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
30078 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
30079 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
30080 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
30081 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
30082 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
30083 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
30084 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
30085 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
30086 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
30087 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
30088 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
30089 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
30090 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
30091 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
30092 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
30093 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
30094 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
30095 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
30096 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
30097 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
30098 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
30099 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
30100 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
30101 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
30102 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
30103 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
30104 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
30105 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
30106 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
30107 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
30108 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
30109 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
30110 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
30111 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
30112 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
30113 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
30114 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
30115 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
30116 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
30117 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
30118 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
30119 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
30120 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
30121 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
30122 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
30123 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
30124 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
30125 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
30126 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
30127 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
30128 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
30129 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
30130 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
30131 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
30132 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
30133 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
30134 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
30135 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
30136 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
30137 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
30138 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
30139 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
30140 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
30141 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
30142 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
30143 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
30144 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
30145 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
30146 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
30147 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
30148 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
30149 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
30150 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
30151 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
30152 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
30153 "\x85\x73\x78\x45\x20\x7f\xae\x13"
30154 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
30155 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
30156 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
30157 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
30158 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
30159 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
30160 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
30161 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
30162 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
30163 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
30164 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
30165 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
30166 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
30167 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
30168 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
30169 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
30170 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
30171 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
30172 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
30173 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
30174 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
30175 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
30176 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
30177 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
30178 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
30179 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
30180 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
30181 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
30182 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
30183 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
30184 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
30185 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
30186 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
30187 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
30188 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
30189 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
30190 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
30191 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
30192 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
30193 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
30194 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
30195 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
30196 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
30197 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
30198 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
30199 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
30200 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
30201 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
30202 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
30203 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
30204 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
30205 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
30206 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
30207 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
30208 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
30209 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
30210 "\xaf\xdf\x11\x95",
30211 .rlen = 4100,
30212 .np = 2,
30213 .tap = { 4064, 36 },
30214 },
30215};
30216
Martin Willi3590ebf2015-06-01 13:43:57 +020030217#define CHACHA20_ENC_TEST_VECTORS 3
30218static struct cipher_testvec chacha20_enc_tv_template[] = {
30219 { /* RFC7539 A.2. Test Vector #1 */
30220 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30221 "\x00\x00\x00\x00\x00\x00\x00\x00"
30222 "\x00\x00\x00\x00\x00\x00\x00\x00"
30223 "\x00\x00\x00\x00\x00\x00\x00\x00",
30224 .klen = 32,
30225 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
30226 "\x00\x00\x00\x00\x00\x00\x00\x00",
30227 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30228 "\x00\x00\x00\x00\x00\x00\x00\x00"
30229 "\x00\x00\x00\x00\x00\x00\x00\x00"
30230 "\x00\x00\x00\x00\x00\x00\x00\x00"
30231 "\x00\x00\x00\x00\x00\x00\x00\x00"
30232 "\x00\x00\x00\x00\x00\x00\x00\x00"
30233 "\x00\x00\x00\x00\x00\x00\x00\x00"
30234 "\x00\x00\x00\x00\x00\x00\x00\x00",
30235 .ilen = 64,
30236 .result = "\x76\xb8\xe0\xad\xa0\xf1\x3d\x90"
30237 "\x40\x5d\x6a\xe5\x53\x86\xbd\x28"
30238 "\xbd\xd2\x19\xb8\xa0\x8d\xed\x1a"
30239 "\xa8\x36\xef\xcc\x8b\x77\x0d\xc7"
30240 "\xda\x41\x59\x7c\x51\x57\x48\x8d"
30241 "\x77\x24\xe0\x3f\xb8\xd8\x4a\x37"
30242 "\x6a\x43\xb8\xf4\x15\x18\xa1\x1c"
30243 "\xc3\x87\xb6\x69\xb2\xee\x65\x86",
30244 .rlen = 64,
30245 }, { /* RFC7539 A.2. Test Vector #2 */
30246 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30247 "\x00\x00\x00\x00\x00\x00\x00\x00"
30248 "\x00\x00\x00\x00\x00\x00\x00\x00"
30249 "\x00\x00\x00\x00\x00\x00\x00\x01",
30250 .klen = 32,
30251 .iv = "\x01\x00\x00\x00\x00\x00\x00\x00"
30252 "\x00\x00\x00\x00\x00\x00\x00\x02",
30253 .input = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
30254 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
30255 "\x6f\x20\x74\x68\x65\x20\x49\x45"
30256 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
30257 "\x64\x65\x64\x20\x62\x79\x20\x74"
30258 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
30259 "\x69\x62\x75\x74\x6f\x72\x20\x66"
30260 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
30261 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
30262 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
30263 "\x20\x70\x61\x72\x74\x20\x6f\x66"
30264 "\x20\x61\x6e\x20\x49\x45\x54\x46"
30265 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
30266 "\x74\x2d\x44\x72\x61\x66\x74\x20"
30267 "\x6f\x72\x20\x52\x46\x43\x20\x61"
30268 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
30269 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
30270 "\x20\x6d\x61\x64\x65\x20\x77\x69"
30271 "\x74\x68\x69\x6e\x20\x74\x68\x65"
30272 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
30273 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
30274 "\x45\x54\x46\x20\x61\x63\x74\x69"
30275 "\x76\x69\x74\x79\x20\x69\x73\x20"
30276 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
30277 "\x65\x64\x20\x61\x6e\x20\x22\x49"
30278 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
30279 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
30280 "\x22\x2e\x20\x53\x75\x63\x68\x20"
30281 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
30282 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
30283 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
30284 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
30285 "\x74\x73\x20\x69\x6e\x20\x49\x45"
30286 "\x54\x46\x20\x73\x65\x73\x73\x69"
30287 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
30288 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
30289 "\x77\x72\x69\x74\x74\x65\x6e\x20"
30290 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
30291 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
30292 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
30293 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
30294 "\x64\x65\x20\x61\x74\x20\x61\x6e"
30295 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
30296 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
30297 "\x20\x77\x68\x69\x63\x68\x20\x61"
30298 "\x72\x65\x20\x61\x64\x64\x72\x65"
30299 "\x73\x73\x65\x64\x20\x74\x6f",
30300 .ilen = 375,
30301 .result = "\xa3\xfb\xf0\x7d\xf3\xfa\x2f\xde"
30302 "\x4f\x37\x6c\xa2\x3e\x82\x73\x70"
30303 "\x41\x60\x5d\x9f\x4f\x4f\x57\xbd"
30304 "\x8c\xff\x2c\x1d\x4b\x79\x55\xec"
30305 "\x2a\x97\x94\x8b\xd3\x72\x29\x15"
30306 "\xc8\xf3\xd3\x37\xf7\xd3\x70\x05"
30307 "\x0e\x9e\x96\xd6\x47\xb7\xc3\x9f"
30308 "\x56\xe0\x31\xca\x5e\xb6\x25\x0d"
30309 "\x40\x42\xe0\x27\x85\xec\xec\xfa"
30310 "\x4b\x4b\xb5\xe8\xea\xd0\x44\x0e"
30311 "\x20\xb6\xe8\xdb\x09\xd8\x81\xa7"
30312 "\xc6\x13\x2f\x42\x0e\x52\x79\x50"
30313 "\x42\xbd\xfa\x77\x73\xd8\xa9\x05"
30314 "\x14\x47\xb3\x29\x1c\xe1\x41\x1c"
30315 "\x68\x04\x65\x55\x2a\xa6\xc4\x05"
30316 "\xb7\x76\x4d\x5e\x87\xbe\xa8\x5a"
30317 "\xd0\x0f\x84\x49\xed\x8f\x72\xd0"
30318 "\xd6\x62\xab\x05\x26\x91\xca\x66"
30319 "\x42\x4b\xc8\x6d\x2d\xf8\x0e\xa4"
30320 "\x1f\x43\xab\xf9\x37\xd3\x25\x9d"
30321 "\xc4\xb2\xd0\xdf\xb4\x8a\x6c\x91"
30322 "\x39\xdd\xd7\xf7\x69\x66\xe9\x28"
30323 "\xe6\x35\x55\x3b\xa7\x6c\x5c\x87"
30324 "\x9d\x7b\x35\xd4\x9e\xb2\xe6\x2b"
30325 "\x08\x71\xcd\xac\x63\x89\x39\xe2"
30326 "\x5e\x8a\x1e\x0e\xf9\xd5\x28\x0f"
30327 "\xa8\xca\x32\x8b\x35\x1c\x3c\x76"
30328 "\x59\x89\xcb\xcf\x3d\xaa\x8b\x6c"
30329 "\xcc\x3a\xaf\x9f\x39\x79\xc9\x2b"
30330 "\x37\x20\xfc\x88\xdc\x95\xed\x84"
30331 "\xa1\xbe\x05\x9c\x64\x99\xb9\xfd"
30332 "\xa2\x36\xe7\xe8\x18\xb0\x4b\x0b"
30333 "\xc3\x9c\x1e\x87\x6b\x19\x3b\xfe"
30334 "\x55\x69\x75\x3f\x88\x12\x8c\xc0"
30335 "\x8a\xaa\x9b\x63\xd1\xa1\x6f\x80"
30336 "\xef\x25\x54\xd7\x18\x9c\x41\x1f"
30337 "\x58\x69\xca\x52\xc5\xb8\x3f\xa3"
30338 "\x6f\xf2\x16\xb9\xc1\xd3\x00\x62"
30339 "\xbe\xbc\xfd\x2d\xc5\xbc\xe0\x91"
30340 "\x19\x34\xfd\xa7\x9a\x86\xf6\xe6"
30341 "\x98\xce\xd7\x59\xc3\xff\x9b\x64"
30342 "\x77\x33\x8f\x3d\xa4\xf9\xcd\x85"
30343 "\x14\xea\x99\x82\xcc\xaf\xb3\x41"
30344 "\xb2\x38\x4d\xd9\x02\xf3\xd1\xab"
30345 "\x7a\xc6\x1d\xd2\x9c\x6f\x21\xba"
30346 "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
30347 "\xc4\xfd\x80\x6c\x22\xf2\x21",
30348 .rlen = 375,
30349 }, { /* RFC7539 A.2. Test Vector #3 */
30350 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
30351 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
30352 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
30353 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
30354 .klen = 32,
30355 .iv = "\x2a\x00\x00\x00\x00\x00\x00\x00"
30356 "\x00\x00\x00\x00\x00\x00\x00\x02",
30357 .input = "\x27\x54\x77\x61\x73\x20\x62\x72"
30358 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
30359 "\x6e\x64\x20\x74\x68\x65\x20\x73"
30360 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
30361 "\x76\x65\x73\x0a\x44\x69\x64\x20"
30362 "\x67\x79\x72\x65\x20\x61\x6e\x64"
30363 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
30364 "\x69\x6e\x20\x74\x68\x65\x20\x77"
30365 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
30366 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
30367 "\x65\x72\x65\x20\x74\x68\x65\x20"
30368 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
30369 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
30370 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
30371 "\x72\x61\x74\x68\x73\x20\x6f\x75"
30372 "\x74\x67\x72\x61\x62\x65\x2e",
30373 .ilen = 127,
30374 .result = "\x62\xe6\x34\x7f\x95\xed\x87\xa4"
30375 "\x5f\xfa\xe7\x42\x6f\x27\xa1\xdf"
30376 "\x5f\xb6\x91\x10\x04\x4c\x0d\x73"
30377 "\x11\x8e\xff\xa9\x5b\x01\xe5\xcf"
30378 "\x16\x6d\x3d\xf2\xd7\x21\xca\xf9"
30379 "\xb2\x1e\x5f\xb1\x4c\x61\x68\x71"
30380 "\xfd\x84\xc5\x4f\x9d\x65\xb2\x83"
30381 "\x19\x6c\x7f\xe4\xf6\x05\x53\xeb"
30382 "\xf3\x9c\x64\x02\xc4\x22\x34\xe3"
30383 "\x2a\x35\x6b\x3e\x76\x43\x12\xa6"
30384 "\x1a\x55\x32\x05\x57\x16\xea\xd6"
30385 "\x96\x25\x68\xf8\x7d\x3f\x3f\x77"
30386 "\x04\xc6\xa8\xd1\xbc\xd1\xbf\x4d"
30387 "\x50\xd6\x15\x4b\x6d\xa7\x31\xb1"
30388 "\x87\xb5\x8d\xfd\x72\x8a\xfa\x36"
30389 "\x75\x7a\x79\x7a\xc1\x88\xd1",
30390 .rlen = 127,
30391 },
30392};
30393
Herbert Xuda7f0332008-07-31 17:08:25 +080030394/*
30395 * CTS (Cipher Text Stealing) mode tests
30396 */
30397#define CTS_MODE_ENC_TEST_VECTORS 6
30398#define CTS_MODE_DEC_TEST_VECTORS 6
30399static struct cipher_testvec cts_mode_enc_tv_template[] = {
30400 { /* from rfc3962 */
30401 .klen = 16,
30402 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30403 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30404 .ilen = 17,
30405 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30406 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30407 "\x20",
30408 .rlen = 17,
30409 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
30410 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
30411 "\x97",
30412 }, {
30413 .klen = 16,
30414 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30415 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30416 .ilen = 31,
30417 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30418 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30419 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30420 "\x20\x47\x61\x75\x27\x73\x20",
30421 .rlen = 31,
30422 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
30423 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
30424 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30425 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
30426 }, {
30427 .klen = 16,
30428 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30429 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30430 .ilen = 32,
30431 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30432 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30433 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30434 "\x20\x47\x61\x75\x27\x73\x20\x43",
30435 .rlen = 32,
30436 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30437 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30438 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30439 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
30440 }, {
30441 .klen = 16,
30442 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30443 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30444 .ilen = 47,
30445 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30446 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30447 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30448 "\x20\x47\x61\x75\x27\x73\x20\x43"
30449 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30450 "\x70\x6c\x65\x61\x73\x65\x2c",
30451 .rlen = 47,
30452 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30453 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30454 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
30455 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
30456 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30457 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
30458 }, {
30459 .klen = 16,
30460 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30461 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30462 .ilen = 48,
30463 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30464 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30465 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30466 "\x20\x47\x61\x75\x27\x73\x20\x43"
30467 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30468 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
30469 .rlen = 48,
30470 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30471 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30472 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30473 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
30474 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30475 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
30476 }, {
30477 .klen = 16,
30478 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30479 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30480 .ilen = 64,
30481 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30482 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30483 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30484 "\x20\x47\x61\x75\x27\x73\x20\x43"
30485 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30486 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
30487 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
30488 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
30489 .rlen = 64,
30490 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30491 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30492 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30493 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30494 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
30495 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
30496 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30497 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
30498 }
30499};
30500
30501static struct cipher_testvec cts_mode_dec_tv_template[] = {
30502 { /* from rfc3962 */
30503 .klen = 16,
30504 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30505 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30506 .rlen = 17,
30507 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30508 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30509 "\x20",
30510 .ilen = 17,
30511 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
30512 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
30513 "\x97",
30514 }, {
30515 .klen = 16,
30516 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30517 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30518 .rlen = 31,
30519 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30520 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30521 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30522 "\x20\x47\x61\x75\x27\x73\x20",
30523 .ilen = 31,
30524 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
30525 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
30526 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30527 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
30528 }, {
30529 .klen = 16,
30530 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30531 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30532 .rlen = 32,
30533 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30534 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30535 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30536 "\x20\x47\x61\x75\x27\x73\x20\x43",
30537 .ilen = 32,
30538 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30539 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30540 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30541 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
30542 }, {
30543 .klen = 16,
30544 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30545 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30546 .rlen = 47,
30547 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30548 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30549 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30550 "\x20\x47\x61\x75\x27\x73\x20\x43"
30551 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30552 "\x70\x6c\x65\x61\x73\x65\x2c",
30553 .ilen = 47,
30554 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30555 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30556 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
30557 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
30558 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30559 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
30560 }, {
30561 .klen = 16,
30562 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30563 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30564 .rlen = 48,
30565 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30566 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30567 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30568 "\x20\x47\x61\x75\x27\x73\x20\x43"
30569 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30570 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
30571 .ilen = 48,
30572 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30573 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30574 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30575 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
30576 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30577 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
30578 }, {
30579 .klen = 16,
30580 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30581 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30582 .rlen = 64,
30583 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30584 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30585 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30586 "\x20\x47\x61\x75\x27\x73\x20\x43"
30587 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30588 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
30589 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
30590 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
30591 .ilen = 64,
30592 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30593 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30594 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30595 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30596 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
30597 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
30598 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30599 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
30600 }
30601};
30602
30603/*
30604 * Compression stuff.
30605 */
30606#define COMP_BUF_SIZE 512
30607
30608struct comp_testvec {
30609 int inlen, outlen;
30610 char input[COMP_BUF_SIZE];
30611 char output[COMP_BUF_SIZE];
30612};
30613
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080030614struct pcomp_testvec {
David Howellsf94a3592015-04-28 15:36:30 +010030615 const void *params;
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080030616 unsigned int paramsize;
30617 int inlen, outlen;
30618 char input[COMP_BUF_SIZE];
30619 char output[COMP_BUF_SIZE];
30620};
30621
Herbert Xuda7f0332008-07-31 17:08:25 +080030622/*
30623 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110030624 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080030625 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080030626
Herbert Xuda7f0332008-07-31 17:08:25 +080030627#define DEFLATE_COMP_TEST_VECTORS 2
30628#define DEFLATE_DECOMP_TEST_VECTORS 2
30629
30630static struct comp_testvec deflate_comp_tv_template[] = {
30631 {
30632 .inlen = 70,
30633 .outlen = 38,
30634 .input = "Join us now and share the software "
30635 "Join us now and share the software ",
30636 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30637 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30638 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30639 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30640 "\x71\xbc\x08\x2b\x01\x00",
30641 }, {
30642 .inlen = 191,
30643 .outlen = 122,
30644 .input = "This document describes a compression method based on the DEFLATE"
30645 "compression algorithm. This document defines the application of "
30646 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30647 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30648 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30649 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30650 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30651 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30652 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30653 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30654 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30655 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30656 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30657 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30658 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30659 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30660 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30661 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30662 "\xfa\x02",
30663 },
30664};
30665
30666static struct comp_testvec deflate_decomp_tv_template[] = {
30667 {
30668 .inlen = 122,
30669 .outlen = 191,
30670 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30671 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30672 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30673 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30674 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30675 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30676 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30677 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30678 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30679 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30680 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30681 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30682 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30683 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30684 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30685 "\xfa\x02",
30686 .output = "This document describes a compression method based on the DEFLATE"
30687 "compression algorithm. This document defines the application of "
30688 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30689 }, {
30690 .inlen = 38,
30691 .outlen = 70,
30692 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30693 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30694 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30695 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30696 "\x71\xbc\x08\x2b\x01\x00",
30697 .output = "Join us now and share the software "
30698 "Join us now and share the software ",
30699 },
30700};
30701
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080030702#define ZLIB_COMP_TEST_VECTORS 2
30703#define ZLIB_DECOMP_TEST_VECTORS 2
30704
30705static const struct {
30706 struct nlattr nla;
30707 int val;
30708} deflate_comp_params[] = {
30709 {
30710 .nla = {
30711 .nla_len = NLA_HDRLEN + sizeof(int),
30712 .nla_type = ZLIB_COMP_LEVEL,
30713 },
30714 .val = Z_DEFAULT_COMPRESSION,
30715 }, {
30716 .nla = {
30717 .nla_len = NLA_HDRLEN + sizeof(int),
30718 .nla_type = ZLIB_COMP_METHOD,
30719 },
30720 .val = Z_DEFLATED,
30721 }, {
30722 .nla = {
30723 .nla_len = NLA_HDRLEN + sizeof(int),
30724 .nla_type = ZLIB_COMP_WINDOWBITS,
30725 },
30726 .val = -11,
30727 }, {
30728 .nla = {
30729 .nla_len = NLA_HDRLEN + sizeof(int),
30730 .nla_type = ZLIB_COMP_MEMLEVEL,
30731 },
30732 .val = MAX_MEM_LEVEL,
30733 }, {
30734 .nla = {
30735 .nla_len = NLA_HDRLEN + sizeof(int),
30736 .nla_type = ZLIB_COMP_STRATEGY,
30737 },
30738 .val = Z_DEFAULT_STRATEGY,
30739 }
30740};
30741
30742static const struct {
30743 struct nlattr nla;
30744 int val;
30745} deflate_decomp_params[] = {
30746 {
30747 .nla = {
30748 .nla_len = NLA_HDRLEN + sizeof(int),
30749 .nla_type = ZLIB_DECOMP_WINDOWBITS,
30750 },
30751 .val = -11,
30752 }
30753};
30754
30755static struct pcomp_testvec zlib_comp_tv_template[] = {
30756 {
30757 .params = &deflate_comp_params,
30758 .paramsize = sizeof(deflate_comp_params),
30759 .inlen = 70,
30760 .outlen = 38,
30761 .input = "Join us now and share the software "
30762 "Join us now and share the software ",
30763 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30764 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30765 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30766 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30767 "\x71\xbc\x08\x2b\x01\x00",
30768 }, {
30769 .params = &deflate_comp_params,
30770 .paramsize = sizeof(deflate_comp_params),
30771 .inlen = 191,
30772 .outlen = 122,
30773 .input = "This document describes a compression method based on the DEFLATE"
30774 "compression algorithm. This document defines the application of "
30775 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30776 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30777 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30778 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30779 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30780 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30781 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30782 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30783 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30784 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30785 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30786 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30787 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30788 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30789 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30790 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30791 "\xfa\x02",
30792 },
30793};
30794
30795static struct pcomp_testvec zlib_decomp_tv_template[] = {
30796 {
30797 .params = &deflate_decomp_params,
30798 .paramsize = sizeof(deflate_decomp_params),
30799 .inlen = 122,
30800 .outlen = 191,
30801 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30802 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30803 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30804 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30805 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30806 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30807 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30808 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30809 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30810 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30811 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30812 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30813 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30814 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30815 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30816 "\xfa\x02",
30817 .output = "This document describes a compression method based on the DEFLATE"
30818 "compression algorithm. This document defines the application of "
30819 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30820 }, {
30821 .params = &deflate_decomp_params,
30822 .paramsize = sizeof(deflate_decomp_params),
30823 .inlen = 38,
30824 .outlen = 70,
30825 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30826 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30827 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30828 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30829 "\x71\xbc\x08\x2b\x01\x00",
30830 .output = "Join us now and share the software "
30831 "Join us now and share the software ",
30832 },
30833};
30834
Herbert Xuda7f0332008-07-31 17:08:25 +080030835/*
30836 * LZO test vectors (null-terminated strings).
30837 */
30838#define LZO_COMP_TEST_VECTORS 2
30839#define LZO_DECOMP_TEST_VECTORS 2
30840
30841static struct comp_testvec lzo_comp_tv_template[] = {
30842 {
30843 .inlen = 70,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030844 .outlen = 57,
Herbert Xuda7f0332008-07-31 17:08:25 +080030845 .input = "Join us now and share the software "
30846 "Join us now and share the software ",
30847 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030848 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30849 "\x64\x20\x73\x68\x61\x72\x65\x20"
30850 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30851 "\x77\x70\x01\x32\x88\x00\x0c\x65"
30852 "\x20\x74\x68\x65\x20\x73\x6f\x66"
30853 "\x74\x77\x61\x72\x65\x20\x11\x00"
30854 "\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080030855 }, {
30856 .inlen = 159,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030857 .outlen = 131,
Herbert Xuda7f0332008-07-31 17:08:25 +080030858 .input = "This document describes a compression method based on the LZO "
30859 "compression algorithm. This document defines the application of "
30860 "the LZO algorithm used in UBIFS.",
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030861 .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
Herbert Xuda7f0332008-07-31 17:08:25 +080030862 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
30863 "\x64\x65\x73\x63\x72\x69\x62\x65"
30864 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
30865 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
30866 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
30867 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030868 "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
30869 "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
30870 "\x72\x69\x74\x68\x6d\x2e\x20\x20"
30871 "\x2e\x54\x01\x03\x66\x69\x6e\x65"
30872 "\x73\x20\x74\x06\x05\x61\x70\x70"
30873 "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
30874 "\x66\x88\x02\x60\x09\x27\xf0\x00"
30875 "\x0c\x20\x75\x73\x65\x64\x20\x69"
30876 "\x6e\x20\x55\x42\x49\x46\x53\x2e"
30877 "\x11\x00\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080030878 },
30879};
30880
30881static struct comp_testvec lzo_decomp_tv_template[] = {
30882 {
30883 .inlen = 133,
30884 .outlen = 159,
30885 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
30886 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
30887 "\x64\x65\x73\x63\x72\x69\x62\x65"
30888 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
30889 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
30890 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
30891 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
30892 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
30893 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
30894 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
30895 "\x68\x69\x73\x2a\x54\x01\x02\x66"
30896 "\x69\x6e\x65\x73\x94\x06\x05\x61"
30897 "\x70\x70\x6c\x69\x63\x61\x74\x76"
30898 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
30899 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
30900 "\x20\x69\x6e\x20\x55\x42\x49\x46"
30901 "\x53\x2e\x11\x00\x00",
30902 .output = "This document describes a compression method based on the LZO "
30903 "compression algorithm. This document defines the application of "
30904 "the LZO algorithm used in UBIFS.",
30905 }, {
30906 .inlen = 46,
30907 .outlen = 70,
30908 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
30909 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30910 "\x64\x20\x73\x68\x61\x72\x65\x20"
30911 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30912 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
30913 "\x3d\x88\x00\x11\x00\x00",
30914 .output = "Join us now and share the software "
30915 "Join us now and share the software ",
30916 },
30917};
30918
30919/*
30920 * Michael MIC test vectors from IEEE 802.11i
30921 */
30922#define MICHAEL_MIC_TEST_VECTORS 6
30923
30924static struct hash_testvec michael_mic_tv_template[] = {
30925 {
30926 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
30927 .ksize = 8,
30928 .plaintext = zeroed_string,
30929 .psize = 0,
30930 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
30931 },
30932 {
30933 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
30934 .ksize = 8,
30935 .plaintext = "M",
30936 .psize = 1,
30937 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
30938 },
30939 {
30940 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
30941 .ksize = 8,
30942 .plaintext = "Mi",
30943 .psize = 2,
30944 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
30945 },
30946 {
30947 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
30948 .ksize = 8,
30949 .plaintext = "Mic",
30950 .psize = 3,
30951 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
30952 },
30953 {
30954 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
30955 .ksize = 8,
30956 .plaintext = "Mich",
30957 .psize = 4,
30958 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
30959 },
30960 {
30961 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
30962 .ksize = 8,
30963 .plaintext = "Michael",
30964 .psize = 7,
30965 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
30966 }
30967};
30968
30969/*
Ard Biesheuvelebb34722015-05-04 11:00:17 +020030970 * CRC32 test vectors
30971 */
30972#define CRC32_TEST_VECTORS 14
30973
30974static struct hash_testvec crc32_tv_template[] = {
30975 {
30976 .key = "\x87\xa9\xcb\xed",
30977 .ksize = 4,
30978 .psize = 0,
30979 .digest = "\x87\xa9\xcb\xed",
30980 },
30981 {
30982 .key = "\xff\xff\xff\xff",
30983 .ksize = 4,
30984 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30985 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30986 "\x11\x12\x13\x14\x15\x16\x17\x18"
30987 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30988 "\x21\x22\x23\x24\x25\x26\x27\x28",
30989 .psize = 40,
30990 .digest = "\x3a\xdf\x4b\xb0",
30991 },
30992 {
30993 .key = "\xff\xff\xff\xff",
30994 .ksize = 4,
30995 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30996 "\x31\x32\x33\x34\x35\x36\x37\x38"
30997 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30998 "\x41\x42\x43\x44\x45\x46\x47\x48"
30999 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
31000 .psize = 40,
31001 .digest = "\xa9\x7a\x7f\x7b",
31002 },
31003 {
31004 .key = "\xff\xff\xff\xff",
31005 .ksize = 4,
31006 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
31007 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31008 "\x61\x62\x63\x64\x65\x66\x67\x68"
31009 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31010 "\x71\x72\x73\x74\x75\x76\x77\x78",
31011 .psize = 40,
31012 .digest = "\xba\xd3\xf8\x1c",
31013 },
31014 {
31015 .key = "\xff\xff\xff\xff",
31016 .ksize = 4,
31017 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31018 "\x81\x82\x83\x84\x85\x86\x87\x88"
31019 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31020 "\x91\x92\x93\x94\x95\x96\x97\x98"
31021 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
31022 .psize = 40,
31023 .digest = "\xa8\xa9\xc2\x02",
31024 },
31025 {
31026 .key = "\xff\xff\xff\xff",
31027 .ksize = 4,
31028 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31029 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31030 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31031 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31032 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
31033 .psize = 40,
31034 .digest = "\x27\xf0\x57\xe2",
31035 },
31036 {
31037 .key = "\xff\xff\xff\xff",
31038 .ksize = 4,
31039 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31040 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31041 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31042 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31043 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31044 .psize = 40,
31045 .digest = "\x49\x78\x10\x08",
31046 },
31047 {
31048 .key = "\x80\xea\xd3\xf1",
31049 .ksize = 4,
31050 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31051 "\x31\x32\x33\x34\x35\x36\x37\x38"
31052 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31053 "\x41\x42\x43\x44\x45\x46\x47\x48"
31054 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
31055 .psize = 40,
31056 .digest = "\x9a\xb1\xdc\xf0",
31057 },
31058 {
31059 .key = "\xf3\x4a\x1d\x5d",
31060 .ksize = 4,
31061 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
31062 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31063 "\x61\x62\x63\x64\x65\x66\x67\x68"
31064 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31065 "\x71\x72\x73\x74\x75\x76\x77\x78",
31066 .psize = 40,
31067 .digest = "\xb4\x97\xcc\xd4",
31068 },
31069 {
31070 .key = "\x2e\x80\x04\x59",
31071 .ksize = 4,
31072 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31073 "\x81\x82\x83\x84\x85\x86\x87\x88"
31074 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31075 "\x91\x92\x93\x94\x95\x96\x97\x98"
31076 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
31077 .psize = 40,
31078 .digest = "\x67\x9b\xfa\x79",
31079 },
31080 {
31081 .key = "\xa6\xcc\x19\x85",
31082 .ksize = 4,
31083 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31084 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31085 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31086 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31087 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
31088 .psize = 40,
31089 .digest = "\x24\xb5\x16\xef",
31090 },
31091 {
31092 .key = "\x41\xfc\xfe\x2d",
31093 .ksize = 4,
31094 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31095 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31096 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31097 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31098 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31099 .psize = 40,
31100 .digest = "\x15\x94\x80\x39",
31101 },
31102 {
31103 .key = "\xff\xff\xff\xff",
31104 .ksize = 4,
31105 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31106 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31107 "\x11\x12\x13\x14\x15\x16\x17\x18"
31108 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31109 "\x21\x22\x23\x24\x25\x26\x27\x28"
31110 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31111 "\x31\x32\x33\x34\x35\x36\x37\x38"
31112 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31113 "\x41\x42\x43\x44\x45\x46\x47\x48"
31114 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
31115 "\x51\x52\x53\x54\x55\x56\x57\x58"
31116 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31117 "\x61\x62\x63\x64\x65\x66\x67\x68"
31118 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31119 "\x71\x72\x73\x74\x75\x76\x77\x78"
31120 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31121 "\x81\x82\x83\x84\x85\x86\x87\x88"
31122 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31123 "\x91\x92\x93\x94\x95\x96\x97\x98"
31124 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
31125 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31126 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31127 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31128 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31129 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
31130 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31131 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31132 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31133 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31134 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31135 .psize = 240,
31136 .digest = "\x6c\xc6\x56\xde",
31137 .np = 2,
31138 .tap = { 31, 209 }
31139 }, {
31140 .key = "\xff\xff\xff\xff",
31141 .ksize = 4,
31142 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
31143 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
31144 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
31145 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
31146 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
31147 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
31148 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
31149 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
31150 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
31151 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
31152 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
31153 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
31154 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
31155 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
31156 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
31157 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
31158 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
31159 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
31160 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
31161 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
31162 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
31163 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
31164 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
31165 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
31166 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
31167 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
31168 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
31169 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
31170 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
31171 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
31172 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
31173 "\x47\xde\x75\x0c\x80\x17\xae\x22"
31174 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
31175 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
31176 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
31177 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
31178 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
31179 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
31180 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
31181 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
31182 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
31183 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
31184 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
31185 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
31186 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
31187 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
31188 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
31189 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
31190 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
31191 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
31192 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
31193 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
31194 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
31195 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
31196 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
31197 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
31198 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
31199 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
31200 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
31201 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
31202 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
31203 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
31204 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
31205 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
31206 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
31207 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
31208 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
31209 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
31210 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
31211 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
31212 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
31213 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
31214 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
31215 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
31216 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
31217 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
31218 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
31219 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
31220 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
31221 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
31222 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
31223 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
31224 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
31225 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
31226 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
31227 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
31228 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
31229 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
31230 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
31231 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
31232 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
31233 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
31234 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
31235 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
31236 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
31237 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
31238 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
31239 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
31240 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
31241 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
31242 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
31243 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
31244 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
31245 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
31246 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
31247 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
31248 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
31249 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
31250 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
31251 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
31252 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
31253 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
31254 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
31255 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
31256 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
31257 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
31258 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
31259 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
31260 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
31261 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
31262 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
31263 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
31264 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
31265 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
31266 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
31267 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
31268 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
31269 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
31270 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
31271 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
31272 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
31273 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
31274 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
31275 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
31276 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
31277 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
31278 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
31279 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
31280 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
31281 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
31282 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
31283 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
31284 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
31285 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
31286 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
31287 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
31288 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
31289 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
31290 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
31291 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
31292 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
31293 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
31294 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
31295 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
31296 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
31297 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
31298 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
31299 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
31300 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
31301 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
31302 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
31303 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
31304 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
31305 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
31306 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
31307 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
31308 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
31309 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
31310 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
31311 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
31312 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
31313 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
31314 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
31315 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
31316 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
31317 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
31318 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
31319 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
31320 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
31321 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
31322 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
31323 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
31324 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
31325 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
31326 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
31327 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
31328 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
31329 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
31330 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
31331 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
31332 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
31333 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
31334 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
31335 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
31336 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
31337 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
31338 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
31339 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
31340 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
31341 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
31342 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
31343 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
31344 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
31345 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
31346 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
31347 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
31348 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
31349 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
31350 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
31351 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
31352 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
31353 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
31354 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
31355 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
31356 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
31357 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
31358 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
31359 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
31360 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
31361 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
31362 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
31363 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
31364 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
31365 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
31366 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
31367 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
31368 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
31369 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
31370 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
31371 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
31372 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
31373 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
31374 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
31375 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
31376 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
31377 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
31378 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
31379 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
31380 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
31381 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
31382 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
31383 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
31384 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
31385 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
31386 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
31387 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
31388 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
31389 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
31390 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
31391 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
31392 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
31393 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
31394 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
31395 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
31396 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
31397 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
31398 .psize = 2048,
31399 .digest = "\xfb\x3a\x7a\xda",
31400 }
31401};
31402
31403/*
Herbert Xuda7f0332008-07-31 17:08:25 +080031404 * CRC32C test vectors
31405 */
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020031406#define CRC32C_TEST_VECTORS 15
Herbert Xuda7f0332008-07-31 17:08:25 +080031407
31408static struct hash_testvec crc32c_tv_template[] = {
31409 {
31410 .psize = 0,
31411 .digest = "\x00\x00\x00\x00",
31412 },
31413 {
31414 .key = "\x87\xa9\xcb\xed",
31415 .ksize = 4,
31416 .psize = 0,
31417 .digest = "\x78\x56\x34\x12",
31418 },
31419 {
31420 .key = "\xff\xff\xff\xff",
31421 .ksize = 4,
31422 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31423 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31424 "\x11\x12\x13\x14\x15\x16\x17\x18"
31425 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31426 "\x21\x22\x23\x24\x25\x26\x27\x28",
31427 .psize = 40,
31428 .digest = "\x7f\x15\x2c\x0e",
31429 },
31430 {
31431 .key = "\xff\xff\xff\xff",
31432 .ksize = 4,
31433 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31434 "\x31\x32\x33\x34\x35\x36\x37\x38"
31435 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31436 "\x41\x42\x43\x44\x45\x46\x47\x48"
31437 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
31438 .psize = 40,
31439 .digest = "\xf6\xeb\x80\xe9",
31440 },
31441 {
31442 .key = "\xff\xff\xff\xff",
31443 .ksize = 4,
31444 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
31445 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31446 "\x61\x62\x63\x64\x65\x66\x67\x68"
31447 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31448 "\x71\x72\x73\x74\x75\x76\x77\x78",
31449 .psize = 40,
31450 .digest = "\xed\xbd\x74\xde",
31451 },
31452 {
31453 .key = "\xff\xff\xff\xff",
31454 .ksize = 4,
31455 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31456 "\x81\x82\x83\x84\x85\x86\x87\x88"
31457 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31458 "\x91\x92\x93\x94\x95\x96\x97\x98"
31459 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
31460 .psize = 40,
31461 .digest = "\x62\xc8\x79\xd5",
31462 },
31463 {
31464 .key = "\xff\xff\xff\xff",
31465 .ksize = 4,
31466 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31467 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31468 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31469 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31470 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
31471 .psize = 40,
31472 .digest = "\xd0\x9a\x97\xba",
31473 },
31474 {
31475 .key = "\xff\xff\xff\xff",
31476 .ksize = 4,
31477 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31478 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31479 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31480 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31481 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31482 .psize = 40,
31483 .digest = "\x13\xd9\x29\x2b",
31484 },
31485 {
31486 .key = "\x80\xea\xd3\xf1",
31487 .ksize = 4,
31488 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31489 "\x31\x32\x33\x34\x35\x36\x37\x38"
31490 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31491 "\x41\x42\x43\x44\x45\x46\x47\x48"
31492 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
31493 .psize = 40,
31494 .digest = "\x0c\xb5\xe2\xa2",
31495 },
31496 {
31497 .key = "\xf3\x4a\x1d\x5d",
31498 .ksize = 4,
31499 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
31500 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31501 "\x61\x62\x63\x64\x65\x66\x67\x68"
31502 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31503 "\x71\x72\x73\x74\x75\x76\x77\x78",
31504 .psize = 40,
31505 .digest = "\xd1\x7f\xfb\xa6",
31506 },
31507 {
31508 .key = "\x2e\x80\x04\x59",
31509 .ksize = 4,
31510 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31511 "\x81\x82\x83\x84\x85\x86\x87\x88"
31512 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31513 "\x91\x92\x93\x94\x95\x96\x97\x98"
31514 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
31515 .psize = 40,
31516 .digest = "\x59\x33\xe6\x7a",
31517 },
31518 {
31519 .key = "\xa6\xcc\x19\x85",
31520 .ksize = 4,
31521 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31522 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31523 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31524 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31525 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
31526 .psize = 40,
31527 .digest = "\xbe\x03\x01\xd2",
31528 },
31529 {
31530 .key = "\x41\xfc\xfe\x2d",
31531 .ksize = 4,
31532 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31533 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31534 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31535 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31536 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31537 .psize = 40,
31538 .digest = "\x75\xd3\xc5\x24",
31539 },
31540 {
31541 .key = "\xff\xff\xff\xff",
31542 .ksize = 4,
31543 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31544 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31545 "\x11\x12\x13\x14\x15\x16\x17\x18"
31546 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31547 "\x21\x22\x23\x24\x25\x26\x27\x28"
31548 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31549 "\x31\x32\x33\x34\x35\x36\x37\x38"
31550 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31551 "\x41\x42\x43\x44\x45\x46\x47\x48"
31552 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
31553 "\x51\x52\x53\x54\x55\x56\x57\x58"
31554 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31555 "\x61\x62\x63\x64\x65\x66\x67\x68"
31556 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31557 "\x71\x72\x73\x74\x75\x76\x77\x78"
31558 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31559 "\x81\x82\x83\x84\x85\x86\x87\x88"
31560 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31561 "\x91\x92\x93\x94\x95\x96\x97\x98"
31562 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
31563 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31564 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31565 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31566 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31567 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
31568 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31569 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31570 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31571 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31572 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31573 .psize = 240,
31574 .digest = "\x75\xd3\xc5\x24",
31575 .np = 2,
31576 .tap = { 31, 209 }
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020031577 }, {
31578 .key = "\xff\xff\xff\xff",
31579 .ksize = 4,
31580 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
31581 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
31582 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
31583 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
31584 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
31585 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
31586 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
31587 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
31588 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
31589 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
31590 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
31591 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
31592 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
31593 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
31594 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
31595 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
31596 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
31597 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
31598 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
31599 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
31600 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
31601 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
31602 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
31603 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
31604 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
31605 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
31606 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
31607 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
31608 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
31609 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
31610 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
31611 "\x47\xde\x75\x0c\x80\x17\xae\x22"
31612 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
31613 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
31614 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
31615 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
31616 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
31617 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
31618 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
31619 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
31620 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
31621 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
31622 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
31623 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
31624 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
31625 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
31626 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
31627 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
31628 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
31629 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
31630 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
31631 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
31632 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
31633 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
31634 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
31635 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
31636 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
31637 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
31638 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
31639 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
31640 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
31641 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
31642 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
31643 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
31644 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
31645 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
31646 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
31647 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
31648 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
31649 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
31650 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
31651 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
31652 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
31653 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
31654 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
31655 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
31656 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
31657 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
31658 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
31659 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
31660 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
31661 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
31662 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
31663 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
31664 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
31665 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
31666 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
31667 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
31668 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
31669 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
31670 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
31671 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
31672 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
31673 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
31674 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
31675 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
31676 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
31677 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
31678 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
31679 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
31680 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
31681 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
31682 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
31683 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
31684 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
31685 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
31686 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
31687 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
31688 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
31689 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
31690 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
31691 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
31692 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
31693 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
31694 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
31695 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
31696 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
31697 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
31698 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
31699 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
31700 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
31701 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
31702 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
31703 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
31704 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
31705 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
31706 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
31707 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
31708 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
31709 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
31710 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
31711 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
31712 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
31713 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
31714 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
31715 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
31716 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
31717 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
31718 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
31719 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
31720 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
31721 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
31722 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
31723 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
31724 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
31725 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
31726 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
31727 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
31728 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
31729 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
31730 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
31731 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
31732 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
31733 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
31734 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
31735 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
31736 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
31737 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
31738 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
31739 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
31740 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
31741 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
31742 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
31743 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
31744 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
31745 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
31746 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
31747 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
31748 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
31749 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
31750 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
31751 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
31752 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
31753 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
31754 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
31755 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
31756 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
31757 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
31758 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
31759 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
31760 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
31761 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
31762 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
31763 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
31764 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
31765 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
31766 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
31767 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
31768 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
31769 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
31770 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
31771 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
31772 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
31773 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
31774 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
31775 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
31776 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
31777 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
31778 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
31779 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
31780 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
31781 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
31782 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
31783 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
31784 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
31785 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
31786 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
31787 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
31788 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
31789 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
31790 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
31791 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
31792 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
31793 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
31794 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
31795 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
31796 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
31797 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
31798 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
31799 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
31800 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
31801 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
31802 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
31803 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
31804 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
31805 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
31806 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
31807 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
31808 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
31809 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
31810 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
31811 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
31812 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
31813 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
31814 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
31815 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
31816 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
31817 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
31818 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
31819 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
31820 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
31821 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
31822 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
31823 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
31824 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
31825 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
31826 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
31827 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
31828 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
31829 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
31830 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
31831 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
31832 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
31833 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
31834 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
31835 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
31836 .psize = 2048,
31837 .digest = "\xec\x26\x4d\x95",
31838 }
Herbert Xuda7f0332008-07-31 17:08:25 +080031839};
31840
Sonic Zhanga482b082012-05-25 17:54:13 +080031841/*
31842 * Blakcifn CRC test vectors
31843 */
31844#define BFIN_CRC_TEST_VECTORS 6
31845
31846static struct hash_testvec bfin_crc_tv_template[] = {
31847 {
31848 .psize = 0,
31849 .digest = "\x00\x00\x00\x00",
31850 },
31851 {
31852 .key = "\x87\xa9\xcb\xed",
31853 .ksize = 4,
31854 .psize = 0,
31855 .digest = "\x87\xa9\xcb\xed",
31856 },
31857 {
31858 .key = "\xff\xff\xff\xff",
31859 .ksize = 4,
31860 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31861 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31862 "\x11\x12\x13\x14\x15\x16\x17\x18"
31863 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31864 "\x21\x22\x23\x24\x25\x26\x27\x28",
31865 .psize = 40,
31866 .digest = "\x84\x0c\x8d\xa2",
31867 },
31868 {
31869 .key = "\xff\xff\xff\xff",
31870 .ksize = 4,
31871 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31872 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31873 "\x11\x12\x13\x14\x15\x16\x17\x18"
31874 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31875 "\x21\x22\x23\x24\x25\x26",
31876 .psize = 38,
31877 .digest = "\x8c\x58\xec\xb7",
31878 },
31879 {
31880 .key = "\xff\xff\xff\xff",
31881 .ksize = 4,
31882 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31883 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31884 "\x11\x12\x13\x14\x15\x16\x17\x18"
31885 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31886 "\x21\x22\x23\x24\x25\x26\x27",
31887 .psize = 39,
31888 .digest = "\xdc\x50\x28\x7b",
31889 },
31890 {
31891 .key = "\xff\xff\xff\xff",
31892 .ksize = 4,
31893 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31894 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31895 "\x11\x12\x13\x14\x15\x16\x17\x18"
31896 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31897 "\x21\x22\x23\x24\x25\x26\x27\x28"
31898 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31899 "\x31\x32\x33\x34\x35\x36\x37\x38"
31900 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31901 "\x41\x42\x43\x44\x45\x46\x47\x48"
31902 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
31903 "\x51\x52\x53\x54\x55\x56\x57\x58"
31904 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31905 "\x61\x62\x63\x64\x65\x66\x67\x68"
31906 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31907 "\x71\x72\x73\x74\x75\x76\x77\x78"
31908 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31909 "\x81\x82\x83\x84\x85\x86\x87\x88"
31910 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31911 "\x91\x92\x93\x94\x95\x96\x97\x98"
31912 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
31913 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31914 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31915 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31916 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31917 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
31918 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31919 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31920 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31921 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31922 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31923 .psize = 240,
31924 .digest = "\x10\x19\x4a\x5c",
31925 .np = 2,
31926 .tap = { 31, 209 }
31927 },
31928
31929};
31930
KOVACS Krisztian1443cc92014-08-22 10:44:36 +020031931#define LZ4_COMP_TEST_VECTORS 1
31932#define LZ4_DECOMP_TEST_VECTORS 1
31933
31934static struct comp_testvec lz4_comp_tv_template[] = {
31935 {
31936 .inlen = 70,
31937 .outlen = 45,
31938 .input = "Join us now and share the software "
31939 "Join us now and share the software ",
31940 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31941 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31942 "\x64\x20\x73\x68\x61\x72\x65\x20"
31943 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31944 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31945 "\x77\x61\x72\x65\x20",
31946 },
31947};
31948
31949static struct comp_testvec lz4_decomp_tv_template[] = {
31950 {
31951 .inlen = 45,
31952 .outlen = 70,
31953 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31954 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31955 "\x64\x20\x73\x68\x61\x72\x65\x20"
31956 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31957 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31958 "\x77\x61\x72\x65\x20",
31959 .output = "Join us now and share the software "
31960 "Join us now and share the software ",
31961 },
31962};
31963
31964#define LZ4HC_COMP_TEST_VECTORS 1
31965#define LZ4HC_DECOMP_TEST_VECTORS 1
31966
31967static struct comp_testvec lz4hc_comp_tv_template[] = {
31968 {
31969 .inlen = 70,
31970 .outlen = 45,
31971 .input = "Join us now and share the software "
31972 "Join us now and share the software ",
31973 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31974 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31975 "\x64\x20\x73\x68\x61\x72\x65\x20"
31976 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31977 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31978 "\x77\x61\x72\x65\x20",
31979 },
31980};
31981
31982static struct comp_testvec lz4hc_decomp_tv_template[] = {
31983 {
31984 .inlen = 45,
31985 .outlen = 70,
31986 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31987 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31988 "\x64\x20\x73\x68\x61\x72\x65\x20"
31989 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31990 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31991 "\x77\x61\x72\x65\x20",
31992 .output = "Join us now and share the software "
31993 "Join us now and share the software ",
31994 },
31995};
31996
Herbert Xuda7f0332008-07-31 17:08:25 +080031997#endif /* _CRYPTO_TESTMGR_H */