diff options
author | Rik Snel <rsnel@cube.dyndns.org> | 2006-11-29 03:01:41 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-06 21:38:58 -0500 |
commit | f3d1044cd0a9b427a25b2492f4d503d2dd54cfd7 (patch) | |
tree | f0dc06f9af35c01fa22c3f88dae4806caa522f10 /crypto/tcrypt.h | |
parent | 64470f1b8510699dc357a44004dc924bc139c917 (diff) |
[CRYPTO] tcrypt: LRW test vectors
Do modprobe tcrypt mode=10 to check the included test vectors, they are
from: http://grouper.ieee.org/groups/1619/email/pdf00017.pdf and from
http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html.
To make the last test vector fit, I had to increase the buffer size of
input and result to 512 bytes.
Signed-off-by: Rik Snel <rsnel@cube.dyndns.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.h')
-rw-r--r-- | crypto/tcrypt.h | 534 |
1 files changed, 530 insertions, 4 deletions
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h index 2d07e8af5c4b..48a81362cb85 100644 --- a/crypto/tcrypt.h +++ b/crypto/tcrypt.h | |||
@@ -39,15 +39,15 @@ struct hash_testvec { | |||
39 | struct cipher_testvec { | 39 | struct cipher_testvec { |
40 | char key[MAX_KEYLEN] __attribute__ ((__aligned__(4))); | 40 | char key[MAX_KEYLEN] __attribute__ ((__aligned__(4))); |
41 | char iv[MAX_IVLEN]; | 41 | char iv[MAX_IVLEN]; |
42 | char input[48]; | 42 | char input[512]; |
43 | char result[48]; | 43 | char result[512]; |
44 | unsigned char tap[MAX_TAP]; | 44 | unsigned char tap[MAX_TAP]; |
45 | int np; | 45 | int np; |
46 | unsigned char fail; | 46 | unsigned char fail; |
47 | unsigned char wk; /* weak key flag */ | 47 | unsigned char wk; /* weak key flag */ |
48 | unsigned char klen; | 48 | unsigned char klen; |
49 | unsigned char ilen; | 49 | unsigned short ilen; |
50 | unsigned char rlen; | 50 | unsigned short rlen; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | struct cipher_speed { | 53 | struct cipher_speed { |
@@ -1899,6 +1899,8 @@ static struct cipher_testvec cast6_dec_tv_template[] = { | |||
1899 | #define AES_DEC_TEST_VECTORS 3 | 1899 | #define AES_DEC_TEST_VECTORS 3 |
1900 | #define AES_CBC_ENC_TEST_VECTORS 2 | 1900 | #define AES_CBC_ENC_TEST_VECTORS 2 |
1901 | #define AES_CBC_DEC_TEST_VECTORS 2 | 1901 | #define AES_CBC_DEC_TEST_VECTORS 2 |
1902 | #define AES_LRW_ENC_TEST_VECTORS 8 | ||
1903 | #define AES_LRW_DEC_TEST_VECTORS 8 | ||
1902 | 1904 | ||
1903 | static struct cipher_testvec aes_enc_tv_template[] = { | 1905 | static struct cipher_testvec aes_enc_tv_template[] = { |
1904 | { /* From FIPS-197 */ | 1906 | { /* From FIPS-197 */ |
@@ -2036,6 +2038,509 @@ static struct cipher_testvec aes_cbc_dec_tv_template[] = { | |||
2036 | }, | 2038 | }, |
2037 | }; | 2039 | }; |
2038 | 2040 | ||
2041 | static struct cipher_testvec aes_lrw_enc_tv_template[] = { | ||
2042 | /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */ | ||
2043 | { /* LRW-32-AES 1 */ | ||
2044 | .key = { 0x45, 0x62, 0xac, 0x25, 0xf8, 0x28, 0x17, 0x6d, | ||
2045 | 0x4c, 0x26, 0x84, 0x14, 0xb5, 0x68, 0x01, 0x85, | ||
2046 | 0x25, 0x8e, 0x2a, 0x05, 0xe7, 0x3e, 0x9d, 0x03, | ||
2047 | 0xee, 0x5a, 0x83, 0x0c, 0xcc, 0x09, 0x4c, 0x87 }, | ||
2048 | .klen = 32, | ||
2049 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2050 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, | ||
2051 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2052 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2053 | .ilen = 16, | ||
2054 | .result = { 0xf1, 0xb2, 0x73, 0xcd, 0x65, 0xa3, 0xdf, 0x5f, | ||
2055 | 0xe9, 0x5d, 0x48, 0x92, 0x54, 0x63, 0x4e, 0xb8 }, | ||
2056 | .rlen = 16, | ||
2057 | }, { /* LRW-32-AES 2 */ | ||
2058 | .key = { 0x59, 0x70, 0x47, 0x14, 0xf5, 0x57, 0x47, 0x8c, | ||
2059 | 0xd7, 0x79, 0xe8, 0x0f, 0x54, 0x88, 0x79, 0x44, | ||
2060 | 0x0d, 0x48, 0xf0, 0xb7, 0xb1, 0x5a, 0x53, 0xea, | ||
2061 | 0x1c, 0xaa, 0x6b, 0x29, 0xc2, 0xca, 0xfb, 0xaf | ||
2062 | }, | ||
2063 | .klen = 32, | ||
2064 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2065 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }, | ||
2066 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2067 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2068 | .ilen = 16, | ||
2069 | .result = { 0x00, 0xc8, 0x2b, 0xae, 0x95, 0xbb, 0xcd, 0xe5, | ||
2070 | 0x27, 0x4f, 0x07, 0x69, 0xb2, 0x60, 0xe1, 0x36 }, | ||
2071 | .rlen = 16, | ||
2072 | }, { /* LRW-32-AES 3 */ | ||
2073 | .key = { 0xd8, 0x2a, 0x91, 0x34, 0xb2, 0x6a, 0x56, 0x50, | ||
2074 | 0x30, 0xfe, 0x69, 0xe2, 0x37, 0x7f, 0x98, 0x47, | ||
2075 | 0xcd, 0xf9, 0x0b, 0x16, 0x0c, 0x64, 0x8f, 0xb6, | ||
2076 | 0xb0, 0x0d, 0x0d, 0x1b, 0xae, 0x85, 0x87, 0x1f }, | ||
2077 | .klen = 32, | ||
2078 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2079 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, | ||
2080 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2081 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2082 | .ilen = 16, | ||
2083 | .result = { 0x76, 0x32, 0x21, 0x83, 0xed, 0x8f, 0xf1, 0x82, | ||
2084 | 0xf9, 0x59, 0x62, 0x03, 0x69, 0x0e, 0x5e, 0x01 }, | ||
2085 | .rlen = 16, | ||
2086 | }, { /* LRW-32-AES 4 */ | ||
2087 | .key = { 0x0f, 0x6a, 0xef, 0xf8, 0xd3, 0xd2, 0xbb, 0x15, | ||
2088 | 0x25, 0x83, 0xf7, 0x3c, 0x1f, 0x01, 0x28, 0x74, | ||
2089 | 0xca, 0xc6, 0xbc, 0x35, 0x4d, 0x4a, 0x65, 0x54, | ||
2090 | 0x90, 0xae, 0x61, 0xcf, 0x7b, 0xae, 0xbd, 0xcc, | ||
2091 | 0xad, 0xe4, 0x94, 0xc5, 0x4a, 0x29, 0xae, 0x70 }, | ||
2092 | .klen = 40, | ||
2093 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2094 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, | ||
2095 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2096 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2097 | .ilen = 16, | ||
2098 | .result = { 0x9c, 0x0f, 0x15, 0x2f, 0x55, 0xa2, 0xd8, 0xf0, | ||
2099 | 0xd6, 0x7b, 0x8f, 0x9e, 0x28, 0x22, 0xbc, 0x41 }, | ||
2100 | .rlen = 16, | ||
2101 | }, { /* LRW-32-AES 5 */ | ||
2102 | .key = { 0x8a, 0xd4, 0xee, 0x10, 0x2f, 0xbd, 0x81, 0xff, | ||
2103 | 0xf8, 0x86, 0xce, 0xac, 0x93, 0xc5, 0xad, 0xc6, | ||
2104 | 0xa0, 0x19, 0x07, 0xc0, 0x9d, 0xf7, 0xbb, 0xdd, | ||
2105 | 0x52, 0x13, 0xb2, 0xb7, 0xf0, 0xff, 0x11, 0xd8, | ||
2106 | 0xd6, 0x08, 0xd0, 0xcd, 0x2e, 0xb1, 0x17, 0x6f }, | ||
2107 | .klen = 40, | ||
2108 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2109 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, | ||
2110 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2111 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2112 | .ilen = 16, | ||
2113 | .result = { 0xd4, 0x27, 0x6a, 0x7f, 0x14, 0x91, 0x3d, 0x65, | ||
2114 | 0xc8, 0x60, 0x48, 0x02, 0x87, 0xe3, 0x34, 0x06 }, | ||
2115 | .rlen = 16, | ||
2116 | }, { /* LRW-32-AES 6 */ | ||
2117 | .key = { 0xf8, 0xd4, 0x76, 0xff, 0xd6, 0x46, 0xee, 0x6c, | ||
2118 | 0x23, 0x84, 0xcb, 0x1c, 0x77, 0xd6, 0x19, 0x5d, | ||
2119 | 0xfe, 0xf1, 0xa9, 0xf3, 0x7b, 0xbc, 0x8d, 0x21, | ||
2120 | 0xa7, 0x9c, 0x21, 0xf8, 0xcb, 0x90, 0x02, 0x89, | ||
2121 | 0xa8, 0x45, 0x34, 0x8e, 0xc8, 0xc5, 0xb5, 0xf1, | ||
2122 | 0x26, 0xf5, 0x0e, 0x76, 0xfe, 0xfd, 0x1b, 0x1e }, | ||
2123 | .klen = 48, | ||
2124 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2125 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, | ||
2126 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2127 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2128 | .ilen = 16, | ||
2129 | .result = { 0xbd, 0x06, 0xb8, 0xe1, 0xdb, 0x98, 0x89, 0x9e, | ||
2130 | 0xc4, 0x98, 0xe4, 0x91, 0xcf, 0x1c, 0x70, 0x2b }, | ||
2131 | .rlen = 16, | ||
2132 | }, { /* LRW-32-AES 7 */ | ||
2133 | .key = { 0xfb, 0x76, 0x15, 0xb2, 0x3d, 0x80, 0x89, 0x1d, | ||
2134 | 0xd4, 0x70, 0x98, 0x0b, 0xc7, 0x95, 0x84, 0xc8, | ||
2135 | 0xb2, 0xfb, 0x64, 0xce, 0x60, 0x97, 0x87, 0x8d, | ||
2136 | 0x17, 0xfc, 0xe4, 0x5a, 0x49, 0xe8, 0x30, 0xb7, | ||
2137 | 0x6e, 0x78, 0x17, 0xe7, 0x2d, 0x5e, 0x12, 0xd4, | ||
2138 | 0x60, 0x64, 0x04, 0x7a, 0xf1, 0x2f, 0x9e, 0x0c }, | ||
2139 | .klen = 48, | ||
2140 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2141 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, | ||
2142 | .input = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2143 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2144 | .ilen = 16, | ||
2145 | .result = { 0x5b, 0x90, 0x8e, 0xc1, 0xab, 0xdd, 0x67, 0x5f, | ||
2146 | 0x3d, 0x69, 0x8a, 0x95, 0x53, 0xc8, 0x9c, 0xe5 }, | ||
2147 | .rlen = 16, | ||
2148 | }, { | ||
2149 | /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */ | ||
2150 | .key = { 0xf8, 0xd4, 0x76, 0xff, 0xd6, 0x46, 0xee, 0x6c, | ||
2151 | 0x23, 0x84, 0xcb, 0x1c, 0x77, 0xd6, 0x19, 0x5d, | ||
2152 | 0xfe, 0xf1, 0xa9, 0xf3, 0x7b, 0xbc, 0x8d, 0x21, | ||
2153 | 0xa7, 0x9c, 0x21, 0xf8, 0xcb, 0x90, 0x02, 0x89, | ||
2154 | 0xa8, 0x45, 0x34, 0x8e, 0xc8, 0xc5, 0xb5, 0xf1, | ||
2155 | 0x26, 0xf5, 0x0e, 0x76, 0xfe, 0xfd, 0x1b, 0x1e }, | ||
2156 | .klen = 48, | ||
2157 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2158 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, | ||
2159 | .input = { 0x05, 0x11, 0xb7, 0x18, 0xab, 0xc6, 0x2d, 0xac, | ||
2160 | 0x70, 0x5d, 0xf6, 0x22, 0x94, 0xcd, 0xe5, 0x6c, | ||
2161 | 0x17, 0x6b, 0xf6, 0x1c, 0xf0, 0xf3, 0x6e, 0xf8, | ||
2162 | 0x50, 0x38, 0x1f, 0x71, 0x49, 0xb6, 0x57, 0xd6, | ||
2163 | 0x8f, 0xcb, 0x8d, 0x6b, 0xe3, 0xa6, 0x29, 0x90, | ||
2164 | 0xfe, 0x2a, 0x62, 0x82, 0xae, 0x6d, 0x8b, 0xf6, | ||
2165 | 0xad, 0x1e, 0x9e, 0x20, 0x5f, 0x38, 0xbe, 0x04, | ||
2166 | 0xda, 0x10, 0x8e, 0xed, 0xa2, 0xa4, 0x87, 0xab, | ||
2167 | 0xda, 0x6b, 0xb4, 0x0c, 0x75, 0xba, 0xd3, 0x7c, | ||
2168 | 0xc9, 0xac, 0x42, 0x31, 0x95, 0x7c, 0xc9, 0x04, | ||
2169 | 0xeb, 0xd5, 0x6e, 0x32, 0x69, 0x8a, 0xdb, 0xa6, | ||
2170 | 0x15, 0xd7, 0x3f, 0x4f, 0x2f, 0x66, 0x69, 0x03, | ||
2171 | 0x9c, 0x1f, 0x54, 0x0f, 0xde, 0x1f, 0xf3, 0x65, | ||
2172 | 0x4c, 0x96, 0x12, 0xed, 0x7c, 0x92, 0x03, 0x01, | ||
2173 | 0x6f, 0xbc, 0x35, 0x93, 0xac, 0xf1, 0x27, 0xf1, | ||
2174 | 0xb4, 0x96, 0x82, 0x5a, 0x5f, 0xb0, 0xa0, 0x50, | ||
2175 | 0x89, 0xa4, 0x8e, 0x66, 0x44, 0x85, 0xcc, 0xfd, | ||
2176 | 0x33, 0x14, 0x70, 0xe3, 0x96, 0xb2, 0xc3, 0xd3, | ||
2177 | 0xbb, 0x54, 0x5a, 0x1a, 0xf9, 0x74, 0xa2, 0xc5, | ||
2178 | 0x2d, 0x64, 0x75, 0xdd, 0xb4, 0x54, 0xe6, 0x74, | ||
2179 | 0x8c, 0xd3, 0x9d, 0x9e, 0x86, 0xab, 0x51, 0x53, | ||
2180 | 0xb7, 0x93, 0x3e, 0x6f, 0xd0, 0x4e, 0x2c, 0x40, | ||
2181 | 0xf6, 0xa8, 0x2e, 0x3e, 0x9d, 0xf4, 0x66, 0xa5, | ||
2182 | 0x76, 0x12, 0x73, 0x44, 0x1a, 0x56, 0xd7, 0x72, | ||
2183 | 0x88, 0xcd, 0x21, 0x8c, 0x4c, 0x0f, 0xfe, 0xda, | ||
2184 | 0x95, 0xe0, 0x3a, 0xa6, 0xa5, 0x84, 0x46, 0xcd, | ||
2185 | 0xd5, 0x3e, 0x9d, 0x3a, 0xe2, 0x67, 0xe6, 0x60, | ||
2186 | 0x1a, 0xe2, 0x70, 0x85, 0x58, 0xc2, 0x1b, 0x09, | ||
2187 | 0xe1, 0xd7, 0x2c, 0xca, 0xad, 0xa8, 0x8f, 0xf9, | ||
2188 | 0xac, 0xb3, 0x0e, 0xdb, 0xca, 0x2e, 0xe2, 0xb8, | ||
2189 | 0x51, 0x71, 0xd9, 0x3c, 0x6c, 0xf1, 0x56, 0xf8, | ||
2190 | 0xea, 0x9c, 0xf1, 0xfb, 0x0c, 0xe6, 0xb7, 0x10, | ||
2191 | 0x1c, 0xf8, 0xa9, 0x7c, 0xe8, 0x53, 0x35, 0xc1, | ||
2192 | 0x90, 0x3e, 0x76, 0x4a, 0x74, 0xa4, 0x21, 0x2c, | ||
2193 | 0xf6, 0x2c, 0x4e, 0x0f, 0x94, 0x3a, 0x88, 0x2e, | ||
2194 | 0x41, 0x09, 0x6a, 0x33, 0x7d, 0xf6, 0xdd, 0x3f, | ||
2195 | 0x8d, 0x23, 0x31, 0x74, 0x84, 0xeb, 0x88, 0x6e, | ||
2196 | 0xcc, 0xb9, 0xbc, 0x22, 0x83, 0x19, 0x07, 0x22, | ||
2197 | 0xa5, 0x2d, 0xdf, 0xa5, 0xf3, 0x80, 0x85, 0x78, | ||
2198 | 0x84, 0x39, 0x6a, 0x6d, 0x6a, 0x99, 0x4f, 0xa5, | ||
2199 | 0x15, 0xfe, 0x46, 0xb0, 0xe4, 0x6c, 0xa5, 0x41, | ||
2200 | 0x3c, 0xce, 0x8f, 0x42, 0x60, 0x71, 0xa7, 0x75, | ||
2201 | 0x08, 0x40, 0x65, 0x8a, 0x82, 0xbf, 0xf5, 0x43, | ||
2202 | 0x71, 0x96, 0xa9, 0x4d, 0x44, 0x8a, 0x20, 0xbe, | ||
2203 | 0xfa, 0x4d, 0xbb, 0xc0, 0x7d, 0x31, 0x96, 0x65, | ||
2204 | 0xe7, 0x75, 0xe5, 0x3e, 0xfd, 0x92, 0x3b, 0xc9, | ||
2205 | 0x55, 0xbb, 0x16, 0x7e, 0xf7, 0xc2, 0x8c, 0xa4, | ||
2206 | 0x40, 0x1d, 0xe5, 0xef, 0x0e, 0xdf, 0xe4, 0x9a, | ||
2207 | 0x62, 0x73, 0x65, 0xfd, 0x46, 0x63, 0x25, 0x3d, | ||
2208 | 0x2b, 0xaf, 0xe5, 0x64, 0xfe, 0xa5, 0x5c, 0xcf, | ||
2209 | 0x24, 0xf3, 0xb4, 0xac, 0x64, 0xba, 0xdf, 0x4b, | ||
2210 | 0xc6, 0x96, 0x7d, 0x81, 0x2d, 0x8d, 0x97, 0xf7, | ||
2211 | 0xc5, 0x68, 0x77, 0x84, 0x32, 0x2b, 0xcc, 0x85, | ||
2212 | 0x74, 0x96, 0xf0, 0x12, 0x77, 0x61, 0xb9, 0xeb, | ||
2213 | 0x71, 0xaa, 0x82, 0xcb, 0x1c, 0xdb, 0x89, 0xc8, | ||
2214 | 0xc6, 0xb5, 0xe3, 0x5c, 0x7d, 0x39, 0x07, 0x24, | ||
2215 | 0xda, 0x39, 0x87, 0x45, 0xc0, 0x2b, 0xbb, 0x01, | ||
2216 | 0xac, 0xbc, 0x2a, 0x5c, 0x7f, 0xfc, 0xe8, 0xce, | ||
2217 | 0x6d, 0x9c, 0x6f, 0xed, 0xd3, 0xc1, 0xa1, 0xd6, | ||
2218 | 0xc5, 0x55, 0xa9, 0x66, 0x2f, 0xe1, 0xc8, 0x32, | ||
2219 | 0xa6, 0x5d, 0xa4, 0x3a, 0x98, 0x73, 0xe8, 0x45, | ||
2220 | 0xa4, 0xc7, 0xa8, 0xb4, 0xf6, 0x13, 0x03, 0xf6, | ||
2221 | 0xe9, 0x2e, 0xc4, 0x29, 0x0f, 0x84, 0xdb, 0xc4, | ||
2222 | 0x21, 0xc4, 0xc2, 0x75, 0x67, 0x89, 0x37, 0x0a }, | ||
2223 | .ilen = 512, | ||
2224 | .result = { 0x1a, 0x1d, 0xa9, 0x30, 0xad, 0xf9, 0x2f, 0x9b, | ||
2225 | 0xb6, 0x1d, 0xae, 0xef, 0xf0, 0x2f, 0xf8, 0x5a, | ||
2226 | 0x39, 0x3c, 0xbf, 0x2a, 0xb2, 0x45, 0xb2, 0x23, | ||
2227 | 0x1b, 0x63, 0x3c, 0xcf, 0xaa, 0xbe, 0xcf, 0x4e, | ||
2228 | 0xfa, 0xe8, 0x29, 0xc2, 0x20, 0x68, 0x2b, 0x3c, | ||
2229 | 0x2e, 0x8b, 0xf7, 0x6e, 0x25, 0xbd, 0xe3, 0x3d, | ||
2230 | 0x66, 0x27, 0xd6, 0xaf, 0xd6, 0x64, 0x3e, 0xe3, | ||
2231 | 0xe8, 0x58, 0x46, 0x97, 0x39, 0x51, 0x07, 0xde, | ||
2232 | 0xcb, 0x37, 0xbc, 0xa9, 0xc0, 0x5f, 0x75, 0xc3, | ||
2233 | 0x0e, 0x84, 0x23, 0x1d, 0x16, 0xd4, 0x1c, 0x59, | ||
2234 | 0x9c, 0x1a, 0x02, 0x55, 0xab, 0x3a, 0x97, 0x1d, | ||
2235 | 0xdf, 0xdd, 0xc7, 0x06, 0x51, 0xd7, 0x70, 0xae, | ||
2236 | 0x23, 0xc6, 0x8c, 0xf5, 0x1e, 0xa0, 0xe5, 0x82, | ||
2237 | 0xb8, 0xb2, 0xbf, 0x04, 0xa0, 0x32, 0x8e, 0x68, | ||
2238 | 0xeb, 0xaf, 0x6e, 0x2d, 0x94, 0x22, 0x2f, 0xce, | ||
2239 | 0x4c, 0xb5, 0x59, 0xe2, 0xa2, 0x2f, 0xa0, 0x98, | ||
2240 | 0x1a, 0x97, 0xc6, 0xd4, 0xb5, 0x00, 0x59, 0xf2, | ||
2241 | 0x84, 0x14, 0x72, 0xb1, 0x9a, 0x6e, 0xa3, 0x7f, | ||
2242 | 0xea, 0x20, 0xe7, 0xcb, 0x65, 0x77, 0x3a, 0xdf, | ||
2243 | 0xc8, 0x97, 0x67, 0x15, 0xc2, 0x2a, 0x27, 0xcc, | ||
2244 | 0x18, 0x55, 0xa1, 0x24, 0x0b, 0x24, 0x24, 0xaf, | ||
2245 | 0x5b, 0xec, 0x68, 0xb8, 0xc8, 0xf5, 0xba, 0x63, | ||
2246 | 0xff, 0xed, 0x89, 0xce, 0xd5, 0x3d, 0x88, 0xf3, | ||
2247 | 0x25, 0xef, 0x05, 0x7c, 0x3a, 0xef, 0xeb, 0xd8, | ||
2248 | 0x7a, 0x32, 0x0d, 0xd1, 0x1e, 0x58, 0x59, 0x99, | ||
2249 | 0x90, 0x25, 0xb5, 0x26, 0xb0, 0xe3, 0x2b, 0x6c, | ||
2250 | 0x4c, 0xa9, 0x8b, 0x84, 0x4f, 0x5e, 0x01, 0x50, | ||
2251 | 0x41, 0x30, 0x58, 0xc5, 0x62, 0x74, 0x52, 0x1d, | ||
2252 | 0x45, 0x24, 0x6a, 0x42, 0x64, 0x4f, 0x97, 0x1c, | ||
2253 | 0xa8, 0x66, 0xb5, 0x6d, 0x79, 0xd4, 0x0d, 0x48, | ||
2254 | 0xc5, 0x5f, 0xf3, 0x90, 0x32, 0xdd, 0xdd, 0xe1, | ||
2255 | 0xe4, 0xa9, 0x9f, 0xfc, 0xc3, 0x52, 0x5a, 0x46, | ||
2256 | 0xe4, 0x81, 0x84, 0x95, 0x36, 0x59, 0x7a, 0x6b, | ||
2257 | 0xaa, 0xb3, 0x60, 0xad, 0xce, 0x9f, 0x9f, 0x28, | ||
2258 | 0xe0, 0x01, 0x75, 0x22, 0xc4, 0x4e, 0xa9, 0x62, | ||
2259 | 0x5c, 0x62, 0x0d, 0x00, 0xcb, 0x13, 0xe8, 0x43, | ||
2260 | 0x72, 0xd4, 0x2d, 0x53, 0x46, 0xb5, 0xd1, 0x16, | ||
2261 | 0x22, 0x18, 0xdf, 0x34, 0x33, 0xf5, 0xd6, 0x1c, | ||
2262 | 0xb8, 0x79, 0x78, 0x97, 0x94, 0xff, 0x72, 0x13, | ||
2263 | 0x4c, 0x27, 0xfc, 0xcb, 0xbf, 0x01, 0x53, 0xa6, | ||
2264 | 0xb4, 0x50, 0x6e, 0xde, 0xdf, 0xb5, 0x43, 0xa4, | ||
2265 | 0x59, 0xdf, 0x52, 0xf9, 0x7c, 0xe0, 0x11, 0x6f, | ||
2266 | 0x2d, 0x14, 0x8e, 0x24, 0x61, 0x2c, 0xe1, 0x17, | ||
2267 | 0xcc, 0xce, 0x51, 0x0c, 0x19, 0x8a, 0x82, 0x30, | ||
2268 | 0x94, 0xd5, 0x3d, 0x6a, 0x53, 0x06, 0x5e, 0xbd, | ||
2269 | 0xb7, 0xeb, 0xfa, 0xfd, 0x27, 0x51, 0xde, 0x85, | ||
2270 | 0x1e, 0x86, 0x53, 0x11, 0x53, 0x94, 0x00, 0xee, | ||
2271 | 0x2b, 0x8c, 0x08, 0x2a, 0xbf, 0xdd, 0xae, 0x11, | ||
2272 | 0xcb, 0x1e, 0xa2, 0x07, 0x9a, 0x80, 0xcf, 0x62, | ||
2273 | 0x9b, 0x09, 0xdc, 0x95, 0x3c, 0x96, 0x8e, 0xb1, | ||
2274 | 0x09, 0xbd, 0xe4, 0xeb, 0xdb, 0xca, 0x70, 0x7a, | ||
2275 | 0x9e, 0xfa, 0x31, 0x18, 0x45, 0x3c, 0x21, 0x33, | ||
2276 | 0xb0, 0xb3, 0x2b, 0xea, 0xf3, 0x71, 0x2d, 0xe1, | ||
2277 | 0x03, 0xad, 0x1b, 0x48, 0xd4, 0x67, 0x27, 0xf0, | ||
2278 | 0x62, 0xe4, 0x3d, 0xfb, 0x9b, 0x08, 0x76, 0xe7, | ||
2279 | 0xdd, 0x2b, 0x01, 0x39, 0x04, 0x5a, 0x58, 0x7a, | ||
2280 | 0xf7, 0x11, 0x90, 0xec, 0xbd, 0x51, 0x5c, 0x32, | ||
2281 | 0x6b, 0xd7, 0x35, 0x39, 0x02, 0x6b, 0xf2, 0xa6, | ||
2282 | 0xd0, 0x0d, 0x07, 0xe1, 0x06, 0xc4, 0x5b, 0x7d, | ||
2283 | 0xe4, 0x6a, 0xd7, 0xee, 0x15, 0x1f, 0x83, 0xb4, | ||
2284 | 0xa3, 0xa7, 0x5e, 0xc3, 0x90, 0xb7, 0xef, 0xd3, | ||
2285 | 0xb7, 0x4f, 0xf8, 0x92, 0x4c, 0xb7, 0x3c, 0x29, | ||
2286 | 0xcd, 0x7e, 0x2b, 0x5d, 0x43, 0xea, 0x42, 0xe7, | ||
2287 | 0x74, 0x3f, 0x7d, 0x58, 0x88, 0x75, 0xde, 0x3e }, | ||
2288 | .rlen = 512, | ||
2289 | } | ||
2290 | }; | ||
2291 | |||
2292 | static struct cipher_testvec aes_lrw_dec_tv_template[] = { | ||
2293 | /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */ | ||
2294 | /* same as enc vectors with input and result reversed */ | ||
2295 | { /* LRW-32-AES 1 */ | ||
2296 | .key = { 0x45, 0x62, 0xac, 0x25, 0xf8, 0x28, 0x17, 0x6d, | ||
2297 | 0x4c, 0x26, 0x84, 0x14, 0xb5, 0x68, 0x01, 0x85, | ||
2298 | 0x25, 0x8e, 0x2a, 0x05, 0xe7, 0x3e, 0x9d, 0x03, | ||
2299 | 0xee, 0x5a, 0x83, 0x0c, 0xcc, 0x09, 0x4c, 0x87 }, | ||
2300 | .klen = 32, | ||
2301 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2302 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, | ||
2303 | .input = { 0xf1, 0xb2, 0x73, 0xcd, 0x65, 0xa3, 0xdf, 0x5f, | ||
2304 | 0xe9, 0x5d, 0x48, 0x92, 0x54, 0x63, 0x4e, 0xb8 }, | ||
2305 | .ilen = 16, | ||
2306 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2307 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2308 | .rlen = 16, | ||
2309 | }, { /* LRW-32-AES 2 */ | ||
2310 | .key = { 0x59, 0x70, 0x47, 0x14, 0xf5, 0x57, 0x47, 0x8c, | ||
2311 | 0xd7, 0x79, 0xe8, 0x0f, 0x54, 0x88, 0x79, 0x44, | ||
2312 | 0x0d, 0x48, 0xf0, 0xb7, 0xb1, 0x5a, 0x53, 0xea, | ||
2313 | 0x1c, 0xaa, 0x6b, 0x29, 0xc2, 0xca, 0xfb, 0xaf | ||
2314 | }, | ||
2315 | .klen = 32, | ||
2316 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2317 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }, | ||
2318 | .input = { 0x00, 0xc8, 0x2b, 0xae, 0x95, 0xbb, 0xcd, 0xe5, | ||
2319 | 0x27, 0x4f, 0x07, 0x69, 0xb2, 0x60, 0xe1, 0x36 }, | ||
2320 | .ilen = 16, | ||
2321 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2322 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2323 | .rlen = 16, | ||
2324 | }, { /* LRW-32-AES 3 */ | ||
2325 | .key = { 0xd8, 0x2a, 0x91, 0x34, 0xb2, 0x6a, 0x56, 0x50, | ||
2326 | 0x30, 0xfe, 0x69, 0xe2, 0x37, 0x7f, 0x98, 0x47, | ||
2327 | 0xcd, 0xf9, 0x0b, 0x16, 0x0c, 0x64, 0x8f, 0xb6, | ||
2328 | 0xb0, 0x0d, 0x0d, 0x1b, 0xae, 0x85, 0x87, 0x1f }, | ||
2329 | .klen = 32, | ||
2330 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2331 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, | ||
2332 | .input = { 0x76, 0x32, 0x21, 0x83, 0xed, 0x8f, 0xf1, 0x82, | ||
2333 | 0xf9, 0x59, 0x62, 0x03, 0x69, 0x0e, 0x5e, 0x01 }, | ||
2334 | .ilen = 16, | ||
2335 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2336 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2337 | .rlen = 16, | ||
2338 | }, { /* LRW-32-AES 4 */ | ||
2339 | .key = { 0x0f, 0x6a, 0xef, 0xf8, 0xd3, 0xd2, 0xbb, 0x15, | ||
2340 | 0x25, 0x83, 0xf7, 0x3c, 0x1f, 0x01, 0x28, 0x74, | ||
2341 | 0xca, 0xc6, 0xbc, 0x35, 0x4d, 0x4a, 0x65, 0x54, | ||
2342 | 0x90, 0xae, 0x61, 0xcf, 0x7b, 0xae, 0xbd, 0xcc, | ||
2343 | 0xad, 0xe4, 0x94, 0xc5, 0x4a, 0x29, 0xae, 0x70 }, | ||
2344 | .klen = 40, | ||
2345 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2346 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, | ||
2347 | .input = { 0x9c, 0x0f, 0x15, 0x2f, 0x55, 0xa2, 0xd8, 0xf0, | ||
2348 | 0xd6, 0x7b, 0x8f, 0x9e, 0x28, 0x22, 0xbc, 0x41 }, | ||
2349 | .ilen = 16, | ||
2350 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2351 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2352 | .rlen = 16, | ||
2353 | }, { /* LRW-32-AES 5 */ | ||
2354 | .key = { 0x8a, 0xd4, 0xee, 0x10, 0x2f, 0xbd, 0x81, 0xff, | ||
2355 | 0xf8, 0x86, 0xce, 0xac, 0x93, 0xc5, 0xad, 0xc6, | ||
2356 | 0xa0, 0x19, 0x07, 0xc0, 0x9d, 0xf7, 0xbb, 0xdd, | ||
2357 | 0x52, 0x13, 0xb2, 0xb7, 0xf0, 0xff, 0x11, 0xd8, | ||
2358 | 0xd6, 0x08, 0xd0, 0xcd, 0x2e, 0xb1, 0x17, 0x6f }, | ||
2359 | .klen = 40, | ||
2360 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2361 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, | ||
2362 | .input = { 0xd4, 0x27, 0x6a, 0x7f, 0x14, 0x91, 0x3d, 0x65, | ||
2363 | 0xc8, 0x60, 0x48, 0x02, 0x87, 0xe3, 0x34, 0x06 }, | ||
2364 | .ilen = 16, | ||
2365 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2366 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2367 | .rlen = 16, | ||
2368 | }, { /* LRW-32-AES 6 */ | ||
2369 | .key = { 0xf8, 0xd4, 0x76, 0xff, 0xd6, 0x46, 0xee, 0x6c, | ||
2370 | 0x23, 0x84, 0xcb, 0x1c, 0x77, 0xd6, 0x19, 0x5d, | ||
2371 | 0xfe, 0xf1, 0xa9, 0xf3, 0x7b, 0xbc, 0x8d, 0x21, | ||
2372 | 0xa7, 0x9c, 0x21, 0xf8, 0xcb, 0x90, 0x02, 0x89, | ||
2373 | 0xa8, 0x45, 0x34, 0x8e, 0xc8, 0xc5, 0xb5, 0xf1, | ||
2374 | 0x26, 0xf5, 0x0e, 0x76, 0xfe, 0xfd, 0x1b, 0x1e }, | ||
2375 | .klen = 48, | ||
2376 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2377 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, | ||
2378 | .input = { 0xbd, 0x06, 0xb8, 0xe1, 0xdb, 0x98, 0x89, 0x9e, | ||
2379 | 0xc4, 0x98, 0xe4, 0x91, 0xcf, 0x1c, 0x70, 0x2b }, | ||
2380 | .ilen = 16, | ||
2381 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2382 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2383 | .rlen = 16, | ||
2384 | }, { /* LRW-32-AES 7 */ | ||
2385 | .key = { 0xfb, 0x76, 0x15, 0xb2, 0x3d, 0x80, 0x89, 0x1d, | ||
2386 | 0xd4, 0x70, 0x98, 0x0b, 0xc7, 0x95, 0x84, 0xc8, | ||
2387 | 0xb2, 0xfb, 0x64, 0xce, 0x60, 0x97, 0x87, 0x8d, | ||
2388 | 0x17, 0xfc, 0xe4, 0x5a, 0x49, 0xe8, 0x30, 0xb7, | ||
2389 | 0x6e, 0x78, 0x17, 0xe7, 0x2d, 0x5e, 0x12, 0xd4, | ||
2390 | 0x60, 0x64, 0x04, 0x7a, 0xf1, 0x2f, 0x9e, 0x0c }, | ||
2391 | .klen = 48, | ||
2392 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2393 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 }, | ||
2394 | .input = { 0x5b, 0x90, 0x8e, 0xc1, 0xab, 0xdd, 0x67, 0x5f, | ||
2395 | 0x3d, 0x69, 0x8a, 0x95, 0x53, 0xc8, 0x9c, 0xe5 }, | ||
2396 | .ilen = 16, | ||
2397 | .result = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, | ||
2398 | 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }, | ||
2399 | .rlen = 16, | ||
2400 | }, { | ||
2401 | /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */ | ||
2402 | .key = { 0xf8, 0xd4, 0x76, 0xff, 0xd6, 0x46, 0xee, 0x6c, | ||
2403 | 0x23, 0x84, 0xcb, 0x1c, 0x77, 0xd6, 0x19, 0x5d, | ||
2404 | 0xfe, 0xf1, 0xa9, 0xf3, 0x7b, 0xbc, 0x8d, 0x21, | ||
2405 | 0xa7, 0x9c, 0x21, 0xf8, 0xcb, 0x90, 0x02, 0x89, | ||
2406 | 0xa8, 0x45, 0x34, 0x8e, 0xc8, 0xc5, 0xb5, 0xf1, | ||
2407 | 0x26, 0xf5, 0x0e, 0x76, 0xfe, 0xfd, 0x1b, 0x1e }, | ||
2408 | .klen = 48, | ||
2409 | .iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2410 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, | ||
2411 | .input = { 0x1a, 0x1d, 0xa9, 0x30, 0xad, 0xf9, 0x2f, 0x9b, | ||
2412 | 0xb6, 0x1d, 0xae, 0xef, 0xf0, 0x2f, 0xf8, 0x5a, | ||
2413 | 0x39, 0x3c, 0xbf, 0x2a, 0xb2, 0x45, 0xb2, 0x23, | ||
2414 | 0x1b, 0x63, 0x3c, 0xcf, 0xaa, 0xbe, 0xcf, 0x4e, | ||
2415 | 0xfa, 0xe8, 0x29, 0xc2, 0x20, 0x68, 0x2b, 0x3c, | ||
2416 | 0x2e, 0x8b, 0xf7, 0x6e, 0x25, 0xbd, 0xe3, 0x3d, | ||
2417 | 0x66, 0x27, 0xd6, 0xaf, 0xd6, 0x64, 0x3e, 0xe3, | ||
2418 | 0xe8, 0x58, 0x46, 0x97, 0x39, 0x51, 0x07, 0xde, | ||
2419 | 0xcb, 0x37, 0xbc, 0xa9, 0xc0, 0x5f, 0x75, 0xc3, | ||
2420 | 0x0e, 0x84, 0x23, 0x1d, 0x16, 0xd4, 0x1c, 0x59, | ||
2421 | 0x9c, 0x1a, 0x02, 0x55, 0xab, 0x3a, 0x97, 0x1d, | ||
2422 | 0xdf, 0xdd, 0xc7, 0x06, 0x51, 0xd7, 0x70, 0xae, | ||
2423 | 0x23, 0xc6, 0x8c, 0xf5, 0x1e, 0xa0, 0xe5, 0x82, | ||
2424 | 0xb8, 0xb2, 0xbf, 0x04, 0xa0, 0x32, 0x8e, 0x68, | ||
2425 | 0xeb, 0xaf, 0x6e, 0x2d, 0x94, 0x22, 0x2f, 0xce, | ||
2426 | 0x4c, 0xb5, 0x59, 0xe2, 0xa2, 0x2f, 0xa0, 0x98, | ||
2427 | 0x1a, 0x97, 0xc6, 0xd4, 0xb5, 0x00, 0x59, 0xf2, | ||
2428 | 0x84, 0x14, 0x72, 0xb1, 0x9a, 0x6e, 0xa3, 0x7f, | ||
2429 | 0xea, 0x20, 0xe7, 0xcb, 0x65, 0x77, 0x3a, 0xdf, | ||
2430 | 0xc8, 0x97, 0x67, 0x15, 0xc2, 0x2a, 0x27, 0xcc, | ||
2431 | 0x18, 0x55, 0xa1, 0x24, 0x0b, 0x24, 0x24, 0xaf, | ||
2432 | 0x5b, 0xec, 0x68, 0xb8, 0xc8, 0xf5, 0xba, 0x63, | ||
2433 | 0xff, 0xed, 0x89, 0xce, 0xd5, 0x3d, 0x88, 0xf3, | ||
2434 | 0x25, 0xef, 0x05, 0x7c, 0x3a, 0xef, 0xeb, 0xd8, | ||
2435 | 0x7a, 0x32, 0x0d, 0xd1, 0x1e, 0x58, 0x59, 0x99, | ||
2436 | 0x90, 0x25, 0xb5, 0x26, 0xb0, 0xe3, 0x2b, 0x6c, | ||
2437 | 0x4c, 0xa9, 0x8b, 0x84, 0x4f, 0x5e, 0x01, 0x50, | ||
2438 | 0x41, 0x30, 0x58, 0xc5, 0x62, 0x74, 0x52, 0x1d, | ||
2439 | 0x45, 0x24, 0x6a, 0x42, 0x64, 0x4f, 0x97, 0x1c, | ||
2440 | 0xa8, 0x66, 0xb5, 0x6d, 0x79, 0xd4, 0x0d, 0x48, | ||
2441 | 0xc5, 0x5f, 0xf3, 0x90, 0x32, 0xdd, 0xdd, 0xe1, | ||
2442 | 0xe4, 0xa9, 0x9f, 0xfc, 0xc3, 0x52, 0x5a, 0x46, | ||
2443 | 0xe4, 0x81, 0x84, 0x95, 0x36, 0x59, 0x7a, 0x6b, | ||
2444 | 0xaa, 0xb3, 0x60, 0xad, 0xce, 0x9f, 0x9f, 0x28, | ||
2445 | 0xe0, 0x01, 0x75, 0x22, 0xc4, 0x4e, 0xa9, 0x62, | ||
2446 | 0x5c, 0x62, 0x0d, 0x00, 0xcb, 0x13, 0xe8, 0x43, | ||
2447 | 0x72, 0xd4, 0x2d, 0x53, 0x46, 0xb5, 0xd1, 0x16, | ||
2448 | 0x22, 0x18, 0xdf, 0x34, 0x33, 0xf5, 0xd6, 0x1c, | ||
2449 | 0xb8, 0x79, 0x78, 0x97, 0x94, 0xff, 0x72, 0x13, | ||
2450 | 0x4c, 0x27, 0xfc, 0xcb, 0xbf, 0x01, 0x53, 0xa6, | ||
2451 | 0xb4, 0x50, 0x6e, 0xde, 0xdf, 0xb5, 0x43, 0xa4, | ||
2452 | 0x59, 0xdf, 0x52, 0xf9, 0x7c, 0xe0, 0x11, 0x6f, | ||
2453 | 0x2d, 0x14, 0x8e, 0x24, 0x61, 0x2c, 0xe1, 0x17, | ||
2454 | 0xcc, 0xce, 0x51, 0x0c, 0x19, 0x8a, 0x82, 0x30, | ||
2455 | 0x94, 0xd5, 0x3d, 0x6a, 0x53, 0x06, 0x5e, 0xbd, | ||
2456 | 0xb7, 0xeb, 0xfa, 0xfd, 0x27, 0x51, 0xde, 0x85, | ||
2457 | 0x1e, 0x86, 0x53, 0x11, 0x53, 0x94, 0x00, 0xee, | ||
2458 | 0x2b, 0x8c, 0x08, 0x2a, 0xbf, 0xdd, 0xae, 0x11, | ||
2459 | 0xcb, 0x1e, 0xa2, 0x07, 0x9a, 0x80, 0xcf, 0x62, | ||
2460 | 0x9b, 0x09, 0xdc, 0x95, 0x3c, 0x96, 0x8e, 0xb1, | ||
2461 | 0x09, 0xbd, 0xe4, 0xeb, 0xdb, 0xca, 0x70, 0x7a, | ||
2462 | 0x9e, 0xfa, 0x31, 0x18, 0x45, 0x3c, 0x21, 0x33, | ||
2463 | 0xb0, 0xb3, 0x2b, 0xea, 0xf3, 0x71, 0x2d, 0xe1, | ||
2464 | 0x03, 0xad, 0x1b, 0x48, 0xd4, 0x67, 0x27, 0xf0, | ||
2465 | 0x62, 0xe4, 0x3d, 0xfb, 0x9b, 0x08, 0x76, 0xe7, | ||
2466 | 0xdd, 0x2b, 0x01, 0x39, 0x04, 0x5a, 0x58, 0x7a, | ||
2467 | 0xf7, 0x11, 0x90, 0xec, 0xbd, 0x51, 0x5c, 0x32, | ||
2468 | 0x6b, 0xd7, 0x35, 0x39, 0x02, 0x6b, 0xf2, 0xa6, | ||
2469 | 0xd0, 0x0d, 0x07, 0xe1, 0x06, 0xc4, 0x5b, 0x7d, | ||
2470 | 0xe4, 0x6a, 0xd7, 0xee, 0x15, 0x1f, 0x83, 0xb4, | ||
2471 | 0xa3, 0xa7, 0x5e, 0xc3, 0x90, 0xb7, 0xef, 0xd3, | ||
2472 | 0xb7, 0x4f, 0xf8, 0x92, 0x4c, 0xb7, 0x3c, 0x29, | ||
2473 | 0xcd, 0x7e, 0x2b, 0x5d, 0x43, 0xea, 0x42, 0xe7, | ||
2474 | 0x74, 0x3f, 0x7d, 0x58, 0x88, 0x75, 0xde, 0x3e }, | ||
2475 | .ilen = 512, | ||
2476 | .result = { 0x05, 0x11, 0xb7, 0x18, 0xab, 0xc6, 0x2d, 0xac, | ||
2477 | 0x70, 0x5d, 0xf6, 0x22, 0x94, 0xcd, 0xe5, 0x6c, | ||
2478 | 0x17, 0x6b, 0xf6, 0x1c, 0xf0, 0xf3, 0x6e, 0xf8, | ||
2479 | 0x50, 0x38, 0x1f, 0x71, 0x49, 0xb6, 0x57, 0xd6, | ||
2480 | 0x8f, 0xcb, 0x8d, 0x6b, 0xe3, 0xa6, 0x29, 0x90, | ||
2481 | 0xfe, 0x2a, 0x62, 0x82, 0xae, 0x6d, 0x8b, 0xf6, | ||
2482 | 0xad, 0x1e, 0x9e, 0x20, 0x5f, 0x38, 0xbe, 0x04, | ||
2483 | 0xda, 0x10, 0x8e, 0xed, 0xa2, 0xa4, 0x87, 0xab, | ||
2484 | 0xda, 0x6b, 0xb4, 0x0c, 0x75, 0xba, 0xd3, 0x7c, | ||
2485 | 0xc9, 0xac, 0x42, 0x31, 0x95, 0x7c, 0xc9, 0x04, | ||
2486 | 0xeb, 0xd5, 0x6e, 0x32, 0x69, 0x8a, 0xdb, 0xa6, | ||
2487 | 0x15, 0xd7, 0x3f, 0x4f, 0x2f, 0x66, 0x69, 0x03, | ||
2488 | 0x9c, 0x1f, 0x54, 0x0f, 0xde, 0x1f, 0xf3, 0x65, | ||
2489 | 0x4c, 0x96, 0x12, 0xed, 0x7c, 0x92, 0x03, 0x01, | ||
2490 | 0x6f, 0xbc, 0x35, 0x93, 0xac, 0xf1, 0x27, 0xf1, | ||
2491 | 0xb4, 0x96, 0x82, 0x5a, 0x5f, 0xb0, 0xa0, 0x50, | ||
2492 | 0x89, 0xa4, 0x8e, 0x66, 0x44, 0x85, 0xcc, 0xfd, | ||
2493 | 0x33, 0x14, 0x70, 0xe3, 0x96, 0xb2, 0xc3, 0xd3, | ||
2494 | 0xbb, 0x54, 0x5a, 0x1a, 0xf9, 0x74, 0xa2, 0xc5, | ||
2495 | 0x2d, 0x64, 0x75, 0xdd, 0xb4, 0x54, 0xe6, 0x74, | ||
2496 | 0x8c, 0xd3, 0x9d, 0x9e, 0x86, 0xab, 0x51, 0x53, | ||
2497 | 0xb7, 0x93, 0x3e, 0x6f, 0xd0, 0x4e, 0x2c, 0x40, | ||
2498 | 0xf6, 0xa8, 0x2e, 0x3e, 0x9d, 0xf4, 0x66, 0xa5, | ||
2499 | 0x76, 0x12, 0x73, 0x44, 0x1a, 0x56, 0xd7, 0x72, | ||
2500 | 0x88, 0xcd, 0x21, 0x8c, 0x4c, 0x0f, 0xfe, 0xda, | ||
2501 | 0x95, 0xe0, 0x3a, 0xa6, 0xa5, 0x84, 0x46, 0xcd, | ||
2502 | 0xd5, 0x3e, 0x9d, 0x3a, 0xe2, 0x67, 0xe6, 0x60, | ||
2503 | 0x1a, 0xe2, 0x70, 0x85, 0x58, 0xc2, 0x1b, 0x09, | ||
2504 | 0xe1, 0xd7, 0x2c, 0xca, 0xad, 0xa8, 0x8f, 0xf9, | ||
2505 | 0xac, 0xb3, 0x0e, 0xdb, 0xca, 0x2e, 0xe2, 0xb8, | ||
2506 | 0x51, 0x71, 0xd9, 0x3c, 0x6c, 0xf1, 0x56, 0xf8, | ||
2507 | 0xea, 0x9c, 0xf1, 0xfb, 0x0c, 0xe6, 0xb7, 0x10, | ||
2508 | 0x1c, 0xf8, 0xa9, 0x7c, 0xe8, 0x53, 0x35, 0xc1, | ||
2509 | 0x90, 0x3e, 0x76, 0x4a, 0x74, 0xa4, 0x21, 0x2c, | ||
2510 | 0xf6, 0x2c, 0x4e, 0x0f, 0x94, 0x3a, 0x88, 0x2e, | ||
2511 | 0x41, 0x09, 0x6a, 0x33, 0x7d, 0xf6, 0xdd, 0x3f, | ||
2512 | 0x8d, 0x23, 0x31, 0x74, 0x84, 0xeb, 0x88, 0x6e, | ||
2513 | 0xcc, 0xb9, 0xbc, 0x22, 0x83, 0x19, 0x07, 0x22, | ||
2514 | 0xa5, 0x2d, 0xdf, 0xa5, 0xf3, 0x80, 0x85, 0x78, | ||
2515 | 0x84, 0x39, 0x6a, 0x6d, 0x6a, 0x99, 0x4f, 0xa5, | ||
2516 | 0x15, 0xfe, 0x46, 0xb0, 0xe4, 0x6c, 0xa5, 0x41, | ||
2517 | 0x3c, 0xce, 0x8f, 0x42, 0x60, 0x71, 0xa7, 0x75, | ||
2518 | 0x08, 0x40, 0x65, 0x8a, 0x82, 0xbf, 0xf5, 0x43, | ||
2519 | 0x71, 0x96, 0xa9, 0x4d, 0x44, 0x8a, 0x20, 0xbe, | ||
2520 | 0xfa, 0x4d, 0xbb, 0xc0, 0x7d, 0x31, 0x96, 0x65, | ||
2521 | 0xe7, 0x75, 0xe5, 0x3e, 0xfd, 0x92, 0x3b, 0xc9, | ||
2522 | 0x55, 0xbb, 0x16, 0x7e, 0xf7, 0xc2, 0x8c, 0xa4, | ||
2523 | 0x40, 0x1d, 0xe5, 0xef, 0x0e, 0xdf, 0xe4, 0x9a, | ||
2524 | 0x62, 0x73, 0x65, 0xfd, 0x46, 0x63, 0x25, 0x3d, | ||
2525 | 0x2b, 0xaf, 0xe5, 0x64, 0xfe, 0xa5, 0x5c, 0xcf, | ||
2526 | 0x24, 0xf3, 0xb4, 0xac, 0x64, 0xba, 0xdf, 0x4b, | ||
2527 | 0xc6, 0x96, 0x7d, 0x81, 0x2d, 0x8d, 0x97, 0xf7, | ||
2528 | 0xc5, 0x68, 0x77, 0x84, 0x32, 0x2b, 0xcc, 0x85, | ||
2529 | 0x74, 0x96, 0xf0, 0x12, 0x77, 0x61, 0xb9, 0xeb, | ||
2530 | 0x71, 0xaa, 0x82, 0xcb, 0x1c, 0xdb, 0x89, 0xc8, | ||
2531 | 0xc6, 0xb5, 0xe3, 0x5c, 0x7d, 0x39, 0x07, 0x24, | ||
2532 | 0xda, 0x39, 0x87, 0x45, 0xc0, 0x2b, 0xbb, 0x01, | ||
2533 | 0xac, 0xbc, 0x2a, 0x5c, 0x7f, 0xfc, 0xe8, 0xce, | ||
2534 | 0x6d, 0x9c, 0x6f, 0xed, 0xd3, 0xc1, 0xa1, 0xd6, | ||
2535 | 0xc5, 0x55, 0xa9, 0x66, 0x2f, 0xe1, 0xc8, 0x32, | ||
2536 | 0xa6, 0x5d, 0xa4, 0x3a, 0x98, 0x73, 0xe8, 0x45, | ||
2537 | 0xa4, 0xc7, 0xa8, 0xb4, 0xf6, 0x13, 0x03, 0xf6, | ||
2538 | 0xe9, 0x2e, 0xc4, 0x29, 0x0f, 0x84, 0xdb, 0xc4, | ||
2539 | 0x21, 0xc4, 0xc2, 0x75, 0x67, 0x89, 0x37, 0x0a }, | ||
2540 | .rlen = 512, | ||
2541 | } | ||
2542 | }; | ||
2543 | |||
2039 | /* Cast5 test vectors from RFC 2144 */ | 2544 | /* Cast5 test vectors from RFC 2144 */ |
2040 | #define CAST5_ENC_TEST_VECTORS 3 | 2545 | #define CAST5_ENC_TEST_VECTORS 3 |
2041 | #define CAST5_DEC_TEST_VECTORS 3 | 2546 | #define CAST5_DEC_TEST_VECTORS 3 |
@@ -3152,6 +3657,27 @@ static struct cipher_speed aes_speed_template[] = { | |||
3152 | { .klen = 0, .blen = 0, } | 3657 | { .klen = 0, .blen = 0, } |
3153 | }; | 3658 | }; |
3154 | 3659 | ||
3660 | static struct cipher_speed aes_lrw_speed_template[] = { | ||
3661 | { .klen = 32, .blen = 16, }, | ||
3662 | { .klen = 32, .blen = 64, }, | ||
3663 | { .klen = 32, .blen = 256, }, | ||
3664 | { .klen = 32, .blen = 1024, }, | ||
3665 | { .klen = 32, .blen = 8192, }, | ||
3666 | { .klen = 40, .blen = 16, }, | ||
3667 | { .klen = 40, .blen = 64, }, | ||
3668 | { .klen = 40, .blen = 256, }, | ||
3669 | { .klen = 40, .blen = 1024, }, | ||
3670 | { .klen = 40, .blen = 8192, }, | ||
3671 | { .klen = 48, .blen = 16, }, | ||
3672 | { .klen = 48, .blen = 64, }, | ||
3673 | { .klen = 48, .blen = 256, }, | ||
3674 | { .klen = 48, .blen = 1024, }, | ||
3675 | { .klen = 48, .blen = 8192, }, | ||
3676 | |||
3677 | /* End marker */ | ||
3678 | { .klen = 0, .blen = 0, } | ||
3679 | }; | ||
3680 | |||
3155 | static struct cipher_speed des3_ede_speed_template[] = { | 3681 | static struct cipher_speed des3_ede_speed_template[] = { |
3156 | { .klen = 24, .blen = 16, }, | 3682 | { .klen = 24, .blen = 16, }, |
3157 | { .klen = 24, .blen = 64, }, | 3683 | { .klen = 24, .blen = 64, }, |