|
| 1 | +From 030218dedee2628ea3f035d71431e1b7c4191cfb Mon Sep 17 00:00:00 2001 |
| 2 | +From: Aleksander Jan Bajkowski <olek2@wp.pl> |
| 3 | +Date: Sat, 31 Jan 2026 18:38:47 +0100 |
| 4 | +Subject: [PATCH] crypto: testmgr - Add test vectors for |
| 5 | + authenc(hmac(sha384),cbc(aes)) |
| 6 | + |
| 7 | +Test vectors were generated starting from existing CBC(AES) test vectors |
| 8 | +(RFC3602, NIST SP800-38A) and adding HMAC(SHA384) computed with Python |
| 9 | +script. Then, the results were double-checked on Mediatek MT7981 (safexcel) |
| 10 | +and NXP P2020 (talitos). Both platforms pass self-tests. |
| 11 | + |
| 12 | +Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> |
| 13 | +Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> |
| 14 | +--- |
| 15 | + crypto/testmgr.c | 7 ++ |
| 16 | + crypto/testmgr.h | 311 +++++++++++++++++++++++++++++++++++++++++++++++ |
| 17 | + 2 files changed, 318 insertions(+) |
| 18 | + |
| 19 | +--- a/crypto/testmgr.c |
| 20 | ++++ b/crypto/testmgr.c |
| 21 | +@@ -4453,6 +4453,13 @@ static const struct alg_test_desc alg_te |
| 22 | + .test = alg_test_null, |
| 23 | + .fips_allowed = 1, |
| 24 | + }, { |
| 25 | ++ .alg = "authenc(hmac(sha384),cbc(aes))", |
| 26 | ++ .generic_driver = "authenc(hmac-sha384-lib,cbc(aes-generic))", |
| 27 | ++ .test = alg_test_aead, |
| 28 | ++ .suite = { |
| 29 | ++ .aead = __VECS(hmac_sha384_aes_cbc_tv_temp) |
| 30 | ++ } |
| 31 | ++ }, { |
| 32 | + .alg = "authenc(hmac(sha384),cbc(des))", |
| 33 | + .test = alg_test_aead, |
| 34 | + .suite = { |
| 35 | +--- a/crypto/testmgr.h |
| 36 | ++++ b/crypto/testmgr.h |
| 37 | +@@ -17773,6 +17773,317 @@ static const struct aead_testvec hmac_sh |
| 38 | + }, |
| 39 | + }; |
| 40 | + |
| 41 | ++static const struct aead_testvec hmac_sha384_aes_cbc_tv_temp[] = { |
| 42 | ++ { /* RFC 3602 Case 1 */ |
| 43 | ++#ifdef __LITTLE_ENDIAN |
| 44 | ++ .key = "\x08\x00" /* rta length */ |
| 45 | ++ "\x01\x00" /* rta type */ |
| 46 | ++#else |
| 47 | ++ .key = "\x00\x08" /* rta length */ |
| 48 | ++ "\x00\x01" /* rta type */ |
| 49 | ++#endif |
| 50 | ++ "\x00\x00\x00\x10" /* enc key length */ |
| 51 | ++ "\x00\x00\x00\x00\x00\x00\x00\x00" |
| 52 | ++ "\x00\x00\x00\x00\x00\x00\x00\x00" |
| 53 | ++ "\x00\x00\x00\x00\x00\x00\x00\x00" |
| 54 | ++ "\x00\x00\x00\x00\x00\x00\x00\x00" |
| 55 | ++ "\x00\x00\x00\x00\x00\x00\x00\x00" |
| 56 | ++ "\x00\x00\x00\x00\x00\x00\x00\x00" |
| 57 | ++ "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" |
| 58 | ++ "\x51\x2e\x03\xd5\x34\x12\x00\x06", |
| 59 | ++ .klen = 8 + 48 + 16, |
| 60 | ++ .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30" |
| 61 | ++ "\xb4\x22\xda\x80\x2c\x9f\xac\x41", |
| 62 | ++ .assoc = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30" |
| 63 | ++ "\xb4\x22\xda\x80\x2c\x9f\xac\x41", |
| 64 | ++ .alen = 16, |
| 65 | ++ .ptext = "Single block msg", |
| 66 | ++ .plen = 16, |
| 67 | ++ .ctext = "\xe3\x53\x77\x9c\x10\x79\xae\xb8" |
| 68 | ++ "\x27\x08\x94\x2d\xbe\x77\x18\x1a" |
| 69 | ++ "\x79\x1c\xf1\x22\x95\x80\xe0\x60" |
| 70 | ++ "\x7f\xf9\x92\x60\x83\xbd\x60\x9c" |
| 71 | ++ "\xf6\x62\x8b\xa9\x7d\x56\xe2\xaf" |
| 72 | ++ "\x80\x43\xbc\x41\x4a\x63\x0b\xa0" |
| 73 | ++ "\x16\x25\xe2\xfe\x0a\x96\xf6\xa5" |
| 74 | ++ "\x6c\x0b\xc2\x53\xb4\x27\xd9\x42", |
| 75 | ++ .clen = 16 + 48, |
| 76 | ++ }, { /* RFC 3602 Case 2 */ |
| 77 | ++#ifdef __LITTLE_ENDIAN |
| 78 | ++ .key = "\x08\x00" /* rta length */ |
| 79 | ++ "\x01\x00" /* rta type */ |
| 80 | ++#else |
| 81 | ++ .key = "\x00\x08" /* rta length */ |
| 82 | ++ "\x00\x01" /* rta type */ |
| 83 | ++#endif |
| 84 | ++ "\x00\x00\x00\x10" /* enc key length */ |
| 85 | ++ "\x20\x21\x22\x23\x24\x25\x26\x27" |
| 86 | ++ "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" |
| 87 | ++ "\x30\x31\x32\x33\x34\x35\x36\x37" |
| 88 | ++ "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" |
| 89 | ++ "\x40\x41\x42\x43\x44\x45\x46\x47" |
| 90 | ++ "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f" |
| 91 | ++ "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0" |
| 92 | ++ "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a", |
| 93 | ++ .klen = 8 + 48 + 16, |
| 94 | ++ .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28" |
| 95 | ++ "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58", |
| 96 | ++ .assoc = "\x56\x2e\x17\x99\x6d\x09\x3d\x28" |
| 97 | ++ "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58", |
| 98 | ++ .alen = 16, |
| 99 | ++ .ptext = "\x00\x01\x02\x03\x04\x05\x06\x07" |
| 100 | ++ "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" |
| 101 | ++ "\x10\x11\x12\x13\x14\x15\x16\x17" |
| 102 | ++ "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f", |
| 103 | ++ .plen = 32, |
| 104 | ++ .ctext = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a" |
| 105 | ++ "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a" |
| 106 | ++ "\x75\x86\x60\x2d\x25\x3c\xff\xf9" |
| 107 | ++ "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1" |
| 108 | ++ "\x4e\x5b\xa8\x65\x51\xc6\x58\xaf" |
| 109 | ++ "\x31\x57\x50\x3d\x01\xa1\xa4\x3f" |
| 110 | ++ "\x42\xd1\xd7\x31\x76\x8d\xf8\xc8" |
| 111 | ++ "\xe4\xd2\x7e\xc5\x23\xe7\xc6\x2e" |
| 112 | ++ "\x2d\xfd\x9d\xc1\xac\x50\x1e\xcf" |
| 113 | ++ "\xa0\x10\xeb\x1a\x9c\xb7\xe1\xca", |
| 114 | ++ .clen = 32 + 48, |
| 115 | ++ }, { /* RFC 3602 Case 3 */ |
| 116 | ++#ifdef __LITTLE_ENDIAN |
| 117 | ++ .key = "\x08\x00" /* rta length */ |
| 118 | ++ "\x01\x00" /* rta type */ |
| 119 | ++#else |
| 120 | ++ .key = "\x00\x08" /* rta length */ |
| 121 | ++ "\x00\x01" /* rta type */ |
| 122 | ++#endif |
| 123 | ++ "\x00\x00\x00\x10" /* enc key length */ |
| 124 | ++ "\x11\x22\x33\x44\x55\x66\x77\x88" |
| 125 | ++ "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" |
| 126 | ++ "\x22\x33\x44\x55\x66\x77\x88\x99" |
| 127 | ++ "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" |
| 128 | ++ "\x33\x44\x55\x66\x77\x88\x99\xaa" |
| 129 | ++ "\xbb\xcc\xdd\xee\xff\x11\x22\x33" |
| 130 | ++ "\x6c\x3e\xa0\x47\x76\x30\xce\x21" |
| 131 | ++ "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd", |
| 132 | ++ .klen = 8 + 48 + 16, |
| 133 | ++ .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb" |
| 134 | ++ "\xd9\xcd\x27\xd8\x25\x68\x2c\x81", |
| 135 | ++ .assoc = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb" |
| 136 | ++ "\xd9\xcd\x27\xd8\x25\x68\x2c\x81", |
| 137 | ++ .alen = 16, |
| 138 | ++ .ptext = "This is a 48-byte message (exactly 3 AES blocks)", |
| 139 | ++ .plen = 48, |
| 140 | ++ .ctext = "\xd0\xa0\x2b\x38\x36\x45\x17\x53" |
| 141 | ++ "\xd4\x93\x66\x5d\x33\xf0\xe8\x86" |
| 142 | ++ "\x2d\xea\x54\xcd\xb2\x93\xab\xc7" |
| 143 | ++ "\x50\x69\x39\x27\x67\x72\xf8\xd5" |
| 144 | ++ "\x02\x1c\x19\x21\x6b\xad\x52\x5c" |
| 145 | ++ "\x85\x79\x69\x5d\x83\xba\x26\x84" |
| 146 | ++ "\xa1\x52\xe7\xda\xf7\x05\xb6\xca" |
| 147 | ++ "\xad\x0f\x51\xed\x5a\xd3\x0f\xdf" |
| 148 | ++ "\xde\xeb\x3f\x31\xed\x3a\x43\x93" |
| 149 | ++ "\x3b\xb7\xca\xc8\x1b\xe7\x3b\x61" |
| 150 | ++ "\x6a\x05\xfd\x2d\x6a\x5c\xb1\x0d" |
| 151 | ++ "\x6e\x7a\xeb\x1c\x84\xec\xdb\xde", |
| 152 | ++ .clen = 48 + 48, |
| 153 | ++ }, { /* RFC 3602 Case 4 */ |
| 154 | ++#ifdef __LITTLE_ENDIAN |
| 155 | ++ .key = "\x08\x00" /* rta length */ |
| 156 | ++ "\x01\x00" /* rta type */ |
| 157 | ++#else |
| 158 | ++ .key = "\x00\x08" /* rta length */ |
| 159 | ++ "\x00\x01" /* rta type */ |
| 160 | ++#endif |
| 161 | ++ "\x00\x00\x00\x10" /* enc key length */ |
| 162 | ++ "\x11\x22\x33\x44\x55\x66\x77\x88" |
| 163 | ++ "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" |
| 164 | ++ "\x22\x33\x44\x55\x66\x77\x88\x99" |
| 165 | ++ "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" |
| 166 | ++ "\x33\x44\x55\x66\x77\x88\x99\xaa" |
| 167 | ++ "\xbb\xcc\xdd\xee\xff\x11\x22\x33" |
| 168 | ++ "\x56\xe4\x7a\x38\xc5\x59\x89\x74" |
| 169 | ++ "\xbc\x46\x90\x3d\xba\x29\x03\x49", |
| 170 | ++ .klen = 8 + 48 + 16, |
| 171 | ++ .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c" |
| 172 | ++ "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9", |
| 173 | ++ .assoc = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c" |
| 174 | ++ "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9", |
| 175 | ++ .alen = 16, |
| 176 | ++ .ptext = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" |
| 177 | ++ "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" |
| 178 | ++ "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" |
| 179 | ++ "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" |
| 180 | ++ "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" |
| 181 | ++ "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" |
| 182 | ++ "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7" |
| 183 | ++ "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", |
| 184 | ++ .plen = 64, |
| 185 | ++ .ctext = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e" |
| 186 | ++ "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa" |
| 187 | ++ "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6" |
| 188 | ++ "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e" |
| 189 | ++ "\x35\x90\x7a\xa6\x32\xc3\xff\xdf" |
| 190 | ++ "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad" |
| 191 | ++ "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d" |
| 192 | ++ "\x49\xa5\x3e\x87\xf4\xc3\xda\x55" |
| 193 | ++ "\x85\x7b\x91\xe0\x29\xeb\xd3\x59" |
| 194 | ++ "\x7c\xe3\x67\x14\xbe\x71\x2a\xd2" |
| 195 | ++ "\x8a\x1a\xd2\x35\x78\x6b\x69\xba" |
| 196 | ++ "\x64\xa5\x04\x00\x19\xc3\x4c\xae" |
| 197 | ++ "\x71\xff\x76\x9f\xbb\xc3\x29\x22" |
| 198 | ++ "\xc2\xc6\x51\xf1\xe6\x29\x5e\xa5", |
| 199 | ++ .clen = 64 + 48, |
| 200 | ++ }, { /* RFC 3602 Case 5 */ |
| 201 | ++#ifdef __LITTLE_ENDIAN |
| 202 | ++ .key = "\x08\x00" /* rta length */ |
| 203 | ++ "\x01\x00" /* rta type */ |
| 204 | ++#else |
| 205 | ++ .key = "\x00\x08" /* rta length */ |
| 206 | ++ "\x00\x01" /* rta type */ |
| 207 | ++#endif |
| 208 | ++ "\x00\x00\x00\x10" /* enc key length */ |
| 209 | ++ "\x11\x22\x33\x44\x55\x66\x77\x88" |
| 210 | ++ "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" |
| 211 | ++ "\x22\x33\x44\x55\x66\x77\x88\x99" |
| 212 | ++ "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" |
| 213 | ++ "\x33\x44\x55\x66\x77\x88\x99\xaa" |
| 214 | ++ "\xbb\xcc\xdd\xee\xff\x11\x22\x33" |
| 215 | ++ "\x90\xd3\x82\xb4\x10\xee\xba\x7a" |
| 216 | ++ "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf", |
| 217 | ++ .klen = 8 + 48 + 16, |
| 218 | ++ .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63" |
| 219 | ++ "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93", |
| 220 | ++ .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01" |
| 221 | ++ "\xe9\x6e\x8c\x08\xab\x46\x57\x63" |
| 222 | ++ "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93", |
| 223 | ++ .alen = 24, |
| 224 | ++ .ptext = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00" |
| 225 | ++ "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00" |
| 226 | ++ "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" |
| 227 | ++ "\x10\x11\x12\x13\x14\x15\x16\x17" |
| 228 | ++ "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" |
| 229 | ++ "\x20\x21\x22\x23\x24\x25\x26\x27" |
| 230 | ++ "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" |
| 231 | ++ "\x30\x31\x32\x33\x34\x35\x36\x37" |
| 232 | ++ "\x01\x02\x03\x04\x05\x06\x07\x08" |
| 233 | ++ "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01", |
| 234 | ++ .plen = 80, |
| 235 | ++ .ctext = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6" |
| 236 | ++ "\xa9\x45\x3e\x19\x4e\x12\x08\x49" |
| 237 | ++ "\xa4\x87\x0b\x66\xcc\x6b\x99\x65" |
| 238 | ++ "\x33\x00\x13\xb4\x89\x8d\xc8\x56" |
| 239 | ++ "\xa4\x69\x9e\x52\x3a\x55\xdb\x08" |
| 240 | ++ "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52" |
| 241 | ++ "\x77\x5b\x07\xd1\xdb\x34\xed\x9c" |
| 242 | ++ "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a" |
| 243 | ++ "\xa2\x69\xad\xd0\x47\xad\x2d\x59" |
| 244 | ++ "\x13\xac\x19\xb7\xcf\xba\xd4\xa6" |
| 245 | ++ "\x57\x5f\xb4\xd7\x74\x6f\x18\x97" |
| 246 | ++ "\xb7\xde\xfc\xf3\x4e\x0d\x29\x4d" |
| 247 | ++ "\xa0\xff\x39\x9e\x2d\xbf\x27\xac" |
| 248 | ++ "\x54\xb9\x8a\x3e\xab\x3b\xac\xd3" |
| 249 | ++ "\x36\x43\x74\xfc\xc2\x64\x81\x8a" |
| 250 | ++ "\x2c\x15\x72\xdf\x3f\x9d\x5b\xa4", |
| 251 | ++ .clen = 80 + 48, |
| 252 | ++ }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */ |
| 253 | ++#ifdef __LITTLE_ENDIAN |
| 254 | ++ .key = "\x08\x00" /* rta length */ |
| 255 | ++ "\x01\x00" /* rta type */ |
| 256 | ++#else |
| 257 | ++ .key = "\x00\x08" /* rta length */ |
| 258 | ++ "\x00\x01" /* rta type */ |
| 259 | ++#endif |
| 260 | ++ "\x00\x00\x00\x18" /* enc key length */ |
| 261 | ++ "\x11\x22\x33\x44\x55\x66\x77\x88" |
| 262 | ++ "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" |
| 263 | ++ "\x22\x33\x44\x55\x66\x77\x88\x99" |
| 264 | ++ "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" |
| 265 | ++ "\x33\x44\x55\x66\x77\x88\x99\xaa" |
| 266 | ++ "\xbb\xcc\xdd\xee\xff\x11\x22\x33" |
| 267 | ++ "\x8e\x73\xb0\xf7\xda\x0e\x64\x52" |
| 268 | ++ "\xc8\x10\xf3\x2b\x80\x90\x79\xe5" |
| 269 | ++ "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b", |
| 270 | ++ .klen = 8 + 48 + 24, |
| 271 | ++ .iv = "\x00\x01\x02\x03\x04\x05\x06\x07" |
| 272 | ++ "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", |
| 273 | ++ .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07" |
| 274 | ++ "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", |
| 275 | ++ .alen = 16, |
| 276 | ++ .ptext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" |
| 277 | ++ "\xe9\x3d\x7e\x11\x73\x93\x17\x2a" |
| 278 | ++ "\xae\x2d\x8a\x57\x1e\x03\xac\x9c" |
| 279 | ++ "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51" |
| 280 | ++ "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11" |
| 281 | ++ "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef" |
| 282 | ++ "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17" |
| 283 | ++ "\xad\x2b\x41\x7b\xe6\x6c\x37\x10", |
| 284 | ++ .plen = 64, |
| 285 | ++ .ctext = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d" |
| 286 | ++ "\x71\x78\x18\x3a\x9f\xa0\x71\xe8" |
| 287 | ++ "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4" |
| 288 | ++ "\xe5\xe7\x38\x76\x3f\x69\x14\x5a" |
| 289 | ++ "\x57\x1b\x24\x20\x12\xfb\x7a\xe0" |
| 290 | ++ "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0" |
| 291 | ++ "\x08\xb0\xe2\x79\x88\x59\x88\x81" |
| 292 | ++ "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd" |
| 293 | ++ "\x29\x9b\x42\x47\x0b\xbf\xf3\x54" |
| 294 | ++ "\x54\x95\xb0\x89\xd5\xa0\xc3\x78" |
| 295 | ++ "\x60\x6c\x18\x39\x6d\xc9\xfb\x2a" |
| 296 | ++ "\x34\x1c\xed\x95\x10\x1e\x43\x0a" |
| 297 | ++ "\x72\xce\x26\xbc\x74\xd9\x6f\xa2" |
| 298 | ++ "\xf1\xd9\xd0\xb1\xdf\x3d\x93\x14", |
| 299 | ++ .clen = 64 + 48, |
| 300 | ++ }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */ |
| 301 | ++#ifdef __LITTLE_ENDIAN |
| 302 | ++ .key = "\x08\x00" /* rta length */ |
| 303 | ++ "\x01\x00" /* rta type */ |
| 304 | ++#else |
| 305 | ++ .key = "\x00\x08" /* rta length */ |
| 306 | ++ "\x00\x01" /* rta type */ |
| 307 | ++#endif |
| 308 | ++ "\x00\x00\x00\x20" /* enc key length */ |
| 309 | ++ "\x11\x22\x33\x44\x55\x66\x77\x88" |
| 310 | ++ "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" |
| 311 | ++ "\x22\x33\x44\x55\x66\x77\x88\x99" |
| 312 | ++ "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" |
| 313 | ++ "\x33\x44\x55\x66\x77\x88\x99\xaa" |
| 314 | ++ "\xbb\xcc\xdd\xee\xff\x11\x22\x33" |
| 315 | ++ "\x60\x3d\xeb\x10\x15\xca\x71\xbe" |
| 316 | ++ "\x2b\x73\xae\xf0\x85\x7d\x77\x81" |
| 317 | ++ "\x1f\x35\x2c\x07\x3b\x61\x08\xd7" |
| 318 | ++ "\x2d\x98\x10\xa3\x09\x14\xdf\xf4", |
| 319 | ++ .klen = 8 + 48 + 32, |
| 320 | ++ .iv = "\x00\x01\x02\x03\x04\x05\x06\x07" |
| 321 | ++ "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", |
| 322 | ++ .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07" |
| 323 | ++ "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", |
| 324 | ++ .alen = 16, |
| 325 | ++ .ptext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96" |
| 326 | ++ "\xe9\x3d\x7e\x11\x73\x93\x17\x2a" |
| 327 | ++ "\xae\x2d\x8a\x57\x1e\x03\xac\x9c" |
| 328 | ++ "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51" |
| 329 | ++ "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11" |
| 330 | ++ "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef" |
| 331 | ++ "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17" |
| 332 | ++ "\xad\x2b\x41\x7b\xe6\x6c\x37\x10", |
| 333 | ++ .plen = 64, |
| 334 | ++ .ctext = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba" |
| 335 | ++ "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6" |
| 336 | ++ "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d" |
| 337 | ++ "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d" |
| 338 | ++ "\x39\xf2\x33\x69\xa9\xd9\xba\xcf" |
| 339 | ++ "\xa5\x30\xe2\x63\x04\x23\x14\x61" |
| 340 | ++ "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc" |
| 341 | ++ "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b" |
| 342 | ++ "\x9f\x50\xce\x64\xd9\xa3\xc9\x7a" |
| 343 | ++ "\x15\x3a\x3d\x46\x9a\x90\xf3\x06" |
| 344 | ++ "\x22\xad\xc5\x24\x77\x50\xb8\xfe" |
| 345 | ++ "\xbe\x37\x16\x86\x34\x5f\xaf\x97" |
| 346 | ++ "\x00\x9d\x86\xc8\x32\x4f\x72\x2f" |
| 347 | ++ "\x48\x97\xad\xb6\xb9\x77\x33\xbc", |
| 348 | ++ .clen = 64 + 48, |
| 349 | ++ }, |
| 350 | ++}; |
| 351 | ++ |
| 352 | + static const struct aead_testvec hmac_sha512_aes_cbc_tv_temp[] = { |
| 353 | + { /* RFC 3602 Case 1 */ |
| 354 | + #ifdef __LITTLE_ENDIAN |
0 commit comments