Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Quick & dirty crypto testing module. |
| 3 | * |
| 4 | * This will only exist until we have a better testing mechanism |
| 5 | * (e.g. a char device). |
| 6 | * |
| 7 | * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> |
| 8 | * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org> |
Mikko Herranen | e3a4ea4 | 2007-11-26 22:12:07 +0800 | [diff] [blame] | 9 | * Copyright (c) 2007 Nokia Siemens Networks |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify it |
| 12 | * under the terms of the GNU General Public License as published by the Free |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 13 | * Software Foundation; either version 2 of the License, or (at your option) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | * any later version. |
| 15 | * |
Mikko Herranen | 28db8e3 | 2007-11-26 22:24:11 +0800 | [diff] [blame] | 16 | * 2007-11-13 Added GCM tests |
Mikko Herranen | e3a4ea4 | 2007-11-26 22:12:07 +0800 | [diff] [blame] | 17 | * 2007-11-13 Added AEAD support |
Andrew Donofrio | a28091a | 2006-12-10 12:10:20 +1100 | [diff] [blame] | 18 | * 2006-12-07 Added SHA384 HMAC and SHA512 HMAC tests |
Harald Welte | ebfd9bc | 2005-06-22 13:27:23 -0700 | [diff] [blame] | 19 | * 2004-08-09 Cipher speed tests by Reyk Floeter <reyk@vantronix.net> |
| 20 | * 2003-09-14 Changes by Kartikey Mahendra Bhatt |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | * |
| 22 | */ |
| 23 | #ifndef _CRYPTO_TCRYPT_H |
| 24 | #define _CRYPTO_TCRYPT_H |
| 25 | |
| 26 | #define MAX_DIGEST_SIZE 64 |
| 27 | #define MAX_TAP 8 |
| 28 | |
| 29 | #define MAX_KEYLEN 56 |
| 30 | #define MAX_IVLEN 32 |
| 31 | |
| 32 | struct hash_testvec { |
Atsushi Nemoto | 06b42aa | 2006-03-13 21:39:23 +1100 | [diff] [blame] | 33 | /* only used with keyed hash algorithms */ |
Andrew Donofrio | a28091a | 2006-12-10 12:10:20 +1100 | [diff] [blame] | 34 | char key[132] __attribute__ ((__aligned__(4))); |
Herbert Xu | c907ee7 | 2006-08-21 22:04:03 +1000 | [diff] [blame] | 35 | char plaintext[240]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | char digest[MAX_DIGEST_SIZE]; |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 37 | unsigned char tap[MAX_TAP]; |
Atsushi Nemoto | 06b42aa | 2006-03-13 21:39:23 +1100 | [diff] [blame] | 38 | unsigned char psize; |
| 39 | unsigned char np; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | unsigned char ksize; |
| 41 | }; |
| 42 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | struct cipher_testvec { |
Atsushi Nemoto | 06b42aa | 2006-03-13 21:39:23 +1100 | [diff] [blame] | 44 | char key[MAX_KEYLEN] __attribute__ ((__aligned__(4))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | char iv[MAX_IVLEN]; |
Tan Swee Heng | a773edb | 2007-11-30 00:36:07 +1100 | [diff] [blame] | 46 | char input[4100]; |
| 47 | char result[4100]; |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 48 | unsigned char tap[MAX_TAP]; |
Atsushi Nemoto | 06b42aa | 2006-03-13 21:39:23 +1100 | [diff] [blame] | 49 | int np; |
| 50 | unsigned char fail; |
| 51 | unsigned char wk; /* weak key flag */ |
| 52 | unsigned char klen; |
Rik Snel | f3d1044 | 2006-11-29 19:01:41 +1100 | [diff] [blame] | 53 | unsigned short ilen; |
| 54 | unsigned short rlen; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | }; |
| 56 | |
Mikko Herranen | e3a4ea4 | 2007-11-26 22:12:07 +0800 | [diff] [blame] | 57 | struct aead_testvec { |
| 58 | char key[MAX_KEYLEN] __attribute__ ((__aligned__(4))); |
| 59 | char iv[MAX_IVLEN]; |
| 60 | char input[512]; |
| 61 | char assoc[512]; |
| 62 | char result[512]; |
| 63 | char tag[128]; |
| 64 | unsigned char tap[MAX_TAP]; |
| 65 | unsigned char atap[MAX_TAP]; |
| 66 | int np; |
| 67 | int anp; |
| 68 | unsigned char fail; |
| 69 | unsigned char wk; /* weak key flag */ |
| 70 | unsigned char klen; |
| 71 | unsigned short ilen; |
| 72 | unsigned short alen; |
| 73 | unsigned short rlen; |
| 74 | unsigned short tlen; |
| 75 | }; |
| 76 | |
Harald Welte | ebfd9bc | 2005-06-22 13:27:23 -0700 | [diff] [blame] | 77 | struct cipher_speed { |
| 78 | unsigned char klen; |
| 79 | unsigned int blen; |
| 80 | }; |
| 81 | |
Herbert Xu | e9d4116 | 2006-08-19 21:38:49 +1000 | [diff] [blame] | 82 | struct hash_speed { |
Michal Ludvig | e805792 | 2006-05-30 22:04:19 +1000 | [diff] [blame] | 83 | unsigned int blen; /* buffer length */ |
| 84 | unsigned int plen; /* per-update length */ |
| 85 | }; |
| 86 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | /* |
| 88 | * MD4 test vectors from RFC1320 |
| 89 | */ |
| 90 | #define MD4_TEST_VECTORS 7 |
| 91 | |
| 92 | static struct hash_testvec md4_tv_template [] = { |
| 93 | { |
| 94 | .plaintext = "", |
| 95 | .digest = { 0x31, 0xd6, 0xcf, 0xe0, 0xd1, 0x6a, 0xe9, 0x31, |
| 96 | 0xb7, 0x3c, 0x59, 0xd7, 0xe0, 0xc0, 0x89, 0xc0 }, |
| 97 | }, { |
| 98 | .plaintext = "a", |
| 99 | .psize = 1, |
| 100 | .digest = { 0xbd, 0xe5, 0x2c, 0xb3, 0x1d, 0xe3, 0x3e, 0x46, |
| 101 | 0x24, 0x5e, 0x05, 0xfb, 0xdb, 0xd6, 0xfb, 0x24 }, |
| 102 | }, { |
| 103 | .plaintext = "abc", |
| 104 | .psize = 3, |
| 105 | .digest = { 0xa4, 0x48, 0x01, 0x7a, 0xaf, 0x21, 0xd8, 0x52, |
| 106 | 0x5f, 0xc1, 0x0a, 0xe8, 0x7a, 0xa6, 0x72, 0x9d }, |
| 107 | }, { |
| 108 | .plaintext = "message digest", |
| 109 | .psize = 14, |
| 110 | .digest = { 0xd9, 0x13, 0x0a, 0x81, 0x64, 0x54, 0x9f, 0xe8, |
| 111 | 0x18, 0x87, 0x48, 0x06, 0xe1, 0xc7, 0x01, 0x4b }, |
| 112 | }, { |
| 113 | .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| 114 | .psize = 26, |
| 115 | .digest = { 0xd7, 0x9e, 0x1c, 0x30, 0x8a, 0xa5, 0xbb, 0xcd, |
| 116 | 0xee, 0xa8, 0xed, 0x63, 0xdf, 0x41, 0x2d, 0xa9 }, |
| 117 | .np = 2, |
| 118 | .tap = { 13, 13 }, |
| 119 | }, { |
| 120 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", |
| 121 | .psize = 62, |
| 122 | .digest = { 0x04, 0x3f, 0x85, 0x82, 0xf2, 0x41, 0xdb, 0x35, |
| 123 | 0x1c, 0xe6, 0x27, 0xe1, 0x53, 0xe7, 0xf0, 0xe4 }, |
| 124 | }, { |
| 125 | .plaintext = "123456789012345678901234567890123456789012345678901234567890123" |
| 126 | "45678901234567890", |
| 127 | .psize = 80, |
| 128 | .digest = { 0xe3, 0x3b, 0x4d, 0xdc, 0x9c, 0x38, 0xf2, 0x19, |
| 129 | 0x9c, 0x3e, 0x7b, 0x16, 0x4f, 0xcc, 0x05, 0x36 }, |
| 130 | }, |
| 131 | }; |
| 132 | |
| 133 | /* |
| 134 | * MD5 test vectors from RFC1321 |
| 135 | */ |
| 136 | #define MD5_TEST_VECTORS 7 |
| 137 | |
| 138 | static struct hash_testvec md5_tv_template[] = { |
| 139 | { |
| 140 | .digest = { 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, |
| 141 | 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e }, |
| 142 | }, { |
| 143 | .plaintext = "a", |
| 144 | .psize = 1, |
| 145 | .digest = { 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8, |
| 146 | 0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61 }, |
| 147 | }, { |
| 148 | .plaintext = "abc", |
| 149 | .psize = 3, |
| 150 | .digest = { 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0, |
| 151 | 0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72 }, |
| 152 | }, { |
| 153 | .plaintext = "message digest", |
| 154 | .psize = 14, |
| 155 | .digest = { 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d, |
| 156 | 0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 }, |
| 157 | }, { |
| 158 | .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| 159 | .psize = 26, |
| 160 | .digest = { 0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00, |
| 161 | 0x7d, 0xfb, 0x49, 0x6c, 0xca, 0x67, 0xe1, 0x3b }, |
| 162 | .np = 2, |
| 163 | .tap = {13, 13} |
| 164 | }, { |
| 165 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", |
| 166 | .psize = 62, |
| 167 | .digest = { 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5, |
| 168 | 0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f }, |
| 169 | }, { |
| 170 | .plaintext = "12345678901234567890123456789012345678901234567890123456789012" |
| 171 | "345678901234567890", |
| 172 | .psize = 80, |
| 173 | .digest = { 0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55, |
| 174 | 0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a }, |
| 175 | } |
| 176 | }; |
| 177 | |
| 178 | /* |
| 179 | * SHA1 test vectors from from FIPS PUB 180-1 |
| 180 | */ |
| 181 | #define SHA1_TEST_VECTORS 2 |
| 182 | |
| 183 | static struct hash_testvec sha1_tv_template[] = { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 184 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 185 | .plaintext = "abc", |
| 186 | .psize = 3, |
| 187 | .digest = { 0xa9, 0x99, 0x3e, 0x36, 0x47, 0x06, 0x81, 0x6a, 0xba, 0x3e, |
| 188 | 0x25, 0x71, 0x78, 0x50, 0xc2, 0x6c, 0x9c, 0xd0, 0xd8, 0x9d }, |
| 189 | }, { |
| 190 | .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| 191 | .psize = 56, |
| 192 | .digest = { 0x84, 0x98, 0x3e, 0x44, 0x1c, 0x3b, 0xd2, 0x6e, 0xba, 0xae, |
| 193 | 0x4a, 0xa1, 0xf9, 0x51, 0x29, 0xe5, 0xe5, 0x46, 0x70, 0xf1 }, |
| 194 | .np = 2, |
| 195 | .tap = { 28, 28 } |
| 196 | } |
| 197 | }; |
| 198 | |
Jonathan Lynch | cd12fb90 | 2007-11-10 20:08:25 +0800 | [diff] [blame] | 199 | |
| 200 | /* |
| 201 | * SHA224 test vectors from from FIPS PUB 180-2 |
| 202 | */ |
| 203 | #define SHA224_TEST_VECTORS 2 |
| 204 | |
| 205 | static struct hash_testvec sha224_tv_template[] = { |
| 206 | { |
| 207 | .plaintext = "abc", |
| 208 | .psize = 3, |
| 209 | .digest = { 0x23, 0x09, 0x7D, 0x22, 0x34, 0x05, 0xD8, 0x22, |
| 210 | 0x86, 0x42, 0xA4, 0x77, 0xBD, 0xA2, 0x55, 0xB3, |
| 211 | 0x2A, 0xAD, 0xBC, 0xE4, 0xBD, 0xA0, 0xB3, 0xF7, |
| 212 | 0xE3, 0x6C, 0x9D, 0xA7}, |
| 213 | }, { |
| 214 | .plaintext = |
| 215 | "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| 216 | .psize = 56, |
| 217 | .digest = { 0x75, 0x38, 0x8B, 0x16, 0x51, 0x27, 0x76, 0xCC, |
| 218 | 0x5D, 0xBA, 0x5D, 0xA1, 0xFD, 0x89, 0x01, 0x50, |
| 219 | 0xB0, 0xC6, 0x45, 0x5C, 0xB4, 0xF5, 0x8B, 0x19, |
| 220 | 0x52, 0x52, 0x25, 0x25 }, |
| 221 | .np = 2, |
| 222 | .tap = { 28, 28 } |
| 223 | } |
| 224 | }; |
| 225 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | /* |
| 227 | * SHA256 test vectors from from NIST |
| 228 | */ |
| 229 | #define SHA256_TEST_VECTORS 2 |
| 230 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 231 | static struct hash_testvec sha256_tv_template[] = { |
| 232 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 233 | .plaintext = "abc", |
| 234 | .psize = 3, |
| 235 | .digest = { 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea, |
| 236 | 0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23, |
| 237 | 0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c, |
| 238 | 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad }, |
| 239 | }, { |
| 240 | .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| 241 | .psize = 56, |
| 242 | .digest = { 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8, |
| 243 | 0xe5, 0xc0, 0x26, 0x93, 0x0c, 0x3e, 0x60, 0x39, |
| 244 | 0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67, |
| 245 | 0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1 }, |
| 246 | .np = 2, |
| 247 | .tap = { 28, 28 } |
| 248 | }, |
| 249 | }; |
| 250 | |
| 251 | /* |
| 252 | * SHA384 test vectors from from NIST and kerneli |
| 253 | */ |
| 254 | #define SHA384_TEST_VECTORS 4 |
| 255 | |
| 256 | static struct hash_testvec sha384_tv_template[] = { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 257 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | .plaintext= "abc", |
| 259 | .psize = 3, |
| 260 | .digest = { 0xcb, 0x00, 0x75, 0x3f, 0x45, 0xa3, 0x5e, 0x8b, |
| 261 | 0xb5, 0xa0, 0x3d, 0x69, 0x9a, 0xc6, 0x50, 0x07, |
| 262 | 0x27, 0x2c, 0x32, 0xab, 0x0e, 0xde, 0xd1, 0x63, |
| 263 | 0x1a, 0x8b, 0x60, 0x5a, 0x43, 0xff, 0x5b, 0xed, |
| 264 | 0x80, 0x86, 0x07, 0x2b, 0xa1, 0xe7, 0xcc, 0x23, |
| 265 | 0x58, 0xba, 0xec, 0xa1, 0x34, 0xc8, 0x25, 0xa7 }, |
| 266 | }, { |
| 267 | .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| 268 | .psize = 56, |
| 269 | .digest = { 0x33, 0x91, 0xfd, 0xdd, 0xfc, 0x8d, 0xc7, 0x39, |
| 270 | 0x37, 0x07, 0xa6, 0x5b, 0x1b, 0x47, 0x09, 0x39, |
| 271 | 0x7c, 0xf8, 0xb1, 0xd1, 0x62, 0xaf, 0x05, 0xab, |
| 272 | 0xfe, 0x8f, 0x45, 0x0d, 0xe5, 0xf3, 0x6b, 0xc6, |
| 273 | 0xb0, 0x45, 0x5a, 0x85, 0x20, 0xbc, 0x4e, 0x6f, |
| 274 | 0x5f, 0xe9, 0x5b, 0x1f, 0xe3, 0xc8, 0x45, 0x2b}, |
| 275 | }, { |
| 276 | .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn" |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 277 | "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 278 | .psize = 112, |
| 279 | .digest = { 0x09, 0x33, 0x0c, 0x33, 0xf7, 0x11, 0x47, 0xe8, |
| 280 | 0x3d, 0x19, 0x2f, 0xc7, 0x82, 0xcd, 0x1b, 0x47, |
| 281 | 0x53, 0x11, 0x1b, 0x17, 0x3b, 0x3b, 0x05, 0xd2, |
| 282 | 0x2f, 0xa0, 0x80, 0x86, 0xe3, 0xb0, 0xf7, 0x12, |
| 283 | 0xfc, 0xc7, 0xc7, 0x1a, 0x55, 0x7e, 0x2d, 0xb9, |
| 284 | 0x66, 0xc3, 0xe9, 0xfa, 0x91, 0x74, 0x60, 0x39 }, |
| 285 | }, { |
| 286 | .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd" |
| 287 | "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", |
| 288 | .psize = 104, |
| 289 | .digest = { 0x3d, 0x20, 0x89, 0x73, 0xab, 0x35, 0x08, 0xdb, |
| 290 | 0xbd, 0x7e, 0x2c, 0x28, 0x62, 0xba, 0x29, 0x0a, |
| 291 | 0xd3, 0x01, 0x0e, 0x49, 0x78, 0xc1, 0x98, 0xdc, |
| 292 | 0x4d, 0x8f, 0xd0, 0x14, 0xe5, 0x82, 0x82, 0x3a, |
| 293 | 0x89, 0xe1, 0x6f, 0x9b, 0x2a, 0x7b, 0xbc, 0x1a, |
| 294 | 0xc9, 0x38, 0xe2, 0xd1, 0x99, 0xe8, 0xbe, 0xa4 }, |
| 295 | .np = 4, |
| 296 | .tap = { 26, 26, 26, 26 } |
| 297 | }, |
| 298 | }; |
| 299 | |
| 300 | /* |
| 301 | * SHA512 test vectors from from NIST and kerneli |
| 302 | */ |
| 303 | #define SHA512_TEST_VECTORS 4 |
| 304 | |
| 305 | static struct hash_testvec sha512_tv_template[] = { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 306 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 307 | .plaintext = "abc", |
| 308 | .psize = 3, |
| 309 | .digest = { 0xdd, 0xaf, 0x35, 0xa1, 0x93, 0x61, 0x7a, 0xba, |
| 310 | 0xcc, 0x41, 0x73, 0x49, 0xae, 0x20, 0x41, 0x31, |
| 311 | 0x12, 0xe6, 0xfa, 0x4e, 0x89, 0xa9, 0x7e, 0xa2, |
| 312 | 0x0a, 0x9e, 0xee, 0xe6, 0x4b, 0x55, 0xd3, 0x9a, |
| 313 | 0x21, 0x92, 0x99, 0x2a, 0x27, 0x4f, 0xc1, 0xa8, |
| 314 | 0x36, 0xba, 0x3c, 0x23, 0xa3, 0xfe, 0xeb, 0xbd, |
| 315 | 0x45, 0x4d, 0x44, 0x23, 0x64, 0x3c, 0xe8, 0x0e, |
| 316 | 0x2a, 0x9a, 0xc9, 0x4f, 0xa5, 0x4c, 0xa4, 0x9f }, |
| 317 | }, { |
| 318 | .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| 319 | .psize = 56, |
| 320 | .digest = { 0x20, 0x4a, 0x8f, 0xc6, 0xdd, 0xa8, 0x2f, 0x0a, |
| 321 | 0x0c, 0xed, 0x7b, 0xeb, 0x8e, 0x08, 0xa4, 0x16, |
| 322 | 0x57, 0xc1, 0x6e, 0xf4, 0x68, 0xb2, 0x28, 0xa8, |
| 323 | 0x27, 0x9b, 0xe3, 0x31, 0xa7, 0x03, 0xc3, 0x35, |
| 324 | 0x96, 0xfd, 0x15, 0xc1, 0x3b, 0x1b, 0x07, 0xf9, |
| 325 | 0xaa, 0x1d, 0x3b, 0xea, 0x57, 0x78, 0x9c, 0xa0, |
| 326 | 0x31, 0xad, 0x85, 0xc7, 0xa7, 0x1d, 0xd7, 0x03, |
| 327 | 0x54, 0xec, 0x63, 0x12, 0x38, 0xca, 0x34, 0x45 }, |
| 328 | }, { |
| 329 | .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn" |
| 330 | "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", |
| 331 | .psize = 112, |
| 332 | .digest = { 0x8e, 0x95, 0x9b, 0x75, 0xda, 0xe3, 0x13, 0xda, |
| 333 | 0x8c, 0xf4, 0xf7, 0x28, 0x14, 0xfc, 0x14, 0x3f, |
| 334 | 0x8f, 0x77, 0x79, 0xc6, 0xeb, 0x9f, 0x7f, 0xa1, |
| 335 | 0x72, 0x99, 0xae, 0xad, 0xb6, 0x88, 0x90, 0x18, |
| 336 | 0x50, 0x1d, 0x28, 0x9e, 0x49, 0x00, 0xf7, 0xe4, |
| 337 | 0x33, 0x1b, 0x99, 0xde, 0xc4, 0xb5, 0x43, 0x3a, |
| 338 | 0xc7, 0xd3, 0x29, 0xee, 0xb6, 0xdd, 0x26, 0x54, |
| 339 | 0x5e, 0x96, 0xe5, 0x5b, 0x87, 0x4b, 0xe9, 0x09 }, |
| 340 | }, { |
| 341 | .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd" |
| 342 | "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", |
| 343 | .psize = 104, |
| 344 | .digest = { 0x93, 0x0d, 0x0c, 0xef, 0xcb, 0x30, 0xff, 0x11, |
| 345 | 0x33, 0xb6, 0x89, 0x81, 0x21, 0xf1, 0xcf, 0x3d, |
| 346 | 0x27, 0x57, 0x8a, 0xfc, 0xaf, 0xe8, 0x67, 0x7c, |
| 347 | 0x52, 0x57, 0xcf, 0x06, 0x99, 0x11, 0xf7, 0x5d, |
| 348 | 0x8f, 0x58, 0x31, 0xb5, 0x6e, 0xbf, 0xda, 0x67, |
| 349 | 0xb2, 0x78, 0xe6, 0x6d, 0xff, 0x8b, 0x84, 0xfe, |
| 350 | 0x2b, 0x28, 0x70, 0xf7, 0x42, 0xa5, 0x80, 0xd8, |
| 351 | 0xed, 0xb4, 0x19, 0x87, 0x23, 0x28, 0x50, 0xc9 }, |
| 352 | .np = 4, |
| 353 | .tap = { 26, 26, 26, 26 } |
| 354 | }, |
| 355 | }; |
| 356 | |
| 357 | |
| 358 | /* |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 359 | * WHIRLPOOL test vectors from Whirlpool package |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 360 | * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE |
| 361 | * submission |
| 362 | */ |
| 363 | #define WP512_TEST_VECTORS 8 |
| 364 | |
| 365 | static struct hash_testvec wp512_tv_template[] = { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 366 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 367 | .plaintext = "", |
| 368 | .psize = 0, |
| 369 | .digest = { 0x19, 0xFA, 0x61, 0xD7, 0x55, 0x22, 0xA4, 0x66, |
| 370 | 0x9B, 0x44, 0xE3, 0x9C, 0x1D, 0x2E, 0x17, 0x26, |
| 371 | 0xC5, 0x30, 0x23, 0x21, 0x30, 0xD4, 0x07, 0xF8, |
| 372 | 0x9A, 0xFE, 0xE0, 0x96, 0x49, 0x97, 0xF7, 0xA7, |
| 373 | 0x3E, 0x83, 0xBE, 0x69, 0x8B, 0x28, 0x8F, 0xEB, |
| 374 | 0xCF, 0x88, 0xE3, 0xE0, 0x3C, 0x4F, 0x07, 0x57, |
| 375 | 0xEA, 0x89, 0x64, 0xE5, 0x9B, 0x63, 0xD9, 0x37, |
| 376 | 0x08, 0xB1, 0x38, 0xCC, 0x42, 0xA6, 0x6E, 0xB3 }, |
| 377 | |
| 378 | |
| 379 | }, { |
| 380 | .plaintext = "a", |
| 381 | .psize = 1, |
| 382 | .digest = { 0x8A, 0xCA, 0x26, 0x02, 0x79, 0x2A, 0xEC, 0x6F, |
| 383 | 0x11, 0xA6, 0x72, 0x06, 0x53, 0x1F, 0xB7, 0xD7, |
| 384 | 0xF0, 0xDF, 0xF5, 0x94, 0x13, 0x14, 0x5E, 0x69, |
| 385 | 0x73, 0xC4, 0x50, 0x01, 0xD0, 0x08, 0x7B, 0x42, |
| 386 | 0xD1, 0x1B, 0xC6, 0x45, 0x41, 0x3A, 0xEF, 0xF6, |
| 387 | 0x3A, 0x42, 0x39, 0x1A, 0x39, 0x14, 0x5A, 0x59, |
| 388 | 0x1A, 0x92, 0x20, 0x0D, 0x56, 0x01, 0x95, 0xE5, |
| 389 | 0x3B, 0x47, 0x85, 0x84, 0xFD, 0xAE, 0x23, 0x1A }, |
| 390 | }, { |
| 391 | .plaintext = "abc", |
| 392 | .psize = 3, |
| 393 | .digest = { 0x4E, 0x24, 0x48, 0xA4, 0xC6, 0xF4, 0x86, 0xBB, |
| 394 | 0x16, 0xB6, 0x56, 0x2C, 0x73, 0xB4, 0x02, 0x0B, |
| 395 | 0xF3, 0x04, 0x3E, 0x3A, 0x73, 0x1B, 0xCE, 0x72, |
| 396 | 0x1A, 0xE1, 0xB3, 0x03, 0xD9, 0x7E, 0x6D, 0x4C, |
| 397 | 0x71, 0x81, 0xEE, 0xBD, 0xB6, 0xC5, 0x7E, 0x27, |
| 398 | 0x7D, 0x0E, 0x34, 0x95, 0x71, 0x14, 0xCB, 0xD6, |
| 399 | 0xC7, 0x97, 0xFC, 0x9D, 0x95, 0xD8, 0xB5, 0x82, |
| 400 | 0xD2, 0x25, 0x29, 0x20, 0x76, 0xD4, 0xEE, 0xF5 }, |
| 401 | }, { |
| 402 | .plaintext = "message digest", |
| 403 | .psize = 14, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 404 | .digest = { 0x37, 0x8C, 0x84, 0xA4, 0x12, 0x6E, 0x2D, 0xC6, |
| 405 | 0xE5, 0x6D, 0xCC, 0x74, 0x58, 0x37, 0x7A, 0xAC, |
| 406 | 0x83, 0x8D, 0x00, 0x03, 0x22, 0x30, 0xF5, 0x3C, |
| 407 | 0xE1, 0xF5, 0x70, 0x0C, 0x0F, 0xFB, 0x4D, 0x3B, |
| 408 | 0x84, 0x21, 0x55, 0x76, 0x59, 0xEF, 0x55, 0xC1, |
| 409 | 0x06, 0xB4, 0xB5, 0x2A, 0xC5, 0xA4, 0xAA, 0xA6, |
| 410 | 0x92, 0xED, 0x92, 0x00, 0x52, 0x83, 0x8F, 0x33, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 411 | 0x62, 0xE8, 0x6D, 0xBD, 0x37, 0xA8, 0x90, 0x3E }, |
| 412 | }, { |
| 413 | .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| 414 | .psize = 26, |
| 415 | .digest = { 0xF1, 0xD7, 0x54, 0x66, 0x26, 0x36, 0xFF, 0xE9, |
| 416 | 0x2C, 0x82, 0xEB, 0xB9, 0x21, 0x2A, 0x48, 0x4A, |
| 417 | 0x8D, 0x38, 0x63, 0x1E, 0xAD, 0x42, 0x38, 0xF5, |
| 418 | 0x44, 0x2E, 0xE1, 0x3B, 0x80, 0x54, 0xE4, 0x1B, |
| 419 | 0x08, 0xBF, 0x2A, 0x92, 0x51, 0xC3, 0x0B, 0x6A, |
| 420 | 0x0B, 0x8A, 0xAE, 0x86, 0x17, 0x7A, 0xB4, 0xA6, |
| 421 | 0xF6, 0x8F, 0x67, 0x3E, 0x72, 0x07, 0x86, 0x5D, |
| 422 | 0x5D, 0x98, 0x19, 0xA3, 0xDB, 0xA4, 0xEB, 0x3B }, |
| 423 | }, { |
| 424 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 425 | "abcdefghijklmnopqrstuvwxyz0123456789", |
| 426 | .psize = 62, |
| 427 | .digest = { 0xDC, 0x37, 0xE0, 0x08, 0xCF, 0x9E, 0xE6, 0x9B, |
| 428 | 0xF1, 0x1F, 0x00, 0xED, 0x9A, 0xBA, 0x26, 0x90, |
| 429 | 0x1D, 0xD7, 0xC2, 0x8C, 0xDE, 0xC0, 0x66, 0xCC, |
| 430 | 0x6A, 0xF4, 0x2E, 0x40, 0xF8, 0x2F, 0x3A, 0x1E, |
| 431 | 0x08, 0xEB, 0xA2, 0x66, 0x29, 0x12, 0x9D, 0x8F, |
| 432 | 0xB7, 0xCB, 0x57, 0x21, 0x1B, 0x92, 0x81, 0xA6, |
| 433 | 0x55, 0x17, 0xCC, 0x87, 0x9D, 0x7B, 0x96, 0x21, |
| 434 | 0x42, 0xC6, 0x5F, 0x5A, 0x7A, 0xF0, 0x14, 0x67 }, |
| 435 | }, { |
| 436 | .plaintext = "1234567890123456789012345678901234567890" |
| 437 | "1234567890123456789012345678901234567890", |
| 438 | .psize = 80, |
| 439 | .digest = { 0x46, 0x6E, 0xF1, 0x8B, 0xAB, 0xB0, 0x15, 0x4D, |
| 440 | 0x25, 0xB9, 0xD3, 0x8A, 0x64, 0x14, 0xF5, 0xC0, |
| 441 | 0x87, 0x84, 0x37, 0x2B, 0xCC, 0xB2, 0x04, 0xD6, |
| 442 | 0x54, 0x9C, 0x4A, 0xFA, 0xDB, 0x60, 0x14, 0x29, |
| 443 | 0x4D, 0x5B, 0xD8, 0xDF, 0x2A, 0x6C, 0x44, 0xE5, |
| 444 | 0x38, 0xCD, 0x04, 0x7B, 0x26, 0x81, 0xA5, 0x1A, |
| 445 | 0x2C, 0x60, 0x48, 0x1E, 0x88, 0xC5, 0xA2, 0x0B, |
| 446 | 0x2C, 0x2A, 0x80, 0xCF, 0x3A, 0x9A, 0x08, 0x3B }, |
| 447 | }, { |
| 448 | .plaintext = "abcdbcdecdefdefgefghfghighijhijk", |
| 449 | .psize = 32, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 450 | .digest = { 0x2A, 0x98, 0x7E, 0xA4, 0x0F, 0x91, 0x70, 0x61, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 451 | 0xF5, 0xD6, 0xF0, 0xA0, 0xE4, 0x64, 0x4F, 0x48, |
| 452 | 0x8A, 0x7A, 0x5A, 0x52, 0xDE, 0xEE, 0x65, 0x62, |
| 453 | 0x07, 0xC5, 0x62, 0xF9, 0x88, 0xE9, 0x5C, 0x69, |
| 454 | 0x16, 0xBD, 0xC8, 0x03, 0x1B, 0xC5, 0xBE, 0x1B, |
| 455 | 0x7B, 0x94, 0x76, 0x39, 0xFE, 0x05, 0x0B, 0x56, |
| 456 | 0x93, 0x9B, 0xAA, 0xA0, 0xAD, 0xFF, 0x9A, 0xE6, |
| 457 | 0x74, 0x5B, 0x7B, 0x18, 0x1C, 0x3B, 0xE3, 0xFD }, |
| 458 | }, |
| 459 | }; |
| 460 | |
| 461 | #define WP384_TEST_VECTORS 8 |
| 462 | |
| 463 | static struct hash_testvec wp384_tv_template[] = { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 464 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 465 | .plaintext = "", |
| 466 | .psize = 0, |
| 467 | .digest = { 0x19, 0xFA, 0x61, 0xD7, 0x55, 0x22, 0xA4, 0x66, |
| 468 | 0x9B, 0x44, 0xE3, 0x9C, 0x1D, 0x2E, 0x17, 0x26, |
| 469 | 0xC5, 0x30, 0x23, 0x21, 0x30, 0xD4, 0x07, 0xF8, |
| 470 | 0x9A, 0xFE, 0xE0, 0x96, 0x49, 0x97, 0xF7, 0xA7, |
| 471 | 0x3E, 0x83, 0xBE, 0x69, 0x8B, 0x28, 0x8F, 0xEB, |
| 472 | 0xCF, 0x88, 0xE3, 0xE0, 0x3C, 0x4F, 0x07, 0x57 }, |
| 473 | |
| 474 | |
| 475 | }, { |
| 476 | .plaintext = "a", |
| 477 | .psize = 1, |
| 478 | .digest = { 0x8A, 0xCA, 0x26, 0x02, 0x79, 0x2A, 0xEC, 0x6F, |
| 479 | 0x11, 0xA6, 0x72, 0x06, 0x53, 0x1F, 0xB7, 0xD7, |
| 480 | 0xF0, 0xDF, 0xF5, 0x94, 0x13, 0x14, 0x5E, 0x69, |
| 481 | 0x73, 0xC4, 0x50, 0x01, 0xD0, 0x08, 0x7B, 0x42, |
| 482 | 0xD1, 0x1B, 0xC6, 0x45, 0x41, 0x3A, 0xEF, 0xF6, |
| 483 | 0x3A, 0x42, 0x39, 0x1A, 0x39, 0x14, 0x5A, 0x59 }, |
| 484 | }, { |
| 485 | .plaintext = "abc", |
| 486 | .psize = 3, |
| 487 | .digest = { 0x4E, 0x24, 0x48, 0xA4, 0xC6, 0xF4, 0x86, 0xBB, |
| 488 | 0x16, 0xB6, 0x56, 0x2C, 0x73, 0xB4, 0x02, 0x0B, |
| 489 | 0xF3, 0x04, 0x3E, 0x3A, 0x73, 0x1B, 0xCE, 0x72, |
| 490 | 0x1A, 0xE1, 0xB3, 0x03, 0xD9, 0x7E, 0x6D, 0x4C, |
| 491 | 0x71, 0x81, 0xEE, 0xBD, 0xB6, 0xC5, 0x7E, 0x27, |
| 492 | 0x7D, 0x0E, 0x34, 0x95, 0x71, 0x14, 0xCB, 0xD6 }, |
| 493 | }, { |
| 494 | .plaintext = "message digest", |
| 495 | .psize = 14, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 496 | .digest = { 0x37, 0x8C, 0x84, 0xA4, 0x12, 0x6E, 0x2D, 0xC6, |
| 497 | 0xE5, 0x6D, 0xCC, 0x74, 0x58, 0x37, 0x7A, 0xAC, |
| 498 | 0x83, 0x8D, 0x00, 0x03, 0x22, 0x30, 0xF5, 0x3C, |
| 499 | 0xE1, 0xF5, 0x70, 0x0C, 0x0F, 0xFB, 0x4D, 0x3B, |
| 500 | 0x84, 0x21, 0x55, 0x76, 0x59, 0xEF, 0x55, 0xC1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 501 | 0x06, 0xB4, 0xB5, 0x2A, 0xC5, 0xA4, 0xAA, 0xA6 }, |
| 502 | }, { |
| 503 | .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| 504 | .psize = 26, |
| 505 | .digest = { 0xF1, 0xD7, 0x54, 0x66, 0x26, 0x36, 0xFF, 0xE9, |
| 506 | 0x2C, 0x82, 0xEB, 0xB9, 0x21, 0x2A, 0x48, 0x4A, |
| 507 | 0x8D, 0x38, 0x63, 0x1E, 0xAD, 0x42, 0x38, 0xF5, |
| 508 | 0x44, 0x2E, 0xE1, 0x3B, 0x80, 0x54, 0xE4, 0x1B, |
| 509 | 0x08, 0xBF, 0x2A, 0x92, 0x51, 0xC3, 0x0B, 0x6A, |
| 510 | 0x0B, 0x8A, 0xAE, 0x86, 0x17, 0x7A, 0xB4, 0xA6 }, |
| 511 | }, { |
| 512 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 513 | "abcdefghijklmnopqrstuvwxyz0123456789", |
| 514 | .psize = 62, |
| 515 | .digest = { 0xDC, 0x37, 0xE0, 0x08, 0xCF, 0x9E, 0xE6, 0x9B, |
| 516 | 0xF1, 0x1F, 0x00, 0xED, 0x9A, 0xBA, 0x26, 0x90, |
| 517 | 0x1D, 0xD7, 0xC2, 0x8C, 0xDE, 0xC0, 0x66, 0xCC, |
| 518 | 0x6A, 0xF4, 0x2E, 0x40, 0xF8, 0x2F, 0x3A, 0x1E, |
| 519 | 0x08, 0xEB, 0xA2, 0x66, 0x29, 0x12, 0x9D, 0x8F, |
| 520 | 0xB7, 0xCB, 0x57, 0x21, 0x1B, 0x92, 0x81, 0xA6 }, |
| 521 | }, { |
| 522 | .plaintext = "1234567890123456789012345678901234567890" |
| 523 | "1234567890123456789012345678901234567890", |
| 524 | .psize = 80, |
| 525 | .digest = { 0x46, 0x6E, 0xF1, 0x8B, 0xAB, 0xB0, 0x15, 0x4D, |
| 526 | 0x25, 0xB9, 0xD3, 0x8A, 0x64, 0x14, 0xF5, 0xC0, |
| 527 | 0x87, 0x84, 0x37, 0x2B, 0xCC, 0xB2, 0x04, 0xD6, |
| 528 | 0x54, 0x9C, 0x4A, 0xFA, 0xDB, 0x60, 0x14, 0x29, |
| 529 | 0x4D, 0x5B, 0xD8, 0xDF, 0x2A, 0x6C, 0x44, 0xE5, |
| 530 | 0x38, 0xCD, 0x04, 0x7B, 0x26, 0x81, 0xA5, 0x1A }, |
| 531 | }, { |
| 532 | .plaintext = "abcdbcdecdefdefgefghfghighijhijk", |
| 533 | .psize = 32, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 534 | .digest = { 0x2A, 0x98, 0x7E, 0xA4, 0x0F, 0x91, 0x70, 0x61, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 535 | 0xF5, 0xD6, 0xF0, 0xA0, 0xE4, 0x64, 0x4F, 0x48, |
| 536 | 0x8A, 0x7A, 0x5A, 0x52, 0xDE, 0xEE, 0x65, 0x62, |
| 537 | 0x07, 0xC5, 0x62, 0xF9, 0x88, 0xE9, 0x5C, 0x69, |
| 538 | 0x16, 0xBD, 0xC8, 0x03, 0x1B, 0xC5, 0xBE, 0x1B, |
| 539 | 0x7B, 0x94, 0x76, 0x39, 0xFE, 0x05, 0x0B, 0x56 }, |
| 540 | }, |
| 541 | }; |
| 542 | |
| 543 | #define WP256_TEST_VECTORS 8 |
| 544 | |
| 545 | static struct hash_testvec wp256_tv_template[] = { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 546 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 547 | .plaintext = "", |
| 548 | .psize = 0, |
| 549 | .digest = { 0x19, 0xFA, 0x61, 0xD7, 0x55, 0x22, 0xA4, 0x66, |
| 550 | 0x9B, 0x44, 0xE3, 0x9C, 0x1D, 0x2E, 0x17, 0x26, |
| 551 | 0xC5, 0x30, 0x23, 0x21, 0x30, 0xD4, 0x07, 0xF8, |
| 552 | 0x9A, 0xFE, 0xE0, 0x96, 0x49, 0x97, 0xF7, 0xA7 }, |
| 553 | |
| 554 | |
| 555 | }, { |
| 556 | .plaintext = "a", |
| 557 | .psize = 1, |
| 558 | .digest = { 0x8A, 0xCA, 0x26, 0x02, 0x79, 0x2A, 0xEC, 0x6F, |
| 559 | 0x11, 0xA6, 0x72, 0x06, 0x53, 0x1F, 0xB7, 0xD7, |
| 560 | 0xF0, 0xDF, 0xF5, 0x94, 0x13, 0x14, 0x5E, 0x69, |
| 561 | 0x73, 0xC4, 0x50, 0x01, 0xD0, 0x08, 0x7B, 0x42 }, |
| 562 | }, { |
| 563 | .plaintext = "abc", |
| 564 | .psize = 3, |
| 565 | .digest = { 0x4E, 0x24, 0x48, 0xA4, 0xC6, 0xF4, 0x86, 0xBB, |
| 566 | 0x16, 0xB6, 0x56, 0x2C, 0x73, 0xB4, 0x02, 0x0B, |
| 567 | 0xF3, 0x04, 0x3E, 0x3A, 0x73, 0x1B, 0xCE, 0x72, |
| 568 | 0x1A, 0xE1, 0xB3, 0x03, 0xD9, 0x7E, 0x6D, 0x4C }, |
| 569 | }, { |
| 570 | .plaintext = "message digest", |
| 571 | .psize = 14, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 572 | .digest = { 0x37, 0x8C, 0x84, 0xA4, 0x12, 0x6E, 0x2D, 0xC6, |
| 573 | 0xE5, 0x6D, 0xCC, 0x74, 0x58, 0x37, 0x7A, 0xAC, |
| 574 | 0x83, 0x8D, 0x00, 0x03, 0x22, 0x30, 0xF5, 0x3C, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 575 | 0xE1, 0xF5, 0x70, 0x0C, 0x0F, 0xFB, 0x4D, 0x3B }, |
| 576 | }, { |
| 577 | .plaintext = "abcdefghijklmnopqrstuvwxyz", |
| 578 | .psize = 26, |
| 579 | .digest = { 0xF1, 0xD7, 0x54, 0x66, 0x26, 0x36, 0xFF, 0xE9, |
| 580 | 0x2C, 0x82, 0xEB, 0xB9, 0x21, 0x2A, 0x48, 0x4A, |
| 581 | 0x8D, 0x38, 0x63, 0x1E, 0xAD, 0x42, 0x38, 0xF5, |
| 582 | 0x44, 0x2E, 0xE1, 0x3B, 0x80, 0x54, 0xE4, 0x1B }, |
| 583 | }, { |
| 584 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 585 | "abcdefghijklmnopqrstuvwxyz0123456789", |
| 586 | .psize = 62, |
| 587 | .digest = { 0xDC, 0x37, 0xE0, 0x08, 0xCF, 0x9E, 0xE6, 0x9B, |
| 588 | 0xF1, 0x1F, 0x00, 0xED, 0x9A, 0xBA, 0x26, 0x90, |
| 589 | 0x1D, 0xD7, 0xC2, 0x8C, 0xDE, 0xC0, 0x66, 0xCC, |
| 590 | 0x6A, 0xF4, 0x2E, 0x40, 0xF8, 0x2F, 0x3A, 0x1E }, |
| 591 | }, { |
| 592 | .plaintext = "1234567890123456789012345678901234567890" |
| 593 | "1234567890123456789012345678901234567890", |
| 594 | .psize = 80, |
| 595 | .digest = { 0x46, 0x6E, 0xF1, 0x8B, 0xAB, 0xB0, 0x15, 0x4D, |
| 596 | 0x25, 0xB9, 0xD3, 0x8A, 0x64, 0x14, 0xF5, 0xC0, |
| 597 | 0x87, 0x84, 0x37, 0x2B, 0xCC, 0xB2, 0x04, 0xD6, |
| 598 | 0x54, 0x9C, 0x4A, 0xFA, 0xDB, 0x60, 0x14, 0x29 }, |
| 599 | }, { |
| 600 | .plaintext = "abcdbcdecdefdefgefghfghighijhijk", |
| 601 | .psize = 32, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 602 | .digest = { 0x2A, 0x98, 0x7E, 0xA4, 0x0F, 0x91, 0x70, 0x61, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 603 | 0xF5, 0xD6, 0xF0, 0xA0, 0xE4, 0x64, 0x4F, 0x48, |
| 604 | 0x8A, 0x7A, 0x5A, 0x52, 0xDE, 0xEE, 0x65, 0x62, |
| 605 | 0x07, 0xC5, 0x62, 0xF9, 0x88, 0xE9, 0x5C, 0x69 }, |
| 606 | }, |
| 607 | }; |
| 608 | |
| 609 | /* |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 610 | * TIGER test vectors from Tiger website |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 611 | */ |
| 612 | #define TGR192_TEST_VECTORS 6 |
| 613 | |
| 614 | static struct hash_testvec tgr192_tv_template[] = { |
| 615 | { |
| 616 | .plaintext = "", |
| 617 | .psize = 0, |
| 618 | .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32, |
| 619 | 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f, |
| 620 | 0xf3, 0x73, 0xde, 0x2d, 0x49, 0x58, 0x4e, 0x7a }, |
| 621 | }, { |
| 622 | .plaintext = "abc", |
| 623 | .psize = 3, |
| 624 | .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a, |
| 625 | 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf, |
| 626 | 0x93, 0x5f, 0x7b, 0x95, 0x1c, 0x13, 0x29, 0x51 }, |
| 627 | }, { |
| 628 | .plaintext = "Tiger", |
| 629 | .psize = 5, |
| 630 | .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd, |
| 631 | 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec, |
| 632 | 0x37, 0x79, 0x0c, 0x11, 0x6f, 0x9d, 0x2b, 0xdf }, |
| 633 | }, { |
| 634 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", |
| 635 | .psize = 64, |
| 636 | .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7, |
| 637 | 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e, |
| 638 | 0xb5, 0x86, 0x44, 0x50, 0x34, 0xa5, 0xa3, 0x86 }, |
| 639 | }, { |
| 640 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789", |
| 641 | .psize = 64, |
| 642 | .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48, |
| 643 | 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9, |
| 644 | 0x57, 0x89, 0x65, 0x65, 0x97, 0x5f, 0x91, 0x97 }, |
| 645 | }, { |
| 646 | .plaintext = "Tiger - A Fast New Hash Function, " |
| 647 | "by Ross Anderson and Eli Biham, " |
| 648 | "proceedings of Fast Software Encryption 3, " |
| 649 | "Cambridge, 1996.", |
| 650 | .psize = 125, |
| 651 | .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63, |
| 652 | 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24, |
| 653 | 0xdd, 0x68, 0x15, 0x1d, 0x50, 0x39, 0x74, 0xfc }, |
| 654 | }, |
| 655 | }; |
| 656 | |
| 657 | #define TGR160_TEST_VECTORS 6 |
| 658 | |
| 659 | static struct hash_testvec tgr160_tv_template[] = { |
| 660 | { |
| 661 | .plaintext = "", |
| 662 | .psize = 0, |
| 663 | .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32, |
| 664 | 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f, |
| 665 | 0xf3, 0x73, 0xde, 0x2d }, |
| 666 | }, { |
| 667 | .plaintext = "abc", |
| 668 | .psize = 3, |
| 669 | .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a, |
| 670 | 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf, |
| 671 | 0x93, 0x5f, 0x7b, 0x95 }, |
| 672 | }, { |
| 673 | .plaintext = "Tiger", |
| 674 | .psize = 5, |
| 675 | .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd, |
| 676 | 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec, |
| 677 | 0x37, 0x79, 0x0c, 0x11 }, |
| 678 | }, { |
| 679 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", |
| 680 | .psize = 64, |
| 681 | .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7, |
| 682 | 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e, |
| 683 | 0xb5, 0x86, 0x44, 0x50 }, |
| 684 | }, { |
| 685 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789", |
| 686 | .psize = 64, |
| 687 | .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48, |
| 688 | 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9, |
| 689 | 0x57, 0x89, 0x65, 0x65 }, |
| 690 | }, { |
| 691 | .plaintext = "Tiger - A Fast New Hash Function, " |
| 692 | "by Ross Anderson and Eli Biham, " |
| 693 | "proceedings of Fast Software Encryption 3, " |
| 694 | "Cambridge, 1996.", |
| 695 | .psize = 125, |
| 696 | .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63, |
| 697 | 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24, |
| 698 | 0xdd, 0x68, 0x15, 0x1d }, |
| 699 | }, |
| 700 | }; |
| 701 | |
| 702 | #define TGR128_TEST_VECTORS 6 |
| 703 | |
| 704 | static struct hash_testvec tgr128_tv_template[] = { |
| 705 | { |
| 706 | .plaintext = "", |
| 707 | .psize = 0, |
| 708 | .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32, |
| 709 | 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f }, |
| 710 | }, { |
| 711 | .plaintext = "abc", |
| 712 | .psize = 3, |
| 713 | .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a, |
| 714 | 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf }, |
| 715 | }, { |
| 716 | .plaintext = "Tiger", |
| 717 | .psize = 5, |
| 718 | .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd, |
| 719 | 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec }, |
| 720 | }, { |
| 721 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", |
| 722 | .psize = 64, |
| 723 | .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7, |
| 724 | 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e }, |
| 725 | }, { |
| 726 | .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789", |
| 727 | .psize = 64, |
| 728 | .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48, |
| 729 | 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9 }, |
| 730 | }, { |
| 731 | .plaintext = "Tiger - A Fast New Hash Function, " |
| 732 | "by Ross Anderson and Eli Biham, " |
| 733 | "proceedings of Fast Software Encryption 3, " |
| 734 | "Cambridge, 1996.", |
| 735 | .psize = 125, |
| 736 | .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63, |
| 737 | 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24 }, |
| 738 | }, |
| 739 | }; |
| 740 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 741 | /* |
| 742 | * HMAC-MD5 test vectors from RFC2202 |
| 743 | * (These need to be fixed to not use strlen). |
| 744 | */ |
| 745 | #define HMAC_MD5_TEST_VECTORS 7 |
| 746 | |
Herbert Xu | e9d4116 | 2006-08-19 21:38:49 +1000 | [diff] [blame] | 747 | static struct hash_testvec hmac_md5_tv_template[] = |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 748 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 749 | { |
| 750 | .key = { [0 ... 15] = 0x0b }, |
| 751 | .ksize = 16, |
| 752 | .plaintext = "Hi There", |
| 753 | .psize = 8, |
| 754 | .digest = { 0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c, |
| 755 | 0x13, 0xf4, 0x8e, 0xf8, 0x15, 0x8b, 0xfc, 0x9d }, |
| 756 | }, { |
| 757 | .key = { 'J', 'e', 'f', 'e' }, |
| 758 | .ksize = 4, |
| 759 | .plaintext = "what do ya want for nothing?", |
| 760 | .psize = 28, |
| 761 | .digest = { 0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03, |
| 762 | 0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38 }, |
| 763 | .np = 2, |
| 764 | .tap = {14, 14} |
| 765 | }, { |
| 766 | .key = { [0 ... 15] = 0xaa }, |
| 767 | .ksize = 16, |
| 768 | .plaintext = { [0 ... 49] = 0xdd }, |
| 769 | .psize = 50, |
| 770 | .digest = { 0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88, |
| 771 | 0xdb, 0xb8, 0xc7, 0x33, 0xf0, 0xe8, 0xb3, 0xf6 }, |
| 772 | }, { |
| 773 | .key = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
| 774 | 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, |
| 775 | 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, }, |
| 776 | .ksize = 25, |
| 777 | .plaintext = { [0 ... 49] = 0xcd }, |
| 778 | .psize = 50, |
| 779 | .digest = { 0x69, 0x7e, 0xaf, 0x0a, 0xca, 0x3a, 0x3a, 0xea, |
| 780 | 0x3a, 0x75, 0x16, 0x47, 0x46, 0xff, 0xaa, 0x79 }, |
| 781 | }, { |
| 782 | .key = { [0 ... 15] = 0x0c }, |
| 783 | .ksize = 16, |
| 784 | .plaintext = "Test With Truncation", |
| 785 | .psize = 20, |
| 786 | .digest = { 0x56, 0x46, 0x1e, 0xf2, 0x34, 0x2e, 0xdc, 0x00, |
| 787 | 0xf9, 0xba, 0xb9, 0x95, 0x69, 0x0e, 0xfd, 0x4c }, |
| 788 | }, { |
| 789 | .key = { [0 ... 79] = 0xaa }, |
| 790 | .ksize = 80, |
| 791 | .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First", |
| 792 | .psize = 54, |
| 793 | .digest = { 0x6b, 0x1a, 0xb7, 0xfe, 0x4b, 0xd7, 0xbf, 0x8f, |
| 794 | 0x0b, 0x62, 0xe6, 0xce, 0x61, 0xb9, 0xd0, 0xcd }, |
| 795 | }, { |
| 796 | .key = { [0 ... 79] = 0xaa }, |
| 797 | .ksize = 80, |
| 798 | .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One " |
| 799 | "Block-Size Data", |
| 800 | .psize = 73, |
| 801 | .digest = { 0x6f, 0x63, 0x0f, 0xad, 0x67, 0xcd, 0xa0, 0xee, |
| 802 | 0x1f, 0xb1, 0xf5, 0x62, 0xdb, 0x3a, 0xa5, 0x3e }, |
| 803 | }, |
| 804 | }; |
| 805 | |
| 806 | /* |
| 807 | * HMAC-SHA1 test vectors from RFC2202 |
| 808 | */ |
| 809 | #define HMAC_SHA1_TEST_VECTORS 7 |
| 810 | |
Herbert Xu | e9d4116 | 2006-08-19 21:38:49 +1000 | [diff] [blame] | 811 | static struct hash_testvec hmac_sha1_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 812 | { |
| 813 | .key = { [0 ... 19] = 0x0b }, |
| 814 | .ksize = 20, |
| 815 | .plaintext = "Hi There", |
| 816 | .psize = 8, |
| 817 | .digest = { 0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64, |
| 818 | 0xe2, 0x8b, 0xc0, 0xb6, 0xfb, 0x37, 0x8c, 0x8e, 0xf1, |
| 819 | 0x46, 0xbe }, |
| 820 | }, { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 821 | .key = { 'J', 'e', 'f', 'e' }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 822 | .ksize = 4, |
| 823 | .plaintext = "what do ya want for nothing?", |
| 824 | .psize = 28, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 825 | .digest = { 0xef, 0xfc, 0xdf, 0x6a, 0xe5, 0xeb, 0x2f, 0xa2, 0xd2, 0x74, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 826 | 0x16, 0xd5, 0xf1, 0x84, 0xdf, 0x9c, 0x25, 0x9a, 0x7c, 0x79 }, |
| 827 | .np = 2, |
| 828 | .tap = { 14, 14 } |
| 829 | }, { |
| 830 | .key = { [0 ... 19] = 0xaa }, |
| 831 | .ksize = 20, |
| 832 | .plaintext = { [0 ... 49] = 0xdd }, |
| 833 | .psize = 50, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 834 | .digest = { 0x12, 0x5d, 0x73, 0x42, 0xb9, 0xac, 0x11, 0xcd, 0x91, 0xa3, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 835 | 0x9a, 0xf4, 0x8a, 0xa1, 0x7b, 0x4f, 0x63, 0xf1, 0x75, 0xd3 }, |
| 836 | }, { |
| 837 | .key = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 838 | 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 839 | 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19 }, |
| 840 | .ksize = 25, |
| 841 | .plaintext = { [0 ... 49] = 0xcd }, |
| 842 | .psize = 50, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 843 | .digest = { 0x4c, 0x90, 0x07, 0xf4, 0x02, 0x62, 0x50, 0xc6, 0xbc, 0x84, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 844 | 0x14, 0xf9, 0xbf, 0x50, 0xc8, 0x6c, 0x2d, 0x72, 0x35, 0xda }, |
| 845 | }, { |
| 846 | .key = { [0 ... 19] = 0x0c }, |
| 847 | .ksize = 20, |
| 848 | .plaintext = "Test With Truncation", |
| 849 | .psize = 20, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 850 | .digest = { 0x4c, 0x1a, 0x03, 0x42, 0x4b, 0x55, 0xe0, 0x7f, 0xe7, 0xf2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 851 | 0x7b, 0xe1, 0xd5, 0x8b, 0xb9, 0x32, 0x4a, 0x9a, 0x5a, 0x04 }, |
| 852 | }, { |
| 853 | .key = { [0 ... 79] = 0xaa }, |
| 854 | .ksize = 80, |
| 855 | .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First", |
| 856 | .psize = 54, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 857 | .digest = { 0xaa, 0x4a, 0xe5, 0xe1, 0x52, 0x72, 0xd0, 0x0e, 0x95, 0x70, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 858 | 0x56, 0x37, 0xce, 0x8a, 0x3b, 0x55, 0xed, 0x40, 0x21, 0x12 }, |
| 859 | }, { |
| 860 | .key = { [0 ... 79] = 0xaa }, |
| 861 | .ksize = 80, |
| 862 | .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One " |
| 863 | "Block-Size Data", |
| 864 | .psize = 73, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 865 | .digest = { 0xe8, 0xe9, 0x9d, 0x0f, 0x45, 0x23, 0x7d, 0x78, 0x6d, 0x6b, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 866 | 0xba, 0xa7, 0x96, 0x5c, 0x78, 0x08, 0xbb, 0xff, 0x1a, 0x91 }, |
| 867 | }, |
| 868 | }; |
| 869 | |
Jonathan Lynch | cd12fb90 | 2007-11-10 20:08:25 +0800 | [diff] [blame] | 870 | |
| 871 | /* |
| 872 | * SHA224 HMAC test vectors from RFC4231 |
| 873 | */ |
| 874 | #define HMAC_SHA224_TEST_VECTORS 4 |
| 875 | |
| 876 | static struct hash_testvec hmac_sha224_tv_template[] = { |
| 877 | { |
| 878 | .key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, |
| 879 | 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, |
| 880 | 0x0b, 0x0b, 0x0b, 0x0b }, |
| 881 | .ksize = 20, |
| 882 | /* ("Hi There") */ |
| 883 | .plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65 }, |
| 884 | .psize = 8, |
| 885 | .digest = { 0x89, 0x6f, 0xb1, 0x12, 0x8a, 0xbb, 0xdf, 0x19, |
| 886 | 0x68, 0x32, 0x10, 0x7c, 0xd4, 0x9d, 0xf3, 0x3f, |
| 887 | 0x47, 0xb4, 0xb1, 0x16, 0x99, 0x12, 0xba, 0x4f, |
| 888 | 0x53, 0x68, 0x4b, 0x22}, |
| 889 | }, { |
| 890 | .key = { 0x4a, 0x65, 0x66, 0x65 }, /* ("Jefe") */ |
| 891 | .ksize = 4, |
| 892 | /* ("what do ya want for nothing?") */ |
| 893 | .plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20, |
| 894 | 0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, |
| 895 | 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68, |
| 896 | 0x69, 0x6e, 0x67, 0x3f }, |
| 897 | .psize = 28, |
| 898 | .digest = { 0xa3, 0x0e, 0x01, 0x09, 0x8b, 0xc6, 0xdb, 0xbf, |
| 899 | 0x45, 0x69, 0x0f, 0x3a, 0x7e, 0x9e, 0x6d, 0x0f, |
| 900 | 0x8b, 0xbe, 0xa2, 0xa3, 0x9e, 0x61, 0x48, 0x00, |
| 901 | 0x8f, 0xd0, 0x5e, 0x44 }, |
| 902 | .np = 4, |
| 903 | .tap = { 7, 7, 7, 7 } |
| 904 | }, { |
| 905 | .key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 906 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 907 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 908 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 909 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 910 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 911 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 912 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 913 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 914 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 915 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 916 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 917 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 918 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 919 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 920 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 921 | 0xaa, 0xaa, 0xaa }, |
| 922 | .ksize = 131, |
| 923 | /* ("Test Using Larger Than Block-Size Key - Hash Key First") */ |
| 924 | .plaintext = { 0x54, 0x65, 0x73, 0x74, 0x20, 0x55, 0x73, 0x69, |
| 925 | 0x6e, 0x67, 0x20, 0x4c, 0x61, 0x72, 0x67, 0x65, |
| 926 | 0x72, 0x20, 0x54, 0x68, 0x61, 0x6e, 0x20, 0x42, |
| 927 | 0x6c, 0x6f, 0x63, 0x6b, 0x2d, 0x53, 0x69, 0x7a, |
| 928 | 0x65, 0x20, 0x4b, 0x65, 0x79, 0x20, 0x2d, 0x20, |
| 929 | 0x48, 0x61, 0x73, 0x68, 0x20, 0x4b, 0x65, 0x79, |
| 930 | 0x20, 0x46, 0x69, 0x72, 0x73, 0x74 }, |
| 931 | .psize = 54, |
| 932 | .digest = { 0x95, 0xe9, 0xa0, 0xdb, 0x96, 0x20, 0x95, 0xad, |
| 933 | 0xae, 0xbe, 0x9b, 0x2d, 0x6f, 0x0d, 0xbc, 0xe2, |
| 934 | 0xd4, 0x99, 0xf1, 0x12, 0xf2, 0xd2, 0xb7, 0x27, |
| 935 | 0x3f, 0xa6, 0x87, 0x0e }, |
| 936 | }, { |
| 937 | .key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 938 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 939 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 940 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 941 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 942 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 943 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 944 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 945 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 946 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 947 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 948 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 949 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 950 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 951 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 952 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 953 | 0xaa, 0xaa, 0xaa }, |
| 954 | .ksize = 131, |
| 955 | /* ("This is a test using a larger than block-size key and a") |
| 956 | (" larger than block-size data. The key needs to be") |
| 957 | (" hashed before being used by the HMAC algorithm.") */ |
| 958 | .plaintext = { 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, |
| 959 | 0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x75, |
| 960 | 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x6c, |
| 961 | 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, 0x68, |
| 962 | 0x61, 0x6e, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, |
| 963 | 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x6b, 0x65, |
| 964 | 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, |
| 965 | 0x6c, 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, |
| 966 | 0x68, 0x61, 0x6e, 0x20, 0x62, 0x6c, 0x6f, 0x63, |
| 967 | 0x6b, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x64, |
| 968 | 0x61, 0x74, 0x61, 0x2e, 0x20, 0x54, 0x68, 0x65, |
| 969 | 0x20, 0x6b, 0x65, 0x79, 0x20, 0x6e, 0x65, 0x65, |
| 970 | 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, |
| 971 | 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x20, |
| 972 | 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x62, |
| 973 | 0x65, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x73, 0x65, |
| 974 | 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, |
| 975 | 0x20, 0x48, 0x4d, 0x41, 0x43, 0x20, 0x61, 0x6c, |
| 976 | 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x2e }, |
| 977 | .psize = 152, |
| 978 | .digest = { 0x3a, 0x85, 0x41, 0x66, 0xac, 0x5d, 0x9f, 0x02, |
| 979 | 0x3f, 0x54, 0xd5, 0x17, 0xd0, 0xb3, 0x9d, 0xbd, |
| 980 | 0x94, 0x67, 0x70, 0xdb, 0x9c, 0x2b, 0x95, 0xc9, |
| 981 | 0xf6, 0xf5, 0x65, 0xd1 }, |
| 982 | }, |
| 983 | }; |
| 984 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 985 | /* |
| 986 | * HMAC-SHA256 test vectors from |
| 987 | * draft-ietf-ipsec-ciph-sha-256-01.txt |
| 988 | */ |
| 989 | #define HMAC_SHA256_TEST_VECTORS 10 |
| 990 | |
Herbert Xu | e9d4116 | 2006-08-19 21:38:49 +1000 | [diff] [blame] | 991 | static struct hash_testvec hmac_sha256_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 992 | { |
| 993 | .key = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
| 994 | 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, |
| 995 | 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, |
| 996 | 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20}, |
| 997 | .ksize = 32, |
| 998 | .plaintext = "abc", |
| 999 | .psize = 3, |
| 1000 | .digest = { 0xa2, 0x1b, 0x1f, 0x5d, 0x4c, 0xf4, 0xf7, 0x3a, |
| 1001 | 0x4d, 0xd9, 0x39, 0x75, 0x0f, 0x7a, 0x06, 0x6a, |
| 1002 | 0x7f, 0x98, 0xcc, 0x13, 0x1c, 0xb1, 0x6a, 0x66, |
| 1003 | 0x92, 0x75, 0x90, 0x21, 0xcf, 0xab, 0x81, 0x81 }, |
| 1004 | }, { |
| 1005 | .key = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
| 1006 | 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, |
| 1007 | 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, |
| 1008 | 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20 }, |
| 1009 | .ksize = 32, |
| 1010 | .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| 1011 | .psize = 56, |
| 1012 | .digest = { 0x10, 0x4f, 0xdc, 0x12, 0x57, 0x32, 0x8f, 0x08, |
| 1013 | 0x18, 0x4b, 0xa7, 0x31, 0x31, 0xc5, 0x3c, 0xae, |
| 1014 | 0xe6, 0x98, 0xe3, 0x61, 0x19, 0x42, 0x11, 0x49, |
| 1015 | 0xea, 0x8c, 0x71, 0x24, 0x56, 0x69, 0x7d, 0x30 }, |
| 1016 | }, { |
| 1017 | .key = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
| 1018 | 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, |
| 1019 | 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, |
| 1020 | 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20 }, |
| 1021 | .ksize = 32, |
| 1022 | .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" |
| 1023 | "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
| 1024 | .psize = 112, |
| 1025 | .digest = { 0x47, 0x03, 0x05, 0xfc, 0x7e, 0x40, 0xfe, 0x34, |
| 1026 | 0xd3, 0xee, 0xb3, 0xe7, 0x73, 0xd9, 0x5a, 0xab, |
| 1027 | 0x73, 0xac, 0xf0, 0xfd, 0x06, 0x04, 0x47, 0xa5, |
| 1028 | 0xeb, 0x45, 0x95, 0xbf, 0x33, 0xa9, 0xd1, 0xa3 }, |
| 1029 | }, { |
| 1030 | .key = { [0 ... 31] = 0x0b }, |
| 1031 | .ksize = 32, |
| 1032 | .plaintext = "Hi There", |
| 1033 | .psize = 8, |
| 1034 | .digest = { 0x19, 0x8a, 0x60, 0x7e, 0xb4, 0x4b, 0xfb, 0xc6, |
| 1035 | 0x99, 0x03, 0xa0, 0xf1, 0xcf, 0x2b, 0xbd, 0xc5, |
| 1036 | 0xba, 0x0a, 0xa3, 0xf3, 0xd9, 0xae, 0x3c, 0x1c, |
| 1037 | 0x7a, 0x3b, 0x16, 0x96, 0xa0, 0xb6, 0x8c, 0xf7 }, |
| 1038 | }, { |
| 1039 | .key = "Jefe", |
| 1040 | .ksize = 4, |
| 1041 | .plaintext = "what do ya want for nothing?", |
| 1042 | .psize = 28, |
| 1043 | .digest = { 0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e, |
| 1044 | 0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7, |
| 1045 | 0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83, |
| 1046 | 0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43 }, |
| 1047 | .np = 2, |
| 1048 | .tap = { 14, 14 } |
| 1049 | }, { |
| 1050 | .key = { [0 ... 31] = 0xaa }, |
| 1051 | .ksize = 32, |
| 1052 | .plaintext = { [0 ... 49] = 0xdd }, |
| 1053 | .psize = 50, |
| 1054 | .digest = { 0xcd, 0xcb, 0x12, 0x20, 0xd1, 0xec, 0xcc, 0xea, |
| 1055 | 0x91, 0xe5, 0x3a, 0xba, 0x30, 0x92, 0xf9, 0x62, |
| 1056 | 0xe5, 0x49, 0xfe, 0x6c, 0xe9, 0xed, 0x7f, 0xdc, |
| 1057 | 0x43, 0x19, 0x1f, 0xbd, 0xe4, 0x5c, 0x30, 0xb0 }, |
| 1058 | }, { |
| 1059 | .key = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
| 1060 | 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, |
| 1061 | 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, |
| 1062 | 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, |
| 1063 | 0x21, 0x22, 0x23, 0x24, 0x25 }, |
| 1064 | .ksize = 37, |
| 1065 | .plaintext = { [0 ... 49] = 0xcd }, |
| 1066 | .psize = 50, |
| 1067 | .digest = { 0xd4, 0x63, 0x3c, 0x17, 0xf6, 0xfb, 0x8d, 0x74, |
| 1068 | 0x4c, 0x66, 0xde, 0xe0, 0xf8, 0xf0, 0x74, 0x55, |
| 1069 | 0x6e, 0xc4, 0xaf, 0x55, 0xef, 0x07, 0x99, 0x85, |
| 1070 | 0x41, 0x46, 0x8e, 0xb4, 0x9b, 0xd2, 0xe9, 0x17 }, |
| 1071 | }, { |
| 1072 | .key = { [0 ... 31] = 0x0c }, |
| 1073 | .ksize = 32, |
| 1074 | .plaintext = "Test With Truncation", |
| 1075 | .psize = 20, |
| 1076 | .digest = { 0x75, 0x46, 0xaf, 0x01, 0x84, 0x1f, 0xc0, 0x9b, |
| 1077 | 0x1a, 0xb9, 0xc3, 0x74, 0x9a, 0x5f, 0x1c, 0x17, |
| 1078 | 0xd4, 0xf5, 0x89, 0x66, 0x8a, 0x58, 0x7b, 0x27, |
| 1079 | 0x00, 0xa9, 0xc9, 0x7c, 0x11, 0x93, 0xcf, 0x42 }, |
| 1080 | }, { |
| 1081 | .key = { [0 ... 79] = 0xaa }, |
| 1082 | .ksize = 80, |
| 1083 | .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First", |
| 1084 | .psize = 54, |
| 1085 | .digest = { 0x69, 0x53, 0x02, 0x5e, 0xd9, 0x6f, 0x0c, 0x09, |
| 1086 | 0xf8, 0x0a, 0x96, 0xf7, 0x8e, 0x65, 0x38, 0xdb, |
| 1087 | 0xe2, 0xe7, 0xb8, 0x20, 0xe3, 0xdd, 0x97, 0x0e, |
| 1088 | 0x7d, 0xdd, 0x39, 0x09, 0x1b, 0x32, 0x35, 0x2f }, |
| 1089 | }, { |
| 1090 | .key = { [0 ... 79] = 0xaa }, |
| 1091 | .ksize = 80, |
| 1092 | .plaintext = "Test Using Larger Than Block-Size Key and Larger Than " |
| 1093 | "One Block-Size Data", |
| 1094 | .psize = 73, |
| 1095 | .digest = { 0x63, 0x55, 0xac, 0x22, 0xe8, 0x90, 0xd0, 0xa3, |
| 1096 | 0xc8, 0x48, 0x1a, 0x5c, 0xa4, 0x82, 0x5b, 0xc8, |
| 1097 | 0x84, 0xd3, 0xe7, 0xa1, 0xff, 0x98, 0xa2, 0xfc, |
| 1098 | 0x2a, 0xc7, 0xd8, 0xe0, 0x64, 0xc3, 0xb2, 0xe6 }, |
| 1099 | }, |
| 1100 | }; |
| 1101 | |
Kazunori MIYAZAWA | 5b2becf | 2006-10-28 13:18:53 +1000 | [diff] [blame] | 1102 | #define XCBC_AES_TEST_VECTORS 6 |
| 1103 | |
| 1104 | static struct hash_testvec aes_xcbc128_tv_template[] = { |
| 1105 | { |
| 1106 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 1107 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 1108 | .plaintext = { [0 ... 15] = 0 }, |
| 1109 | .digest = { 0x75, 0xf0, 0x25, 0x1d, 0x52, 0x8a, 0xc0, 0x1c, |
| 1110 | 0x45, 0x73, 0xdf, 0xd5, 0x84, 0xd7, 0x9f, 0x29 }, |
| 1111 | .psize = 0, |
| 1112 | .ksize = 16, |
| 1113 | }, { |
| 1114 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 1115 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 1116 | .plaintext = { 0x00, 0x01, 0x02 }, |
| 1117 | .digest = { 0x5b, 0x37, 0x65, 0x80, 0xae, 0x2f, 0x19, 0xaf, |
| 1118 | 0xe7, 0x21, 0x9c, 0xee, 0xf1, 0x72, 0x75, 0x6f }, |
| 1119 | .psize = 3, |
| 1120 | .ksize = 16, |
| 1121 | } , { |
| 1122 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 1123 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 1124 | .plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 1125 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 1126 | .digest = { 0xd2, 0xa2, 0x46, 0xfa, 0x34, 0x9b, 0x68, 0xa7, |
| 1127 | 0x99, 0x98, 0xa4, 0x39, 0x4f, 0xf7, 0xa2, 0x63 }, |
| 1128 | .psize = 16, |
| 1129 | .ksize = 16, |
| 1130 | }, { |
| 1131 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 1132 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 1133 | .plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 1134 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 1135 | 0x10, 0x11, 0x12, 0x13 }, |
| 1136 | .digest = { 0x47, 0xf5, 0x1b, 0x45, 0x64, 0x96, 0x62, 0x15, |
| 1137 | 0xb8, 0x98, 0x5c, 0x63, 0x05, 0x5e, 0xd3, 0x08 }, |
| 1138 | .tap = { 10, 10 }, |
| 1139 | .psize = 20, |
| 1140 | .np = 2, |
| 1141 | .ksize = 16, |
| 1142 | }, { |
| 1143 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 1144 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 1145 | .plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 1146 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 1147 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 1148 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 1149 | .digest = { 0xf5, 0x4f, 0x0e, 0xc8, 0xd2, 0xb9, 0xf3, 0xd3, |
| 1150 | 0x68, 0x07, 0x73, 0x4b, 0xd5, 0x28, 0x3f, 0xd4 }, |
| 1151 | .psize = 32, |
| 1152 | .ksize = 16, |
| 1153 | }, { |
| 1154 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 1155 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 1156 | .plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 1157 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 1158 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 1159 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| 1160 | 0x20, 0x21 }, |
| 1161 | .digest = { 0xbe, 0xcb, 0xb3, 0xbc, 0xcd, 0xb5, 0x18, 0xa3, |
| 1162 | 0x06, 0x77, 0xd5, 0x48, 0x1f, 0xb6, 0xb4, 0xd8 }, |
| 1163 | .tap = { 17, 17 }, |
| 1164 | .psize = 34, |
| 1165 | .np = 2, |
| 1166 | .ksize = 16, |
| 1167 | } |
| 1168 | }; |
| 1169 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1170 | /* |
Andrew Donofrio | a28091a | 2006-12-10 12:10:20 +1100 | [diff] [blame] | 1171 | * SHA384 HMAC test vectors from RFC4231 |
| 1172 | */ |
| 1173 | |
| 1174 | #define HMAC_SHA384_TEST_VECTORS 4 |
| 1175 | |
| 1176 | static struct hash_testvec hmac_sha384_tv_template[] = { |
| 1177 | { |
| 1178 | .key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, |
| 1179 | 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, |
| 1180 | 0x0b, 0x0b, 0x0b, 0x0b }, // (20 bytes) |
| 1181 | .ksize = 20, |
| 1182 | .plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65 }, // ("Hi There") |
| 1183 | .psize = 8, |
| 1184 | .digest = { 0xaf, 0xd0, 0x39, 0x44, 0xd8, 0x48, 0x95, 0x62, |
| 1185 | 0x6b, 0x08, 0x25, 0xf4, 0xab, 0x46, 0x90, 0x7f, |
| 1186 | 0x15, 0xf9, 0xda, 0xdb, 0xe4, 0x10, 0x1e, 0xc6, |
| 1187 | 0x82, 0xaa, 0x03, 0x4c, 0x7c, 0xeb, 0xc5, 0x9c, |
| 1188 | 0xfa, 0xea, 0x9e, 0xa9, 0x07, 0x6e, 0xde, 0x7f, |
| 1189 | 0x4a, 0xf1, 0x52, 0xe8, 0xb2, 0xfa, 0x9c, 0xb6 }, |
| 1190 | }, { |
| 1191 | .key = { 0x4a, 0x65, 0x66, 0x65 }, // ("Jefe") |
| 1192 | .ksize = 4, |
| 1193 | .plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20, |
| 1194 | 0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, // ("what do ya want ") |
| 1195 | 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68, |
| 1196 | 0x69, 0x6e, 0x67, 0x3f }, // ("for nothing?") |
| 1197 | .psize = 28, |
| 1198 | .digest = { 0xaf, 0x45, 0xd2, 0xe3, 0x76, 0x48, 0x40, 0x31, |
| 1199 | 0x61, 0x7f, 0x78, 0xd2, 0xb5, 0x8a, 0x6b, 0x1b, |
| 1200 | 0x9c, 0x7e, 0xf4, 0x64, 0xf5, 0xa0, 0x1b, 0x47, |
| 1201 | 0xe4, 0x2e, 0xc3, 0x73, 0x63, 0x22, 0x44, 0x5e, |
| 1202 | 0x8e, 0x22, 0x40, 0xca, 0x5e, 0x69, 0xe2, 0xc7, |
| 1203 | 0x8b, 0x32, 0x39, 0xec, 0xfa, 0xb2, 0x16, 0x49 }, |
| 1204 | .np = 4, |
| 1205 | .tap = { 7, 7, 7, 7 } |
| 1206 | }, { |
| 1207 | .key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1208 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1209 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1210 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1211 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1212 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1213 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1214 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1215 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1216 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1217 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1218 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1219 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1220 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1221 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1222 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1223 | 0xaa, 0xaa, 0xaa }, // (131 bytes) |
| 1224 | .ksize = 131, |
| 1225 | .plaintext = { 0x54, 0x65, 0x73, 0x74, 0x20, 0x55, 0x73, 0x69, |
| 1226 | 0x6e, 0x67, 0x20, 0x4c, 0x61, 0x72, 0x67, 0x65, // ("Test Using Large") |
| 1227 | 0x72, 0x20, 0x54, 0x68, 0x61, 0x6e, 0x20, 0x42, |
| 1228 | 0x6c, 0x6f, 0x63, 0x6b, 0x2d, 0x53, 0x69, 0x7a, // ("r Than Block-Siz") |
| 1229 | 0x65, 0x20, 0x4b, 0x65, 0x79, 0x20, 0x2d, 0x20, |
| 1230 | 0x48, 0x61, 0x73, 0x68, 0x20, 0x4b, 0x65, 0x79, // ("e Key - Hash Key") |
| 1231 | 0x20, 0x46, 0x69, 0x72, 0x73, 0x74 }, // (" First") |
| 1232 | .psize = 54, |
| 1233 | .digest = { 0x4e, 0xce, 0x08, 0x44, 0x85, 0x81, 0x3e, 0x90, |
| 1234 | 0x88, 0xd2, 0xc6, 0x3a, 0x04, 0x1b, 0xc5, 0xb4, |
| 1235 | 0x4f, 0x9e, 0xf1, 0x01, 0x2a, 0x2b, 0x58, 0x8f, |
| 1236 | 0x3c, 0xd1, 0x1f, 0x05, 0x03, 0x3a, 0xc4, 0xc6, |
| 1237 | 0x0c, 0x2e, 0xf6, 0xab, 0x40, 0x30, 0xfe, 0x82, |
| 1238 | 0x96, 0x24, 0x8d, 0xf1, 0x63, 0xf4, 0x49, 0x52 }, |
| 1239 | }, { |
| 1240 | .key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1241 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1242 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1243 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1244 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1245 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1246 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1247 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1248 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1249 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1250 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1251 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1252 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1253 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1254 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1255 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1256 | 0xaa, 0xaa, 0xaa }, // (131 bytes) |
| 1257 | .ksize = 131, |
| 1258 | .plaintext = { 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, |
| 1259 | 0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x75, // ("This is a test u") |
| 1260 | 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x6c, |
| 1261 | 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, 0x68, // ("sing a larger th") |
| 1262 | 0x61, 0x6e, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, |
| 1263 | 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x6b, 0x65, // ("an block-size ke") |
| 1264 | 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, |
| 1265 | 0x6c, 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, // ("y and a larger t") |
| 1266 | 0x68, 0x61, 0x6e, 0x20, 0x62, 0x6c, 0x6f, 0x63, |
| 1267 | 0x6b, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x64, // ("han block-size d") |
| 1268 | 0x61, 0x74, 0x61, 0x2e, 0x20, 0x54, 0x68, 0x65, |
| 1269 | 0x20, 0x6b, 0x65, 0x79, 0x20, 0x6e, 0x65, 0x65, // ("ata. The key nee") |
| 1270 | 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, |
| 1271 | 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x20, // ("ds to be hashed ") |
| 1272 | 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x62, |
| 1273 | 0x65, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x73, 0x65, // ("before being use") |
| 1274 | 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, |
| 1275 | 0x20, 0x48, 0x4d, 0x41, 0x43, 0x20, 0x61, 0x6c, // ("d by the HMAC al") |
| 1276 | 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x2e }, // ("gorithm.") |
| 1277 | .psize = 152, |
| 1278 | .digest = { 0x66, 0x17, 0x17, 0x8e, 0x94, 0x1f, 0x02, 0x0d, |
| 1279 | 0x35, 0x1e, 0x2f, 0x25, 0x4e, 0x8f, 0xd3, 0x2c, |
| 1280 | 0x60, 0x24, 0x20, 0xfe, 0xb0, 0xb8, 0xfb, 0x9a, |
| 1281 | 0xdc, 0xce, 0xbb, 0x82, 0x46, 0x1e, 0x99, 0xc5, |
| 1282 | 0xa6, 0x78, 0xcc, 0x31, 0xe7, 0x99, 0x17, 0x6d, |
| 1283 | 0x38, 0x60, 0xe6, 0x11, 0x0c, 0x46, 0x52, 0x3e }, |
| 1284 | }, |
| 1285 | }; |
| 1286 | |
| 1287 | /* |
| 1288 | * SHA512 HMAC test vectors from RFC4231 |
| 1289 | */ |
| 1290 | |
| 1291 | #define HMAC_SHA512_TEST_VECTORS 4 |
| 1292 | |
| 1293 | static struct hash_testvec hmac_sha512_tv_template[] = { |
| 1294 | { |
| 1295 | .key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, |
| 1296 | 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, |
| 1297 | 0x0b, 0x0b, 0x0b, 0x0b }, // (20 bytes) |
| 1298 | .ksize = 20, |
| 1299 | .plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65 }, // ("Hi There") |
| 1300 | .psize = 8, |
| 1301 | .digest = { 0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d, |
| 1302 | 0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0, |
| 1303 | 0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78, |
| 1304 | 0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde, |
| 1305 | 0xda, 0xa8, 0x33, 0xb7, 0xd6, 0xb8, 0xa7, 0x02, |
| 1306 | 0x03, 0x8b, 0x27, 0x4e, 0xae, 0xa3, 0xf4, 0xe4, |
| 1307 | 0xbe, 0x9d, 0x91, 0x4e, 0xeb, 0x61, 0xf1, 0x70, |
| 1308 | 0x2e, 0x69, 0x6c, 0x20, 0x3a, 0x12, 0x68, 0x54 }, |
| 1309 | }, { |
| 1310 | .key = { 0x4a, 0x65, 0x66, 0x65 }, // ("Jefe") |
| 1311 | .ksize = 4, |
| 1312 | .plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20, |
| 1313 | 0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, // ("what do ya want ") |
| 1314 | 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68, |
| 1315 | 0x69, 0x6e, 0x67, 0x3f }, // ("for nothing?") |
| 1316 | .psize = 28, |
| 1317 | .digest = { 0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2, |
| 1318 | 0xe3, 0x95, 0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3, |
| 1319 | 0x87, 0xbd, 0x64, 0x22, 0x2e, 0x83, 0x1f, 0xd6, |
| 1320 | 0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25, 0x05, 0x54, |
| 1321 | 0x97, 0x58, 0xbf, 0x75, 0xc0, 0x5a, 0x99, 0x4a, |
| 1322 | 0x6d, 0x03, 0x4f, 0x65, 0xf8, 0xf0, 0xe6, 0xfd, |
| 1323 | 0xca, 0xea, 0xb1, 0xa3, 0x4d, 0x4a, 0x6b, 0x4b, |
| 1324 | 0x63, 0x6e, 0x07, 0x0a, 0x38, 0xbc, 0xe7, 0x37 }, |
| 1325 | .np = 4, |
| 1326 | .tap = { 7, 7, 7, 7 } |
| 1327 | }, { |
| 1328 | .key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1329 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1330 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1331 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1332 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1333 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1334 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1335 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1336 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1337 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1338 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1339 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1340 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1341 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1342 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1343 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1344 | 0xaa, 0xaa, 0xaa }, // (131 bytes) |
| 1345 | .ksize = 131, |
| 1346 | .plaintext = { 0x54, 0x65, 0x73, 0x74, 0x20, 0x55, 0x73, 0x69, |
| 1347 | 0x6e, 0x67, 0x20, 0x4c, 0x61, 0x72, 0x67, 0x65, // ("Test Using Large") |
| 1348 | 0x72, 0x20, 0x54, 0x68, 0x61, 0x6e, 0x20, 0x42, |
| 1349 | 0x6c, 0x6f, 0x63, 0x6b, 0x2d, 0x53, 0x69, 0x7a, // ("r Than Block-Siz") |
| 1350 | 0x65, 0x20, 0x4b, 0x65, 0x79, 0x20, 0x2d, 0x20, |
| 1351 | 0x48, 0x61, 0x73, 0x68, 0x20, 0x4b, 0x65, 0x79, // ("e Key - Hash Key") |
| 1352 | 0x20, 0x46, 0x69, 0x72, 0x73, 0x74 }, // (" First") |
| 1353 | .psize = 54, |
| 1354 | .digest = { 0x80, 0xb2, 0x42, 0x63, 0xc7, 0xc1, 0xa3, 0xeb, |
| 1355 | 0xb7, 0x14, 0x93, 0xc1, 0xdd, 0x7b, 0xe8, 0xb4, |
| 1356 | 0x9b, 0x46, 0xd1, 0xf4, 0x1b, 0x4a, 0xee, 0xc1, |
| 1357 | 0x12, 0x1b, 0x01, 0x37, 0x83, 0xf8, 0xf3, 0x52, |
| 1358 | 0x6b, 0x56, 0xd0, 0x37, 0xe0, 0x5f, 0x25, 0x98, |
| 1359 | 0xbd, 0x0f, 0xd2, 0x21, 0x5d, 0x6a, 0x1e, 0x52, |
| 1360 | 0x95, 0xe6, 0x4f, 0x73, 0xf6, 0x3f, 0x0a, 0xec, |
| 1361 | 0x8b, 0x91, 0x5a, 0x98, 0x5d, 0x78, 0x65, 0x98 }, |
| 1362 | }, { |
| 1363 | .key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1364 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1365 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1366 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1367 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1368 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1369 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1370 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1371 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1372 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1373 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1374 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1375 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1376 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1377 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1378 | 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 1379 | 0xaa, 0xaa, 0xaa }, // (131 bytes) |
| 1380 | .ksize = 131, |
| 1381 | .plaintext = { 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, |
| 1382 | 0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x75, // ("This is a test u") |
| 1383 | 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x6c, |
| 1384 | 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, 0x68, // ("sing a larger th") |
| 1385 | 0x61, 0x6e, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, |
| 1386 | 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x6b, 0x65, // ("an block-size ke") |
| 1387 | 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, |
| 1388 | 0x6c, 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, // ("y and a larger t") |
| 1389 | 0x68, 0x61, 0x6e, 0x20, 0x62, 0x6c, 0x6f, 0x63, |
| 1390 | 0x6b, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x64, // ("han block-size d") |
| 1391 | 0x61, 0x74, 0x61, 0x2e, 0x20, 0x54, 0x68, 0x65, |
| 1392 | 0x20, 0x6b, 0x65, 0x79, 0x20, 0x6e, 0x65, 0x65, // ("ata. The key nee") |
| 1393 | 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, |
| 1394 | 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x20, // ("ds to be hashed ") |
| 1395 | 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x62, |
| 1396 | 0x65, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x73, 0x65, // ("before being use") |
| 1397 | 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, |
| 1398 | 0x20, 0x48, 0x4d, 0x41, 0x43, 0x20, 0x61, 0x6c, // ("d by the HMAC al") |
| 1399 | 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x2e }, // ("gorithm.") |
| 1400 | .psize = 152, |
| 1401 | .digest = { 0xe3, 0x7b, 0x6a, 0x77, 0x5d, 0xc8, 0x7d, 0xba, |
| 1402 | 0xa4, 0xdf, 0xa9, 0xf9, 0x6e, 0x5e, 0x3f, 0xfd, |
| 1403 | 0xde, 0xbd, 0x71, 0xf8, 0x86, 0x72, 0x89, 0x86, |
| 1404 | 0x5d, 0xf5, 0xa3, 0x2d, 0x20, 0xcd, 0xc9, 0x44, |
| 1405 | 0xb6, 0x02, 0x2c, 0xac, 0x3c, 0x49, 0x82, 0xb1, |
| 1406 | 0x0d, 0x5e, 0xeb, 0x55, 0xc3, 0xe4, 0xde, 0x15, |
| 1407 | 0x13, 0x46, 0x76, 0xfb, 0x6d, 0xe0, 0x44, 0x60, |
| 1408 | 0x65, 0xc9, 0x74, 0x40, 0xfa, 0x8c, 0x6a, 0x58 }, |
| 1409 | }, |
| 1410 | }; |
| 1411 | |
| 1412 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1413 | * DES test vectors. |
| 1414 | */ |
| 1415 | #define DES_ENC_TEST_VECTORS 10 |
| 1416 | #define DES_DEC_TEST_VECTORS 4 |
| 1417 | #define DES_CBC_ENC_TEST_VECTORS 5 |
| 1418 | #define DES_CBC_DEC_TEST_VECTORS 4 |
| 1419 | #define DES3_EDE_ENC_TEST_VECTORS 3 |
| 1420 | #define DES3_EDE_DEC_TEST_VECTORS 3 |
| 1421 | |
| 1422 | static struct cipher_testvec des_enc_tv_template[] = { |
| 1423 | { /* From Applied Cryptography */ |
| 1424 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1425 | .klen = 8, |
| 1426 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 }, |
| 1427 | .ilen = 8, |
| 1428 | .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d }, |
| 1429 | .rlen = 8, |
| 1430 | }, { /* Same key, different plaintext block */ |
| 1431 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1432 | .klen = 8, |
| 1433 | .input = { 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 }, |
| 1434 | .ilen = 8, |
| 1435 | .result = { 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b }, |
| 1436 | .rlen = 8, |
| 1437 | }, { /* Sbox test from NBS */ |
| 1438 | .key = { 0x7c, 0xa1, 0x10, 0x45, 0x4a, 0x1a, 0x6e, 0x57 }, |
| 1439 | .klen = 8, |
| 1440 | .input = { 0x01, 0xa1, 0xd6, 0xd0, 0x39, 0x77, 0x67, 0x42 }, |
| 1441 | .ilen = 8, |
| 1442 | .result = { 0x69, 0x0f, 0x5b, 0x0d, 0x9a, 0x26, 0x93, 0x9b }, |
| 1443 | .rlen = 8, |
| 1444 | }, { /* Three blocks */ |
| 1445 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1446 | .klen = 8, |
| 1447 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7, |
| 1448 | 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, |
| 1449 | 0xca, 0xfe, 0xba, 0xbe, 0xfe, 0xed, 0xbe, 0xef }, |
| 1450 | .ilen = 24, |
| 1451 | .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d, |
| 1452 | 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b, |
| 1453 | 0xb4, 0x99, 0x26, 0xf7, 0x1f, 0xe1, 0xd4, 0x90 }, |
| 1454 | .rlen = 24, |
| 1455 | }, { /* Weak key */ |
| 1456 | .fail = 1, |
| 1457 | .wk = 1, |
| 1458 | .key = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, |
| 1459 | .klen = 8, |
| 1460 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 }, |
| 1461 | .ilen = 8, |
| 1462 | .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d }, |
| 1463 | .rlen = 8, |
| 1464 | }, { /* Two blocks -- for testing encryption across pages */ |
| 1465 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1466 | .klen = 8, |
| 1467 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7, |
| 1468 | 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 }, |
| 1469 | .ilen = 16, |
| 1470 | .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d, |
| 1471 | 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b }, |
| 1472 | .rlen = 16, |
| 1473 | .np = 2, |
| 1474 | .tap = { 8, 8 } |
| 1475 | }, { /* Four blocks -- for testing encryption with chunking */ |
| 1476 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1477 | .klen = 8, |
| 1478 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7, |
| 1479 | 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, |
| 1480 | 0xca, 0xfe, 0xba, 0xbe, 0xfe, 0xed, 0xbe, 0xef, |
| 1481 | 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 }, |
| 1482 | .ilen = 32, |
| 1483 | .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d, |
| 1484 | 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b, |
| 1485 | 0xb4, 0x99, 0x26, 0xf7, 0x1f, 0xe1, 0xd4, 0x90, |
| 1486 | 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b }, |
| 1487 | .rlen = 32, |
| 1488 | .np = 3, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1489 | .tap = { 14, 10, 8 } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1490 | }, { |
| 1491 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1492 | .klen = 8, |
| 1493 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7, |
| 1494 | 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, |
| 1495 | 0xca, 0xfe, 0xba, 0xbe, 0xfe, 0xed, 0xbe, 0xef }, |
| 1496 | .ilen = 24, |
| 1497 | .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d, |
| 1498 | 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b, |
| 1499 | 0xb4, 0x99, 0x26, 0xf7, 0x1f, 0xe1, 0xd4, 0x90 }, |
| 1500 | .rlen = 24, |
| 1501 | .np = 4, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1502 | .tap = { 2, 1, 3, 18 } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1503 | }, { |
| 1504 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1505 | .klen = 8, |
| 1506 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7, |
| 1507 | 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 }, |
| 1508 | .ilen = 16, |
| 1509 | .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d, |
| 1510 | 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b }, |
| 1511 | .rlen = 16, |
| 1512 | .np = 5, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1513 | .tap = { 2, 2, 2, 2, 8 } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1514 | }, { |
| 1515 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1516 | .klen = 8, |
| 1517 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 }, |
| 1518 | .ilen = 8, |
| 1519 | .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d }, |
| 1520 | .rlen = 8, |
| 1521 | .np = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1522 | .tap = { 1, 1, 1, 1, 1, 1, 1, 1 } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1523 | }, |
| 1524 | }; |
| 1525 | |
| 1526 | static struct cipher_testvec des_dec_tv_template[] = { |
| 1527 | { /* From Applied Cryptography */ |
| 1528 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1529 | .klen = 8, |
| 1530 | .input = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d }, |
| 1531 | .ilen = 8, |
| 1532 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 }, |
| 1533 | .rlen = 8, |
| 1534 | }, { /* Sbox test from NBS */ |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1535 | .key = { 0x7c, 0xa1, 0x10, 0x45, 0x4a, 0x1a, 0x6e, 0x57 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1536 | .klen = 8, |
| 1537 | .input = { 0x69, 0x0f, 0x5b, 0x0d, 0x9a, 0x26, 0x93, 0x9b }, |
| 1538 | .ilen = 8, |
| 1539 | .result = { 0x01, 0xa1, 0xd6, 0xd0, 0x39, 0x77, 0x67, 0x42 }, |
| 1540 | .rlen = 8, |
| 1541 | }, { /* Two blocks, for chunking test */ |
| 1542 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1543 | .klen = 8, |
| 1544 | .input = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d, |
| 1545 | 0x69, 0x0f, 0x5b, 0x0d, 0x9a, 0x26, 0x93, 0x9b }, |
| 1546 | .ilen = 16, |
| 1547 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7, |
| 1548 | 0xa3, 0x99, 0x7b, 0xca, 0xaf, 0x69, 0xa0, 0xf5 }, |
| 1549 | .rlen = 16, |
| 1550 | .np = 2, |
| 1551 | .tap = { 8, 8 } |
| 1552 | }, { |
| 1553 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1554 | .klen = 8, |
| 1555 | .input = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d, |
| 1556 | 0x69, 0x0f, 0x5b, 0x0d, 0x9a, 0x26, 0x93, 0x9b }, |
| 1557 | .ilen = 16, |
| 1558 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7, |
| 1559 | 0xa3, 0x99, 0x7b, 0xca, 0xaf, 0x69, 0xa0, 0xf5 }, |
| 1560 | .rlen = 16, |
| 1561 | .np = 3, |
| 1562 | .tap = { 3, 12, 1 } |
| 1563 | }, |
| 1564 | }; |
| 1565 | |
| 1566 | static struct cipher_testvec des_cbc_enc_tv_template[] = { |
| 1567 | { /* From OpenSSL */ |
| 1568 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}, |
| 1569 | .klen = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1570 | .iv = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10}, |
| 1571 | .input = { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, |
| 1572 | 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, |
| 1573 | 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1574 | .ilen = 24, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1575 | .result = { 0xcc, 0xd1, 0x73, 0xff, 0xab, 0x20, 0x39, 0xf4, |
| 1576 | 0xac, 0xd8, 0xae, 0xfd, 0xdf, 0xd8, 0xa1, 0xeb, |
| 1577 | 0x46, 0x8e, 0x91, 0x15, 0x78, 0x88, 0xba, 0x68 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1578 | .rlen = 24, |
| 1579 | }, { /* FIPS Pub 81 */ |
| 1580 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1581 | .klen = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1582 | .iv = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1583 | .input = { 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74 }, |
| 1584 | .ilen = 8, |
| 1585 | .result = { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c }, |
| 1586 | .rlen = 8, |
| 1587 | }, { |
| 1588 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1589 | .klen = 8, |
| 1590 | .iv = { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c }, |
| 1591 | .input = { 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 }, |
| 1592 | .ilen = 8, |
| 1593 | .result = { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f }, |
| 1594 | .rlen = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1595 | }, { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1596 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1597 | .klen = 8, |
| 1598 | .iv = { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f }, |
| 1599 | .input = { 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 }, |
| 1600 | .ilen = 8, |
| 1601 | .result = { 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 }, |
| 1602 | .rlen = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1603 | }, { /* Copy of openssl vector for chunk testing */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1604 | /* From OpenSSL */ |
| 1605 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}, |
| 1606 | .klen = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1607 | .iv = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10}, |
| 1608 | .input = { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, |
| 1609 | 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, |
| 1610 | 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1611 | .ilen = 24, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1612 | .result = { 0xcc, 0xd1, 0x73, 0xff, 0xab, 0x20, 0x39, 0xf4, |
| 1613 | 0xac, 0xd8, 0xae, 0xfd, 0xdf, 0xd8, 0xa1, 0xeb, |
| 1614 | 0x46, 0x8e, 0x91, 0x15, 0x78, 0x88, 0xba, 0x68 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1615 | .rlen = 24, |
| 1616 | .np = 2, |
| 1617 | .tap = { 13, 11 } |
| 1618 | }, |
| 1619 | }; |
| 1620 | |
| 1621 | static struct cipher_testvec des_cbc_dec_tv_template[] = { |
| 1622 | { /* FIPS Pub 81 */ |
| 1623 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1624 | .klen = 8, |
| 1625 | .iv = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef }, |
| 1626 | .input = { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c }, |
| 1627 | .ilen = 8, |
| 1628 | .result = { 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74 }, |
| 1629 | .rlen = 8, |
| 1630 | }, { |
| 1631 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1632 | .klen = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1633 | .iv = { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1634 | .input = { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f }, |
| 1635 | .ilen = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1636 | .result = { 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1637 | .rlen = 8, |
| 1638 | }, { |
| 1639 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1640 | .klen = 8, |
| 1641 | .iv = { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f }, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1642 | .input = { 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1643 | .ilen = 8, |
| 1644 | .result = { 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 }, |
| 1645 | .rlen = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1646 | }, { /* Copy of above, for chunk testing */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1647 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1648 | .klen = 8, |
| 1649 | .iv = { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f }, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1650 | .input = { 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1651 | .ilen = 8, |
| 1652 | .result = { 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 }, |
| 1653 | .rlen = 8, |
| 1654 | .np = 2, |
| 1655 | .tap = { 4, 4 } |
| 1656 | }, |
| 1657 | }; |
| 1658 | |
| 1659 | /* |
| 1660 | * We really need some more test vectors, especially for DES3 CBC. |
| 1661 | */ |
| 1662 | static struct cipher_testvec des3_ede_enc_tv_template[] = { |
| 1663 | { /* These are from openssl */ |
| 1664 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 1665 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, |
| 1666 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10}, |
| 1667 | .klen = 24, |
| 1668 | .input = { 0x73, 0x6f, 0x6d, 0x65, 0x64, 0x61, 0x74, 0x61 }, |
| 1669 | .ilen = 8, |
| 1670 | .result = { 0x18, 0xd7, 0x48, 0xe5, 0x63, 0x62, 0x05, 0x72 }, |
| 1671 | .rlen = 8, |
| 1672 | }, { |
| 1673 | .key = { 0x03, 0x52, 0x02, 0x07, 0x67, 0x20, 0x82, 0x17, |
| 1674 | 0x86, 0x02, 0x87, 0x66, 0x59, 0x08, 0x21, 0x98, |
| 1675 | 0x64, 0x05, 0x6a, 0xbd, 0xfe, 0xa9, 0x34, 0x57 }, |
| 1676 | .klen = 24, |
| 1677 | .input = { 0x73, 0x71, 0x75, 0x69, 0x67, 0x67, 0x6c, 0x65 }, |
| 1678 | .ilen = 8, |
| 1679 | .result = { 0xc0, 0x7d, 0x2a, 0x0f, 0xa5, 0x66, 0xfa, 0x30 }, |
| 1680 | .rlen = 8, |
| 1681 | }, { |
| 1682 | .key = { 0x10, 0x46, 0x10, 0x34, 0x89, 0x98, 0x80, 0x20, |
| 1683 | 0x91, 0x07, 0xd0, 0x15, 0x89, 0x19, 0x01, 0x01, |
| 1684 | 0x19, 0x07, 0x92, 0x10, 0x98, 0x1a, 0x01, 0x01 }, |
| 1685 | .klen = 24, |
| 1686 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 1687 | .ilen = 8, |
| 1688 | .result = { 0xe1, 0xef, 0x62, 0xc3, 0x32, 0xfe, 0x82, 0x5b }, |
| 1689 | .rlen = 8, |
| 1690 | }, |
| 1691 | }; |
| 1692 | |
| 1693 | static struct cipher_testvec des3_ede_dec_tv_template[] = { |
| 1694 | { /* These are from openssl */ |
| 1695 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 1696 | 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, |
| 1697 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10}, |
| 1698 | .klen = 24, |
| 1699 | .input = { 0x18, 0xd7, 0x48, 0xe5, 0x63, 0x62, 0x05, 0x72 }, |
| 1700 | .ilen = 8, |
| 1701 | .result = { 0x73, 0x6f, 0x6d, 0x65, 0x64, 0x61, 0x74, 0x61 }, |
| 1702 | .rlen = 8, |
| 1703 | }, { |
| 1704 | .key = { 0x03, 0x52, 0x02, 0x07, 0x67, 0x20, 0x82, 0x17, |
| 1705 | 0x86, 0x02, 0x87, 0x66, 0x59, 0x08, 0x21, 0x98, |
| 1706 | 0x64, 0x05, 0x6a, 0xbd, 0xfe, 0xa9, 0x34, 0x57 }, |
| 1707 | .klen = 24, |
| 1708 | .input = { 0xc0, 0x7d, 0x2a, 0x0f, 0xa5, 0x66, 0xfa, 0x30 }, |
| 1709 | .ilen = 8, |
| 1710 | .result = { 0x73, 0x71, 0x75, 0x69, 0x67, 0x67, 0x6c, 0x65 }, |
| 1711 | .rlen = 8, |
| 1712 | }, { |
| 1713 | .key = { 0x10, 0x46, 0x10, 0x34, 0x89, 0x98, 0x80, 0x20, |
| 1714 | 0x91, 0x07, 0xd0, 0x15, 0x89, 0x19, 0x01, 0x01, |
| 1715 | 0x19, 0x07, 0x92, 0x10, 0x98, 0x1a, 0x01, 0x01 }, |
| 1716 | .klen = 24, |
| 1717 | .input = { 0xe1, 0xef, 0x62, 0xc3, 0x32, 0xfe, 0x82, 0x5b }, |
| 1718 | .ilen = 8, |
| 1719 | .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 1720 | .rlen = 8, |
| 1721 | }, |
| 1722 | }; |
| 1723 | |
| 1724 | /* |
| 1725 | * Blowfish test vectors. |
| 1726 | */ |
| 1727 | #define BF_ENC_TEST_VECTORS 6 |
| 1728 | #define BF_DEC_TEST_VECTORS 6 |
| 1729 | #define BF_CBC_ENC_TEST_VECTORS 1 |
| 1730 | #define BF_CBC_DEC_TEST_VECTORS 1 |
| 1731 | |
| 1732 | static struct cipher_testvec bf_enc_tv_template[] = { |
| 1733 | { /* DES test vectors from OpenSSL */ |
| 1734 | .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, |
| 1735 | .klen = 8, |
| 1736 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 1737 | .ilen = 8, |
| 1738 | .result = { 0x4e, 0xf9, 0x97, 0x45, 0x61, 0x98, 0xdd, 0x78 }, |
| 1739 | .rlen = 8, |
| 1740 | }, { |
| 1741 | .key = { 0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x0e, 0x0e, 0x0e }, |
| 1742 | .klen = 8, |
| 1743 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1744 | .ilen = 8, |
| 1745 | .result = { 0xa7, 0x90, 0x79, 0x51, 0x08, 0xea, 0x3c, 0xae }, |
| 1746 | .rlen = 8, |
| 1747 | }, { |
| 1748 | .key = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, |
| 1749 | .klen = 8, |
| 1750 | .input = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 1751 | .ilen = 8, |
| 1752 | .result = { 0xe8, 0x7a, 0x24, 0x4e, 0x2c, 0xc8, 0x5e, 0x82 }, |
| 1753 | .rlen = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1754 | }, { /* Vary the keylength... */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1755 | .key = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87, |
| 1756 | 0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f }, |
| 1757 | .klen = 16, |
| 1758 | .input = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 1759 | .ilen = 8, |
| 1760 | .result = { 0x93, 0x14, 0x28, 0x87, 0xee, 0x3b, 0xe1, 0x5c }, |
| 1761 | .rlen = 8, |
| 1762 | }, { |
| 1763 | .key = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87, |
| 1764 | 0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f, |
| 1765 | 0x00, 0x11, 0x22, 0x33, 0x44 }, |
| 1766 | .klen = 21, |
| 1767 | .input = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 1768 | .ilen = 8, |
| 1769 | .result = { 0xe6, 0xf5, 0x1e, 0xd7, 0x9b, 0x9d, 0xb2, 0x1f }, |
| 1770 | .rlen = 8, |
| 1771 | }, { /* Generated with bf488 */ |
| 1772 | .key = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87, |
| 1773 | 0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f, |
| 1774 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1775 | 0x04, 0x68, 0x91, 0x04, 0xc2, 0xfd, 0x3b, 0x2f, |
| 1776 | 0x58, 0x40, 0x23, 0x64, 0x1a, 0xba, 0x61, 0x76, |
| 1777 | 0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x0e, 0x0e, 0x0e, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1778 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, |
| 1779 | .klen = 56, |
| 1780 | .input = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 1781 | .ilen = 8, |
| 1782 | .result = { 0xc0, 0x45, 0x04, 0x01, 0x2e, 0x4e, 0x1f, 0x53 }, |
| 1783 | .rlen = 8, |
| 1784 | }, |
| 1785 | }; |
| 1786 | |
| 1787 | static struct cipher_testvec bf_dec_tv_template[] = { |
| 1788 | { /* DES test vectors from OpenSSL */ |
| 1789 | .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 1790 | .klen = 8, |
| 1791 | .input = { 0x4e, 0xf9, 0x97, 0x45, 0x61, 0x98, 0xdd, 0x78 }, |
| 1792 | .ilen = 8, |
| 1793 | .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 1794 | .rlen = 8, |
| 1795 | }, { |
| 1796 | .key = { 0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x0e, 0x0e, 0x0e }, |
| 1797 | .klen = 8, |
| 1798 | .input = { 0xa7, 0x90, 0x79, 0x51, 0x08, 0xea, 0x3c, 0xae }, |
| 1799 | .ilen = 8, |
| 1800 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 1801 | .rlen = 8, |
| 1802 | }, { |
| 1803 | .key = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, |
| 1804 | .klen = 8, |
| 1805 | .input = { 0xe8, 0x7a, 0x24, 0x4e, 0x2c, 0xc8, 0x5e, 0x82 }, |
| 1806 | .ilen = 8, |
| 1807 | .result = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 1808 | .rlen = 8, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1809 | }, { /* Vary the keylength... */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1810 | .key = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87, |
| 1811 | 0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f }, |
| 1812 | .klen = 16, |
| 1813 | .input = { 0x93, 0x14, 0x28, 0x87, 0xee, 0x3b, 0xe1, 0x5c }, |
| 1814 | .ilen = 8, |
| 1815 | .result = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 1816 | .rlen = 8, |
| 1817 | }, { |
| 1818 | .key = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87, |
| 1819 | 0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f, |
| 1820 | 0x00, 0x11, 0x22, 0x33, 0x44 }, |
| 1821 | .klen = 21, |
| 1822 | .input = { 0xe6, 0xf5, 0x1e, 0xd7, 0x9b, 0x9d, 0xb2, 0x1f }, |
| 1823 | .ilen = 8, |
| 1824 | .result = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 1825 | .rlen = 8, |
| 1826 | }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */ |
| 1827 | .key = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87, |
| 1828 | 0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f, |
| 1829 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1830 | 0x04, 0x68, 0x91, 0x04, 0xc2, 0xfd, 0x3b, 0x2f, |
| 1831 | 0x58, 0x40, 0x23, 0x64, 0x1a, 0xba, 0x61, 0x76, |
| 1832 | 0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x0e, 0x0e, 0x0e, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1833 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, |
| 1834 | .klen = 56, |
| 1835 | .input = { 0xc0, 0x45, 0x04, 0x01, 0x2e, 0x4e, 0x1f, 0x53 }, |
| 1836 | .ilen = 8, |
| 1837 | .result = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 1838 | .rlen = 8, |
| 1839 | }, |
| 1840 | }; |
| 1841 | |
| 1842 | static struct cipher_testvec bf_cbc_enc_tv_template[] = { |
| 1843 | { /* From OpenSSL */ |
| 1844 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 1845 | 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, |
| 1846 | .klen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1847 | .iv = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1848 | .input = { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, |
| 1849 | 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, |
| 1850 | 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, |
| 1851 | 0x66, 0x6f, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00 }, |
| 1852 | .ilen = 32, |
| 1853 | .result = { 0x6b, 0x77, 0xb4, 0xd6, 0x30, 0x06, 0xde, 0xe6, |
| 1854 | 0x05, 0xb1, 0x56, 0xe2, 0x74, 0x03, 0x97, 0x93, |
| 1855 | 0x58, 0xde, 0xb9, 0xe7, 0x15, 0x46, 0x16, 0xd9, |
| 1856 | 0x59, 0xf1, 0x65, 0x2b, 0xd5, 0xff, 0x92, 0xcc }, |
| 1857 | .rlen = 32, |
| 1858 | }, |
| 1859 | }; |
| 1860 | |
| 1861 | static struct cipher_testvec bf_cbc_dec_tv_template[] = { |
| 1862 | { /* From OpenSSL */ |
| 1863 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 1864 | 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, |
| 1865 | .klen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1866 | .iv = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1867 | .input = { 0x6b, 0x77, 0xb4, 0xd6, 0x30, 0x06, 0xde, 0xe6, |
| 1868 | 0x05, 0xb1, 0x56, 0xe2, 0x74, 0x03, 0x97, 0x93, |
| 1869 | 0x58, 0xde, 0xb9, 0xe7, 0x15, 0x46, 0x16, 0xd9, |
| 1870 | 0x59, 0xf1, 0x65, 0x2b, 0xd5, 0xff, 0x92, 0xcc }, |
| 1871 | .ilen = 32, |
| 1872 | .result = { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, |
| 1873 | 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, |
| 1874 | 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, |
| 1875 | 0x66, 0x6f, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00 }, |
| 1876 | .rlen = 32, |
| 1877 | }, |
| 1878 | }; |
| 1879 | |
| 1880 | /* |
| 1881 | * Twofish test vectors. |
| 1882 | */ |
| 1883 | #define TF_ENC_TEST_VECTORS 3 |
| 1884 | #define TF_DEC_TEST_VECTORS 3 |
| 1885 | #define TF_CBC_ENC_TEST_VECTORS 4 |
| 1886 | #define TF_CBC_DEC_TEST_VECTORS 4 |
| 1887 | |
| 1888 | static struct cipher_testvec tf_enc_tv_template[] = { |
| 1889 | { |
| 1890 | .key = { [0 ... 15] = 0x00 }, |
| 1891 | .klen = 16, |
| 1892 | .input = { [0 ... 15] = 0x00 }, |
| 1893 | .ilen = 16, |
| 1894 | .result = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32, |
| 1895 | 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a }, |
| 1896 | .rlen = 16, |
| 1897 | }, { |
| 1898 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 1899 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, |
| 1900 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 }, |
| 1901 | .klen = 24, |
| 1902 | .input = { [0 ... 15] = 0x00 }, |
| 1903 | .ilen = 16, |
| 1904 | .result = { 0xcf, 0xd1, 0xd2, 0xe5, 0xa9, 0xbe, 0x9c, 0xdf, |
| 1905 | 0x50, 0x1f, 0x13, 0xb8, 0x92, 0xbd, 0x22, 0x48 }, |
| 1906 | .rlen = 16, |
| 1907 | }, { |
| 1908 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 1909 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, |
| 1910 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
| 1911 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, |
| 1912 | .klen = 32, |
| 1913 | .input = { [0 ... 15] = 0x00 }, |
| 1914 | .ilen = 16, |
| 1915 | .result = { 0x37, 0x52, 0x7b, 0xe0, 0x05, 0x23, 0x34, 0xb8, |
| 1916 | 0x9f, 0x0c, 0xfc, 0xca, 0xe8, 0x7c, 0xfa, 0x20 }, |
| 1917 | .rlen = 16, |
| 1918 | }, |
| 1919 | }; |
| 1920 | |
| 1921 | static struct cipher_testvec tf_dec_tv_template[] = { |
| 1922 | { |
| 1923 | .key = { [0 ... 15] = 0x00 }, |
| 1924 | .klen = 16, |
| 1925 | .input = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32, |
| 1926 | 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a }, |
| 1927 | .ilen = 16, |
| 1928 | .result = { [0 ... 15] = 0x00 }, |
| 1929 | .rlen = 16, |
| 1930 | }, { |
| 1931 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 1932 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, |
| 1933 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 }, |
| 1934 | .klen = 24, |
| 1935 | .input = { 0xcf, 0xd1, 0xd2, 0xe5, 0xa9, 0xbe, 0x9c, 0xdf, |
| 1936 | 0x50, 0x1f, 0x13, 0xb8, 0x92, 0xbd, 0x22, 0x48 }, |
| 1937 | .ilen = 16, |
| 1938 | .result = { [0 ... 15] = 0x00 }, |
| 1939 | .rlen = 16, |
| 1940 | }, { |
| 1941 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 1942 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, |
| 1943 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
| 1944 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, |
| 1945 | .klen = 32, |
| 1946 | .input = { 0x37, 0x52, 0x7b, 0xe0, 0x05, 0x23, 0x34, 0xb8, |
| 1947 | 0x9f, 0x0c, 0xfc, 0xca, 0xe8, 0x7c, 0xfa, 0x20 }, |
| 1948 | .ilen = 16, |
| 1949 | .result = { [0 ... 15] = 0x00 }, |
| 1950 | .rlen = 16, |
| 1951 | }, |
| 1952 | }; |
| 1953 | |
| 1954 | static struct cipher_testvec tf_cbc_enc_tv_template[] = { |
| 1955 | { /* Generated with Nettle */ |
| 1956 | .key = { [0 ... 15] = 0x00 }, |
| 1957 | .klen = 16, |
| 1958 | .iv = { [0 ... 15] = 0x00 }, |
| 1959 | .input = { [0 ... 15] = 0x00 }, |
| 1960 | .ilen = 16, |
| 1961 | .result = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32, |
| 1962 | 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a }, |
| 1963 | .rlen = 16, |
| 1964 | }, { |
| 1965 | .key = { [0 ... 15] = 0x00 }, |
| 1966 | .klen = 16, |
| 1967 | .iv = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 1968 | 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1969 | .input = { [0 ... 15] = 0x00 }, |
| 1970 | .ilen = 16, |
| 1971 | .result = { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e, |
| 1972 | 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 }, |
| 1973 | .rlen = 16, |
| 1974 | }, { |
| 1975 | .key = { [0 ... 15] = 0x00 }, |
| 1976 | .klen = 16, |
| 1977 | .iv = { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e, |
| 1978 | 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 }, |
| 1979 | .input = { [0 ... 15] = 0x00 }, |
| 1980 | .ilen = 16, |
| 1981 | .result = { 0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26, |
| 1982 | 0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 }, |
| 1983 | .rlen = 16, |
| 1984 | }, { |
| 1985 | .key = { [0 ... 15] = 0x00 }, |
| 1986 | .klen = 16, |
| 1987 | .iv = { [0 ... 15] = 0x00 }, |
| 1988 | .input = { [0 ... 47] = 0x00 }, |
| 1989 | .ilen = 48, |
| 1990 | .result = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32, |
| 1991 | 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a, |
| 1992 | 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e, |
| 1993 | 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19, |
| 1994 | 0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26, |
| 1995 | 0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 }, |
| 1996 | .rlen = 48, |
| 1997 | }, |
| 1998 | }; |
| 1999 | |
| 2000 | static struct cipher_testvec tf_cbc_dec_tv_template[] = { |
| 2001 | { /* Reverse of the first four above */ |
| 2002 | .key = { [0 ... 15] = 0x00 }, |
| 2003 | .klen = 16, |
| 2004 | .iv = { [0 ... 15] = 0x00 }, |
| 2005 | .input = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2006 | 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2007 | .ilen = 16, |
| 2008 | .result = { [0 ... 15] = 0x00 }, |
| 2009 | .rlen = 16, |
| 2010 | }, { |
| 2011 | .key = { [0 ... 15] = 0x00 }, |
| 2012 | .klen = 16, |
| 2013 | .iv = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32, |
| 2014 | 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a }, |
| 2015 | .input = { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e, |
| 2016 | 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 }, |
| 2017 | .ilen = 16, |
| 2018 | .result = { [0 ... 15] = 0x00 }, |
| 2019 | .rlen = 16, |
| 2020 | }, { |
| 2021 | .key = { [0 ... 15] = 0x00 }, |
| 2022 | .klen = 16, |
| 2023 | .iv = { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e, |
| 2024 | 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 }, |
| 2025 | .input = { 0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26, |
| 2026 | 0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 }, |
| 2027 | .ilen = 16, |
| 2028 | .result = { [0 ... 15] = 0x00 }, |
| 2029 | .rlen = 16, |
| 2030 | }, { |
| 2031 | .key = { [0 ... 15] = 0x00 }, |
| 2032 | .klen = 16, |
| 2033 | .iv = { [0 ... 15] = 0x00 }, |
| 2034 | .input = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32, |
| 2035 | 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a, |
| 2036 | 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e, |
| 2037 | 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19, |
| 2038 | 0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26, |
| 2039 | 0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 }, |
| 2040 | .ilen = 48, |
| 2041 | .result = { [0 ... 47] = 0x00 }, |
| 2042 | .rlen = 48, |
| 2043 | }, |
| 2044 | }; |
| 2045 | |
| 2046 | /* |
| 2047 | * Serpent test vectors. These are backwards because Serpent writes |
| 2048 | * octet sequences in right-to-left mode. |
| 2049 | */ |
| 2050 | #define SERPENT_ENC_TEST_VECTORS 4 |
| 2051 | #define SERPENT_DEC_TEST_VECTORS 4 |
| 2052 | |
| 2053 | #define TNEPRES_ENC_TEST_VECTORS 4 |
| 2054 | #define TNEPRES_DEC_TEST_VECTORS 4 |
| 2055 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2056 | static struct cipher_testvec serpent_enc_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2057 | { |
| 2058 | .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2059 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2060 | .ilen = 16, |
| 2061 | .result = { 0x12, 0x07, 0xfc, 0xce, 0x9b, 0xd0, 0xd6, 0x47, |
| 2062 | 0x6a, 0xe9, 0x8f, 0xbe, 0xd1, 0x43, 0xa0, 0xe2 }, |
| 2063 | .rlen = 16, |
| 2064 | }, { |
| 2065 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2066 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2067 | .klen = 16, |
| 2068 | .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2069 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2070 | .ilen = 16, |
| 2071 | .result = { 0x4c, 0x7d, 0x8a, 0x32, 0x80, 0x72, 0xa2, 0x2c, |
| 2072 | 0x82, 0x3e, 0x4a, 0x1f, 0x3a, 0xcd, 0xa1, 0x6d }, |
| 2073 | .rlen = 16, |
| 2074 | }, { |
| 2075 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2076 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 2077 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 2078 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 2079 | .klen = 32, |
| 2080 | .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2081 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2082 | .ilen = 16, |
| 2083 | .result = { 0xde, 0x26, 0x9f, 0xf8, 0x33, 0xe4, 0x32, 0xb8, |
| 2084 | 0x5b, 0x2e, 0x88, 0xd2, 0x70, 0x1c, 0xe7, 0x5c }, |
| 2085 | .rlen = 16, |
| 2086 | }, { |
| 2087 | .key = { [15] = 0x80 }, |
| 2088 | .klen = 16, |
| 2089 | .input = { [0 ... 15] = 0x00 }, |
| 2090 | .ilen = 16, |
| 2091 | .result = { 0xdd, 0xd2, 0x6b, 0x98, 0xa5, 0xff, 0xd8, 0x2c, |
| 2092 | 0x05, 0x34, 0x5a, 0x9d, 0xad, 0xbf, 0xaf, 0x49}, |
| 2093 | .rlen = 16, |
| 2094 | }, |
| 2095 | }; |
| 2096 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2097 | static struct cipher_testvec tnepres_enc_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2098 | { /* KeySize=128, PT=0, I=1 */ |
| 2099 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2100 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 2101 | .key = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2102 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 2103 | .klen = 16, |
| 2104 | .ilen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2105 | .result = { 0x49, 0xaf, 0xbf, 0xad, 0x9d, 0x5a, 0x34, 0x05, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2106 | 0x2c, 0xd8, 0xff, 0xa5, 0x98, 0x6b, 0xd2, 0xdd }, |
| 2107 | .rlen = 16, |
| 2108 | }, { /* KeySize=192, PT=0, I=1 */ |
| 2109 | .key = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2110 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2111 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 2112 | .klen = 24, |
| 2113 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2114 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 2115 | .ilen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2116 | .result = { 0xe7, 0x8e, 0x54, 0x02, 0xc7, 0x19, 0x55, 0x68, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2117 | 0xac, 0x36, 0x78, 0xf7, 0xa3, 0xf6, 0x0c, 0x66 }, |
| 2118 | .rlen = 16, |
| 2119 | }, { /* KeySize=256, PT=0, I=1 */ |
| 2120 | .key = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2121 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2122 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2123 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 2124 | .klen = 32, |
| 2125 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2126 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 2127 | .ilen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2128 | .result = { 0xab, 0xed, 0x96, 0xe7, 0x66, 0xbf, 0x28, 0xcb, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2129 | 0xc0, 0xeb, 0xd2, 0x1a, 0x82, 0xef, 0x08, 0x19 }, |
| 2130 | .rlen = 16, |
| 2131 | }, { /* KeySize=256, I=257 */ |
| 2132 | .key = { 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, |
| 2133 | 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, |
| 2134 | 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, |
| 2135 | 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }, |
| 2136 | .klen = 32, |
| 2137 | .input = { 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, |
| 2138 | 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }, |
| 2139 | .ilen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2140 | .result = { 0x5c, 0xe7, 0x1c, 0x70, 0xd2, 0x88, 0x2e, 0x5b, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2141 | 0xb8, 0x32, 0xe4, 0x33, 0xf8, 0x9f, 0x26, 0xde }, |
| 2142 | .rlen = 16, |
| 2143 | }, |
| 2144 | }; |
| 2145 | |
| 2146 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2147 | static struct cipher_testvec serpent_dec_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2148 | { |
| 2149 | .input = { 0x12, 0x07, 0xfc, 0xce, 0x9b, 0xd0, 0xd6, 0x47, |
| 2150 | 0x6a, 0xe9, 0x8f, 0xbe, 0xd1, 0x43, 0xa0, 0xe2 }, |
| 2151 | .ilen = 16, |
| 2152 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2153 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2154 | .rlen = 16, |
| 2155 | }, { |
| 2156 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2157 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2158 | .klen = 16, |
| 2159 | .input = { 0x4c, 0x7d, 0x8a, 0x32, 0x80, 0x72, 0xa2, 0x2c, |
| 2160 | 0x82, 0x3e, 0x4a, 0x1f, 0x3a, 0xcd, 0xa1, 0x6d }, |
| 2161 | .ilen = 16, |
| 2162 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2163 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2164 | .rlen = 16, |
| 2165 | }, { |
| 2166 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2167 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 2168 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 2169 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 2170 | .klen = 32, |
| 2171 | .input = { 0xde, 0x26, 0x9f, 0xf8, 0x33, 0xe4, 0x32, 0xb8, |
| 2172 | 0x5b, 0x2e, 0x88, 0xd2, 0x70, 0x1c, 0xe7, 0x5c }, |
| 2173 | .ilen = 16, |
| 2174 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2175 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2176 | .rlen = 16, |
| 2177 | }, { |
| 2178 | .key = { [15] = 0x80 }, |
| 2179 | .klen = 16, |
| 2180 | .input = { 0xdd, 0xd2, 0x6b, 0x98, 0xa5, 0xff, 0xd8, 0x2c, |
| 2181 | 0x05, 0x34, 0x5a, 0x9d, 0xad, 0xbf, 0xaf, 0x49}, |
| 2182 | .ilen = 16, |
| 2183 | .result = { [0 ... 15] = 0x00 }, |
| 2184 | .rlen = 16, |
| 2185 | }, |
| 2186 | }; |
| 2187 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2188 | static struct cipher_testvec tnepres_dec_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2189 | { |
| 2190 | .input = { 0x41, 0xcc, 0x6b, 0x31, 0x59, 0x31, 0x45, 0x97, |
| 2191 | 0x6d, 0x6f, 0xbb, 0x38, 0x4b, 0x37, 0x21, 0x28 }, |
| 2192 | .ilen = 16, |
| 2193 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2194 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2195 | .rlen = 16, |
| 2196 | }, { |
| 2197 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2198 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2199 | .klen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2200 | .input = { 0xea, 0xf4, 0xd7, 0xfc, 0xd8, 0x01, 0x34, 0x47, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2201 | 0x81, 0x45, 0x0b, 0xfa, 0x0c, 0xd6, 0xad, 0x6e }, |
| 2202 | .ilen = 16, |
| 2203 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2204 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2205 | .rlen = 16, |
| 2206 | }, { |
| 2207 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2208 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 2209 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 2210 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 2211 | .klen = 32, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2212 | .input = { 0x64, 0xa9, 0x1a, 0x37, 0xed, 0x9f, 0xe7, 0x49, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2213 | 0xa8, 0x4e, 0x76, 0xd6, 0xf5, 0x0d, 0x78, 0xee }, |
| 2214 | .ilen = 16, |
| 2215 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2216 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2217 | .rlen = 16, |
| 2218 | }, { /* KeySize=128, I=121 */ |
| 2219 | .key = { [15] = 0x80 }, |
| 2220 | .klen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2221 | .input = { 0x3d, 0xda, 0xbf, 0xc0, 0x06, 0xda, 0xab, 0x06, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2222 | 0x46, 0x2a, 0xf4, 0xef, 0x81, 0x54, 0x4e, 0x26 }, |
| 2223 | .ilen = 16, |
| 2224 | .result = { [0 ... 15] = 0x00 }, |
| 2225 | .rlen = 16, |
| 2226 | }, |
| 2227 | }; |
| 2228 | |
| 2229 | |
| 2230 | /* Cast6 test vectors from RFC 2612 */ |
| 2231 | #define CAST6_ENC_TEST_VECTORS 3 |
| 2232 | #define CAST6_DEC_TEST_VECTORS 3 |
| 2233 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2234 | static struct cipher_testvec cast6_enc_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2235 | { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2236 | .key = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2237 | 0x0a, 0xf7, 0x56, 0x47, 0xf2, 0x9f, 0x61, 0x5d }, |
| 2238 | .klen = 16, |
| 2239 | .input = { [0 ... 15] = 0x00 }, |
| 2240 | .ilen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2241 | .result = { 0xc8, 0x42, 0xa0, 0x89, 0x72, 0xb4, 0x3d, 0x20, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2242 | 0x83, 0x6c, 0x91, 0xd1, 0xb7, 0x53, 0x0f, 0x6b }, |
| 2243 | .rlen = 16, |
| 2244 | }, { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2245 | .key = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, |
| 2246 | 0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2247 | 0xba, 0xc7, 0x7a, 0x77, 0x17, 0x94, 0x28, 0x63 }, |
| 2248 | .klen = 24, |
| 2249 | .input = { [0 ... 15] = 0x00 }, |
| 2250 | .ilen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2251 | .result = { 0x1b, 0x38, 0x6c, 0x02, 0x10, 0xdc, 0xad, 0xcb, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2252 | 0xdd, 0x0e, 0x41, 0xaa, 0x08, 0xa7, 0xa7, 0xe8 }, |
| 2253 | .rlen = 16, |
| 2254 | }, { |
| 2255 | .key = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, |
| 2256 | 0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98, |
| 2257 | 0x8d, 0x7c, 0x47, 0xce, 0x26, 0x49, 0x08, 0x46, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2258 | 0x1c, 0xc1, 0xb5, 0x13, 0x7a, 0xe6, 0xb6, 0x04 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2259 | .klen = 32, |
| 2260 | .input = { [0 ... 15] = 0x00 }, |
| 2261 | .ilen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2262 | .result = { 0x4f, 0x6a, 0x20, 0x38, 0x28, 0x68, 0x97, 0xb9, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2263 | 0xc9, 0x87, 0x01, 0x36, 0x55, 0x33, 0x17, 0xfa }, |
| 2264 | .rlen = 16, |
| 2265 | }, |
| 2266 | }; |
| 2267 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2268 | static struct cipher_testvec cast6_dec_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2269 | { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2270 | .key = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2271 | 0x0a, 0xf7, 0x56, 0x47, 0xf2, 0x9f, 0x61, 0x5d }, |
| 2272 | .klen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2273 | .input = { 0xc8, 0x42, 0xa0, 0x89, 0x72, 0xb4, 0x3d, 0x20, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2274 | 0x83, 0x6c, 0x91, 0xd1, 0xb7, 0x53, 0x0f, 0x6b }, |
| 2275 | .ilen = 16, |
| 2276 | .result = { [0 ... 15] = 0x00 }, |
| 2277 | .rlen = 16, |
| 2278 | }, { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2279 | .key = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, |
| 2280 | 0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2281 | 0xba, 0xc7, 0x7a, 0x77, 0x17, 0x94, 0x28, 0x63 }, |
| 2282 | .klen = 24, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2283 | .input = { 0x1b, 0x38, 0x6c, 0x02, 0x10, 0xdc, 0xad, 0xcb, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2284 | 0xdd, 0x0e, 0x41, 0xaa, 0x08, 0xa7, 0xa7, 0xe8 }, |
| 2285 | .ilen = 16, |
| 2286 | .result = { [0 ... 15] = 0x00 }, |
| 2287 | .rlen = 16, |
| 2288 | }, { |
| 2289 | .key = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, |
| 2290 | 0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98, |
| 2291 | 0x8d, 0x7c, 0x47, 0xce, 0x26, 0x49, 0x08, 0x46, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2292 | 0x1c, 0xc1, 0xb5, 0x13, 0x7a, 0xe6, 0xb6, 0x04 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2293 | .klen = 32, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2294 | .input = { 0x4f, 0x6a, 0x20, 0x38, 0x28, 0x68, 0x97, 0xb9, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2295 | 0xc9, 0x87, 0x01, 0x36, 0x55, 0x33, 0x17, 0xfa }, |
| 2296 | .ilen = 16, |
| 2297 | .result = { [0 ... 15] = 0x00 }, |
| 2298 | .rlen = 16, |
| 2299 | }, |
| 2300 | }; |
| 2301 | |
| 2302 | |
| 2303 | /* |
| 2304 | * AES test vectors. |
| 2305 | */ |
| 2306 | #define AES_ENC_TEST_VECTORS 3 |
| 2307 | #define AES_DEC_TEST_VECTORS 3 |
Jan Glauber | 9617d6e | 2007-11-30 15:57:05 +1100 | [diff] [blame^] | 2308 | #define AES_CBC_ENC_TEST_VECTORS 4 |
| 2309 | #define AES_CBC_DEC_TEST_VECTORS 4 |
Rik Snel | f3d1044 | 2006-11-29 19:01:41 +1100 | [diff] [blame] | 2310 | #define AES_LRW_ENC_TEST_VECTORS 8 |
| 2311 | #define AES_LRW_DEC_TEST_VECTORS 8 |
Rik Snel | f19f511 | 2007-09-19 20:23:13 +0800 | [diff] [blame] | 2312 | #define AES_XTS_ENC_TEST_VECTORS 4 |
| 2313 | #define AES_XTS_DEC_TEST_VECTORS 4 |
Tan Swee Heng | a773edb | 2007-11-30 00:36:07 +1100 | [diff] [blame] | 2314 | #define AES_CTR_ENC_TEST_VECTORS 7 |
Joy Latten | 23e353c | 2007-10-23 08:50:32 +0800 | [diff] [blame] | 2315 | #define AES_CTR_DEC_TEST_VECTORS 6 |
Mikko Herranen | 28db8e3 | 2007-11-26 22:24:11 +0800 | [diff] [blame] | 2316 | #define AES_GCM_ENC_TEST_VECTORS 9 |
| 2317 | #define AES_GCM_DEC_TEST_VECTORS 8 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2318 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2319 | static struct cipher_testvec aes_enc_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2320 | { /* From FIPS-197 */ |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2321 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2322 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2323 | .klen = 16, |
| 2324 | .input = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
| 2325 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, |
| 2326 | .ilen = 16, |
| 2327 | .result = { 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30, |
| 2328 | 0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a }, |
| 2329 | .rlen = 16, |
| 2330 | }, { |
| 2331 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2332 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 2333 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 }, |
| 2334 | .klen = 24, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2335 | .input = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2336 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, |
| 2337 | .ilen = 16, |
| 2338 | .result = { 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0, |
| 2339 | 0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 }, |
| 2340 | .rlen = 16, |
| 2341 | }, { |
| 2342 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2343 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 2344 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 2345 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 2346 | .klen = 32, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2347 | .input = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2348 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, |
| 2349 | .ilen = 16, |
| 2350 | .result = { 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf, |
| 2351 | 0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 }, |
| 2352 | .rlen = 16, |
| 2353 | }, |
| 2354 | }; |
| 2355 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2356 | static struct cipher_testvec aes_dec_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2357 | { /* From FIPS-197 */ |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2358 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2359 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2360 | .klen = 16, |
| 2361 | .input = { 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30, |
| 2362 | 0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a }, |
| 2363 | .ilen = 16, |
| 2364 | .result = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
| 2365 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, |
| 2366 | .rlen = 16, |
| 2367 | }, { |
| 2368 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2369 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 2370 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 }, |
| 2371 | .klen = 24, |
| 2372 | .input = { 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0, |
| 2373 | 0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 }, |
| 2374 | .ilen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2375 | .result = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
| 2376 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2377 | .rlen = 16, |
| 2378 | }, { |
| 2379 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2380 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 2381 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 2382 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 2383 | .klen = 32, |
| 2384 | .input = { 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf, |
| 2385 | 0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 }, |
| 2386 | .ilen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 2387 | .result = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2388 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, |
| 2389 | .rlen = 16, |
| 2390 | }, |
| 2391 | }; |
| 2392 | |
Jan Glauber | 05f29fc | 2006-01-06 00:19:19 -0800 | [diff] [blame] | 2393 | static struct cipher_testvec aes_cbc_enc_tv_template[] = { |
| 2394 | { /* From RFC 3602 */ |
| 2395 | .key = { 0x06, 0xa9, 0x21, 0x40, 0x36, 0xb8, 0xa1, 0x5b, |
| 2396 | 0x51, 0x2e, 0x03, 0xd5, 0x34, 0x12, 0x00, 0x06 }, |
| 2397 | .klen = 16, |
| 2398 | .iv = { 0x3d, 0xaf, 0xba, 0x42, 0x9d, 0x9e, 0xb4, 0x30, |
| 2399 | 0xb4, 0x22, 0xda, 0x80, 0x2c, 0x9f, 0xac, 0x41 }, |
| 2400 | .input = { "Single block msg" }, |
| 2401 | .ilen = 16, |
| 2402 | .result = { 0xe3, 0x53, 0x77, 0x9c, 0x10, 0x79, 0xae, 0xb8, |
| 2403 | 0x27, 0x08, 0x94, 0x2d, 0xbe, 0x77, 0x18, 0x1a }, |
| 2404 | .rlen = 16, |
| 2405 | }, { |
| 2406 | .key = { 0xc2, 0x86, 0x69, 0x6d, 0x88, 0x7c, 0x9a, 0xa0, |
| 2407 | 0x61, 0x1b, 0xbb, 0x3e, 0x20, 0x25, 0xa4, 0x5a }, |
| 2408 | .klen = 16, |
| 2409 | .iv = { 0x56, 0x2e, 0x17, 0x99, 0x6d, 0x09, 0x3d, 0x28, |
| 2410 | 0xdd, 0xb3, 0xba, 0x69, 0x5a, 0x2e, 0x6f, 0x58 }, |
| 2411 | .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2412 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 2413 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 2414 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 2415 | .ilen = 32, |
| 2416 | .result = { 0xd2, 0x96, 0xcd, 0x94, 0xc2, 0xcc, 0xcf, 0x8a, |
| 2417 | 0x3a, 0x86, 0x30, 0x28, 0xb5, 0xe1, 0xdc, 0x0a, |
| 2418 | 0x75, 0x86, 0x60, 0x2d, 0x25, 0x3c, 0xff, 0xf9, |
| 2419 | 0x1b, 0x82, 0x66, 0xbe, 0xa6, 0xd6, 0x1a, 0xb1 }, |
| 2420 | .rlen = 32, |
Jan Glauber | 9617d6e | 2007-11-30 15:57:05 +1100 | [diff] [blame^] | 2421 | }, { /* From NIST SP800-38A */ |
| 2422 | .key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, |
| 2423 | 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5, |
| 2424 | 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b }, |
| 2425 | .klen = 24, |
| 2426 | .iv = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2427 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2428 | .input = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, |
| 2429 | 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, |
| 2430 | 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, |
| 2431 | 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, |
| 2432 | 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, |
| 2433 | 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, |
| 2434 | 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, |
| 2435 | 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 }, |
| 2436 | .ilen = 64, |
| 2437 | .result = { 0x4f, 0x02, 0x1d, 0xb2, 0x43, 0xbc, 0x63, 0x3d, |
| 2438 | 0x71, 0x78, 0x18, 0x3a, 0x9f, 0xa0, 0x71, 0xe8, |
| 2439 | 0xb4, 0xd9, 0xad, 0xa9, 0xad, 0x7d, 0xed, 0xf4, |
| 2440 | 0xe5, 0xe7, 0x38, 0x76, 0x3f, 0x69, 0x14, 0x5a, |
| 2441 | 0x57, 0x1b, 0x24, 0x20, 0x12, 0xfb, 0x7a, 0xe0, |
| 2442 | 0x7f, 0xa9, 0xba, 0xac, 0x3d, 0xf1, 0x02, 0xe0, |
| 2443 | 0x08, 0xb0, 0xe2, 0x79, 0x88, 0x59, 0x88, 0x81, |
| 2444 | 0xd9, 0x20, 0xa9, 0xe6, 0x4f, 0x56, 0x15, 0xcd }, |
| 2445 | .rlen = 64, |
| 2446 | }, { |
| 2447 | .key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, |
| 2448 | 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, |
| 2449 | 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, |
| 2450 | 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4 }, |
| 2451 | .klen = 32, |
| 2452 | .iv = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2453 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2454 | .input = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, |
| 2455 | 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, |
| 2456 | 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, |
| 2457 | 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, |
| 2458 | 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, |
| 2459 | 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, |
| 2460 | 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, |
| 2461 | 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 }, |
| 2462 | .ilen = 64, |
| 2463 | .result = { 0xf5, 0x8c, 0x4c, 0x04, 0xd6, 0xe5, 0xf1, 0xba, |
| 2464 | 0x77, 0x9e, 0xab, 0xfb, 0x5f, 0x7b, 0xfb, 0xd6, |
| 2465 | 0x9c, 0xfc, 0x4e, 0x96, 0x7e, 0xdb, 0x80, 0x8d, |
| 2466 | 0x67, 0x9f, 0x77, 0x7b, 0xc6, 0x70, 0x2c, 0x7d, |
| 2467 | 0x39, 0xf2, 0x33, 0x69, 0xa9, 0xd9, 0xba, 0xcf, |
| 2468 | 0xa5, 0x30, 0xe2, 0x63, 0x04, 0x23, 0x14, 0x61, |
| 2469 | 0xb2, 0xeb, 0x05, 0xe2, 0xc3, 0x9b, 0xe9, 0xfc, |
| 2470 | 0xda, 0x6c, 0x19, 0x07, 0x8c, 0x6a, 0x9d, 0x1b }, |
| 2471 | .rlen = 64, |
Jan Glauber | 05f29fc | 2006-01-06 00:19:19 -0800 | [diff] [blame] | 2472 | }, |
| 2473 | }; |
| 2474 | |
| 2475 | static struct cipher_testvec aes_cbc_dec_tv_template[] = { |
| 2476 | { /* From RFC 3602 */ |
| 2477 | .key = { 0x06, 0xa9, 0x21, 0x40, 0x36, 0xb8, 0xa1, 0x5b, |
| 2478 | 0x51, 0x2e, 0x03, 0xd5, 0x34, 0x12, 0x00, 0x06 }, |
| 2479 | .klen = 16, |
| 2480 | .iv = { 0x3d, 0xaf, 0xba, 0x42, 0x9d, 0x9e, 0xb4, 0x30, |
| 2481 | 0xb4, 0x22, 0xda, 0x80, 0x2c, 0x9f, 0xac, 0x41 }, |
| 2482 | .input = { 0xe3, 0x53, 0x77, 0x9c, 0x10, 0x79, 0xae, 0xb8, |
| 2483 | 0x27, 0x08, 0x94, 0x2d, 0xbe, 0x77, 0x18, 0x1a }, |
| 2484 | .ilen = 16, |
| 2485 | .result = { "Single block msg" }, |
| 2486 | .rlen = 16, |
| 2487 | }, { |
| 2488 | .key = { 0xc2, 0x86, 0x69, 0x6d, 0x88, 0x7c, 0x9a, 0xa0, |
| 2489 | 0x61, 0x1b, 0xbb, 0x3e, 0x20, 0x25, 0xa4, 0x5a }, |
| 2490 | .klen = 16, |
| 2491 | .iv = { 0x56, 0x2e, 0x17, 0x99, 0x6d, 0x09, 0x3d, 0x28, |
| 2492 | 0xdd, 0xb3, 0xba, 0x69, 0x5a, 0x2e, 0x6f, 0x58 }, |
| 2493 | .input = { 0xd2, 0x96, 0xcd, 0x94, 0xc2, 0xcc, 0xcf, 0x8a, |
| 2494 | 0x3a, 0x86, 0x30, 0x28, 0xb5, 0xe1, 0xdc, 0x0a, |
| 2495 | 0x75, 0x86, 0x60, 0x2d, 0x25, 0x3c, 0xff, 0xf9, |
| 2496 | 0x1b, 0x82, 0x66, 0xbe, 0xa6, 0xd6, 0x1a, 0xb1 }, |
| 2497 | .ilen = 32, |
| 2498 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2499 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 2500 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 2501 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 2502 | .rlen = 32, |
Jan Glauber | 9617d6e | 2007-11-30 15:57:05 +1100 | [diff] [blame^] | 2503 | }, { /* From NIST SP800-38A */ |
| 2504 | .key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, |
| 2505 | 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5, |
| 2506 | 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b }, |
| 2507 | .klen = 24, |
| 2508 | .iv = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2509 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2510 | .input = { 0x4f, 0x02, 0x1d, 0xb2, 0x43, 0xbc, 0x63, 0x3d, |
| 2511 | 0x71, 0x78, 0x18, 0x3a, 0x9f, 0xa0, 0x71, 0xe8, |
| 2512 | 0xb4, 0xd9, 0xad, 0xa9, 0xad, 0x7d, 0xed, 0xf4, |
| 2513 | 0xe5, 0xe7, 0x38, 0x76, 0x3f, 0x69, 0x14, 0x5a, |
| 2514 | 0x57, 0x1b, 0x24, 0x20, 0x12, 0xfb, 0x7a, 0xe0, |
| 2515 | 0x7f, 0xa9, 0xba, 0xac, 0x3d, 0xf1, 0x02, 0xe0, |
| 2516 | 0x08, 0xb0, 0xe2, 0x79, 0x88, 0x59, 0x88, 0x81, |
| 2517 | 0xd9, 0x20, 0xa9, 0xe6, 0x4f, 0x56, 0x15, 0xcd }, |
| 2518 | .ilen = 64, |
| 2519 | .result = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, |
| 2520 | 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, |
| 2521 | 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, |
| 2522 | 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, |
| 2523 | 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, |
| 2524 | 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, |
| 2525 | 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, |
| 2526 | 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 }, |
| 2527 | .rlen = 64, |
| 2528 | }, { |
| 2529 | .key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, |
| 2530 | 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, |
| 2531 | 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, |
| 2532 | 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4 }, |
| 2533 | .klen = 32, |
| 2534 | .iv = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 2535 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 2536 | .input = { 0xf5, 0x8c, 0x4c, 0x04, 0xd6, 0xe5, 0xf1, 0xba, |
| 2537 | 0x77, 0x9e, 0xab, 0xfb, 0x5f, 0x7b, 0xfb, 0xd6, |
| 2538 | 0x9c, 0xfc, 0x4e, 0x96, 0x7e, 0xdb, 0x80, 0x8d, |
| 2539 | 0x67, 0x9f, 0x77, 0x7b, 0xc6, 0x70, 0x2c, 0x7d, |
| 2540 | 0x39, 0xf2, 0x33, 0x69, 0xa9, 0xd9, 0xba, 0xcf, |
| 2541 | 0xa5, 0x30, 0xe2, 0x63, 0x04, 0x23, 0x14, 0x61, |
| 2542 | 0xb2, 0xeb, 0x05, 0xe2, 0xc3, 0x9b, 0xe9, 0xfc, |
| 2543 | 0xda, 0x6c, 0x19, 0x07, 0x8c, 0x6a, 0x9d, 0x1b }, |
| 2544 | .ilen = 64, |
| 2545 | .result = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, |
| 2546 | 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, |
| 2547 | 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, |
| 2548 | 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, |
| 2549 | 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, |
| 2550 | 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, |
| 2551 | 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, |
| 2552 | 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 }, |
| 2553 | .rlen = 64, |
Jan Glauber | 05f29fc | 2006-01-06 00:19:19 -0800 | [diff] [blame] | 2554 | }, |
| 2555 | }; |
| 2556 | |
Rik Snel | f3d1044 | 2006-11-29 19:01:41 +1100 | [diff] [blame] | 2557 | static struct cipher_testvec aes_lrw_enc_tv_template[] = { |
| 2558 | /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */ |
| 2559 | { /* LRW-32-AES 1 */ |
| 2560 | .key = { 0x45, 0x62, 0xac, 0x25, 0xf8, 0x28, 0x17, 0x6d, |
| 2561 | 0x4c, 0x26, 0x84, 0x14, 0xb5, 0x68, 0x01, 0x85, |
| 2562 | 0x25, 0x8e, 0x2a, 0x05, 0xe7, 0x3e, 0x9d, 0x03, |
| 2563 | 0xee, 0x5a, 0x83, 0x0c, 0xcc, 0x09, 0x4c, 0x87 }, |
| 2564 | .klen = 32, |
| 2565 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2566 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, |
| 2567 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2568 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2569 | .ilen = 16, |
| 2570 | .result = { 0xf1, 0xb2, 0x73, 0xcd, 0x65, 0xa3, 0xdf, 0x5f, |
| 2571 | 0xe9, 0x5d, 0x48, 0x92, 0x54, 0x63, 0x4e, 0xb8 }, |
| 2572 | .rlen = 16, |
| 2573 | }, { /* LRW-32-AES 2 */ |
| 2574 | .key = { 0x59, 0x70, 0x47, 0x14, 0xf5, 0x57, 0x47, 0x8c, |
| 2575 | 0xd7, 0x79, 0xe8, 0x0f, 0x54, 0x88, 0x79, 0x44, |
| 2576 | 0x0d, 0x48, 0xf0, 0xb7, 0xb1, 0x5a, 0x53, 0xea, |
| 2577 | 0x1c, 0xaa, 0x6b, 0x29, 0xc2, 0xca, 0xfb, 0xaf |
| 2578 | }, |
| 2579 | .klen = 32, |
| 2580 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2581 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }, |
| 2582 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2583 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2584 | .ilen = 16, |
| 2585 | .result = { 0x00, 0xc8, 0x2b, 0xae, 0x95, 0xbb, 0xcd, 0xe5, |
| 2586 | 0x27, 0x4f, 0x07, 0x69, 0xb2, 0x60, 0xe1, 0x36 }, |
| 2587 | .rlen = 16, |
| 2588 | }, { /* LRW-32-AES 3 */ |
| 2589 | .key = { 0xd8, 0x2a, 0x91, 0x34, 0xb2, 0x6a, 0x56, 0x50, |
| 2590 | 0x30, 0xfe, 0x69, 0xe2, 0x37, 0x7f, 0x98, 0x47, |
| 2591 | 0xcd, 0xf9, 0x0b, 0x16, 0x0c, 0x64, 0x8f, 0xb6, |
| 2592 | 0xb0, 0x0d, 0x0d, 0x1b, 0xae, 0x85, 0x87, 0x1f }, |
| 2593 | .klen = 32, |
| 2594 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2595 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, |
| 2596 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2597 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2598 | .ilen = 16, |
| 2599 | .result = { 0x76, 0x32, 0x21, 0x83, 0xed, 0x8f, 0xf1, 0x82, |
| 2600 | 0xf9, 0x59, 0x62, 0x03, 0x69, 0x0e, 0x5e, 0x01 }, |
| 2601 | .rlen = 16, |
| 2602 | }, { /* LRW-32-AES 4 */ |
| 2603 | .key = { 0x0f, 0x6a, 0xef, 0xf8, 0xd3, 0xd2, 0xbb, 0x15, |
| 2604 | 0x25, 0x83, 0xf7, 0x3c, 0x1f, 0x01, 0x28, 0x74, |
| 2605 | 0xca, 0xc6, 0xbc, 0x35, 0x4d, 0x4a, 0x65, 0x54, |
| 2606 | 0x90, 0xae, 0x61, 0xcf, 0x7b, 0xae, 0xbd, 0xcc, |
| 2607 | 0xad, 0xe4, 0x94, 0xc5, 0x4a, 0x29, 0xae, 0x70 }, |
| 2608 | .klen = 40, |
| 2609 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2610 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, |
| 2611 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2612 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2613 | .ilen = 16, |
| 2614 | .result = { 0x9c, 0x0f, 0x15, 0x2f, 0x55, 0xa2, 0xd8, 0xf0, |
| 2615 | 0xd6, 0x7b, 0x8f, 0x9e, 0x28, 0x22, 0xbc, 0x41 }, |
| 2616 | .rlen = 16, |
| 2617 | }, { /* LRW-32-AES 5 */ |
| 2618 | .key = { 0x8a, 0xd4, 0xee, 0x10, 0x2f, 0xbd, 0x81, 0xff, |
| 2619 | 0xf8, 0x86, 0xce, 0xac, 0x93, 0xc5, 0xad, 0xc6, |
| 2620 | 0xa0, 0x19, 0x07, 0xc0, 0x9d, 0xf7, 0xbb, 0xdd, |
| 2621 | 0x52, 0x13, 0xb2, 0xb7, 0xf0, 0xff, 0x11, 0xd8, |
| 2622 | 0xd6, 0x08, 0xd0, 0xcd, 0x2e, 0xb1, 0x17, 0x6f }, |
| 2623 | .klen = 40, |
| 2624 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2625 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, |
| 2626 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2627 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2628 | .ilen = 16, |
| 2629 | .result = { 0xd4, 0x27, 0x6a, 0x7f, 0x14, 0x91, 0x3d, 0x65, |
| 2630 | 0xc8, 0x60, 0x48, 0x02, 0x87, 0xe3, 0x34, 0x06 }, |
| 2631 | .rlen = 16, |
| 2632 | }, { /* LRW-32-AES 6 */ |
| 2633 | .key = { 0xf8, 0xd4, 0x76, 0xff, 0xd6, 0x46, 0xee, 0x6c, |
| 2634 | 0x23, 0x84, 0xcb, 0x1c, 0x77, 0xd6, 0x19, 0x5d, |
| 2635 | 0xfe, 0xf1, 0xa9, 0xf3, 0x7b, 0xbc, 0x8d, 0x21, |
| 2636 | 0xa7, 0x9c, 0x21, 0xf8, 0xcb, 0x90, 0x02, 0x89, |
| 2637 | 0xa8, 0x45, 0x34, 0x8e, 0xc8, 0xc5, 0xb5, 0xf1, |
| 2638 | 0x26, 0xf5, 0x0e, 0x76, 0xfe, 0xfd, 0x1b, 0x1e }, |
| 2639 | .klen = 48, |
| 2640 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2641 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, |
| 2642 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2643 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2644 | .ilen = 16, |
| 2645 | .result = { 0xbd, 0x06, 0xb8, 0xe1, 0xdb, 0x98, 0x89, 0x9e, |
| 2646 | 0xc4, 0x98, 0xe4, 0x91, 0xcf, 0x1c, 0x70, 0x2b }, |
| 2647 | .rlen = 16, |
| 2648 | }, { /* LRW-32-AES 7 */ |
| 2649 | .key = { 0xfb, 0x76, 0x15, 0xb2, 0x3d, 0x80, 0x89, 0x1d, |
| 2650 | 0xd4, 0x70, 0x98, 0x0b, 0xc7, 0x95, 0x84, 0xc8, |
| 2651 | 0xb2, 0xfb, 0x64, 0xce, 0x60, 0x97, 0x87, 0x8d, |
| 2652 | 0x17, 0xfc, 0xe4, 0x5a, 0x49, 0xe8, 0x30, 0xb7, |
| 2653 | 0x6e, 0x78, 0x17, 0xe7, 0x2d, 0x5e, 0x12, 0xd4, |
| 2654 | 0x60, 0x64, 0x04, 0x7a, 0xf1, 0x2f, 0x9e, 0x0c }, |
| 2655 | .klen = 48, |
| 2656 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2657 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, |
| 2658 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2659 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2660 | .ilen = 16, |
| 2661 | .result = { 0x5b, 0x90, 0x8e, 0xc1, 0xab, 0xdd, 0x67, 0x5f, |
| 2662 | 0x3d, 0x69, 0x8a, 0x95, 0x53, 0xc8, 0x9c, 0xe5 }, |
| 2663 | .rlen = 16, |
| 2664 | }, { |
| 2665 | /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */ |
| 2666 | .key = { 0xf8, 0xd4, 0x76, 0xff, 0xd6, 0x46, 0xee, 0x6c, |
| 2667 | 0x23, 0x84, 0xcb, 0x1c, 0x77, 0xd6, 0x19, 0x5d, |
| 2668 | 0xfe, 0xf1, 0xa9, 0xf3, 0x7b, 0xbc, 0x8d, 0x21, |
| 2669 | 0xa7, 0x9c, 0x21, 0xf8, 0xcb, 0x90, 0x02, 0x89, |
| 2670 | 0xa8, 0x45, 0x34, 0x8e, 0xc8, 0xc5, 0xb5, 0xf1, |
| 2671 | 0x26, 0xf5, 0x0e, 0x76, 0xfe, 0xfd, 0x1b, 0x1e }, |
| 2672 | .klen = 48, |
| 2673 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2674 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, |
| 2675 | .input = { 0x05, 0x11, 0xb7, 0x18, 0xab, 0xc6, 0x2d, 0xac, |
| 2676 | 0x70, 0x5d, 0xf6, 0x22, 0x94, 0xcd, 0xe5, 0x6c, |
| 2677 | 0x17, 0x6b, 0xf6, 0x1c, 0xf0, 0xf3, 0x6e, 0xf8, |
| 2678 | 0x50, 0x38, 0x1f, 0x71, 0x49, 0xb6, 0x57, 0xd6, |
| 2679 | 0x8f, 0xcb, 0x8d, 0x6b, 0xe3, 0xa6, 0x29, 0x90, |
| 2680 | 0xfe, 0x2a, 0x62, 0x82, 0xae, 0x6d, 0x8b, 0xf6, |
| 2681 | 0xad, 0x1e, 0x9e, 0x20, 0x5f, 0x38, 0xbe, 0x04, |
| 2682 | 0xda, 0x10, 0x8e, 0xed, 0xa2, 0xa4, 0x87, 0xab, |
| 2683 | 0xda, 0x6b, 0xb4, 0x0c, 0x75, 0xba, 0xd3, 0x7c, |
| 2684 | 0xc9, 0xac, 0x42, 0x31, 0x95, 0x7c, 0xc9, 0x04, |
| 2685 | 0xeb, 0xd5, 0x6e, 0x32, 0x69, 0x8a, 0xdb, 0xa6, |
| 2686 | 0x15, 0xd7, 0x3f, 0x4f, 0x2f, 0x66, 0x69, 0x03, |
| 2687 | 0x9c, 0x1f, 0x54, 0x0f, 0xde, 0x1f, 0xf3, 0x65, |
| 2688 | 0x4c, 0x96, 0x12, 0xed, 0x7c, 0x92, 0x03, 0x01, |
| 2689 | 0x6f, 0xbc, 0x35, 0x93, 0xac, 0xf1, 0x27, 0xf1, |
| 2690 | 0xb4, 0x96, 0x82, 0x5a, 0x5f, 0xb0, 0xa0, 0x50, |
| 2691 | 0x89, 0xa4, 0x8e, 0x66, 0x44, 0x85, 0xcc, 0xfd, |
| 2692 | 0x33, 0x14, 0x70, 0xe3, 0x96, 0xb2, 0xc3, 0xd3, |
| 2693 | 0xbb, 0x54, 0x5a, 0x1a, 0xf9, 0x74, 0xa2, 0xc5, |
| 2694 | 0x2d, 0x64, 0x75, 0xdd, 0xb4, 0x54, 0xe6, 0x74, |
| 2695 | 0x8c, 0xd3, 0x9d, 0x9e, 0x86, 0xab, 0x51, 0x53, |
| 2696 | 0xb7, 0x93, 0x3e, 0x6f, 0xd0, 0x4e, 0x2c, 0x40, |
| 2697 | 0xf6, 0xa8, 0x2e, 0x3e, 0x9d, 0xf4, 0x66, 0xa5, |
| 2698 | 0x76, 0x12, 0x73, 0x44, 0x1a, 0x56, 0xd7, 0x72, |
| 2699 | 0x88, 0xcd, 0x21, 0x8c, 0x4c, 0x0f, 0xfe, 0xda, |
| 2700 | 0x95, 0xe0, 0x3a, 0xa6, 0xa5, 0x84, 0x46, 0xcd, |
| 2701 | 0xd5, 0x3e, 0x9d, 0x3a, 0xe2, 0x67, 0xe6, 0x60, |
| 2702 | 0x1a, 0xe2, 0x70, 0x85, 0x58, 0xc2, 0x1b, 0x09, |
| 2703 | 0xe1, 0xd7, 0x2c, 0xca, 0xad, 0xa8, 0x8f, 0xf9, |
| 2704 | 0xac, 0xb3, 0x0e, 0xdb, 0xca, 0x2e, 0xe2, 0xb8, |
| 2705 | 0x51, 0x71, 0xd9, 0x3c, 0x6c, 0xf1, 0x56, 0xf8, |
| 2706 | 0xea, 0x9c, 0xf1, 0xfb, 0x0c, 0xe6, 0xb7, 0x10, |
| 2707 | 0x1c, 0xf8, 0xa9, 0x7c, 0xe8, 0x53, 0x35, 0xc1, |
| 2708 | 0x90, 0x3e, 0x76, 0x4a, 0x74, 0xa4, 0x21, 0x2c, |
| 2709 | 0xf6, 0x2c, 0x4e, 0x0f, 0x94, 0x3a, 0x88, 0x2e, |
| 2710 | 0x41, 0x09, 0x6a, 0x33, 0x7d, 0xf6, 0xdd, 0x3f, |
| 2711 | 0x8d, 0x23, 0x31, 0x74, 0x84, 0xeb, 0x88, 0x6e, |
| 2712 | 0xcc, 0xb9, 0xbc, 0x22, 0x83, 0x19, 0x07, 0x22, |
| 2713 | 0xa5, 0x2d, 0xdf, 0xa5, 0xf3, 0x80, 0x85, 0x78, |
| 2714 | 0x84, 0x39, 0x6a, 0x6d, 0x6a, 0x99, 0x4f, 0xa5, |
| 2715 | 0x15, 0xfe, 0x46, 0xb0, 0xe4, 0x6c, 0xa5, 0x41, |
| 2716 | 0x3c, 0xce, 0x8f, 0x42, 0x60, 0x71, 0xa7, 0x75, |
| 2717 | 0x08, 0x40, 0x65, 0x8a, 0x82, 0xbf, 0xf5, 0x43, |
| 2718 | 0x71, 0x96, 0xa9, 0x4d, 0x44, 0x8a, 0x20, 0xbe, |
| 2719 | 0xfa, 0x4d, 0xbb, 0xc0, 0x7d, 0x31, 0x96, 0x65, |
| 2720 | 0xe7, 0x75, 0xe5, 0x3e, 0xfd, 0x92, 0x3b, 0xc9, |
| 2721 | 0x55, 0xbb, 0x16, 0x7e, 0xf7, 0xc2, 0x8c, 0xa4, |
| 2722 | 0x40, 0x1d, 0xe5, 0xef, 0x0e, 0xdf, 0xe4, 0x9a, |
| 2723 | 0x62, 0x73, 0x65, 0xfd, 0x46, 0x63, 0x25, 0x3d, |
| 2724 | 0x2b, 0xaf, 0xe5, 0x64, 0xfe, 0xa5, 0x5c, 0xcf, |
| 2725 | 0x24, 0xf3, 0xb4, 0xac, 0x64, 0xba, 0xdf, 0x4b, |
| 2726 | 0xc6, 0x96, 0x7d, 0x81, 0x2d, 0x8d, 0x97, 0xf7, |
| 2727 | 0xc5, 0x68, 0x77, 0x84, 0x32, 0x2b, 0xcc, 0x85, |
| 2728 | 0x74, 0x96, 0xf0, 0x12, 0x77, 0x61, 0xb9, 0xeb, |
| 2729 | 0x71, 0xaa, 0x82, 0xcb, 0x1c, 0xdb, 0x89, 0xc8, |
| 2730 | 0xc6, 0xb5, 0xe3, 0x5c, 0x7d, 0x39, 0x07, 0x24, |
| 2731 | 0xda, 0x39, 0x87, 0x45, 0xc0, 0x2b, 0xbb, 0x01, |
| 2732 | 0xac, 0xbc, 0x2a, 0x5c, 0x7f, 0xfc, 0xe8, 0xce, |
| 2733 | 0x6d, 0x9c, 0x6f, 0xed, 0xd3, 0xc1, 0xa1, 0xd6, |
| 2734 | 0xc5, 0x55, 0xa9, 0x66, 0x2f, 0xe1, 0xc8, 0x32, |
| 2735 | 0xa6, 0x5d, 0xa4, 0x3a, 0x98, 0x73, 0xe8, 0x45, |
| 2736 | 0xa4, 0xc7, 0xa8, 0xb4, 0xf6, 0x13, 0x03, 0xf6, |
| 2737 | 0xe9, 0x2e, 0xc4, 0x29, 0x0f, 0x84, 0xdb, 0xc4, |
| 2738 | 0x21, 0xc4, 0xc2, 0x75, 0x67, 0x89, 0x37, 0x0a }, |
| 2739 | .ilen = 512, |
| 2740 | .result = { 0x1a, 0x1d, 0xa9, 0x30, 0xad, 0xf9, 0x2f, 0x9b, |
| 2741 | 0xb6, 0x1d, 0xae, 0xef, 0xf0, 0x2f, 0xf8, 0x5a, |
| 2742 | 0x39, 0x3c, 0xbf, 0x2a, 0xb2, 0x45, 0xb2, 0x23, |
| 2743 | 0x1b, 0x63, 0x3c, 0xcf, 0xaa, 0xbe, 0xcf, 0x4e, |
| 2744 | 0xfa, 0xe8, 0x29, 0xc2, 0x20, 0x68, 0x2b, 0x3c, |
| 2745 | 0x2e, 0x8b, 0xf7, 0x6e, 0x25, 0xbd, 0xe3, 0x3d, |
| 2746 | 0x66, 0x27, 0xd6, 0xaf, 0xd6, 0x64, 0x3e, 0xe3, |
| 2747 | 0xe8, 0x58, 0x46, 0x97, 0x39, 0x51, 0x07, 0xde, |
| 2748 | 0xcb, 0x37, 0xbc, 0xa9, 0xc0, 0x5f, 0x75, 0xc3, |
| 2749 | 0x0e, 0x84, 0x23, 0x1d, 0x16, 0xd4, 0x1c, 0x59, |
| 2750 | 0x9c, 0x1a, 0x02, 0x55, 0xab, 0x3a, 0x97, 0x1d, |
| 2751 | 0xdf, 0xdd, 0xc7, 0x06, 0x51, 0xd7, 0x70, 0xae, |
| 2752 | 0x23, 0xc6, 0x8c, 0xf5, 0x1e, 0xa0, 0xe5, 0x82, |
| 2753 | 0xb8, 0xb2, 0xbf, 0x04, 0xa0, 0x32, 0x8e, 0x68, |
| 2754 | 0xeb, 0xaf, 0x6e, 0x2d, 0x94, 0x22, 0x2f, 0xce, |
| 2755 | 0x4c, 0xb5, 0x59, 0xe2, 0xa2, 0x2f, 0xa0, 0x98, |
| 2756 | 0x1a, 0x97, 0xc6, 0xd4, 0xb5, 0x00, 0x59, 0xf2, |
| 2757 | 0x84, 0x14, 0x72, 0xb1, 0x9a, 0x6e, 0xa3, 0x7f, |
| 2758 | 0xea, 0x20, 0xe7, 0xcb, 0x65, 0x77, 0x3a, 0xdf, |
| 2759 | 0xc8, 0x97, 0x67, 0x15, 0xc2, 0x2a, 0x27, 0xcc, |
| 2760 | 0x18, 0x55, 0xa1, 0x24, 0x0b, 0x24, 0x24, 0xaf, |
| 2761 | 0x5b, 0xec, 0x68, 0xb8, 0xc8, 0xf5, 0xba, 0x63, |
| 2762 | 0xff, 0xed, 0x89, 0xce, 0xd5, 0x3d, 0x88, 0xf3, |
| 2763 | 0x25, 0xef, 0x05, 0x7c, 0x3a, 0xef, 0xeb, 0xd8, |
| 2764 | 0x7a, 0x32, 0x0d, 0xd1, 0x1e, 0x58, 0x59, 0x99, |
| 2765 | 0x90, 0x25, 0xb5, 0x26, 0xb0, 0xe3, 0x2b, 0x6c, |
| 2766 | 0x4c, 0xa9, 0x8b, 0x84, 0x4f, 0x5e, 0x01, 0x50, |
| 2767 | 0x41, 0x30, 0x58, 0xc5, 0x62, 0x74, 0x52, 0x1d, |
| 2768 | 0x45, 0x24, 0x6a, 0x42, 0x64, 0x4f, 0x97, 0x1c, |
| 2769 | 0xa8, 0x66, 0xb5, 0x6d, 0x79, 0xd4, 0x0d, 0x48, |
| 2770 | 0xc5, 0x5f, 0xf3, 0x90, 0x32, 0xdd, 0xdd, 0xe1, |
| 2771 | 0xe4, 0xa9, 0x9f, 0xfc, 0xc3, 0x52, 0x5a, 0x46, |
| 2772 | 0xe4, 0x81, 0x84, 0x95, 0x36, 0x59, 0x7a, 0x6b, |
| 2773 | 0xaa, 0xb3, 0x60, 0xad, 0xce, 0x9f, 0x9f, 0x28, |
| 2774 | 0xe0, 0x01, 0x75, 0x22, 0xc4, 0x4e, 0xa9, 0x62, |
| 2775 | 0x5c, 0x62, 0x0d, 0x00, 0xcb, 0x13, 0xe8, 0x43, |
| 2776 | 0x72, 0xd4, 0x2d, 0x53, 0x46, 0xb5, 0xd1, 0x16, |
| 2777 | 0x22, 0x18, 0xdf, 0x34, 0x33, 0xf5, 0xd6, 0x1c, |
| 2778 | 0xb8, 0x79, 0x78, 0x97, 0x94, 0xff, 0x72, 0x13, |
| 2779 | 0x4c, 0x27, 0xfc, 0xcb, 0xbf, 0x01, 0x53, 0xa6, |
| 2780 | 0xb4, 0x50, 0x6e, 0xde, 0xdf, 0xb5, 0x43, 0xa4, |
| 2781 | 0x59, 0xdf, 0x52, 0xf9, 0x7c, 0xe0, 0x11, 0x6f, |
| 2782 | 0x2d, 0x14, 0x8e, 0x24, 0x61, 0x2c, 0xe1, 0x17, |
| 2783 | 0xcc, 0xce, 0x51, 0x0c, 0x19, 0x8a, 0x82, 0x30, |
| 2784 | 0x94, 0xd5, 0x3d, 0x6a, 0x53, 0x06, 0x5e, 0xbd, |
| 2785 | 0xb7, 0xeb, 0xfa, 0xfd, 0x27, 0x51, 0xde, 0x85, |
| 2786 | 0x1e, 0x86, 0x53, 0x11, 0x53, 0x94, 0x00, 0xee, |
| 2787 | 0x2b, 0x8c, 0x08, 0x2a, 0xbf, 0xdd, 0xae, 0x11, |
| 2788 | 0xcb, 0x1e, 0xa2, 0x07, 0x9a, 0x80, 0xcf, 0x62, |
| 2789 | 0x9b, 0x09, 0xdc, 0x95, 0x3c, 0x96, 0x8e, 0xb1, |
| 2790 | 0x09, 0xbd, 0xe4, 0xeb, 0xdb, 0xca, 0x70, 0x7a, |
| 2791 | 0x9e, 0xfa, 0x31, 0x18, 0x45, 0x3c, 0x21, 0x33, |
| 2792 | 0xb0, 0xb3, 0x2b, 0xea, 0xf3, 0x71, 0x2d, 0xe1, |
| 2793 | 0x03, 0xad, 0x1b, 0x48, 0xd4, 0x67, 0x27, 0xf0, |
| 2794 | 0x62, 0xe4, 0x3d, 0xfb, 0x9b, 0x08, 0x76, 0xe7, |
| 2795 | 0xdd, 0x2b, 0x01, 0x39, 0x04, 0x5a, 0x58, 0x7a, |
| 2796 | 0xf7, 0x11, 0x90, 0xec, 0xbd, 0x51, 0x5c, 0x32, |
| 2797 | 0x6b, 0xd7, 0x35, 0x39, 0x02, 0x6b, 0xf2, 0xa6, |
| 2798 | 0xd0, 0x0d, 0x07, 0xe1, 0x06, 0xc4, 0x5b, 0x7d, |
| 2799 | 0xe4, 0x6a, 0xd7, 0xee, 0x15, 0x1f, 0x83, 0xb4, |
| 2800 | 0xa3, 0xa7, 0x5e, 0xc3, 0x90, 0xb7, 0xef, 0xd3, |
| 2801 | 0xb7, 0x4f, 0xf8, 0x92, 0x4c, 0xb7, 0x3c, 0x29, |
| 2802 | 0xcd, 0x7e, 0x2b, 0x5d, 0x43, 0xea, 0x42, 0xe7, |
| 2803 | 0x74, 0x3f, 0x7d, 0x58, 0x88, 0x75, 0xde, 0x3e }, |
| 2804 | .rlen = 512, |
| 2805 | } |
| 2806 | }; |
| 2807 | |
| 2808 | static struct cipher_testvec aes_lrw_dec_tv_template[] = { |
| 2809 | /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */ |
| 2810 | /* same as enc vectors with input and result reversed */ |
| 2811 | { /* LRW-32-AES 1 */ |
| 2812 | .key = { 0x45, 0x62, 0xac, 0x25, 0xf8, 0x28, 0x17, 0x6d, |
| 2813 | 0x4c, 0x26, 0x84, 0x14, 0xb5, 0x68, 0x01, 0x85, |
| 2814 | 0x25, 0x8e, 0x2a, 0x05, 0xe7, 0x3e, 0x9d, 0x03, |
| 2815 | 0xee, 0x5a, 0x83, 0x0c, 0xcc, 0x09, 0x4c, 0x87 }, |
| 2816 | .klen = 32, |
| 2817 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2818 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, |
| 2819 | .input = { 0xf1, 0xb2, 0x73, 0xcd, 0x65, 0xa3, 0xdf, 0x5f, |
| 2820 | 0xe9, 0x5d, 0x48, 0x92, 0x54, 0x63, 0x4e, 0xb8 }, |
| 2821 | .ilen = 16, |
| 2822 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2823 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2824 | .rlen = 16, |
| 2825 | }, { /* LRW-32-AES 2 */ |
| 2826 | .key = { 0x59, 0x70, 0x47, 0x14, 0xf5, 0x57, 0x47, 0x8c, |
| 2827 | 0xd7, 0x79, 0xe8, 0x0f, 0x54, 0x88, 0x79, 0x44, |
| 2828 | 0x0d, 0x48, 0xf0, 0xb7, 0xb1, 0x5a, 0x53, 0xea, |
| 2829 | 0x1c, 0xaa, 0x6b, 0x29, 0xc2, 0xca, 0xfb, 0xaf |
| 2830 | }, |
| 2831 | .klen = 32, |
| 2832 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2833 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }, |
| 2834 | .input = { 0x00, 0xc8, 0x2b, 0xae, 0x95, 0xbb, 0xcd, 0xe5, |
| 2835 | 0x27, 0x4f, 0x07, 0x69, 0xb2, 0x60, 0xe1, 0x36 }, |
| 2836 | .ilen = 16, |
| 2837 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2838 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2839 | .rlen = 16, |
| 2840 | }, { /* LRW-32-AES 3 */ |
| 2841 | .key = { 0xd8, 0x2a, 0x91, 0x34, 0xb2, 0x6a, 0x56, 0x50, |
| 2842 | 0x30, 0xfe, 0x69, 0xe2, 0x37, 0x7f, 0x98, 0x47, |
| 2843 | 0xcd, 0xf9, 0x0b, 0x16, 0x0c, 0x64, 0x8f, 0xb6, |
| 2844 | 0xb0, 0x0d, 0x0d, 0x1b, 0xae, 0x85, 0x87, 0x1f }, |
| 2845 | .klen = 32, |
| 2846 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2847 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, |
| 2848 | .input = { 0x76, 0x32, 0x21, 0x83, 0xed, 0x8f, 0xf1, 0x82, |
| 2849 | 0xf9, 0x59, 0x62, 0x03, 0x69, 0x0e, 0x5e, 0x01 }, |
| 2850 | .ilen = 16, |
| 2851 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2852 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2853 | .rlen = 16, |
| 2854 | }, { /* LRW-32-AES 4 */ |
| 2855 | .key = { 0x0f, 0x6a, 0xef, 0xf8, 0xd3, 0xd2, 0xbb, 0x15, |
| 2856 | 0x25, 0x83, 0xf7, 0x3c, 0x1f, 0x01, 0x28, 0x74, |
| 2857 | 0xca, 0xc6, 0xbc, 0x35, 0x4d, 0x4a, 0x65, 0x54, |
| 2858 | 0x90, 0xae, 0x61, 0xcf, 0x7b, 0xae, 0xbd, 0xcc, |
| 2859 | 0xad, 0xe4, 0x94, 0xc5, 0x4a, 0x29, 0xae, 0x70 }, |
| 2860 | .klen = 40, |
| 2861 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2862 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, |
| 2863 | .input = { 0x9c, 0x0f, 0x15, 0x2f, 0x55, 0xa2, 0xd8, 0xf0, |
| 2864 | 0xd6, 0x7b, 0x8f, 0x9e, 0x28, 0x22, 0xbc, 0x41 }, |
| 2865 | .ilen = 16, |
| 2866 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2867 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2868 | .rlen = 16, |
| 2869 | }, { /* LRW-32-AES 5 */ |
| 2870 | .key = { 0x8a, 0xd4, 0xee, 0x10, 0x2f, 0xbd, 0x81, 0xff, |
| 2871 | 0xf8, 0x86, 0xce, 0xac, 0x93, 0xc5, 0xad, 0xc6, |
| 2872 | 0xa0, 0x19, 0x07, 0xc0, 0x9d, 0xf7, 0xbb, 0xdd, |
| 2873 | 0x52, 0x13, 0xb2, 0xb7, 0xf0, 0xff, 0x11, 0xd8, |
| 2874 | 0xd6, 0x08, 0xd0, 0xcd, 0x2e, 0xb1, 0x17, 0x6f }, |
| 2875 | .klen = 40, |
| 2876 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2877 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, |
| 2878 | .input = { 0xd4, 0x27, 0x6a, 0x7f, 0x14, 0x91, 0x3d, 0x65, |
| 2879 | 0xc8, 0x60, 0x48, 0x02, 0x87, 0xe3, 0x34, 0x06 }, |
| 2880 | .ilen = 16, |
| 2881 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2882 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2883 | .rlen = 16, |
| 2884 | }, { /* LRW-32-AES 6 */ |
| 2885 | .key = { 0xf8, 0xd4, 0x76, 0xff, 0xd6, 0x46, 0xee, 0x6c, |
| 2886 | 0x23, 0x84, 0xcb, 0x1c, 0x77, 0xd6, 0x19, 0x5d, |
| 2887 | 0xfe, 0xf1, 0xa9, 0xf3, 0x7b, 0xbc, 0x8d, 0x21, |
| 2888 | 0xa7, 0x9c, 0x21, 0xf8, 0xcb, 0x90, 0x02, 0x89, |
| 2889 | 0xa8, 0x45, 0x34, 0x8e, 0xc8, 0xc5, 0xb5, 0xf1, |
| 2890 | 0x26, 0xf5, 0x0e, 0x76, 0xfe, 0xfd, 0x1b, 0x1e }, |
| 2891 | .klen = 48, |
| 2892 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2893 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, |
| 2894 | .input = { 0xbd, 0x06, 0xb8, 0xe1, 0xdb, 0x98, 0x89, 0x9e, |
| 2895 | 0xc4, 0x98, 0xe4, 0x91, 0xcf, 0x1c, 0x70, 0x2b }, |
| 2896 | .ilen = 16, |
| 2897 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2898 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2899 | .rlen = 16, |
| 2900 | }, { /* LRW-32-AES 7 */ |
| 2901 | .key = { 0xfb, 0x76, 0x15, 0xb2, 0x3d, 0x80, 0x89, 0x1d, |
| 2902 | 0xd4, 0x70, 0x98, 0x0b, 0xc7, 0x95, 0x84, 0xc8, |
| 2903 | 0xb2, 0xfb, 0x64, 0xce, 0x60, 0x97, 0x87, 0x8d, |
| 2904 | 0x17, 0xfc, 0xe4, 0x5a, 0x49, 0xe8, 0x30, 0xb7, |
| 2905 | 0x6e, 0x78, 0x17, 0xe7, 0x2d, 0x5e, 0x12, 0xd4, |
| 2906 | 0x60, 0x64, 0x04, 0x7a, 0xf1, 0x2f, 0x9e, 0x0c }, |
| 2907 | .klen = 48, |
| 2908 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2909 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, |
| 2910 | .input = { 0x5b, 0x90, 0x8e, 0xc1, 0xab, 0xdd, 0x67, 0x5f, |
| 2911 | 0x3d, 0x69, 0x8a, 0x95, 0x53, 0xc8, 0x9c, 0xe5 }, |
| 2912 | .ilen = 16, |
| 2913 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 2914 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, |
| 2915 | .rlen = 16, |
| 2916 | }, { |
| 2917 | /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */ |
| 2918 | .key = { 0xf8, 0xd4, 0x76, 0xff, 0xd6, 0x46, 0xee, 0x6c, |
| 2919 | 0x23, 0x84, 0xcb, 0x1c, 0x77, 0xd6, 0x19, 0x5d, |
| 2920 | 0xfe, 0xf1, 0xa9, 0xf3, 0x7b, 0xbc, 0x8d, 0x21, |
| 2921 | 0xa7, 0x9c, 0x21, 0xf8, 0xcb, 0x90, 0x02, 0x89, |
| 2922 | 0xa8, 0x45, 0x34, 0x8e, 0xc8, 0xc5, 0xb5, 0xf1, |
| 2923 | 0x26, 0xf5, 0x0e, 0x76, 0xfe, 0xfd, 0x1b, 0x1e }, |
| 2924 | .klen = 48, |
| 2925 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2926 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, |
| 2927 | .input = { 0x1a, 0x1d, 0xa9, 0x30, 0xad, 0xf9, 0x2f, 0x9b, |
| 2928 | 0xb6, 0x1d, 0xae, 0xef, 0xf0, 0x2f, 0xf8, 0x5a, |
| 2929 | 0x39, 0x3c, 0xbf, 0x2a, 0xb2, 0x45, 0xb2, 0x23, |
| 2930 | 0x1b, 0x63, 0x3c, 0xcf, 0xaa, 0xbe, 0xcf, 0x4e, |
| 2931 | 0xfa, 0xe8, 0x29, 0xc2, 0x20, 0x68, 0x2b, 0x3c, |
| 2932 | 0x2e, 0x8b, 0xf7, 0x6e, 0x25, 0xbd, 0xe3, 0x3d, |
| 2933 | 0x66, 0x27, 0xd6, 0xaf, 0xd6, 0x64, 0x3e, 0xe3, |
| 2934 | 0xe8, 0x58, 0x46, 0x97, 0x39, 0x51, 0x07, 0xde, |
| 2935 | 0xcb, 0x37, 0xbc, 0xa9, 0xc0, 0x5f, 0x75, 0xc3, |
| 2936 | 0x0e, 0x84, 0x23, 0x1d, 0x16, 0xd4, 0x1c, 0x59, |
| 2937 | 0x9c, 0x1a, 0x02, 0x55, 0xab, 0x3a, 0x97, 0x1d, |
| 2938 | 0xdf, 0xdd, 0xc7, 0x06, 0x51, 0xd7, 0x70, 0xae, |
| 2939 | 0x23, 0xc6, 0x8c, 0xf5, 0x1e, 0xa0, 0xe5, 0x82, |
| 2940 | 0xb8, 0xb2, 0xbf, 0x04, 0xa0, 0x32, 0x8e, 0x68, |
| 2941 | 0xeb, 0xaf, 0x6e, 0x2d, 0x94, 0x22, 0x2f, 0xce, |
| 2942 | 0x4c, 0xb5, 0x59, 0xe2, 0xa2, 0x2f, 0xa0, 0x98, |
| 2943 | 0x1a, 0x97, 0xc6, 0xd4, 0xb5, 0x00, 0x59, 0xf2, |
| 2944 | 0x84, 0x14, 0x72, 0xb1, 0x9a, 0x6e, 0xa3, 0x7f, |
| 2945 | 0xea, 0x20, 0xe7, 0xcb, 0x65, 0x77, 0x3a, 0xdf, |
| 2946 | 0xc8, 0x97, 0x67, 0x15, 0xc2, 0x2a, 0x27, 0xcc, |
| 2947 | 0x18, 0x55, 0xa1, 0x24, 0x0b, 0x24, 0x24, 0xaf, |
| 2948 | 0x5b, 0xec, 0x68, 0xb8, 0xc8, 0xf5, 0xba, 0x63, |
| 2949 | 0xff, 0xed, 0x89, 0xce, 0xd5, 0x3d, 0x88, 0xf3, |
| 2950 | 0x25, 0xef, 0x05, 0x7c, 0x3a, 0xef, 0xeb, 0xd8, |
| 2951 | 0x7a, 0x32, 0x0d, 0xd1, 0x1e, 0x58, 0x59, 0x99, |
| 2952 | 0x90, 0x25, 0xb5, 0x26, 0xb0, 0xe3, 0x2b, 0x6c, |
| 2953 | 0x4c, 0xa9, 0x8b, 0x84, 0x4f, 0x5e, 0x01, 0x50, |
| 2954 | 0x41, 0x30, 0x58, 0xc5, 0x62, 0x74, 0x52, 0x1d, |
| 2955 | 0x45, 0x24, 0x6a, 0x42, 0x64, 0x4f, 0x97, 0x1c, |
| 2956 | 0xa8, 0x66, 0xb5, 0x6d, 0x79, 0xd4, 0x0d, 0x48, |
| 2957 | 0xc5, 0x5f, 0xf3, 0x90, 0x32, 0xdd, 0xdd, 0xe1, |
| 2958 | 0xe4, 0xa9, 0x9f, 0xfc, 0xc3, 0x52, 0x5a, 0x46, |
| 2959 | 0xe4, 0x81, 0x84, 0x95, 0x36, 0x59, 0x7a, 0x6b, |
| 2960 | 0xaa, 0xb3, 0x60, 0xad, 0xce, 0x9f, 0x9f, 0x28, |
| 2961 | 0xe0, 0x01, 0x75, 0x22, 0xc4, 0x4e, 0xa9, 0x62, |
| 2962 | 0x5c, 0x62, 0x0d, 0x00, 0xcb, 0x13, 0xe8, 0x43, |
| 2963 | 0x72, 0xd4, 0x2d, 0x53, 0x46, 0xb5, 0xd1, 0x16, |
| 2964 | 0x22, 0x18, 0xdf, 0x34, 0x33, 0xf5, 0xd6, 0x1c, |
| 2965 | 0xb8, 0x79, 0x78, 0x97, 0x94, 0xff, 0x72, 0x13, |
| 2966 | 0x4c, 0x27, 0xfc, 0xcb, 0xbf, 0x01, 0x53, 0xa6, |
| 2967 | 0xb4, 0x50, 0x6e, 0xde, 0xdf, 0xb5, 0x43, 0xa4, |
| 2968 | 0x59, 0xdf, 0x52, 0xf9, 0x7c, 0xe0, 0x11, 0x6f, |
| 2969 | 0x2d, 0x14, 0x8e, 0x24, 0x61, 0x2c, 0xe1, 0x17, |
| 2970 | 0xcc, 0xce, 0x51, 0x0c, 0x19, 0x8a, 0x82, 0x30, |
| 2971 | 0x94, 0xd5, 0x3d, 0x6a, 0x53, 0x06, 0x5e, 0xbd, |
| 2972 | 0xb7, 0xeb, 0xfa, 0xfd, 0x27, 0x51, 0xde, 0x85, |
| 2973 | 0x1e, 0x86, 0x53, 0x11, 0x53, 0x94, 0x00, 0xee, |
| 2974 | 0x2b, 0x8c, 0x08, 0x2a, 0xbf, 0xdd, 0xae, 0x11, |
| 2975 | 0xcb, 0x1e, 0xa2, 0x07, 0x9a, 0x80, 0xcf, 0x62, |
| 2976 | 0x9b, 0x09, 0xdc, 0x95, 0x3c, 0x96, 0x8e, 0xb1, |
| 2977 | 0x09, 0xbd, 0xe4, 0xeb, 0xdb, 0xca, 0x70, 0x7a, |
| 2978 | 0x9e, 0xfa, 0x31, 0x18, 0x45, 0x3c, 0x21, 0x33, |
| 2979 | 0xb0, 0xb3, 0x2b, 0xea, 0xf3, 0x71, 0x2d, 0xe1, |
| 2980 | 0x03, 0xad, 0x1b, 0x48, 0xd4, 0x67, 0x27, 0xf0, |
| 2981 | 0x62, 0xe4, 0x3d, 0xfb, 0x9b, 0x08, 0x76, 0xe7, |
| 2982 | 0xdd, 0x2b, 0x01, 0x39, 0x04, 0x5a, 0x58, 0x7a, |
| 2983 | 0xf7, 0x11, 0x90, 0xec, 0xbd, 0x51, 0x5c, 0x32, |
| 2984 | 0x6b, 0xd7, 0x35, 0x39, 0x02, 0x6b, 0xf2, 0xa6, |
| 2985 | 0xd0, 0x0d, 0x07, 0xe1, 0x06, 0xc4, 0x5b, 0x7d, |
| 2986 | 0xe4, 0x6a, 0xd7, 0xee, 0x15, 0x1f, 0x83, 0xb4, |
| 2987 | 0xa3, 0xa7, 0x5e, 0xc3, 0x90, 0xb7, 0xef, 0xd3, |
| 2988 | 0xb7, 0x4f, 0xf8, 0x92, 0x4c, 0xb7, 0x3c, 0x29, |
| 2989 | 0xcd, 0x7e, 0x2b, 0x5d, 0x43, 0xea, 0x42, 0xe7, |
| 2990 | 0x74, 0x3f, 0x7d, 0x58, 0x88, 0x75, 0xde, 0x3e }, |
| 2991 | .ilen = 512, |
| 2992 | .result = { 0x05, 0x11, 0xb7, 0x18, 0xab, 0xc6, 0x2d, 0xac, |
| 2993 | 0x70, 0x5d, 0xf6, 0x22, 0x94, 0xcd, 0xe5, 0x6c, |
| 2994 | 0x17, 0x6b, 0xf6, 0x1c, 0xf0, 0xf3, 0x6e, 0xf8, |
| 2995 | 0x50, 0x38, 0x1f, 0x71, 0x49, 0xb6, 0x57, 0xd6, |
| 2996 | 0x8f, 0xcb, 0x8d, 0x6b, 0xe3, 0xa6, 0x29, 0x90, |
| 2997 | 0xfe, 0x2a, 0x62, 0x82, 0xae, 0x6d, 0x8b, 0xf6, |
| 2998 | 0xad, 0x1e, 0x9e, 0x20, 0x5f, 0x38, 0xbe, 0x04, |
| 2999 | 0xda, 0x10, 0x8e, 0xed, 0xa2, 0xa4, 0x87, 0xab, |
| 3000 | 0xda, 0x6b, 0xb4, 0x0c, 0x75, 0xba, 0xd3, 0x7c, |
| 3001 | 0xc9, 0xac, 0x42, 0x31, 0x95, 0x7c, 0xc9, 0x04, |
| 3002 | 0xeb, 0xd5, 0x6e, 0x32, 0x69, 0x8a, 0xdb, 0xa6, |
| 3003 | 0x15, 0xd7, 0x3f, 0x4f, 0x2f, 0x66, 0x69, 0x03, |
| 3004 | 0x9c, 0x1f, 0x54, 0x0f, 0xde, 0x1f, 0xf3, 0x65, |
| 3005 | 0x4c, 0x96, 0x12, 0xed, 0x7c, 0x92, 0x03, 0x01, |
| 3006 | 0x6f, 0xbc, 0x35, 0x93, 0xac, 0xf1, 0x27, 0xf1, |
| 3007 | 0xb4, 0x96, 0x82, 0x5a, 0x5f, 0xb0, 0xa0, 0x50, |
| 3008 | 0x89, 0xa4, 0x8e, 0x66, 0x44, 0x85, 0xcc, 0xfd, |
| 3009 | 0x33, 0x14, 0x70, 0xe3, 0x96, 0xb2, 0xc3, 0xd3, |
| 3010 | 0xbb, 0x54, 0x5a, 0x1a, 0xf9, 0x74, 0xa2, 0xc5, |
| 3011 | 0x2d, 0x64, 0x75, 0xdd, 0xb4, 0x54, 0xe6, 0x74, |
| 3012 | 0x8c, 0xd3, 0x9d, 0x9e, 0x86, 0xab, 0x51, 0x53, |
| 3013 | 0xb7, 0x93, 0x3e, 0x6f, 0xd0, 0x4e, 0x2c, 0x40, |
| 3014 | 0xf6, 0xa8, 0x2e, 0x3e, 0x9d, 0xf4, 0x66, 0xa5, |
| 3015 | 0x76, 0x12, 0x73, 0x44, 0x1a, 0x56, 0xd7, 0x72, |
| 3016 | 0x88, 0xcd, 0x21, 0x8c, 0x4c, 0x0f, 0xfe, 0xda, |
| 3017 | 0x95, 0xe0, 0x3a, 0xa6, 0xa5, 0x84, 0x46, 0xcd, |
| 3018 | 0xd5, 0x3e, 0x9d, 0x3a, 0xe2, 0x67, 0xe6, 0x60, |
| 3019 | 0x1a, 0xe2, 0x70, 0x85, 0x58, 0xc2, 0x1b, 0x09, |
| 3020 | 0xe1, 0xd7, 0x2c, 0xca, 0xad, 0xa8, 0x8f, 0xf9, |
| 3021 | 0xac, 0xb3, 0x0e, 0xdb, 0xca, 0x2e, 0xe2, 0xb8, |
| 3022 | 0x51, 0x71, 0xd9, 0x3c, 0x6c, 0xf1, 0x56, 0xf8, |
| 3023 | 0xea, 0x9c, 0xf1, 0xfb, 0x0c, 0xe6, 0xb7, 0x10, |
| 3024 | 0x1c, 0xf8, 0xa9, 0x7c, 0xe8, 0x53, 0x35, 0xc1, |
| 3025 | 0x90, 0x3e, 0x76, 0x4a, 0x74, 0xa4, 0x21, 0x2c, |
| 3026 | 0xf6, 0x2c, 0x4e, 0x0f, 0x94, 0x3a, 0x88, 0x2e, |
| 3027 | 0x41, 0x09, 0x6a, 0x33, 0x7d, 0xf6, 0xdd, 0x3f, |
| 3028 | 0x8d, 0x23, 0x31, 0x74, 0x84, 0xeb, 0x88, 0x6e, |
| 3029 | 0xcc, 0xb9, 0xbc, 0x22, 0x83, 0x19, 0x07, 0x22, |
| 3030 | 0xa5, 0x2d, 0xdf, 0xa5, 0xf3, 0x80, 0x85, 0x78, |
| 3031 | 0x84, 0x39, 0x6a, 0x6d, 0x6a, 0x99, 0x4f, 0xa5, |
| 3032 | 0x15, 0xfe, 0x46, 0xb0, 0xe4, 0x6c, 0xa5, 0x41, |
| 3033 | 0x3c, 0xce, 0x8f, 0x42, 0x60, 0x71, 0xa7, 0x75, |
| 3034 | 0x08, 0x40, 0x65, 0x8a, 0x82, 0xbf, 0xf5, 0x43, |
| 3035 | 0x71, 0x96, 0xa9, 0x4d, 0x44, 0x8a, 0x20, 0xbe, |
| 3036 | 0xfa, 0x4d, 0xbb, 0xc0, 0x7d, 0x31, 0x96, 0x65, |
| 3037 | 0xe7, 0x75, 0xe5, 0x3e, 0xfd, 0x92, 0x3b, 0xc9, |
| 3038 | 0x55, 0xbb, 0x16, 0x7e, 0xf7, 0xc2, 0x8c, 0xa4, |
| 3039 | 0x40, 0x1d, 0xe5, 0xef, 0x0e, 0xdf, 0xe4, 0x9a, |
| 3040 | 0x62, 0x73, 0x65, 0xfd, 0x46, 0x63, 0x25, 0x3d, |
| 3041 | 0x2b, 0xaf, 0xe5, 0x64, 0xfe, 0xa5, 0x5c, 0xcf, |
| 3042 | 0x24, 0xf3, 0xb4, 0xac, 0x64, 0xba, 0xdf, 0x4b, |
| 3043 | 0xc6, 0x96, 0x7d, 0x81, 0x2d, 0x8d, 0x97, 0xf7, |
| 3044 | 0xc5, 0x68, 0x77, 0x84, 0x32, 0x2b, 0xcc, 0x85, |
| 3045 | 0x74, 0x96, 0xf0, 0x12, 0x77, 0x61, 0xb9, 0xeb, |
| 3046 | 0x71, 0xaa, 0x82, 0xcb, 0x1c, 0xdb, 0x89, 0xc8, |
| 3047 | 0xc6, 0xb5, 0xe3, 0x5c, 0x7d, 0x39, 0x07, 0x24, |
| 3048 | 0xda, 0x39, 0x87, 0x45, 0xc0, 0x2b, 0xbb, 0x01, |
| 3049 | 0xac, 0xbc, 0x2a, 0x5c, 0x7f, 0xfc, 0xe8, 0xce, |
| 3050 | 0x6d, 0x9c, 0x6f, 0xed, 0xd3, 0xc1, 0xa1, 0xd6, |
| 3051 | 0xc5, 0x55, 0xa9, 0x66, 0x2f, 0xe1, 0xc8, 0x32, |
| 3052 | 0xa6, 0x5d, 0xa4, 0x3a, 0x98, 0x73, 0xe8, 0x45, |
| 3053 | 0xa4, 0xc7, 0xa8, 0xb4, 0xf6, 0x13, 0x03, 0xf6, |
| 3054 | 0xe9, 0x2e, 0xc4, 0x29, 0x0f, 0x84, 0xdb, 0xc4, |
| 3055 | 0x21, 0xc4, 0xc2, 0x75, 0x67, 0x89, 0x37, 0x0a }, |
| 3056 | .rlen = 512, |
| 3057 | } |
| 3058 | }; |
| 3059 | |
Rik Snel | f19f511 | 2007-09-19 20:23:13 +0800 | [diff] [blame] | 3060 | static struct cipher_testvec aes_xts_enc_tv_template[] = { |
| 3061 | /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */ |
| 3062 | { /* XTS-AES 1 */ |
| 3063 | .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3064 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3065 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3066 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3067 | .klen = 32, |
| 3068 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3069 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3070 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3071 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3072 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3073 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3074 | .ilen = 32, |
| 3075 | .result = { 0x91, 0x7c, 0xf6, 0x9e, 0xbd, 0x68, 0xb2, 0xec, |
| 3076 | 0x9b, 0x9f, 0xe9, 0xa3, 0xea, 0xdd, 0xa6, 0x92, |
| 3077 | 0xcd, 0x43, 0xd2, 0xf5, 0x95, 0x98, 0xed, 0x85, |
| 3078 | 0x8c, 0x02, 0xc2, 0x65, 0x2f, 0xbf, 0x92, 0x2e }, |
| 3079 | .rlen = 32, |
| 3080 | }, { /* XTS-AES 2 */ |
| 3081 | .key = { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, |
| 3082 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, |
| 3083 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, |
| 3084 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22 }, |
| 3085 | .klen = 32, |
| 3086 | .iv = { 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, |
| 3087 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3088 | .input = { 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3089 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3090 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3091 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44 }, |
| 3092 | .ilen = 32, |
| 3093 | .result = { 0xc4, 0x54, 0x18, 0x5e, 0x6a, 0x16, 0x93, 0x6e, |
| 3094 | 0x39, 0x33, 0x40, 0x38, 0xac, 0xef, 0x83, 0x8b, |
| 3095 | 0xfb, 0x18, 0x6f, 0xff, 0x74, 0x80, 0xad, 0xc4, |
| 3096 | 0x28, 0x93, 0x82, 0xec, 0xd6, 0xd3, 0x94, 0xf0 }, |
| 3097 | .rlen = 32, |
| 3098 | }, { /* XTS-AES 3 */ |
| 3099 | .key = { 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, |
| 3100 | 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, |
| 3101 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, |
| 3102 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22 }, |
| 3103 | .klen = 32, |
| 3104 | .iv = { 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, |
| 3105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3106 | .input = { 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3107 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3108 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3109 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44 }, |
| 3110 | .ilen = 32, |
| 3111 | .result = { 0xaf, 0x85, 0x33, 0x6b, 0x59, 0x7a, 0xfc, 0x1a, |
| 3112 | 0x90, 0x0b, 0x2e, 0xb2, 0x1e, 0xc9, 0x49, 0xd2, |
| 3113 | 0x92, 0xdf, 0x4c, 0x04, 0x7e, 0x0b, 0x21, 0x53, |
| 3114 | 0x21, 0x86, 0xa5, 0x97, 0x1a, 0x22, 0x7a, 0x89 }, |
| 3115 | .rlen = 32, |
| 3116 | }, { /* XTS-AES 4 */ |
| 3117 | .key = { 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, |
| 3118 | 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, |
| 3119 | 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, |
| 3120 | 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95 }, |
| 3121 | .klen = 32, |
| 3122 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3123 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3124 | .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 3125 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 3126 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 3127 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| 3128 | 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, |
| 3129 | 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, |
| 3130 | 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 3131 | 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, |
| 3132 | 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, |
| 3133 | 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, |
| 3134 | 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, |
| 3135 | 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, |
| 3136 | 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, |
| 3137 | 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, |
| 3138 | 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, |
| 3139 | 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, |
| 3140 | 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, |
| 3141 | 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, |
| 3142 | 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, |
| 3143 | 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, |
| 3144 | 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, |
| 3145 | 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, |
| 3146 | 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, |
| 3147 | 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, |
| 3148 | 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, |
| 3149 | 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, |
| 3150 | 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, |
| 3151 | 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, |
| 3152 | 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, |
| 3153 | 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, |
| 3154 | 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, |
| 3155 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, |
| 3156 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 3157 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 3158 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 3159 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| 3160 | 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, |
| 3161 | 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, |
| 3162 | 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 3163 | 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, |
| 3164 | 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, |
| 3165 | 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, |
| 3166 | 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, |
| 3167 | 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, |
| 3168 | 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, |
| 3169 | 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, |
| 3170 | 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, |
| 3171 | 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, |
| 3172 | 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, |
| 3173 | 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, |
| 3174 | 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, |
| 3175 | 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, |
| 3176 | 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, |
| 3177 | 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, |
| 3178 | 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, |
| 3179 | 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, |
| 3180 | 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, |
| 3181 | 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, |
| 3182 | 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, |
| 3183 | 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, |
| 3184 | 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, |
| 3185 | 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, |
| 3186 | 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, |
| 3187 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff }, |
| 3188 | .ilen = 512, |
| 3189 | .result = { 0x27, 0xa7, 0x47, 0x9b, 0xef, 0xa1, 0xd4, 0x76, |
| 3190 | 0x48, 0x9f, 0x30, 0x8c, 0xd4, 0xcf, 0xa6, 0xe2, |
| 3191 | 0xa9, 0x6e, 0x4b, 0xbe, 0x32, 0x08, 0xff, 0x25, |
| 3192 | 0x28, 0x7d, 0xd3, 0x81, 0x96, 0x16, 0xe8, 0x9c, |
| 3193 | 0xc7, 0x8c, 0xf7, 0xf5, 0xe5, 0x43, 0x44, 0x5f, |
| 3194 | 0x83, 0x33, 0xd8, 0xfa, 0x7f, 0x56, 0x00, 0x00, |
| 3195 | 0x05, 0x27, 0x9f, 0xa5, 0xd8, 0xb5, 0xe4, 0xad, |
| 3196 | 0x40, 0xe7, 0x36, 0xdd, 0xb4, 0xd3, 0x54, 0x12, |
| 3197 | 0x32, 0x80, 0x63, 0xfd, 0x2a, 0xab, 0x53, 0xe5, |
| 3198 | 0xea, 0x1e, 0x0a, 0x9f, 0x33, 0x25, 0x00, 0xa5, |
| 3199 | 0xdf, 0x94, 0x87, 0xd0, 0x7a, 0x5c, 0x92, 0xcc, |
| 3200 | 0x51, 0x2c, 0x88, 0x66, 0xc7, 0xe8, 0x60, 0xce, |
| 3201 | 0x93, 0xfd, 0xf1, 0x66, 0xa2, 0x49, 0x12, 0xb4, |
| 3202 | 0x22, 0x97, 0x61, 0x46, 0xae, 0x20, 0xce, 0x84, |
| 3203 | 0x6b, 0xb7, 0xdc, 0x9b, 0xa9, 0x4a, 0x76, 0x7a, |
| 3204 | 0xae, 0xf2, 0x0c, 0x0d, 0x61, 0xad, 0x02, 0x65, |
| 3205 | 0x5e, 0xa9, 0x2d, 0xc4, 0xc4, 0xe4, 0x1a, 0x89, |
| 3206 | 0x52, 0xc6, 0x51, 0xd3, 0x31, 0x74, 0xbe, 0x51, |
| 3207 | 0xa1, 0x0c, 0x42, 0x11, 0x10, 0xe6, 0xd8, 0x15, |
| 3208 | 0x88, 0xed, 0xe8, 0x21, 0x03, 0xa2, 0x52, 0xd8, |
| 3209 | 0xa7, 0x50, 0xe8, 0x76, 0x8d, 0xef, 0xff, 0xed, |
| 3210 | 0x91, 0x22, 0x81, 0x0a, 0xae, 0xb9, 0x9f, 0x91, |
| 3211 | 0x72, 0xaf, 0x82, 0xb6, 0x04, 0xdc, 0x4b, 0x8e, |
| 3212 | 0x51, 0xbc, 0xb0, 0x82, 0x35, 0xa6, 0xf4, 0x34, |
| 3213 | 0x13, 0x32, 0xe4, 0xca, 0x60, 0x48, 0x2a, 0x4b, |
| 3214 | 0xa1, 0xa0, 0x3b, 0x3e, 0x65, 0x00, 0x8f, 0xc5, |
| 3215 | 0xda, 0x76, 0xb7, 0x0b, 0xf1, 0x69, 0x0d, 0xb4, |
| 3216 | 0xea, 0xe2, 0x9c, 0x5f, 0x1b, 0xad, 0xd0, 0x3c, |
| 3217 | 0x5c, 0xcf, 0x2a, 0x55, 0xd7, 0x05, 0xdd, 0xcd, |
| 3218 | 0x86, 0xd4, 0x49, 0x51, 0x1c, 0xeb, 0x7e, 0xc3, |
| 3219 | 0x0b, 0xf1, 0x2b, 0x1f, 0xa3, 0x5b, 0x91, 0x3f, |
| 3220 | 0x9f, 0x74, 0x7a, 0x8a, 0xfd, 0x1b, 0x13, 0x0e, |
| 3221 | 0x94, 0xbf, 0xf9, 0x4e, 0xff, 0xd0, 0x1a, 0x91, |
| 3222 | 0x73, 0x5c, 0xa1, 0x72, 0x6a, 0xcd, 0x0b, 0x19, |
| 3223 | 0x7c, 0x4e, 0x5b, 0x03, 0x39, 0x36, 0x97, 0xe1, |
| 3224 | 0x26, 0x82, 0x6f, 0xb6, 0xbb, 0xde, 0x8e, 0xcc, |
| 3225 | 0x1e, 0x08, 0x29, 0x85, 0x16, 0xe2, 0xc9, 0xed, |
| 3226 | 0x03, 0xff, 0x3c, 0x1b, 0x78, 0x60, 0xf6, 0xde, |
| 3227 | 0x76, 0xd4, 0xce, 0xcd, 0x94, 0xc8, 0x11, 0x98, |
| 3228 | 0x55, 0xef, 0x52, 0x97, 0xca, 0x67, 0xe9, 0xf3, |
| 3229 | 0xe7, 0xff, 0x72, 0xb1, 0xe9, 0x97, 0x85, 0xca, |
| 3230 | 0x0a, 0x7e, 0x77, 0x20, 0xc5, 0xb3, 0x6d, 0xc6, |
| 3231 | 0xd7, 0x2c, 0xac, 0x95, 0x74, 0xc8, 0xcb, 0xbc, |
| 3232 | 0x2f, 0x80, 0x1e, 0x23, 0xe5, 0x6f, 0xd3, 0x44, |
| 3233 | 0xb0, 0x7f, 0x22, 0x15, 0x4b, 0xeb, 0xa0, 0xf0, |
| 3234 | 0x8c, 0xe8, 0x89, 0x1e, 0x64, 0x3e, 0xd9, 0x95, |
| 3235 | 0xc9, 0x4d, 0x9a, 0x69, 0xc9, 0xf1, 0xb5, 0xf4, |
| 3236 | 0x99, 0x02, 0x7a, 0x78, 0x57, 0x2a, 0xee, 0xbd, |
| 3237 | 0x74, 0xd2, 0x0c, 0xc3, 0x98, 0x81, 0xc2, 0x13, |
| 3238 | 0xee, 0x77, 0x0b, 0x10, 0x10, 0xe4, 0xbe, 0xa7, |
| 3239 | 0x18, 0x84, 0x69, 0x77, 0xae, 0x11, 0x9f, 0x7a, |
| 3240 | 0x02, 0x3a, 0xb5, 0x8c, 0xca, 0x0a, 0xd7, 0x52, |
| 3241 | 0xaf, 0xe6, 0x56, 0xbb, 0x3c, 0x17, 0x25, 0x6a, |
| 3242 | 0x9f, 0x6e, 0x9b, 0xf1, 0x9f, 0xdd, 0x5a, 0x38, |
| 3243 | 0xfc, 0x82, 0xbb, 0xe8, 0x72, 0xc5, 0x53, 0x9e, |
| 3244 | 0xdb, 0x60, 0x9e, 0xf4, 0xf7, 0x9c, 0x20, 0x3e, |
| 3245 | 0xbb, 0x14, 0x0f, 0x2e, 0x58, 0x3c, 0xb2, 0xad, |
| 3246 | 0x15, 0xb4, 0xaa, 0x5b, 0x65, 0x50, 0x16, 0xa8, |
| 3247 | 0x44, 0x92, 0x77, 0xdb, 0xd4, 0x77, 0xef, 0x2c, |
| 3248 | 0x8d, 0x6c, 0x01, 0x7d, 0xb7, 0x38, 0xb1, 0x8d, |
| 3249 | 0xeb, 0x4a, 0x42, 0x7d, 0x19, 0x23, 0xce, 0x3f, |
| 3250 | 0xf2, 0x62, 0x73, 0x57, 0x79, 0xa4, 0x18, 0xf2, |
| 3251 | 0x0a, 0x28, 0x2d, 0xf9, 0x20, 0x14, 0x7b, 0xea, |
| 3252 | 0xbe, 0x42, 0x1e, 0xe5, 0x31, 0x9d, 0x05, 0x68 }, |
| 3253 | .rlen = 512, |
| 3254 | } |
| 3255 | }; |
| 3256 | |
| 3257 | static struct cipher_testvec aes_xts_dec_tv_template[] = { |
| 3258 | /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */ |
| 3259 | { /* XTS-AES 1 */ |
| 3260 | .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3261 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3262 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3263 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3264 | .klen = 32, |
| 3265 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3266 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3267 | .input = { 0x91, 0x7c, 0xf6, 0x9e, 0xbd, 0x68, 0xb2, 0xec, |
| 3268 | 0x9b, 0x9f, 0xe9, 0xa3, 0xea, 0xdd, 0xa6, 0x92, |
| 3269 | 0xcd, 0x43, 0xd2, 0xf5, 0x95, 0x98, 0xed, 0x85, |
| 3270 | 0x8c, 0x02, 0xc2, 0x65, 0x2f, 0xbf, 0x92, 0x2e }, |
| 3271 | .ilen = 32, |
| 3272 | .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3273 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3274 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3275 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3276 | .rlen = 32, |
| 3277 | }, { /* XTS-AES 2 */ |
| 3278 | .key = { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, |
| 3279 | 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, |
| 3280 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, |
| 3281 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22 }, |
| 3282 | .klen = 32, |
| 3283 | .iv = { 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, |
| 3284 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3285 | .input = { 0xc4, 0x54, 0x18, 0x5e, 0x6a, 0x16, 0x93, 0x6e, |
| 3286 | 0x39, 0x33, 0x40, 0x38, 0xac, 0xef, 0x83, 0x8b, |
| 3287 | 0xfb, 0x18, 0x6f, 0xff, 0x74, 0x80, 0xad, 0xc4, |
| 3288 | 0x28, 0x93, 0x82, 0xec, 0xd6, 0xd3, 0x94, 0xf0 }, |
| 3289 | .ilen = 32, |
| 3290 | .result = { 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3291 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3292 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3293 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44 }, |
| 3294 | .rlen = 32, |
| 3295 | }, { /* XTS-AES 3 */ |
| 3296 | .key = { 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, |
| 3297 | 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, |
| 3298 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, |
| 3299 | 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22 }, |
| 3300 | .klen = 32, |
| 3301 | .iv = { 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, |
| 3302 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3303 | .input = { 0xaf, 0x85, 0x33, 0x6b, 0x59, 0x7a, 0xfc, 0x1a, |
| 3304 | 0x90, 0x0b, 0x2e, 0xb2, 0x1e, 0xc9, 0x49, 0xd2, |
| 3305 | 0x92, 0xdf, 0x4c, 0x04, 0x7e, 0x0b, 0x21, 0x53, |
| 3306 | 0x21, 0x86, 0xa5, 0x97, 0x1a, 0x22, 0x7a, 0x89 }, |
| 3307 | .ilen = 32, |
| 3308 | .result = { 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3309 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3310 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, |
| 3311 | 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44 }, |
| 3312 | .rlen = 32, |
| 3313 | }, { /* XTS-AES 4 */ |
| 3314 | .key = { 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, |
| 3315 | 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, |
| 3316 | 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, |
| 3317 | 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95 }, |
| 3318 | .klen = 32, |
| 3319 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3320 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3321 | .input = { 0x27, 0xa7, 0x47, 0x9b, 0xef, 0xa1, 0xd4, 0x76, |
| 3322 | 0x48, 0x9f, 0x30, 0x8c, 0xd4, 0xcf, 0xa6, 0xe2, |
| 3323 | 0xa9, 0x6e, 0x4b, 0xbe, 0x32, 0x08, 0xff, 0x25, |
| 3324 | 0x28, 0x7d, 0xd3, 0x81, 0x96, 0x16, 0xe8, 0x9c, |
| 3325 | 0xc7, 0x8c, 0xf7, 0xf5, 0xe5, 0x43, 0x44, 0x5f, |
| 3326 | 0x83, 0x33, 0xd8, 0xfa, 0x7f, 0x56, 0x00, 0x00, |
| 3327 | 0x05, 0x27, 0x9f, 0xa5, 0xd8, 0xb5, 0xe4, 0xad, |
| 3328 | 0x40, 0xe7, 0x36, 0xdd, 0xb4, 0xd3, 0x54, 0x12, |
| 3329 | 0x32, 0x80, 0x63, 0xfd, 0x2a, 0xab, 0x53, 0xe5, |
| 3330 | 0xea, 0x1e, 0x0a, 0x9f, 0x33, 0x25, 0x00, 0xa5, |
| 3331 | 0xdf, 0x94, 0x87, 0xd0, 0x7a, 0x5c, 0x92, 0xcc, |
| 3332 | 0x51, 0x2c, 0x88, 0x66, 0xc7, 0xe8, 0x60, 0xce, |
| 3333 | 0x93, 0xfd, 0xf1, 0x66, 0xa2, 0x49, 0x12, 0xb4, |
| 3334 | 0x22, 0x97, 0x61, 0x46, 0xae, 0x20, 0xce, 0x84, |
| 3335 | 0x6b, 0xb7, 0xdc, 0x9b, 0xa9, 0x4a, 0x76, 0x7a, |
| 3336 | 0xae, 0xf2, 0x0c, 0x0d, 0x61, 0xad, 0x02, 0x65, |
| 3337 | 0x5e, 0xa9, 0x2d, 0xc4, 0xc4, 0xe4, 0x1a, 0x89, |
| 3338 | 0x52, 0xc6, 0x51, 0xd3, 0x31, 0x74, 0xbe, 0x51, |
| 3339 | 0xa1, 0x0c, 0x42, 0x11, 0x10, 0xe6, 0xd8, 0x15, |
| 3340 | 0x88, 0xed, 0xe8, 0x21, 0x03, 0xa2, 0x52, 0xd8, |
| 3341 | 0xa7, 0x50, 0xe8, 0x76, 0x8d, 0xef, 0xff, 0xed, |
| 3342 | 0x91, 0x22, 0x81, 0x0a, 0xae, 0xb9, 0x9f, 0x91, |
| 3343 | 0x72, 0xaf, 0x82, 0xb6, 0x04, 0xdc, 0x4b, 0x8e, |
| 3344 | 0x51, 0xbc, 0xb0, 0x82, 0x35, 0xa6, 0xf4, 0x34, |
| 3345 | 0x13, 0x32, 0xe4, 0xca, 0x60, 0x48, 0x2a, 0x4b, |
| 3346 | 0xa1, 0xa0, 0x3b, 0x3e, 0x65, 0x00, 0x8f, 0xc5, |
| 3347 | 0xda, 0x76, 0xb7, 0x0b, 0xf1, 0x69, 0x0d, 0xb4, |
| 3348 | 0xea, 0xe2, 0x9c, 0x5f, 0x1b, 0xad, 0xd0, 0x3c, |
| 3349 | 0x5c, 0xcf, 0x2a, 0x55, 0xd7, 0x05, 0xdd, 0xcd, |
| 3350 | 0x86, 0xd4, 0x49, 0x51, 0x1c, 0xeb, 0x7e, 0xc3, |
| 3351 | 0x0b, 0xf1, 0x2b, 0x1f, 0xa3, 0x5b, 0x91, 0x3f, |
| 3352 | 0x9f, 0x74, 0x7a, 0x8a, 0xfd, 0x1b, 0x13, 0x0e, |
| 3353 | 0x94, 0xbf, 0xf9, 0x4e, 0xff, 0xd0, 0x1a, 0x91, |
| 3354 | 0x73, 0x5c, 0xa1, 0x72, 0x6a, 0xcd, 0x0b, 0x19, |
| 3355 | 0x7c, 0x4e, 0x5b, 0x03, 0x39, 0x36, 0x97, 0xe1, |
| 3356 | 0x26, 0x82, 0x6f, 0xb6, 0xbb, 0xde, 0x8e, 0xcc, |
| 3357 | 0x1e, 0x08, 0x29, 0x85, 0x16, 0xe2, 0xc9, 0xed, |
| 3358 | 0x03, 0xff, 0x3c, 0x1b, 0x78, 0x60, 0xf6, 0xde, |
| 3359 | 0x76, 0xd4, 0xce, 0xcd, 0x94, 0xc8, 0x11, 0x98, |
| 3360 | 0x55, 0xef, 0x52, 0x97, 0xca, 0x67, 0xe9, 0xf3, |
| 3361 | 0xe7, 0xff, 0x72, 0xb1, 0xe9, 0x97, 0x85, 0xca, |
| 3362 | 0x0a, 0x7e, 0x77, 0x20, 0xc5, 0xb3, 0x6d, 0xc6, |
| 3363 | 0xd7, 0x2c, 0xac, 0x95, 0x74, 0xc8, 0xcb, 0xbc, |
| 3364 | 0x2f, 0x80, 0x1e, 0x23, 0xe5, 0x6f, 0xd3, 0x44, |
| 3365 | 0xb0, 0x7f, 0x22, 0x15, 0x4b, 0xeb, 0xa0, 0xf0, |
| 3366 | 0x8c, 0xe8, 0x89, 0x1e, 0x64, 0x3e, 0xd9, 0x95, |
| 3367 | 0xc9, 0x4d, 0x9a, 0x69, 0xc9, 0xf1, 0xb5, 0xf4, |
| 3368 | 0x99, 0x02, 0x7a, 0x78, 0x57, 0x2a, 0xee, 0xbd, |
| 3369 | 0x74, 0xd2, 0x0c, 0xc3, 0x98, 0x81, 0xc2, 0x13, |
| 3370 | 0xee, 0x77, 0x0b, 0x10, 0x10, 0xe4, 0xbe, 0xa7, |
| 3371 | 0x18, 0x84, 0x69, 0x77, 0xae, 0x11, 0x9f, 0x7a, |
| 3372 | 0x02, 0x3a, 0xb5, 0x8c, 0xca, 0x0a, 0xd7, 0x52, |
| 3373 | 0xaf, 0xe6, 0x56, 0xbb, 0x3c, 0x17, 0x25, 0x6a, |
| 3374 | 0x9f, 0x6e, 0x9b, 0xf1, 0x9f, 0xdd, 0x5a, 0x38, |
| 3375 | 0xfc, 0x82, 0xbb, 0xe8, 0x72, 0xc5, 0x53, 0x9e, |
| 3376 | 0xdb, 0x60, 0x9e, 0xf4, 0xf7, 0x9c, 0x20, 0x3e, |
| 3377 | 0xbb, 0x14, 0x0f, 0x2e, 0x58, 0x3c, 0xb2, 0xad, |
| 3378 | 0x15, 0xb4, 0xaa, 0x5b, 0x65, 0x50, 0x16, 0xa8, |
| 3379 | 0x44, 0x92, 0x77, 0xdb, 0xd4, 0x77, 0xef, 0x2c, |
| 3380 | 0x8d, 0x6c, 0x01, 0x7d, 0xb7, 0x38, 0xb1, 0x8d, |
| 3381 | 0xeb, 0x4a, 0x42, 0x7d, 0x19, 0x23, 0xce, 0x3f, |
| 3382 | 0xf2, 0x62, 0x73, 0x57, 0x79, 0xa4, 0x18, 0xf2, |
| 3383 | 0x0a, 0x28, 0x2d, 0xf9, 0x20, 0x14, 0x7b, 0xea, |
| 3384 | 0xbe, 0x42, 0x1e, 0xe5, 0x31, 0x9d, 0x05, 0x68 }, |
| 3385 | .ilen = 512, |
| 3386 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 3387 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 3388 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 3389 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| 3390 | 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, |
| 3391 | 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, |
| 3392 | 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 3393 | 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, |
| 3394 | 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, |
| 3395 | 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, |
| 3396 | 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, |
| 3397 | 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, |
| 3398 | 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, |
| 3399 | 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, |
| 3400 | 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, |
| 3401 | 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, |
| 3402 | 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, |
| 3403 | 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, |
| 3404 | 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, |
| 3405 | 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, |
| 3406 | 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, |
| 3407 | 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, |
| 3408 | 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, |
| 3409 | 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, |
| 3410 | 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, |
| 3411 | 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, |
| 3412 | 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, |
| 3413 | 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, |
| 3414 | 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, |
| 3415 | 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, |
| 3416 | 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, |
| 3417 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, |
| 3418 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 3419 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 3420 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 3421 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| 3422 | 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, |
| 3423 | 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, |
| 3424 | 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 3425 | 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, |
| 3426 | 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, |
| 3427 | 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, |
| 3428 | 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, |
| 3429 | 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, |
| 3430 | 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, |
| 3431 | 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, |
| 3432 | 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, |
| 3433 | 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, |
| 3434 | 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, |
| 3435 | 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, |
| 3436 | 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, |
| 3437 | 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, |
| 3438 | 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, |
| 3439 | 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, |
| 3440 | 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, |
| 3441 | 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, |
| 3442 | 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, |
| 3443 | 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, |
| 3444 | 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, |
| 3445 | 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, |
| 3446 | 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, |
| 3447 | 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, |
| 3448 | 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, |
| 3449 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff }, |
| 3450 | .rlen = 512, |
| 3451 | } |
| 3452 | }; |
| 3453 | |
Joy Latten | 23e353c | 2007-10-23 08:50:32 +0800 | [diff] [blame] | 3454 | |
| 3455 | static struct cipher_testvec aes_ctr_enc_tv_template[] = { |
| 3456 | { /* From RFC 3686 */ |
| 3457 | .key = { 0xae, 0x68, 0x52, 0xf8, 0x12, 0x10, 0x67, 0xcc, |
| 3458 | 0x4b, 0xf7, 0xa5, 0x76, 0x55, 0x77, 0xf3, 0x9e, |
| 3459 | 0x00, 0x00, 0x00, 0x30 }, |
| 3460 | .klen = 20, |
| 3461 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 3462 | .input = { "Single block msg" }, |
| 3463 | .ilen = 16, |
| 3464 | .result = { 0xe4, 0x09, 0x5d, 0x4f, 0xb7, 0xa7, 0xb3, 0x79, |
| 3465 | 0x2d, 0x61, 0x75, 0xa3, 0x26, 0x13, 0x11, 0xb8 }, |
| 3466 | .rlen = 16, |
| 3467 | }, { |
| 3468 | .key = { 0x7e, 0x24, 0x06, 0x78, 0x17, 0xfa, 0xe0, 0xd7, |
| 3469 | 0x43, 0xd6, 0xce, 0x1f, 0x32, 0x53, 0x91, 0x63, |
| 3470 | 0x00, 0x6c, 0xb6, 0xdb }, |
| 3471 | .klen = 20, |
| 3472 | .iv = { 0xc0, 0x54, 0x3b, 0x59, 0xda, 0x48, 0xd9, 0x0b }, |
| 3473 | .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 3474 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 3475 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 3476 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 3477 | .ilen = 32, |
| 3478 | .result = { 0x51, 0x04, 0xa1, 0x06, 0x16, 0x8a, 0x72, 0xd9, |
| 3479 | 0x79, 0x0d, 0x41, 0xee, 0x8e, 0xda, 0xd3, 0x88, |
| 3480 | 0xeb, 0x2e, 0x1e, 0xfc, 0x46, 0xda, 0x57, 0xc8, |
| 3481 | 0xfc, 0xe6, 0x30, 0xdf, 0x91, 0x41, 0xbe, 0x28 }, |
| 3482 | .rlen = 32, |
| 3483 | }, { |
| 3484 | .key = { 0x16, 0xaf, 0x5b, 0x14, 0x5f, 0xc9, 0xf5, 0x79, |
| 3485 | 0xc1, 0x75, 0xf9, 0x3e, 0x3b, 0xfb, 0x0e, 0xed, |
| 3486 | 0x86, 0x3d, 0x06, 0xcc, 0xfd, 0xb7, 0x85, 0x15, |
| 3487 | 0x00, 0x00, 0x00, 0x48 }, |
| 3488 | .klen = 28, |
| 3489 | .iv = { 0x36, 0x73, 0x3c, 0x14, 0x7d, 0x6d, 0x93, 0xcb }, |
| 3490 | .input = { "Single block msg" }, |
| 3491 | .ilen = 16, |
| 3492 | .result = { 0x4b, 0x55, 0x38, 0x4f, 0xe2, 0x59, 0xc9, 0xc8, |
| 3493 | 0x4e, 0x79, 0x35, 0xa0, 0x03, 0xcb, 0xe9, 0x28 }, |
| 3494 | .rlen = 16, |
| 3495 | }, { |
| 3496 | .key = { 0x7c, 0x5c, 0xb2, 0x40, 0x1b, 0x3d, 0xc3, 0x3c, |
| 3497 | 0x19, 0xe7, 0x34, 0x08, 0x19, 0xe0, 0xf6, 0x9c, |
| 3498 | 0x67, 0x8c, 0x3d, 0xb8, 0xe6, 0xf6, 0xa9, 0x1a, |
| 3499 | 0x00, 0x96, 0xb0, 0x3b }, |
| 3500 | .klen = 28, |
| 3501 | .iv = { 0x02, 0x0c, 0x6e, 0xad, 0xc2, 0xcb, 0x50, 0x0d }, |
| 3502 | .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 3503 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 3504 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 3505 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 3506 | .ilen = 32, |
| 3507 | .result = { 0x45, 0x32, 0x43, 0xfc, 0x60, 0x9b, 0x23, 0x32, |
| 3508 | 0x7e, 0xdf, 0xaa, 0xfa, 0x71, 0x31, 0xcd, 0x9f, |
| 3509 | 0x84, 0x90, 0x70, 0x1c, 0x5a, 0xd4, 0xa7, 0x9c, |
| 3510 | 0xfc, 0x1f, 0xe0, 0xff, 0x42, 0xf4, 0xfb, 0x00 }, |
| 3511 | .rlen = 32, |
| 3512 | }, { |
| 3513 | .key = { 0x77, 0x6b, 0xef, 0xf2, 0x85, 0x1d, 0xb0, 0x6f, |
| 3514 | 0x4c, 0x8a, 0x05, 0x42, 0xc8, 0x69, 0x6f, 0x6c, |
| 3515 | 0x6a, 0x81, 0xaf, 0x1e, 0xec, 0x96, 0xb4, 0xd3, |
| 3516 | 0x7f, 0xc1, 0xd6, 0x89, 0xe6, 0xc1, 0xc1, 0x04, |
| 3517 | 0x00, 0x00, 0x00, 0x60 }, |
| 3518 | .klen = 36, |
| 3519 | .iv = { 0xdb, 0x56, 0x72, 0xc9, 0x7a, 0xa8, 0xf0, 0xb2 }, |
| 3520 | .input = { "Single block msg" }, |
| 3521 | .ilen = 16, |
| 3522 | .result = { 0x14, 0x5a, 0xd0, 0x1d, 0xbf, 0x82, 0x4e, 0xc7, |
| 3523 | 0x56, 0x08, 0x63, 0xdc, 0x71, 0xe3, 0xe0, 0xc0 }, |
| 3524 | .rlen = 16, |
| 3525 | }, { |
| 3526 | .key = { 0xf6, 0xd6, 0x6d, 0x6b, 0xd5, 0x2d, 0x59, 0xbb, |
| 3527 | 0x07, 0x96, 0x36, 0x58, 0x79, 0xef, 0xf8, 0x86, |
| 3528 | 0xc6, 0x6d, 0xd5, 0x1a, 0x5b, 0x6a, 0x99, 0x74, |
| 3529 | 0x4b, 0x50, 0x59, 0x0c, 0x87, 0xa2, 0x38, 0x84, |
| 3530 | 0x00, 0xfa, 0xac, 0x24 }, |
| 3531 | .klen = 36, |
| 3532 | .iv = { 0xc1, 0x58, 0x5e, 0xf1, 0x5a, 0x43, 0xd8, 0x75 }, |
| 3533 | .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 3534 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 3535 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 3536 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 3537 | .ilen = 32, |
| 3538 | .result = { 0xf0, 0x5e, 0x23, 0x1b, 0x38, 0x94, 0x61, 0x2c, |
| 3539 | 0x49, 0xee, 0x00, 0x0b, 0x80, 0x4e, 0xb2, 0xa9, |
| 3540 | 0xb8, 0x30, 0x6b, 0x50, 0x8f, 0x83, 0x9d, 0x6a, |
| 3541 | 0x55, 0x30, 0x83, 0x1d, 0x93, 0x44, 0xaf, 0x1c }, |
| 3542 | .rlen = 32, |
Tan Swee Heng | a773edb | 2007-11-30 00:36:07 +1100 | [diff] [blame] | 3543 | }, { |
| 3544 | // generated using Crypto++ |
| 3545 | .key = { |
| 3546 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 3547 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 3548 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 3549 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| 3550 | 0x00, 0x00, 0x00, 0x00, |
| 3551 | }, |
| 3552 | .klen = 32 + 4, |
| 3553 | .iv = { |
| 3554 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 3555 | }, |
| 3556 | .input = { |
| 3557 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 3558 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 3559 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 3560 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| 3561 | 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, |
| 3562 | 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, |
| 3563 | 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, |
| 3564 | 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, |
| 3565 | 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, |
| 3566 | 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, |
| 3567 | 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, |
| 3568 | 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, |
| 3569 | 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, |
| 3570 | 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, |
| 3571 | 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, |
| 3572 | 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, |
| 3573 | 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, |
| 3574 | 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, |
| 3575 | 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, |
| 3576 | 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, |
| 3577 | 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, |
| 3578 | 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, |
| 3579 | 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, |
| 3580 | 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, |
| 3581 | 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, |
| 3582 | 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, |
| 3583 | 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, |
| 3584 | 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, |
| 3585 | 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, |
| 3586 | 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, |
| 3587 | 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, |
| 3588 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, |
| 3589 | 0x00, 0x03, 0x06, 0x09, 0x0c, 0x0f, 0x12, 0x15, |
| 3590 | 0x18, 0x1b, 0x1e, 0x21, 0x24, 0x27, 0x2a, 0x2d, |
| 3591 | 0x30, 0x33, 0x36, 0x39, 0x3c, 0x3f, 0x42, 0x45, |
| 3592 | 0x48, 0x4b, 0x4e, 0x51, 0x54, 0x57, 0x5a, 0x5d, |
| 3593 | 0x60, 0x63, 0x66, 0x69, 0x6c, 0x6f, 0x72, 0x75, |
| 3594 | 0x78, 0x7b, 0x7e, 0x81, 0x84, 0x87, 0x8a, 0x8d, |
| 3595 | 0x90, 0x93, 0x96, 0x99, 0x9c, 0x9f, 0xa2, 0xa5, |
| 3596 | 0xa8, 0xab, 0xae, 0xb1, 0xb4, 0xb7, 0xba, 0xbd, |
| 3597 | 0xc0, 0xc3, 0xc6, 0xc9, 0xcc, 0xcf, 0xd2, 0xd5, |
| 3598 | 0xd8, 0xdb, 0xde, 0xe1, 0xe4, 0xe7, 0xea, 0xed, |
| 3599 | 0xf0, 0xf3, 0xf6, 0xf9, 0xfc, 0xff, 0x02, 0x05, |
| 3600 | 0x08, 0x0b, 0x0e, 0x11, 0x14, 0x17, 0x1a, 0x1d, |
| 3601 | 0x20, 0x23, 0x26, 0x29, 0x2c, 0x2f, 0x32, 0x35, |
| 3602 | 0x38, 0x3b, 0x3e, 0x41, 0x44, 0x47, 0x4a, 0x4d, |
| 3603 | 0x50, 0x53, 0x56, 0x59, 0x5c, 0x5f, 0x62, 0x65, |
| 3604 | 0x68, 0x6b, 0x6e, 0x71, 0x74, 0x77, 0x7a, 0x7d, |
| 3605 | 0x80, 0x83, 0x86, 0x89, 0x8c, 0x8f, 0x92, 0x95, |
| 3606 | 0x98, 0x9b, 0x9e, 0xa1, 0xa4, 0xa7, 0xaa, 0xad, |
| 3607 | 0xb0, 0xb3, 0xb6, 0xb9, 0xbc, 0xbf, 0xc2, 0xc5, |
| 3608 | 0xc8, 0xcb, 0xce, 0xd1, 0xd4, 0xd7, 0xda, 0xdd, |
| 3609 | 0xe0, 0xe3, 0xe6, 0xe9, 0xec, 0xef, 0xf2, 0xf5, |
| 3610 | 0xf8, 0xfb, 0xfe, 0x01, 0x04, 0x07, 0x0a, 0x0d, |
| 3611 | 0x10, 0x13, 0x16, 0x19, 0x1c, 0x1f, 0x22, 0x25, |
| 3612 | 0x28, 0x2b, 0x2e, 0x31, 0x34, 0x37, 0x3a, 0x3d, |
| 3613 | 0x40, 0x43, 0x46, 0x49, 0x4c, 0x4f, 0x52, 0x55, |
| 3614 | 0x58, 0x5b, 0x5e, 0x61, 0x64, 0x67, 0x6a, 0x6d, |
| 3615 | 0x70, 0x73, 0x76, 0x79, 0x7c, 0x7f, 0x82, 0x85, |
| 3616 | 0x88, 0x8b, 0x8e, 0x91, 0x94, 0x97, 0x9a, 0x9d, |
| 3617 | 0xa0, 0xa3, 0xa6, 0xa9, 0xac, 0xaf, 0xb2, 0xb5, |
| 3618 | 0xb8, 0xbb, 0xbe, 0xc1, 0xc4, 0xc7, 0xca, 0xcd, |
| 3619 | 0xd0, 0xd3, 0xd6, 0xd9, 0xdc, 0xdf, 0xe2, 0xe5, |
| 3620 | 0xe8, 0xeb, 0xee, 0xf1, 0xf4, 0xf7, 0xfa, 0xfd, |
| 3621 | 0x00, 0x05, 0x0a, 0x0f, 0x14, 0x19, 0x1e, 0x23, |
| 3622 | 0x28, 0x2d, 0x32, 0x37, 0x3c, 0x41, 0x46, 0x4b, |
| 3623 | 0x50, 0x55, 0x5a, 0x5f, 0x64, 0x69, 0x6e, 0x73, |
| 3624 | 0x78, 0x7d, 0x82, 0x87, 0x8c, 0x91, 0x96, 0x9b, |
| 3625 | 0xa0, 0xa5, 0xaa, 0xaf, 0xb4, 0xb9, 0xbe, 0xc3, |
| 3626 | 0xc8, 0xcd, 0xd2, 0xd7, 0xdc, 0xe1, 0xe6, 0xeb, |
| 3627 | 0xf0, 0xf5, 0xfa, 0xff, 0x04, 0x09, 0x0e, 0x13, |
| 3628 | 0x18, 0x1d, 0x22, 0x27, 0x2c, 0x31, 0x36, 0x3b, |
| 3629 | 0x40, 0x45, 0x4a, 0x4f, 0x54, 0x59, 0x5e, 0x63, |
| 3630 | 0x68, 0x6d, 0x72, 0x77, 0x7c, 0x81, 0x86, 0x8b, |
| 3631 | 0x90, 0x95, 0x9a, 0x9f, 0xa4, 0xa9, 0xae, 0xb3, |
| 3632 | 0xb8, 0xbd, 0xc2, 0xc7, 0xcc, 0xd1, 0xd6, 0xdb, |
| 3633 | 0xe0, 0xe5, 0xea, 0xef, 0xf4, 0xf9, 0xfe, 0x03, |
| 3634 | 0x08, 0x0d, 0x12, 0x17, 0x1c, 0x21, 0x26, 0x2b, |
| 3635 | 0x30, 0x35, 0x3a, 0x3f, 0x44, 0x49, 0x4e, 0x53, |
| 3636 | 0x58, 0x5d, 0x62, 0x67, 0x6c, 0x71, 0x76, 0x7b, |
| 3637 | 0x80, 0x85, 0x8a, 0x8f, 0x94, 0x99, 0x9e, 0xa3, |
| 3638 | 0xa8, 0xad, 0xb2, 0xb7, 0xbc, 0xc1, 0xc6, 0xcb, |
| 3639 | 0xd0, 0xd5, 0xda, 0xdf, 0xe4, 0xe9, 0xee, 0xf3, |
| 3640 | 0xf8, 0xfd, 0x02, 0x07, 0x0c, 0x11, 0x16, 0x1b, |
| 3641 | 0x20, 0x25, 0x2a, 0x2f, 0x34, 0x39, 0x3e, 0x43, |
| 3642 | 0x48, 0x4d, 0x52, 0x57, 0x5c, 0x61, 0x66, 0x6b, |
| 3643 | 0x70, 0x75, 0x7a, 0x7f, 0x84, 0x89, 0x8e, 0x93, |
| 3644 | 0x98, 0x9d, 0xa2, 0xa7, 0xac, 0xb1, 0xb6, 0xbb, |
| 3645 | 0xc0, 0xc5, 0xca, 0xcf, 0xd4, 0xd9, 0xde, 0xe3, |
| 3646 | 0xe8, 0xed, 0xf2, 0xf7, 0xfc, 0x01, 0x06, 0x0b, |
| 3647 | 0x10, 0x15, 0x1a, 0x1f, 0x24, 0x29, 0x2e, 0x33, |
| 3648 | 0x38, 0x3d, 0x42, 0x47, 0x4c, 0x51, 0x56, 0x5b, |
| 3649 | 0x60, 0x65, 0x6a, 0x6f, 0x74, 0x79, 0x7e, 0x83, |
| 3650 | 0x88, 0x8d, 0x92, 0x97, 0x9c, 0xa1, 0xa6, 0xab, |
| 3651 | 0xb0, 0xb5, 0xba, 0xbf, 0xc4, 0xc9, 0xce, 0xd3, |
| 3652 | 0xd8, 0xdd, 0xe2, 0xe7, 0xec, 0xf1, 0xf6, 0xfb, |
| 3653 | 0x00, 0x07, 0x0e, 0x15, 0x1c, 0x23, 0x2a, 0x31, |
| 3654 | 0x38, 0x3f, 0x46, 0x4d, 0x54, 0x5b, 0x62, 0x69, |
| 3655 | 0x70, 0x77, 0x7e, 0x85, 0x8c, 0x93, 0x9a, 0xa1, |
| 3656 | 0xa8, 0xaf, 0xb6, 0xbd, 0xc4, 0xcb, 0xd2, 0xd9, |
| 3657 | 0xe0, 0xe7, 0xee, 0xf5, 0xfc, 0x03, 0x0a, 0x11, |
| 3658 | 0x18, 0x1f, 0x26, 0x2d, 0x34, 0x3b, 0x42, 0x49, |
| 3659 | 0x50, 0x57, 0x5e, 0x65, 0x6c, 0x73, 0x7a, 0x81, |
| 3660 | 0x88, 0x8f, 0x96, 0x9d, 0xa4, 0xab, 0xb2, 0xb9, |
| 3661 | 0xc0, 0xc7, 0xce, 0xd5, 0xdc, 0xe3, 0xea, 0xf1, |
| 3662 | 0xf8, 0xff, 0x06, 0x0d, 0x14, 0x1b, 0x22, 0x29, |
| 3663 | 0x30, 0x37, 0x3e, 0x45, 0x4c, 0x53, 0x5a, 0x61, |
| 3664 | 0x68, 0x6f, 0x76, 0x7d, 0x84, 0x8b, 0x92, 0x99, |
| 3665 | 0xa0, 0xa7, 0xae, 0xb5, 0xbc, 0xc3, 0xca, 0xd1, |
| 3666 | 0xd8, 0xdf, 0xe6, 0xed, 0xf4, 0xfb, 0x02, 0x09, |
| 3667 | 0x10, 0x17, 0x1e, 0x25, 0x2c, 0x33, 0x3a, 0x41, |
| 3668 | 0x48, 0x4f, 0x56, 0x5d, 0x64, 0x6b, 0x72, 0x79, |
| 3669 | 0x80, 0x87, 0x8e, 0x95, 0x9c, 0xa3, 0xaa, 0xb1, |
| 3670 | 0xb8, 0xbf, 0xc6, 0xcd, 0xd4, 0xdb, 0xe2, 0xe9, |
| 3671 | 0xf0, 0xf7, 0xfe, 0x05, 0x0c, 0x13, 0x1a, 0x21, |
| 3672 | 0x28, 0x2f, 0x36, 0x3d, 0x44, 0x4b, 0x52, 0x59, |
| 3673 | 0x60, 0x67, 0x6e, 0x75, 0x7c, 0x83, 0x8a, 0x91, |
| 3674 | 0x98, 0x9f, 0xa6, 0xad, 0xb4, 0xbb, 0xc2, 0xc9, |
| 3675 | 0xd0, 0xd7, 0xde, 0xe5, 0xec, 0xf3, 0xfa, 0x01, |
| 3676 | 0x08, 0x0f, 0x16, 0x1d, 0x24, 0x2b, 0x32, 0x39, |
| 3677 | 0x40, 0x47, 0x4e, 0x55, 0x5c, 0x63, 0x6a, 0x71, |
| 3678 | 0x78, 0x7f, 0x86, 0x8d, 0x94, 0x9b, 0xa2, 0xa9, |
| 3679 | 0xb0, 0xb7, 0xbe, 0xc5, 0xcc, 0xd3, 0xda, 0xe1, |
| 3680 | 0xe8, 0xef, 0xf6, 0xfd, 0x04, 0x0b, 0x12, 0x19, |
| 3681 | 0x20, 0x27, 0x2e, 0x35, 0x3c, 0x43, 0x4a, 0x51, |
| 3682 | 0x58, 0x5f, 0x66, 0x6d, 0x74, 0x7b, 0x82, 0x89, |
| 3683 | 0x90, 0x97, 0x9e, 0xa5, 0xac, 0xb3, 0xba, 0xc1, |
| 3684 | 0xc8, 0xcf, 0xd6, 0xdd, 0xe4, 0xeb, 0xf2, 0xf9, |
| 3685 | 0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, |
| 3686 | 0x48, 0x51, 0x5a, 0x63, 0x6c, 0x75, 0x7e, 0x87, |
| 3687 | 0x90, 0x99, 0xa2, 0xab, 0xb4, 0xbd, 0xc6, 0xcf, |
| 3688 | 0xd8, 0xe1, 0xea, 0xf3, 0xfc, 0x05, 0x0e, 0x17, |
| 3689 | 0x20, 0x29, 0x32, 0x3b, 0x44, 0x4d, 0x56, 0x5f, |
| 3690 | 0x68, 0x71, 0x7a, 0x83, 0x8c, 0x95, 0x9e, 0xa7, |
| 3691 | 0xb0, 0xb9, 0xc2, 0xcb, 0xd4, 0xdd, 0xe6, 0xef, |
| 3692 | 0xf8, 0x01, 0x0a, 0x13, 0x1c, 0x25, 0x2e, 0x37, |
| 3693 | 0x40, 0x49, 0x52, 0x5b, 0x64, 0x6d, 0x76, 0x7f, |
| 3694 | 0x88, 0x91, 0x9a, 0xa3, 0xac, 0xb5, 0xbe, 0xc7, |
| 3695 | 0xd0, 0xd9, 0xe2, 0xeb, 0xf4, 0xfd, 0x06, 0x0f, |
| 3696 | 0x18, 0x21, 0x2a, 0x33, 0x3c, 0x45, 0x4e, 0x57, |
| 3697 | 0x60, 0x69, 0x72, 0x7b, 0x84, 0x8d, 0x96, 0x9f, |
| 3698 | 0xa8, 0xb1, 0xba, 0xc3, 0xcc, 0xd5, 0xde, 0xe7, |
| 3699 | 0xf0, 0xf9, 0x02, 0x0b, 0x14, 0x1d, 0x26, 0x2f, |
| 3700 | 0x38, 0x41, 0x4a, 0x53, 0x5c, 0x65, 0x6e, 0x77, |
| 3701 | 0x80, 0x89, 0x92, 0x9b, 0xa4, 0xad, 0xb6, 0xbf, |
| 3702 | 0xc8, 0xd1, 0xda, 0xe3, 0xec, 0xf5, 0xfe, 0x07, |
| 3703 | 0x10, 0x19, 0x22, 0x2b, 0x34, 0x3d, 0x46, 0x4f, |
| 3704 | 0x58, 0x61, 0x6a, 0x73, 0x7c, 0x85, 0x8e, 0x97, |
| 3705 | 0xa0, 0xa9, 0xb2, 0xbb, 0xc4, 0xcd, 0xd6, 0xdf, |
| 3706 | 0xe8, 0xf1, 0xfa, 0x03, 0x0c, 0x15, 0x1e, 0x27, |
| 3707 | 0x30, 0x39, 0x42, 0x4b, 0x54, 0x5d, 0x66, 0x6f, |
| 3708 | 0x78, 0x81, 0x8a, 0x93, 0x9c, 0xa5, 0xae, 0xb7, |
| 3709 | 0xc0, 0xc9, 0xd2, 0xdb, 0xe4, 0xed, 0xf6, 0xff, |
| 3710 | 0x08, 0x11, 0x1a, 0x23, 0x2c, 0x35, 0x3e, 0x47, |
| 3711 | 0x50, 0x59, 0x62, 0x6b, 0x74, 0x7d, 0x86, 0x8f, |
| 3712 | 0x98, 0xa1, 0xaa, 0xb3, 0xbc, 0xc5, 0xce, 0xd7, |
| 3713 | 0xe0, 0xe9, 0xf2, 0xfb, 0x04, 0x0d, 0x16, 0x1f, |
| 3714 | 0x28, 0x31, 0x3a, 0x43, 0x4c, 0x55, 0x5e, 0x67, |
| 3715 | 0x70, 0x79, 0x82, 0x8b, 0x94, 0x9d, 0xa6, 0xaf, |
| 3716 | 0xb8, 0xc1, 0xca, 0xd3, 0xdc, 0xe5, 0xee, 0xf7, |
| 3717 | 0x00, 0x0b, 0x16, 0x21, 0x2c, 0x37, 0x42, 0x4d, |
| 3718 | 0x58, 0x63, 0x6e, 0x79, 0x84, 0x8f, 0x9a, 0xa5, |
| 3719 | 0xb0, 0xbb, 0xc6, 0xd1, 0xdc, 0xe7, 0xf2, 0xfd, |
| 3720 | 0x08, 0x13, 0x1e, 0x29, 0x34, 0x3f, 0x4a, 0x55, |
| 3721 | 0x60, 0x6b, 0x76, 0x81, 0x8c, 0x97, 0xa2, 0xad, |
| 3722 | 0xb8, 0xc3, 0xce, 0xd9, 0xe4, 0xef, 0xfa, 0x05, |
| 3723 | 0x10, 0x1b, 0x26, 0x31, 0x3c, 0x47, 0x52, 0x5d, |
| 3724 | 0x68, 0x73, 0x7e, 0x89, 0x94, 0x9f, 0xaa, 0xb5, |
| 3725 | 0xc0, 0xcb, 0xd6, 0xe1, 0xec, 0xf7, 0x02, 0x0d, |
| 3726 | 0x18, 0x23, 0x2e, 0x39, 0x44, 0x4f, 0x5a, 0x65, |
| 3727 | 0x70, 0x7b, 0x86, 0x91, 0x9c, 0xa7, 0xb2, 0xbd, |
| 3728 | 0xc8, 0xd3, 0xde, 0xe9, 0xf4, 0xff, 0x0a, 0x15, |
| 3729 | 0x20, 0x2b, 0x36, 0x41, 0x4c, 0x57, 0x62, 0x6d, |
| 3730 | 0x78, 0x83, 0x8e, 0x99, 0xa4, 0xaf, 0xba, 0xc5, |
| 3731 | 0xd0, 0xdb, 0xe6, 0xf1, 0xfc, 0x07, 0x12, 0x1d, |
| 3732 | 0x28, 0x33, 0x3e, 0x49, 0x54, 0x5f, 0x6a, 0x75, |
| 3733 | 0x80, 0x8b, 0x96, 0xa1, 0xac, 0xb7, 0xc2, 0xcd, |
| 3734 | 0xd8, 0xe3, 0xee, 0xf9, 0x04, 0x0f, 0x1a, 0x25, |
| 3735 | 0x30, 0x3b, 0x46, 0x51, 0x5c, 0x67, 0x72, 0x7d, |
| 3736 | 0x88, 0x93, 0x9e, 0xa9, 0xb4, 0xbf, 0xca, 0xd5, |
| 3737 | 0xe0, 0xeb, 0xf6, 0x01, 0x0c, 0x17, 0x22, 0x2d, |
| 3738 | 0x38, 0x43, 0x4e, 0x59, 0x64, 0x6f, 0x7a, 0x85, |
| 3739 | 0x90, 0x9b, 0xa6, 0xb1, 0xbc, 0xc7, 0xd2, 0xdd, |
| 3740 | 0xe8, 0xf3, 0xfe, 0x09, 0x14, 0x1f, 0x2a, 0x35, |
| 3741 | 0x40, 0x4b, 0x56, 0x61, 0x6c, 0x77, 0x82, 0x8d, |
| 3742 | 0x98, 0xa3, 0xae, 0xb9, 0xc4, 0xcf, 0xda, 0xe5, |
| 3743 | 0xf0, 0xfb, 0x06, 0x11, 0x1c, 0x27, 0x32, 0x3d, |
| 3744 | 0x48, 0x53, 0x5e, 0x69, 0x74, 0x7f, 0x8a, 0x95, |
| 3745 | 0xa0, 0xab, 0xb6, 0xc1, 0xcc, 0xd7, 0xe2, 0xed, |
| 3746 | 0xf8, 0x03, 0x0e, 0x19, 0x24, 0x2f, 0x3a, 0x45, |
| 3747 | 0x50, 0x5b, 0x66, 0x71, 0x7c, 0x87, 0x92, 0x9d, |
| 3748 | 0xa8, 0xb3, 0xbe, 0xc9, 0xd4, 0xdf, 0xea, 0xf5, |
| 3749 | 0x00, 0x0d, 0x1a, 0x27, 0x34, 0x41, 0x4e, 0x5b, |
| 3750 | 0x68, 0x75, 0x82, 0x8f, 0x9c, 0xa9, 0xb6, 0xc3, |
| 3751 | 0xd0, 0xdd, 0xea, 0xf7, 0x04, 0x11, 0x1e, 0x2b, |
| 3752 | 0x38, 0x45, 0x52, 0x5f, 0x6c, 0x79, 0x86, 0x93, |
| 3753 | 0xa0, 0xad, 0xba, 0xc7, 0xd4, 0xe1, 0xee, 0xfb, |
| 3754 | 0x08, 0x15, 0x22, 0x2f, 0x3c, 0x49, 0x56, 0x63, |
| 3755 | 0x70, 0x7d, 0x8a, 0x97, 0xa4, 0xb1, 0xbe, 0xcb, |
| 3756 | 0xd8, 0xe5, 0xf2, 0xff, 0x0c, 0x19, 0x26, 0x33, |
| 3757 | 0x40, 0x4d, 0x5a, 0x67, 0x74, 0x81, 0x8e, 0x9b, |
| 3758 | 0xa8, 0xb5, 0xc2, 0xcf, 0xdc, 0xe9, 0xf6, 0x03, |
| 3759 | 0x10, 0x1d, 0x2a, 0x37, 0x44, 0x51, 0x5e, 0x6b, |
| 3760 | 0x78, 0x85, 0x92, 0x9f, 0xac, 0xb9, 0xc6, 0xd3, |
| 3761 | 0xe0, 0xed, 0xfa, 0x07, 0x14, 0x21, 0x2e, 0x3b, |
| 3762 | 0x48, 0x55, 0x62, 0x6f, 0x7c, 0x89, 0x96, 0xa3, |
| 3763 | 0xb0, 0xbd, 0xca, 0xd7, 0xe4, 0xf1, 0xfe, 0x0b, |
| 3764 | 0x18, 0x25, 0x32, 0x3f, 0x4c, 0x59, 0x66, 0x73, |
| 3765 | 0x80, 0x8d, 0x9a, 0xa7, 0xb4, 0xc1, 0xce, 0xdb, |
| 3766 | 0xe8, 0xf5, 0x02, 0x0f, 0x1c, 0x29, 0x36, 0x43, |
| 3767 | 0x50, 0x5d, 0x6a, 0x77, 0x84, 0x91, 0x9e, 0xab, |
| 3768 | 0xb8, 0xc5, 0xd2, 0xdf, 0xec, 0xf9, 0x06, 0x13, |
| 3769 | 0x20, 0x2d, 0x3a, 0x47, 0x54, 0x61, 0x6e, 0x7b, |
| 3770 | 0x88, 0x95, 0xa2, 0xaf, 0xbc, 0xc9, 0xd6, 0xe3, |
| 3771 | 0xf0, 0xfd, 0x0a, 0x17, 0x24, 0x31, 0x3e, 0x4b, |
| 3772 | 0x58, 0x65, 0x72, 0x7f, 0x8c, 0x99, 0xa6, 0xb3, |
| 3773 | 0xc0, 0xcd, 0xda, 0xe7, 0xf4, 0x01, 0x0e, 0x1b, |
| 3774 | 0x28, 0x35, 0x42, 0x4f, 0x5c, 0x69, 0x76, 0x83, |
| 3775 | 0x90, 0x9d, 0xaa, 0xb7, 0xc4, 0xd1, 0xde, 0xeb, |
| 3776 | 0xf8, 0x05, 0x12, 0x1f, 0x2c, 0x39, 0x46, 0x53, |
| 3777 | 0x60, 0x6d, 0x7a, 0x87, 0x94, 0xa1, 0xae, 0xbb, |
| 3778 | 0xc8, 0xd5, 0xe2, 0xef, 0xfc, 0x09, 0x16, 0x23, |
| 3779 | 0x30, 0x3d, 0x4a, 0x57, 0x64, 0x71, 0x7e, 0x8b, |
| 3780 | 0x98, 0xa5, 0xb2, 0xbf, 0xcc, 0xd9, 0xe6, 0xf3, |
| 3781 | 0x00, 0x0f, 0x1e, 0x2d, 0x3c, 0x4b, 0x5a, 0x69, |
| 3782 | 0x78, 0x87, 0x96, 0xa5, 0xb4, 0xc3, 0xd2, 0xe1, |
| 3783 | 0xf0, 0xff, 0x0e, 0x1d, 0x2c, 0x3b, 0x4a, 0x59, |
| 3784 | 0x68, 0x77, 0x86, 0x95, 0xa4, 0xb3, 0xc2, 0xd1, |
| 3785 | 0xe0, 0xef, 0xfe, 0x0d, 0x1c, 0x2b, 0x3a, 0x49, |
| 3786 | 0x58, 0x67, 0x76, 0x85, 0x94, 0xa3, 0xb2, 0xc1, |
| 3787 | 0xd0, 0xdf, 0xee, 0xfd, 0x0c, 0x1b, 0x2a, 0x39, |
| 3788 | 0x48, 0x57, 0x66, 0x75, 0x84, 0x93, 0xa2, 0xb1, |
| 3789 | 0xc0, 0xcf, 0xde, 0xed, 0xfc, 0x0b, 0x1a, 0x29, |
| 3790 | 0x38, 0x47, 0x56, 0x65, 0x74, 0x83, 0x92, 0xa1, |
| 3791 | 0xb0, 0xbf, 0xce, 0xdd, 0xec, 0xfb, 0x0a, 0x19, |
| 3792 | 0x28, 0x37, 0x46, 0x55, 0x64, 0x73, 0x82, 0x91, |
| 3793 | 0xa0, 0xaf, 0xbe, 0xcd, 0xdc, 0xeb, 0xfa, 0x09, |
| 3794 | 0x18, 0x27, 0x36, 0x45, 0x54, 0x63, 0x72, 0x81, |
| 3795 | 0x90, 0x9f, 0xae, 0xbd, 0xcc, 0xdb, 0xea, 0xf9, |
| 3796 | 0x08, 0x17, 0x26, 0x35, 0x44, 0x53, 0x62, 0x71, |
| 3797 | 0x80, 0x8f, 0x9e, 0xad, 0xbc, 0xcb, 0xda, 0xe9, |
| 3798 | 0xf8, 0x07, 0x16, 0x25, 0x34, 0x43, 0x52, 0x61, |
| 3799 | 0x70, 0x7f, 0x8e, 0x9d, 0xac, 0xbb, 0xca, 0xd9, |
| 3800 | 0xe8, 0xf7, 0x06, 0x15, 0x24, 0x33, 0x42, 0x51, |
| 3801 | 0x60, 0x6f, 0x7e, 0x8d, 0x9c, 0xab, 0xba, 0xc9, |
| 3802 | 0xd8, 0xe7, 0xf6, 0x05, 0x14, 0x23, 0x32, 0x41, |
| 3803 | 0x50, 0x5f, 0x6e, 0x7d, 0x8c, 0x9b, 0xaa, 0xb9, |
| 3804 | 0xc8, 0xd7, 0xe6, 0xf5, 0x04, 0x13, 0x22, 0x31, |
| 3805 | 0x40, 0x4f, 0x5e, 0x6d, 0x7c, 0x8b, 0x9a, 0xa9, |
| 3806 | 0xb8, 0xc7, 0xd6, 0xe5, 0xf4, 0x03, 0x12, 0x21, |
| 3807 | 0x30, 0x3f, 0x4e, 0x5d, 0x6c, 0x7b, 0x8a, 0x99, |
| 3808 | 0xa8, 0xb7, 0xc6, 0xd5, 0xe4, 0xf3, 0x02, 0x11, |
| 3809 | 0x20, 0x2f, 0x3e, 0x4d, 0x5c, 0x6b, 0x7a, 0x89, |
| 3810 | 0x98, 0xa7, 0xb6, 0xc5, 0xd4, 0xe3, 0xf2, 0x01, |
| 3811 | 0x10, 0x1f, 0x2e, 0x3d, 0x4c, 0x5b, 0x6a, 0x79, |
| 3812 | 0x88, 0x97, 0xa6, 0xb5, 0xc4, 0xd3, 0xe2, 0xf1, |
| 3813 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
| 3814 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, |
| 3815 | 0x10, 0x21, 0x32, 0x43, 0x54, 0x65, 0x76, 0x87, |
| 3816 | 0x98, 0xa9, 0xba, 0xcb, 0xdc, 0xed, 0xfe, 0x0f, |
| 3817 | 0x20, 0x31, 0x42, 0x53, 0x64, 0x75, 0x86, 0x97, |
| 3818 | 0xa8, 0xb9, 0xca, 0xdb, 0xec, 0xfd, 0x0e, 0x1f, |
| 3819 | 0x30, 0x41, 0x52, 0x63, 0x74, 0x85, 0x96, 0xa7, |
| 3820 | 0xb8, 0xc9, 0xda, 0xeb, 0xfc, 0x0d, 0x1e, 0x2f, |
| 3821 | 0x40, 0x51, 0x62, 0x73, 0x84, 0x95, 0xa6, 0xb7, |
| 3822 | 0xc8, 0xd9, 0xea, 0xfb, 0x0c, 0x1d, 0x2e, 0x3f, |
| 3823 | 0x50, 0x61, 0x72, 0x83, 0x94, 0xa5, 0xb6, 0xc7, |
| 3824 | 0xd8, 0xe9, 0xfa, 0x0b, 0x1c, 0x2d, 0x3e, 0x4f, |
| 3825 | 0x60, 0x71, 0x82, 0x93, 0xa4, 0xb5, 0xc6, 0xd7, |
| 3826 | 0xe8, 0xf9, 0x0a, 0x1b, 0x2c, 0x3d, 0x4e, 0x5f, |
| 3827 | 0x70, 0x81, 0x92, 0xa3, 0xb4, 0xc5, 0xd6, 0xe7, |
| 3828 | 0xf8, 0x09, 0x1a, 0x2b, 0x3c, 0x4d, 0x5e, 0x6f, |
| 3829 | 0x80, 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7, |
| 3830 | 0x08, 0x19, 0x2a, 0x3b, 0x4c, 0x5d, 0x6e, 0x7f, |
| 3831 | 0x90, 0xa1, 0xb2, 0xc3, 0xd4, 0xe5, 0xf6, 0x07, |
| 3832 | 0x18, 0x29, 0x3a, 0x4b, 0x5c, 0x6d, 0x7e, 0x8f, |
| 3833 | 0xa0, 0xb1, 0xc2, 0xd3, 0xe4, 0xf5, 0x06, 0x17, |
| 3834 | 0x28, 0x39, 0x4a, 0x5b, 0x6c, 0x7d, 0x8e, 0x9f, |
| 3835 | 0xb0, 0xc1, 0xd2, 0xe3, 0xf4, 0x05, 0x16, 0x27, |
| 3836 | 0x38, 0x49, 0x5a, 0x6b, 0x7c, 0x8d, 0x9e, 0xaf, |
| 3837 | 0xc0, 0xd1, 0xe2, 0xf3, 0x04, 0x15, 0x26, 0x37, |
| 3838 | 0x48, 0x59, 0x6a, 0x7b, 0x8c, 0x9d, 0xae, 0xbf, |
| 3839 | 0xd0, 0xe1, 0xf2, 0x03, 0x14, 0x25, 0x36, 0x47, |
| 3840 | 0x58, 0x69, 0x7a, 0x8b, 0x9c, 0xad, 0xbe, 0xcf, |
| 3841 | 0xe0, 0xf1, 0x02, 0x13, 0x24, 0x35, 0x46, 0x57, |
| 3842 | 0x68, 0x79, 0x8a, 0x9b, 0xac, 0xbd, 0xce, 0xdf, |
| 3843 | 0xf0, 0x01, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, |
| 3844 | 0x78, 0x89, 0x9a, 0xab, 0xbc, 0xcd, 0xde, 0xef, |
| 3845 | 0x00, 0x13, 0x26, 0x39, 0x4c, 0x5f, 0x72, 0x85, |
| 3846 | 0x98, 0xab, 0xbe, 0xd1, 0xe4, 0xf7, 0x0a, 0x1d, |
| 3847 | 0x30, 0x43, 0x56, 0x69, 0x7c, 0x8f, 0xa2, 0xb5, |
| 3848 | 0xc8, 0xdb, 0xee, 0x01, 0x14, 0x27, 0x3a, 0x4d, |
| 3849 | 0x60, 0x73, 0x86, 0x99, 0xac, 0xbf, 0xd2, 0xe5, |
| 3850 | 0xf8, 0x0b, 0x1e, 0x31, 0x44, 0x57, 0x6a, 0x7d, |
| 3851 | 0x90, 0xa3, 0xb6, 0xc9, 0xdc, 0xef, 0x02, 0x15, |
| 3852 | 0x28, 0x3b, 0x4e, 0x61, 0x74, 0x87, 0x9a, 0xad, |
| 3853 | 0xc0, 0xd3, 0xe6, 0xf9, 0x0c, 0x1f, 0x32, 0x45, |
| 3854 | 0x58, 0x6b, 0x7e, 0x91, 0xa4, 0xb7, 0xca, 0xdd, |
| 3855 | 0xf0, 0x03, 0x16, 0x29, 0x3c, 0x4f, 0x62, 0x75, |
| 3856 | 0x88, 0x9b, 0xae, 0xc1, 0xd4, 0xe7, 0xfa, 0x0d, |
| 3857 | 0x20, 0x33, 0x46, 0x59, 0x6c, 0x7f, 0x92, 0xa5, |
| 3858 | 0xb8, 0xcb, 0xde, 0xf1, 0x04, 0x17, 0x2a, 0x3d, |
| 3859 | 0x50, 0x63, 0x76, 0x89, 0x9c, 0xaf, 0xc2, 0xd5, |
| 3860 | 0xe8, 0xfb, 0x0e, 0x21, 0x34, 0x47, 0x5a, 0x6d, |
| 3861 | 0x80, 0x93, 0xa6, 0xb9, 0xcc, 0xdf, 0xf2, 0x05, |
| 3862 | 0x18, 0x2b, 0x3e, 0x51, 0x64, 0x77, 0x8a, 0x9d, |
| 3863 | 0xb0, 0xc3, 0xd6, 0xe9, 0xfc, 0x0f, 0x22, 0x35, |
| 3864 | 0x48, 0x5b, 0x6e, 0x81, 0x94, 0xa7, 0xba, 0xcd, |
| 3865 | 0xe0, 0xf3, 0x06, 0x19, 0x2c, 0x3f, 0x52, 0x65, |
| 3866 | 0x78, 0x8b, 0x9e, 0xb1, 0xc4, 0xd7, 0xea, 0xfd, |
| 3867 | 0x10, 0x23, 0x36, 0x49, 0x5c, 0x6f, 0x82, 0x95, |
| 3868 | 0xa8, 0xbb, 0xce, 0xe1, 0xf4, 0x07, 0x1a, 0x2d, |
| 3869 | 0x40, 0x53, 0x66, 0x79, 0x8c, 0x9f, 0xb2, 0xc5, |
| 3870 | 0xd8, 0xeb, 0xfe, 0x11, 0x24, 0x37, 0x4a, 0x5d, |
| 3871 | 0x70, 0x83, 0x96, 0xa9, 0xbc, 0xcf, 0xe2, 0xf5, |
| 3872 | 0x08, 0x1b, 0x2e, 0x41, 0x54, 0x67, 0x7a, 0x8d, |
| 3873 | 0xa0, 0xb3, 0xc6, 0xd9, 0xec, 0xff, 0x12, 0x25, |
| 3874 | 0x38, 0x4b, 0x5e, 0x71, 0x84, 0x97, 0xaa, 0xbd, |
| 3875 | 0xd0, 0xe3, 0xf6, 0x09, 0x1c, 0x2f, 0x42, 0x55, |
| 3876 | 0x68, 0x7b, 0x8e, 0xa1, 0xb4, 0xc7, 0xda, 0xed, |
| 3877 | 0x00, 0x15, 0x2a, 0x3f, 0x54, 0x69, 0x7e, 0x93, |
| 3878 | 0xa8, 0xbd, 0xd2, 0xe7, 0xfc, 0x11, 0x26, 0x3b, |
| 3879 | 0x50, 0x65, 0x7a, 0x8f, 0xa4, 0xb9, 0xce, 0xe3, |
| 3880 | 0xf8, 0x0d, 0x22, 0x37, 0x4c, 0x61, 0x76, 0x8b, |
| 3881 | 0xa0, 0xb5, 0xca, 0xdf, 0xf4, 0x09, 0x1e, 0x33, |
| 3882 | 0x48, 0x5d, 0x72, 0x87, 0x9c, 0xb1, 0xc6, 0xdb, |
| 3883 | 0xf0, 0x05, 0x1a, 0x2f, 0x44, 0x59, 0x6e, 0x83, |
| 3884 | 0x98, 0xad, 0xc2, 0xd7, 0xec, 0x01, 0x16, 0x2b, |
| 3885 | 0x40, 0x55, 0x6a, 0x7f, 0x94, 0xa9, 0xbe, 0xd3, |
| 3886 | 0xe8, 0xfd, 0x12, 0x27, 0x3c, 0x51, 0x66, 0x7b, |
| 3887 | 0x90, 0xa5, 0xba, 0xcf, 0xe4, 0xf9, 0x0e, 0x23, |
| 3888 | 0x38, 0x4d, 0x62, 0x77, 0x8c, 0xa1, 0xb6, 0xcb, |
| 3889 | 0xe0, 0xf5, 0x0a, 0x1f, 0x34, 0x49, 0x5e, 0x73, |
| 3890 | 0x88, 0x9d, 0xb2, 0xc7, 0xdc, 0xf1, 0x06, 0x1b, |
| 3891 | 0x30, 0x45, 0x5a, 0x6f, 0x84, 0x99, 0xae, 0xc3, |
| 3892 | 0xd8, 0xed, 0x02, 0x17, 0x2c, 0x41, 0x56, 0x6b, |
| 3893 | 0x80, 0x95, 0xaa, 0xbf, 0xd4, 0xe9, 0xfe, 0x13, |
| 3894 | 0x28, 0x3d, 0x52, 0x67, 0x7c, 0x91, 0xa6, 0xbb, |
| 3895 | 0xd0, 0xe5, 0xfa, 0x0f, 0x24, 0x39, 0x4e, 0x63, |
| 3896 | 0x78, 0x8d, 0xa2, 0xb7, 0xcc, 0xe1, 0xf6, 0x0b, |
| 3897 | 0x20, 0x35, 0x4a, 0x5f, 0x74, 0x89, 0x9e, 0xb3, |
| 3898 | 0xc8, 0xdd, 0xf2, 0x07, 0x1c, 0x31, 0x46, 0x5b, |
| 3899 | 0x70, 0x85, 0x9a, 0xaf, 0xc4, 0xd9, 0xee, 0x03, |
| 3900 | 0x18, 0x2d, 0x42, 0x57, 0x6c, 0x81, 0x96, 0xab, |
| 3901 | 0xc0, 0xd5, 0xea, 0xff, 0x14, 0x29, 0x3e, 0x53, |
| 3902 | 0x68, 0x7d, 0x92, 0xa7, 0xbc, 0xd1, 0xe6, 0xfb, |
| 3903 | 0x10, 0x25, 0x3a, 0x4f, 0x64, 0x79, 0x8e, 0xa3, |
| 3904 | 0xb8, 0xcd, 0xe2, 0xf7, 0x0c, 0x21, 0x36, 0x4b, |
| 3905 | 0x60, 0x75, 0x8a, 0x9f, 0xb4, 0xc9, 0xde, 0xf3, |
| 3906 | 0x08, 0x1d, 0x32, 0x47, 0x5c, 0x71, 0x86, 0x9b, |
| 3907 | 0xb0, 0xc5, 0xda, 0xef, 0x04, 0x19, 0x2e, 0x43, |
| 3908 | 0x58, 0x6d, 0x82, 0x97, 0xac, 0xc1, 0xd6, 0xeb, |
| 3909 | 0x00, 0x17, 0x2e, 0x45, 0x5c, 0x73, 0x8a, 0xa1, |
| 3910 | 0xb8, 0xcf, 0xe6, 0xfd, 0x14, 0x2b, 0x42, 0x59, |
| 3911 | 0x70, 0x87, 0x9e, 0xb5, 0xcc, 0xe3, 0xfa, 0x11, |
| 3912 | 0x28, 0x3f, 0x56, 0x6d, 0x84, 0x9b, 0xb2, 0xc9, |
| 3913 | 0xe0, 0xf7, 0x0e, 0x25, 0x3c, 0x53, 0x6a, 0x81, |
| 3914 | 0x98, 0xaf, 0xc6, 0xdd, 0xf4, 0x0b, 0x22, 0x39, |
| 3915 | 0x50, 0x67, 0x7e, 0x95, 0xac, 0xc3, 0xda, 0xf1, |
| 3916 | 0x08, 0x1f, 0x36, 0x4d, 0x64, 0x7b, 0x92, 0xa9, |
| 3917 | 0xc0, 0xd7, 0xee, 0x05, 0x1c, 0x33, 0x4a, 0x61, |
| 3918 | 0x78, 0x8f, 0xa6, 0xbd, 0xd4, 0xeb, 0x02, 0x19, |
| 3919 | 0x30, 0x47, 0x5e, 0x75, 0x8c, 0xa3, 0xba, 0xd1, |
| 3920 | 0xe8, 0xff, 0x16, 0x2d, 0x44, 0x5b, 0x72, 0x89, |
| 3921 | 0xa0, 0xb7, 0xce, 0xe5, 0xfc, 0x13, 0x2a, 0x41, |
| 3922 | 0x58, 0x6f, 0x86, 0x9d, 0xb4, 0xcb, 0xe2, 0xf9, |
| 3923 | 0x10, 0x27, 0x3e, 0x55, 0x6c, 0x83, 0x9a, 0xb1, |
| 3924 | 0xc8, 0xdf, 0xf6, 0x0d, 0x24, 0x3b, 0x52, 0x69, |
| 3925 | 0x80, 0x97, 0xae, 0xc5, 0xdc, 0xf3, 0x0a, 0x21, |
| 3926 | 0x38, 0x4f, 0x66, 0x7d, 0x94, 0xab, 0xc2, 0xd9, |
| 3927 | 0xf0, 0x07, 0x1e, 0x35, 0x4c, 0x63, 0x7a, 0x91, |
| 3928 | 0xa8, 0xbf, 0xd6, 0xed, 0x04, 0x1b, 0x32, 0x49, |
| 3929 | 0x60, 0x77, 0x8e, 0xa5, 0xbc, 0xd3, 0xea, 0x01, |
| 3930 | 0x18, 0x2f, 0x46, 0x5d, 0x74, 0x8b, 0xa2, 0xb9, |
| 3931 | 0xd0, 0xe7, 0xfe, 0x15, 0x2c, 0x43, 0x5a, 0x71, |
| 3932 | 0x88, 0x9f, 0xb6, 0xcd, 0xe4, 0xfb, 0x12, 0x29, |
| 3933 | 0x40, 0x57, 0x6e, 0x85, 0x9c, 0xb3, 0xca, 0xe1, |
| 3934 | 0xf8, 0x0f, 0x26, 0x3d, 0x54, 0x6b, 0x82, 0x99, |
| 3935 | 0xb0, 0xc7, 0xde, 0xf5, 0x0c, 0x23, 0x3a, 0x51, |
| 3936 | 0x68, 0x7f, 0x96, 0xad, 0xc4, 0xdb, 0xf2, 0x09, |
| 3937 | 0x20, 0x37, 0x4e, 0x65, 0x7c, 0x93, 0xaa, 0xc1, |
| 3938 | 0xd8, 0xef, 0x06, 0x1d, 0x34, 0x4b, 0x62, 0x79, |
| 3939 | 0x90, 0xa7, 0xbe, 0xd5, 0xec, 0x03, 0x1a, 0x31, |
| 3940 | 0x48, 0x5f, 0x76, 0x8d, 0xa4, 0xbb, 0xd2, 0xe9, |
| 3941 | 0x00, 0x19, 0x32, 0x4b, 0x64, 0x7d, 0x96, 0xaf, |
| 3942 | 0xc8, 0xe1, 0xfa, 0x13, 0x2c, 0x45, 0x5e, 0x77, |
| 3943 | 0x90, 0xa9, 0xc2, 0xdb, 0xf4, 0x0d, 0x26, 0x3f, |
| 3944 | 0x58, 0x71, 0x8a, 0xa3, 0xbc, 0xd5, 0xee, 0x07, |
| 3945 | 0x20, 0x39, 0x52, 0x6b, 0x84, 0x9d, 0xb6, 0xcf, |
| 3946 | 0xe8, 0x01, 0x1a, 0x33, 0x4c, 0x65, 0x7e, 0x97, |
| 3947 | 0xb0, 0xc9, 0xe2, 0xfb, 0x14, 0x2d, 0x46, 0x5f, |
| 3948 | 0x78, 0x91, 0xaa, 0xc3, 0xdc, 0xf5, 0x0e, 0x27, |
| 3949 | 0x40, 0x59, 0x72, 0x8b, 0xa4, 0xbd, 0xd6, 0xef, |
| 3950 | 0x08, 0x21, 0x3a, 0x53, 0x6c, 0x85, 0x9e, 0xb7, |
| 3951 | 0xd0, 0xe9, 0x02, 0x1b, 0x34, 0x4d, 0x66, 0x7f, |
| 3952 | 0x98, 0xb1, 0xca, 0xe3, 0xfc, 0x15, 0x2e, 0x47, |
| 3953 | 0x60, 0x79, 0x92, 0xab, 0xc4, 0xdd, 0xf6, 0x0f, |
| 3954 | 0x28, 0x41, 0x5a, 0x73, 0x8c, 0xa5, 0xbe, 0xd7, |
| 3955 | 0xf0, 0x09, 0x22, 0x3b, 0x54, 0x6d, 0x86, 0x9f, |
| 3956 | 0xb8, 0xd1, 0xea, 0x03, 0x1c, 0x35, 0x4e, 0x67, |
| 3957 | 0x80, 0x99, 0xb2, 0xcb, 0xe4, 0xfd, 0x16, 0x2f, |
| 3958 | 0x48, 0x61, 0x7a, 0x93, 0xac, 0xc5, 0xde, 0xf7, |
| 3959 | 0x10, 0x29, 0x42, 0x5b, 0x74, 0x8d, 0xa6, 0xbf, |
| 3960 | 0xd8, 0xf1, 0x0a, 0x23, 0x3c, 0x55, 0x6e, 0x87, |
| 3961 | 0xa0, 0xb9, 0xd2, 0xeb, 0x04, 0x1d, 0x36, 0x4f, |
| 3962 | 0x68, 0x81, 0x9a, 0xb3, 0xcc, 0xe5, 0xfe, 0x17, |
| 3963 | 0x30, 0x49, 0x62, 0x7b, 0x94, 0xad, 0xc6, 0xdf, |
| 3964 | 0xf8, 0x11, 0x2a, 0x43, 0x5c, 0x75, 0x8e, 0xa7, |
| 3965 | 0xc0, 0xd9, 0xf2, 0x0b, 0x24, 0x3d, 0x56, 0x6f, |
| 3966 | 0x88, 0xa1, 0xba, 0xd3, 0xec, 0x05, 0x1e, 0x37, |
| 3967 | 0x50, 0x69, 0x82, 0x9b, 0xb4, 0xcd, 0xe6, 0xff, |
| 3968 | 0x18, 0x31, 0x4a, 0x63, 0x7c, 0x95, 0xae, 0xc7, |
| 3969 | 0xe0, 0xf9, 0x12, 0x2b, 0x44, 0x5d, 0x76, 0x8f, |
| 3970 | 0xa8, 0xc1, 0xda, 0xf3, 0x0c, 0x25, 0x3e, 0x57, |
| 3971 | 0x70, 0x89, 0xa2, 0xbb, 0xd4, 0xed, 0x06, 0x1f, |
| 3972 | 0x38, 0x51, 0x6a, 0x83, 0x9c, 0xb5, 0xce, 0xe7, |
| 3973 | 0x00, 0x1b, 0x36, 0x51, 0x6c, 0x87, 0xa2, 0xbd, |
| 3974 | 0xd8, 0xf3, 0x0e, 0x29, 0x44, 0x5f, 0x7a, 0x95, |
| 3975 | 0xb0, 0xcb, 0xe6, 0x01, 0x1c, 0x37, 0x52, 0x6d, |
| 3976 | 0x88, 0xa3, 0xbe, 0xd9, 0xf4, 0x0f, 0x2a, 0x45, |
| 3977 | 0x60, 0x7b, 0x96, 0xb1, 0xcc, 0xe7, 0x02, 0x1d, |
| 3978 | 0x38, 0x53, 0x6e, 0x89, 0xa4, 0xbf, 0xda, 0xf5, |
| 3979 | 0x10, 0x2b, 0x46, 0x61, 0x7c, 0x97, 0xb2, 0xcd, |
| 3980 | 0xe8, 0x03, 0x1e, 0x39, 0x54, 0x6f, 0x8a, 0xa5, |
| 3981 | 0xc0, 0xdb, 0xf6, 0x11, 0x2c, 0x47, 0x62, 0x7d, |
| 3982 | 0x98, 0xb3, 0xce, 0xe9, 0x04, 0x1f, 0x3a, 0x55, |
| 3983 | 0x70, 0x8b, 0xa6, 0xc1, 0xdc, 0xf7, 0x12, 0x2d, |
| 3984 | 0x48, 0x63, 0x7e, 0x99, 0xb4, 0xcf, 0xea, 0x05, |
| 3985 | 0x20, 0x3b, 0x56, 0x71, 0x8c, 0xa7, 0xc2, 0xdd, |
| 3986 | 0xf8, 0x13, 0x2e, 0x49, 0x64, 0x7f, 0x9a, 0xb5, |
| 3987 | 0xd0, 0xeb, 0x06, 0x21, 0x3c, 0x57, 0x72, 0x8d, |
| 3988 | 0xa8, 0xc3, 0xde, 0xf9, 0x14, 0x2f, 0x4a, 0x65, |
| 3989 | 0x80, 0x9b, 0xb6, 0xd1, 0xec, 0x07, 0x22, 0x3d, |
| 3990 | 0x58, 0x73, 0x8e, 0xa9, 0xc4, 0xdf, 0xfa, 0x15, |
| 3991 | 0x30, 0x4b, 0x66, 0x81, 0x9c, 0xb7, 0xd2, 0xed, |
| 3992 | 0x08, 0x23, 0x3e, 0x59, 0x74, 0x8f, 0xaa, 0xc5, |
| 3993 | 0xe0, 0xfb, 0x16, 0x31, 0x4c, 0x67, 0x82, 0x9d, |
| 3994 | 0xb8, 0xd3, 0xee, 0x09, 0x24, 0x3f, 0x5a, 0x75, |
| 3995 | 0x90, 0xab, 0xc6, 0xe1, 0xfc, 0x17, 0x32, 0x4d, |
| 3996 | 0x68, 0x83, 0x9e, 0xb9, 0xd4, 0xef, 0x0a, 0x25, |
| 3997 | 0x40, 0x5b, 0x76, 0x91, 0xac, 0xc7, 0xe2, 0xfd, |
| 3998 | 0x18, 0x33, 0x4e, 0x69, 0x84, 0x9f, 0xba, 0xd5, |
| 3999 | 0xf0, 0x0b, 0x26, 0x41, 0x5c, 0x77, 0x92, 0xad, |
| 4000 | 0xc8, 0xe3, 0xfe, 0x19, 0x34, 0x4f, 0x6a, 0x85, |
| 4001 | 0xa0, 0xbb, 0xd6, 0xf1, 0x0c, 0x27, 0x42, 0x5d, |
| 4002 | 0x78, 0x93, 0xae, 0xc9, 0xe4, 0xff, 0x1a, 0x35, |
| 4003 | 0x50, 0x6b, 0x86, 0xa1, 0xbc, 0xd7, 0xf2, 0x0d, |
| 4004 | 0x28, 0x43, 0x5e, 0x79, 0x94, 0xaf, 0xca, 0xe5, |
| 4005 | 0x00, 0x1d, 0x3a, 0x57, 0x74, 0x91, 0xae, 0xcb, |
| 4006 | 0xe8, 0x05, 0x22, 0x3f, 0x5c, 0x79, 0x96, 0xb3, |
| 4007 | 0xd0, 0xed, 0x0a, 0x27, 0x44, 0x61, 0x7e, 0x9b, |
| 4008 | 0xb8, 0xd5, 0xf2, 0x0f, 0x2c, 0x49, 0x66, 0x83, |
| 4009 | 0xa0, 0xbd, 0xda, 0xf7, 0x14, 0x31, 0x4e, 0x6b, |
| 4010 | 0x88, 0xa5, 0xc2, 0xdf, 0xfc, 0x19, 0x36, 0x53, |
| 4011 | 0x70, 0x8d, 0xaa, 0xc7, 0xe4, 0x01, 0x1e, 0x3b, |
| 4012 | 0x58, 0x75, 0x92, 0xaf, 0xcc, 0xe9, 0x06, 0x23, |
| 4013 | 0x40, 0x5d, 0x7a, 0x97, 0xb4, 0xd1, 0xee, 0x0b, |
| 4014 | 0x28, 0x45, 0x62, 0x7f, 0x9c, 0xb9, 0xd6, 0xf3, |
| 4015 | 0x10, 0x2d, 0x4a, 0x67, 0x84, 0xa1, 0xbe, 0xdb, |
| 4016 | 0xf8, 0x15, 0x32, 0x4f, 0x6c, 0x89, 0xa6, 0xc3, |
| 4017 | 0xe0, 0xfd, 0x1a, 0x37, 0x54, 0x71, 0x8e, 0xab, |
| 4018 | 0xc8, 0xe5, 0x02, 0x1f, 0x3c, 0x59, 0x76, 0x93, |
| 4019 | 0xb0, 0xcd, 0xea, 0x07, 0x24, 0x41, 0x5e, 0x7b, |
| 4020 | 0x98, 0xb5, 0xd2, 0xef, 0x0c, 0x29, 0x46, 0x63, |
| 4021 | 0x80, 0x9d, 0xba, 0xd7, 0xf4, 0x11, 0x2e, 0x4b, |
| 4022 | 0x68, 0x85, 0xa2, 0xbf, 0xdc, 0xf9, 0x16, 0x33, |
| 4023 | 0x50, 0x6d, 0x8a, 0xa7, 0xc4, 0xe1, 0xfe, 0x1b, |
| 4024 | 0x38, 0x55, 0x72, 0x8f, 0xac, 0xc9, 0xe6, 0x03, |
| 4025 | 0x20, 0x3d, 0x5a, 0x77, 0x94, 0xb1, 0xce, 0xeb, |
| 4026 | 0x08, 0x25, 0x42, 0x5f, 0x7c, 0x99, 0xb6, 0xd3, |
| 4027 | 0xf0, 0x0d, 0x2a, 0x47, 0x64, 0x81, 0x9e, 0xbb, |
| 4028 | 0xd8, 0xf5, 0x12, 0x2f, 0x4c, 0x69, 0x86, 0xa3, |
| 4029 | 0xc0, 0xdd, 0xfa, 0x17, 0x34, 0x51, 0x6e, 0x8b, |
| 4030 | 0xa8, 0xc5, 0xe2, 0xff, 0x1c, 0x39, 0x56, 0x73, |
| 4031 | 0x90, 0xad, 0xca, 0xe7, 0x04, 0x21, 0x3e, 0x5b, |
| 4032 | 0x78, 0x95, 0xb2, 0xcf, 0xec, 0x09, 0x26, 0x43, |
| 4033 | 0x60, 0x7d, 0x9a, 0xb7, 0xd4, 0xf1, 0x0e, 0x2b, |
| 4034 | 0x48, 0x65, 0x82, 0x9f, 0xbc, 0xd9, 0xf6, 0x13, |
| 4035 | 0x30, 0x4d, 0x6a, 0x87, 0xa4, 0xc1, 0xde, 0xfb, |
| 4036 | 0x18, 0x35, 0x52, 0x6f, 0x8c, 0xa9, 0xc6, 0xe3, |
| 4037 | 0x00, 0x1f, 0x3e, 0x5d, 0x7c, 0x9b, 0xba, 0xd9, |
| 4038 | 0xf8, 0x17, 0x36, 0x55, 0x74, 0x93, 0xb2, 0xd1, |
| 4039 | 0xf0, 0x0f, 0x2e, 0x4d, 0x6c, 0x8b, 0xaa, 0xc9, |
| 4040 | 0xe8, 0x07, 0x26, 0x45, 0x64, 0x83, 0xa2, 0xc1, |
| 4041 | 0xe0, 0xff, 0x1e, 0x3d, 0x5c, 0x7b, 0x9a, 0xb9, |
| 4042 | 0xd8, 0xf7, 0x16, 0x35, 0x54, 0x73, 0x92, 0xb1, |
| 4043 | 0xd0, 0xef, 0x0e, 0x2d, 0x4c, 0x6b, 0x8a, 0xa9, |
| 4044 | 0xc8, 0xe7, 0x06, 0x25, 0x44, 0x63, 0x82, 0xa1, |
| 4045 | 0xc0, 0xdf, 0xfe, 0x1d, 0x3c, 0x5b, 0x7a, 0x99, |
| 4046 | 0xb8, 0xd7, 0xf6, 0x15, 0x34, 0x53, 0x72, 0x91, |
| 4047 | 0xb0, 0xcf, 0xee, 0x0d, 0x2c, 0x4b, 0x6a, 0x89, |
| 4048 | 0xa8, 0xc7, 0xe6, 0x05, 0x24, 0x43, 0x62, 0x81, |
| 4049 | 0xa0, 0xbf, 0xde, 0xfd, 0x1c, 0x3b, 0x5a, 0x79, |
| 4050 | 0x98, 0xb7, 0xd6, 0xf5, 0x14, 0x33, 0x52, 0x71, |
| 4051 | 0x90, 0xaf, 0xce, 0xed, 0x0c, 0x2b, 0x4a, 0x69, |
| 4052 | 0x88, 0xa7, 0xc6, 0xe5, 0x04, 0x23, 0x42, 0x61, |
| 4053 | 0x80, 0x9f, 0xbe, 0xdd, 0xfc, 0x1b, 0x3a, 0x59, |
| 4054 | 0x78, 0x97, 0xb6, 0xd5, 0xf4, 0x13, 0x32, 0x51, |
| 4055 | 0x70, 0x8f, 0xae, 0xcd, 0xec, 0x0b, 0x2a, 0x49, |
| 4056 | 0x68, 0x87, 0xa6, 0xc5, 0xe4, 0x03, 0x22, 0x41, |
| 4057 | 0x60, 0x7f, 0x9e, 0xbd, 0xdc, 0xfb, 0x1a, 0x39, |
| 4058 | 0x58, 0x77, 0x96, 0xb5, 0xd4, 0xf3, 0x12, 0x31, |
| 4059 | 0x50, 0x6f, 0x8e, 0xad, 0xcc, 0xeb, 0x0a, 0x29, |
| 4060 | 0x48, 0x67, 0x86, 0xa5, 0xc4, 0xe3, 0x02, 0x21, |
| 4061 | 0x40, 0x5f, 0x7e, 0x9d, 0xbc, 0xdb, 0xfa, 0x19, |
| 4062 | 0x38, 0x57, 0x76, 0x95, 0xb4, 0xd3, 0xf2, 0x11, |
| 4063 | 0x30, 0x4f, 0x6e, 0x8d, 0xac, 0xcb, 0xea, 0x09, |
| 4064 | 0x28, 0x47, 0x66, 0x85, 0xa4, 0xc3, 0xe2, 0x01, |
| 4065 | 0x20, 0x3f, 0x5e, 0x7d, 0x9c, 0xbb, 0xda, 0xf9, |
| 4066 | 0x18, 0x37, 0x56, 0x75, 0x94, 0xb3, 0xd2, 0xf1, |
| 4067 | 0x10, 0x2f, 0x4e, 0x6d, 0x8c, 0xab, 0xca, 0xe9, |
| 4068 | 0x08, 0x27, 0x46, 0x65, 0x84, 0xa3, 0xc2, 0xe1, |
| 4069 | 0x00, 0x21, 0x42, 0x63, |
| 4070 | }, |
| 4071 | .ilen = 4100, |
| 4072 | .result = { |
| 4073 | 0xf0, 0x5c, 0x74, 0xad, 0x4e, 0xbc, 0x99, 0xe2, |
| 4074 | 0xae, 0xff, 0x91, 0x3a, 0x44, 0xcf, 0x38, 0x32, |
| 4075 | 0x1e, 0xad, 0xa7, 0xcd, 0xa1, 0x39, 0x95, 0xaa, |
| 4076 | 0x10, 0xb1, 0xb3, 0x2e, 0x04, 0x31, 0x8f, 0x86, |
| 4077 | 0xf2, 0x62, 0x74, 0x70, 0x0c, 0xa4, 0x46, 0x08, |
| 4078 | 0xa8, 0xb7, 0x99, 0xa8, 0xe9, 0xd2, 0x73, 0x79, |
| 4079 | 0x7e, 0x6e, 0xd4, 0x8f, 0x1e, 0xc7, 0x8e, 0x31, |
| 4080 | 0x0b, 0xfa, 0x4b, 0xce, 0xfd, 0xf3, 0x57, 0x71, |
| 4081 | 0xe9, 0x46, 0x03, 0xa5, 0x3d, 0x34, 0x00, 0xe2, |
| 4082 | 0x18, 0xff, 0x75, 0x6d, 0x06, 0x2d, 0x00, 0xab, |
| 4083 | 0xb9, 0x3e, 0x6c, 0x59, 0xc5, 0x84, 0x06, 0xb5, |
| 4084 | 0x8b, 0xd0, 0x89, 0x9c, 0x4a, 0x79, 0x16, 0xc6, |
| 4085 | 0x3d, 0x74, 0x54, 0xfa, 0x44, 0xcd, 0x23, 0x26, |
| 4086 | 0x5c, 0xcf, 0x7e, 0x28, 0x92, 0x32, 0xbf, 0xdf, |
| 4087 | 0xa7, 0x20, 0x3c, 0x74, 0x58, 0x2a, 0x9a, 0xde, |
| 4088 | 0x61, 0x00, 0x1c, 0x4f, 0xff, 0x59, 0xc4, 0x22, |
| 4089 | 0xac, 0x3c, 0xd0, 0xe8, 0x6c, 0xf9, 0x97, 0x1b, |
| 4090 | 0x58, 0x9b, 0xad, 0x71, 0xe8, 0xa9, 0xb5, 0x0d, |
| 4091 | 0xee, 0x2f, 0x04, 0x1f, 0x7f, 0xbc, 0x99, 0xee, |
| 4092 | 0x84, 0xff, 0x42, 0x60, 0xdc, 0x3a, 0x18, 0xa5, |
| 4093 | 0x81, 0xf9, 0xef, 0xdc, 0x7a, 0x0f, 0x65, 0x41, |
| 4094 | 0x2f, 0xa3, 0xd3, 0xf9, 0xc2, 0xcb, 0xc0, 0x4d, |
| 4095 | 0x8f, 0xd3, 0x76, 0x96, 0xad, 0x49, 0x6d, 0x38, |
| 4096 | 0x3d, 0x39, 0x0b, 0x6c, 0x80, 0xb7, 0x54, 0x69, |
| 4097 | 0xf0, 0x2c, 0x90, 0x02, 0x29, 0x0d, 0x1c, 0x12, |
| 4098 | 0xad, 0x55, 0xc3, 0x8b, 0x68, 0xd9, 0xcc, 0xb3, |
| 4099 | 0xb2, 0x64, 0x33, 0x90, 0x5e, 0xca, 0x4b, 0xe2, |
| 4100 | 0xfb, 0x75, 0xdc, 0x63, 0xf7, 0x9f, 0x82, 0x74, |
| 4101 | 0xf0, 0xc9, 0xaa, 0x7f, 0xe9, 0x2a, 0x9b, 0x33, |
| 4102 | 0xbc, 0x88, 0x00, 0x7f, 0xca, 0xb2, 0x1f, 0x14, |
| 4103 | 0xdb, 0xc5, 0x8e, 0x7b, 0x11, 0x3c, 0x3e, 0x08, |
| 4104 | 0xf3, 0x83, 0xe8, 0xe0, 0x94, 0x86, 0x2e, 0x92, |
| 4105 | 0x78, 0x6b, 0x01, 0xc9, 0xc7, 0x83, 0xba, 0x21, |
| 4106 | 0x6a, 0x25, 0x15, 0x33, 0x4e, 0x45, 0x08, 0xec, |
| 4107 | 0x35, 0xdb, 0xe0, 0x6e, 0x31, 0x51, 0x79, 0xa9, |
| 4108 | 0x42, 0x44, 0x65, 0xc1, 0xa0, 0xf1, 0xf9, 0x2a, |
| 4109 | 0x70, 0xd5, 0xb6, 0xc6, 0xc1, 0x8c, 0x39, 0xfc, |
| 4110 | 0x25, 0xa6, 0x55, 0xd9, 0xdd, 0x2d, 0x4c, 0xec, |
| 4111 | 0x49, 0xc6, 0xeb, 0x0e, 0xa8, 0x25, 0x2a, 0x16, |
| 4112 | 0x1b, 0x66, 0x84, 0xda, 0xe2, 0x92, 0xe5, 0xc0, |
| 4113 | 0xc8, 0x53, 0x07, 0xaf, 0x80, 0x84, 0xec, 0xfd, |
| 4114 | 0xcd, 0xd1, 0x6e, 0xcd, 0x6f, 0x6a, 0xf5, 0x36, |
| 4115 | 0xc5, 0x15, 0xe5, 0x25, 0x7d, 0x77, 0xd1, 0x1a, |
| 4116 | 0x93, 0x36, 0xa9, 0xcf, 0x7c, 0xa4, 0x54, 0x4a, |
| 4117 | 0x06, 0x51, 0x48, 0x4e, 0xf6, 0x59, 0x87, 0xd2, |
| 4118 | 0x04, 0x02, 0xef, 0xd3, 0x44, 0xde, 0x76, 0x31, |
| 4119 | 0xb3, 0x34, 0x17, 0x1b, 0x9d, 0x66, 0x11, 0x9f, |
| 4120 | 0x1e, 0xcc, 0x17, 0xe9, 0xc7, 0x3c, 0x1b, 0xe7, |
| 4121 | 0xcb, 0x50, 0x08, 0xfc, 0xdc, 0x2b, 0x24, 0xdb, |
| 4122 | 0x65, 0x83, 0xd0, 0x3b, 0xe3, 0x30, 0xea, 0x94, |
| 4123 | 0x6c, 0xe7, 0xe8, 0x35, 0x32, 0xc7, 0xdb, 0x64, |
| 4124 | 0xb4, 0x01, 0xab, 0x36, 0x2c, 0x77, 0x13, 0xaf, |
| 4125 | 0xf8, 0x2b, 0x88, 0x3f, 0x54, 0x39, 0xc4, 0x44, |
| 4126 | 0xfe, 0xef, 0x6f, 0x68, 0x34, 0xbe, 0x0f, 0x05, |
| 4127 | 0x16, 0x6d, 0xf6, 0x0a, 0x30, 0xe7, 0xe3, 0xed, |
| 4128 | 0xc4, 0xde, 0x3c, 0x1b, 0x13, 0xd8, 0xdb, 0xfe, |
| 4129 | 0x41, 0x62, 0xe5, 0x28, 0xd4, 0x8d, 0xa3, 0xc7, |
| 4130 | 0x93, 0x97, 0xc6, 0x48, 0x45, 0x1d, 0x9f, 0x83, |
| 4131 | 0xdf, 0x4b, 0x40, 0x3e, 0x42, 0x25, 0x87, 0x80, |
| 4132 | 0x4c, 0x7d, 0xa8, 0xd4, 0x98, 0x23, 0x95, 0x75, |
| 4133 | 0x41, 0x8c, 0xda, 0x41, 0x9b, 0xd4, 0xa7, 0x06, |
| 4134 | 0xb5, 0xf1, 0x71, 0x09, 0x53, 0xbe, 0xca, 0xbf, |
| 4135 | 0x32, 0x03, 0xed, 0xf0, 0x50, 0x1c, 0x56, 0x39, |
| 4136 | 0x5b, 0xa4, 0x75, 0x18, 0xf7, 0x9b, 0x58, 0xef, |
| 4137 | 0x53, 0xfc, 0x2a, 0x38, 0x23, 0x15, 0x75, 0xcd, |
| 4138 | 0x45, 0xe5, 0x5a, 0x82, 0x55, 0xba, 0x21, 0xfa, |
| 4139 | 0xd4, 0xbd, 0xc6, 0x94, 0x7c, 0xc5, 0x80, 0x12, |
| 4140 | 0xf7, 0x4b, 0x32, 0xc4, 0x9a, 0x82, 0xd8, 0x28, |
| 4141 | 0x8f, 0xd9, 0xc2, 0x0f, 0x60, 0x03, 0xbe, 0x5e, |
| 4142 | 0x21, 0xd6, 0x5f, 0x58, 0xbf, 0x5c, 0xb1, 0x32, |
| 4143 | 0x82, 0x8d, 0xa9, 0xe5, 0xf2, 0x66, 0x1a, 0xc0, |
| 4144 | 0xa0, 0xbc, 0x58, 0x2f, 0x71, 0xf5, 0x2f, 0xed, |
| 4145 | 0xd1, 0x26, 0xb9, 0xd8, 0x49, 0x5a, 0x07, 0x19, |
| 4146 | 0x01, 0x7c, 0x59, 0xb0, 0xf8, 0xa4, 0xb7, 0xd3, |
| 4147 | 0x7b, 0x1a, 0x8c, 0x38, 0xf4, 0x50, 0xa4, 0x59, |
| 4148 | 0xb0, 0xcc, 0x41, 0x0b, 0x88, 0x7f, 0xe5, 0x31, |
| 4149 | 0xb3, 0x42, 0xba, 0xa2, 0x7e, 0xd4, 0x32, 0x71, |
| 4150 | 0x45, 0x87, 0x48, 0xa9, 0xc2, 0xf2, 0x89, 0xb3, |
| 4151 | 0xe4, 0xa7, 0x7e, 0x52, 0x15, 0x61, 0xfa, 0xfe, |
| 4152 | 0xc9, 0xdd, 0x81, 0xeb, 0x13, 0xab, 0xab, 0xc3, |
| 4153 | 0x98, 0x59, 0xd8, 0x16, 0x3d, 0x14, 0x7a, 0x1c, |
| 4154 | 0x3c, 0x41, 0x9a, 0x16, 0x16, 0x9b, 0xd2, 0xd2, |
| 4155 | 0x69, 0x3a, 0x29, 0x23, 0xac, 0x86, 0x32, 0xa5, |
| 4156 | 0x48, 0x9c, 0x9e, 0xf3, 0x47, 0x77, 0x81, 0x70, |
| 4157 | 0x24, 0xe8, 0x85, 0xd2, 0xf5, 0xb5, 0xfa, 0xff, |
| 4158 | 0x59, 0x6a, 0xd3, 0x50, 0x59, 0x43, 0x59, 0xde, |
| 4159 | 0xd9, 0xf1, 0x55, 0xa5, 0x0c, 0xc3, 0x1a, 0x1a, |
| 4160 | 0x18, 0x34, 0x0d, 0x1a, 0x63, 0x33, 0xed, 0x10, |
| 4161 | 0xe0, 0x1d, 0x2a, 0x18, 0xd2, 0xc0, 0x54, 0xa8, |
| 4162 | 0xca, 0xb5, 0x9a, 0xd3, 0xdd, 0xca, 0x45, 0x84, |
| 4163 | 0x50, 0xe7, 0x0f, 0xfe, 0xa4, 0x99, 0x5a, 0xbe, |
| 4164 | 0x43, 0x2d, 0x9a, 0xcb, 0x92, 0x3f, 0x5a, 0x1d, |
| 4165 | 0x85, 0xd8, 0xc9, 0xdf, 0x68, 0xc9, 0x12, 0x80, |
| 4166 | 0x56, 0x0c, 0xdc, 0x00, 0xdc, 0x3a, 0x7d, 0x9d, |
| 4167 | 0xa3, 0xa2, 0xe8, 0x4d, 0xbf, 0xf9, 0x70, 0xa0, |
| 4168 | 0xa4, 0x13, 0x4f, 0x6b, 0xaf, 0x0a, 0x89, 0x7f, |
| 4169 | 0xda, 0xf0, 0xbf, 0x9b, 0xc8, 0x1d, 0xe5, 0xf8, |
| 4170 | 0x2e, 0x8b, 0x07, 0xb5, 0x73, 0x1b, 0xcc, 0xa2, |
| 4171 | 0xa6, 0xad, 0x30, 0xbc, 0x78, 0x3c, 0x5b, 0x10, |
| 4172 | 0xfa, 0x5e, 0x62, 0x2d, 0x9e, 0x64, 0xb3, 0x33, |
| 4173 | 0xce, 0xf9, 0x1f, 0x86, 0xe7, 0x8b, 0xa2, 0xb8, |
| 4174 | 0xe8, 0x99, 0x57, 0x8c, 0x11, 0xed, 0x66, 0xd9, |
| 4175 | 0x3c, 0x72, 0xb9, 0xc3, 0xe6, 0x4e, 0x17, 0x3a, |
| 4176 | 0x6a, 0xcb, 0x42, 0x24, 0x06, 0xed, 0x3e, 0x4e, |
| 4177 | 0xa3, 0xe8, 0x6a, 0x94, 0xda, 0x0d, 0x4e, 0xd5, |
| 4178 | 0x14, 0x19, 0xcf, 0xb6, 0x26, 0xd8, 0x2e, 0xcc, |
| 4179 | 0x64, 0x76, 0x38, 0x49, 0x4d, 0xfe, 0x30, 0x6d, |
| 4180 | 0xe4, 0xc8, 0x8c, 0x7b, 0xc4, 0xe0, 0x35, 0xba, |
| 4181 | 0x22, 0x6e, 0x76, 0xe1, 0x1a, 0xf2, 0x53, 0xc3, |
| 4182 | 0x28, 0xa2, 0x82, 0x1f, 0x61, 0x69, 0xad, 0xc1, |
| 4183 | 0x7b, 0x28, 0x4b, 0x1e, 0x6c, 0x85, 0x95, 0x9b, |
| 4184 | 0x51, 0xb5, 0x17, 0x7f, 0x12, 0x69, 0x8c, 0x24, |
| 4185 | 0xd5, 0xc7, 0x5a, 0x5a, 0x11, 0x54, 0xff, 0x5a, |
| 4186 | 0xf7, 0x16, 0xc3, 0x91, 0xa6, 0xf0, 0xdc, 0x0a, |
| 4187 | 0xb6, 0xa7, 0x4a, 0x0d, 0x7a, 0x58, 0xfe, 0xa5, |
| 4188 | 0xf5, 0xcb, 0x8f, 0x7b, 0x0e, 0xea, 0x57, 0xe7, |
| 4189 | 0xbd, 0x79, 0xd6, 0x1c, 0x88, 0x23, 0x6c, 0xf2, |
| 4190 | 0x4d, 0x29, 0x77, 0x53, 0x35, 0x6a, 0x00, 0x8d, |
| 4191 | 0xcd, 0xa3, 0x58, 0xbe, 0x77, 0x99, 0x18, 0xf8, |
| 4192 | 0xe6, 0xe1, 0x8f, 0xe9, 0x37, 0x8f, 0xe3, 0xe2, |
| 4193 | 0x5a, 0x8a, 0x93, 0x25, 0xaf, 0xf3, 0x78, 0x80, |
| 4194 | 0xbe, 0xa6, 0x1b, 0xc6, 0xac, 0x8b, 0x1c, 0x91, |
| 4195 | 0x58, 0xe1, 0x9f, 0x89, 0x35, 0x9d, 0x1d, 0x21, |
| 4196 | 0x29, 0x9f, 0xf4, 0x99, 0x02, 0x27, 0x0f, 0xa8, |
| 4197 | 0x4f, 0x79, 0x94, 0x2b, 0x33, 0x2c, 0xda, 0xa2, |
| 4198 | 0x26, 0x39, 0x83, 0x94, 0xef, 0x27, 0xd8, 0x53, |
| 4199 | 0x8f, 0x66, 0x0d, 0xe4, 0x41, 0x7d, 0x34, 0xcd, |
| 4200 | 0x43, 0x7c, 0x95, 0x0a, 0x53, 0xef, 0x66, 0xda, |
| 4201 | 0x7e, 0x9b, 0xf3, 0x93, 0xaf, 0xd0, 0x73, 0x71, |
| 4202 | 0xba, 0x40, 0x9b, 0x74, 0xf8, 0xd7, 0xd7, 0x41, |
| 4203 | 0x6d, 0xaf, 0x72, 0x9c, 0x8d, 0x21, 0x87, 0x3c, |
| 4204 | 0xfd, 0x0a, 0x90, 0xa9, 0x47, 0x96, 0x9e, 0xd3, |
| 4205 | 0x88, 0xee, 0x73, 0xcf, 0x66, 0x2f, 0x52, 0x56, |
| 4206 | 0x6d, 0xa9, 0x80, 0x4c, 0xe2, 0x6f, 0x62, 0x88, |
| 4207 | 0x3f, 0x0e, 0x54, 0x17, 0x48, 0x80, 0x5d, 0xd3, |
| 4208 | 0xc3, 0xda, 0x25, 0x3d, 0xa1, 0xc8, 0xcb, 0x9f, |
| 4209 | 0x9b, 0x70, 0xb3, 0xa1, 0xeb, 0x04, 0x52, 0xa1, |
| 4210 | 0xf2, 0x22, 0x0f, 0xfc, 0xc8, 0x18, 0xfa, 0xf9, |
| 4211 | 0x85, 0x9c, 0xf1, 0xac, 0xeb, 0x0c, 0x02, 0x46, |
| 4212 | 0x75, 0xd2, 0xf5, 0x2c, 0xe3, 0xd2, 0x59, 0x94, |
| 4213 | 0x12, 0xf3, 0x3c, 0xfc, 0xd7, 0x92, 0xfa, 0x36, |
| 4214 | 0xba, 0x61, 0x34, 0x38, 0x7c, 0xda, 0x48, 0x3e, |
| 4215 | 0x08, 0xc9, 0x39, 0x23, 0x5e, 0x02, 0x2c, 0x1a, |
| 4216 | 0x18, 0x7e, 0xb4, 0xd9, 0xfd, 0x9e, 0x40, 0x02, |
| 4217 | 0xb1, 0x33, 0x37, 0x32, 0xe7, 0xde, 0xd6, 0xd0, |
| 4218 | 0x7c, 0x58, 0x65, 0x4b, 0xf8, 0x34, 0x27, 0x9c, |
| 4219 | 0x44, 0xb4, 0xbd, 0xe9, 0xe9, 0x4c, 0x78, 0x7d, |
| 4220 | 0x4b, 0x9f, 0xce, 0xb1, 0xcd, 0x47, 0xa5, 0x37, |
| 4221 | 0xe5, 0x6d, 0xbd, 0xb9, 0x43, 0x94, 0x0a, 0xd4, |
| 4222 | 0xd6, 0xf9, 0x04, 0x5f, 0xb5, 0x66, 0x6c, 0x1a, |
| 4223 | 0x35, 0x12, 0xe3, 0x36, 0x28, 0x27, 0x36, 0x58, |
| 4224 | 0x01, 0x2b, 0x79, 0xe4, 0xba, 0x6d, 0x10, 0x7d, |
| 4225 | 0x65, 0xdf, 0x84, 0x95, 0xf4, 0xd5, 0xb6, 0x8f, |
| 4226 | 0x2b, 0x9f, 0x96, 0x00, 0x86, 0x60, 0xf0, 0x21, |
| 4227 | 0x76, 0xa8, 0x6a, 0x8c, 0x28, 0x1c, 0xb3, 0x6b, |
| 4228 | 0x97, 0xd7, 0xb6, 0x53, 0x2a, 0xcc, 0xab, 0x40, |
| 4229 | 0x9d, 0x62, 0x79, 0x58, 0x52, 0xe6, 0x65, 0xb7, |
| 4230 | 0xab, 0x55, 0x67, 0x9c, 0x89, 0x7c, 0x03, 0xb0, |
| 4231 | 0x73, 0x59, 0xc5, 0x81, 0xf5, 0x18, 0x17, 0x5c, |
| 4232 | 0x89, 0xf3, 0x78, 0x35, 0x44, 0x62, 0x78, 0x72, |
| 4233 | 0xd0, 0x96, 0xeb, 0x31, 0xe7, 0x87, 0x77, 0x14, |
| 4234 | 0x99, 0x51, 0xf2, 0x59, 0x26, 0x9e, 0xb5, 0xa6, |
| 4235 | 0x45, 0xfe, 0x6e, 0xbd, 0x07, 0x4c, 0x94, 0x5a, |
| 4236 | 0xa5, 0x7d, 0xfc, 0xf1, 0x2b, 0x77, 0xe2, 0xfe, |
| 4237 | 0x17, 0xd4, 0x84, 0xa0, 0xac, 0xb5, 0xc7, 0xda, |
| 4238 | 0xa9, 0x1a, 0xb6, 0xf3, 0x74, 0x11, 0xb4, 0x9d, |
| 4239 | 0xfb, 0x79, 0x2e, 0x04, 0x2d, 0x50, 0x28, 0x83, |
| 4240 | 0xbf, 0xc6, 0x52, 0xd3, 0x34, 0xd6, 0xe8, 0x7a, |
| 4241 | 0xb6, 0xea, 0xe7, 0xa8, 0x6c, 0x15, 0x1e, 0x2c, |
| 4242 | 0x57, 0xbc, 0x48, 0x4e, 0x5f, 0x5c, 0xb6, 0x92, |
| 4243 | 0xd2, 0x49, 0x77, 0x81, 0x6d, 0x90, 0x70, 0xae, |
| 4244 | 0x98, 0xa1, 0x03, 0x0d, 0x6b, 0xb9, 0x77, 0x14, |
| 4245 | 0xf1, 0x4e, 0x23, 0xd3, 0xf8, 0x68, 0xbd, 0xc2, |
| 4246 | 0xfe, 0x04, 0xb7, 0x5c, 0xc5, 0x17, 0x60, 0x8f, |
| 4247 | 0x65, 0x54, 0xa4, 0x7a, 0x42, 0xdc, 0x18, 0x0d, |
| 4248 | 0xb5, 0xcf, 0x0f, 0xd3, 0xc7, 0x91, 0x66, 0x1b, |
| 4249 | 0x45, 0x42, 0x27, 0x75, 0x50, 0xe5, 0xee, 0xb8, |
| 4250 | 0x7f, 0x33, 0x2c, 0xba, 0x4a, 0x92, 0x4d, 0x2c, |
| 4251 | 0x3c, 0xe3, 0x0d, 0x80, 0x01, 0xba, 0x0d, 0x29, |
| 4252 | 0xd8, 0x3c, 0xe9, 0x13, 0x16, 0x57, 0xe6, 0xea, |
| 4253 | 0x94, 0x52, 0xe7, 0x00, 0x4d, 0x30, 0xb0, 0x0f, |
| 4254 | 0x35, 0xb8, 0xb8, 0xa7, 0xb1, 0xb5, 0x3b, 0x44, |
| 4255 | 0xe1, 0x2f, 0xfd, 0x88, 0xed, 0x43, 0xe7, 0x52, |
| 4256 | 0x10, 0x93, 0xb3, 0x8a, 0x30, 0x6b, 0x0a, 0xf7, |
| 4257 | 0x23, 0xc6, 0x50, 0x9d, 0x4a, 0xb0, 0xde, 0xc3, |
| 4258 | 0xdc, 0x9b, 0x2f, 0x01, 0x56, 0x36, 0x09, 0xc5, |
| 4259 | 0x2f, 0x6b, 0xfe, 0xf1, 0xd8, 0x27, 0x45, 0x03, |
| 4260 | 0x30, 0x5e, 0x5c, 0x5b, 0xb4, 0x62, 0x0e, 0x1a, |
| 4261 | 0xa9, 0x21, 0x2b, 0x92, 0x94, 0x87, 0x62, 0x57, |
| 4262 | 0x4c, 0x10, 0x74, 0x1a, 0xf1, 0x0a, 0xc5, 0x84, |
| 4263 | 0x3b, 0x9e, 0x72, 0x02, 0xd7, 0xcc, 0x09, 0x56, |
| 4264 | 0xbd, 0x54, 0xc1, 0xf0, 0xc3, 0xe3, 0xb3, 0xf8, |
| 4265 | 0xd2, 0x0d, 0x61, 0xcb, 0xef, 0xce, 0x0d, 0x05, |
| 4266 | 0xb0, 0x98, 0xd9, 0x8e, 0x4f, 0xf9, 0xbc, 0x93, |
| 4267 | 0xa6, 0xea, 0xc8, 0xcf, 0x10, 0x53, 0x4b, 0xf1, |
| 4268 | 0xec, 0xfc, 0x89, 0xf9, 0x64, 0xb0, 0x22, 0xbf, |
| 4269 | 0x9e, 0x55, 0x46, 0x9f, 0x7c, 0x50, 0x8e, 0x84, |
| 4270 | 0x54, 0x20, 0x98, 0xd7, 0x6c, 0x40, 0x1e, 0xdb, |
| 4271 | 0x69, 0x34, 0x78, 0x61, 0x24, 0x21, 0x9c, 0x8a, |
| 4272 | 0xb3, 0x62, 0x31, 0x8b, 0x6e, 0xf5, 0x2a, 0x35, |
| 4273 | 0x86, 0x13, 0xb1, 0x6c, 0x64, 0x2e, 0x41, 0xa5, |
| 4274 | 0x05, 0xf2, 0x42, 0xba, 0xd2, 0x3a, 0x0d, 0x8e, |
| 4275 | 0x8a, 0x59, 0x94, 0x3c, 0xcf, 0x36, 0x27, 0x82, |
| 4276 | 0xc2, 0x45, 0xee, 0x58, 0xcd, 0x88, 0xb4, 0xec, |
| 4277 | 0xde, 0xb2, 0x96, 0x0a, 0xaf, 0x38, 0x6f, 0x88, |
| 4278 | 0xd7, 0xd8, 0xe1, 0xdf, 0xb9, 0x96, 0xa9, 0x0a, |
| 4279 | 0xb1, 0x95, 0x28, 0x86, 0x20, 0xe9, 0x17, 0x49, |
| 4280 | 0xa2, 0x29, 0x38, 0xaa, 0xa5, 0xe9, 0x6e, 0xf1, |
| 4281 | 0x19, 0x27, 0xc0, 0xd5, 0x2a, 0x22, 0xc3, 0x0b, |
| 4282 | 0xdb, 0x7c, 0x73, 0x10, 0xb9, 0xba, 0x89, 0x76, |
| 4283 | 0x54, 0xae, 0x7d, 0x71, 0xb3, 0x93, 0xf6, 0x32, |
| 4284 | 0xe6, 0x47, 0x43, 0x55, 0xac, 0xa0, 0x0d, 0xc2, |
| 4285 | 0x93, 0x27, 0x4a, 0x8e, 0x0e, 0x74, 0x15, 0xc7, |
| 4286 | 0x0b, 0x85, 0xd9, 0x0c, 0xa9, 0x30, 0x7a, 0x3e, |
| 4287 | 0xea, 0x8f, 0x85, 0x6d, 0x3a, 0x12, 0x4f, 0x72, |
| 4288 | 0x69, 0x58, 0x7a, 0x80, 0xbb, 0xb5, 0x97, 0xf3, |
| 4289 | 0xcf, 0x70, 0xd2, 0x5d, 0xdd, 0x4d, 0x21, 0x79, |
| 4290 | 0x54, 0x4d, 0xe4, 0x05, 0xe8, 0xbd, 0xc2, 0x62, |
| 4291 | 0xb1, 0x3b, 0x77, 0x1c, 0xd6, 0x5c, 0xf3, 0xa0, |
| 4292 | 0x79, 0x00, 0xa8, 0x6c, 0x29, 0xd9, 0x18, 0x24, |
| 4293 | 0x36, 0xa2, 0x46, 0xc0, 0x96, 0x65, 0x7f, 0xbd, |
| 4294 | 0x2a, 0xed, 0x36, 0x16, 0x0c, 0xaa, 0x9f, 0xf4, |
| 4295 | 0xc5, 0xb4, 0xe2, 0x12, 0xed, 0x69, 0xed, 0x4f, |
| 4296 | 0x26, 0x2c, 0x39, 0x52, 0x89, 0x98, 0xe7, 0x2c, |
| 4297 | 0x99, 0xa4, 0x9e, 0xa3, 0x9b, 0x99, 0x46, 0x7a, |
| 4298 | 0x3a, 0xdc, 0xa8, 0x59, 0xa3, 0xdb, 0xc3, 0x3b, |
| 4299 | 0x95, 0x0d, 0x3b, 0x09, 0x6e, 0xee, 0x83, 0x5d, |
| 4300 | 0x32, 0x4d, 0xed, 0xab, 0xfa, 0x98, 0x14, 0x4e, |
| 4301 | 0xc3, 0x15, 0x45, 0x53, 0x61, 0xc4, 0x93, 0xbd, |
| 4302 | 0x90, 0xf4, 0x99, 0x95, 0x4c, 0xe6, 0x76, 0x92, |
| 4303 | 0x29, 0x90, 0x46, 0x30, 0x92, 0x69, 0x7d, 0x13, |
| 4304 | 0xf2, 0xa5, 0xcd, 0x69, 0x49, 0x44, 0xb2, 0x0f, |
| 4305 | 0x63, 0x40, 0x36, 0x5f, 0x09, 0xe2, 0x78, 0xf8, |
| 4306 | 0x91, 0xe3, 0xe2, 0xfa, 0x10, 0xf7, 0xc8, 0x24, |
| 4307 | 0xa8, 0x89, 0x32, 0x5c, 0x37, 0x25, 0x1d, 0xb2, |
| 4308 | 0xea, 0x17, 0x8a, 0x0a, 0xa9, 0x64, 0xc3, 0x7c, |
| 4309 | 0x3c, 0x7c, 0xbd, 0xc6, 0x79, 0x34, 0xe7, 0xe2, |
| 4310 | 0x85, 0x8e, 0xbf, 0xf8, 0xde, 0x92, 0xa0, 0xae, |
| 4311 | 0x20, 0xc4, 0xf6, 0xbb, 0x1f, 0x38, 0x19, 0x0e, |
| 4312 | 0xe8, 0x79, 0x9c, 0xa1, 0x23, 0xe9, 0x54, 0x7e, |
| 4313 | 0x37, 0x2f, 0xe2, 0x94, 0x32, 0xaf, 0xa0, 0x23, |
| 4314 | 0x49, 0xe4, 0xc0, 0xb3, 0xac, 0x00, 0x8f, 0x36, |
| 4315 | 0x05, 0xc4, 0xa6, 0x96, 0xec, 0x05, 0x98, 0x4f, |
| 4316 | 0x96, 0x67, 0x57, 0x1f, 0x20, 0x86, 0x1b, 0x2d, |
| 4317 | 0x69, 0xe4, 0x29, 0x93, 0x66, 0x5f, 0xaf, 0x6b, |
| 4318 | 0x88, 0x26, 0x2c, 0x67, 0x02, 0x4b, 0x52, 0xd0, |
| 4319 | 0x83, 0x7a, 0x43, 0x1f, 0xc0, 0x71, 0x15, 0x25, |
| 4320 | 0x77, 0x65, 0x08, 0x60, 0x11, 0x76, 0x4c, 0x8d, |
| 4321 | 0xed, 0xa9, 0x27, 0xc6, 0xb1, 0x2a, 0x2c, 0x6a, |
| 4322 | 0x4a, 0x97, 0xf5, 0xc6, 0xb7, 0x70, 0x42, 0xd3, |
| 4323 | 0x03, 0xd1, 0x24, 0x95, 0xec, 0x6d, 0xab, 0x38, |
| 4324 | 0x72, 0xce, 0xe2, 0x8b, 0x33, 0xd7, 0x51, 0x09, |
| 4325 | 0xdc, 0x45, 0xe0, 0x09, 0x96, 0x32, 0xf3, 0xc4, |
| 4326 | 0x84, 0xdc, 0x73, 0x73, 0x2d, 0x1b, 0x11, 0x98, |
| 4327 | 0xc5, 0x0e, 0x69, 0x28, 0x94, 0xc7, 0xb5, 0x4d, |
| 4328 | 0xc8, 0x8a, 0xd0, 0xaa, 0x13, 0x2e, 0x18, 0x74, |
| 4329 | 0xdd, 0xd1, 0x1e, 0xf3, 0x90, 0xe8, 0xfc, 0x9a, |
| 4330 | 0x72, 0x4a, 0x0e, 0xd1, 0xe4, 0xfb, 0x0d, 0x96, |
| 4331 | 0xd1, 0x0c, 0x79, 0x85, 0x1b, 0x1c, 0xfe, 0xe1, |
| 4332 | 0x62, 0x8f, 0x7a, 0x73, 0x32, 0xab, 0xc8, 0x18, |
| 4333 | 0x69, 0xe3, 0x34, 0x30, 0xdf, 0x13, 0xa6, 0xe5, |
| 4334 | 0xe8, 0x0e, 0x67, 0x7f, 0x81, 0x11, 0xb4, 0x60, |
| 4335 | 0xc7, 0xbd, 0x79, 0x65, 0x50, 0xdc, 0xc4, 0x5b, |
| 4336 | 0xde, 0x39, 0xa4, 0x01, 0x72, 0x63, 0xf3, 0xd1, |
| 4337 | 0x64, 0x4e, 0xdf, 0xfc, 0x27, 0x92, 0x37, 0x0d, |
| 4338 | 0x57, 0xcd, 0x11, 0x4f, 0x11, 0x04, 0x8e, 0x1d, |
| 4339 | 0x16, 0xf7, 0xcd, 0x92, 0x9a, 0x99, 0x30, 0x14, |
| 4340 | 0xf1, 0x7c, 0x67, 0x1b, 0x1f, 0x41, 0x0b, 0xe8, |
| 4341 | 0x32, 0xe8, 0xb8, 0xc1, 0x4f, 0x54, 0x86, 0x4f, |
| 4342 | 0xe5, 0x79, 0x81, 0x73, 0xcd, 0x43, 0x59, 0x68, |
| 4343 | 0x73, 0x02, 0x3b, 0x78, 0x21, 0x72, 0x43, 0x00, |
| 4344 | 0x49, 0x17, 0xf7, 0x00, 0xaf, 0x68, 0x24, 0x53, |
| 4345 | 0x05, 0x0a, 0xc3, 0x33, 0xe0, 0x33, 0x3f, 0x69, |
| 4346 | 0xd2, 0x84, 0x2f, 0x0b, 0xed, 0xde, 0x04, 0xf4, |
| 4347 | 0x11, 0x94, 0x13, 0x69, 0x51, 0x09, 0x28, 0xde, |
| 4348 | 0x57, 0x5c, 0xef, 0xdc, 0x9a, 0x49, 0x1c, 0x17, |
| 4349 | 0x97, 0xf3, 0x96, 0xc1, 0x7f, 0x5d, 0x2e, 0x7d, |
| 4350 | 0x55, 0xb8, 0xb3, 0x02, 0x09, 0xb3, 0x1f, 0xe7, |
| 4351 | 0xc9, 0x8d, 0xa3, 0x36, 0x34, 0x8a, 0x77, 0x13, |
| 4352 | 0x30, 0x63, 0x4c, 0xa5, 0xcd, 0xc3, 0xe0, 0x7e, |
| 4353 | 0x05, 0xa1, 0x7b, 0x0c, 0xcb, 0x74, 0x47, 0x31, |
| 4354 | 0x62, 0x03, 0x43, 0xf1, 0x87, 0xb4, 0xb0, 0x85, |
| 4355 | 0x87, 0x8e, 0x4b, 0x25, 0xc7, 0xcf, 0xae, 0x4b, |
| 4356 | 0x36, 0x46, 0x3e, 0x62, 0xbc, 0x6f, 0xeb, 0x5f, |
| 4357 | 0x73, 0xac, 0xe6, 0x07, 0xee, 0xc1, 0xa1, 0xd6, |
| 4358 | 0xc4, 0xab, 0xc9, 0xd6, 0x89, 0x45, 0xe1, 0xf1, |
| 4359 | 0x04, 0x4e, 0x1a, 0x6f, 0xbb, 0x4f, 0x3a, 0xa3, |
| 4360 | 0xa0, 0xcb, 0xa3, 0x0a, 0xd8, 0x71, 0x35, 0x55, |
| 4361 | 0xe4, 0xbc, 0x2e, 0x04, 0x06, 0xe6, 0xff, 0x5b, |
| 4362 | 0x1c, 0xc0, 0x11, 0x7c, 0xc5, 0x17, 0xf3, 0x38, |
| 4363 | 0xcf, 0xe9, 0xba, 0x0f, 0x0e, 0xef, 0x02, 0xc2, |
| 4364 | 0x8d, 0xc6, 0xbc, 0x4b, 0x67, 0x20, 0x95, 0xd7, |
| 4365 | 0x2c, 0x45, 0x5b, 0x86, 0x44, 0x8c, 0x6f, 0x2e, |
| 4366 | 0x7e, 0x9f, 0x1c, 0x77, 0xba, 0x6b, 0x0e, 0xa3, |
| 4367 | 0x69, 0xdc, 0xab, 0x24, 0x57, 0x60, 0x47, 0xc1, |
| 4368 | 0xd1, 0xa5, 0x9d, 0x23, 0xe6, 0xb1, 0x37, 0xfe, |
| 4369 | 0x93, 0xd2, 0x4c, 0x46, 0xf9, 0x0c, 0xc6, 0xfb, |
| 4370 | 0xd6, 0x9d, 0x99, 0x69, 0xab, 0x7a, 0x07, 0x0c, |
| 4371 | 0x65, 0xe7, 0xc4, 0x08, 0x96, 0xe2, 0xa5, 0x01, |
| 4372 | 0x3f, 0x46, 0x07, 0x05, 0x7e, 0xe8, 0x9a, 0x90, |
| 4373 | 0x50, 0xdc, 0xe9, 0x7a, 0xea, 0xa1, 0x39, 0x6e, |
| 4374 | 0x66, 0xe4, 0x6f, 0xa5, 0x5f, 0xb2, 0xd9, 0x5b, |
| 4375 | 0xf5, 0xdb, 0x2a, 0x32, 0xf0, 0x11, 0x6f, 0x7c, |
| 4376 | 0x26, 0x10, 0x8f, 0x3d, 0x80, 0xe9, 0x58, 0xf7, |
| 4377 | 0xe0, 0xa8, 0x57, 0xf8, 0xdb, 0x0e, 0xce, 0x99, |
| 4378 | 0x63, 0x19, 0x3d, 0xd5, 0xec, 0x1b, 0x77, 0x69, |
| 4379 | 0x98, 0xf6, 0xe4, 0x5f, 0x67, 0x17, 0x4b, 0x09, |
| 4380 | 0x85, 0x62, 0x82, 0x70, 0x18, 0xe2, 0x9a, 0x78, |
| 4381 | 0xe2, 0x62, 0xbd, 0xb4, 0xf1, 0x42, 0xc6, 0xfb, |
| 4382 | 0x08, 0xd0, 0xbd, 0xeb, 0x4e, 0x09, 0xf2, 0xc8, |
| 4383 | 0x1e, 0xdc, 0x3d, 0x32, 0x21, 0x56, 0x9c, 0x4f, |
| 4384 | 0x35, 0xf3, 0x61, 0x06, 0x72, 0x84, 0xc4, 0x32, |
| 4385 | 0xf2, 0xf1, 0xfa, 0x0b, 0x2f, 0xc3, 0xdb, 0x02, |
| 4386 | 0x04, 0xc2, 0xde, 0x57, 0x64, 0x60, 0x8d, 0xcf, |
| 4387 | 0xcb, 0x86, 0x5d, 0x97, 0x3e, 0xb1, 0x9c, 0x01, |
| 4388 | 0xd6, 0x28, 0x8f, 0x99, 0xbc, 0x46, 0xeb, 0x05, |
| 4389 | 0xaf, 0x7e, 0xb8, 0x21, 0x2a, 0x56, 0x85, 0x1c, |
| 4390 | 0xb3, 0x71, 0xa0, 0xde, 0xca, 0x96, 0xf1, 0x78, |
| 4391 | 0x49, 0xa2, 0x99, 0x81, 0x80, 0x5c, 0x01, 0xf5, |
| 4392 | 0xa0, 0xa2, 0x56, 0x63, 0xe2, 0x70, 0x07, 0xa5, |
| 4393 | 0x95, 0xd6, 0x85, 0xeb, 0x36, 0x9e, 0xa9, 0x51, |
| 4394 | 0x66, 0x56, 0x5f, 0x1d, 0x02, 0x19, 0xe2, 0xf6, |
| 4395 | 0x4f, 0x73, 0x38, 0x09, 0x75, 0x64, 0x48, 0xe0, |
| 4396 | 0xf1, 0x7e, 0x0e, 0xe8, 0x9d, 0xf9, 0xed, 0x94, |
| 4397 | 0xfe, 0x16, 0x26, 0x62, 0x49, 0x74, 0xf4, 0xb0, |
| 4398 | 0xd4, 0xa9, 0x6c, 0xb0, 0xfd, 0x53, 0xe9, 0x81, |
| 4399 | 0xe0, 0x7a, 0xbf, 0xcf, 0xb5, 0xc4, 0x01, 0x81, |
| 4400 | 0x79, 0x99, 0x77, 0x01, 0x3b, 0xe9, 0xa2, 0xb6, |
| 4401 | 0xe6, 0x6a, 0x8a, 0x9e, 0x56, 0x1c, 0x8d, 0x1e, |
| 4402 | 0x8f, 0x06, 0x55, 0x2c, 0x6c, 0xdc, 0x92, 0x87, |
| 4403 | 0x64, 0x3b, 0x4b, 0x19, 0xa1, 0x13, 0x64, 0x1d, |
| 4404 | 0x4a, 0xe9, 0xc0, 0x00, 0xb8, 0x95, 0xef, 0x6b, |
| 4405 | 0x1a, 0x86, 0x6d, 0x37, 0x52, 0x02, 0xc2, 0xe0, |
| 4406 | 0xc8, 0xbb, 0x42, 0x0c, 0x02, 0x21, 0x4a, 0xc9, |
| 4407 | 0xef, 0xa0, 0x54, 0xe4, 0x5e, 0x16, 0x53, 0x81, |
| 4408 | 0x70, 0x62, 0x10, 0xaf, 0xde, 0xb8, 0xb5, 0xd3, |
| 4409 | 0xe8, 0x5e, 0x6c, 0xc3, 0x8a, 0x3e, 0x18, 0x07, |
| 4410 | 0xf2, 0x2f, 0x7d, 0xa7, 0xe1, 0x3d, 0x4e, 0xb4, |
| 4411 | 0x26, 0xa7, 0xa3, 0x93, 0x86, 0xb2, 0x04, 0x1e, |
| 4412 | 0x53, 0x5d, 0x86, 0xd6, 0xde, 0x65, 0xca, 0xe3, |
| 4413 | 0x4e, 0xc1, 0xcf, 0xef, 0xc8, 0x70, 0x1b, 0x83, |
| 4414 | 0x13, 0xdd, 0x18, 0x8b, 0x0d, 0x76, 0xd2, 0xf6, |
| 4415 | 0x37, 0x7a, 0x93, 0x7a, 0x50, 0x11, 0x9f, 0x96, |
| 4416 | 0x86, 0x25, 0xfd, 0xac, 0xdc, 0xbe, 0x18, 0x93, |
| 4417 | 0x19, 0x6b, 0xec, 0x58, 0x4f, 0xb9, 0x75, 0xa7, |
| 4418 | 0xdd, 0x3f, 0x2f, 0xec, 0xc8, 0x5a, 0x84, 0xab, |
| 4419 | 0xd5, 0xe4, 0x8a, 0x07, 0xf6, 0x4d, 0x23, 0xd6, |
| 4420 | 0x03, 0xfb, 0x03, 0x6a, 0xea, 0x66, 0xbf, 0xd4, |
| 4421 | 0xb1, 0x34, 0xfb, 0x78, 0xe9, 0x55, 0xdc, 0x7c, |
| 4422 | 0x3d, 0x9c, 0xe5, 0x9a, 0xac, 0xc3, 0x7a, 0x80, |
| 4423 | 0x24, 0x6d, 0xa0, 0xef, 0x25, 0x7c, 0xb7, 0xea, |
| 4424 | 0xce, 0x4d, 0x5f, 0x18, 0x60, 0xce, 0x87, 0x22, |
| 4425 | 0x66, 0x2f, 0xd5, 0xdd, 0xdd, 0x02, 0x21, 0x75, |
| 4426 | 0x82, 0xa0, 0x1f, 0x58, 0xc6, 0xd3, 0x62, 0xf7, |
| 4427 | 0x32, 0xd8, 0xaf, 0x1e, 0x07, 0x77, 0x51, 0x96, |
| 4428 | 0xd5, 0x6b, 0x1e, 0x7e, 0x80, 0x02, 0xe8, 0x67, |
| 4429 | 0xea, 0x17, 0x0b, 0x10, 0xd2, 0x3f, 0x28, 0x25, |
| 4430 | 0x4f, 0x05, 0x77, 0x02, 0x14, 0x69, 0xf0, 0x2c, |
| 4431 | 0xbe, 0x0c, 0xf1, 0x74, 0x30, 0xd1, 0xb9, 0x9b, |
| 4432 | 0xfc, 0x8c, 0xbb, 0x04, 0x16, 0xd9, 0xba, 0xc3, |
| 4433 | 0xbc, 0x91, 0x8a, 0xc4, 0x30, 0xa4, 0xb0, 0x12, |
| 4434 | 0x4c, 0x21, 0x87, 0xcb, 0xc9, 0x1d, 0x16, 0x96, |
| 4435 | 0x07, 0x6f, 0x23, 0x54, 0xb9, 0x6f, 0x79, 0xe5, |
| 4436 | 0x64, 0xc0, 0x64, 0xda, 0xb1, 0xae, 0xdd, 0x60, |
| 4437 | 0x6c, 0x1a, 0x9d, 0xd3, 0x04, 0x8e, 0x45, 0xb0, |
| 4438 | 0x92, 0x61, 0xd0, 0x48, 0x81, 0xed, 0x5e, 0x1d, |
| 4439 | 0xa0, 0xc9, 0xa4, 0x33, 0xc7, 0x13, 0x51, 0x5d, |
| 4440 | 0x7f, 0x83, 0x73, 0xb6, 0x70, 0x18, 0x65, 0x3e, |
| 4441 | 0x2f, 0x0e, 0x7a, 0x12, 0x39, 0x98, 0xab, 0xd8, |
| 4442 | 0x7e, 0x6f, 0xa3, 0xd1, 0xba, 0x56, 0xad, 0xbd, |
| 4443 | 0xf0, 0x03, 0x01, 0x1c, 0x85, 0x35, 0x9f, 0xeb, |
| 4444 | 0x19, 0x63, 0xa1, 0xaf, 0xfe, 0x2d, 0x35, 0x50, |
| 4445 | 0x39, 0xa0, 0x65, 0x7c, 0x95, 0x7e, 0x6b, 0xfe, |
| 4446 | 0xc1, 0xac, 0x07, 0x7c, 0x98, 0x4f, 0xbe, 0x57, |
| 4447 | 0xa7, 0x22, 0xec, 0xe2, 0x7e, 0x29, 0x09, 0x53, |
| 4448 | 0xe8, 0xbf, 0xb4, 0x7e, 0x3f, 0x8f, 0xfc, 0x14, |
| 4449 | 0xce, 0x54, 0xf9, 0x18, 0x58, 0xb5, 0xff, 0x44, |
| 4450 | 0x05, 0x9d, 0xce, 0x1b, 0xb6, 0x82, 0x23, 0xc8, |
| 4451 | 0x2e, 0xbc, 0x69, 0xbb, 0x4a, 0x29, 0x0f, 0x65, |
| 4452 | 0x94, 0xf0, 0x63, 0x06, 0x0e, 0xef, 0x8c, 0xbd, |
| 4453 | 0xff, 0xfd, 0xb0, 0x21, 0x6e, 0x57, 0x05, 0x75, |
| 4454 | 0xda, 0xd5, 0xc4, 0xeb, 0x8d, 0x32, 0xf7, 0x50, |
| 4455 | 0xd3, 0x6f, 0x22, 0xed, 0x5f, 0x8e, 0xa2, 0x5b, |
| 4456 | 0x80, 0x8c, 0xc8, 0x78, 0x40, 0x24, 0x4b, 0x89, |
| 4457 | 0x30, 0xce, 0x7a, 0x97, 0x0e, 0xc4, 0xaf, 0xef, |
| 4458 | 0x9b, 0xb4, 0xcd, 0x66, 0x74, 0x14, 0x04, 0x2b, |
| 4459 | 0xf7, 0xce, 0x0b, 0x1c, 0x6e, 0xc2, 0x78, 0x8c, |
| 4460 | 0xca, 0xc5, 0xd0, 0x1c, 0x95, 0x4a, 0x91, 0x2d, |
| 4461 | 0xa7, 0x20, 0xeb, 0x86, 0x52, 0xb7, 0x67, 0xd8, |
| 4462 | 0x0c, 0xd6, 0x04, 0x14, 0xde, 0x51, 0x74, 0x75, |
| 4463 | 0xe7, 0x11, 0xb4, 0x87, 0xa3, 0x3d, 0x2d, 0xad, |
| 4464 | 0x4f, 0xef, 0xa0, 0x0f, 0x70, 0x00, 0x6d, 0x13, |
| 4465 | 0x19, 0x1d, 0x41, 0x50, 0xe9, 0xd8, 0xf0, 0x32, |
| 4466 | 0x71, 0xbc, 0xd3, 0x11, 0xf2, 0xac, 0xbe, 0xaf, |
| 4467 | 0x75, 0x46, 0x65, 0x4e, 0x07, 0x34, 0x37, 0xa3, |
| 4468 | 0x89, 0xfe, 0x75, 0xd4, 0x70, 0x4c, 0xc6, 0x3f, |
| 4469 | 0x69, 0x24, 0x0e, 0x38, 0x67, 0x43, 0x8c, 0xde, |
| 4470 | 0x06, 0xb5, 0xb8, 0xe7, 0xc4, 0xf0, 0x41, 0x8f, |
| 4471 | 0xf0, 0xbd, 0x2f, 0x0b, 0xb9, 0x18, 0xf8, 0xde, |
| 4472 | 0x64, 0xb1, 0xdb, 0xee, 0x00, 0x50, 0x77, 0xe1, |
| 4473 | 0xc7, 0xff, 0xa6, 0xfa, 0xdd, 0x70, 0xf4, 0xe3, |
| 4474 | 0x93, 0xe9, 0x77, 0x35, 0x3d, 0x4b, 0x2f, 0x2b, |
| 4475 | 0x6d, 0x55, 0xf0, 0xfc, 0x88, 0x54, 0x4e, 0x89, |
| 4476 | 0xc1, 0x8a, 0x23, 0x31, 0x2d, 0x14, 0x2a, 0xb8, |
| 4477 | 0x1b, 0x15, 0xdd, 0x9e, 0x6e, 0x7b, 0xda, 0x05, |
| 4478 | 0x91, 0x7d, 0x62, 0x64, 0x96, 0x72, 0xde, 0xfc, |
| 4479 | 0xc1, 0xec, 0xf0, 0x23, 0x51, 0x6f, 0xdb, 0x5b, |
| 4480 | 0x1d, 0x08, 0x57, 0xce, 0x09, 0xb8, 0xf6, 0xcd, |
| 4481 | 0x8d, 0x95, 0xf2, 0x20, 0xbf, 0x0f, 0x20, 0x57, |
| 4482 | 0x98, 0x81, 0x84, 0x4f, 0x15, 0x5c, 0x76, 0xe7, |
| 4483 | 0x3e, 0x0a, 0x3a, 0x6c, 0xc4, 0x8a, 0xbe, 0x78, |
| 4484 | 0x74, 0x77, 0xc3, 0x09, 0x4b, 0x5d, 0x48, 0xe4, |
| 4485 | 0xc8, 0xcb, 0x0b, 0xea, 0x17, 0x28, 0xcf, 0xcf, |
| 4486 | 0x31, 0x32, 0x44, 0xa4, 0xe5, 0x0e, 0x1a, 0x98, |
| 4487 | 0x94, 0xc4, 0xf0, 0xff, 0xae, 0x3e, 0x44, 0xe8, |
| 4488 | 0xa5, 0xb3, 0xb5, 0x37, 0x2f, 0xe8, 0xaf, 0x6f, |
| 4489 | 0x28, 0xc1, 0x37, 0x5f, 0x31, 0xd2, 0xb9, 0x33, |
| 4490 | 0xb1, 0xb2, 0x52, 0x94, 0x75, 0x2c, 0x29, 0x59, |
| 4491 | 0x06, 0xc2, 0x25, 0xe8, 0x71, 0x65, 0x4e, 0xed, |
| 4492 | 0xc0, 0x9c, 0xb1, 0xbb, 0x25, 0xdc, 0x6c, 0xe7, |
| 4493 | 0x4b, 0xa5, 0x7a, 0x54, 0x7a, 0x60, 0xff, 0x7a, |
| 4494 | 0xe0, 0x50, 0x40, 0x96, 0x35, 0x63, 0xe4, 0x0b, |
| 4495 | 0x76, 0xbd, 0xa4, 0x65, 0x00, 0x1b, 0x57, 0x88, |
| 4496 | 0xae, 0xed, 0x39, 0x88, 0x42, 0x11, 0x3c, 0xed, |
| 4497 | 0x85, 0x67, 0x7d, 0xb9, 0x68, 0x82, 0xe9, 0x43, |
| 4498 | 0x3c, 0x47, 0x53, 0xfa, 0xe8, 0xf8, 0x9f, 0x1f, |
| 4499 | 0x9f, 0xef, 0x0f, 0xf7, 0x30, 0xd9, 0x30, 0x0e, |
| 4500 | 0xb9, 0x9f, 0x69, 0x18, 0x2f, 0x7e, 0xf8, 0xf8, |
| 4501 | 0xf8, 0x8c, 0x0f, 0xd4, 0x02, 0x4d, 0xea, 0xcd, |
| 4502 | 0x0a, 0x9c, 0x6f, 0x71, 0x6d, 0x5a, 0x4c, 0x60, |
| 4503 | 0xce, 0x20, 0x56, 0x32, 0xc6, 0xc5, 0x99, 0x1f, |
| 4504 | 0x09, 0xe6, 0x4e, 0x18, 0x1a, 0x15, 0x13, 0xa8, |
| 4505 | 0x7d, 0xb1, 0x6b, 0xc0, 0xb2, 0x6d, 0xf8, 0x26, |
| 4506 | 0x66, 0xf8, 0x3d, 0x18, 0x74, 0x70, 0x66, 0x7a, |
| 4507 | 0x34, 0x17, 0xde, 0xba, 0x47, 0xf1, 0x06, 0x18, |
| 4508 | 0xcb, 0xaf, 0xeb, 0x4a, 0x1e, 0x8f, 0xa7, 0x77, |
| 4509 | 0xe0, 0x3b, 0x78, 0x62, 0x66, 0xc9, 0x10, 0xea, |
| 4510 | 0x1f, 0xb7, 0x29, 0x0a, 0x45, 0xa1, 0x1d, 0x1e, |
| 4511 | 0x1d, 0xe2, 0x65, 0x61, 0x50, 0x9c, 0xd7, 0x05, |
| 4512 | 0xf2, 0x0b, 0x5b, 0x12, 0x61, 0x02, 0xc8, 0xe5, |
| 4513 | 0x63, 0x4f, 0x20, 0x0c, 0x07, 0x17, 0x33, 0x5e, |
| 4514 | 0x03, 0x9a, 0x53, 0x0f, 0x2e, 0x55, 0xfe, 0x50, |
| 4515 | 0x43, 0x7d, 0xd0, 0xb6, 0x7e, 0x5a, 0xda, 0xae, |
| 4516 | 0x58, 0xef, 0x15, 0xa9, 0x83, 0xd9, 0x46, 0xb1, |
| 4517 | 0x42, 0xaa, 0xf5, 0x02, 0x6c, 0xce, 0x92, 0x06, |
| 4518 | 0x1b, 0xdb, 0x66, 0x45, 0x91, 0x79, 0xc2, 0x2d, |
| 4519 | 0xe6, 0x53, 0xd3, 0x14, 0xfd, 0xbb, 0x44, 0x63, |
| 4520 | 0xc6, 0xd7, 0x3d, 0x7a, 0x0c, 0x75, 0x78, 0x9d, |
| 4521 | 0x5c, 0xa6, 0x39, 0xb3, 0xe5, 0x63, 0xca, 0x8b, |
| 4522 | 0xfe, 0xd3, 0xef, 0x60, 0x83, 0xf6, 0x8e, 0x70, |
| 4523 | 0xb6, 0x67, 0xc7, 0x77, 0xed, 0x23, 0xef, 0x4c, |
| 4524 | 0xf0, 0xed, 0x2d, 0x07, 0x59, 0x6f, 0xc1, 0x01, |
| 4525 | 0x34, 0x37, 0x08, 0xab, 0xd9, 0x1f, 0x09, 0xb1, |
| 4526 | 0xce, 0x5b, 0x17, 0xff, 0x74, 0xf8, 0x9c, 0xd5, |
| 4527 | 0x2c, 0x56, 0x39, 0x79, 0x0f, 0x69, 0x44, 0x75, |
| 4528 | 0x58, 0x27, 0x01, 0xc4, 0xbf, 0xa7, 0xa1, 0x1d, |
| 4529 | 0x90, 0x17, 0x77, 0x86, 0x5a, 0x3f, 0xd9, 0xd1, |
| 4530 | 0x0e, 0xa0, 0x10, 0xf8, 0xec, 0x1e, 0xa5, 0x7f, |
| 4531 | 0x5e, 0x36, 0xd1, 0xe3, 0x04, 0x2c, 0x70, 0xf7, |
| 4532 | 0x8e, 0xc0, 0x98, 0x2f, 0x6c, 0x94, 0x2b, 0x41, |
| 4533 | 0xb7, 0x60, 0x00, 0xb7, 0x2e, 0xb8, 0x02, 0x8d, |
| 4534 | 0xb8, 0xb0, 0xd3, 0x86, 0xba, 0x1d, 0xd7, 0x90, |
| 4535 | 0xd6, 0xb6, 0xe1, 0xfc, 0xd7, 0xd8, 0x28, 0x06, |
| 4536 | 0x63, 0x9b, 0xce, 0x61, 0x24, 0x79, 0xc0, 0x70, |
| 4537 | 0x52, 0xd0, 0xb6, 0xd4, 0x28, 0x95, 0x24, 0x87, |
| 4538 | 0x03, 0x1f, 0xb7, 0x9a, 0xda, 0xa3, 0xfb, 0x52, |
| 4539 | 0x5b, 0x68, 0xe7, 0x4c, 0x8c, 0x24, 0xe1, 0x42, |
| 4540 | 0xf7, 0xd5, 0xfd, 0xad, 0x06, 0x32, 0x9f, 0xba, |
| 4541 | 0xc1, 0xfc, 0xdd, 0xc6, 0xfc, 0xfc, 0xb3, 0x38, |
| 4542 | 0x74, 0x56, 0x58, 0x40, 0x02, 0x37, 0x52, 0x2c, |
| 4543 | 0x55, 0xcc, 0xb3, 0x9e, 0x7a, 0xe9, 0xd4, 0x38, |
| 4544 | 0x41, 0x5e, 0x0c, 0x35, 0xe2, 0x11, 0xd1, 0x13, |
| 4545 | 0xf8, 0xb7, 0x8d, 0x72, 0x6b, 0x22, 0x2a, 0xb0, |
| 4546 | 0xdb, 0x08, 0xba, 0x35, 0xb9, 0x3f, 0xc8, 0xd3, |
| 4547 | 0x24, 0x90, 0xec, 0x58, 0xd2, 0x09, 0xc7, 0x2d, |
| 4548 | 0xed, 0x38, 0x80, 0x36, 0x72, 0x43, 0x27, 0x49, |
| 4549 | 0x4a, 0x80, 0x8a, 0xa2, 0xe8, 0xd3, 0xda, 0x30, |
| 4550 | 0x7d, 0xb6, 0x82, 0x37, 0x86, 0x92, 0x86, 0x3e, |
| 4551 | 0x08, 0xb2, 0x28, 0x5a, 0x55, 0x44, 0x24, 0x7d, |
| 4552 | 0x40, 0x48, 0x8a, 0xb6, 0x89, 0x58, 0x08, 0xa0, |
| 4553 | 0xd6, 0x6d, 0x3a, 0x17, 0xbf, 0xf6, 0x54, 0xa2, |
| 4554 | 0xf5, 0xd3, 0x8c, 0x0f, 0x78, 0x12, 0x57, 0x8b, |
| 4555 | 0xd5, 0xc2, 0xfd, 0x58, 0x5b, 0x7f, 0x38, 0xe3, |
| 4556 | 0xcc, 0xb7, 0x7c, 0x48, 0xb3, 0x20, 0xe8, 0x81, |
| 4557 | 0x14, 0x32, 0x45, 0x05, 0xe0, 0xdb, 0x9f, 0x75, |
| 4558 | 0x85, 0xb4, 0x6a, 0xfc, 0x95, 0xe3, 0x54, 0x22, |
| 4559 | 0x12, 0xee, 0x30, 0xfe, 0xd8, 0x30, 0xef, 0x34, |
| 4560 | 0x50, 0xab, 0x46, 0x30, 0x98, 0x2f, 0xb7, 0xc0, |
| 4561 | 0x15, 0xa2, 0x83, 0xb6, 0xf2, 0x06, 0x21, 0xa2, |
| 4562 | 0xc3, 0x26, 0x37, 0x14, 0xd1, 0x4d, 0xb5, 0x10, |
| 4563 | 0x52, 0x76, 0x4d, 0x6a, 0xee, 0xb5, 0x2b, 0x15, |
| 4564 | 0xb7, 0xf9, 0x51, 0xe8, 0x2a, 0xaf, 0xc7, 0xfa, |
| 4565 | 0x77, 0xaf, 0xb0, 0x05, 0x4d, 0xd1, 0x68, 0x8e, |
| 4566 | 0x74, 0x05, 0x9f, 0x9d, 0x93, 0xa5, 0x3e, 0x7f, |
| 4567 | 0x4e, 0x5f, 0x9d, 0xcb, 0x09, 0xc7, 0x83, 0xe3, |
| 4568 | 0x02, 0x9d, 0x27, 0x1f, 0xef, 0x85, 0x05, 0x8d, |
| 4569 | 0xec, 0x55, 0x88, 0x0f, 0x0d, 0x7c, 0x4c, 0xe8, |
| 4570 | 0xa1, 0x75, 0xa0, 0xd8, 0x06, 0x47, 0x14, 0xef, |
| 4571 | 0xaa, 0x61, 0xcf, 0x26, 0x15, 0xad, 0xd8, 0xa3, |
| 4572 | 0xaa, 0x75, 0xf2, 0x78, 0x4a, 0x5a, 0x61, 0xdf, |
| 4573 | 0x8b, 0xc7, 0x04, 0xbc, 0xb2, 0x32, 0xd2, 0x7e, |
| 4574 | 0x42, 0xee, 0xb4, 0x2f, 0x51, 0xff, 0x7b, 0x2e, |
| 4575 | 0xd3, 0x02, 0xe8, 0xdc, 0x5d, 0x0d, 0x50, 0xdc, |
| 4576 | 0xae, 0xb7, 0x46, 0xf9, 0xa8, 0xe6, 0xd0, 0x16, |
| 4577 | 0xcc, 0xe6, 0x2c, 0x81, 0xc7, 0xad, 0xe9, 0xf0, |
| 4578 | 0x05, 0x72, 0x6d, 0x3d, 0x0a, 0x7a, 0xa9, 0x02, |
| 4579 | 0xac, 0x82, 0x93, 0x6e, 0xb6, 0x1c, 0x28, 0xfc, |
| 4580 | 0x44, 0x12, 0xfb, 0x73, 0x77, 0xd4, 0x13, 0x39, |
| 4581 | 0x29, 0x88, 0x8a, 0xf3, 0x5c, 0xa6, 0x36, 0xa0, |
| 4582 | 0x2a, 0xed, 0x7e, 0xb1, 0x1d, 0xd6, 0x4c, 0x6b, |
| 4583 | 0x41, 0x01, 0x18, 0x5d, 0x5d, 0x07, 0x97, 0xa6, |
| 4584 | 0x4b, 0xef, 0x31, 0x18, 0xea, 0xac, 0xb1, 0x84, |
| 4585 | 0x21, 0xed, 0xda, 0x86, |
| 4586 | }, |
| 4587 | .rlen = 4100, |
Joy Latten | 23e353c | 2007-10-23 08:50:32 +0800 | [diff] [blame] | 4588 | }, |
| 4589 | }; |
| 4590 | |
| 4591 | static struct cipher_testvec aes_ctr_dec_tv_template[] = { |
| 4592 | { /* From RFC 3686 */ |
| 4593 | .key = { 0xae, 0x68, 0x52, 0xf8, 0x12, 0x10, 0x67, 0xcc, |
| 4594 | 0x4b, 0xf7, 0xa5, 0x76, 0x55, 0x77, 0xf3, 0x9e, |
| 4595 | 0x00, 0x00, 0x00, 0x30 }, |
| 4596 | .klen = 20, |
| 4597 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 4598 | .input = { 0xe4, 0x09, 0x5d, 0x4f, 0xb7, 0xa7, 0xb3, 0x79, |
| 4599 | 0x2d, 0x61, 0x75, 0xa3, 0x26, 0x13, 0x11, 0xb8 }, |
| 4600 | .ilen = 16, |
| 4601 | .result = { "Single block msg" }, |
| 4602 | .rlen = 16, |
| 4603 | }, { |
| 4604 | .key = { 0x7e, 0x24, 0x06, 0x78, 0x17, 0xfa, 0xe0, 0xd7, |
| 4605 | 0x43, 0xd6, 0xce, 0x1f, 0x32, 0x53, 0x91, 0x63, |
| 4606 | 0x00, 0x6c, 0xb6, 0xdb }, |
| 4607 | .klen = 20, |
| 4608 | .iv = { 0xc0, 0x54, 0x3b, 0x59, 0xda, 0x48, 0xd9, 0x0b }, |
| 4609 | .input = { 0x51, 0x04, 0xa1, 0x06, 0x16, 0x8a, 0x72, 0xd9, |
| 4610 | 0x79, 0x0d, 0x41, 0xee, 0x8e, 0xda, 0xd3, 0x88, |
| 4611 | 0xeb, 0x2e, 0x1e, 0xfc, 0x46, 0xda, 0x57, 0xc8, |
| 4612 | 0xfc, 0xe6, 0x30, 0xdf, 0x91, 0x41, 0xbe, 0x28 }, |
| 4613 | .ilen = 32, |
| 4614 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 4615 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 4616 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 4617 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 4618 | .rlen = 32, |
| 4619 | }, { |
| 4620 | .key = { 0x16, 0xaf, 0x5b, 0x14, 0x5f, 0xc9, 0xf5, 0x79, |
| 4621 | 0xc1, 0x75, 0xf9, 0x3e, 0x3b, 0xfb, 0x0e, 0xed, |
| 4622 | 0x86, 0x3d, 0x06, 0xcc, 0xfd, 0xb7, 0x85, 0x15, |
| 4623 | 0x00, 0x00, 0x00, 0x48 }, |
| 4624 | .klen = 28, |
| 4625 | .iv = { 0x36, 0x73, 0x3c, 0x14, 0x7d, 0x6d, 0x93, 0xcb }, |
| 4626 | .input = { 0x4b, 0x55, 0x38, 0x4f, 0xe2, 0x59, 0xc9, 0xc8, |
| 4627 | 0x4e, 0x79, 0x35, 0xa0, 0x03, 0xcb, 0xe9, 0x28 }, |
| 4628 | .ilen = 16, |
| 4629 | .result = { "Single block msg" }, |
| 4630 | .rlen = 16, |
| 4631 | }, { |
| 4632 | .key = { 0x7c, 0x5c, 0xb2, 0x40, 0x1b, 0x3d, 0xc3, 0x3c, |
| 4633 | 0x19, 0xe7, 0x34, 0x08, 0x19, 0xe0, 0xf6, 0x9c, |
| 4634 | 0x67, 0x8c, 0x3d, 0xb8, 0xe6, 0xf6, 0xa9, 0x1a, |
| 4635 | 0x00, 0x96, 0xb0, 0x3b }, |
| 4636 | .klen = 28, |
| 4637 | .iv = { 0x02, 0x0c, 0x6e, 0xad, 0xc2, 0xcb, 0x50, 0x0d }, |
| 4638 | .input = { 0x45, 0x32, 0x43, 0xfc, 0x60, 0x9b, 0x23, 0x32, |
| 4639 | 0x7e, 0xdf, 0xaa, 0xfa, 0x71, 0x31, 0xcd, 0x9f, |
| 4640 | 0x84, 0x90, 0x70, 0x1c, 0x5a, 0xd4, 0xa7, 0x9c, |
| 4641 | 0xfc, 0x1f, 0xe0, 0xff, 0x42, 0xf4, 0xfb, 0x00 }, |
| 4642 | .ilen = 32, |
| 4643 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 4644 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 4645 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 4646 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 4647 | .rlen = 32, |
| 4648 | }, { |
| 4649 | .key = { 0x77, 0x6b, 0xef, 0xf2, 0x85, 0x1d, 0xb0, 0x6f, |
| 4650 | 0x4c, 0x8a, 0x05, 0x42, 0xc8, 0x69, 0x6f, 0x6c, |
| 4651 | 0x6a, 0x81, 0xaf, 0x1e, 0xec, 0x96, 0xb4, 0xd3, |
| 4652 | 0x7f, 0xc1, 0xd6, 0x89, 0xe6, 0xc1, 0xc1, 0x04, |
| 4653 | 0x00, 0x00, 0x00, 0x60 }, |
| 4654 | .klen = 36, |
| 4655 | .iv = { 0xdb, 0x56, 0x72, 0xc9, 0x7a, 0xa8, 0xf0, 0xb2 }, |
| 4656 | .input = { 0x14, 0x5a, 0xd0, 0x1d, 0xbf, 0x82, 0x4e, 0xc7, |
| 4657 | 0x56, 0x08, 0x63, 0xdc, 0x71, 0xe3, 0xe0, 0xc0 }, |
| 4658 | .ilen = 16, |
| 4659 | .result = { "Single block msg" }, |
| 4660 | .rlen = 16, |
| 4661 | }, { |
| 4662 | .key = { 0xf6, 0xd6, 0x6d, 0x6b, 0xd5, 0x2d, 0x59, 0xbb, |
| 4663 | 0x07, 0x96, 0x36, 0x58, 0x79, 0xef, 0xf8, 0x86, |
| 4664 | 0xc6, 0x6d, 0xd5, 0x1a, 0x5b, 0x6a, 0x99, 0x74, |
| 4665 | 0x4b, 0x50, 0x59, 0x0c, 0x87, 0xa2, 0x38, 0x84, |
| 4666 | 0x00, 0xfa, 0xac, 0x24 }, |
| 4667 | .klen = 36, |
| 4668 | .iv = { 0xc1, 0x58, 0x5e, 0xf1, 0x5a, 0x43, 0xd8, 0x75 }, |
| 4669 | .input = { 0xf0, 0x5e, 0x23, 0x1b, 0x38, 0x94, 0x61, 0x2c, |
| 4670 | 0x49, 0xee, 0x00, 0x0b, 0x80, 0x4e, 0xb2, 0xa9, |
| 4671 | 0xb8, 0x30, 0x6b, 0x50, 0x8f, 0x83, 0x9d, 0x6a, |
| 4672 | 0x55, 0x30, 0x83, 0x1d, 0x93, 0x44, 0xaf, 0x1c }, |
| 4673 | .ilen = 32, |
| 4674 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 4675 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 4676 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 4677 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 4678 | .rlen = 32, |
| 4679 | }, |
| 4680 | }; |
| 4681 | |
Mikko Herranen | 28db8e3 | 2007-11-26 22:24:11 +0800 | [diff] [blame] | 4682 | static struct aead_testvec aes_gcm_enc_tv_template[] = { |
| 4683 | { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ |
| 4684 | .klen = 16, |
| 4685 | .tag = { 0x58, 0xe2, 0xfc, 0xce, 0xfa, 0x7e, 0x30, 0x61, |
| 4686 | 0x36, 0x7f, 0x1d, 0x57, 0xa4, 0xe7, 0x45, 0x5a }, |
| 4687 | .tlen = 16 |
| 4688 | }, { |
| 4689 | .klen = 16, |
| 4690 | .ilen = 16, |
| 4691 | .result = { 0x03, 0x88, 0xda, 0xce, 0x60, 0xb6, 0xa3, 0x92, |
| 4692 | 0xf3, 0x28, 0xc2, 0xb9, 0x71, 0xb2, 0xfe, 0x78 }, |
| 4693 | .rlen = 16, |
| 4694 | .tag = { 0xab, 0x6e, 0x47, 0xd4, 0x2c, 0xec, 0x13, 0xbd, |
| 4695 | 0xf5, 0x3a, 0x67, 0xb2, 0x12, 0x57, 0xbd, 0xdf }, |
| 4696 | .tlen = 16 |
| 4697 | }, { |
| 4698 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4699 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, |
| 4700 | .klen = 16, |
| 4701 | .iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, |
| 4702 | 0xde, 0xca, 0xf8, 0x88 }, |
| 4703 | .input = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
| 4704 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
| 4705 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
| 4706 | 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, |
| 4707 | 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, |
| 4708 | 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, |
| 4709 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
| 4710 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, |
| 4711 | .ilen = 64, |
| 4712 | .result = { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, |
| 4713 | 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, |
| 4714 | 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, |
| 4715 | 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, |
| 4716 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, |
| 4717 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, |
| 4718 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, |
| 4719 | 0x3d, 0x58, 0xe0, 0x91, 0x47, 0x3f, 0x59, 0x85 }, |
| 4720 | .rlen = 64, |
| 4721 | .tag = { 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6, |
| 4722 | 0x2c, 0xf3, 0x5a, 0xbd, 0x2b, 0xa6, 0xfa, 0xb4 }, |
| 4723 | .tlen = 16 |
| 4724 | }, { |
| 4725 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4726 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, |
| 4727 | .klen = 16, |
| 4728 | .iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, |
| 4729 | 0xde, 0xca, 0xf8, 0x88 }, |
| 4730 | .input = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
| 4731 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
| 4732 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
| 4733 | 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, |
| 4734 | 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, |
| 4735 | 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, |
| 4736 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
| 4737 | 0xba, 0x63, 0x7b, 0x39 }, |
| 4738 | .ilen = 60, |
| 4739 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
| 4740 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
| 4741 | 0xab, 0xad, 0xda, 0xd2 }, |
| 4742 | .alen = 20, |
| 4743 | .result = { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, |
| 4744 | 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, |
| 4745 | 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, |
| 4746 | 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, |
| 4747 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, |
| 4748 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, |
| 4749 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, |
| 4750 | 0x3d, 0x58, 0xe0, 0x91 }, |
| 4751 | .rlen = 60, |
| 4752 | .tag = { 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb, |
| 4753 | 0x94, 0xfa, 0xe9, 0x5a, 0xe7, 0x12, 0x1a, 0x47 }, |
| 4754 | .tlen = 16 |
| 4755 | }, { |
| 4756 | .klen = 24, |
| 4757 | .tag = { 0xcd, 0x33, 0xb2, 0x8a, 0xc7, 0x73, 0xf7, 0x4b, |
| 4758 | 0xa0, 0x0e, 0xd1, 0xf3, 0x12, 0x57, 0x24, 0x35 }, |
| 4759 | .tlen = 16 |
| 4760 | }, { |
| 4761 | .klen = 24, |
| 4762 | .ilen = 16, |
| 4763 | .result = { 0x98, 0xe7, 0x24, 0x7c, 0x07, 0xf0, 0xfe, 0x41, |
| 4764 | 0x1c, 0x26, 0x7e, 0x43, 0x84, 0xb0, 0xf6, 0x00 }, |
| 4765 | .rlen = 16, |
| 4766 | .tag = { 0x2f, 0xf5, 0x8d, 0x80, 0x03, 0x39, 0x27, 0xab, |
| 4767 | 0x8e, 0xf4, 0xd4, 0x58, 0x75, 0x14, 0xf0, 0xfb }, |
| 4768 | .tlen = 16 |
| 4769 | }, { |
| 4770 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4771 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
| 4772 | 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c }, |
| 4773 | .klen = 24, |
| 4774 | .iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, |
| 4775 | 0xde, 0xca, 0xf8, 0x88 }, |
| 4776 | .input = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
| 4777 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
| 4778 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
| 4779 | 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, |
| 4780 | 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, |
| 4781 | 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, |
| 4782 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
| 4783 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, |
| 4784 | .ilen = 64, |
| 4785 | .result = { 0x39, 0x80, 0xca, 0x0b, 0x3c, 0x00, 0xe8, 0x41, |
| 4786 | 0xeb, 0x06, 0xfa, 0xc4, 0x87, 0x2a, 0x27, 0x57, |
| 4787 | 0x85, 0x9e, 0x1c, 0xea, 0xa6, 0xef, 0xd9, 0x84, |
| 4788 | 0x62, 0x85, 0x93, 0xb4, 0x0c, 0xa1, 0xe1, 0x9c, |
| 4789 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, |
| 4790 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, |
| 4791 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, |
| 4792 | 0xcc, 0xda, 0x27, 0x10, 0xac, 0xad, 0xe2, 0x56 }, |
| 4793 | .rlen = 64, |
| 4794 | .tag = { 0x99, 0x24, 0xa7, 0xc8, 0x58, 0x73, 0x36, 0xbf, |
| 4795 | 0xb1, 0x18, 0x02, 0x4d, 0xb8, 0x67, 0x4a, 0x14 }, |
| 4796 | .tlen = 16 |
| 4797 | }, { |
| 4798 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4799 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
| 4800 | 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c }, |
| 4801 | .klen = 24, |
| 4802 | .iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, |
| 4803 | 0xde, 0xca, 0xf8, 0x88 }, |
| 4804 | .input = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
| 4805 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
| 4806 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
| 4807 | 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, |
| 4808 | 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, |
| 4809 | 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, |
| 4810 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
| 4811 | 0xba, 0x63, 0x7b, 0x39 }, |
| 4812 | .ilen = 60, |
| 4813 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
| 4814 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
| 4815 | 0xab, 0xad, 0xda, 0xd2 }, |
| 4816 | .alen = 20, |
| 4817 | .result = { 0x39, 0x80, 0xca, 0x0b, 0x3c, 0x00, 0xe8, 0x41, |
| 4818 | 0xeb, 0x06, 0xfa, 0xc4, 0x87, 0x2a, 0x27, 0x57, |
| 4819 | 0x85, 0x9e, 0x1c, 0xea, 0xa6, 0xef, 0xd9, 0x84, |
| 4820 | 0x62, 0x85, 0x93, 0xb4, 0x0c, 0xa1, 0xe1, 0x9c, |
| 4821 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, |
| 4822 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, |
| 4823 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, |
| 4824 | 0xcc, 0xda, 0x27, 0x10 }, |
| 4825 | .rlen = 60, |
| 4826 | .tag = { 0x25, 0x19, 0x49, 0x8e, 0x80, 0xf1, 0x47, 0x8f, |
| 4827 | 0x37, 0xba, 0x55, 0xbd, 0x6d, 0x27, 0x61, 0x8c }, |
| 4828 | .tlen = 16, |
| 4829 | .np = 2, |
| 4830 | .tap = { 32, 28 }, |
| 4831 | .anp = 2, |
| 4832 | .atap = { 8, 12 } |
| 4833 | }, { |
| 4834 | .klen = 32, |
| 4835 | .tag = { 0x53, 0x0f, 0x8a, 0xfb, 0xc7, 0x45, 0x36, 0xb9, |
| 4836 | 0xa9, 0x63, 0xb4, 0xf1, 0xc4, 0xcb, 0x73, 0x8b }, |
| 4837 | .tlen = 16 |
| 4838 | } |
| 4839 | }; |
| 4840 | |
| 4841 | static struct aead_testvec aes_gcm_dec_tv_template[] = { |
| 4842 | { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ |
| 4843 | .klen = 32, |
| 4844 | .input = { 0xce, 0xa7, 0x40, 0x3d, 0x4d, 0x60, 0x6b, 0x6e, |
| 4845 | 0x07, 0x4e, 0xc5, 0xd3, 0xba, 0xf3, 0x9d, 0x18 }, |
| 4846 | .ilen = 16, |
| 4847 | .rlen = 16, |
| 4848 | .tag = { 0xd0, 0xd1, 0xc8, 0xa7, 0x99, 0x99, 0x6b, 0xf0, |
| 4849 | 0x26, 0x5b, 0x98, 0xb5, 0xd4, 0x8a, 0xb9, 0x19 }, |
| 4850 | .tlen = 16 |
| 4851 | }, { |
| 4852 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4853 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
| 4854 | 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4855 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, |
| 4856 | .klen = 32, |
| 4857 | .iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, |
| 4858 | 0xde, 0xca, 0xf8, 0x88 }, |
| 4859 | .input = { 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07, |
| 4860 | 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d, |
| 4861 | 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9, |
| 4862 | 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa, |
| 4863 | 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, |
| 4864 | 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, |
| 4865 | 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, |
| 4866 | 0xbc, 0xc9, 0xf6, 0x62, 0x89, 0x80, 0x15, 0xad }, |
| 4867 | .ilen = 64, |
| 4868 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
| 4869 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
| 4870 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
| 4871 | 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, |
| 4872 | 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, |
| 4873 | 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, |
| 4874 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
| 4875 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, |
| 4876 | .rlen = 64, |
| 4877 | .tag = { 0xb0, 0x94, 0xda, 0xc5, 0xd9, 0x34, 0x71, 0xbd, |
| 4878 | 0xec, 0x1a, 0x50, 0x22, 0x70, 0xe3, 0xcc, 0x6c }, |
| 4879 | .tlen = 16 |
| 4880 | }, { |
| 4881 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4882 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
| 4883 | 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4884 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, |
| 4885 | .klen = 32, |
| 4886 | .iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, |
| 4887 | 0xde, 0xca, 0xf8, 0x88 }, |
| 4888 | .input = { 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07, |
| 4889 | 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d, |
| 4890 | 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9, |
| 4891 | 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa, |
| 4892 | 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, |
| 4893 | 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, |
| 4894 | 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, |
| 4895 | 0xbc, 0xc9, 0xf6, 0x62 }, |
| 4896 | .ilen = 60, |
| 4897 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
| 4898 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
| 4899 | 0xab, 0xad, 0xda, 0xd2 }, |
| 4900 | .alen = 20, |
| 4901 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
| 4902 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
| 4903 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
| 4904 | 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, |
| 4905 | 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, |
| 4906 | 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, |
| 4907 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
| 4908 | 0xba, 0x63, 0x7b, 0x39 }, |
| 4909 | .rlen = 60, |
| 4910 | .tag = { 0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68, |
| 4911 | 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b }, |
| 4912 | .tlen = 16, |
| 4913 | .np = 2, |
| 4914 | .tap = { 48, 12 }, |
| 4915 | .anp = 3, |
| 4916 | .atap = { 8, 8, 4 } |
| 4917 | }, { |
| 4918 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4919 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, |
| 4920 | .klen = 16, |
| 4921 | .iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, |
| 4922 | 0xde, 0xca, 0xf8, 0x88 }, |
| 4923 | .input = { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, |
| 4924 | 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, |
| 4925 | 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, |
| 4926 | 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, |
| 4927 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, |
| 4928 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, |
| 4929 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, |
| 4930 | 0x3d, 0x58, 0xe0, 0x91, 0x47, 0x3f, 0x59, 0x85 }, |
| 4931 | .ilen = 64, |
| 4932 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
| 4933 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
| 4934 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
| 4935 | 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, |
| 4936 | 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, |
| 4937 | 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, |
| 4938 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
| 4939 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, |
| 4940 | .rlen = 64, |
| 4941 | .tag = { 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6, |
| 4942 | 0x2c, 0xf3, 0x5a, 0xbd, 0x2b, 0xa6, 0xfa, 0xb4 }, |
| 4943 | .tlen = 16 |
| 4944 | }, { |
| 4945 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4946 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, |
| 4947 | .klen = 16, |
| 4948 | .iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, |
| 4949 | 0xde, 0xca, 0xf8, 0x88 }, |
| 4950 | .input = { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, |
| 4951 | 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, |
| 4952 | 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, |
| 4953 | 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, |
| 4954 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, |
| 4955 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, |
| 4956 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, |
| 4957 | 0x3d, 0x58, 0xe0, 0x91 }, |
| 4958 | .ilen = 60, |
| 4959 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
| 4960 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
| 4961 | 0xab, 0xad, 0xda, 0xd2 }, |
| 4962 | .alen = 20, |
| 4963 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
| 4964 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
| 4965 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
| 4966 | 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, |
| 4967 | 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, |
| 4968 | 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, |
| 4969 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
| 4970 | 0xba, 0x63, 0x7b, 0x39 }, |
| 4971 | .rlen = 60, |
| 4972 | .tag = { 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb, |
| 4973 | 0x94, 0xfa, 0xe9, 0x5a, 0xe7, 0x12, 0x1a, 0x47 }, |
| 4974 | .tlen = 16 |
| 4975 | }, { |
| 4976 | .klen = 24, |
| 4977 | .input = { 0x98, 0xe7, 0x24, 0x7c, 0x07, 0xf0, 0xfe, 0x41, |
| 4978 | 0x1c, 0x26, 0x7e, 0x43, 0x84, 0xb0, 0xf6, 0x00 }, |
| 4979 | .ilen = 16, |
| 4980 | .rlen = 16, |
| 4981 | .tag = { 0x2f, 0xf5, 0x8d, 0x80, 0x03, 0x39, 0x27, 0xab, |
| 4982 | 0x8e, 0xf4, 0xd4, 0x58, 0x75, 0x14, 0xf0, 0xfb }, |
| 4983 | .tlen = 16 |
| 4984 | }, { |
| 4985 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 4986 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
| 4987 | 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c }, |
| 4988 | .klen = 24, |
| 4989 | .iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, |
| 4990 | 0xde, 0xca, 0xf8, 0x88 }, |
| 4991 | .input = { 0x39, 0x80, 0xca, 0x0b, 0x3c, 0x00, 0xe8, 0x41, |
| 4992 | 0xeb, 0x06, 0xfa, 0xc4, 0x87, 0x2a, 0x27, 0x57, |
| 4993 | 0x85, 0x9e, 0x1c, 0xea, 0xa6, 0xef, 0xd9, 0x84, |
| 4994 | 0x62, 0x85, 0x93, 0xb4, 0x0c, 0xa1, 0xe1, 0x9c, |
| 4995 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, |
| 4996 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, |
| 4997 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, |
| 4998 | 0xcc, 0xda, 0x27, 0x10, 0xac, 0xad, 0xe2, 0x56 }, |
| 4999 | .ilen = 64, |
| 5000 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
| 5001 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
| 5002 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
| 5003 | 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, |
| 5004 | 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, |
| 5005 | 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, |
| 5006 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
| 5007 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, |
| 5008 | .rlen = 64, |
| 5009 | .tag = { 0x99, 0x24, 0xa7, 0xc8, 0x58, 0x73, 0x36, 0xbf, |
| 5010 | 0xb1, 0x18, 0x02, 0x4d, 0xb8, 0x67, 0x4a, 0x14 }, |
| 5011 | .tlen = 16 |
| 5012 | }, { |
| 5013 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
| 5014 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
| 5015 | 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c }, |
| 5016 | .klen = 24, |
| 5017 | .iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, |
| 5018 | 0xde, 0xca, 0xf8, 0x88 }, |
| 5019 | .input = { 0x39, 0x80, 0xca, 0x0b, 0x3c, 0x00, 0xe8, 0x41, |
| 5020 | 0xeb, 0x06, 0xfa, 0xc4, 0x87, 0x2a, 0x27, 0x57, |
| 5021 | 0x85, 0x9e, 0x1c, 0xea, 0xa6, 0xef, 0xd9, 0x84, |
| 5022 | 0x62, 0x85, 0x93, 0xb4, 0x0c, 0xa1, 0xe1, 0x9c, |
| 5023 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, |
| 5024 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, |
| 5025 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, |
| 5026 | 0xcc, 0xda, 0x27, 0x10 }, |
| 5027 | .ilen = 60, |
| 5028 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
| 5029 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
| 5030 | 0xab, 0xad, 0xda, 0xd2 }, |
| 5031 | .alen = 20, |
| 5032 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
| 5033 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
| 5034 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
| 5035 | 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, |
| 5036 | 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, |
| 5037 | 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, |
| 5038 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
| 5039 | 0xba, 0x63, 0x7b, 0x39 }, |
| 5040 | .rlen = 60, |
| 5041 | .tag = { 0x25, 0x19, 0x49, 0x8e, 0x80, 0xf1, 0x47, 0x8f, |
| 5042 | 0x37, 0xba, 0x55, 0xbd, 0x6d, 0x27, 0x61, 0x8c }, |
| 5043 | .tlen = 16 |
| 5044 | } |
| 5045 | }; |
| 5046 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5047 | /* Cast5 test vectors from RFC 2144 */ |
| 5048 | #define CAST5_ENC_TEST_VECTORS 3 |
| 5049 | #define CAST5_DEC_TEST_VECTORS 3 |
| 5050 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5051 | static struct cipher_testvec cast5_enc_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5052 | { |
| 5053 | .key = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, |
| 5054 | 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9a }, |
| 5055 | .klen = 16, |
| 5056 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5057 | .ilen = 8, |
| 5058 | .result = { 0x23, 0x8b, 0x4f, 0xe5, 0x84, 0x7e, 0x44, 0xb2 }, |
| 5059 | .rlen = 8, |
| 5060 | }, { |
| 5061 | .key = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, |
| 5062 | 0x23, 0x45 }, |
| 5063 | .klen = 10, |
| 5064 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5065 | .ilen = 8, |
| 5066 | .result = { 0xeb, 0x6a, 0x71, 0x1a, 0x2c, 0x02, 0x27, 0x1b }, |
| 5067 | .rlen = 8, |
| 5068 | }, { |
| 5069 | .key = { 0x01, 0x23, 0x45, 0x67, 0x12 }, |
| 5070 | .klen = 5, |
| 5071 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5072 | .ilen = 8, |
| 5073 | .result = { 0x7a, 0xc8, 0x16, 0xd1, 0x6e, 0x9b, 0x30, 0x2e }, |
| 5074 | .rlen = 8, |
| 5075 | }, |
| 5076 | }; |
| 5077 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5078 | static struct cipher_testvec cast5_dec_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5079 | { |
| 5080 | .key = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, |
| 5081 | 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9a }, |
| 5082 | .klen = 16, |
| 5083 | .input = { 0x23, 0x8b, 0x4f, 0xe5, 0x84, 0x7e, 0x44, 0xb2 }, |
| 5084 | .ilen = 8, |
| 5085 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5086 | .rlen = 8, |
| 5087 | }, { |
| 5088 | .key = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, |
| 5089 | 0x23, 0x45 }, |
| 5090 | .klen = 10, |
| 5091 | .input = { 0xeb, 0x6a, 0x71, 0x1a, 0x2c, 0x02, 0x27, 0x1b }, |
| 5092 | .ilen = 8, |
| 5093 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5094 | .rlen = 8, |
| 5095 | }, { |
| 5096 | .key = { 0x01, 0x23, 0x45, 0x67, 0x12 }, |
| 5097 | .klen = 5, |
| 5098 | .input = { 0x7a, 0xc8, 0x16, 0xd1, 0x6e, 0x9b, 0x30, 0x2e }, |
| 5099 | .ilen = 8, |
| 5100 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5101 | .rlen = 8, |
| 5102 | }, |
| 5103 | }; |
| 5104 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5105 | /* |
| 5106 | * ARC4 test vectors from OpenSSL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5107 | */ |
| 5108 | #define ARC4_ENC_TEST_VECTORS 7 |
| 5109 | #define ARC4_DEC_TEST_VECTORS 7 |
| 5110 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5111 | static struct cipher_testvec arc4_enc_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5112 | { |
| 5113 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5114 | .klen = 8, |
| 5115 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5116 | .ilen = 8, |
| 5117 | .result = { 0x75, 0xb7, 0x87, 0x80, 0x99, 0xe0, 0xc5, 0x96 }, |
| 5118 | .rlen = 8, |
| 5119 | }, { |
| 5120 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5121 | .klen = 8, |
| 5122 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5123 | .ilen = 8, |
| 5124 | .result = { 0x74, 0x94, 0xc2, 0xe7, 0x10, 0x4b, 0x08, 0x79 }, |
| 5125 | .rlen = 8, |
| 5126 | }, { |
| 5127 | .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5128 | .klen = 8, |
| 5129 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5130 | .ilen = 8, |
| 5131 | .result = { 0xde, 0x18, 0x89, 0x41, 0xa3, 0x37, 0x5d, 0x3a }, |
| 5132 | .rlen = 8, |
| 5133 | }, { |
| 5134 | .key = { 0xef, 0x01, 0x23, 0x45}, |
| 5135 | .klen = 4, |
| 5136 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 5137 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 5138 | 0x00, 0x00, 0x00, 0x00 }, |
| 5139 | .ilen = 20, |
| 5140 | .result = { 0xd6, 0xa1, 0x41, 0xa7, 0xec, 0x3c, 0x38, 0xdf, |
| 5141 | 0xbd, 0x61, 0x5a, 0x11, 0x62, 0xe1, 0xc7, 0xba, |
| 5142 | 0x36, 0xb6, 0x78, 0x58 }, |
| 5143 | .rlen = 20, |
| 5144 | }, { |
| 5145 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5146 | .klen = 8, |
| 5147 | .input = { 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, |
| 5148 | 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, |
| 5149 | 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, |
| 5150 | 0x12, 0x34, 0x56, 0x78 }, |
| 5151 | .ilen = 28, |
| 5152 | .result = { 0x66, 0xa0, 0x94, 0x9f, 0x8a, 0xf7, 0xd6, 0x89, |
| 5153 | 0x1f, 0x7f, 0x83, 0x2b, 0xa8, 0x33, 0xc0, 0x0c, |
| 5154 | 0x89, 0x2e, 0xbe, 0x30, 0x14, 0x3c, 0xe2, 0x87, |
| 5155 | 0x40, 0x01, 0x1e, 0xcf }, |
| 5156 | .rlen = 28, |
| 5157 | }, { |
| 5158 | .key = { 0xef, 0x01, 0x23, 0x45 }, |
| 5159 | .klen = 4, |
| 5160 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 5161 | 0x00, 0x00 }, |
| 5162 | .ilen = 10, |
| 5163 | .result = { 0xd6, 0xa1, 0x41, 0xa7, 0xec, 0x3c, 0x38, 0xdf, |
| 5164 | 0xbd, 0x61 }, |
| 5165 | .rlen = 10, |
| 5166 | }, { |
| 5167 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, |
| 5168 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5169 | .klen = 16, |
| 5170 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }, |
| 5171 | .ilen = 8, |
| 5172 | .result = { 0x69, 0x72, 0x36, 0x59, 0x1B, 0x52, 0x42, 0xB1 }, |
| 5173 | .rlen = 8, |
| 5174 | }, |
| 5175 | }; |
| 5176 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5177 | static struct cipher_testvec arc4_dec_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5178 | { |
| 5179 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5180 | .klen = 8, |
| 5181 | .input = { 0x75, 0xb7, 0x87, 0x80, 0x99, 0xe0, 0xc5, 0x96 }, |
| 5182 | .ilen = 8, |
| 5183 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5184 | .rlen = 8, |
| 5185 | }, { |
| 5186 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5187 | .klen = 8, |
| 5188 | .input = { 0x74, 0x94, 0xc2, 0xe7, 0x10, 0x4b, 0x08, 0x79 }, |
| 5189 | .ilen = 8, |
| 5190 | .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5191 | .rlen = 8, |
| 5192 | }, { |
| 5193 | .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5194 | .klen = 8, |
| 5195 | .input = { 0xde, 0x18, 0x89, 0x41, 0xa3, 0x37, 0x5d, 0x3a }, |
| 5196 | .ilen = 8, |
| 5197 | .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5198 | .rlen = 8, |
| 5199 | }, { |
| 5200 | .key = { 0xef, 0x01, 0x23, 0x45}, |
| 5201 | .klen = 4, |
| 5202 | .input = { 0xd6, 0xa1, 0x41, 0xa7, 0xec, 0x3c, 0x38, 0xdf, |
| 5203 | 0xbd, 0x61, 0x5a, 0x11, 0x62, 0xe1, 0xc7, 0xba, |
| 5204 | 0x36, 0xb6, 0x78, 0x58 }, |
| 5205 | .ilen = 20, |
| 5206 | .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 5207 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 5208 | 0x00, 0x00, 0x00, 0x00 }, |
| 5209 | .rlen = 20, |
| 5210 | }, { |
| 5211 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, |
| 5212 | .klen = 8, |
| 5213 | .input = { 0x66, 0xa0, 0x94, 0x9f, 0x8a, 0xf7, 0xd6, 0x89, |
| 5214 | 0x1f, 0x7f, 0x83, 0x2b, 0xa8, 0x33, 0xc0, 0x0c, |
| 5215 | 0x89, 0x2e, 0xbe, 0x30, 0x14, 0x3c, 0xe2, 0x87, |
| 5216 | 0x40, 0x01, 0x1e, 0xcf }, |
| 5217 | .ilen = 28, |
| 5218 | .result = { 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, |
| 5219 | 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, |
| 5220 | 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, |
| 5221 | 0x12, 0x34, 0x56, 0x78 }, |
| 5222 | .rlen = 28, |
| 5223 | }, { |
| 5224 | .key = { 0xef, 0x01, 0x23, 0x45 }, |
| 5225 | .klen = 4, |
| 5226 | .input = { 0xd6, 0xa1, 0x41, 0xa7, 0xec, 0x3c, 0x38, 0xdf, |
| 5227 | 0xbd, 0x61 }, |
| 5228 | .ilen = 10, |
| 5229 | .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 5230 | 0x00, 0x00 }, |
| 5231 | .rlen = 10, |
| 5232 | }, { |
| 5233 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, |
| 5234 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5235 | .klen = 16, |
| 5236 | .input = { 0x69, 0x72, 0x36, 0x59, 0x1B, 0x52, 0x42, 0xB1 }, |
| 5237 | .ilen = 8, |
| 5238 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }, |
| 5239 | .rlen = 8, |
| 5240 | }, |
| 5241 | }; |
| 5242 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5243 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5244 | * TEA test vectors |
| 5245 | */ |
| 5246 | #define TEA_ENC_TEST_VECTORS 4 |
| 5247 | #define TEA_DEC_TEST_VECTORS 4 |
| 5248 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5249 | static struct cipher_testvec tea_enc_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5250 | { |
| 5251 | .key = { [0 ... 15] = 0x00 }, |
| 5252 | .klen = 16, |
| 5253 | .input = { [0 ... 8] = 0x00 }, |
| 5254 | .ilen = 8, |
| 5255 | .result = { 0x0a, 0x3a, 0xea, 0x41, 0x40, 0xa9, 0xba, 0x94 }, |
| 5256 | .rlen = 8, |
| 5257 | }, { |
| 5258 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, |
| 5259 | 0x77, 0x5d, 0x0e, 0x26, 0x6c, 0x28, 0x78, 0x43 }, |
| 5260 | .klen = 16, |
| 5261 | .input = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, |
| 5262 | .ilen = 8, |
| 5263 | .result = { 0x77, 0x5d, 0x2a, 0x6a, 0xf6, 0xce, 0x92, 0x09 }, |
| 5264 | .rlen = 8, |
| 5265 | }, { |
| 5266 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, |
| 5267 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, |
| 5268 | .klen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5269 | .input = { 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x74, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5270 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, |
| 5271 | .ilen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5272 | .result = { 0xbe, 0x7a, 0xbb, 0x81, 0x95, 0x2d, 0x1f, 0x1e, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5273 | 0xdd, 0x89, 0xa1, 0x25, 0x04, 0x21, 0xdf, 0x95 }, |
| 5274 | .rlen = 16, |
| 5275 | }, { |
| 5276 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, |
| 5277 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, |
| 5278 | .klen = 16, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5279 | .input = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, |
| 5280 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, |
| 5281 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5282 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, |
| 5283 | .ilen = 32, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5284 | .result = { 0xe0, 0x4d, 0x5d, 0x3c, 0xb7, 0x8c, 0x36, 0x47, |
| 5285 | 0x94, 0x18, 0x95, 0x91, 0xa9, 0xfc, 0x49, 0xf8, |
| 5286 | 0x44, 0xd1, 0x2d, 0xc2, 0x99, 0xb8, 0x08, 0x2a, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5287 | 0x07, 0x89, 0x73, 0xc2, 0x45, 0x92, 0xc6, 0x90 }, |
| 5288 | .rlen = 32, |
| 5289 | } |
| 5290 | }; |
| 5291 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5292 | static struct cipher_testvec tea_dec_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5293 | { |
| 5294 | .key = { [0 ... 15] = 0x00 }, |
| 5295 | .klen = 16, |
| 5296 | .input = { 0x0a, 0x3a, 0xea, 0x41, 0x40, 0xa9, 0xba, 0x94 }, |
| 5297 | .ilen = 8, |
| 5298 | .result = { [0 ... 8] = 0x00 }, |
| 5299 | .rlen = 8, |
| 5300 | }, { |
| 5301 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, |
| 5302 | 0x77, 0x5d, 0x0e, 0x26, 0x6c, 0x28, 0x78, 0x43 }, |
| 5303 | .klen = 16, |
| 5304 | .input = { 0x77, 0x5d, 0x2a, 0x6a, 0xf6, 0xce, 0x92, 0x09 }, |
| 5305 | .ilen = 8, |
| 5306 | .result = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, |
| 5307 | .rlen = 8, |
| 5308 | }, { |
| 5309 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, |
| 5310 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, |
| 5311 | .klen = 16, |
| 5312 | .input = { 0xbe, 0x7a, 0xbb, 0x81, 0x95, 0x2d, 0x1f, 0x1e, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5313 | 0xdd, 0x89, 0xa1, 0x25, 0x04, 0x21, 0xdf, 0x95 }, |
| 5314 | .ilen = 16, |
| 5315 | .result = { 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x74, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5316 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, |
| 5317 | .rlen = 16, |
| 5318 | }, { |
| 5319 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, |
| 5320 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, |
| 5321 | .klen = 16, |
| 5322 | .input = { 0xe0, 0x4d, 0x5d, 0x3c, 0xb7, 0x8c, 0x36, 0x47, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5323 | 0x94, 0x18, 0x95, 0x91, 0xa9, 0xfc, 0x49, 0xf8, |
| 5324 | 0x44, 0xd1, 0x2d, 0xc2, 0x99, 0xb8, 0x08, 0x2a, |
| 5325 | 0x07, 0x89, 0x73, 0xc2, 0x45, 0x92, 0xc6, 0x90 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5326 | .ilen = 32, |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5327 | .result = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, |
| 5328 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, |
| 5329 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5330 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, |
| 5331 | .rlen = 32, |
| 5332 | } |
| 5333 | }; |
| 5334 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5335 | /* |
| 5336 | * XTEA test vectors |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5337 | */ |
| 5338 | #define XTEA_ENC_TEST_VECTORS 4 |
| 5339 | #define XTEA_DEC_TEST_VECTORS 4 |
| 5340 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5341 | static struct cipher_testvec xtea_enc_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5342 | { |
| 5343 | .key = { [0 ... 15] = 0x00 }, |
| 5344 | .klen = 16, |
| 5345 | .input = { [0 ... 8] = 0x00 }, |
| 5346 | .ilen = 8, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5347 | .result = { 0xd8, 0xd4, 0xe9, 0xde, 0xd9, 0x1e, 0x13, 0xf7 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5348 | .rlen = 8, |
| 5349 | }, { |
| 5350 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, |
| 5351 | 0x77, 0x5d, 0x0e, 0x26, 0x6c, 0x28, 0x78, 0x43 }, |
| 5352 | .klen = 16, |
| 5353 | .input = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, |
| 5354 | .ilen = 8, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5355 | .result = { 0x94, 0xeb, 0xc8, 0x96, 0x84, 0x6a, 0x49, 0xa8 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5356 | .rlen = 8, |
| 5357 | }, { |
| 5358 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, |
| 5359 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, |
| 5360 | .klen = 16, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5361 | .input = { 0x3e, 0xce, 0xae, 0x22, 0x60, 0x56, 0xa8, 0x9d, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5362 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, |
| 5363 | .ilen = 16, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5364 | .result = { 0xe2, 0x04, 0xdb, 0xf2, 0x89, 0x85, 0x9e, 0xea, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5365 | 0x61, 0x35, 0xaa, 0xed, 0xb5, 0xcb, 0x71, 0x2c }, |
| 5366 | .rlen = 16, |
| 5367 | }, { |
| 5368 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, |
| 5369 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, |
| 5370 | .klen = 16, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5371 | .input = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, |
| 5372 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, |
| 5373 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5374 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, |
| 5375 | .ilen = 32, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5376 | .result = { 0x99, 0x81, 0x9f, 0x5d, 0x6f, 0x4b, 0x31, 0x3a, |
| 5377 | 0x86, 0xff, 0x6f, 0xd0, 0xe3, 0x87, 0x70, 0x07, |
| 5378 | 0x4d, 0xb8, 0xcf, 0xf3, 0x99, 0x50, 0xb3, 0xd4, |
| 5379 | 0x73, 0xa2, 0xfa, 0xc9, 0x16, 0x59, 0x5d, 0x81 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5380 | .rlen = 32, |
| 5381 | } |
| 5382 | }; |
| 5383 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5384 | static struct cipher_testvec xtea_dec_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5385 | { |
| 5386 | .key = { [0 ... 15] = 0x00 }, |
| 5387 | .klen = 16, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5388 | .input = { 0xd8, 0xd4, 0xe9, 0xde, 0xd9, 0x1e, 0x13, 0xf7 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5389 | .ilen = 8, |
| 5390 | .result = { [0 ... 8] = 0x00 }, |
| 5391 | .rlen = 8, |
| 5392 | }, { |
| 5393 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, |
| 5394 | 0x77, 0x5d, 0x0e, 0x26, 0x6c, 0x28, 0x78, 0x43 }, |
| 5395 | .klen = 16, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5396 | .input = { 0x94, 0xeb, 0xc8, 0x96, 0x84, 0x6a, 0x49, 0xa8 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5397 | .ilen = 8, |
| 5398 | .result = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, |
| 5399 | .rlen = 8, |
| 5400 | }, { |
| 5401 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, |
| 5402 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, |
| 5403 | .klen = 16, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5404 | .input = { 0x3e, 0xce, 0xae, 0x22, 0x60, 0x56, 0xa8, 0x9d, |
| 5405 | 0x77, 0x4d, 0xd4, 0xb4, 0x87, 0x24, 0xe3, 0x9a }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5406 | .ilen = 16, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5407 | .result = { 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x74, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5408 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, |
| 5409 | .rlen = 16, |
| 5410 | }, { |
| 5411 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, |
| 5412 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, |
| 5413 | .klen = 16, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5414 | .input = { 0x99, 0x81, 0x9f, 0x5d, 0x6f, 0x4b, 0x31, 0x3a, |
| 5415 | 0x86, 0xff, 0x6f, 0xd0, 0xe3, 0x87, 0x70, 0x07, |
| 5416 | 0x4d, 0xb8, 0xcf, 0xf3, 0x99, 0x50, 0xb3, 0xd4, |
| 5417 | 0x73, 0xa2, 0xfa, 0xc9, 0x16, 0x59, 0x5d, 0x81 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5418 | .ilen = 32, |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5419 | .result = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, |
| 5420 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, |
| 5421 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5422 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, |
| 5423 | .rlen = 32, |
| 5424 | } |
| 5425 | }; |
| 5426 | |
| 5427 | /* |
| 5428 | * KHAZAD test vectors. |
| 5429 | */ |
| 5430 | #define KHAZAD_ENC_TEST_VECTORS 5 |
| 5431 | #define KHAZAD_DEC_TEST_VECTORS 5 |
| 5432 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5433 | static struct cipher_testvec khazad_enc_tv_template[] = { |
| 5434 | { |
| 5435 | .key = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5436 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5437 | .klen = 16, |
| 5438 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5439 | .ilen = 8, |
| 5440 | .result = { 0x49, 0xa4, 0xce, 0x32, 0xac, 0x19, 0x0e, 0x3f }, |
| 5441 | .rlen = 8, |
| 5442 | }, { |
| 5443 | .key = { 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, |
| 5444 | 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38 }, |
| 5445 | .klen = 16, |
| 5446 | .input = { 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38 }, |
| 5447 | .ilen = 8, |
| 5448 | .result = { 0x7e, 0x82, 0x12, 0xa1, 0Xd9, 0X5b, 0Xe4, 0Xf9 }, |
| 5449 | .rlen = 8, |
| 5450 | }, { |
| 5451 | .key = { 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, |
| 5452 | 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2 }, |
| 5453 | .klen = 16, |
| 5454 | .input = { 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2 }, |
| 5455 | .ilen = 8, |
| 5456 | .result = { 0Xaa, 0Xbe, 0Xc1, 0X95, 0Xc5, 0X94, 0X1a, 0X9c }, |
| 5457 | .rlen = 8, |
| 5458 | }, { |
| 5459 | .key = { 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, |
| 5460 | 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f }, |
| 5461 | .klen = 16, |
| 5462 | .input = { 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f }, |
| 5463 | .ilen = 8, |
| 5464 | .result = { 0X04, 0X74, 0Xf5, 0X70, 0X50, 0X16, 0Xd3, 0Xb8 }, |
| 5465 | .rlen = 8, |
| 5466 | }, { |
| 5467 | .key = { 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, |
| 5468 | 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f }, |
| 5469 | .klen = 16, |
| 5470 | .input = { 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f , |
| 5471 | 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f }, |
| 5472 | .ilen = 16, |
| 5473 | .result = { 0X04, 0X74, 0Xf5, 0X70, 0X50, 0X16, 0Xd3, 0Xb8 , |
| 5474 | 0X04, 0X74, 0Xf5, 0X70, 0X50, 0X16, 0Xd3, 0Xb8 }, |
| 5475 | .rlen = 16, |
| 5476 | }, |
| 5477 | }; |
| 5478 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5479 | static struct cipher_testvec khazad_dec_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5480 | { |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 5481 | .key = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5482 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5483 | .klen = 16, |
| 5484 | .input = { 0X49, 0Xa4, 0Xce, 0X32, 0Xac, 0X19, 0X0e, 0X3f }, |
| 5485 | .ilen = 8, |
| 5486 | .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5487 | .rlen = 8, |
| 5488 | }, { |
| 5489 | .key = { 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, |
| 5490 | 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38 }, |
| 5491 | .klen = 16, |
| 5492 | .input = { 0X7e, 0X82, 0X12, 0Xa1, 0Xd9, 0X5b, 0Xe4, 0Xf9 }, |
| 5493 | .ilen = 8, |
| 5494 | .result = { 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38 }, |
| 5495 | .rlen = 8, |
| 5496 | }, { |
| 5497 | .key = { 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, |
| 5498 | 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2 }, |
| 5499 | .klen = 16, |
| 5500 | .input = { 0Xaa, 0Xbe, 0Xc1, 0X95, 0Xc5, 0X94, 0X1a, 0X9c }, |
| 5501 | .ilen = 8, |
| 5502 | .result = { 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2, 0Xa2 }, |
| 5503 | .rlen = 8, |
| 5504 | }, { |
| 5505 | .key = { 0x2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, |
| 5506 | 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f }, |
| 5507 | .klen = 16, |
| 5508 | .input = { 0X04, 0X74, 0Xf5, 0X70, 0X50, 0X16, 0Xd3, 0Xb8 }, |
| 5509 | .ilen = 8, |
| 5510 | .result = { 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f }, |
| 5511 | .rlen = 8, |
| 5512 | }, { |
| 5513 | .key = { 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, |
| 5514 | 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f }, |
| 5515 | .klen = 16, |
| 5516 | .input = { 0X04, 0X74, 0Xf5, 0X70, 0X50, 0X16, 0Xd3, 0Xb8 , |
| 5517 | 0X04, 0X74, 0Xf5, 0X70, 0X50, 0X16, 0Xd3, 0Xb8 }, |
| 5518 | .ilen = 16, |
| 5519 | .result = { 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f , |
| 5520 | 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f, 0X2f }, |
| 5521 | .rlen = 16, |
| 5522 | }, |
| 5523 | }; |
| 5524 | |
| 5525 | /* |
| 5526 | * Anubis test vectors. |
| 5527 | */ |
| 5528 | |
| 5529 | #define ANUBIS_ENC_TEST_VECTORS 5 |
| 5530 | #define ANUBIS_DEC_TEST_VECTORS 5 |
| 5531 | #define ANUBIS_CBC_ENC_TEST_VECTORS 2 |
| 5532 | #define ANUBIS_CBC_DEC_TEST_VECTORS 2 |
| 5533 | |
| 5534 | static struct cipher_testvec anubis_enc_tv_template[] = { |
| 5535 | { |
| 5536 | .key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5537 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, |
| 5538 | .klen = 16, |
| 5539 | .input = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5540 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, |
| 5541 | .ilen = 16, |
| 5542 | .result = { 0x6d, 0xc5, 0xda, 0xa2, 0x26, 0x7d, 0x62, 0x6f, |
| 5543 | 0x08, 0xb7, 0x52, 0x8e, 0x6e, 0x6e, 0x86, 0x90 }, |
| 5544 | .rlen = 16, |
| 5545 | }, { |
| 5546 | |
| 5547 | .key = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, |
| 5548 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, |
| 5549 | 0x03, 0x03, 0x03, 0x03 }, |
| 5550 | .klen = 20, |
| 5551 | .input = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, |
| 5552 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 }, |
| 5553 | .ilen = 16, |
| 5554 | .result = { 0xdb, 0xf1, 0x42, 0xf4, 0xd1, 0x8a, 0xc7, 0x49, |
| 5555 | 0x87, 0x41, 0x6f, 0x82, 0x0a, 0x98, 0x64, 0xae }, |
| 5556 | .rlen = 16, |
| 5557 | }, { |
| 5558 | .key = { 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, |
| 5559 | 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, |
| 5560 | 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, |
| 5561 | 0x24, 0x24, 0x24, 0x24 }, |
| 5562 | .klen = 28, |
| 5563 | .input = { 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, |
| 5564 | 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24 }, |
| 5565 | .ilen = 16, |
| 5566 | .result = { 0xfd, 0x1b, 0x4a, 0xe3, 0xbf, 0xf0, 0xad, 0x3d, |
| 5567 | 0x06, 0xd3, 0x61, 0x27, 0xfd, 0x13, 0x9e, 0xde }, |
| 5568 | .rlen = 16, |
| 5569 | }, { |
| 5570 | .key = { 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, |
| 5571 | 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, |
| 5572 | 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, |
| 5573 | 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25 }, |
| 5574 | .klen = 32, |
| 5575 | .input = { 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, |
| 5576 | 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25 }, |
| 5577 | .ilen = 16, |
| 5578 | .result = { 0x1a, 0x91, 0xfb, 0x2b, 0xb7, 0x78, 0x6b, 0xc4, |
| 5579 | 0x17, 0xd9, 0xff, 0x40, 0x3b, 0x0e, 0xe5, 0xfe }, |
| 5580 | .rlen = 16, |
| 5581 | }, { |
| 5582 | .key = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5583 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5584 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5585 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5586 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, |
| 5587 | .klen = 40, |
| 5588 | .input = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5589 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, |
| 5590 | .ilen = 16, |
| 5591 | .result = { 0xa5, 0x2c, 0x85, 0x6f, 0x9c, 0xba, 0xa0, 0x97, |
| 5592 | 0x9e, 0xc6, 0x84, 0x0f, 0x17, 0x21, 0x07, 0xee }, |
| 5593 | .rlen = 16, |
| 5594 | }, |
| 5595 | }; |
| 5596 | |
| 5597 | static struct cipher_testvec anubis_dec_tv_template[] = { |
| 5598 | { |
| 5599 | .key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5600 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, |
| 5601 | .klen = 16, |
| 5602 | .input = { 0x6d, 0xc5, 0xda, 0xa2, 0x26, 0x7d, 0x62, 0x6f, |
| 5603 | 0x08, 0xb7, 0x52, 0x8e, 0x6e, 0x6e, 0x86, 0x90 }, |
| 5604 | .ilen = 16, |
| 5605 | .result = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5606 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, |
| 5607 | .rlen = 16, |
| 5608 | }, { |
| 5609 | |
| 5610 | .key = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, |
| 5611 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, |
| 5612 | 0x03, 0x03, 0x03, 0x03 }, |
| 5613 | .klen = 20, |
| 5614 | .input = { 0xdb, 0xf1, 0x42, 0xf4, 0xd1, 0x8a, 0xc7, 0x49, |
| 5615 | 0x87, 0x41, 0x6f, 0x82, 0x0a, 0x98, 0x64, 0xae }, |
| 5616 | .ilen = 16, |
| 5617 | .result = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, |
| 5618 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 }, |
| 5619 | .rlen = 16, |
| 5620 | }, { |
| 5621 | .key = { 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, |
| 5622 | 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, |
| 5623 | 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, |
| 5624 | 0x24, 0x24, 0x24, 0x24 }, |
| 5625 | .klen = 28, |
| 5626 | .input = { 0xfd, 0x1b, 0x4a, 0xe3, 0xbf, 0xf0, 0xad, 0x3d, |
| 5627 | 0x06, 0xd3, 0x61, 0x27, 0xfd, 0x13, 0x9e, 0xde }, |
| 5628 | .ilen = 16, |
| 5629 | .result = { 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, |
| 5630 | 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24 }, |
| 5631 | .rlen = 16, |
| 5632 | }, { |
| 5633 | .key = { 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, |
| 5634 | 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, |
| 5635 | 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, |
| 5636 | 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25 }, |
| 5637 | .klen = 32, |
| 5638 | .input = { 0x1a, 0x91, 0xfb, 0x2b, 0xb7, 0x78, 0x6b, 0xc4, |
| 5639 | 0x17, 0xd9, 0xff, 0x40, 0x3b, 0x0e, 0xe5, 0xfe }, |
| 5640 | .ilen = 16, |
| 5641 | .result = { 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, |
| 5642 | 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25 }, |
| 5643 | .rlen = 16, |
| 5644 | }, { |
| 5645 | .key = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5646 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5647 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5648 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5649 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, |
| 5650 | .input = { 0xa5, 0x2c, 0x85, 0x6f, 0x9c, 0xba, 0xa0, 0x97, |
| 5651 | 0x9e, 0xc6, 0x84, 0x0f, 0x17, 0x21, 0x07, 0xee }, |
| 5652 | .klen = 40, |
| 5653 | .ilen = 16, |
| 5654 | .result = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5655 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, |
| 5656 | .rlen = 16, |
| 5657 | }, |
| 5658 | }; |
| 5659 | |
| 5660 | static struct cipher_testvec anubis_cbc_enc_tv_template[] = { |
| 5661 | { |
| 5662 | .key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5663 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, |
| 5664 | .klen = 16, |
| 5665 | .input = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5666 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5667 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5668 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, |
| 5669 | .ilen = 32, |
| 5670 | .result = { 0x6d, 0xc5, 0xda, 0xa2, 0x26, 0x7d, 0x62, 0x6f, |
| 5671 | 0x08, 0xb7, 0x52, 0x8e, 0x6e, 0x6e, 0x86, 0x90, |
| 5672 | 0x86, 0xd8, 0xb5, 0x6f, 0x98, 0x5e, 0x8a, 0x66, |
| 5673 | 0x4f, 0x1f, 0x78, 0xa1, 0xbb, 0x37, 0xf1, 0xbe }, |
| 5674 | .rlen = 32, |
| 5675 | }, { |
| 5676 | .key = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5677 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5678 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5679 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5680 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, |
| 5681 | .klen = 40, |
| 5682 | .input = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5683 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5684 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5685 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, |
| 5686 | .ilen = 32, |
| 5687 | .result = { 0xa5, 0x2c, 0x85, 0x6f, 0x9c, 0xba, 0xa0, 0x97, |
| 5688 | 0x9e, 0xc6, 0x84, 0x0f, 0x17, 0x21, 0x07, 0xee, |
| 5689 | 0xa2, 0xbc, 0x06, 0x98, 0xc6, 0x4b, 0xda, 0x75, |
| 5690 | 0x2e, 0xaa, 0xbe, 0x58, 0xce, 0x01, 0x5b, 0xc7 }, |
| 5691 | .rlen = 32, |
| 5692 | }, |
| 5693 | }; |
| 5694 | |
| 5695 | static struct cipher_testvec anubis_cbc_dec_tv_template[] = { |
| 5696 | { |
| 5697 | .key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5698 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, |
| 5699 | .klen = 16, |
| 5700 | .input = { 0x6d, 0xc5, 0xda, 0xa2, 0x26, 0x7d, 0x62, 0x6f, |
| 5701 | 0x08, 0xb7, 0x52, 0x8e, 0x6e, 0x6e, 0x86, 0x90, |
| 5702 | 0x86, 0xd8, 0xb5, 0x6f, 0x98, 0x5e, 0x8a, 0x66, |
| 5703 | 0x4f, 0x1f, 0x78, 0xa1, 0xbb, 0x37, 0xf1, 0xbe }, |
| 5704 | .ilen = 32, |
| 5705 | .result = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5706 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5707 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, |
| 5708 | 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }, |
| 5709 | .rlen = 32, |
| 5710 | }, { |
| 5711 | .key = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5712 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5713 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5714 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5715 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, |
| 5716 | .klen = 40, |
| 5717 | .input = { 0xa5, 0x2c, 0x85, 0x6f, 0x9c, 0xba, 0xa0, 0x97, |
| 5718 | 0x9e, 0xc6, 0x84, 0x0f, 0x17, 0x21, 0x07, 0xee, |
| 5719 | 0xa2, 0xbc, 0x06, 0x98, 0xc6, 0x4b, 0xda, 0x75, |
| 5720 | 0x2e, 0xaa, 0xbe, 0x58, 0xce, 0x01, 0x5b, 0xc7 }, |
| 5721 | .ilen = 32, |
| 5722 | .result = { 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5723 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5724 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, |
| 5725 | 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35 }, |
| 5726 | .rlen = 32, |
| 5727 | }, |
| 5728 | }; |
| 5729 | |
Aaron Grothe | fb4f10e | 2005-09-01 17:42:46 -0700 | [diff] [blame] | 5730 | /* |
| 5731 | * XETA test vectors |
| 5732 | */ |
| 5733 | #define XETA_ENC_TEST_VECTORS 4 |
| 5734 | #define XETA_DEC_TEST_VECTORS 4 |
| 5735 | |
| 5736 | static struct cipher_testvec xeta_enc_tv_template[] = { |
| 5737 | { |
| 5738 | .key = { [0 ... 15] = 0x00 }, |
| 5739 | .klen = 16, |
| 5740 | .input = { [0 ... 8] = 0x00 }, |
| 5741 | .ilen = 8, |
| 5742 | .result = { 0xaa, 0x22, 0x96, 0xe5, 0x6c, 0x61, 0xf3, 0x45 }, |
| 5743 | .rlen = 8, |
| 5744 | }, { |
| 5745 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, |
| 5746 | 0x77, 0x5d, 0x0e, 0x26, 0x6c, 0x28, 0x78, 0x43 }, |
| 5747 | .klen = 16, |
| 5748 | .input = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, |
| 5749 | .ilen = 8, |
| 5750 | .result = { 0x82, 0x3e, 0xeb, 0x35, 0xdc, 0xdd, 0xd9, 0xc3 }, |
| 5751 | .rlen = 8, |
| 5752 | }, { |
| 5753 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, |
| 5754 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, |
| 5755 | .klen = 16, |
| 5756 | .input = { 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x74, |
| 5757 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, |
| 5758 | .ilen = 16, |
| 5759 | .result = { 0xe2, 0x04, 0xdb, 0xf2, 0x89, 0x85, 0x9e, 0xea, |
| 5760 | 0x61, 0x35, 0xaa, 0xed, 0xb5, 0xcb, 0x71, 0x2c }, |
| 5761 | .rlen = 16, |
| 5762 | }, { |
| 5763 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, |
| 5764 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, |
| 5765 | .klen = 16, |
| 5766 | .input = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, |
| 5767 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, |
| 5768 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, |
| 5769 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, |
| 5770 | .ilen = 32, |
| 5771 | .result = { 0x0b, 0x03, 0xcd, 0x8a, 0xbe, 0x95, 0xfd, 0xb1, |
| 5772 | 0xc1, 0x44, 0x91, 0x0b, 0xa5, 0xc9, 0x1b, 0xb4, |
| 5773 | 0xa9, 0xda, 0x1e, 0x9e, 0xb1, 0x3e, 0x2a, 0x8f, |
| 5774 | 0xea, 0xa5, 0x6a, 0x85, 0xd1, 0xf4, 0xa8, 0xa5 }, |
| 5775 | .rlen = 32, |
| 5776 | } |
| 5777 | }; |
| 5778 | |
| 5779 | static struct cipher_testvec xeta_dec_tv_template[] = { |
| 5780 | { |
| 5781 | .key = { [0 ... 15] = 0x00 }, |
| 5782 | .klen = 16, |
| 5783 | .input = { 0xaa, 0x22, 0x96, 0xe5, 0x6c, 0x61, 0xf3, 0x45 }, |
| 5784 | .ilen = 8, |
| 5785 | .result = { [0 ... 8] = 0x00 }, |
| 5786 | .rlen = 8, |
| 5787 | }, { |
| 5788 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, |
| 5789 | 0x77, 0x5d, 0x0e, 0x26, 0x6c, 0x28, 0x78, 0x43 }, |
| 5790 | .klen = 16, |
| 5791 | .input = { 0x82, 0x3e, 0xeb, 0x35, 0xdc, 0xdd, 0xd9, 0xc3 }, |
| 5792 | .ilen = 8, |
| 5793 | .result = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, |
| 5794 | .rlen = 8, |
| 5795 | }, { |
| 5796 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, |
| 5797 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, |
| 5798 | .klen = 16, |
| 5799 | .input = { 0xe2, 0x04, 0xdb, 0xf2, 0x89, 0x85, 0x9e, 0xea, |
| 5800 | 0x61, 0x35, 0xaa, 0xed, 0xb5, 0xcb, 0x71, 0x2c }, |
| 5801 | .ilen = 16, |
| 5802 | .result = { 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x74, |
| 5803 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, |
| 5804 | .rlen = 16, |
| 5805 | }, { |
| 5806 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, |
| 5807 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, |
| 5808 | .klen = 16, |
| 5809 | .input = { 0x0b, 0x03, 0xcd, 0x8a, 0xbe, 0x95, 0xfd, 0xb1, |
| 5810 | 0xc1, 0x44, 0x91, 0x0b, 0xa5, 0xc9, 0x1b, 0xb4, |
| 5811 | 0xa9, 0xda, 0x1e, 0x9e, 0xb1, 0x3e, 0x2a, 0x8f, |
| 5812 | 0xea, 0xa5, 0x6a, 0x85, 0xd1, 0xf4, 0xa8, 0xa5 }, |
| 5813 | .ilen = 32, |
| 5814 | .result = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, |
| 5815 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, |
| 5816 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, |
| 5817 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, |
| 5818 | .rlen = 32, |
| 5819 | } |
| 5820 | }; |
| 5821 | |
David Howells | 9083163 | 2006-12-16 12:13:14 +1100 | [diff] [blame] | 5822 | /* |
| 5823 | * FCrypt test vectors |
| 5824 | */ |
| 5825 | #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template) |
| 5826 | #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template) |
| 5827 | |
| 5828 | static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = { |
| 5829 | { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */ |
| 5830 | .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5831 | .klen = 8, |
| 5832 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5833 | .input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5834 | .ilen = 8, |
| 5835 | .result = { 0x0E, 0x09, 0x00, 0xC7, 0x3E, 0xF7, 0xED, 0x41 }, |
| 5836 | .rlen = 8, |
| 5837 | }, { |
| 5838 | .key = { 0x11, 0x44, 0x77, 0xAA, 0xDD, 0x00, 0x33, 0x66 }, |
| 5839 | .klen = 8, |
| 5840 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5841 | .input = { 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0 }, |
| 5842 | .ilen = 8, |
| 5843 | .result = { 0xD8, 0xED, 0x78, 0x74, 0x77, 0xEC, 0x06, 0x80 }, |
| 5844 | .rlen = 8, |
| 5845 | }, { /* From Arla */ |
| 5846 | .key = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, |
| 5847 | .klen = 8, |
| 5848 | .iv = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5849 | .input = "The quick brown fox jumps over the lazy dogs.\0\0", |
| 5850 | .ilen = 48, |
| 5851 | .result = { 0x00, 0xf0, 0xe, 0x11, 0x75, 0xe6, 0x23, 0x82, |
| 5852 | 0xee, 0xac, 0x98, 0x62, 0x44, 0x51, 0xe4, 0x84, |
| 5853 | 0xc3, 0x59, 0xd8, 0xaa, 0x64, 0x60, 0xae, 0xf7, |
| 5854 | 0xd2, 0xd9, 0x13, 0x79, 0x72, 0xa3, 0x45, 0x03, |
| 5855 | 0x23, 0xb5, 0x62, 0xd7, 0x0c, 0xf5, 0x27, 0xd1, |
| 5856 | 0xf8, 0x91, 0x3c, 0xac, 0x44, 0x22, 0x92, 0xef }, |
| 5857 | .rlen = 48, |
| 5858 | }, { |
| 5859 | .key = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5860 | .klen = 8, |
| 5861 | .iv = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, |
| 5862 | .input = "The quick brown fox jumps over the lazy dogs.\0\0", |
| 5863 | .ilen = 48, |
| 5864 | .result = { 0xca, 0x90, 0xf5, 0x9d, 0xcb, 0xd4, 0xd2, 0x3c, |
| 5865 | 0x01, 0x88, 0x7f, 0x3e, 0x31, 0x6e, 0x62, 0x9d, |
| 5866 | 0xd8, 0xe0, 0x57, 0xa3, 0x06, 0x3a, 0x42, 0x58, |
| 5867 | 0x2a, 0x28, 0xfe, 0x72, 0x52, 0x2f, 0xdd, 0xe0, |
| 5868 | 0x19, 0x89, 0x09, 0x1c, 0x2a, 0x8e, 0x8c, 0x94, |
| 5869 | 0xfc, 0xc7, 0x68, 0xe4, 0x88, 0xaa, 0xde, 0x0f }, |
| 5870 | .rlen = 48, |
| 5871 | }, { /* split-page version */ |
| 5872 | .key = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5873 | .klen = 8, |
| 5874 | .iv = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, |
| 5875 | .input = "The quick brown fox jumps over the lazy dogs.\0\0", |
| 5876 | .ilen = 48, |
| 5877 | .result = { 0xca, 0x90, 0xf5, 0x9d, 0xcb, 0xd4, 0xd2, 0x3c, |
| 5878 | 0x01, 0x88, 0x7f, 0x3e, 0x31, 0x6e, 0x62, 0x9d, |
| 5879 | 0xd8, 0xe0, 0x57, 0xa3, 0x06, 0x3a, 0x42, 0x58, |
| 5880 | 0x2a, 0x28, 0xfe, 0x72, 0x52, 0x2f, 0xdd, 0xe0, |
| 5881 | 0x19, 0x89, 0x09, 0x1c, 0x2a, 0x8e, 0x8c, 0x94, |
| 5882 | 0xfc, 0xc7, 0x68, 0xe4, 0x88, 0xaa, 0xde, 0x0f }, |
| 5883 | .rlen = 48, |
| 5884 | .np = 2, |
| 5885 | .tap = { 20, 28 }, |
| 5886 | } |
| 5887 | }; |
| 5888 | |
| 5889 | static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = { |
| 5890 | { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */ |
| 5891 | .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5892 | .klen = 8, |
| 5893 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5894 | .input = { 0x0E, 0x09, 0x00, 0xC7, 0x3E, 0xF7, 0xED, 0x41 }, |
| 5895 | .ilen = 8, |
| 5896 | .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5897 | .rlen = 8, |
| 5898 | }, { |
| 5899 | .key = { 0x11, 0x44, 0x77, 0xAA, 0xDD, 0x00, 0x33, 0x66 }, |
| 5900 | .klen = 8, |
| 5901 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 5902 | .input = { 0xD8, 0xED, 0x78, 0x74, 0x77, 0xEC, 0x06, 0x80 }, |
| 5903 | .ilen = 8, |
| 5904 | .result = { 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0 }, |
| 5905 | .rlen = 8, |
| 5906 | }, { /* From Arla */ |
| 5907 | .key = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, |
| 5908 | .klen = 8, |
| 5909 | .iv = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5910 | .input = { 0x00, 0xf0, 0xe, 0x11, 0x75, 0xe6, 0x23, 0x82, |
| 5911 | 0xee, 0xac, 0x98, 0x62, 0x44, 0x51, 0xe4, 0x84, |
| 5912 | 0xc3, 0x59, 0xd8, 0xaa, 0x64, 0x60, 0xae, 0xf7, |
| 5913 | 0xd2, 0xd9, 0x13, 0x79, 0x72, 0xa3, 0x45, 0x03, |
| 5914 | 0x23, 0xb5, 0x62, 0xd7, 0x0c, 0xf5, 0x27, 0xd1, |
| 5915 | 0xf8, 0x91, 0x3c, 0xac, 0x44, 0x22, 0x92, 0xef }, |
| 5916 | .ilen = 48, |
| 5917 | .result = "The quick brown fox jumps over the lazy dogs.\0\0", |
| 5918 | .rlen = 48, |
| 5919 | }, { |
| 5920 | .key = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5921 | .klen = 8, |
| 5922 | .iv = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, |
| 5923 | .input = { 0xca, 0x90, 0xf5, 0x9d, 0xcb, 0xd4, 0xd2, 0x3c, |
| 5924 | 0x01, 0x88, 0x7f, 0x3e, 0x31, 0x6e, 0x62, 0x9d, |
| 5925 | 0xd8, 0xe0, 0x57, 0xa3, 0x06, 0x3a, 0x42, 0x58, |
| 5926 | 0x2a, 0x28, 0xfe, 0x72, 0x52, 0x2f, 0xdd, 0xe0, |
| 5927 | 0x19, 0x89, 0x09, 0x1c, 0x2a, 0x8e, 0x8c, 0x94, |
| 5928 | 0xfc, 0xc7, 0x68, 0xe4, 0x88, 0xaa, 0xde, 0x0f }, |
| 5929 | .ilen = 48, |
| 5930 | .result = "The quick brown fox jumps over the lazy dogs.\0\0", |
| 5931 | .rlen = 48, |
| 5932 | }, { /* split-page version */ |
| 5933 | .key = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5934 | .klen = 8, |
| 5935 | .iv = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 }, |
| 5936 | .input = { 0xca, 0x90, 0xf5, 0x9d, 0xcb, 0xd4, 0xd2, 0x3c, |
| 5937 | 0x01, 0x88, 0x7f, 0x3e, 0x31, 0x6e, 0x62, 0x9d, |
| 5938 | 0xd8, 0xe0, 0x57, 0xa3, 0x06, 0x3a, 0x42, 0x58, |
| 5939 | 0x2a, 0x28, 0xfe, 0x72, 0x52, 0x2f, 0xdd, 0xe0, |
| 5940 | 0x19, 0x89, 0x09, 0x1c, 0x2a, 0x8e, 0x8c, 0x94, |
| 5941 | 0xfc, 0xc7, 0x68, 0xe4, 0x88, 0xaa, 0xde, 0x0f }, |
| 5942 | .ilen = 48, |
| 5943 | .result = "The quick brown fox jumps over the lazy dogs.\0\0", |
| 5944 | .rlen = 48, |
| 5945 | .np = 2, |
| 5946 | .tap = { 20, 28 }, |
| 5947 | } |
| 5948 | }; |
| 5949 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5950 | /* |
Noriaki TAKAMIYA | 02ab5a7 | 2007-01-24 21:48:19 +1100 | [diff] [blame] | 5951 | * CAMELLIA test vectors. |
| 5952 | */ |
| 5953 | #define CAMELLIA_ENC_TEST_VECTORS 3 |
| 5954 | #define CAMELLIA_DEC_TEST_VECTORS 3 |
| 5955 | #define CAMELLIA_CBC_ENC_TEST_VECTORS 2 |
| 5956 | #define CAMELLIA_CBC_DEC_TEST_VECTORS 2 |
| 5957 | |
| 5958 | static struct cipher_testvec camellia_enc_tv_template[] = { |
| 5959 | { |
| 5960 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 5961 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5962 | .klen = 16, |
| 5963 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 5964 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5965 | .ilen = 16, |
| 5966 | .result = { 0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73, |
| 5967 | 0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43 }, |
| 5968 | .rlen = 16, |
| 5969 | }, { |
| 5970 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 5971 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, |
| 5972 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 }, |
| 5973 | .klen = 24, |
| 5974 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 5975 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5976 | .ilen = 16, |
| 5977 | .result = { 0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8, |
| 5978 | 0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9 }, |
| 5979 | .rlen = 16, |
| 5980 | }, { |
| 5981 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 5982 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, |
| 5983 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
| 5984 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, |
| 5985 | .klen = 32, |
| 5986 | .input = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 5987 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5988 | .ilen = 16, |
| 5989 | .result = { 0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c, |
| 5990 | 0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09 }, |
| 5991 | .rlen = 16, |
| 5992 | }, |
| 5993 | }; |
| 5994 | |
| 5995 | static struct cipher_testvec camellia_dec_tv_template[] = { |
| 5996 | { |
| 5997 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 5998 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 5999 | .klen = 16, |
| 6000 | .input = { 0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73, |
| 6001 | 0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43 }, |
| 6002 | .ilen = 16, |
| 6003 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 6004 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 6005 | .rlen = 16, |
| 6006 | }, { |
| 6007 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 6008 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, |
| 6009 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 }, |
| 6010 | .klen = 24, |
| 6011 | .input = { 0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8, |
| 6012 | 0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9 }, |
| 6013 | .ilen = 16, |
| 6014 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 6015 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 6016 | .rlen = 16, |
| 6017 | }, { |
| 6018 | .key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 6019 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, |
| 6020 | 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, |
| 6021 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, |
| 6022 | .klen = 32, |
| 6023 | .input = { 0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c, |
| 6024 | 0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09 }, |
| 6025 | .ilen = 16, |
| 6026 | .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, |
| 6027 | 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, |
| 6028 | .rlen = 16, |
| 6029 | }, |
| 6030 | }; |
| 6031 | |
| 6032 | static struct cipher_testvec camellia_cbc_enc_tv_template[] = { |
| 6033 | { |
| 6034 | .key = { 0x06, 0xa9, 0x21, 0x40, 0x36, 0xb8, 0xa1, 0x5b, |
| 6035 | 0x51, 0x2e, 0x03, 0xd5, 0x34, 0x12, 0x00, 0x06 }, |
| 6036 | .klen = 16, |
| 6037 | .iv = { 0x3d, 0xaf, 0xba, 0x42, 0x9d, 0x9e, 0xb4, 0x30, |
| 6038 | 0xb4, 0x22, 0xda, 0x80, 0x2c, 0x9f, 0xac, 0x41 }, |
| 6039 | .input = { "Single block msg" }, |
| 6040 | .ilen = 16, |
| 6041 | .result = { 0xea, 0x32, 0x12, 0x76, 0x3b, 0x50, 0x10, 0xe7, |
| 6042 | 0x18, 0xf6, 0xfd, 0x5d, 0xf6, 0x8f, 0x13, 0x51 }, |
| 6043 | .rlen = 16, |
| 6044 | }, { |
| 6045 | .key = { 0xc2, 0x86, 0x69, 0x6d, 0x88, 0x7c, 0x9a, 0xa0, |
| 6046 | 0x61, 0x1b, 0xbb, 0x3e, 0x20, 0x25, 0xa4, 0x5a }, |
| 6047 | .klen = 16, |
| 6048 | .iv = { 0x56, 0x2e, 0x17, 0x99, 0x6d, 0x09, 0x3d, 0x28, |
| 6049 | 0xdd, 0xb3, 0xba, 0x69, 0x5a, 0x2e, 0x6f, 0x58 }, |
| 6050 | .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 6051 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 6052 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 6053 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 6054 | .ilen = 32, |
| 6055 | .result = { 0xa5, 0xdf, 0x6e, 0x50, 0xda, 0x70, 0x6c, 0x01, |
| 6056 | 0x4a, 0xab, 0xf3, 0xf2, 0xd6, 0xfc, 0x6c, 0xfd, |
| 6057 | 0x19, 0xb4, 0x3e, 0x57, 0x1c, 0x02, 0x5e, 0xa0, |
| 6058 | 0x15, 0x78, 0xe0, 0x5e, 0xf2, 0xcb, 0x87, 0x16 }, |
| 6059 | .rlen = 32, |
| 6060 | }, |
| 6061 | }; |
| 6062 | |
| 6063 | static struct cipher_testvec camellia_cbc_dec_tv_template[] = { |
| 6064 | { |
| 6065 | .key = { 0x06, 0xa9, 0x21, 0x40, 0x36, 0xb8, 0xa1, 0x5b, |
| 6066 | 0x51, 0x2e, 0x03, 0xd5, 0x34, 0x12, 0x00, 0x06 }, |
| 6067 | .klen = 16, |
| 6068 | .iv = { 0x3d, 0xaf, 0xba, 0x42, 0x9d, 0x9e, 0xb4, 0x30, |
| 6069 | 0xb4, 0x22, 0xda, 0x80, 0x2c, 0x9f, 0xac, 0x41 }, |
| 6070 | .input = { 0xea, 0x32, 0x12, 0x76, 0x3b, 0x50, 0x10, 0xe7, |
| 6071 | 0x18, 0xf6, 0xfd, 0x5d, 0xf6, 0x8f, 0x13, 0x51 }, |
| 6072 | .ilen = 16, |
| 6073 | .result = { "Single block msg" }, |
| 6074 | .rlen = 16, |
| 6075 | }, { |
| 6076 | .key = { 0xc2, 0x86, 0x69, 0x6d, 0x88, 0x7c, 0x9a, 0xa0, |
| 6077 | 0x61, 0x1b, 0xbb, 0x3e, 0x20, 0x25, 0xa4, 0x5a }, |
| 6078 | .klen = 16, |
| 6079 | .iv = { 0x56, 0x2e, 0x17, 0x99, 0x6d, 0x09, 0x3d, 0x28, |
| 6080 | 0xdd, 0xb3, 0xba, 0x69, 0x5a, 0x2e, 0x6f, 0x58 }, |
| 6081 | .input = { 0xa5, 0xdf, 0x6e, 0x50, 0xda, 0x70, 0x6c, 0x01, |
| 6082 | 0x4a, 0xab, 0xf3, 0xf2, 0xd6, 0xfc, 0x6c, 0xfd, |
| 6083 | 0x19, 0xb4, 0x3e, 0x57, 0x1c, 0x02, 0x5e, 0xa0, |
| 6084 | 0x15, 0x78, 0xe0, 0x5e, 0xf2, 0xcb, 0x87, 0x16 }, |
| 6085 | .ilen = 32, |
| 6086 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 6087 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 6088 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
| 6089 | 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, |
| 6090 | .rlen = 32, |
| 6091 | }, |
| 6092 | }; |
| 6093 | |
| 6094 | /* |
Hye-Shik Chang | e2ee95b | 2007-08-21 20:01:03 +0800 | [diff] [blame] | 6095 | * SEED test vectors |
| 6096 | */ |
| 6097 | #define SEED_ENC_TEST_VECTORS 4 |
| 6098 | #define SEED_DEC_TEST_VECTORS 4 |
| 6099 | |
| 6100 | static struct cipher_testvec seed_enc_tv_template[] = { |
| 6101 | { |
| 6102 | .key = { [0 ... 15] = 0x00 }, |
| 6103 | .klen = 16, |
| 6104 | .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 6105 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 6106 | .ilen = 16, |
| 6107 | .result = { 0x5e, 0xba, 0xc6, 0xe0, 0x05, 0x4e, 0x16, 0x68, |
| 6108 | 0x19, 0xaf, 0xf1, 0xcc, 0x6d, 0x34, 0x6c, 0xdb }, |
| 6109 | .rlen = 16, |
| 6110 | }, { |
| 6111 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 6112 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 6113 | .klen = 16, |
| 6114 | .input = { [0 ... 15] = 0x00 }, |
| 6115 | .ilen = 16, |
| 6116 | .result = { 0xc1, 0x1f, 0x22, 0xf2, 0x01, 0x40, 0x50, 0x50, |
| 6117 | 0x84, 0x48, 0x35, 0x97, 0xe4, 0x37, 0x0f, 0x43 }, |
| 6118 | .rlen = 16, |
| 6119 | }, { |
| 6120 | .key = { 0x47, 0x06, 0x48, 0x08, 0x51, 0xe6, 0x1b, 0xe8, |
| 6121 | 0x5d, 0x74, 0xbf, 0xb3, 0xfd, 0x95, 0x61, 0x85 }, |
| 6122 | .klen = 16, |
| 6123 | .input = { 0x83, 0xa2, 0xf8, 0xa2, 0x88, 0x64, 0x1f, 0xb9, |
| 6124 | 0xa4, 0xe9, 0xa5, 0xcc, 0x2f, 0x13, 0x1c, 0x7d }, |
| 6125 | .ilen = 16, |
| 6126 | .result = { 0xee, 0x54, 0xd1, 0x3e, 0xbc, 0xae, 0x70, 0x6d, |
| 6127 | 0x22, 0x6b, 0xc3, 0x14, 0x2c, 0xd4, 0x0d, 0x4a }, |
| 6128 | .rlen = 16, |
| 6129 | }, { |
| 6130 | .key = { 0x28, 0xdb, 0xc3, 0xbc, 0x49, 0xff, 0xd8, 0x7d, |
| 6131 | 0xcf, 0xa5, 0x09, 0xb1, 0x1d, 0x42, 0x2b, 0xe7 }, |
| 6132 | .klen = 16, |
| 6133 | .input = { 0xb4, 0x1e, 0x6b, 0xe2, 0xeb, 0xa8, 0x4a, 0x14, |
| 6134 | 0x8e, 0x2e, 0xed, 0x84, 0x59, 0x3c, 0x5e, 0xc7 }, |
| 6135 | .ilen = 16, |
| 6136 | .result = { 0x9b, 0x9b, 0x7b, 0xfc, 0xd1, 0x81, 0x3c, 0xb9, |
| 6137 | 0x5d, 0x0b, 0x36, 0x18, 0xf4, 0x0f, 0x51, 0x22 }, |
| 6138 | .rlen = 16, |
| 6139 | } |
| 6140 | }; |
| 6141 | |
| 6142 | static struct cipher_testvec seed_dec_tv_template[] = { |
| 6143 | { |
| 6144 | .key = { [0 ... 15] = 0x00 }, |
| 6145 | .klen = 16, |
| 6146 | .input = { 0x5e, 0xba, 0xc6, 0xe0, 0x05, 0x4e, 0x16, 0x68, |
| 6147 | 0x19, 0xaf, 0xf1, 0xcc, 0x6d, 0x34, 0x6c, 0xdb }, |
| 6148 | .ilen = 16, |
| 6149 | .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 6150 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 6151 | .rlen = 16, |
| 6152 | }, { |
| 6153 | .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 6154 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, |
| 6155 | .klen = 16, |
| 6156 | .input = { 0xc1, 0x1f, 0x22, 0xf2, 0x01, 0x40, 0x50, 0x50, |
| 6157 | 0x84, 0x48, 0x35, 0x97, 0xe4, 0x37, 0x0f, 0x43 }, |
| 6158 | .ilen = 16, |
| 6159 | .result = { [0 ... 15] = 0x00 }, |
| 6160 | .rlen = 16, |
| 6161 | }, { |
| 6162 | .key = { 0x47, 0x06, 0x48, 0x08, 0x51, 0xe6, 0x1b, 0xe8, |
| 6163 | 0x5d, 0x74, 0xbf, 0xb3, 0xfd, 0x95, 0x61, 0x85 }, |
| 6164 | .klen = 16, |
| 6165 | .input = { 0xee, 0x54, 0xd1, 0x3e, 0xbc, 0xae, 0x70, 0x6d, |
| 6166 | 0x22, 0x6b, 0xc3, 0x14, 0x2c, 0xd4, 0x0d, 0x4a }, |
| 6167 | .ilen = 16, |
| 6168 | .result = { 0x83, 0xa2, 0xf8, 0xa2, 0x88, 0x64, 0x1f, 0xb9, |
| 6169 | 0xa4, 0xe9, 0xa5, 0xcc, 0x2f, 0x13, 0x1c, 0x7d }, |
| 6170 | .rlen = 16, |
| 6171 | }, { |
| 6172 | .key = { 0x28, 0xdb, 0xc3, 0xbc, 0x49, 0xff, 0xd8, 0x7d, |
| 6173 | 0xcf, 0xa5, 0x09, 0xb1, 0x1d, 0x42, 0x2b, 0xe7 }, |
| 6174 | .klen = 16, |
| 6175 | .input = { 0x9b, 0x9b, 0x7b, 0xfc, 0xd1, 0x81, 0x3c, 0xb9, |
| 6176 | 0x5d, 0x0b, 0x36, 0x18, 0xf4, 0x0f, 0x51, 0x22 }, |
| 6177 | .ilen = 16, |
| 6178 | .result = { 0xb4, 0x1e, 0x6b, 0xe2, 0xeb, 0xa8, 0x4a, 0x14, |
| 6179 | 0x8e, 0x2e, 0xed, 0x84, 0x59, 0x3c, 0x5e, 0xc7 }, |
| 6180 | .rlen = 16, |
| 6181 | } |
| 6182 | }; |
| 6183 | |
Tan Swee Heng | 2407d60 | 2007-11-23 19:45:00 +0800 | [diff] [blame] | 6184 | #define SALSA20_STREAM_ENC_TEST_VECTORS 4 |
| 6185 | static struct cipher_testvec salsa20_stream_enc_tv_template[] = { |
| 6186 | /* |
| 6187 | * Testvectors from verified.test-vectors submitted to ECRYPT. |
| 6188 | * They are truncated to size 39, 64, 111, 129 to test a variety |
| 6189 | * of input length. |
| 6190 | */ |
| 6191 | { /* Set 3, vector 0 */ |
| 6192 | .key = { |
| 6193 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 6194 | 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F |
| 6195 | }, |
| 6196 | .klen = 16, |
| 6197 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 6198 | .input = { |
| 6199 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6200 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6201 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6202 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6203 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6204 | }, |
| 6205 | .ilen = 39, |
| 6206 | .result = { |
| 6207 | 0x2D, 0xD5, 0xC3, 0xF7, 0xBA, 0x2B, 0x20, 0xF7, |
| 6208 | 0x68, 0x02, 0x41, 0x0C, 0x68, 0x86, 0x88, 0x89, |
| 6209 | 0x5A, 0xD8, 0xC1, 0xBD, 0x4E, 0xA6, 0xC9, 0xB1, |
| 6210 | 0x40, 0xFB, 0x9B, 0x90, 0xE2, 0x10, 0x49, 0xBF, |
| 6211 | 0x58, 0x3F, 0x52, 0x79, 0x70, 0xEB, 0xC1, |
| 6212 | }, |
| 6213 | .rlen = 39, |
| 6214 | }, { /* Set 5, vector 0 */ |
| 6215 | .key = { |
| 6216 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6217 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 6218 | }, |
| 6219 | .klen = 16, |
| 6220 | .iv = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 6221 | .input = { |
| 6222 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6223 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6224 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6225 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6226 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6227 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6228 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6229 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6230 | }, |
| 6231 | .ilen = 64, |
| 6232 | .result = { |
| 6233 | 0xB6, 0x6C, 0x1E, 0x44, 0x46, 0xDD, 0x95, 0x57, |
| 6234 | 0xE5, 0x78, 0xE2, 0x23, 0xB0, 0xB7, 0x68, 0x01, |
| 6235 | 0x7B, 0x23, 0xB2, 0x67, 0xBB, 0x02, 0x34, 0xAE, |
| 6236 | 0x46, 0x26, 0xBF, 0x44, 0x3F, 0x21, 0x97, 0x76, |
| 6237 | 0x43, 0x6F, 0xB1, 0x9F, 0xD0, 0xE8, 0x86, 0x6F, |
| 6238 | 0xCD, 0x0D, 0xE9, 0xA9, 0x53, 0x8F, 0x4A, 0x09, |
| 6239 | 0xCA, 0x9A, 0xC0, 0x73, 0x2E, 0x30, 0xBC, 0xF9, |
| 6240 | 0x8E, 0x4F, 0x13, 0xE4, 0xB9, 0xE2, 0x01, 0xD9, |
| 6241 | }, |
| 6242 | .rlen = 64, |
| 6243 | }, { /* Set 3, vector 27 */ |
| 6244 | .key = { |
| 6245 | 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, |
| 6246 | 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, |
| 6247 | 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, |
| 6248 | 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A |
| 6249 | }, |
| 6250 | .klen = 32, |
| 6251 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 6252 | .input = { |
| 6253 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6254 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6255 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6256 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6257 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6258 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6259 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6260 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6261 | |
| 6262 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6263 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6264 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6265 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6266 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6267 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6268 | }, |
| 6269 | .ilen = 111, |
| 6270 | .result = { |
| 6271 | 0xAE, 0x39, 0x50, 0x8E, 0xAC, 0x9A, 0xEC, 0xE7, |
| 6272 | 0xBF, 0x97, 0xBB, 0x20, 0xB9, 0xDE, 0xE4, 0x1F, |
| 6273 | 0x87, 0xD9, 0x47, 0xF8, 0x28, 0x91, 0x35, 0x98, |
| 6274 | 0xDB, 0x72, 0xCC, 0x23, 0x29, 0x48, 0x56, 0x5E, |
| 6275 | 0x83, 0x7E, 0x0B, 0xF3, 0x7D, 0x5D, 0x38, 0x7B, |
| 6276 | 0x2D, 0x71, 0x02, 0xB4, 0x3B, 0xB5, 0xD8, 0x23, |
| 6277 | 0xB0, 0x4A, 0xDF, 0x3C, 0xEC, 0xB6, 0xD9, 0x3B, |
| 6278 | 0x9B, 0xA7, 0x52, 0xBE, 0xC5, 0xD4, 0x50, 0x59, |
| 6279 | |
| 6280 | 0x15, 0x14, 0xB4, 0x0E, 0x40, 0xE6, 0x53, 0xD1, |
| 6281 | 0x83, 0x9C, 0x5B, 0xA0, 0x92, 0x29, 0x6B, 0x5E, |
| 6282 | 0x96, 0x5B, 0x1E, 0x2F, 0xD3, 0xAC, 0xC1, 0x92, |
| 6283 | 0xB1, 0x41, 0x3F, 0x19, 0x2F, 0xC4, 0x3B, 0xC6, |
| 6284 | 0x95, 0x46, 0x45, 0x54, 0xE9, 0x75, 0x03, 0x08, |
| 6285 | 0x44, 0xAF, 0xE5, 0x8A, 0x81, 0x12, 0x09, |
| 6286 | }, |
| 6287 | .rlen = 111, |
| 6288 | |
| 6289 | }, { /* Set 5, vector 27 */ |
| 6290 | .key = { |
| 6291 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6292 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6293 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6294 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 6295 | }, |
| 6296 | .klen = 32, |
| 6297 | .iv = { 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00 }, |
| 6298 | .input = { |
| 6299 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6300 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6301 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6302 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6303 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6304 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6305 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6306 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6307 | |
| 6308 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6309 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6310 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6311 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6312 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6313 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6314 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6315 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 6316 | |
| 6317 | 0x00, |
| 6318 | }, |
| 6319 | .ilen = 129, |
| 6320 | .result = { |
| 6321 | 0xD2, 0xDB, 0x1A, 0x5C, 0xF1, 0xC1, 0xAC, 0xDB, |
| 6322 | 0xE8, 0x1A, 0x7A, 0x43, 0x40, 0xEF, 0x53, 0x43, |
| 6323 | 0x5E, 0x7F, 0x4B, 0x1A, 0x50, 0x52, 0x3F, 0x8D, |
| 6324 | 0x28, 0x3D, 0xCF, 0x85, 0x1D, 0x69, 0x6E, 0x60, |
| 6325 | 0xF2, 0xDE, 0x74, 0x56, 0x18, 0x1B, 0x84, 0x10, |
| 6326 | 0xD4, 0x62, 0xBA, 0x60, 0x50, 0xF0, 0x61, 0xF2, |
| 6327 | 0x1C, 0x78, 0x7F, 0xC1, 0x24, 0x34, 0xAF, 0x58, |
| 6328 | 0xBF, 0x2C, 0x59, 0xCA, 0x90, 0x77, 0xF3, 0xB0, |
| 6329 | |
| 6330 | 0x5B, 0x4A, 0xDF, 0x89, 0xCE, 0x2C, 0x2F, 0xFC, |
| 6331 | 0x67, 0xF0, 0xE3, 0x45, 0xE8, 0xB3, 0xB3, 0x75, |
| 6332 | 0xA0, 0x95, 0x71, 0xA1, 0x29, 0x39, 0x94, 0xCA, |
| 6333 | 0x45, 0x2F, 0xBD, 0xCB, 0x10, 0xB6, 0xBE, 0x9F, |
| 6334 | 0x8E, 0xF9, 0xB2, 0x01, 0x0A, 0x5A, 0x0A, 0xB7, |
| 6335 | 0x6B, 0x9D, 0x70, 0x8E, 0x4B, 0xD6, 0x2F, 0xCD, |
| 6336 | 0x2E, 0x40, 0x48, 0x75, 0xE9, 0xE2, 0x21, 0x45, |
| 6337 | 0x0B, 0xC9, 0xB6, 0xB5, 0x66, 0xBC, 0x9A, 0x59, |
| 6338 | |
| 6339 | 0x5A, |
| 6340 | }, |
| 6341 | .rlen = 129, |
| 6342 | } |
| 6343 | }; |
| 6344 | |
Hye-Shik Chang | e2ee95b | 2007-08-21 20:01:03 +0800 | [diff] [blame] | 6345 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6346 | * Compression stuff. |
| 6347 | */ |
| 6348 | #define COMP_BUF_SIZE 512 |
| 6349 | |
| 6350 | struct comp_testvec { |
| 6351 | int inlen, outlen; |
| 6352 | char input[COMP_BUF_SIZE]; |
| 6353 | char output[COMP_BUF_SIZE]; |
| 6354 | }; |
| 6355 | |
| 6356 | /* |
| 6357 | * Deflate test vectors (null-terminated strings). |
| 6358 | * Params: winbits=11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL. |
| 6359 | */ |
| 6360 | #define DEFLATE_COMP_TEST_VECTORS 2 |
| 6361 | #define DEFLATE_DECOMP_TEST_VECTORS 2 |
| 6362 | |
| 6363 | static struct comp_testvec deflate_comp_tv_template[] = { |
| 6364 | { |
| 6365 | .inlen = 70, |
| 6366 | .outlen = 38, |
| 6367 | .input = "Join us now and share the software " |
| 6368 | "Join us now and share the software ", |
| 6369 | .output = { 0xf3, 0xca, 0xcf, 0xcc, 0x53, 0x28, 0x2d, 0x56, |
| 6370 | 0xc8, 0xcb, 0x2f, 0x57, 0x48, 0xcc, 0x4b, 0x51, |
| 6371 | 0x28, 0xce, 0x48, 0x2c, 0x4a, 0x55, 0x28, 0xc9, |
| 6372 | 0x48, 0x55, 0x28, 0xce, 0x4f, 0x2b, 0x29, 0x07, |
| 6373 | 0x71, 0xbc, 0x08, 0x2b, 0x01, 0x00 }, |
| 6374 | }, { |
| 6375 | .inlen = 191, |
| 6376 | .outlen = 122, |
| 6377 | .input = "This document describes a compression method based on the DEFLATE" |
| 6378 | "compression algorithm. This document defines the application of " |
| 6379 | "the DEFLATE algorithm to the IP Payload Compression Protocol.", |
| 6380 | .output = { 0x5d, 0x8d, 0x31, 0x0e, 0xc2, 0x30, 0x10, 0x04, |
| 6381 | 0xbf, 0xb2, 0x2f, 0xc8, 0x1f, 0x10, 0x04, 0x09, |
| 6382 | 0x89, 0xc2, 0x85, 0x3f, 0x70, 0xb1, 0x2f, 0xf8, |
| 6383 | 0x24, 0xdb, 0x67, 0xd9, 0x47, 0xc1, 0xef, 0x49, |
| 6384 | 0x68, 0x12, 0x51, 0xae, 0x76, 0x67, 0xd6, 0x27, |
| 6385 | 0x19, 0x88, 0x1a, 0xde, 0x85, 0xab, 0x21, 0xf2, |
| 6386 | 0x08, 0x5d, 0x16, 0x1e, 0x20, 0x04, 0x2d, 0xad, |
| 6387 | 0xf3, 0x18, 0xa2, 0x15, 0x85, 0x2d, 0x69, 0xc4, |
| 6388 | 0x42, 0x83, 0x23, 0xb6, 0x6c, 0x89, 0x71, 0x9b, |
| 6389 | 0xef, 0xcf, 0x8b, 0x9f, 0xcf, 0x33, 0xca, 0x2f, |
| 6390 | 0xed, 0x62, 0xa9, 0x4c, 0x80, 0xff, 0x13, 0xaf, |
| 6391 | 0x52, 0x37, 0xed, 0x0e, 0x52, 0x6b, 0x59, 0x02, |
| 6392 | 0xd9, 0x4e, 0xe8, 0x7a, 0x76, 0x1d, 0x02, 0x98, |
| 6393 | 0xfe, 0x8a, 0x87, 0x83, 0xa3, 0x4f, 0x56, 0x8a, |
| 6394 | 0xb8, 0x9e, 0x8e, 0x5c, 0x57, 0xd3, 0xa0, 0x79, |
| 6395 | 0xfa, 0x02 }, |
| 6396 | }, |
| 6397 | }; |
| 6398 | |
| 6399 | static struct comp_testvec deflate_decomp_tv_template[] = { |
| 6400 | { |
| 6401 | .inlen = 122, |
| 6402 | .outlen = 191, |
| 6403 | .input = { 0x5d, 0x8d, 0x31, 0x0e, 0xc2, 0x30, 0x10, 0x04, |
| 6404 | 0xbf, 0xb2, 0x2f, 0xc8, 0x1f, 0x10, 0x04, 0x09, |
| 6405 | 0x89, 0xc2, 0x85, 0x3f, 0x70, 0xb1, 0x2f, 0xf8, |
| 6406 | 0x24, 0xdb, 0x67, 0xd9, 0x47, 0xc1, 0xef, 0x49, |
| 6407 | 0x68, 0x12, 0x51, 0xae, 0x76, 0x67, 0xd6, 0x27, |
| 6408 | 0x19, 0x88, 0x1a, 0xde, 0x85, 0xab, 0x21, 0xf2, |
| 6409 | 0x08, 0x5d, 0x16, 0x1e, 0x20, 0x04, 0x2d, 0xad, |
| 6410 | 0xf3, 0x18, 0xa2, 0x15, 0x85, 0x2d, 0x69, 0xc4, |
| 6411 | 0x42, 0x83, 0x23, 0xb6, 0x6c, 0x89, 0x71, 0x9b, |
| 6412 | 0xef, 0xcf, 0x8b, 0x9f, 0xcf, 0x33, 0xca, 0x2f, |
| 6413 | 0xed, 0x62, 0xa9, 0x4c, 0x80, 0xff, 0x13, 0xaf, |
| 6414 | 0x52, 0x37, 0xed, 0x0e, 0x52, 0x6b, 0x59, 0x02, |
| 6415 | 0xd9, 0x4e, 0xe8, 0x7a, 0x76, 0x1d, 0x02, 0x98, |
| 6416 | 0xfe, 0x8a, 0x87, 0x83, 0xa3, 0x4f, 0x56, 0x8a, |
| 6417 | 0xb8, 0x9e, 0x8e, 0x5c, 0x57, 0xd3, 0xa0, 0x79, |
| 6418 | 0xfa, 0x02 }, |
| 6419 | .output = "This document describes a compression method based on the DEFLATE" |
| 6420 | "compression algorithm. This document defines the application of " |
| 6421 | "the DEFLATE algorithm to the IP Payload Compression Protocol.", |
| 6422 | }, { |
| 6423 | .inlen = 38, |
| 6424 | .outlen = 70, |
| 6425 | .input = { 0xf3, 0xca, 0xcf, 0xcc, 0x53, 0x28, 0x2d, 0x56, |
| 6426 | 0xc8, 0xcb, 0x2f, 0x57, 0x48, 0xcc, 0x4b, 0x51, |
| 6427 | 0x28, 0xce, 0x48, 0x2c, 0x4a, 0x55, 0x28, 0xc9, |
| 6428 | 0x48, 0x55, 0x28, 0xce, 0x4f, 0x2b, 0x29, 0x07, |
| 6429 | 0x71, 0xbc, 0x08, 0x2b, 0x01, 0x00 }, |
| 6430 | .output = "Join us now and share the software " |
| 6431 | "Join us now and share the software ", |
| 6432 | }, |
| 6433 | }; |
| 6434 | |
| 6435 | /* |
| 6436 | * Michael MIC test vectors from IEEE 802.11i |
| 6437 | */ |
| 6438 | #define MICHAEL_MIC_TEST_VECTORS 6 |
| 6439 | |
Herbert Xu | ef2736f | 2005-06-22 13:26:03 -0700 | [diff] [blame] | 6440 | static struct hash_testvec michael_mic_tv_template[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6441 | { |
| 6442 | .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, |
| 6443 | .ksize = 8, |
| 6444 | .plaintext = { }, |
| 6445 | .psize = 0, |
| 6446 | .digest = { 0x82, 0x92, 0x5c, 0x1c, 0xa1, 0xd1, 0x30, 0xb8 } |
| 6447 | }, |
| 6448 | { |
| 6449 | .key = { 0x82, 0x92, 0x5c, 0x1c, 0xa1, 0xd1, 0x30, 0xb8 }, |
| 6450 | .ksize = 8, |
| 6451 | .plaintext = { 'M' }, |
| 6452 | .psize = 1, |
| 6453 | .digest = { 0x43, 0x47, 0x21, 0xca, 0x40, 0x63, 0x9b, 0x3f } |
| 6454 | }, |
| 6455 | { |
| 6456 | .key = { 0x43, 0x47, 0x21, 0xca, 0x40, 0x63, 0x9b, 0x3f }, |
| 6457 | .ksize = 8, |
| 6458 | .plaintext = { 'M', 'i' }, |
| 6459 | .psize = 2, |
| 6460 | .digest = { 0xe8, 0xf9, 0xbe, 0xca, 0xe9, 0x7e, 0x5d, 0x29 } |
| 6461 | }, |
| 6462 | { |
| 6463 | .key = { 0xe8, 0xf9, 0xbe, 0xca, 0xe9, 0x7e, 0x5d, 0x29 }, |
| 6464 | .ksize = 8, |
| 6465 | .plaintext = { 'M', 'i', 'c' }, |
| 6466 | .psize = 3, |
| 6467 | .digest = { 0x90, 0x03, 0x8f, 0xc6, 0xcf, 0x13, 0xc1, 0xdb } |
| 6468 | }, |
| 6469 | { |
| 6470 | .key = { 0x90, 0x03, 0x8f, 0xc6, 0xcf, 0x13, 0xc1, 0xdb }, |
| 6471 | .ksize = 8, |
| 6472 | .plaintext = { 'M', 'i', 'c', 'h' }, |
| 6473 | .psize = 4, |
| 6474 | .digest = { 0xd5, 0x5e, 0x10, 0x05, 0x10, 0x12, 0x89, 0x86 } |
| 6475 | }, |
| 6476 | { |
| 6477 | .key = { 0xd5, 0x5e, 0x10, 0x05, 0x10, 0x12, 0x89, 0x86 }, |
| 6478 | .ksize = 8, |
| 6479 | .plaintext = { 'M', 'i', 'c', 'h', 'a', 'e', 'l' }, |
| 6480 | .psize = 7, |
| 6481 | .digest = { 0x0a, 0x94, 0x2b, 0x12, 0x4e, 0xca, 0xa5, 0x46 }, |
| 6482 | } |
| 6483 | }; |
| 6484 | |
Harald Welte | ebfd9bc | 2005-06-22 13:27:23 -0700 | [diff] [blame] | 6485 | /* |
Herbert Xu | c907ee7 | 2006-08-21 22:04:03 +1000 | [diff] [blame] | 6486 | * CRC32C test vectors |
| 6487 | */ |
| 6488 | #define CRC32C_TEST_VECTORS 14 |
| 6489 | |
| 6490 | static struct hash_testvec crc32c_tv_template[] = { |
| 6491 | { |
| 6492 | .psize = 0, |
| 6493 | .digest = { 0x00, 0x00, 0x00, 0x00 } |
| 6494 | }, |
| 6495 | { |
| 6496 | .key = { 0x87, 0xa9, 0xcb, 0xed }, |
| 6497 | .ksize = 4, |
| 6498 | .psize = 0, |
| 6499 | .digest = { 0x78, 0x56, 0x34, 0x12 }, |
| 6500 | }, |
| 6501 | { |
| 6502 | .key = { 0xff, 0xff, 0xff, 0xff }, |
| 6503 | .ksize = 4, |
| 6504 | .plaintext = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
| 6505 | 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, |
| 6506 | 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, |
| 6507 | 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, |
| 6508 | 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28 }, |
| 6509 | .psize = 40, |
| 6510 | .digest = { 0x7f, 0x15, 0x2c, 0x0e } |
| 6511 | }, |
| 6512 | { |
| 6513 | .key = { 0xff, 0xff, 0xff, 0xff }, |
| 6514 | .ksize = 4, |
| 6515 | .plaintext = { 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, |
| 6516 | 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, |
| 6517 | 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, |
| 6518 | 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, |
| 6519 | 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50 }, |
| 6520 | .psize = 40, |
| 6521 | .digest = { 0xf6, 0xeb, 0x80, 0xe9 } |
| 6522 | }, |
| 6523 | { |
| 6524 | .key = { 0xff, 0xff, 0xff, 0xff }, |
| 6525 | .ksize = 4, |
| 6526 | .plaintext = { 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, |
| 6527 | 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, |
| 6528 | 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, |
| 6529 | 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, |
| 6530 | 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78 }, |
| 6531 | .psize = 40, |
| 6532 | .digest = { 0xed, 0xbd, 0x74, 0xde } |
| 6533 | }, |
| 6534 | { |
| 6535 | .key = { 0xff, 0xff, 0xff, 0xff }, |
| 6536 | .ksize = 4, |
| 6537 | .plaintext = { 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, |
| 6538 | 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, |
| 6539 | 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, |
| 6540 | 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, |
| 6541 | 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0 }, |
| 6542 | .psize = 40, |
| 6543 | .digest = { 0x62, 0xc8, 0x79, 0xd5 } |
| 6544 | }, |
| 6545 | { |
| 6546 | .key = { 0xff, 0xff, 0xff, 0xff }, |
| 6547 | .ksize = 4, |
| 6548 | .plaintext = { 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, |
| 6549 | 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, |
| 6550 | 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, |
| 6551 | 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, |
| 6552 | 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8 }, |
| 6553 | .psize = 40, |
| 6554 | .digest = { 0xd0, 0x9a, 0x97, 0xba } |
| 6555 | }, |
| 6556 | { |
| 6557 | .key = { 0xff, 0xff, 0xff, 0xff }, |
| 6558 | .ksize = 4, |
| 6559 | .plaintext = { 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, |
| 6560 | 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, |
| 6561 | 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, |
| 6562 | 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, |
| 6563 | 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0 }, |
| 6564 | .psize = 40, |
| 6565 | .digest = { 0x13, 0xd9, 0x29, 0x2b } |
| 6566 | }, |
| 6567 | { |
| 6568 | .key = { 0x80, 0xea, 0xd3, 0xf1 }, |
| 6569 | .ksize = 4, |
| 6570 | .plaintext = { 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, |
| 6571 | 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, |
| 6572 | 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, |
| 6573 | 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, |
| 6574 | 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50 }, |
| 6575 | .psize = 40, |
| 6576 | .digest = { 0x0c, 0xb5, 0xe2, 0xa2 } |
| 6577 | }, |
| 6578 | { |
| 6579 | .key = { 0xf3, 0x4a, 0x1d, 0x5d }, |
| 6580 | .ksize = 4, |
| 6581 | .plaintext = { 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, |
| 6582 | 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, |
| 6583 | 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, |
| 6584 | 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, |
| 6585 | 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78 }, |
| 6586 | .psize = 40, |
| 6587 | .digest = { 0xd1, 0x7f, 0xfb, 0xa6 } |
| 6588 | }, |
| 6589 | { |
| 6590 | .key = { 0x2e, 0x80, 0x04, 0x59 }, |
| 6591 | .ksize = 4, |
| 6592 | .plaintext = { 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, |
| 6593 | 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, |
| 6594 | 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, |
| 6595 | 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, |
| 6596 | 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0 }, |
| 6597 | .psize = 40, |
| 6598 | .digest = { 0x59, 0x33, 0xe6, 0x7a } |
| 6599 | }, |
| 6600 | { |
| 6601 | .key = { 0xa6, 0xcc, 0x19, 0x85 }, |
| 6602 | .ksize = 4, |
| 6603 | .plaintext = { 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, |
| 6604 | 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, |
| 6605 | 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, |
| 6606 | 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, |
| 6607 | 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8 }, |
| 6608 | .psize = 40, |
| 6609 | .digest = { 0xbe, 0x03, 0x01, 0xd2 } |
| 6610 | }, |
| 6611 | { |
| 6612 | .key = { 0x41, 0xfc, 0xfe, 0x2d }, |
| 6613 | .ksize = 4, |
| 6614 | .plaintext = { 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, |
| 6615 | 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, |
| 6616 | 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, |
| 6617 | 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, |
| 6618 | 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0 }, |
| 6619 | .psize = 40, |
| 6620 | .digest = { 0x75, 0xd3, 0xc5, 0x24 } |
| 6621 | }, |
| 6622 | { |
| 6623 | .key = { 0xff, 0xff, 0xff, 0xff }, |
| 6624 | .ksize = 4, |
| 6625 | .plaintext = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
| 6626 | 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, |
| 6627 | 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, |
| 6628 | 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, |
| 6629 | 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, |
| 6630 | 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, |
| 6631 | 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, |
| 6632 | 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, |
| 6633 | 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, |
| 6634 | 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, |
| 6635 | 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, |
| 6636 | 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, |
| 6637 | 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, |
| 6638 | 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, |
| 6639 | 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, |
| 6640 | 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, |
| 6641 | 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, |
| 6642 | 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, |
| 6643 | 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, |
| 6644 | 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, |
| 6645 | 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, |
| 6646 | 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, |
| 6647 | 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, |
| 6648 | 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, |
| 6649 | 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, |
| 6650 | 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, |
| 6651 | 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, |
| 6652 | 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, |
| 6653 | 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, |
| 6654 | 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0 }, |
| 6655 | .psize = 240, |
| 6656 | .digest = { 0x75, 0xd3, 0xc5, 0x24 }, |
| 6657 | .np = 2, |
| 6658 | .tap = { 31, 209 } |
| 6659 | }, |
| 6660 | }; |
| 6661 | |
| 6662 | /* |
Harald Welte | ebfd9bc | 2005-06-22 13:27:23 -0700 | [diff] [blame] | 6663 | * Cipher speed tests |
| 6664 | */ |
| 6665 | static struct cipher_speed aes_speed_template[] = { |
| 6666 | { .klen = 16, .blen = 16, }, |
| 6667 | { .klen = 16, .blen = 64, }, |
| 6668 | { .klen = 16, .blen = 256, }, |
| 6669 | { .klen = 16, .blen = 1024, }, |
| 6670 | { .klen = 16, .blen = 8192, }, |
| 6671 | { .klen = 24, .blen = 16, }, |
| 6672 | { .klen = 24, .blen = 64, }, |
| 6673 | { .klen = 24, .blen = 256, }, |
| 6674 | { .klen = 24, .blen = 1024, }, |
| 6675 | { .klen = 24, .blen = 8192, }, |
| 6676 | { .klen = 32, .blen = 16, }, |
| 6677 | { .klen = 32, .blen = 64, }, |
| 6678 | { .klen = 32, .blen = 256, }, |
| 6679 | { .klen = 32, .blen = 1024, }, |
| 6680 | { .klen = 32, .blen = 8192, }, |
| 6681 | |
| 6682 | /* End marker */ |
| 6683 | { .klen = 0, .blen = 0, } |
| 6684 | }; |
| 6685 | |
Rik Snel | f3d1044 | 2006-11-29 19:01:41 +1100 | [diff] [blame] | 6686 | static struct cipher_speed aes_lrw_speed_template[] = { |
| 6687 | { .klen = 32, .blen = 16, }, |
| 6688 | { .klen = 32, .blen = 64, }, |
| 6689 | { .klen = 32, .blen = 256, }, |
| 6690 | { .klen = 32, .blen = 1024, }, |
| 6691 | { .klen = 32, .blen = 8192, }, |
| 6692 | { .klen = 40, .blen = 16, }, |
| 6693 | { .klen = 40, .blen = 64, }, |
| 6694 | { .klen = 40, .blen = 256, }, |
| 6695 | { .klen = 40, .blen = 1024, }, |
| 6696 | { .klen = 40, .blen = 8192, }, |
| 6697 | { .klen = 48, .blen = 16, }, |
| 6698 | { .klen = 48, .blen = 64, }, |
| 6699 | { .klen = 48, .blen = 256, }, |
| 6700 | { .klen = 48, .blen = 1024, }, |
| 6701 | { .klen = 48, .blen = 8192, }, |
| 6702 | |
| 6703 | /* End marker */ |
| 6704 | { .klen = 0, .blen = 0, } |
| 6705 | }; |
| 6706 | |
Rik Snel | f19f511 | 2007-09-19 20:23:13 +0800 | [diff] [blame] | 6707 | static struct cipher_speed aes_xts_speed_template[] = { |
| 6708 | { .klen = 32, .blen = 16, }, |
| 6709 | { .klen = 32, .blen = 64, }, |
| 6710 | { .klen = 32, .blen = 256, }, |
| 6711 | { .klen = 32, .blen = 1024, }, |
| 6712 | { .klen = 32, .blen = 8192, }, |
| 6713 | { .klen = 48, .blen = 16, }, |
| 6714 | { .klen = 48, .blen = 64, }, |
| 6715 | { .klen = 48, .blen = 256, }, |
| 6716 | { .klen = 48, .blen = 1024, }, |
| 6717 | { .klen = 48, .blen = 8192, }, |
| 6718 | { .klen = 64, .blen = 16, }, |
| 6719 | { .klen = 64, .blen = 64, }, |
| 6720 | { .klen = 64, .blen = 256, }, |
| 6721 | { .klen = 64, .blen = 1024, }, |
| 6722 | { .klen = 64, .blen = 8192, }, |
| 6723 | |
| 6724 | /* End marker */ |
| 6725 | { .klen = 0, .blen = 0, } |
| 6726 | }; |
| 6727 | |
Harald Welte | ebfd9bc | 2005-06-22 13:27:23 -0700 | [diff] [blame] | 6728 | static struct cipher_speed des3_ede_speed_template[] = { |
| 6729 | { .klen = 24, .blen = 16, }, |
| 6730 | { .klen = 24, .blen = 64, }, |
| 6731 | { .klen = 24, .blen = 256, }, |
| 6732 | { .klen = 24, .blen = 1024, }, |
| 6733 | { .klen = 24, .blen = 8192, }, |
| 6734 | |
| 6735 | /* End marker */ |
| 6736 | { .klen = 0, .blen = 0, } |
| 6737 | }; |
| 6738 | |
| 6739 | static struct cipher_speed twofish_speed_template[] = { |
| 6740 | { .klen = 16, .blen = 16, }, |
| 6741 | { .klen = 16, .blen = 64, }, |
| 6742 | { .klen = 16, .blen = 256, }, |
| 6743 | { .klen = 16, .blen = 1024, }, |
| 6744 | { .klen = 16, .blen = 8192, }, |
| 6745 | { .klen = 24, .blen = 16, }, |
| 6746 | { .klen = 24, .blen = 64, }, |
| 6747 | { .klen = 24, .blen = 256, }, |
| 6748 | { .klen = 24, .blen = 1024, }, |
| 6749 | { .klen = 24, .blen = 8192, }, |
| 6750 | { .klen = 32, .blen = 16, }, |
| 6751 | { .klen = 32, .blen = 64, }, |
| 6752 | { .klen = 32, .blen = 256, }, |
| 6753 | { .klen = 32, .blen = 1024, }, |
| 6754 | { .klen = 32, .blen = 8192, }, |
| 6755 | |
| 6756 | /* End marker */ |
| 6757 | { .klen = 0, .blen = 0, } |
| 6758 | }; |
| 6759 | |
| 6760 | static struct cipher_speed blowfish_speed_template[] = { |
| 6761 | /* Don't support blowfish keys > 256 bit in this test */ |
| 6762 | { .klen = 8, .blen = 16, }, |
| 6763 | { .klen = 8, .blen = 64, }, |
| 6764 | { .klen = 8, .blen = 256, }, |
| 6765 | { .klen = 8, .blen = 1024, }, |
| 6766 | { .klen = 8, .blen = 8192, }, |
| 6767 | { .klen = 32, .blen = 16, }, |
| 6768 | { .klen = 32, .blen = 64, }, |
| 6769 | { .klen = 32, .blen = 256, }, |
| 6770 | { .klen = 32, .blen = 1024, }, |
| 6771 | { .klen = 32, .blen = 8192, }, |
| 6772 | |
| 6773 | /* End marker */ |
| 6774 | { .klen = 0, .blen = 0, } |
| 6775 | }; |
| 6776 | |
| 6777 | static struct cipher_speed des_speed_template[] = { |
| 6778 | { .klen = 8, .blen = 16, }, |
| 6779 | { .klen = 8, .blen = 64, }, |
| 6780 | { .klen = 8, .blen = 256, }, |
| 6781 | { .klen = 8, .blen = 1024, }, |
| 6782 | { .klen = 8, .blen = 8192, }, |
| 6783 | |
| 6784 | /* End marker */ |
| 6785 | { .klen = 0, .blen = 0, } |
| 6786 | }; |
| 6787 | |
Michal Ludvig | e805792 | 2006-05-30 22:04:19 +1000 | [diff] [blame] | 6788 | /* |
| 6789 | * Digest speed tests |
| 6790 | */ |
Herbert Xu | e9d4116 | 2006-08-19 21:38:49 +1000 | [diff] [blame] | 6791 | static struct hash_speed generic_hash_speed_template[] = { |
Michal Ludvig | e805792 | 2006-05-30 22:04:19 +1000 | [diff] [blame] | 6792 | { .blen = 16, .plen = 16, }, |
| 6793 | { .blen = 64, .plen = 16, }, |
| 6794 | { .blen = 64, .plen = 64, }, |
| 6795 | { .blen = 256, .plen = 16, }, |
| 6796 | { .blen = 256, .plen = 64, }, |
| 6797 | { .blen = 256, .plen = 256, }, |
| 6798 | { .blen = 1024, .plen = 16, }, |
| 6799 | { .blen = 1024, .plen = 256, }, |
| 6800 | { .blen = 1024, .plen = 1024, }, |
| 6801 | { .blen = 2048, .plen = 16, }, |
| 6802 | { .blen = 2048, .plen = 256, }, |
| 6803 | { .blen = 2048, .plen = 1024, }, |
| 6804 | { .blen = 2048, .plen = 2048, }, |
| 6805 | { .blen = 4096, .plen = 16, }, |
| 6806 | { .blen = 4096, .plen = 256, }, |
| 6807 | { .blen = 4096, .plen = 1024, }, |
| 6808 | { .blen = 4096, .plen = 4096, }, |
| 6809 | { .blen = 8192, .plen = 16, }, |
| 6810 | { .blen = 8192, .plen = 256, }, |
| 6811 | { .blen = 8192, .plen = 1024, }, |
| 6812 | { .blen = 8192, .plen = 4096, }, |
| 6813 | { .blen = 8192, .plen = 8192, }, |
| 6814 | |
| 6815 | /* End marker */ |
| 6816 | { .blen = 0, .plen = 0, } |
| 6817 | }; |
| 6818 | |
Noriaki TAKAMIYA | 02ab5a7 | 2007-01-24 21:48:19 +1100 | [diff] [blame] | 6819 | static struct cipher_speed camellia_speed_template[] = { |
| 6820 | { .klen = 16, .blen = 16, }, |
| 6821 | { .klen = 16, .blen = 64, }, |
| 6822 | { .klen = 16, .blen = 256, }, |
| 6823 | { .klen = 16, .blen = 1024, }, |
| 6824 | { .klen = 16, .blen = 8192, }, |
| 6825 | { .klen = 24, .blen = 16, }, |
| 6826 | { .klen = 24, .blen = 64, }, |
| 6827 | { .klen = 24, .blen = 256, }, |
| 6828 | { .klen = 24, .blen = 1024, }, |
| 6829 | { .klen = 24, .blen = 8192, }, |
| 6830 | { .klen = 32, .blen = 16, }, |
| 6831 | { .klen = 32, .blen = 64, }, |
| 6832 | { .klen = 32, .blen = 256, }, |
| 6833 | { .klen = 32, .blen = 1024, }, |
| 6834 | { .klen = 32, .blen = 8192, }, |
| 6835 | |
| 6836 | /* End marker */ |
| 6837 | { .klen = 0, .blen = 0, } |
| 6838 | }; |
| 6839 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6840 | #endif /* _CRYPTO_TCRYPT_H */ |