1/* 2 * Copyright 2020-2024 The OpenSSL Project Authors. All Rights Reserved. 3 * 4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 * this file except in compliance with the License. You can obtain a copy 6 * in the file LICENSE in the source distribution or at 7 * https://www.openssl.org/source/license.html 8 */ 9 10#define PASS 1 11#define FAIL 0 12#define ITM(x) x, sizeof(x) 13 14#ifndef OPENSSL_NO_EC 15 16struct ecdsa_keygen_st { 17 const char *curve_name; 18}; 19 20struct ecdsa_pub_verify_st { 21 const char *curve_name; 22 const unsigned char *pub; 23 size_t pub_len; 24 int pass; 25}; 26 27struct ecdsa_siggen_st { 28 const char *digest_alg; 29 const char *curve_name; 30 const unsigned char *msg; 31 size_t msg_len; 32}; 33 34struct ecdsa_sigver_st { 35 const char *digest_alg; 36 const char *curve_name; 37 const unsigned char *msg; 38 size_t msg_len; 39 const unsigned char *pub; 40 size_t pub_len; 41 const unsigned char *r; 42 size_t r_len; 43 const unsigned char *s; 44 size_t s_len; 45 int pass; 46}; 47 48struct ecdh_cofactor_derive_st { 49 int derive_cofactor_mode; 50 int key_cofactor; 51 int expected; 52}; 53 54static const struct ecdsa_keygen_st ecdsa_keygen_data[] = { 55 { "P-224" }, 56}; 57 58static const unsigned char ecdsa_pv_pub0[] = { 59 POINT_CONVERSION_UNCOMPRESSED, 60 0x50, 0x0F, 0x05, 0x86, 0xD3, 0xAA, 0x8A, 0x48, 61 0x46, 0x63, 0x0D, 0xD7, 0xC7, 0x5D, 0x5F, 0x1D, 62 0xB2, 0xA7, 0x9B, 0xE8, 0xC8, 0xBB, 0xBE, 0x2C, 63 0x93, 0x33, 0xDC, 0xCB, 0xBB, 0x2F, 0xB3, 0xCF, 64 0x55, 0x88, 0x7A, 0x97, 0xD1, 0x75, 0x73, 0xFE, 65 0x92, 0x02, 0x5C, 0xC8, 0xE3, 0xF4, 0x35, 0x4B, 66 0x08, 0x7E, 0xF4, 0xD3, 0x7D, 0x86, 0x06, 0x92, 67 0xBA, 0x15, 0x3F, 0xCF, 0x0C, 0xC4, 0xBF, 0xBC, 68}; 69static const unsigned char ecdsa_pv_pub1[] = { 70 POINT_CONVERSION_UNCOMPRESSED, 71 0x1F, 0x74, 0xD6, 0x99, 0xEB, 0x1D, 0x4F, 0x26, 72 0x25, 0x5E, 0xD4, 0x6A, 0xA6, 0xD5, 0x23, 0xB3, 73 0xF5, 0x5D, 0x14, 0x38, 0xE0, 0x4D, 0x23, 0x7F, 74 0x9A, 0xE5, 0xB7, 0x1B, 0xF9, 0x7F, 0xAD, 0x7E, 75 0x0E, 0x1C, 0x06, 0xF4, 0x20, 0xF3, 0x8E, 0x93, 76 0x79, 0x11, 0x15, 0xD6, 0x82, 0x12, 0x14, 0xC2, 77 0xF9, 0x30, 0x61, 0x9A, 0xC3, 0x12, 0xE3, 0x88, 78 0x4E, 0xB1, 0x1A, 0x4B, 0x54, 0x6D, 0xEA, 0xCF, 79}; 80static const struct ecdsa_pub_verify_st ecdsa_pv_data[] = { 81 { 82 "P-256", 83 ITM(ecdsa_pv_pub0), 84 PASS 85 }, 86 { 87 "P-256", 88 ITM(ecdsa_pv_pub1), 89 FAIL 90 }, 91}; 92 93static const unsigned char ecdsa_siggen_msg0[] = { 94 0xB8, 0x65, 0x55, 0x9D, 0x54, 0x5C, 0xD2, 0xC7, 95 0xC2, 0xCA, 0x96, 0xDF, 0xF3, 0x9B, 0x26, 0xED, 96 0xF8, 0x16, 0x99, 0x05, 0x94, 0xA9, 0x3F, 0x69, 97 0x5F, 0xE8, 0x73, 0xC5, 0xFE, 0x78, 0x28, 0x84, 98 0xC0, 0xA7, 0xFA, 0x29, 0xBE, 0x37, 0x82, 0xC0, 99 0x56, 0x41, 0x49, 0xAF, 0xF3, 0x59, 0xBB, 0x96, 100 0xF6, 0x4B, 0x87, 0x45, 0xAB, 0x1F, 0xB2, 0xB3, 101 0x8F, 0x14, 0xD4, 0xD7, 0x1C, 0x29, 0x08, 0x0C, 102 0x79, 0x8A, 0x38, 0xAE, 0x32, 0x1C, 0x38, 0x80, 103 0x5B, 0x45, 0x25, 0x46, 0x5D, 0xCE, 0x7D, 0x34, 104 0xC0, 0x90, 0xEF, 0x06, 0x84, 0xA1, 0x0F, 0xF8, 105 0x56, 0x2D, 0x46, 0xF7, 0xB7, 0xDE, 0x06, 0x7C, 106 0x87, 0xA6, 0x7E, 0x71, 0x8D, 0x7B, 0x27, 0xE5, 107 0x51, 0x0C, 0xE7, 0xBA, 0x18, 0x08, 0xE0, 0xD5, 108 0x0B, 0x8C, 0xB6, 0x22, 0xA5, 0x8F, 0xB3, 0xF7, 109 0xFB, 0xC6, 0x2A, 0x59, 0x02, 0x8A, 0x8C, 0x42, 110}; 111static const struct ecdsa_siggen_st ecdsa_siggen_data[] = { 112 { 113 "SHA2-256", 114 "P-384", 115 ITM(ecdsa_siggen_msg0), 116 }, 117}; 118 119static const unsigned char ecdsa_sigver_msg0[] = { 120 0x0b, 0x00, 0xc4, 0x3f, 0xb9, 0xcb, 0x92, 0xd3, 121 0x56, 0x83, 0xc6, 0x97, 0x23, 0xf8, 0xf1, 0x0b, 122 0x0a, 0xa6, 0x60, 0xca, 0x3a, 0xed, 0xba, 0x38, 123 0xf7, 0x86, 0xc2, 0x6d, 0xa1, 0xb6, 0x40, 0x2c, 124 0x92, 0xfe, 0x44, 0x1a, 0x19, 0x61, 0x5c, 0x02, 125 0xfa, 0xd3, 0x79, 0x99, 0xb8, 0x99, 0xe8, 0x70, 126 0xaa, 0x26, 0x01, 0xf2, 0xe7, 0xdc, 0x69, 0xce, 127 0x9a, 0xd2, 0xaa, 0x02, 0x15, 0xab, 0x0d, 0xcb, 128 0x77, 0xaf, 0xe0, 0x81, 0x6d, 0x92, 0x6e, 0x09, 129 0xcd, 0x93, 0xd6, 0x22, 0x67, 0xc2, 0xd3, 0x7c, 130 0x58, 0x11, 0xc8, 0x77, 0x4e, 0x97, 0x92, 0x87, 131 0xcd, 0xe4, 0xc9, 0x2a, 0x77, 0xb2, 0xf0, 0xe7, 132 0xd3, 0x5a, 0x20, 0x36, 0x91, 0x75, 0x23, 0xa8, 133 0xcb, 0x4a, 0xd0, 0xe5, 0x95, 0x3b, 0x24, 0x2a, 134 0x86, 0xa0, 0xaa, 0xbe, 0xac, 0x59, 0xd7, 0xd0, 135 0xfb, 0xdf, 0x33, 0xc9, 0x73, 0xaf, 0x8a, 0x06, 136}; 137static const unsigned char ecdsa_sigver_msg1[] = { 138 0x45, 0xBB, 0x9D, 0xDC, 0x1D, 0x0A, 0xF2, 0xD7, 139 0x56, 0x07, 0x1F, 0x47, 0x2A, 0x17, 0xCE, 0x38, 140 0xA8, 0x7E, 0x75, 0xED, 0x4F, 0xE4, 0x17, 0x65, 141 0x11, 0x69, 0xDF, 0x04, 0xF0, 0x39, 0x28, 0xD0, 142 0x75, 0xD5, 0xF0, 0x1C, 0x32, 0x84, 0x16, 0x74, 143 0x7D, 0x61, 0x57, 0xDB, 0x92, 0x24, 0x60, 0xBA, 144 0x58, 0x7B, 0x48, 0xB4, 0x44, 0xFB, 0xD7, 0x35, 145 0xD7, 0xCF, 0x61, 0x34, 0x7F, 0x70, 0x38, 0xAE, 146 0xE2, 0xB2, 0x6C, 0x8A, 0xD1, 0x27, 0xB4, 0xF0, 147 0x33, 0xB9, 0xE9, 0x27, 0x1A, 0xEE, 0x34, 0x72, 148 0x9D, 0x5E, 0x74, 0x28, 0xE7, 0x0B, 0x82, 0xE1, 149 0x60, 0xC2, 0x43, 0xE6, 0x75, 0x4A, 0x2E, 0x66, 150 0x88, 0x72, 0xCA, 0xC7, 0x97, 0xFE, 0x19, 0xCD, 151 0xA4, 0x30, 0xBF, 0xC7, 0xDC, 0x37, 0xF8, 0x1B, 152 0xB6, 0xD7, 0x7E, 0xAD, 0xD6, 0xC1, 0x20, 0xAC, 153 0x79, 0x03, 0x89, 0xEA, 0xF4, 0x59, 0x21, 0xF2, 154}; 155 156static const unsigned char ecdsa_sigver_pub0[] = { 157 POINT_CONVERSION_UNCOMPRESSED, 158 0x2c, 0xdf, 0x6f, 0x23, 0x3d, 0x73, 0x86, 0x25, 159 0x1a, 0x29, 0xd6, 0xde, 0x98, 0xcf, 0x85, 0xf7, 160 0x6a, 0x55, 0xba, 0xdb, 0x0f, 0x35, 0x94, 0x92, 161 0xb3, 0x58, 0xf3, 0x89, 0x7f, 0x6c, 0x22, 0x10, 162 0xd9, 0xd3, 0x54, 0xd2, 0x74, 0x9f, 0x64, 0x0d, 163 0xd2, 0xf8, 0x3e, 0xfc, 0x7f, 0xb7, 0x16, 0x36, 164}; 165static const unsigned char ecdsa_sigver_pub1[] = { 166 POINT_CONVERSION_UNCOMPRESSED, 167 0x00, 0xD4, 0x79, 0x9F, 0xD9, 0x99, 0xEC, 0x21, 168 0x1E, 0xE6, 0x06, 0x58, 0xB7, 0xFB, 0x76, 0xFC, 169 0xF5, 0x9A, 0xE1, 0x1E, 0x5A, 0x87, 0xD7, 0x0E, 170 0x21, 0x7B, 0xDE, 0x21, 0x52, 0xE6, 0xE4, 0x09, 171 0x2C, 0xB8, 0x5D, 0x99, 0xE2, 0x6A, 0xB1, 0xE5, 172 0x79, 0x11, 0x49, 0xBD, 0x3D, 0xC7, 0x1C, 0x48, 173 0xF5, 0x83, 0xFC, 0x9E, 0xF3, 0xAB, 0x2D, 0x30, 174 0x64, 0xEC, 0x22, 0xCB, 0xEB, 0x95, 0xBF, 0xF2, 175 0x2D, 0xCE, 176 177 0x01, 0xB9, 0xFE, 0xBD, 0x4C, 0x4B, 0xDA, 0x1F, 178 0x30, 0xC3, 0x5C, 0x0F, 0x5D, 0x3E, 0x36, 0x51, 179 0xF2, 0xC0, 0xF7, 0xFC, 0x79, 0x25, 0x98, 0xF2, 180 0x4B, 0x2B, 0x61, 0xFC, 0xD9, 0xC4, 0x5C, 0xC0, 181 0x13, 0xA2, 0x4F, 0x2E, 0x34, 0xD4, 0x15, 0xC4, 182 0x25, 0x13, 0xA9, 0x30, 0x35, 0x56, 0xB7, 0xCD, 183 0xD0, 0xC4, 0x65, 0x5D, 0xFB, 0xB2, 0xE4, 0xBF, 184 0x22, 0x67, 0xEF, 0xA1, 0x2E, 0xA2, 0x1B, 0x33, 185 0xE4, 0x3D, 186}; 187static const unsigned char ecdsa_sigver_r0[] = { 188 0x6b, 0x35, 0x62, 0x67, 0xa3, 0xbd, 0x76, 0xc8, 189 0xa3, 0xdc, 0x93, 0x18, 0x82, 0x6f, 0xd2, 0x43, 190 0x52, 0x18, 0x93, 0x21, 0x8e, 0xce, 0x12, 0x65, 191}; 192static const unsigned char ecdsa_sigver_r1[] = { 193 0x01, 0xBF, 0xA6, 0x46, 0x6D, 0x4E, 0x1C, 0x42, 194 0x18, 0x7D, 0x46, 0xC6, 0x5F, 0xA5, 0x05, 0xEA, 195 0x1A, 0xEF, 0xDB, 0x46, 0xD1, 0x79, 0x3F, 0x2B, 196 0xE2, 0x70, 0x0F, 0x14, 0x26, 0x30, 0x7F, 0x2D, 197 0x1A, 0x41, 0xFD, 0x11, 0xC0, 0xBB, 0xD0, 0xD5, 198 0x09, 0xAA, 0xE0, 0x1A, 0xFE, 0x59, 0x23, 0x7D, 199 0x1B, 0x5C, 0xB9, 0x51, 0xCD, 0x3A, 0xA1, 0x32, 200 0xC6, 0x92, 0xB0, 0x7D, 0x91, 0xC6, 0x30, 0xC0, 201 0xA4, 0x2A, 202}; 203static const unsigned char ecdsa_sigver_s0[] = { 204 0x7b, 0x92, 0x4a, 0x13, 0x8d, 0x74, 0x87, 0xb2, 205 0xd4, 0xc7, 0x21, 0x73, 0x2c, 0x8a, 0x09, 0x25, 206 0xac, 0x19, 0xcf, 0x9c, 0xbc, 0xd7, 0x7b, 0xf8, 207}; 208static const unsigned char ecdsa_sigver_s1[] = { 209 0x00, 0x8D, 0x56, 0xBA, 0x60, 0x38, 0x23, 0x47, 210 0xB8, 0x32, 0x73, 0x29, 0x40, 0x84, 0xF0, 0x2C, 211 0x90, 0xB2, 0x1D, 0x56, 0xFF, 0x38, 0x68, 0xAA, 212 0x42, 0xBA, 0x48, 0xA1, 0x52, 0x8C, 0xB4, 0xD6, 213 0x15, 0xB7, 0x88, 0xB3, 0x71, 0xC6, 0x69, 0x60, 214 0x6C, 0xEB, 0x4B, 0xF6, 0x19, 0x6A, 0x95, 0x8F, 215 0x01, 0x09, 0xC6, 0x13, 0xE6, 0x17, 0x38, 0xC8, 216 0x10, 0x49, 0x4F, 0x87, 0x43, 0x63, 0x62, 0x98, 217 0xB1, 0xAC, 218}; 219static const struct ecdsa_sigver_st ecdsa_sigver_data[] = { 220 { 221 "SHA-1", 222 "P-192", 223 ITM(ecdsa_sigver_msg0), 224 ITM(ecdsa_sigver_pub0), 225 ITM(ecdsa_sigver_r0), 226 ITM(ecdsa_sigver_s0), 227 PASS, 228 }, 229 { 230 "SHA2-512", 231 "P-521", 232 ITM(ecdsa_sigver_msg1), 233 ITM(ecdsa_sigver_pub1), 234 ITM(ecdsa_sigver_r1), 235 ITM(ecdsa_sigver_s1), 236 FAIL, 237 }, 238}; 239 240/* 241 * FIPS EC DH key derivation requires the use of the cofactor if a curve has a 242 * cofactor that is not 1. The cofactor option is determined by either 243 * (1) The derive ctx using OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE or via 244 * (2) The EVP_PKEY (used by the derive) using OSSL_PKEY_PARAM_USE_COFACTOR_ECDH 245 * Test all combinations of these. 246 * Notes: 247 * COFACTOR_MODE is -1 by default. (It can be -1, 0, or 1). 248 * OSSL_PKEY_PARAM_USE_COFACTOR_ECDH is 0 by default. (It can be 0 or 1) 249 * 250 * OSSL_PKEY_PARAM_USE_COFACTOR_ECDH is only used if the COFACTOR_MODE is -1. 251 * 252 * If the cofactor is not set by either then the derived is expected to fail. 253 */ 254# define COFACTOR_NOT_SET -2 /* Use the default by not setting the param */ 255static const struct ecdh_cofactor_derive_st ecdh_cofactor_derive_data[] = { 256 { COFACTOR_NOT_SET, COFACTOR_NOT_SET, 0 }, 257 { COFACTOR_NOT_SET, 0, 0 }, 258 { COFACTOR_NOT_SET, 1, 1 }, 259 { -1, COFACTOR_NOT_SET, 0 }, 260 { -1, 0, 0 }, 261 { -1, 1, 1 }, 262 { 0, COFACTOR_NOT_SET, 0 }, 263 { 0, 0, 0 }, 264 { 0, 1, 0 }, 265 { 1, COFACTOR_NOT_SET, 1 }, 266 { 1, 0, 1 }, 267 { 1, 1, 1 } 268}; 269 270#endif /* OPENSSL_NO_EC */ 271 272#ifndef OPENSSL_NO_ECX 273 274/* 275 * Test vectors obtained from 276 * https://github.com/usnistgov/ACVP-Server/blob/master/gen-val/json-files/EDDSA-KeyVer-1.0 277 */ 278static const unsigned char ed25519_pv_pub0[] = { 279 0xBE, 0xE1, 0x6F, 0x5B, 0x4A, 0x24, 0xEF, 0xF8, 280 0xA6, 0x54, 0x0C, 0x04, 0x5C, 0xC4, 0x51, 0xCA, 281 0x3A, 0x4E, 0x9B, 0x86, 0xDC, 0x5D, 0xE8, 0x12, 282 0x0C, 0xDD, 0x1C, 0x23, 0x8E, 0x3F, 0x22, 0x7D 283}; 284static const unsigned char ed25519_pv_pub1[] = { 285 0x1E, 0xE7, 0x74, 0x94, 0x73, 0xA1, 0xB8, 0x98, 286 0xBF, 0x8C, 0x81, 0x11, 0x8E, 0x76, 0xEE, 0x8B, 287 0xDB, 0xD4, 0x8C, 0x19, 0x29, 0xF7, 0x47, 0x2A, 288 0x18, 0xAD, 0xCE, 0xFE, 0x2F, 0x8A, 0x25, 0x69 289}; 290static const unsigned char ed25519_pv_pub2[] = { 291 0x61, 0x4B, 0xC0, 0xBE, 0x80, 0xE6, 0xC6, 0x35, 292 0xDC, 0xF5, 0x65, 0xE6, 0xCE, 0xEE, 0x1C, 0x14, 293 0x3C, 0xF4, 0x46, 0xAC, 0x22, 0x82, 0xA0, 0xCE, 294 0x28, 0xE6, 0x53, 0x62, 0x48, 0x3D, 0x8B, 0x94 295}; 296static const unsigned char ed25519_pv_pub3[] = { 297 0x38, 0x95, 0x95, 0x90, 0x4D, 0x7E, 0xDC, 0x9B, 298 0xF3, 0xB6, 0xF9, 0x52, 0x40, 0xC4, 0x50, 0xC4, 299 0x72, 0xC0, 0x5E, 0x83, 0x8E, 0x84, 0xD5, 0x9A, 300 0x10, 0x3D, 0xCC, 0xFA, 0xD6, 0x19, 0x61, 0x07 301}; 302static const unsigned char ed448_pv_pub0[] = { 303 0xC3, 0xA9, 0x2B, 0xDD, 0xF1, 0x9C, 0x1F, 0xF1, 304 0x69, 0x0E, 0xB0, 0x42, 0x73, 0x85, 0xCB, 0x8F, 305 0x74, 0xE6, 0x49, 0x63, 0xF0, 0xF3, 0xA6, 0x28, 306 0x11, 0xDB, 0x10, 0x54, 0x70, 0x52, 0x38, 0xB6, 307 0xCE, 0x62, 0xE0, 0x9F, 0x7A, 0xD5, 0xA2, 0xFF, 308 0xA9, 0xB4, 0xA1, 0xCD, 0x5E, 0x67, 0x6E, 0xFB, 309 0x1B, 0x1C, 0xAE, 0x58, 0xF5, 0xE1, 0x74, 0x8C, 310 0x00 311}; 312static const unsigned char ed448_pv_pub1[] = { 313 0x94, 0xFE, 0x99, 0x25, 0x2F, 0x5C, 0x05, 0x69, 314 0xBF, 0x8B, 0x5B, 0xDD, 0x32, 0x61, 0x50, 0x08, 315 0x95, 0x05, 0xEE, 0x44, 0x04, 0xCF, 0x76, 0x44, 316 0x17, 0x56, 0x82, 0x03, 0xF1, 0x3A, 0xBB, 0x13, 317 0xBB, 0xC6, 0x3E, 0xCE, 0xE2, 0x1F, 0xEC, 0x06, 318 0x90, 0xA9, 0x53, 0x10, 0xB6, 0x86, 0x4D, 0x71, 319 0x29, 0x1B, 0x12, 0xCE, 0x3A, 0x86, 0xFD, 0xE0, 320 0x80 321}; 322static const unsigned char ed448_pv_pub2[] = { 323 0xD0, 0x88, 0xF0, 0xA9, 0x94, 0x86, 0x31, 0x9A, 324 0xC7, 0xD0, 0x8C, 0x7C, 0xE4, 0xEB, 0xA0, 0x6C, 325 0xF3, 0xF7, 0x20, 0x3A, 0xA9, 0x4C, 0x85, 0xEC, 326 0x30, 0x10, 0xD7, 0x1A, 0x4B, 0x21, 0xA2, 0xFF, 327 0x7F, 0x3D, 0xEF, 0xA9, 0x45, 0x28, 0x53, 0x30, 328 0x16, 0x34, 0x3C, 0x4F, 0x19, 0xF5, 0xA3, 0x80, 329 0xF4, 0x42, 0xFB, 0xE6, 0x3B, 0xEE, 0x35, 0x4D, 330 0x80 331}; 332static const unsigned char ed448_pv_pub3[] = { 333 0x45, 0x42, 0x38, 0x5F, 0x3D, 0xD3, 0x4A, 0x84, 334 0x87, 0x74, 0x56, 0x27, 0x62, 0x4E, 0xA2, 0xA9, 335 0xE8, 0xB2, 0x45, 0x9E, 0x1A, 0xF4, 0x5D, 0xCB, 336 0x70, 0x51, 0xBD, 0xD2, 0xEE, 0x07, 0xB9, 0x32, 337 0xFD, 0x5E, 0xCA, 0x47, 0x56, 0xB0, 0x06, 0xC0, 338 0xEF, 0xC0, 0x43, 0x5F, 0xE2, 0x1C, 0xAA, 0xE9, 339 0x10, 0x6F, 0xD7, 0x16, 0xFC, 0xBE, 0xF4, 0xB8, 340 0x80 341}; 342 343static const struct ecdsa_pub_verify_st eddsa_pv_data[] = { 344 { 345 "ED25519", 346 ITM(ed25519_pv_pub0), 347 FAIL 348 }, 349 { 350 "ED25519", 351 ITM(ed25519_pv_pub1), 352 FAIL 353 }, 354 { 355 "ED25519", 356 ITM(ed25519_pv_pub2), 357 PASS 358 }, 359 { 360 "ED25519", 361 ITM(ed25519_pv_pub3), 362 PASS 363 }, 364 { 365 "ED448", 366 ITM(ed448_pv_pub0), 367 FAIL 368 }, 369 { 370 "ED448", 371 ITM(ed448_pv_pub1), 372 FAIL 373 }, 374 { 375 "ED448", 376 ITM(ed448_pv_pub2), 377 PASS 378 }, 379 { 380 "ED448", 381 ITM(ed448_pv_pub3), 382 PASS 383 }, 384}; 385#endif /* OPENSSL_NO_ECX */ 386 387#ifndef OPENSSL_NO_DSA 388 389struct dsa_paramgen_st { 390 size_t L; 391 size_t N; 392}; 393 394struct dsa_pqver_st { 395 const unsigned char *p; 396 size_t p_len; 397 const unsigned char *q; 398 size_t q_len; 399 const unsigned char *seed; 400 size_t seed_len; 401 int counter; 402 int pass; 403}; 404 405struct dsa_siggen_st { 406 const char *digest_alg; 407 size_t L; 408 size_t N; 409 const unsigned char *msg; 410 size_t msg_len; 411}; 412 413struct dsa_sigver_st { 414 const char *digest_alg; 415 const unsigned char *p; 416 size_t p_len; 417 const unsigned char *q; 418 size_t q_len; 419 const unsigned char *g; 420 size_t g_len; 421 const unsigned char *pub; 422 size_t pub_len; 423 const unsigned char *msg; 424 size_t msg_len; 425 const unsigned char *r; 426 size_t r_len; 427 const unsigned char *s; 428 size_t s_len; 429 int pass; 430}; 431 432static const struct dsa_paramgen_st dsa_keygen_data[] = { 433 { 2048, 224 }, 434}; 435 436static const struct dsa_paramgen_st dsa_paramgen_data[] = { 437 { 2048, 256 }, 438}; 439 440/* dsa_pqver */ 441static const unsigned char dsa_pqver_p0[] = { 442 0xEF, 0xC7, 0x95, 0xEB, 0x1E, 0x1C, 0x8F, 0x5E, 443 0x4A, 0x85, 0xCD, 0x20, 0x66, 0xC7, 0xB9, 0x6C, 444 0x4E, 0xC4, 0xE7, 0x3B, 0x7B, 0x8E, 0x0E, 0x8C, 445 0x00, 0xF5, 0x2E, 0x68, 0xF5, 0xC2, 0x89, 0x47, 446 0xA5, 0x7B, 0xA6, 0xA3, 0x30, 0xBC, 0xFA, 0x25, 447 0x29, 0xBD, 0xE2, 0x4D, 0x05, 0x0B, 0x6D, 0x2D, 448 0x49, 0x50, 0x53, 0xEF, 0x8C, 0xBE, 0xC3, 0xEC, 449 0x92, 0xC1, 0x45, 0xE3, 0x95, 0x39, 0x72, 0x58, 450 0xFD, 0x93, 0x23, 0x06, 0x37, 0xD6, 0x56, 0x1F, 451 0x75, 0x92, 0xAD, 0x15, 0xA9, 0x88, 0x25, 0x3F, 452 0xD6, 0x47, 0xB5, 0xB1, 0x32, 0x01, 0x2D, 0x70, 453 0x55, 0xB9, 0x5D, 0xED, 0x1B, 0x40, 0x39, 0x78, 454 0x74, 0xA6, 0xDF, 0x4B, 0xE4, 0x86, 0x8B, 0x56, 455 0x46, 0x1E, 0xDB, 0x04, 0xD2, 0xD2, 0x50, 0xE9, 456 0x5D, 0x88, 0xA8, 0x84, 0x55, 0xE3, 0xF3, 0xB7, 457 0x07, 0x54, 0x9E, 0x98, 0x03, 0x9F, 0x31, 0x86, 458 0xEB, 0x0D, 0x26, 0x97, 0x30, 0x31, 0x34, 0x64, 459 0x35, 0x56, 0x40, 0x35, 0xEA, 0xE5, 0x00, 0x90, 460 0xBD, 0x20, 0x93, 0xFC, 0xAD, 0x70, 0x9A, 0xF5, 461 0xB8, 0xA4, 0xAD, 0xEC, 0xFE, 0x64, 0xF4, 0x2C, 462 0x11, 0x25, 0x68, 0x27, 0x0E, 0x5C, 0x81, 0x57, 463 0x64, 0x9A, 0x50, 0x86, 0xA3, 0x69, 0x61, 0x1E, 464 0x0D, 0x62, 0xE9, 0x4D, 0x44, 0x1E, 0x1E, 0xE1, 465 0x6D, 0x8F, 0x10, 0x67, 0x82, 0xB6, 0x6A, 0xD0, 466 0x08, 0x59, 0xF3, 0xBA, 0xE8, 0x29, 0xE0, 0x60, 467 0x1F, 0x3E, 0xBA, 0xAB, 0x6E, 0xB6, 0x5B, 0xAF, 468 0xCC, 0x76, 0x5D, 0x70, 0x7F, 0x3A, 0xAA, 0x7E, 469 0x27, 0x23, 0x6F, 0x8E, 0xF8, 0x06, 0xC1, 0x3E, 470 0xAE, 0xBE, 0x22, 0x71, 0x93, 0xEC, 0x9A, 0x33, 471 0x3C, 0xA4, 0x77, 0xD4, 0x76, 0x79, 0x10, 0x5A, 472 0xF4, 0x07, 0x52, 0x66, 0x9D, 0xC5, 0xFD, 0xDA, 473 0xA1, 0xE7, 0xA2, 0x45, 0x27, 0x08, 0x54, 0xB9, 474 0x3B, 0xEC, 0x07, 0xFB, 0xE0, 0xF4, 0x4B, 0x7C, 475 0xB1, 0x04, 0x2B, 0x0E, 0x65, 0x3A, 0xF7, 0x65, 476 0x57, 0x65, 0xCF, 0x36, 0x28, 0x2A, 0x1C, 0x57, 477 0x10, 0x28, 0x02, 0x26, 0xF7, 0x45, 0xAA, 0x1B, 478 0x2E, 0xE3, 0x25, 0xEA, 0x28, 0xA1, 0x84, 0x1E, 479 0xA1, 0xA3, 0xAB, 0x52, 0x25, 0xD4, 0x64, 0xB2, 480 0xA8, 0xA5, 0xFD, 0x2F, 0x48, 0x90, 0x28, 0x8F, 481 0x8B, 0x10, 0x7F, 0x6F, 0x80, 0xA9, 0x4B, 0xB3, 482 0xC0, 0x5B, 0x27, 0xE9, 0x90, 0x90, 0x53, 0xA8, 483 0x30, 0x88, 0xD4, 0x9B, 0x09, 0x62, 0xCD, 0x99, 484 0x61, 0x63, 0x14, 0xDF, 0xC3, 0x5A, 0x60, 0xBE, 485 0xA3, 0x40, 0xAB, 0x29, 0x3E, 0xB2, 0x02, 0x19, 486 0x9D, 0x97, 0x75, 0x34, 0x0D, 0x71, 0x3B, 0xEC, 487 0xF1, 0x13, 0x23, 0xE6, 0xCA, 0x35, 0x84, 0xFF, 488 0x27, 0x4A, 0xE0, 0x11, 0x59, 0xEB, 0x1D, 0x8C, 489 0xFF, 0xF3, 0x91, 0x90, 0x3C, 0xE9, 0x43, 0x31, 490}; 491static const unsigned char dsa_pqver_p1[] = { 492 0x83, 0xA6, 0x8F, 0xE5, 0xFE, 0xF0, 0x9D, 0x9E, 493 0x8A, 0x80, 0x9C, 0x47, 0xEF, 0xBE, 0x1A, 0xD0, 494 0x7F, 0xEA, 0x6D, 0x08, 0x59, 0x2D, 0x04, 0xB6, 495 0xAC, 0x2A, 0x54, 0x47, 0x42, 0xB2, 0x5F, 0x28, 496 0xF6, 0x30, 0x36, 0xE3, 0xDA, 0x4E, 0xDC, 0xC1, 497 0x6E, 0x61, 0xCE, 0x45, 0x1C, 0x73, 0x87, 0x3E, 498 0xB7, 0x94, 0xDB, 0x68, 0xEE, 0xFD, 0x8D, 0x93, 499 0x5E, 0x5D, 0xAB, 0x77, 0xA2, 0xF0, 0xD6, 0x60, 500 0xCD, 0x9D, 0x13, 0xE0, 0xA6, 0xE7, 0xEC, 0x45, 501 0xBA, 0xD8, 0xB0, 0x3D, 0x4F, 0x75, 0x30, 0xB7, 502 0x89, 0x96, 0x2B, 0x48, 0xFC, 0x73, 0xB8, 0x5C, 503 0x59, 0xDC, 0x41, 0xEF, 0xCE, 0xC6, 0x7F, 0x66, 504 0x4F, 0xB6, 0x1F, 0x9C, 0x91, 0xB4, 0xEE, 0xAA, 505 0x2C, 0x4A, 0x7F, 0x1F, 0xBF, 0xE2, 0x9A, 0xF2, 506 0x9F, 0x52, 0x83, 0x30, 0x97, 0x86, 0x7F, 0xA2, 507 0x85, 0x20, 0x75, 0x75, 0xAD, 0x01, 0xE2, 0x40, 508 0x3A, 0x82, 0xD8, 0x52, 0x91, 0x15, 0x67, 0x1B, 509 0x00, 0x78, 0xFD, 0x3E, 0x61, 0x8A, 0xA8, 0x1D, 510 0x1A, 0x07, 0x8E, 0x87, 0x48, 0x64, 0x1E, 0x5B, 511 0x05, 0x34, 0x7E, 0x5D, 0xD6, 0x11, 0xC4, 0xB7, 512 0x0E, 0xF3, 0x91, 0xC7, 0x2B, 0xAD, 0x22, 0x96, 513 0xA3, 0xF7, 0x4E, 0xEB, 0xE4, 0x9F, 0x67, 0x91, 514 0x9D, 0x65, 0x45, 0x8F, 0x92, 0x2F, 0x8B, 0x46, 515 0xCC, 0x4B, 0xB9, 0xC5, 0xD0, 0x00, 0xFF, 0xBB, 516 0x37, 0xD6, 0x20, 0x36, 0x7D, 0x4A, 0xC3, 0x75, 517 0xAC, 0x58, 0xE5, 0x24, 0x54, 0x47, 0x80, 0x2C, 518 0x83, 0xBD, 0xC8, 0xA7, 0x87, 0x20, 0x3D, 0xA8, 519 0x78, 0xE2, 0xC5, 0x4E, 0xE8, 0x4E, 0x3C, 0xFA, 520 0x75, 0xA0, 0x8D, 0x35, 0x8E, 0xF2, 0x61, 0x19, 521 0x84, 0x9C, 0x71, 0x95, 0x5B, 0x09, 0xE1, 0xB6, 522 0xC6, 0x6A, 0x7C, 0x34, 0x39, 0x67, 0x14, 0xAB, 523 0xA7, 0x6B, 0x45, 0x01, 0xF0, 0x0F, 0x52, 0xB5, 524 0x23, 0xD9, 0x67, 0x57, 0x91, 0x9F, 0xC2, 0xA9, 525 0xB6, 0x7C, 0x15, 0x59, 0x3E, 0x22, 0x89, 0xD6, 526 0x0B, 0x83, 0xB4, 0x29, 0xEF, 0x0B, 0x66, 0x30, 527 0x2D, 0xE7, 0xC5, 0x04, 0x1F, 0x28, 0x7D, 0x9F, 528 0xC9, 0x87, 0x05, 0xC6, 0x1B, 0x18, 0x1F, 0x3B, 529 0x90, 0x00, 0x31, 0x5B, 0xDC, 0x19, 0x7D, 0x71, 530 0xE4, 0xA4, 0x21, 0xB5, 0x37, 0xE7, 0x9B, 0xA4, 531 0xBC, 0x04, 0xF8, 0x0A, 0x95, 0x3F, 0xDB, 0x30, 532 0xA5, 0xC9, 0xC2, 0xD7, 0x19, 0x9D, 0x57, 0x77, 533 0x44, 0xB7, 0x47, 0xBD, 0xA1, 0x01, 0xEB, 0x51, 534 0xA4, 0xB2, 0x8B, 0x1A, 0x51, 0xA4, 0xCC, 0x07, 535 0x57, 0x19, 0xFB, 0xFC, 0xAA, 0x42, 0xCC, 0x2A, 536 0xCE, 0xF8, 0xFD, 0xF8, 0x92, 0xC4, 0xDC, 0x7B, 537 0x0B, 0x92, 0x9A, 0xD7, 0xC5, 0xBC, 0x6D, 0x74, 538 0x13, 0x0E, 0xD2, 0x8F, 0x86, 0xEB, 0x8D, 0xD7, 539 0xC6, 0xAC, 0x43, 0xD8, 0x00, 0x80, 0x53, 0x57, 540}; 541static const unsigned char dsa_pqver_q0[] = { 542 0xCB, 0x74, 0xE6, 0x57, 0x37, 0x0F, 0x7A, 0x61, 543 0x0B, 0x09, 0xCE, 0x91, 0x78, 0x06, 0x3C, 0x7F, 544 0x20, 0xF5, 0xD1, 0x1E, 0x1D, 0xC2, 0x43, 0xBA, 545 0x89, 0xC8, 0x4A, 0x49, 0x83, 0x38, 0xE1, 0x2D, 546}; 547static const unsigned char dsa_pqver_q1[] = { 548 0x85, 0x2B, 0x77, 0x9B, 0x1B, 0x70, 0x6F, 0x8C, 549 0x10, 0xF3, 0x2F, 0xA9, 0xC2, 0xEE, 0xF6, 0x74, 550 0x78, 0x5F, 0xD5, 0x5E, 0x2C, 0x34, 0xAF, 0xD1, 551 0x25, 0x63, 0x96, 0x6D, 0x6D, 0x84, 0x68, 0x3F, 552}; 553static const unsigned char dsa_pqver_seed0[] = { 554 0x33, 0xDC, 0x43, 0xAF, 0xC4, 0x51, 0x5C, 0x3B, 555 0x8B, 0x8A, 0x0D, 0x5D, 0xA2, 0x84, 0xDE, 0x6D, 556 0xCC, 0x6C, 0xFD, 0x42, 0x37, 0x98, 0xFB, 0x66, 557 0xAB, 0xD3, 0x73, 0x96, 0x1F, 0xC5, 0xD1, 0x46, 558}; 559static const unsigned char dsa_pqver_seed1[] = { 560 0xEE, 0xA4, 0x02, 0x70, 0x0B, 0x89, 0xB7, 0x96, 561 0x52, 0x5C, 0x00, 0xC4, 0x8E, 0x14, 0x45, 0x0F, 562 0x6A, 0x18, 0x00, 0xF7, 0x24, 0x52, 0x41, 0x0E, 563 0x33, 0x41, 0xD2, 0x91, 0xC3, 0x16, 0x7D, 0x5D, 564}; 565static const struct dsa_pqver_st dsa_pqver_data[] = { 566 { 567 ITM(dsa_pqver_p0), 568 ITM(dsa_pqver_q0), 569 ITM(dsa_pqver_seed0), 570 1956, 571 PASS 572 }, 573 { 574 ITM(dsa_pqver_p1), 575 ITM(dsa_pqver_q1), 576 ITM(dsa_pqver_seed1), 577 685, 578 FAIL 579 }, 580}; 581 582/* dsa_siggen */ 583static const unsigned char dsa_siggen_msg0[]= { 584 0x85, 0x01, 0x2F, 0x61, 0x1C, 0x36, 0xA8, 0xE1, 585 0x54, 0x55, 0x13, 0xFA, 0x00, 0x58, 0x1E, 0xD4, 586 0xF2, 0x4C, 0x54, 0x67, 0xB3, 0xEA, 0x48, 0x2C, 587 0xD1, 0x27, 0xBE, 0x5F, 0x26, 0x35, 0xD4, 0x00, 588 0xDD, 0x6C, 0xD8, 0xE8, 0x3C, 0x6D, 0x2D, 0x50, 589 0x01, 0x53, 0xC7, 0xB5, 0xA3, 0x8E, 0x9A, 0x85, 590 0xA6, 0x53, 0x8C, 0x46, 0x55, 0x02, 0xA1, 0x5E, 591 0xEA, 0x6C, 0xCF, 0x4A, 0x86, 0xA9, 0x34, 0x1B, 592 0x0B, 0xB6, 0x88, 0x9A, 0xDE, 0xC4, 0x27, 0x7F, 593 0x93, 0xAA, 0x69, 0x54, 0x48, 0x33, 0x98, 0xA0, 594 0x71, 0x45, 0x09, 0x5A, 0x51, 0xDF, 0xB6, 0x66, 595 0x06, 0xB7, 0xAD, 0x64, 0xED, 0xC1, 0xFA, 0x6B, 596 0xA8, 0x0F, 0xE8, 0x3C, 0x2E, 0x0C, 0xCB, 0xB0, 597 0xAE, 0xDE, 0x25, 0x0C, 0x68, 0xA8, 0x15, 0x97, 598 0xD0, 0xBC, 0x0B, 0x81, 0x15, 0xDC, 0x2B, 0xF3, 599 0xF2, 0xB7, 0xA7, 0xA9, 0x74, 0xD6, 0x5D, 0xB8, 600 0xB7, 0xD1, 0xFC, 0x5D, 0xCA, 0x69, 0x5D, 0x7D, 601 0xC6, 0x1E, 0x37, 0x7D, 0xD3, 0xA9, 0x1E, 0xAE, 602 0x60, 0x22, 0x3A, 0x4B, 0x7A, 0xB1, 0x3D, 0xA4, 603 0x6D, 0xB3, 0xA5, 0x8C, 0x89, 0x91, 0xCF, 0xE6, 604 0x5B, 0xF9, 0xB6, 0x87, 0x56, 0x75, 0xB9, 0x0B, 605 0x08, 0x85, 0x32, 0x52, 0x81, 0x99, 0xA7, 0x98, 606 0x44, 0x30, 0x3B, 0x44, 0xBC, 0xB8, 0xB2, 0x6D, 607 0x59, 0x52, 0xD3, 0x84, 0x74, 0x65, 0x02, 0xF9, 608 0x71, 0xB9, 0x16, 0x7A, 0x42, 0x62, 0xDE, 0x9B, 609 0x66, 0xF6, 0x04, 0x2C, 0x1F, 0x96, 0xF7, 0x41, 610 0x38, 0x1A, 0xF1, 0x8C, 0x8A, 0x40, 0x9F, 0x72, 611 0x73, 0xF9, 0xE9, 0x35, 0x11, 0x1F, 0x02, 0x0C, 612 0xB1, 0x51, 0xE8, 0x78, 0xDB, 0xE0, 0xB2, 0x35, 613 0xBD, 0xC5, 0x84, 0x5B, 0x2B, 0x25, 0x66, 0x42, 614 0x87, 0xE5, 0xA4, 0x77, 0x71, 0xB4, 0x4A, 0x59, 615 0x31, 0xF1, 0x5A, 0xF5, 0x98, 0x9C, 0x61, 0xEA, 616 0x52, 0x2F, 0x51, 0x85, 0xD9, 0x7F, 0x26, 0xDD, 617 0x91, 0x63, 0x41, 0xD5, 0x99, 0xD1, 0x64, 0xCE, 618 0xEE, 0x82, 0xD1, 0x73, 0x0A, 0x54, 0x3B, 0x03, 619 0xD7, 0xC1, 0xF7, 0x01, 0xBD, 0x44, 0x99, 0xFE, 620 0x9B, 0x1E, 0x2C, 0x8F, 0xF4, 0x55, 0xC5, 0x59, 621 0x58, 0xAF, 0xCB, 0xAD, 0xB8, 0x22, 0x1A, 0x29, 622 0xF3, 0x18, 0x39, 0x31, 0x9B, 0xFC, 0x08, 0x7E, 623 0xBE, 0x45, 0xDA, 0x9E, 0xD8, 0x7F, 0x8C, 0x5D, 624 0x10, 0xF9, 0xF8, 0xB4, 0xFA, 0x58, 0xE6, 0x28, 625 0xB4, 0x6C, 0x70, 0x12, 0xD2, 0xFA, 0x49, 0xB2, 626 0x5F, 0xD0, 0x81, 0x4A, 0xA1, 0xAA, 0xF8, 0x93, 627 0xD2, 0x26, 0xE7, 0xDA, 0x7D, 0x79, 0xC5, 0xC8, 628 0xC2, 0x9E, 0xA7, 0x01, 0xD5, 0x7A, 0xF9, 0x75, 629 0x62, 0xDB, 0xDC, 0x93, 0x90, 0xDA, 0xA5, 0xA6, 630 0x20, 0x58, 0x17, 0x9E, 0x47, 0x4E, 0xFB, 0xB8, 631 0xFB, 0xCD, 0x2E, 0xF4, 0xCD, 0x49, 0x03, 0x90, 632}; 633static struct dsa_siggen_st dsa_siggen_data[] = { 634 { 635 "SHA2-384", 636 3072, 637 256, 638 ITM(dsa_siggen_msg0), 639 }, 640}; 641 642/* dsa_sigver */ 643static const unsigned char dsa_sigver_p0[] = { 644 0xD2, 0x90, 0x2E, 0x38, 0xA5, 0x32, 0xBB, 0x63, 645 0xE0, 0xC3, 0x20, 0xD9, 0x26, 0x06, 0x21, 0x06, 646 0x85, 0x3A, 0x4C, 0xE3, 0x13, 0x83, 0xCA, 0x43, 647 0x8C, 0x9C, 0x76, 0xC0, 0x65, 0x60, 0x27, 0x7E, 648 0x7C, 0xA0, 0x83, 0x9F, 0x65, 0x91, 0xF9, 0x16, 649 0x5F, 0xE8, 0x60, 0x0C, 0xC6, 0x91, 0x20, 0x35, 650 0xE7, 0xF1, 0x83, 0xE6, 0xF8, 0x8C, 0xBB, 0x4C, 651 0xFF, 0xF5, 0x4D, 0x09, 0x8E, 0x83, 0x72, 0xCB, 652 0x22, 0x5F, 0xD0, 0x85, 0xA9, 0x60, 0x3C, 0x4A, 653 0xA6, 0xDD, 0x73, 0x1F, 0xCF, 0xD0, 0xD7, 0x42, 654 0xB8, 0x72, 0x61, 0xDB, 0x91, 0xE3, 0xBB, 0x5C, 655 0x21, 0x41, 0xFD, 0x97, 0xD0, 0x81, 0x72, 0x53, 656 0x77, 0xE0, 0x15, 0x9E, 0xC0, 0xD0, 0x6A, 0xB4, 657 0x7F, 0xF8, 0x63, 0x39, 0x1A, 0x25, 0x63, 0x84, 658 0x4D, 0xBA, 0x2C, 0x29, 0x94, 0x28, 0xCE, 0x5B, 659 0x9A, 0xC3, 0x14, 0xAD, 0x9D, 0x82, 0x1D, 0x8F, 660 0xF3, 0xE9, 0x60, 0x65, 0x28, 0x0B, 0x0E, 0x48, 661 0x6B, 0xCC, 0x05, 0x9D, 0x3B, 0x1F, 0x1D, 0x0A, 662 0xA7, 0xF8, 0x22, 0xB0, 0xE1, 0x52, 0xB0, 0x25, 663 0x8F, 0xEA, 0x25, 0x28, 0xC9, 0x6F, 0x44, 0xCD, 664 0xA4, 0x16, 0x13, 0xE8, 0xD0, 0xDB, 0x43, 0x6E, 665 0xCE, 0xEC, 0x0B, 0xA8, 0x3E, 0x53, 0x10, 0xA2, 666 0x52, 0x0E, 0xBB, 0x63, 0x63, 0x84, 0x2C, 0x12, 667 0x93, 0x29, 0x98, 0xAF, 0x38, 0x8F, 0x0B, 0x86, 668 0x16, 0x99, 0x0E, 0x39, 0xA8, 0x4A, 0x0B, 0xCD, 669 0xAA, 0x66, 0x8F, 0x4C, 0x15, 0xB7, 0xA5, 0xBB, 670 0x22, 0x77, 0x8D, 0xE8, 0x05, 0x35, 0x2D, 0xAA, 671 0x8D, 0x83, 0xDE, 0xBC, 0x15, 0x3D, 0xC2, 0x95, 672 0x0E, 0x47, 0x85, 0x41, 0xAD, 0xE3, 0xB1, 0x70, 673 0x76, 0x1B, 0x62, 0x9E, 0x96, 0x8B, 0x18, 0xD7, 674 0xE3, 0xB5, 0xF8, 0x6E, 0x85, 0x67, 0x61, 0x54, 675 0x7C, 0x85, 0x08, 0x91, 0xF4, 0x46, 0x3F, 0x01, 676 0x99, 0x48, 0x18, 0x3C, 0x0D, 0xC7, 0x2D, 0xEC, 677 0xA4, 0x11, 0x1D, 0x4F, 0x7F, 0xBF, 0x3A, 0xE8, 678 0x9C, 0x1C, 0xAE, 0x9E, 0x30, 0x32, 0x1F, 0x81, 679 0xEF, 0x14, 0xFE, 0x5C, 0xC2, 0x5C, 0xD0, 0x6A, 680 0x7C, 0x18, 0x88, 0x9F, 0xC4, 0x97, 0x7D, 0x4B, 681 0x3B, 0x01, 0xEB, 0x59, 0x58, 0x1C, 0x00, 0x6B, 682 0x3E, 0xD6, 0x80, 0x80, 0x86, 0x06, 0x39, 0x88, 683 0x0D, 0x23, 0x1E, 0xD6, 0x5E, 0x1F, 0x92, 0x3B, 684 0xEC, 0x50, 0x0B, 0xA0, 0x83, 0x4F, 0x10, 0xDE, 685 0xAF, 0x7B, 0x19, 0xBC, 0xBD, 0x72, 0xE6, 0x42, 686 0xFE, 0xD7, 0xEF, 0x22, 0xD3, 0x83, 0x6B, 0x30, 687 0xA3, 0x95, 0x0D, 0x3E, 0x61, 0x9E, 0xBC, 0x0E, 688 0x14, 0x7E, 0x61, 0x05, 0x3D, 0xBA, 0x4E, 0xEF, 689 0x31, 0x75, 0x5D, 0x10, 0x1E, 0xBA, 0xBD, 0xBA, 690 0x89, 0x4D, 0x3A, 0x5B, 0x03, 0xB1, 0xAE, 0x27, 691 0x47, 0x2D, 0x03, 0xB1, 0x8A, 0x74, 0x1B, 0xF3, 692}; 693static const unsigned char dsa_sigver_q0[] = { 694 0xAC, 0x71, 0x8D, 0x81, 0x05, 0x2F, 0xAB, 0x72, 695 0xB9, 0x96, 0x94, 0x98, 0xB5, 0x19, 0x2B, 0xE2, 696 0x78, 0x06, 0xAA, 0x32, 0xFC, 0xB9, 0xD2, 0xFD, 697 0x26, 0xC4, 0x50, 0x6F, 0x81, 0xD8, 0x04, 0xAB, 698}; 699static const unsigned char dsa_sigver_g0[] = { 700 0x3D, 0x0B, 0x46, 0x39, 0x13, 0xFF, 0x67, 0xA8, 701 0x8C, 0xE8, 0x8A, 0x46, 0x46, 0x9A, 0xE6, 0x70, 702 0xA1, 0xF5, 0x48, 0xF5, 0x84, 0xF8, 0x93, 0x57, 703 0x9A, 0x4F, 0x2C, 0xD4, 0x26, 0x49, 0x1C, 0x83, 704 0x64, 0x14, 0x0B, 0x5B, 0xEF, 0x6F, 0x6F, 0x91, 705 0x14, 0xC5, 0x4D, 0xE8, 0x86, 0x47, 0x5C, 0xFC, 706 0xAE, 0xBF, 0xD8, 0x32, 0xE2, 0x96, 0xB9, 0x61, 707 0x70, 0x3F, 0x24, 0x29, 0xFA, 0x41, 0x5D, 0x8E, 708 0xD0, 0xB0, 0xF1, 0x26, 0xD5, 0x7C, 0xE6, 0x17, 709 0x48, 0xE5, 0x04, 0x0E, 0x58, 0x14, 0xEE, 0xBA, 710 0x64, 0xE9, 0xF1, 0x6A, 0x7C, 0x17, 0xAB, 0x7B, 711 0x28, 0xCF, 0x69, 0x7D, 0xDC, 0x54, 0xCA, 0xF2, 712 0x4C, 0x22, 0x17, 0xDD, 0xC3, 0x1A, 0x02, 0xE2, 713 0x8E, 0xE6, 0xA4, 0xFB, 0x84, 0x27, 0x2B, 0xE8, 714 0x14, 0xF3, 0x3D, 0xAC, 0x59, 0x0C, 0xAB, 0x69, 715 0x0E, 0x73, 0xDF, 0x82, 0xC1, 0xDE, 0xD7, 0xD9, 716 0xA7, 0xCA, 0x8F, 0x4B, 0xCE, 0x8A, 0x05, 0xBD, 717 0x07, 0xC8, 0x29, 0xBB, 0x46, 0x29, 0x2A, 0x4F, 718 0xA7, 0x12, 0x19, 0x91, 0x01, 0xA0, 0xAE, 0x16, 719 0xEF, 0xC1, 0xC5, 0x4B, 0x03, 0xF0, 0x53, 0xDC, 720 0xFC, 0x1C, 0xC4, 0x73, 0xB7, 0xBF, 0x53, 0xEB, 721 0x19, 0x63, 0xCA, 0x30, 0x53, 0x54, 0x12, 0x90, 722 0x0E, 0x43, 0xC7, 0x66, 0xFF, 0x29, 0xFC, 0xA4, 723 0xE8, 0xF6, 0x4B, 0x76, 0x3B, 0xA2, 0x65, 0x6B, 724 0x9E, 0xFA, 0xBA, 0x5B, 0x54, 0x94, 0x34, 0xF6, 725 0xD1, 0x20, 0x2A, 0xF7, 0x39, 0x72, 0xA3, 0xDB, 726 0xD1, 0x8F, 0xA6, 0x4D, 0x1B, 0xB1, 0x2D, 0xC5, 727 0x7F, 0xC5, 0x2C, 0x7E, 0x6D, 0xD9, 0xC8, 0xC2, 728 0x19, 0xC0, 0xC4, 0xC2, 0x77, 0xD9, 0x4C, 0x63, 729 0x77, 0x59, 0x0C, 0x5B, 0xFE, 0x69, 0xEF, 0xBF, 730 0x58, 0x47, 0x69, 0x3E, 0x49, 0xA7, 0x1B, 0x98, 731 0x6C, 0xE5, 0xA7, 0x42, 0x8B, 0x0E, 0x68, 0x05, 732 0x48, 0x80, 0x39, 0xF4, 0x02, 0x9E, 0xE2, 0x9F, 733 0x1C, 0xDA, 0x24, 0xC5, 0xB8, 0xEC, 0x03, 0xEA, 734 0x7A, 0x00, 0xDF, 0xCF, 0x58, 0xD0, 0xE7, 0xB7, 735 0xF3, 0xE7, 0x36, 0xDD, 0x1F, 0x65, 0xF9, 0x2D, 736 0x6F, 0xC3, 0xE4, 0x72, 0xFD, 0xBA, 0x58, 0x8D, 737 0xB5, 0xDF, 0x61, 0x3D, 0x3B, 0xB5, 0xF3, 0x08, 738 0xE7, 0x21, 0x5A, 0x7D, 0xFF, 0x02, 0x1E, 0x0E, 739 0x4E, 0xB5, 0x0D, 0x3D, 0x33, 0xF4, 0xA7, 0x6D, 740 0xF7, 0x96, 0xC2, 0x96, 0x85, 0x33, 0x9C, 0x58, 741 0x72, 0x5C, 0x97, 0x73, 0x0E, 0xDC, 0x5C, 0x6B, 742 0x3D, 0x68, 0xF7, 0xF0, 0x0F, 0xCC, 0x01, 0xBB, 743 0x47, 0x01, 0x3C, 0xB0, 0x52, 0x48, 0x70, 0xB8, 744 0x0C, 0x0F, 0x04, 0xB5, 0x8F, 0x70, 0x50, 0x12, 745 0x7C, 0x9D, 0xD1, 0xC1, 0x2B, 0xFE, 0x95, 0x31, 746 0x8F, 0x2D, 0xFA, 0xAC, 0xAE, 0x24, 0xDD, 0x13, 747 0xDA, 0x76, 0xC2, 0x34, 0xB9, 0x4A, 0x3E, 0xC3, 748}; 749static const unsigned char dsa_sigver_pub0[] = { 750 0x91, 0x78, 0x1C, 0xBA, 0x8A, 0x2F, 0xF6, 0xEC, 751 0x9B, 0xD4, 0x73, 0x2C, 0x1F, 0xC0, 0xFE, 0x79, 752 0xCF, 0xAC, 0x0C, 0x3C, 0x0D, 0x81, 0x85, 0x3D, 753 0xCD, 0x67, 0x2B, 0x77, 0x99, 0x4A, 0x51, 0x48, 754 0x58, 0x03, 0xC9, 0x68, 0xE6, 0x19, 0x26, 0x28, 755 0xDC, 0x86, 0x9F, 0x8F, 0xCE, 0xDD, 0x1B, 0xCD, 756 0xDD, 0x63, 0x4E, 0xCE, 0x76, 0x4D, 0xD5, 0x0D, 757 0x71, 0x73, 0x04, 0x03, 0x9C, 0x35, 0xD0, 0x56, 758 0x98, 0x25, 0xA7, 0x06, 0xF2, 0x6B, 0xA9, 0x9F, 759 0x9A, 0xB1, 0x2A, 0xBD, 0xB7, 0x71, 0x62, 0x99, 760 0x06, 0x47, 0x77, 0x22, 0x57, 0xFA, 0x24, 0x21, 761 0x21, 0xB0, 0x78, 0x26, 0x7E, 0xEC, 0xB6, 0xEB, 762 0x82, 0x15, 0x53, 0x68, 0xAE, 0xAC, 0x5B, 0xDC, 763 0xA6, 0x7F, 0x6B, 0x26, 0xE6, 0x59, 0x22, 0x55, 764 0x1C, 0x3B, 0xFD, 0xD5, 0x90, 0xA9, 0x6F, 0xB3, 765 0xE6, 0x99, 0x8E, 0x26, 0x72, 0xA1, 0x02, 0xAA, 766 0x37, 0xF6, 0x89, 0x68, 0xF1, 0x5A, 0x6D, 0x54, 767 0xAD, 0x9D, 0xF3, 0x03, 0xBE, 0x3F, 0x9D, 0x85, 768 0x38, 0x25, 0xB8, 0xDF, 0xB8, 0x43, 0x21, 0xCA, 769 0xF8, 0xDC, 0x12, 0x40, 0x1E, 0xEF, 0x37, 0x40, 770 0xCE, 0x0E, 0x02, 0x88, 0x63, 0x98, 0x2E, 0x93, 771 0x89, 0xB0, 0x43, 0xAC, 0x0E, 0x62, 0x4C, 0x38, 772 0x14, 0xAC, 0x0C, 0xA3, 0x03, 0x10, 0x8E, 0xB4, 773 0x60, 0x10, 0x9B, 0xCC, 0x16, 0xA7, 0xB8, 0x1D, 774 0x73, 0x81, 0x26, 0x12, 0xA8, 0x9A, 0xFE, 0x17, 775 0xBB, 0x2D, 0x33, 0x5E, 0x8C, 0xA4, 0x80, 0xBF, 776 0x84, 0x37, 0xCA, 0x0F, 0x50, 0x23, 0x79, 0x20, 777 0x2A, 0x8E, 0xD1, 0x1F, 0x9F, 0x89, 0x98, 0x4F, 778 0xF5, 0xB6, 0x0F, 0xB9, 0x3C, 0xFC, 0x6C, 0x00, 779 0xBC, 0x76, 0x2F, 0xB4, 0xFD, 0x22, 0x13, 0x37, 780 0x26, 0xCD, 0x9B, 0xAF, 0x4C, 0x89, 0x16, 0xD0, 781 0x73, 0x44, 0xF9, 0x71, 0x60, 0xA2, 0x3E, 0xFE, 782 0x24, 0xFE, 0xFC, 0xFE, 0x90, 0x91, 0xED, 0x92, 783 0x57, 0x0A, 0xFA, 0xEB, 0x21, 0x99, 0xE3, 0x9A, 784 0xFF, 0x5C, 0x74, 0x85, 0xC2, 0x6D, 0x83, 0x90, 785 0xEE, 0x84, 0x05, 0x1A, 0x00, 0xAC, 0x87, 0xA7, 786 0x78, 0x87, 0xCA, 0x70, 0xFC, 0xB0, 0xF4, 0x3B, 787 0x61, 0x7C, 0xD0, 0x09, 0x63, 0x2B, 0x5E, 0xC2, 788 0xFE, 0x15, 0x41, 0xB3, 0x9F, 0xFC, 0x19, 0xE3, 789 0x4D, 0x3C, 0x6F, 0x89, 0xEB, 0x8A, 0x43, 0xEC, 790 0x8E, 0xFB, 0xEC, 0xCD, 0x99, 0x2E, 0x4B, 0x02, 791 0x99, 0xAC, 0xC6, 0x62, 0xAA, 0xC5, 0x0F, 0xA3, 792 0x0B, 0xBB, 0xCD, 0x51, 0x0C, 0x19, 0xA7, 0x7A, 793 0x43, 0x6C, 0xAA, 0x26, 0x28, 0x2A, 0xC9, 0x9D, 794 0x97, 0xAE, 0x83, 0x74, 0xDA, 0xC4, 0x03, 0x98, 795 0x94, 0x58, 0x28, 0xBC, 0x32, 0x1D, 0xD4, 0xF2, 796 0x6F, 0x89, 0x92, 0xD4, 0x80, 0x9B, 0xDE, 0x6B, 797 0xC5, 0x6F, 0xDB, 0x7A, 0x03, 0x1C, 0xF5, 0x55, 798}; 799static const unsigned char dsa_sigver_msg0[] = { 800 0x32, 0xE9, 0x64, 0x47, 0xED, 0x3B, 0xF0, 0xC0, 801 0xCA, 0xC2, 0x90, 0xF5, 0x10, 0x60, 0x99, 0x82, 802 0x4D, 0x13, 0x44, 0xFA, 0x92, 0xD1, 0xFD, 0x50, 803 0x26, 0x80, 0xEA, 0x7B, 0x7D, 0xC5, 0xF0, 0xB7, 804}; 805static const unsigned char dsa_sigver_msg1[] = { 806 0x31, 0xE9, 0x64, 0x47, 0xED, 0x3B, 0xF0, 0xC0, 807 0xCA, 0xC2, 0x90, 0xF5, 0x10, 0x60, 0x99, 0x82, 808 0x4D, 0x13, 0x44, 0xFA, 0x92, 0xD1, 0xFD, 0x50, 809 0x26, 0x80, 0xEA, 0x7B, 0x7D, 0xC5, 0xF0, 0xB7 810}; 811static const unsigned char dsa_sigver_r0[] = { 812 0x2A, 0x24, 0x0F, 0xA7, 0x04, 0xF1, 0xE0, 0x60, 813 0x3B, 0x07, 0xDE, 0xB6, 0x5F, 0x01, 0x20, 0x81, 814 0xDD, 0x64, 0x22, 0x0F, 0x9F, 0x2E, 0x67, 0x33, 815 0xB7, 0x56, 0xDE, 0x17, 0xD0, 0xED, 0x9D, 0x30, 816}; 817static const unsigned char dsa_sigver_s0[] = { 818 0x15, 0x93, 0x81, 0x6E, 0xC2, 0x07, 0x6E, 0x06, 819 0x6A, 0xBF, 0x62, 0xBF, 0x93, 0xA6, 0xCB, 0x6E, 820 0xBA, 0x1E, 0x72, 0x57, 0x27, 0x0E, 0x85, 0x9E, 821 0x8C, 0x42, 0x9A, 0x41, 0x63, 0x27, 0x74, 0x4F, 822}; 823static const struct dsa_sigver_st dsa_sigver_data[] = { 824 { 825 "SHA2-512", 826 ITM(dsa_sigver_p0), 827 ITM(dsa_sigver_q0), 828 ITM(dsa_sigver_g0), 829 ITM(dsa_sigver_pub0), 830 ITM(dsa_sigver_msg0), 831 ITM(dsa_sigver_r0), 832 ITM(dsa_sigver_s0), 833 PASS, 834 }, 835 { 836 "SHA2-512", 837 ITM(dsa_sigver_p0), 838 ITM(dsa_sigver_q0), 839 ITM(dsa_sigver_g0), 840 ITM(dsa_sigver_pub0), 841 ITM(dsa_sigver_msg1), 842 ITM(dsa_sigver_r0), 843 ITM(dsa_sigver_s0), 844 FAIL, 845 }, 846}; 847 848#endif /* OPENSSL_NO_DSA */ 849 850struct cipher_st { 851 const char *alg; 852 const unsigned char *key; 853 size_t key_len; 854 const unsigned char *iv; 855 size_t iv_len; 856 const unsigned char *pt; 857 size_t pt_len; 858 const unsigned char *ct; 859 size_t ct_len; 860}; 861 862struct cipher_ccm_st { 863 const char *alg; 864 const unsigned char *key; 865 size_t key_len; 866 const unsigned char *iv; 867 size_t iv_len; 868 const unsigned char *aad; 869 size_t aad_len; 870 const unsigned char *pt; 871 size_t pt_len; 872 const unsigned char *ct; /* includes the tag */ 873 size_t ct_len; 874}; 875 876struct cipher_gcm_st { 877 const char *alg; 878 const unsigned char *key; 879 size_t key_len; 880 const unsigned char *iv; 881 size_t iv_len; 882 const unsigned char *aad; 883 size_t aad_len; 884 const unsigned char *pt; 885 size_t pt_len; 886 const unsigned char *ct; 887 size_t ct_len; 888 const unsigned char *tag; 889 size_t tag_len; 890}; 891 892 893static const unsigned char cipher_enc_pt0[] = { 894 0xF3, 0x44, 0x81, 0xEC, 0x3C, 0xC6, 0x27, 0xBA, 895 0xCD, 0x5D, 0xC3, 0xFB, 0x08, 0xF2, 0x73, 0xE6, 896}; 897static const unsigned char cipher_enc_pt1[] = { 898 0x1B, 0x07, 0x7A, 0x6A, 0xF4, 0xB7, 0xF9, 0x82, 899 0x29, 0xDE, 0x78, 0x6D, 0x75, 0x16, 0xB6, 0x39, 900}; 901static const unsigned char cipher_enc_pt2[] = { 902 0x91, 0x07, 0x41, 0x31, 0xF1, 0xF8, 0x6C, 0xCD, 903 0x54, 0x8D, 0x22, 0xA6, 0x93, 0x40, 0xFF, 0x39, 904}; 905static const unsigned char cipher_enc_pt3[] = { 906 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 907 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 908 0x10, 0x11, 0x12, 0x13 909}; 910static const unsigned char cipher_enc_key0[] = { 911 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 912 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 913}; 914static const unsigned char cipher_enc_key1[] = { 915 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 916 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 917 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 918}; 919static const unsigned char cipher_enc_key2[] = { 920 0xE8, 0x70, 0x13, 0x1C, 0xE7, 0x03, 0xD6, 0x51, 921 0x4E, 0x76, 0x1F, 0x95, 0xE6, 0xEE, 0x9E, 0xFB, 922}; 923static const unsigned char cipher_enc_key3[] = { 924 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 925 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0, 926 0xbf, 0xbe, 0xbd, 0xbc, 0xbb, 0xba, 0xb9, 0xb8, 927 0xb7, 0xb6, 0xb5, 0xb4, 0xb3, 0xb2, 0xb1, 0xb0, 928}; 929static const unsigned char cipher_enc_ct0[] = { 930 0x03, 0x36, 0x76, 0x3E, 0x96, 0x6D, 0x92, 0x59, 931 0x5A, 0x56, 0x7C, 0xC9, 0xCE, 0x53, 0x7F, 0x5E, 932}; 933static const unsigned char cipher_enc_ct1[] = { 934 0x27, 0x5C, 0xFC, 0x04, 0x13, 0xD8, 0xCC, 0xB7, 935 0x05, 0x13, 0xC3, 0x85, 0x9B, 0x1D, 0x0F, 0x72, 936}; 937static const unsigned char cipher_enc_ct2[] = { 938 0x3A, 0xF6, 0x4C, 0x70, 0x37, 0xEE, 0x48, 0x13, 939 0xD8, 0x5F, 0xE9, 0xB3, 0x7F, 0xE6, 0x6A, 0xD4, 940}; 941static const unsigned char cipher_enc_ct3[] = { 942 0x9d, 0x84, 0xc8, 0x13, 0xf7, 0x19, 0xaa, 0x2c, 943 0x7b, 0xe3, 0xf6, 0x61, 0x71, 0xc7, 0xc5, 0xc2, 944 0xed, 0xbf, 0x9d, 0xac, 945}; 946static const unsigned char cipher_enc_iv0[] = { 947 0x00, 948}; 949static const unsigned char cipher_enc_iv1[] = { 950 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 951 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 952}; 953static const unsigned char cipher_enc_iv2[] = { 954 0x53, 0xF2, 0x25, 0xD8, 0xDE, 0x97, 0xF1, 0x4B, 955 0xFE, 0x3E, 0xC6, 0x5E, 0xC3, 0xFF, 0xF7, 0xD3, 956}; 957static const unsigned char cipher_enc_iv3[] = { 958 0x9a, 0x78, 0x56, 0x34, 0x12, 0x00, 0x00, 0x00, 959 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 960}; 961 962static const struct cipher_st cipher_enc_data[] = { 963 { 964 "AES-128-ECB", 965 ITM(cipher_enc_key0), 966 NULL, 0, /* iv */ 967 ITM(cipher_enc_pt0), 968 ITM(cipher_enc_ct0), 969 }, 970 { 971 "AES-192-CBC", 972 ITM(cipher_enc_key1), 973 ITM(cipher_enc_iv1), 974 ITM(cipher_enc_pt1), 975 ITM(cipher_enc_ct1), 976 }, 977 { 978 "AES-128-CTR", 979 ITM(cipher_enc_key2), 980 ITM(cipher_enc_iv2), 981 ITM(cipher_enc_pt2), 982 ITM(cipher_enc_ct2), 983 }, 984 { 985 "AES-128-XTS", 986 ITM(cipher_enc_key3), 987 ITM(cipher_enc_iv3), 988 ITM(cipher_enc_pt3), 989 ITM(cipher_enc_ct3), 990 } 991}; 992 993static const unsigned char aes_ccm_enc_pt0[] = { 994 0xDA, 0x6A, 0xDC, 0xB2, 0xA5, 0xCC, 0xC3, 0xE7, 995 0xFC, 0x4C, 0xDF, 0x0A, 0xAB, 0xDC, 0x3B, 0x38, 996 0x26, 0x8B, 0x21, 0x82, 0xCA, 0x26, 0xE6, 0x2C, 997}; 998static const unsigned char aes_ccm_enc_key0[] = { 999 0xDE, 0xF8, 0x67, 0xBC, 0x40, 0xB6, 0x7C, 0xAA, 1000 0x4A, 0x00, 0xE8, 0x07, 0x24, 0x52, 0xAE, 0x72, 1001}; 1002static const unsigned char aes_ccm_enc_aad0[] = { 1003 0x29, 0x8D, 0x01, 0x92, 0x3B, 0x50, 0x1F, 0x66, 1004 0xCE, 0xD3, 0x57, 0x4B, 0x7B, 0x4F, 0x07, 0x57, 1005}; 1006static const unsigned char aes_ccm_enc_iv0[] = { 1007 0x44, 0xEE, 0x48, 0x11, 0x4D, 0x3B, 0x71, 0x33, 1008 0xF0, 0xF7, 0x12, 0xA2, 0xA5, 1009}; 1010static const unsigned char aes_ccm_enc_ct0[] = { 1011 0x30, 0x4D, 0x19, 0x31, 0x02, 0x66, 0x95, 0x2E, 1012 0x23, 0x6D, 0xF4, 0xB9, 0xDF, 0xFE, 0xCA, 0x92, 1013 0x04, 0x2A, 0x32, 0xB5, 0x08, 0x2C, 0x8B, 0x6F, 1014 0x1B, 0x14, 0xB8, 0x62, 0x8B, 0xA0, 0x12, 0x4E, 1015 0x6A, 0x6F, 0x85, 0x86, 0x24, 0x6A, 0x83, 0xE0, 1016}; 1017static const struct cipher_ccm_st aes_ccm_enc_data[] = { 1018 { 1019 "AES-128-CCM", 1020 ITM(aes_ccm_enc_key0), 1021 ITM(aes_ccm_enc_iv0), 1022 ITM(aes_ccm_enc_aad0), 1023 ITM(aes_ccm_enc_pt0), 1024 ITM(aes_ccm_enc_ct0), 1025 }, 1026}; 1027 1028static const unsigned char aes_gcm_enc_pt0[] = { 1029 0x97, 1030}; 1031static const unsigned char aes_gcm_enc_key0[] = { 1032 0x3E, 0x77, 0x38, 0xA6, 0x0A, 0xB3, 0x95, 0x90, 1033 0xFA, 0x8B, 0x3B, 0xCF, 0xE1, 0xA3, 0x8C, 0x7D, 1034}; 1035static const unsigned char aes_gcm_enc_aad0[] = { 1036 0xE7, 0xEF, 0xCB, 0x0F, 0x3D, 0x94, 0x1D, 0x0F, 1037 0x3D, 0x65, 0x69, 0xFC, 0xDA, 0x77, 0x36, 0x5E, 1038 0xB9, 0x20, 0xF8, 0xDA, 0x81, 0xDF, 0x6B, 0x4C, 1039 0x2A, 0x70, 0x5E, 0xE3, 0x07, 0xCE, 0xCF, 0x62, 1040 0x84, 1041}; 1042static const unsigned char aes_gcm_enc_iv0[] = { 1043 0x01, 0x02, 0x03, 0x04, 0xEB, 0xED, 0x2F, 0x4B, 1044 0xD1, 0x20, 0x2C, 0xCD, 1045}; 1046static const unsigned char aes_gcm_enc_ct0[] = { 1047 0x63, 1048}; 1049static const unsigned char aes_gcm_enc_tag0[] = { 1050 0xA2, 0x8E, 0xA5, 0xF6, 0x6A, 0x1C, 0xE6, 0xD7, 1051 0xFF, 0xCD, 0x7F, 0x49, 1052}; 1053static const struct cipher_gcm_st aes_gcm_enc_data[] = { 1054 { 1055 "AES-128-GCM", 1056 ITM(aes_gcm_enc_key0), 1057 ITM(aes_gcm_enc_iv0), 1058 ITM(aes_gcm_enc_aad0), 1059 ITM(aes_gcm_enc_pt0), 1060 ITM(aes_gcm_enc_ct0), 1061 ITM(aes_gcm_enc_tag0), 1062 }, 1063}; 1064 1065#ifndef OPENSSL_NO_DH 1066 1067struct dh_safe_prime_keygen_st { 1068 const char *group_name; 1069}; 1070 1071struct dh_safe_prime_keyver_st { 1072 const char *group_name; 1073 const unsigned char *pub; 1074 size_t pub_len; 1075 const unsigned char *priv; 1076 size_t priv_len; 1077 int pass; 1078}; 1079 1080static const struct dh_safe_prime_keygen_st dh_safe_prime_keygen_data[] = { 1081 { "ffdhe2048" }, 1082}; 1083 1084static const unsigned char dh_safe_prime_keyver_priv0[] = { 1085 0x39, 0x9C, 0x08, 0x8E, 0x4A, 0x1E, 0x1A, 0x03, 1086 0x18, 0x5A, 0x72, 0x4F, 0xCB, 0x13, 0xFB, 0x8F, 1087 0x7F, 0x14, 0x12, 0x48, 0x9A, 0x18, 0x03, 0x1C, 1088 0x03, 0x98, 0x7E, 0x3C, 0xEF, 0x57, 0xF2, 0x1E, 1089 0xD5, 0x54, 0x5C, 0x0F, 0x36, 0x5E, 0xB0, 0xF8, 1090 0xD1, 0x27, 0x79, 0x24, 0x69, 0xB5, 0x7C, 0xF1, 1091 0x39, 0xFC, 0xE3, 0x79, 0xF0, 0xD6, 0xA0, 0xE1, 1092 0xA5, 0xA7, 0x65, 0x01, 0xBA, 0xFE, 0xBB, 0x28, 1093 0xF0, 0x9C, 0x49, 0x90, 0x68, 0xB4, 0xE7, 0xE2, 1094 0xB6, 0xBF, 0xB9, 0xF8, 0x96, 0xAA, 0xF9, 0xE6, 1095 0x0B, 0x8A, 0x86, 0x0D, 0x31, 0x2C, 0x90, 0xDA, 1096 0x4E, 0xFB, 0xE3, 0x59, 0x3F, 0xFB, 0x14, 0x33, 1097 0xF6, 0xBD, 0xDA, 0x5D, 0x27, 0xCC, 0x7C, 0x1C, 1098 0x30, 0xC8, 0xB2, 0xAF, 0x2A, 0xA8, 0x25, 0x97, 1099 0xDC, 0x5E, 0xEF, 0x22, 0xCB, 0xF6, 0x88, 0x83, 1100 0xD0, 0x47, 0x3F, 0x5D, 0xF3, 0x2A, 0xE0, 0xCC, 1101 0x86, 0x49, 0x5A, 0x8F, 0x67, 0xF6, 0xC4, 0xD8, 1102 0x3F, 0x09, 0xE8, 0x49, 0x89, 0x2E, 0xC0, 0xB4, 1103 0x9C, 0x06, 0x9C, 0x40, 0x10, 0xFB, 0x20, 0xC6, 1104 0xF1, 0x5F, 0x52, 0x3F, 0x21, 0xBF, 0xBB, 0x13, 1105 0x6A, 0x81, 0x1C, 0xFF, 0x19, 0x2A, 0x36, 0xD2, 1106 0x13, 0x23, 0x33, 0xD1, 0xEF, 0x34, 0xF3, 0xA6, 1107 0xD5, 0x56, 0xAF, 0x1A, 0x63, 0xFC, 0x95, 0x86, 1108 0xD5, 0xEB, 0xBF, 0x49, 0x84, 0x73, 0x30, 0x1D, 1109 0xE2, 0xA1, 0xAE, 0x6D, 0x20, 0x69, 0xAE, 0xB6, 1110 0x1A, 0xB9, 0xF2, 0x7A, 0xE3, 0x17, 0x4E, 0x7C, 1111 0x8F, 0xE8, 0x34, 0x02, 0x59, 0xB4, 0x54, 0x9A, 1112 0x8D, 0x19, 0x04, 0x2A, 0x8E, 0xF8, 0x05, 0xA3, 1113 0x98, 0x5B, 0xBD, 0xB4, 0x6A, 0xDA, 0xAA, 0x1F, 1114 0xFC, 0x56, 0xA0, 0x4D, 0x22, 0x66, 0x31, 0xEA, 1115 0x8A, 0xC8, 0x61, 0x12, 0x40, 0xF0, 0x38, 0x0B, 1116 0xA3, 0x23, 0x40, 0x97, 0x7A, 0x18, 0xE3, 0x42, 1117}; 1118static const unsigned char dh_safe_prime_keyver_pub0[] = { 1119 0xFA, 0xDA, 0x86, 0x67, 0xE9, 0x12, 0x67, 0x79, 1120 0x50, 0xAE, 0x64, 0x0B, 0x07, 0x47, 0x8F, 0xA5, 1121 0xD1, 0x27, 0x6C, 0xFC, 0x10, 0xD8, 0x90, 0x8D, 1122 0x93, 0x75, 0xAD, 0x31, 0xBD, 0x97, 0xBE, 0xD5, 1123 0xB5, 0x59, 0x2F, 0x37, 0x52, 0x32, 0x30, 0x75, 1124 0xD3, 0xA5, 0x36, 0x10, 0x62, 0x4C, 0x82, 0x06, 1125 0xB9, 0x29, 0xAE, 0x14, 0xD1, 0xB0, 0xD0, 0x23, 1126 0x7A, 0xE6, 0xEA, 0x7E, 0x8E, 0xE3, 0xC7, 0xEB, 1127 0x43, 0x78, 0xFA, 0x9A, 0x40, 0x9A, 0x6F, 0xF5, 1128 0x42, 0x8A, 0xF7, 0xF3, 0x92, 0xE6, 0x5D, 0x68, 1129 0x9B, 0x2A, 0x91, 0xB5, 0x37, 0x33, 0x3F, 0x35, 1130 0xA5, 0xFB, 0x54, 0xD1, 0x3C, 0x46, 0xC6, 0x3C, 1131 0x16, 0x3A, 0xD7, 0xF8, 0x55, 0x48, 0x9A, 0xB7, 1132 0xB1, 0x40, 0xBF, 0xAF, 0x26, 0x1B, 0x07, 0x0F, 1133 0x11, 0x04, 0x63, 0x06, 0xDA, 0x2D, 0x45, 0x0E, 1134 0x7F, 0x17, 0xA4, 0x38, 0xBD, 0x68, 0x5A, 0xA9, 1135 0xC4, 0x7F, 0x7E, 0xC7, 0xF0, 0xFC, 0x74, 0x87, 1136 0x55, 0xCD, 0x35, 0xA8, 0xAA, 0x59, 0xA7, 0xFA, 1137 0xC1, 0x34, 0x67, 0x04, 0xD8, 0xCC, 0xE1, 0x77, 1138 0x60, 0xE1, 0xBE, 0xC0, 0xA5, 0x52, 0xA4, 0x72, 1139 0x3A, 0x19, 0xFA, 0x76, 0xC8, 0x67, 0x60, 0x5E, 1140 0x1C, 0x43, 0xF4, 0x50, 0xA0, 0xCB, 0x33, 0x77, 1141 0x2D, 0x2D, 0x3B, 0x5D, 0x7D, 0x72, 0x2E, 0x38, 1142 0xCD, 0x71, 0xB1, 0xBF, 0xB5, 0x10, 0x80, 0xCD, 1143 0xA4, 0x5D, 0x70, 0x6E, 0xD5, 0x7E, 0xA2, 0xAA, 1144 0xDC, 0xA4, 0x7C, 0x7A, 0x7D, 0x21, 0x09, 0x6A, 1145 0x14, 0xB2, 0x21, 0x24, 0xA4, 0xF4, 0x6C, 0xD2, 1146 0xBA, 0x76, 0x99, 0xD7, 0x69, 0x44, 0xA8, 0x66, 1147 0x85, 0x08, 0x50, 0xBA, 0x42, 0x37, 0xA2, 0xC2, 1148 0xD5, 0x45, 0x7E, 0x7B, 0xE9, 0x4A, 0xAE, 0xEE, 1149 0x84, 0x2A, 0xEB, 0xA9, 0x4A, 0x69, 0x40, 0x83, 1150 0xBA, 0xCC, 0x1E, 0x1B, 0x25, 0x56, 0x13, 0x88, 1151}; 1152static const struct dh_safe_prime_keyver_st dh_safe_prime_keyver_data[] = { 1153 { 1154 "ffdhe2048", 1155 ITM(dh_safe_prime_keyver_pub0), 1156 ITM(dh_safe_prime_keyver_priv0), 1157 PASS 1158 }, 1159}; 1160 1161#endif /* OPENSSL_NO_DH */ 1162 1163struct rsa_keygen_st { 1164 size_t mod; 1165 const unsigned char *e; 1166 size_t e_len; 1167 const unsigned char *xp1; 1168 size_t xp1_len; 1169 const unsigned char *xp2; 1170 size_t xp2_len; 1171 const unsigned char *xp; 1172 size_t xp_len; 1173 const unsigned char *xq1; 1174 size_t xq1_len; 1175 const unsigned char *xq2; 1176 size_t xq2_len; 1177 const unsigned char *xq; 1178 size_t xq_len; 1179 1180 const unsigned char *p1; 1181 size_t p1_len; 1182 const unsigned char *p2; 1183 size_t p2_len; 1184 const unsigned char *q1; 1185 size_t q1_len; 1186 const unsigned char *q2; 1187 size_t q2_len; 1188 const unsigned char *p; 1189 size_t p_len; 1190 const unsigned char *q; 1191 size_t q_len; 1192 const unsigned char *n; 1193 size_t n_len; 1194 const unsigned char *d; 1195 size_t d_len; 1196}; 1197 1198static const unsigned char rsa_keygen0_e[] = { 1199 0x01,0x00,0x01 1200}; 1201static const unsigned char rsa_keygen0_xp[] = { 1202 0xcf,0x72,0x1b,0x9a,0xfd,0x0d,0x22,0x1a,0x74,0x50,0x97,0x22,0x76,0xd8,0xc0, 1203 0xc2,0xfd,0x08,0x81,0x05,0xdd,0x18,0x21,0x99,0x96,0xd6,0x5c,0x79,0xe3,0x02, 1204 0x81,0xd7,0x0e,0x3f,0x3b,0x34,0xda,0x61,0xc9,0x2d,0x84,0x86,0x62,0x1e,0x3d, 1205 0x5d,0xbf,0x92,0x2e,0xcd,0x35,0x3d,0x6e,0xb9,0x59,0x16,0xc9,0x82,0x50,0x41, 1206 0x30,0x45,0x67,0xaa,0xb7,0xbe,0xec,0xea,0x4b,0x9e,0xa0,0xc3,0x05,0xb3,0x88, 1207 0xd4,0x4c,0xac,0xeb,0xe4,0x03,0xc6,0xca,0xcb,0xd9,0xd3,0x4e,0xf6,0x7f,0x2c, 1208 0x27,0x1e,0x08,0x6c,0xc2,0xd6,0x45,0x1f,0x84,0xe4,0x3c,0x97,0x19,0xde,0xb8, 1209 0x55,0xaf,0x0e,0xcf,0x9e,0xb0,0x9c,0x20,0xd3,0x1f,0xa8,0xd7,0x52,0xc2,0x95, 1210 0x1c,0x80,0x15,0x42,0x4d,0x4f,0x19,0x16 1211}; 1212static const unsigned char rsa_keygen0_xp1[] = { 1213 0xac,0x5f,0x7f,0x6e,0x33,0x3e,0x97,0x3a,0xb3,0x17,0x44,0xa9,0x0f,0x7a,0x54, 1214 0x70,0x27,0x06,0x93,0xd5,0x49,0xde,0x91,0x83,0xbc,0x8a,0x7b,0x95 1215}; 1216static const unsigned char rsa_keygen0_xp2[] = { 1217 0x0b,0xf6,0xe8,0x79,0x5a,0x81,0xae,0x90,0x1d,0xa4,0x38,0x74,0x9c,0x0e,0x6f, 1218 0xe0,0x03,0xcf,0xc4,0x53,0x16,0x32,0x17,0xf7,0x09,0x5f,0xd9 1219}; 1220static const unsigned char rsa_keygen0_xq[] = { 1221 0xfe,0xab,0xf2,0x7c,0x16,0x4a,0xf0,0x8d,0x31,0xc6,0x0a,0x82,0xe2,0xae,0xbb, 1222 0x03,0x7e,0x7b,0x20,0x4e,0x64,0xb0,0x16,0xad,0x3c,0x01,0x1a,0xd3,0x54,0xbf, 1223 0x2b,0xa4,0x02,0x9e,0xc3,0x0d,0x60,0x3d,0x1f,0xb9,0xc0,0x0d,0xe6,0x97,0x68, 1224 0xbb,0x8c,0x81,0xd5,0xc1,0x54,0x96,0x0f,0x99,0xf0,0xa8,0xa2,0xf3,0xc6,0x8e, 1225 0xec,0xbc,0x31,0x17,0x70,0x98,0x24,0xa3,0x36,0x51,0xa8,0x54,0xbd,0x9a,0x89, 1226 0x99,0x6e,0x57,0x5e,0xd0,0x39,0x86,0xc3,0xa3,0x1b,0xc7,0xcf,0xc4,0x4f,0x47, 1227 0x25,0x9e,0x2c,0x79,0xe1,0x2c,0xcc,0xe4,0x63,0xf4,0x02,0x84,0xf8,0xf6,0xa1, 1228 0x5c,0x93,0x14,0xf2,0x68,0x5f,0x3a,0x90,0x2f,0x4e,0x5e,0xf9,0x16,0x05,0xcf, 1229 0x21,0x63,0xca,0xfa,0xb0,0x08,0x02,0xc0 1230}; 1231static const unsigned char rsa_keygen0_xq1[] = { 1232 0x9b,0x02,0xd4,0xba,0xf0,0xaa,0x14,0x99,0x6d,0xc0,0xb7,0xa5,0xe1,0xd3,0x70, 1233 0xb6,0x5a,0xa2,0x9b,0x59,0xd5,0x8c,0x1e,0x9f,0x3f,0x9a,0xde,0xeb,0x9e,0x9c, 1234 0x61,0xd6,0x5a,0xe1 1235}; 1236static const unsigned char rsa_keygen0_xq2[] = { 1237 0x06,0x81,0x53,0xfd,0xa8,0x7b,0xa3,0x85,0x90,0x15,0x2c,0x97,0xb2,0xa0,0x17, 1238 0x48,0xb0,0x7f,0x0a,0x01,0x6d 1239}; 1240/* expected values */ 1241static const unsigned char rsa_keygen0_p1[] = { 1242 0xac,0x5f,0x7f,0x6e,0x33,0x3e,0x97,0x3a,0xb3,0x17,0x44,0xa9,0x0f,0x7a,0x54, 1243 0x70,0x27,0x06,0x93,0xd5,0x49,0xde,0x91,0x83,0xbc,0x8a,0x7b,0xc3 1244}; 1245static const unsigned char rsa_keygen0_p2[] = { 1246 0x0b,0xf6,0xe8,0x79,0x5a,0x81,0xae,0x90,0x1d,0xa4,0x38,0x74,0x9c,0x0e,0x6f, 1247 0xe0,0x03,0xcf,0xc4,0x53,0x16,0x32,0x17,0xf7,0x09,0x5f,0xd9 1248}; 1249static const unsigned char rsa_keygen0_q1[] = { 1250 0x9b,0x02,0xd4,0xba,0xf0,0xaa,0x14,0x99,0x6d,0xc0,0xb7,0xa5,0xe1,0xd3,0x70, 1251 0xb6,0x5a,0xa2,0x9b,0x59,0xd5,0x8c,0x1e,0x9f,0x3f,0x9a,0xde,0xeb,0x9e,0x9c, 1252 0x61,0xd6,0x5d,0x47 1253}; 1254static const unsigned char rsa_keygen0_q2[] = { 1255 0x06,0x81,0x53,0xfd,0xa8,0x7b,0xa3,0x85,0x90,0x15,0x2c,0x97,0xb2,0xa0,0x17, 1256 0x48,0xb0,0x7f,0x0a,0x01,0x8f 1257}; 1258static const unsigned char rsa_keygen0_p[] = { 1259 0xcf,0x72,0x1b,0x9a,0xfd,0x0d,0x22,0x1a,0x74,0x50,0x97,0x22,0x76,0xd8,0xc0, 1260 0xc2,0xfd,0x08,0x81,0x05,0xdd,0x18,0x21,0x99,0x96,0xd6,0x5c,0x79,0xe3,0x02, 1261 0x81,0xd7,0x0e,0x3f,0x3b,0x34,0xda,0x61,0xc9,0x2d,0x84,0x86,0x62,0x1e,0x3d, 1262 0x5d,0xbf,0x92,0x2e,0xcd,0x35,0x3d,0x6e,0xb9,0x59,0x16,0xc9,0x82,0x50,0x41, 1263 0x30,0x45,0x67,0xaa,0xb7,0xbe,0xec,0xea,0x4b,0x9e,0xa0,0xc3,0x05,0xbc,0x4c, 1264 0x01,0xa5,0x4b,0xbd,0xa4,0x20,0xb5,0x20,0xd5,0x59,0x6f,0x82,0x5c,0x8f,0x4f, 1265 0xe0,0x3a,0x4e,0x7e,0xfe,0x44,0xf3,0x3c,0xc0,0x0e,0x14,0x2b,0x32,0xe6,0x28, 1266 0x8b,0x63,0x87,0x00,0xc3,0x53,0x4a,0x5b,0x71,0x7a,0x5b,0x28,0x40,0xc4,0x18, 1267 0xb6,0x77,0x0b,0xab,0x59,0xa4,0x96,0x7d 1268}; 1269static const unsigned char rsa_keygen0_q[] = { 1270 0xfe,0xab,0xf2,0x7c,0x16,0x4a,0xf0,0x8d,0x31,0xc6,0x0a,0x82,0xe2,0xae,0xbb, 1271 0x03,0x7e,0x7b,0x20,0x4e,0x64,0xb0,0x16,0xad,0x3c,0x01,0x1a,0xd3,0x54,0xbf, 1272 0x2b,0xa4,0x02,0x9e,0xc3,0x0d,0x60,0x3d,0x1f,0xb9,0xc0,0x0d,0xe6,0x97,0x68, 1273 0xbb,0x8c,0x81,0xd5,0xc1,0x54,0x96,0x0f,0x99,0xf0,0xa8,0xa2,0xf3,0xc6,0x8e, 1274 0xec,0xbc,0x31,0x17,0x70,0x98,0x24,0xa3,0x36,0x51,0xa8,0x54,0xc4,0x44,0xdd, 1275 0xf7,0x7e,0xda,0x47,0x4a,0x67,0x44,0x5d,0x4e,0x75,0xf0,0x4d,0x00,0x68,0xe1, 1276 0x4a,0xec,0x1f,0x45,0xf9,0xe6,0xca,0x38,0x95,0x48,0x6f,0xdc,0x9d,0x1b,0xa3, 1277 0x4b,0xfd,0x08,0x4b,0x54,0xcd,0xeb,0x3d,0xef,0x33,0x11,0x6e,0xce,0xe4,0x5d, 1278 0xef,0xa9,0x58,0x5c,0x87,0x4d,0xc8,0xcf 1279}; 1280static const unsigned char rsa_keygen0_n[] = { 1281 0xce,0x5e,0x8d,0x1a,0xa3,0x08,0x7a,0x2d,0xb4,0x49,0x48,0xf0,0x06,0xb6,0xfe, 1282 0xba,0x2f,0x39,0x7c,0x7b,0xe0,0x5d,0x09,0x2d,0x57,0x4e,0x54,0x60,0x9c,0xe5, 1283 0x08,0x4b,0xe1,0x1a,0x73,0xc1,0x5e,0x2f,0xb6,0x46,0xd7,0x81,0xca,0xbc,0x98, 1284 0xd2,0xf9,0xef,0x1c,0x92,0x8c,0x8d,0x99,0x85,0x28,0x52,0xd6,0xd5,0xab,0x70, 1285 0x7e,0x9e,0xa9,0x87,0x82,0xc8,0x95,0x64,0xeb,0xf0,0x6c,0x0f,0x3f,0xe9,0x02, 1286 0x29,0x2e,0x6d,0xa1,0xec,0xbf,0xdc,0x23,0xdf,0x82,0x4f,0xab,0x39,0x8d,0xcc, 1287 0xac,0x21,0x51,0x14,0xf8,0xef,0xec,0x73,0x80,0x86,0xa3,0xcf,0x8f,0xd5,0xcf, 1288 0x22,0x1f,0xcc,0x23,0x2f,0xba,0xcb,0xf6,0x17,0xcd,0x3a,0x1f,0xd9,0x84,0xb9, 1289 0x88,0xa7,0x78,0x0f,0xaa,0xc9,0x04,0x01,0x20,0x72,0x5d,0x2a,0xfe,0x5b,0xdd, 1290 0x16,0x5a,0xed,0x83,0x02,0x96,0x39,0x46,0x37,0x30,0xc1,0x0d,0x87,0xc2,0xc8, 1291 0x33,0x38,0xed,0x35,0x72,0xe5,0x29,0xf8,0x1f,0x23,0x60,0xe1,0x2a,0x5b,0x1d, 1292 0x6b,0x53,0x3f,0x07,0xc4,0xd9,0xbb,0x04,0x0c,0x5c,0x3f,0x0b,0xc4,0xd4,0x61, 1293 0x96,0x94,0xf1,0x0f,0x4a,0x49,0xac,0xde,0xd2,0xe8,0x42,0xb3,0x4a,0x0b,0x64, 1294 0x7a,0x32,0x5f,0x2b,0x5b,0x0f,0x8b,0x8b,0xe0,0x33,0x23,0x34,0x64,0xf8,0xb5, 1295 0x7f,0x69,0x60,0xb8,0x71,0xe9,0xff,0x92,0x42,0xb1,0xf7,0x23,0xa8,0xa7,0x92, 1296 0x04,0x3d,0x6b,0xff,0xf7,0xab,0xbb,0x14,0x1f,0x4c,0x10,0x97,0xd5,0x6b,0x71, 1297 0x12,0xfd,0x93,0xa0,0x4a,0x3b,0x75,0x72,0x40,0x96,0x1c,0x5f,0x40,0x40,0x57, 1298 0x13 1299}; 1300static const unsigned char rsa_keygen0_d[] = { 1301 0x47,0x47,0x49,0x1d,0x66,0x2a,0x4b,0x68,0xf5,0xd8,0x4a,0x24,0xfd,0x6c,0xbf, 1302 0x56,0xb7,0x70,0xf7,0x9a,0x21,0xc8,0x80,0x9e,0xf4,0x84,0xcd,0x88,0x01,0x28, 1303 0xea,0x50,0xab,0x13,0x63,0xdf,0xea,0x14,0x38,0xb5,0x07,0x42,0x81,0x2f,0xda, 1304 0xe9,0x24,0x02,0x7e,0xaf,0xef,0x74,0x09,0x0e,0x80,0xfa,0xfb,0xd1,0x19,0x41, 1305 0xe5,0xba,0x0f,0x7c,0x0a,0xa4,0x15,0x55,0xa2,0x58,0x8c,0x3a,0x48,0x2c,0xc6, 1306 0xde,0x4a,0x76,0xfb,0x72,0xb6,0x61,0xe6,0xd2,0x10,0x44,0x4c,0x33,0xb8,0xd2, 1307 0x74,0xb1,0x9d,0x3b,0xcd,0x2f,0xb1,0x4f,0xc3,0x98,0xbd,0x83,0xb7,0x7e,0x75, 1308 0xe8,0xa7,0x6a,0xee,0xcc,0x51,0x8c,0x99,0x17,0x67,0x7f,0x27,0xf9,0x0d,0x6a, 1309 0xb7,0xd4,0x80,0x17,0x89,0x39,0x9c,0xf3,0xd7,0x0f,0xdf,0xb0,0x55,0x80,0x1d, 1310 0xaf,0x57,0x2e,0xd0,0xf0,0x4f,0x42,0x69,0x55,0xbc,0x83,0xd6,0x97,0x83,0x7a, 1311 0xe6,0xc6,0x30,0x6d,0x3d,0xb5,0x21,0xa7,0xc4,0x62,0x0a,0x20,0xce,0x5e,0x5a, 1312 0x17,0x98,0xb3,0x6f,0x6b,0x9a,0xeb,0x6b,0xa3,0xc4,0x75,0xd8,0x2b,0xdc,0x5c, 1313 0x6f,0xec,0x5d,0x49,0xac,0xa8,0xa4,0x2f,0xb8,0x8c,0x4f,0x2e,0x46,0x21,0xee, 1314 0x72,0x6a,0x0e,0x22,0x80,0x71,0xc8,0x76,0x40,0x44,0x61,0x16,0xbf,0xa5,0xf8, 1315 0x89,0xc7,0xe9,0x87,0xdf,0xbd,0x2e,0x4b,0x4e,0xc2,0x97,0x53,0xe9,0x49,0x1c, 1316 0x05,0xb0,0x0b,0x9b,0x9f,0x21,0x19,0x41,0xe9,0xf5,0x61,0xd7,0x33,0x2e,0x2c, 1317 0x94,0xb8,0xa8,0x9a,0x3a,0xcc,0x6a,0x24,0x8d,0x19,0x13,0xee,0xb9,0xb0,0x48, 1318 0x61 1319}; 1320 1321static const struct rsa_keygen_st rsa_keygen_data[] = { 1322 { 1323 2048, 1324 ITM(rsa_keygen0_e), 1325 ITM(rsa_keygen0_xp1), 1326 ITM(rsa_keygen0_xp2), 1327 ITM(rsa_keygen0_xp), 1328 ITM(rsa_keygen0_xq1), 1329 ITM(rsa_keygen0_xq2), 1330 ITM(rsa_keygen0_xq), 1331 1332 ITM(rsa_keygen0_p1), 1333 ITM(rsa_keygen0_p2), 1334 ITM(rsa_keygen0_q1), 1335 ITM(rsa_keygen0_q2), 1336 1337 ITM(rsa_keygen0_p), 1338 ITM(rsa_keygen0_q), 1339 ITM(rsa_keygen0_n), 1340 ITM(rsa_keygen0_d), 1341 }, 1342}; 1343 1344#define NO_PSS_SALT_LEN -1 1345struct rsa_siggen_st { 1346 const char *sig_pad_mode; 1347 size_t mod; 1348 const char *digest_alg; 1349 const unsigned char *msg; 1350 size_t msg_len; 1351 int pss_salt_len; 1352}; 1353static const unsigned char rsa_siggen0_msg[] = { 1354 0xa3, 0x76, 0x35, 0xc2, 0x6d, 0x6b, 0xa0, 0xe1, 1355 0x2e, 0x0b, 0x58, 0x33, 0x0d, 0x30, 0xdd, 0x07, 1356 0xa9, 0x53, 0xd6, 0x37, 0x07, 0xad, 0xa8, 0x67, 1357}; 1358static const struct rsa_siggen_st rsa_siggen_data[] = { 1359 { 1360 "pkcs1", /* pkcs1v1.5 */ 1361 2048, 1362 "SHA384", 1363 ITM(rsa_siggen0_msg), 1364 NO_PSS_SALT_LEN, 1365 }, 1366 { 1367 "x931", 1368 2048, 1369 "SHA384", 1370 ITM(rsa_siggen0_msg), 1371 NO_PSS_SALT_LEN, 1372 }, 1373 { 1374 "pss", 1375 2048, 1376 "SHA384", 1377 ITM(rsa_siggen0_msg), 1378 48 1379 }, 1380}; 1381 1382struct rsa_sigver_st { 1383 const char *sig_pad_mode; 1384 size_t mod; 1385 const char *digest_alg; 1386 const unsigned char *msg; 1387 size_t msg_len; 1388 const unsigned char *n; 1389 size_t n_len; 1390 const unsigned char *e; 1391 size_t e_len; 1392 const unsigned char *sig; 1393 size_t sig_len; 1394 int pss_salt_len; 1395 int pass; 1396}; 1397 1398static const unsigned char rsa_sigver15_0_n[] = { 1399 0xbb, 0xbc, 0xf3, 0x35, 0x6f, 0x8e, 0x2e, 0x4f, 1400 0x32, 0xb5, 0xbb, 0x47, 0x9d, 0x02, 0x2a, 0xac, 1401 0x93, 0x9e, 0x70, 0x50, 0x0f, 0x59, 0x0d, 0x38, 1402 0x1c, 0xe5, 0xda, 0x87, 0x61, 0x6b, 0xbf, 0xa8, 1403 0x2c, 0x2f, 0x97, 0xbc, 0x4b, 0xd4, 0xae, 0x21, 1404 0xed, 0xbe, 0x7a, 0x98, 0x15, 0xa8, 0xe2, 0xf0, 1405 0x5f, 0x4d, 0xf8, 0xe2, 0x7c, 0x7e, 0x87, 0x52, 1406 0x8e, 0xbf, 0xb6, 0x3f, 0x1a, 0x12, 0x96, 0x87, 1407 0x2c, 0xd2, 0xac, 0x85, 0x87, 0xe5, 0xcd, 0x4c, 1408 0x31, 0x2b, 0x98, 0x16, 0x9f, 0xcf, 0x3e, 0xef, 1409 0x50, 0xaa, 0xee, 0xc0, 0x6c, 0x80, 0x94, 0xc5, 1410 0xb1, 0xc7, 0x0d, 0xd4, 0x24, 0x94, 0x44, 0x3a, 1411 0x44, 0xdb, 0x10, 0xdc, 0x21, 0x57, 0xe0, 0x77, 1412 0xe5, 0x9c, 0xc4, 0x49, 0x06, 0xe3, 0x5a, 0xea, 1413 0x64, 0xf4, 0x54, 0xca, 0xfc, 0x5a, 0x2b, 0x92, 1414 0x76, 0xe1, 0x86, 0x6f, 0x3b, 0x4e, 0x7d, 0xe7, 1415 0xb9, 0x62, 0xc4, 0x63, 0x12, 0x65, 0x16, 0x58, 1416 0x11, 0x23, 0xba, 0x1b, 0x95, 0x06, 0x1c, 0xdd, 1417 0xdc, 0x49, 0x0b, 0x67, 0x7c, 0xb0, 0xdb, 0x45, 1418 0x88, 0x6e, 0x42, 0xdd, 0x67, 0xbf, 0xec, 0x0e, 1419 0xfa, 0x64, 0x06, 0x3e, 0xb9, 0x40, 0xee, 0xc6, 1420 0x56, 0xdf, 0xe7, 0xd8, 0xed, 0xf1, 0xf7, 0x53, 1421 0xec, 0xd6, 0x1e, 0xb1, 0x66, 0x66, 0x80, 0x16, 1422 0x5b, 0xba, 0x8c, 0x75, 0xe2, 0x6c, 0x19, 0xe7, 1423 0xf9, 0xc8, 0xae, 0x75, 0xc9, 0xc4, 0x19, 0xe6, 1424 0xba, 0xfd, 0x3e, 0x12, 0xf0, 0x88, 0x90, 0xee, 1425 0x39, 0xf8, 0x85, 0x3c, 0x20, 0x3b, 0xfe, 0xb9, 1426 0xa0, 0x07, 0x93, 0x6d, 0x20, 0x78, 0xf2, 0xc2, 1427 0xa5, 0x49, 0x51, 0xa3, 0xb7, 0x13, 0x83, 0xeb, 1428 0x19, 0x55, 0x08, 0x4f, 0x28, 0x32, 0x1a, 0x9b, 1429 0xab, 0x05, 0x9a, 0xaa, 0x28, 0xdc, 0xfa, 0xbf, 1430 0xf3, 0x52, 0x40, 0x0c, 0x4a, 0xb3, 0xd6, 0xb5, 1431}; 1432static const unsigned char rsa_sigver15_0_e[] = { 1433 0x01, 0x00, 0x01, 1434}; 1435static const unsigned char rsa_sigver15_0_msg[] = { 1436 0xba, 0x1a, 0x03, 0xda, 0x95, 0xd4, 0x36, 0x60, 1437 0xe6, 0x77, 0xc7, 0x80, 0x49, 0x42, 0xc7, 0x98, 1438 0xf6, 0x9e, 0xcf, 0x6f, 0xe5, 0xaf, 0x41, 0x6c, 1439 0x36, 0x29, 0xd0, 0x06, 0xcf, 0x65, 0x43, 0x7c, 1440 0x47, 0xb4, 0x75, 0xc6, 0x03, 0xf3, 0xa1, 0xcb, 1441 0x9e, 0x5f, 0xdc, 0xd4, 0x8e, 0xab, 0xe3, 0x41, 1442 0x05, 0x50, 0x17, 0x7b, 0x16, 0x25, 0xc6, 0x29, 1443 0x19, 0x2f, 0xac, 0xa7, 0x50, 0xba, 0xba, 0xb3, 1444 0xcb, 0xa8, 0x16, 0x6a, 0x88, 0x0a, 0x62, 0x74, 1445 0xdf, 0xed, 0x41, 0x7b, 0x1d, 0x76, 0x17, 0xe1, 1446 0x70, 0x32, 0x11, 0xb2, 0x03, 0xa7, 0x66, 0xd7, 1447 0x69, 0x2f, 0xdc, 0x8d, 0x3f, 0x06, 0x8d, 0x16, 1448 0x0d, 0xa1, 0xeb, 0xae, 0x6e, 0x41, 0x02, 0xc1, 1449 0x71, 0xc9, 0xfd, 0x5b, 0x3e, 0xcc, 0xec, 0xe0, 1450 0xfd, 0xeb, 0xc4, 0xfd, 0xf3, 0x5e, 0xa7, 0xde, 1451 0xee, 0xd0, 0x66, 0xa2, 0xe4, 0x70, 0x45, 0x0c, 1452}; 1453static const unsigned char rsa_sigver15_0_sig[] = { 1454 0x4a, 0x8a, 0xcb, 0x88, 0x89, 0xd3, 0xa9, 0x48, 1455 0x84, 0x09, 0x2e, 0x2c, 0x50, 0x02, 0xb9, 0xad, 1456 0xe5, 0x10, 0xac, 0x27, 0x8f, 0x2d, 0x36, 0x7e, 1457 0x6e, 0x32, 0x5c, 0x1d, 0xcb, 0xfa, 0xb8, 0xc7, 1458 0x1a, 0x27, 0x11, 0x2b, 0x34, 0xf4, 0xa9, 0xda, 1459 0xa0, 0x99, 0x86, 0xbe, 0x81, 0xd0, 0xd9, 0x2a, 1460 0x88, 0x25, 0x99, 0xb3, 0x02, 0x50, 0xf1, 0xa5, 1461 0x4f, 0x3a, 0x1d, 0x7f, 0xcf, 0x7d, 0x76, 0x00, 1462 0x06, 0x87, 0x9f, 0x39, 0x3a, 0x3c, 0xc0, 0xc6, 1463 0x46, 0x7a, 0x65, 0x0d, 0x85, 0x06, 0xd8, 0x51, 1464 0xbe, 0xc5, 0x00, 0x80, 0xeb, 0x73, 0xbb, 0x71, 1465 0x8c, 0xcc, 0x72, 0x83, 0x1f, 0x9d, 0x73, 0x75, 1466 0xb8, 0xc8, 0x4c, 0x07, 0x5b, 0xda, 0x8c, 0x9b, 1467 0x6f, 0x65, 0x8c, 0x2e, 0x23, 0x62, 0x6c, 0x8d, 1468 0x94, 0x54, 0x5b, 0x7f, 0xe6, 0x5c, 0x90, 0xa3, 1469 0x07, 0xe2, 0x14, 0x4d, 0xe7, 0x71, 0x6c, 0xfd, 1470 0x64, 0x12, 0x14, 0x12, 0x14, 0x00, 0x1b, 0xc4, 1471 0x65, 0xe7, 0x28, 0x5c, 0x34, 0x2d, 0xda, 0x94, 1472 0xfd, 0x71, 0xcb, 0x27, 0xa6, 0x0e, 0x63, 0xd4, 1473 0xd6, 0x14, 0x65, 0xc0, 0xe3, 0x65, 0x94, 0x61, 1474 0x59, 0xb8, 0xc9, 0x3b, 0x9b, 0xc2, 0x82, 0xe2, 1475 0x76, 0xe7, 0x17, 0xf1, 0xef, 0x32, 0x9e, 0x8a, 1476 0x04, 0xf3, 0x1e, 0xcc, 0x16, 0xb4, 0x45, 0x0e, 1477 0x77, 0xdb, 0x8b, 0x38, 0x6c, 0xcc, 0x98, 0xf4, 1478 0xf8, 0xb5, 0x45, 0x2c, 0xde, 0x23, 0x36, 0xe7, 1479 0x83, 0xf0, 0xb4, 0xb5, 0xe3, 0xd3, 0xd4, 0x59, 1480 0xf1, 0x46, 0x7f, 0x0f, 0x55, 0x58, 0xff, 0x75, 1481 0xc7, 0x7f, 0xee, 0xf8, 0xe0, 0xb2, 0x52, 0xd8, 1482 0xba, 0x37, 0x4f, 0x7b, 0xba, 0xa3, 0xf0, 0x13, 1483 0xa7, 0x3a, 0x21, 0xac, 0xdc, 0x9e, 0x63, 0x36, 1484 0x38, 0xe7, 0x90, 0xeb, 0xea, 0x7f, 0x83, 0xf4, 1485 0x9d, 0xf3, 0x6b, 0x31, 0x44, 0x47, 0x27, 0x8e, 1486}; 1487 1488#define rsa_sigver15_1_n rsa_sigver15_0_n 1489#define rsa_sigver15_1_e rsa_sigver15_0_e 1490static const unsigned char rsa_sigver15_1_msg[] = { 1491 0x52, 0x68, 0x35, 0xd6, 0x4a, 0x95, 0xaa, 0xbd, 1492 0x02, 0x69, 0x7f, 0x92, 0xc7, 0x8c, 0x04, 0x71, 1493 0x17, 0x10, 0x5a, 0x0d, 0xab, 0x5e, 0x91, 0x45, 1494 0xb5, 0x70, 0x0d, 0xf8, 0x66, 0x41, 0x2e, 0x19, 1495 0xb3, 0x82, 0x30, 0x06, 0x59, 0x8f, 0x4f, 0x15, 1496 0x1e, 0xa1, 0x2f, 0x70, 0x5a, 0x45, 0x7c, 0x24, 1497 0xb7, 0x0d, 0xcd, 0x74, 0x35, 0x85, 0xcf, 0x73, 1498 0x71, 0x68, 0x9f, 0xd2, 0x26, 0x14, 0x77, 0xf6, 1499 0xf4, 0x3c, 0x8d, 0x4d, 0x60, 0xdd, 0x38, 0xe3, 1500 0x1d, 0x73, 0x55, 0x30, 0x8a, 0x6c, 0xe9, 0x35, 1501 0x7b, 0xdd, 0x08, 0xc7, 0x3c, 0x74, 0xf5, 0x2a, 1502 0xd3, 0xae, 0x8a, 0xe1, 0x86, 0x49, 0xda, 0xc5, 1503 0x9d, 0xfd, 0x16, 0x55, 0x69, 0x67, 0xad, 0x4d, 1504 0x85, 0x46, 0xb7, 0x7a, 0x5c, 0xe9, 0x94, 0xcc, 1505 0xeb, 0xe8, 0xd0, 0xad, 0xc9, 0x13, 0x4a, 0x91, 1506 0x64, 0xa8, 0x96, 0xce, 0x8d, 0xc9, 0x9f, 0xaf, 1507}; 1508static const unsigned char rsa_sigver15_1_sig[] = { 1509 0x81, 0x96, 0xdb, 0x65, 0x66, 0x5d, 0xec, 0x14, 1510 0xb3, 0x42, 0xf6, 0x93, 0x89, 0xae, 0x49, 0x81, 1511 0x98, 0xda, 0x71, 0x6d, 0x72, 0x9b, 0xcb, 0x39, 1512 0xe4, 0x85, 0xd1, 0x9f, 0xbe, 0xb8, 0x69, 0x0e, 1513 0xbe, 0xc0, 0x07, 0x88, 0xee, 0xbf, 0xf9, 0x5d, 1514 0x20, 0x0f, 0x90, 0x48, 0x93, 0x53, 0xbb, 0xc6, 1515 0x2f, 0xf8, 0xb7, 0x1d, 0xd2, 0x15, 0x0f, 0x1f, 1516 0x25, 0xab, 0x5b, 0xae, 0x52, 0xe6, 0x8e, 0x06, 1517 0x43, 0xe1, 0xd9, 0x4a, 0x4c, 0xee, 0x24, 0x0e, 1518 0xeb, 0x4f, 0x9b, 0x1a, 0xcb, 0x6d, 0x22, 0x93, 1519 0xa8, 0xa8, 0xcd, 0x4b, 0xa2, 0xf6, 0x88, 0x1a, 1520 0xaf, 0x3b, 0x2b, 0xdf, 0x04, 0x2d, 0x2b, 0x27, 1521 0x54, 0x90, 0x41, 0xb0, 0x4a, 0xda, 0xb1, 0xdf, 1522 0xce, 0x39, 0xda, 0xd7, 0xda, 0x00, 0x97, 0x89, 1523 0x9a, 0xaf, 0x4c, 0xc3, 0x0b, 0x6d, 0xb3, 0xce, 1524 0x59, 0x0b, 0xd9, 0x91, 0x17, 0x31, 0x6a, 0xe7, 1525 0x92, 0xec, 0x62, 0xe1, 0xe9, 0x73, 0xc7, 0x14, 1526 0x06, 0x16, 0x42, 0x8a, 0x68, 0xb1, 0x7c, 0xb8, 1527 0xa1, 0x45, 0xf0, 0x06, 0xf6, 0x85, 0xb5, 0x93, 1528 0xf1, 0x45, 0xc4, 0xe5, 0xf1, 0x76, 0x71, 0xb4, 1529 0xdc, 0x03, 0x55, 0xde, 0xb1, 0xd3, 0x5a, 0x0f, 1530 0x1f, 0x4f, 0xdd, 0xaa, 0x87, 0x8e, 0x46, 0x4d, 1531 0xe3, 0xd0, 0x5b, 0x28, 0x01, 0xc4, 0x94, 0xf7, 1532 0x00, 0x93, 0xae, 0xa3, 0xb5, 0x64, 0x65, 0xa1, 1533 0x16, 0x29, 0x2e, 0xc7, 0xbb, 0xeb, 0x71, 0x02, 1534 0xf9, 0x26, 0xb6, 0xa6, 0x24, 0xdc, 0x6a, 0x0e, 1535 0x0d, 0xad, 0x50, 0xf5, 0x4b, 0xe7, 0x0e, 0x9a, 1536 0x39, 0x20, 0x70, 0xe2, 0xdf, 0x3b, 0x6f, 0x9d, 1537 0xe3, 0x8f, 0x15, 0x6d, 0x5a, 0xaf, 0x12, 0xf7, 1538 0xf7, 0x85, 0x6f, 0x0e, 0xe4, 0x6e, 0x27, 0xf7, 1539 0xb3, 0x44, 0x38, 0x73, 0x45, 0x80, 0x7a, 0x72, 1540 0x82, 0xf3, 0xc8, 0x32, 0xb8, 0x25, 0xef, 0xdc, 1541}; 1542 1543static const unsigned char rsa_sigverpss_0_n[] = { 1544 0xb2, 0x76, 0x6c, 0x31, 0x01, 0x15, 0xd8, 0xe7, 1545 0x88, 0xd3, 0x4a, 0xb2, 0x75, 0xc8, 0xeb, 0x1f, 1546 0xd4, 0xe3, 0xf7, 0xbc, 0x83, 0xb6, 0xe7, 0x88, 1547 0x1f, 0x77, 0x36, 0xe1, 0x61, 0x2b, 0xa1, 0x83, 1548 0xe5, 0x0b, 0x59, 0x8c, 0xd9, 0x7c, 0x88, 0x3e, 1549 0x68, 0xef, 0x71, 0x1b, 0x72, 0x5d, 0x5e, 0xfe, 1550 0xa8, 0x1f, 0xe9, 0x8c, 0x41, 0x18, 0xd3, 0x90, 1551 0x2f, 0x6d, 0xc3, 0x46, 0x74, 0x69, 0x9b, 0xe1, 1552 0x46, 0x9c, 0x9d, 0xaf, 0x5c, 0x36, 0xb8, 0x54, 1553 0xf0, 0x67, 0xcb, 0x2c, 0xf4, 0x81, 0x7a, 0x4d, 1554 0xaf, 0x1b, 0x53, 0xc9, 0x3d, 0xbf, 0x2e, 0xee, 1555 0xe2, 0xe5, 0x00, 0x34, 0x58, 0xfd, 0x9f, 0xd0, 1556 0xa5, 0xdf, 0x20, 0x04, 0x41, 0x5f, 0x1b, 0x53, 1557 0xd5, 0x25, 0x9a, 0x06, 0x9d, 0xb6, 0x57, 0xa0, 1558 0x3e, 0xea, 0x21, 0x32, 0x85, 0xed, 0x34, 0xcb, 1559 0x4e, 0x96, 0xcc, 0xe6, 0xe0, 0x86, 0x9a, 0x38, 1560 0xeb, 0x1c, 0xb0, 0x9c, 0x90, 0xf1, 0xca, 0xe0, 1561 0x56, 0x1e, 0xf3, 0x90, 0xe0, 0xa8, 0x1f, 0x18, 1562 0xcf, 0xac, 0x22, 0xec, 0x72, 0x59, 0xfd, 0x08, 1563 0x41, 0x68, 0xc0, 0x7a, 0x19, 0xfe, 0x85, 0x6b, 1564 0x7a, 0xf8, 0x20, 0x80, 0x66, 0xf2, 0xfc, 0x27, 1565 0xc7, 0xa9, 0x39, 0xa7, 0x39, 0x01, 0xed, 0x78, 1566 0xa7, 0x5f, 0xa5, 0x48, 0x99, 0x55, 0xb5, 0x0f, 1567 0xb3, 0x08, 0x14, 0x00, 0xfc, 0xc1, 0x5a, 0xb8, 1568 0xa1, 0xd4, 0xfd, 0x9b, 0xb8, 0xbc, 0x3b, 0x7f, 1569 0x0b, 0x2e, 0x52, 0x22, 0x01, 0xc0, 0x24, 0x2b, 1570 0xda, 0xfd, 0x61, 0xfc, 0x72, 0xe7, 0x72, 0x84, 1571 0x7d, 0x57, 0xae, 0x52, 0xda, 0x47, 0x29, 0xac, 1572 0x4b, 0x52, 0xb5, 0x0c, 0xa8, 0xe7, 0x70, 0x5d, 1573 0x06, 0x67, 0x29, 0xb2, 0x68, 0xae, 0xb5, 0x27, 1574 0x84, 0xab, 0x8f, 0x26, 0x8b, 0x6e, 0x8a, 0x61, 1575 0x25, 0x11, 0x92, 0xc6, 0x07, 0x7e, 0x05, 0x19, 1576 0xc2, 0xf3, 0xbc, 0xb1, 0xf9, 0x2d, 0x6e, 0x52, 1577 0x85, 0x1c, 0x72, 0xd8, 0x71, 0x58, 0x70, 0x8a, 1578 0x85, 0x7e, 0x2e, 0x89, 0xb1, 0x0c, 0xe2, 0x46, 1579 0xf6, 0x09, 0x79, 0x36, 0x02, 0xae, 0xb9, 0x87, 1580 0x29, 0x02, 0x98, 0x1c, 0x83, 0x89, 0x3b, 0xa1, 1581 0xd2, 0xfa, 0x92, 0x92, 0x3e, 0x40, 0x05, 0xf5, 1582 0xd6, 0x57, 0xda, 0xea, 0x77, 0x6f, 0xb2, 0x8e, 1583 0xdc, 0xfd, 0xdb, 0xb9, 0x78, 0xe1, 0xb0, 0xb8, 1584 0x57, 0x93, 0x60, 0x6a, 0xb7, 0x70, 0x48, 0x9e, 1585 0x52, 0xd8, 0x82, 0xd2, 0x3b, 0xa3, 0x7e, 0x92, 1586 0x5e, 0x5d, 0x5a, 0x88, 0xa0, 0x1f, 0x3c, 0x40, 1587 0xd3, 0xc5, 0xdf, 0xa1, 0x18, 0x38, 0xe5, 0xe8, 1588 0xdc, 0x59, 0x82, 0x55, 0x3a, 0x3a, 0x61, 0x4a, 1589 0xed, 0x63, 0xf0, 0xa3, 0x61, 0x1e, 0x2e, 0x16, 1590 0x35, 0xad, 0x99, 0x36, 0x3f, 0x1d, 0xc5, 0x36, 1591 0xc6, 0xcd, 0x5c, 0x80, 0x3d, 0x48, 0x29, 0xf3, 1592 0x37, 0xcd, 0xe1, 0xf7, 0x98, 0x27, 0x3c, 0x1e, 1593 0x2d, 0x7a, 0xbe, 0xf3, 0x81, 0x66, 0xc7, 0xf3, 1594 0x70, 0xb2, 0xe4, 0xb0, 0x86, 0x9b, 0xba, 0x00, 1595 0x2a, 0xeb, 0x08, 0xd1, 0xa2, 0x3f, 0x4c, 0x2e, 1596 0x7b, 0x87, 0xe1, 0x3b, 0xb9, 0xba, 0x3e, 0x78, 1597 0xaf, 0x46, 0x89, 0x14, 0x01, 0x5d, 0x3b, 0x7c, 1598 0x3e, 0x35, 0x58, 0xea, 0x76, 0x4a, 0xb2, 0xf8, 1599 0x9b, 0x94, 0x2c, 0xa6, 0xf3, 0x19, 0x85, 0xc0, 1600 0x91, 0x52, 0xc7, 0x57, 0x65, 0x99, 0x7a, 0x65, 1601 0xaf, 0xd9, 0x01, 0xed, 0xea, 0x64, 0x8a, 0x0a, 1602 0x62, 0x77, 0x14, 0xb0, 0xf6, 0xe2, 0x03, 0xdd, 1603 0x3a, 0x81, 0x62, 0x30, 0x40, 0x66, 0xfe, 0xbc, 1604 0xbd, 0x2a, 0xae, 0x6f, 0xd8, 0x94, 0xfd, 0xf1, 1605 0xd6, 0x9b, 0xb7, 0xe4, 0x0f, 0xae, 0xfe, 0x10, 1606 0x63, 0x72, 0x36, 0xc8, 0x75, 0x7c, 0x8e, 0xff, 1607 0x3f, 0xd6, 0xb4, 0x5e, 0xdc, 0xda, 0x5d, 0x4d 1608}; 1609static const unsigned char rsa_sigverpss_0_e[] = { 1610 0x01, 0x00, 0x01, 1611}; 1612static const unsigned char rsa_sigverpss_0_msg[] = { 1613 0x32, 0x03, 0x0c, 0x2e, 0x06, 0xfc, 0x0f, 0xa5, 1614 0x65, 0xcd, 0x0f, 0x88, 0x52, 0x80, 0xc3, 0x43, 1615 0xda, 0x01, 0x36, 0x48, 0xf5, 0x76, 0xc8, 0x03, 1616 0xae, 0xce, 0x76, 0x0f, 0x83, 0x9d, 0x5c, 0xaa, 1617 0x0f, 0x27, 0x78, 0x66, 0xe6, 0xba, 0xb1, 0x22, 1618 0xc1, 0x42, 0x18, 0x39, 0xdb, 0x17, 0x6d, 0xf9, 1619 0x9a, 0x19, 0xe5, 0x57, 0x72, 0xff, 0x2a, 0xe0, 1620 0x07, 0xec, 0xa4, 0xf3, 0x91, 0x43, 0xf7, 0x2e, 1621 0x85, 0xbd, 0xcd, 0x26, 0x72, 0xb9, 0xd5, 0x5b, 1622 0x28, 0xd3, 0x0c, 0x6b, 0x20, 0xb7, 0x3b, 0x85, 1623 0x18, 0x38, 0xc0, 0x21, 0xfe, 0x9c, 0x92, 0xee, 1624 0x0f, 0x3a, 0x80, 0x0c, 0x40, 0x48, 0xb9, 0x7c, 1625 0xdd, 0xee, 0x91, 0xd5, 0x70, 0x9e, 0x82, 0x38, 1626 0xe4, 0xa8, 0x71, 0x85, 0xea, 0x09, 0x33, 0xcf, 1627 0x9c, 0x84, 0x50, 0x0e, 0x60, 0xf5, 0x07, 0x14, 1628 0x10, 0xe1, 0x92, 0xc3, 0x58, 0x51, 0xab, 0x7c, 1629}; 1630static const unsigned char rsa_sigverpss_0_sig[] = { 1631 0xad, 0x38, 0x4f, 0x00, 0xdd, 0x95, 0xd7, 0x72, 1632 0x90, 0x50, 0x48, 0x4e, 0xfd, 0x87, 0x3b, 0xab, 1633 0x36, 0x75, 0xe5, 0xa7, 0x32, 0xcf, 0xf5, 0x3a, 1634 0x9e, 0xe9, 0x59, 0x54, 0xcf, 0x95, 0x59, 0x63, 1635 0x14, 0x43, 0xf8, 0x49, 0x55, 0x86, 0x13, 0x91, 1636 0x4f, 0x0b, 0x67, 0x70, 0xc1, 0xd6, 0x97, 0x19, 1637 0xc5, 0xd2, 0xba, 0x48, 0x1b, 0x16, 0x65, 0xd3, 1638 0xcf, 0xee, 0x35, 0x19, 0xc8, 0xa6, 0x0f, 0x72, 1639 0xc6, 0x13, 0x9f, 0xa4, 0x9f, 0x53, 0x62, 0x49, 1640 0x1e, 0x1f, 0x18, 0x89, 0x2a, 0x7f, 0xf3, 0x17, 1641 0x78, 0x9d, 0x8a, 0xc1, 0x8e, 0xdd, 0x91, 0xf1, 1642 0x1f, 0xdd, 0x98, 0xff, 0x9a, 0x6d, 0xb8, 0x14, 1643 0x87, 0xaa, 0x08, 0xad, 0xe8, 0x6d, 0x95, 0x6b, 1644 0xc3, 0xad, 0x6a, 0x56, 0xa2, 0x78, 0x2d, 0x8c, 1645 0xa3, 0x80, 0x4f, 0x97, 0x91, 0x2e, 0x14, 0x7b, 1646 0x7a, 0x70, 0x9b, 0x48, 0x4d, 0xa4, 0x64, 0xe6, 1647 0x3f, 0x6f, 0x26, 0x83, 0x73, 0xb0, 0x41, 0xd6, 1648 0x29, 0x57, 0x31, 0x2e, 0x87, 0x3b, 0xea, 0x69, 1649 0x97, 0xc5, 0xe7, 0x75, 0xc6, 0x05, 0xf7, 0x05, 1650 0xf2, 0x74, 0xb5, 0x96, 0x71, 0x48, 0xcf, 0x1e, 1651 0xa1, 0x67, 0x0a, 0x72, 0x28, 0xfb, 0x87, 0xde, 1652 0xca, 0x91, 0x97, 0x63, 0x1e, 0x70, 0x22, 0x5c, 1653 0xa2, 0xbe, 0x2a, 0x50, 0xf3, 0xac, 0x2f, 0x04, 1654 0x1d, 0x09, 0x14, 0xdf, 0x9d, 0xe5, 0x03, 0x8e, 1655 0xe1, 0xa1, 0x4e, 0x78, 0x71, 0xc5, 0xed, 0x04, 1656 0x3e, 0x34, 0xf7, 0xce, 0xae, 0xe9, 0xc7, 0xe8, 1657 0x25, 0xc2, 0xf8, 0x23, 0xfd, 0x8b, 0xec, 0x5a, 1658 0xe1, 0x16, 0x0c, 0x6f, 0x04, 0x8b, 0x10, 0xe7, 1659 0xc8, 0x9d, 0x6d, 0x8f, 0x21, 0x1d, 0x9d, 0xe6, 1660 0xfa, 0x5f, 0x4f, 0xc7, 0x98, 0x2f, 0x78, 0x1f, 1661 0x14, 0xcd, 0xc3, 0x6e, 0xfa, 0x36, 0xcf, 0x6e, 1662 0xda, 0xf7, 0x31, 0xa8, 0x7f, 0x70, 0x8a, 0xc0, 1663 0x24, 0xef, 0x5b, 0x0f, 0xab, 0x49, 0x89, 0xe2, 1664 0x61, 0xc5, 0x9c, 0xae, 0x04, 0xf2, 0x54, 0x9f, 1665 0x7a, 0xce, 0x2b, 0x62, 0x07, 0xdb, 0x86, 0x10, 1666 0xe9, 0x3a, 0xc1, 0xdd, 0xd1, 0xe5, 0x17, 0xcf, 1667 0x72, 0xe8, 0x03, 0x72, 0x23, 0xd8, 0xb3, 0x6e, 1668 0x2d, 0xfc, 0xa7, 0xd4, 0x7d, 0x85, 0x9b, 0x73, 1669 0x7e, 0xa6, 0xe1, 0x71, 0xd5, 0xf3, 0xf0, 0xe8, 1670 0x23, 0x80, 0x7e, 0x3c, 0x4e, 0xc9, 0x7c, 0x3a, 1671 0x9a, 0xc3, 0x65, 0xb8, 0xea, 0x49, 0x02, 0x92, 1672 0xda, 0x39, 0xb4, 0xb2, 0xde, 0xf3, 0x1d, 0xb2, 1673 0x81, 0xed, 0x21, 0x58, 0xdb, 0xb8, 0xe5, 0x96, 1674 0xe9, 0xd5, 0xd3, 0x76, 0xde, 0x45, 0xa1, 0x1a, 1675 0xfe, 0xcd, 0x41, 0x63, 0x86, 0xd5, 0x72, 0xf1, 1676 0xae, 0x41, 0xf0, 0x10, 0x47, 0xcb, 0xd0, 0x86, 1677 0x60, 0xb6, 0x38, 0x28, 0x6b, 0x96, 0xa5, 0xd0, 1678 0x8e, 0x7e, 0x8e, 0x4f, 0xbf, 0x26, 0xbc, 0x10, 1679 0x23, 0x7c, 0xd8, 0xba, 0x63, 0x0a, 0x61, 0x25, 1680 0x0d, 0x3c, 0xba, 0x37, 0xef, 0x58, 0xaf, 0x57, 1681 0x67, 0x10, 0xdc, 0xe6, 0x73, 0x6d, 0xf6, 0x0b, 1682 0x38, 0x75, 0x00, 0x9d, 0x50, 0x71, 0xf0, 0x79, 1683 0x33, 0xb0, 0xe4, 0xb9, 0x2a, 0x66, 0x48, 0xae, 1684 0x74, 0xb4, 0xcb, 0x88, 0x57, 0x35, 0x28, 0xfd, 1685 0xa1, 0x7b, 0x50, 0x8e, 0x7a, 0x09, 0x94, 0x01, 1686 0xed, 0x3b, 0x1d, 0x42, 0xc3, 0x34, 0x5e, 0x2c, 1687 0x1e, 0x94, 0x90, 0x45, 0x24, 0x0e, 0x2e, 0xaa, 1688 0x50, 0x90, 0x2b, 0x32, 0x16, 0xf7, 0xeb, 0xbd, 1689 0x49, 0x32, 0x10, 0xa1, 0xd6, 0xd6, 0x17, 0x88, 1690 0xbb, 0x6d, 0x5f, 0xfc, 0xc3, 0xf4, 0x78, 0x38, 1691 0x4c, 0xc8, 0xe0, 0x61, 0xd5, 0x5b, 0x30, 0xb1, 1692 0x18, 0xa8, 0x90, 0xaf, 0x2b, 0xe9, 0x36, 0xad, 1693 0xd0, 0x8b, 0x46, 0xe4, 0x38, 0xc0, 0x6f, 0xfc, 1694 0x86, 0xae, 0x64, 0x00, 0xd1, 0x39, 0x3f, 0xee 1695}; 1696 1697#define rsa_sigverpss_1_n rsa_sigverpss_0_n 1698#define rsa_sigverpss_1_e rsa_sigverpss_0_e 1699static const unsigned char rsa_sigverpss_1_msg[] = { 1700 0x29, 0xdc, 0x70, 0xd8, 0xa5, 0xde, 0x41, 0x1d, 1701 0xed, 0x05, 0x16, 0x04, 0x48, 0x05, 0x21, 0x05, 1702 0x1c, 0x40, 0x8a, 0xbb, 0x6c, 0x3c, 0x11, 0xf3, 1703 0x9f, 0x55, 0xf4, 0x03, 0x83, 0xaf, 0x13, 0x5d, 1704 0x91, 0x6f, 0x52, 0x63, 0x73, 0x2b, 0x3f, 0x7d, 1705 0xc3, 0x9e, 0xf5, 0x69, 0x16, 0xa1, 0x40, 0xd3, 1706 0x39, 0x57, 0x01, 0x26, 0xba, 0xa7, 0xd4, 0xa1, 1707 0xaa, 0xef, 0xf1, 0xad, 0xa2, 0xf6, 0x50, 0x6e, 1708 0x04, 0x23, 0x11, 0x98, 0x83, 0xed, 0x1a, 0x84, 1709 0xe6, 0x93, 0x02, 0x83, 0x08, 0x0d, 0x2e, 0x72, 1710 0x24, 0x42, 0x39, 0x8e, 0x4f, 0x7b, 0x99, 0x8a, 1711 0x46, 0x18, 0x80, 0xdf, 0x6a, 0x82, 0x01, 0x64, 1712 0x09, 0x60, 0x74, 0x1e, 0xdf, 0x0e, 0x1b, 0x59, 1713 0xdd, 0x4a, 0x06, 0xf7, 0x29, 0x31, 0x33, 0x09, 1714 0x65, 0x6b, 0xfa, 0x9c, 0x34, 0xa2, 0xa8, 0xd5, 1715 0xfa, 0x38, 0x6b, 0x41, 0xe4, 0x39, 0x6e, 0x66, 1716}; 1717static const unsigned char rsa_sigverpss_1_sig[] = { 1718 0x2a, 0x7a, 0xc1, 0x6d, 0x2a, 0x7d, 0xc0, 0x0c, 1719 0x70, 0x8b, 0xab, 0xac, 0x8b, 0x93, 0xcd, 0x8c, 1720 0x9a, 0xdf, 0x93, 0x53, 0xda, 0x2d, 0x97, 0xf4, 1721 0xc5, 0x3d, 0xee, 0x5a, 0x5a, 0x51, 0x2a, 0xef, 1722 0xa2, 0xf0, 0x2e, 0x19, 0x83, 0x94, 0x43, 0x95, 1723 0x10, 0xde, 0x6a, 0xcc, 0xaf, 0xe0, 0xfb, 0xed, 1724 0xd0, 0xf9, 0x6a, 0x37, 0x66, 0x29, 0xee, 0xbb, 1725 0xce, 0xcc, 0x02, 0x27, 0xe4, 0xb9, 0x43, 0x3c, 1726 0xfd, 0x24, 0x93, 0x4e, 0x67, 0x1c, 0x8e, 0xfc, 1727 0xf0, 0xaa, 0x5f, 0x56, 0x68, 0x18, 0x5f, 0xd5, 1728 0x8e, 0xdc, 0x58, 0x7e, 0x2d, 0xc7, 0xd6, 0x16, 1729 0xfe, 0x3b, 0xb5, 0xcb, 0x9e, 0x50, 0xd1, 0x2f, 1730 0xce, 0x5e, 0x63, 0x81, 0xda, 0x46, 0xc1, 0x5b, 1731 0xaa, 0x6a, 0x3c, 0xcd, 0xa6, 0x4c, 0x1a, 0xff, 1732 0xda, 0xd0, 0x53, 0xeb, 0xbf, 0x83, 0x7f, 0x2b, 1733 0xb7, 0xee, 0x89, 0xbc, 0x70, 0x2c, 0xec, 0x29, 1734 0xce, 0xf9, 0xb6, 0x95, 0xde, 0xcc, 0x7b, 0x79, 1735 0xb5, 0x77, 0x6f, 0x0a, 0xf7, 0xe0, 0xc9, 0x90, 1736 0x58, 0xf1, 0x0b, 0xb1, 0xda, 0xdc, 0x11, 0xe9, 1737 0x6c, 0x46, 0x2e, 0x06, 0x84, 0x78, 0x57, 0xaa, 1738 0x54, 0xa2, 0x35, 0xec, 0xa0, 0x48, 0xec, 0xa6, 1739 0x15, 0x9d, 0x49, 0xbb, 0x43, 0x19, 0xa8, 0x6f, 1740 0x7d, 0xd3, 0x03, 0xbf, 0x9b, 0x42, 0x7e, 0x8d, 1741 0xee, 0x9a, 0x80, 0x3c, 0xe1, 0xe3, 0x1f, 0x61, 1742 0x6e, 0x21, 0x70, 0xf4, 0x37, 0x55, 0x83, 0x9a, 1743 0xe1, 0xe9, 0xb0, 0xe6, 0xf0, 0x94, 0x2d, 0xd6, 1744 0x8d, 0x1e, 0x3d, 0x12, 0xb9, 0xd4, 0xb0, 0x9b, 1745 0x40, 0x36, 0xb0, 0x39, 0x55, 0xdc, 0x04, 0x32, 1746 0x3c, 0xd1, 0xb9, 0x08, 0x43, 0x35, 0x57, 0x47, 1747 0x46, 0xea, 0x98, 0x26, 0x46, 0xef, 0xc3, 0x4d, 1748 0xc4, 0xa6, 0x3d, 0x1c, 0x35, 0x45, 0x78, 0x73, 1749 0xab, 0xe1, 0x33, 0x53, 0xad, 0xe9, 0xab, 0x32, 1750 0x18, 0xd8, 0x71, 0x69, 0xf5, 0x15, 0xb7, 0x30, 1751 0x00, 0xde, 0x0c, 0x01, 0x78, 0x82, 0xaf, 0xf0, 1752 0x10, 0x34, 0xab, 0xd9, 0x3a, 0xa7, 0x23, 0x13, 1753 0x31, 0x09, 0x90, 0x8a, 0xda, 0x2e, 0xc5, 0x38, 1754 0x59, 0x67, 0x24, 0xd9, 0x9e, 0x6f, 0xd8, 0x12, 1755 0x59, 0x16, 0x26, 0xd8, 0x31, 0x0e, 0x76, 0x82, 1756 0x7c, 0x8d, 0xd4, 0x80, 0xa8, 0x55, 0xeb, 0x97, 1757 0x76, 0xc9, 0x82, 0x4a, 0x73, 0x84, 0x0f, 0x9d, 1758 0x7f, 0x2e, 0x7b, 0x16, 0xa9, 0x89, 0xdc, 0x95, 1759 0x59, 0x11, 0xa2, 0xfd, 0xa3, 0x17, 0xc0, 0xe8, 1760 0xfd, 0xed, 0xd0, 0x2f, 0xca, 0x70, 0x6e, 0xa6, 1761 0x8b, 0x79, 0x39, 0xae, 0x77, 0xb2, 0x3d, 0x8f, 1762 0x8b, 0xf8, 0xaf, 0x05, 0x20, 0x80, 0xde, 0xb4, 1763 0x19, 0x77, 0x0b, 0x45, 0x87, 0xe0, 0xcb, 0x35, 1764 0x24, 0x46, 0x9d, 0xa5, 0xee, 0x30, 0xba, 0x9a, 1765 0xe9, 0x3c, 0x6a, 0x7e, 0xd4, 0xdc, 0x47, 0x26, 1766 0x83, 0xf5, 0x05, 0x8e, 0x70, 0xb5, 0x0c, 0x4f, 1767 0x83, 0xe2, 0x60, 0x99, 0x7b, 0xc5, 0xf4, 0x8a, 1768 0x8d, 0x87, 0xe1, 0x5c, 0x90, 0x5d, 0x21, 0x26, 1769 0xe1, 0x43, 0x0e, 0x4c, 0xed, 0xb4, 0xd9, 0x92, 1770 0xd6, 0x4c, 0x4e, 0xd4, 0x81, 0x12, 0x01, 0x88, 1771 0x3e, 0xf6, 0xab, 0x64, 0xed, 0x8f, 0x7d, 0x22, 1772 0xbb, 0x21, 0x4c, 0xc0, 0xe2, 0x72, 0x5a, 0x15, 1773 0x47, 0xdd, 0x1f, 0xf1, 0xb8, 0x32, 0x97, 0x08, 1774 0xc0, 0x8b, 0xe8, 0x65, 0x1a, 0x6b, 0x86, 0x22, 1775 0xee, 0x8d, 0xa5, 0xa2, 0x86, 0xf1, 0xcc, 0xb4, 1776 0x93, 0xc1, 0x8a, 0x99, 0x2d, 0x13, 0xad, 0xe5, 1777 0x28, 0x7e, 0xff, 0xfb, 0xfc, 0x43, 0x0e, 0xfa, 1778 0x9d, 0x08, 0x51, 0x40, 0x1f, 0x50, 0xa9, 0xb7, 1779 0xfa, 0xc3, 0x33, 0x24, 0x73, 0xb3, 0x30, 0x69, 1780 0xf8, 0x3d, 0xc3, 0x62, 0xac, 0x5e, 0x2b, 0x13, 1781 0xe9, 0x97, 0x20, 0x35, 0xf8, 0xf1, 0x78, 0xe1 1782}; 1783 1784static const unsigned char rsa_sigverx931_0_n[] = { 1785 0xa0, 0x16, 0x14, 0x80, 0x8b, 0x17, 0x2b, 0xad, 1786 0xd7, 0x07, 0x31, 0x6d, 0xfc, 0xba, 0x25, 0x83, 1787 0x09, 0xa0, 0xf7, 0x71, 0xc6, 0x06, 0x22, 0x87, 1788 0xd6, 0xbd, 0x13, 0xd9, 0xfe, 0x7c, 0xf7, 0xe6, 1789 0x48, 0xdb, 0x27, 0xd8, 0xa5, 0x49, 0x8e, 0x8c, 1790 0xea, 0xbe, 0xe0, 0x04, 0x6f, 0x3d, 0x3b, 0x73, 1791 0xdc, 0xc5, 0xd4, 0xdc, 0x85, 0xef, 0xea, 0x10, 1792 0x46, 0xf3, 0x88, 0xb9, 0x93, 0xbc, 0xa0, 0xb6, 1793 0x06, 0x02, 0x82, 0xb4, 0x2d, 0x54, 0xec, 0x79, 1794 0x50, 0x8a, 0xfc, 0xfa, 0x62, 0x45, 0xbb, 0xd7, 1795 0x26, 0xcd, 0x88, 0xfa, 0xe8, 0x0f, 0x26, 0x5b, 1796 0x1f, 0x21, 0x3f, 0x3b, 0x5d, 0x98, 0x3f, 0x02, 1797 0x8c, 0xa1, 0xbf, 0xc0, 0x70, 0x4d, 0xd1, 0x41, 1798 0xfd, 0xb9, 0x55, 0x12, 0x90, 0xc8, 0x6e, 0x0f, 1799 0x19, 0xa8, 0x5c, 0x31, 0xd6, 0x16, 0x0e, 0xdf, 1800 0x08, 0x84, 0xcd, 0x4b, 0xfd, 0x28, 0x8d, 0x7d, 1801 0x6e, 0xea, 0xc7, 0x95, 0x4a, 0xc3, 0x84, 0x54, 1802 0x7f, 0xb0, 0x20, 0x29, 0x96, 0x39, 0x4c, 0x3e, 1803 0x85, 0xec, 0x22, 0xdd, 0xb9, 0x14, 0xbb, 0x04, 1804 0x2f, 0x4c, 0x0c, 0xe3, 0xfa, 0xae, 0x47, 0x79, 1805 0x59, 0x8e, 0x4e, 0x7d, 0x4a, 0x17, 0xae, 0x16, 1806 0x38, 0x66, 0x4e, 0xff, 0x45, 0x7f, 0xac, 0x5e, 1807 0x75, 0x9f, 0x51, 0x18, 0xe6, 0xad, 0x6b, 0x8b, 1808 0x3d, 0x08, 0x4d, 0x9a, 0xd2, 0x11, 0xba, 0xa8, 1809 0xc3, 0xb5, 0x17, 0xb5, 0xdf, 0xe7, 0x39, 0x89, 1810 0x27, 0x7b, 0xeb, 0xf4, 0xe5, 0x7e, 0xa9, 0x7b, 1811 0x39, 0x40, 0x6f, 0xe4, 0x82, 0x14, 0x3d, 0x62, 1812 0xb6, 0xd4, 0x43, 0xd0, 0x0a, 0x2f, 0xc1, 0x73, 1813 0x3d, 0x99, 0x37, 0xbe, 0x62, 0x13, 0x6a, 0x8b, 1814 0xeb, 0xc5, 0x64, 0xd5, 0x2a, 0x8b, 0x4f, 0x7f, 1815 0x82, 0x48, 0x69, 0x3e, 0x08, 0x1b, 0xb5, 0x77, 1816 0xd3, 0xdc, 0x1b, 0x2c, 0xe5, 0x59, 0xf6, 0x33, 1817 0x47, 0xa0, 0x0f, 0xff, 0x8a, 0x6a, 0x1d, 0x66, 1818 0x24, 0x67, 0x36, 0x7d, 0x21, 0xda, 0xc1, 0xd4, 1819 0x11, 0x6c, 0xe8, 0x5f, 0xd7, 0x8a, 0x53, 0x5c, 1820 0xb2, 0xe2, 0xf9, 0x14, 0x29, 0x0f, 0xcf, 0x28, 1821 0x32, 0x4f, 0xc6, 0x17, 0xf6, 0xbc, 0x0e, 0xb8, 1822 0x99, 0x7c, 0x14, 0xa3, 0x40, 0x3f, 0xf3, 0xe4, 1823 0x31, 0xbe, 0x54, 0x64, 0x5a, 0xad, 0x1d, 0xb0, 1824 0x37, 0xcc, 0xd9, 0x0b, 0xa4, 0xbc, 0xe0, 0x07, 1825 0x37, 0xd1, 0xe1, 0x65, 0xc6, 0x53, 0xfe, 0x60, 1826 0x6a, 0x64, 0xa4, 0x01, 0x00, 0xf3, 0x5b, 0x9a, 1827 0x28, 0x61, 0xde, 0x7a, 0xd7, 0x0d, 0x56, 0x1e, 1828 0x4d, 0xa8, 0x6a, 0xb5, 0xf2, 0x86, 0x2a, 0x4e, 1829 0xaa, 0x37, 0x23, 0x5a, 0x3b, 0x69, 0x66, 0x81, 1830 0xc8, 0x8e, 0x1b, 0x31, 0x0f, 0x28, 0x31, 0x9a, 1831 0x2d, 0xe5, 0x79, 0xcc, 0xa4, 0xca, 0x60, 0x45, 1832 0xf7, 0x83, 0x73, 0x5a, 0x01, 0x29, 0xda, 0xf7, 1833 1834}; 1835static const unsigned char rsa_sigverx931_0_e[] = { 1836 0x01, 0x00, 0x01, 1837}; 1838static const unsigned char rsa_sigverx931_0_msg[] = { 1839 0x82, 0x2e, 0x41, 0x70, 0x9d, 0x1f, 0xe9, 0x47, 1840 0xec, 0xf1, 0x79, 0xcc, 0x05, 0xef, 0xdb, 0xcd, 1841 0xca, 0x8b, 0x8e, 0x61, 0x45, 0xad, 0xa6, 0xd9, 1842 0xd7, 0x4b, 0x15, 0xf4, 0x92, 0x3a, 0x2a, 0x52, 1843 0xe3, 0x44, 0x57, 0x2b, 0x74, 0x7a, 0x37, 0x41, 1844 0x50, 0xcb, 0xcf, 0x13, 0x49, 0xd6, 0x15, 0x54, 1845 0x97, 0xfd, 0xae, 0x9b, 0xc1, 0xbb, 0xfc, 0x5c, 1846 0xc1, 0x37, 0x58, 0x17, 0x63, 0x19, 0x9c, 0xcf, 1847 0xee, 0x9c, 0xe5, 0xbe, 0x06, 0xe4, 0x97, 0x47, 1848 0xd1, 0x93, 0xa1, 0x2c, 0x59, 0x97, 0x02, 0x01, 1849 0x31, 0x45, 0x8c, 0xe1, 0x5c, 0xac, 0xe7, 0x5f, 1850 0x6a, 0x23, 0xda, 0xbf, 0xe4, 0x25, 0xc6, 0x67, 1851 0xea, 0x5f, 0x73, 0x90, 0x1b, 0x06, 0x0f, 0x41, 1852 0xb5, 0x6e, 0x74, 0x7e, 0xfd, 0xd9, 0xaa, 0xbd, 1853 0xe2, 0x8d, 0xad, 0x99, 0xdd, 0x29, 0x70, 0xca, 1854 0x1b, 0x38, 0x21, 0x55, 0xde, 0x07, 0xaf, 0x00, 1855 1856}; 1857static const unsigned char rsa_sigverx931_0_sig[] = { 1858 0x29, 0xa9, 0x3a, 0x8e, 0x9e, 0x90, 0x1b, 0xdb, 1859 0xaf, 0x0b, 0x47, 0x5b, 0xb5, 0xc3, 0x8c, 0xc3, 1860 0x70, 0xbe, 0x73, 0xf9, 0x65, 0x8e, 0xc6, 0x1e, 1861 0x95, 0x0b, 0xdb, 0x24, 0x76, 0x79, 0xf1, 0x00, 1862 0x71, 0xcd, 0xc5, 0x6a, 0x7b, 0xd2, 0x8b, 0x18, 1863 0xc4, 0xdd, 0xf1, 0x2a, 0x31, 0x04, 0x3f, 0xfc, 1864 0x36, 0x06, 0x20, 0x71, 0x3d, 0x62, 0xf2, 0xb5, 1865 0x79, 0x0a, 0xd5, 0xd2, 0x81, 0xf1, 0xb1, 0x4f, 1866 0x9a, 0x17, 0xe8, 0x67, 0x64, 0x48, 0x09, 0x75, 1867 0xff, 0x2d, 0xee, 0x36, 0xca, 0xca, 0x1d, 0x74, 1868 0x99, 0xbe, 0x5c, 0x94, 0x31, 0xcc, 0x12, 0xf4, 1869 0x59, 0x7e, 0x17, 0x00, 0x4f, 0x7b, 0xa4, 0xb1, 1870 0xda, 0xdb, 0x3e, 0xa4, 0x34, 0x10, 0x4a, 0x19, 1871 0x0a, 0xd2, 0xa7, 0xa0, 0xc5, 0xe6, 0xef, 0x82, 1872 0xd4, 0x2e, 0x21, 0xbe, 0x15, 0x73, 0xac, 0xef, 1873 0x05, 0xdb, 0x6a, 0x8a, 0x1a, 0xcb, 0x8e, 0xa5, 1874 0xee, 0xfb, 0x28, 0xbf, 0x96, 0xa4, 0x2b, 0xd2, 1875 0x85, 0x2b, 0x20, 0xc3, 0xaf, 0x9a, 0x32, 0x04, 1876 0xa0, 0x49, 0x24, 0x47, 0xd0, 0x09, 0xf7, 0xcf, 1877 0x73, 0xb6, 0xf6, 0x70, 0xda, 0x3b, 0xf8, 0x5a, 1878 0x28, 0x2e, 0x14, 0x6c, 0x52, 0xbd, 0x2a, 0x7c, 1879 0x8e, 0xc1, 0xa8, 0x0e, 0xb1, 0x1e, 0x6b, 0x8d, 1880 0x76, 0xea, 0x70, 0x81, 0xa0, 0x02, 0x63, 0x74, 1881 0xbc, 0x7e, 0xb9, 0xac, 0x0e, 0x7b, 0x1b, 0x75, 1882 0x82, 0xe2, 0x98, 0x4e, 0x24, 0x55, 0xd4, 0xbd, 1883 0x14, 0xde, 0x58, 0x56, 0x3a, 0x5d, 0x4e, 0x57, 1884 0x0d, 0x54, 0x74, 0xe8, 0x86, 0x8c, 0xcb, 0x07, 1885 0x9f, 0x0b, 0xfb, 0xc2, 0x08, 0x5c, 0xd7, 0x05, 1886 0x3b, 0xc8, 0xd2, 0x15, 0x68, 0x8f, 0x3d, 0x3c, 1887 0x4e, 0x85, 0xa9, 0x25, 0x6f, 0xf5, 0x2e, 0xca, 1888 0xca, 0xa8, 0x27, 0x89, 0x61, 0x4e, 0x1f, 0x57, 1889 0x2d, 0x99, 0x10, 0x3f, 0xbc, 0x9e, 0x96, 0x5e, 1890 0x2f, 0x0a, 0x25, 0xa7, 0x5c, 0xea, 0x65, 0x2a, 1891 0x22, 0x35, 0xa3, 0xf9, 0x13, 0x89, 0x05, 0x2e, 1892 0x19, 0x73, 0x1d, 0x70, 0x74, 0x98, 0x15, 0x4b, 1893 0xab, 0x56, 0x52, 0xe0, 0x01, 0x42, 0x95, 0x6a, 1894 0x46, 0x2c, 0x78, 0xff, 0x26, 0xbc, 0x48, 0x10, 1895 0x38, 0x25, 0xab, 0x32, 0x7c, 0x79, 0x7c, 0x5d, 1896 0x6f, 0x45, 0x54, 0x74, 0x2d, 0x93, 0x56, 0x52, 1897 0x11, 0x34, 0x1e, 0xe3, 0x4b, 0x6a, 0x17, 0x4f, 1898 0x37, 0x14, 0x75, 0xac, 0xa3, 0xa1, 0xca, 0xda, 1899 0x38, 0x06, 0xa9, 0x78, 0xb9, 0x5d, 0xd0, 0x59, 1900 0x1b, 0x5d, 0x1e, 0xc2, 0x0b, 0xfb, 0x39, 0x37, 1901 0x44, 0x85, 0xb6, 0x36, 0x06, 0x95, 0xbc, 0x15, 1902 0x35, 0xb9, 0xe6, 0x27, 0x42, 0xe3, 0xc8, 0xec, 1903 0x30, 0x37, 0x20, 0x26, 0x9a, 0x11, 0x61, 0xc0, 1904 0xdb, 0xb2, 0x5a, 0x26, 0x78, 0x27, 0xb9, 0x13, 1905 0xc9, 0x1a, 0xa7, 0x67, 0x93, 0xe8, 0xbe, 0xcb, 1906}; 1907 1908#define rsa_sigverx931_1_n rsa_sigverx931_0_n 1909#define rsa_sigverx931_1_e rsa_sigverx931_0_e 1910static const unsigned char rsa_sigverx931_1_msg[] = { 1911 0x79, 0x02, 0xb9, 0xd2, 0x3e, 0x84, 0x02, 0xc8, 1912 0x2a, 0x94, 0x92, 0x14, 0x8d, 0xd5, 0xd3, 0x8d, 1913 0xb2, 0xf6, 0x00, 0x8b, 0x61, 0x2c, 0xd2, 0xf9, 1914 0xa8, 0xe0, 0x5d, 0xac, 0xdc, 0xa5, 0x34, 0xf3, 1915 0xda, 0x6c, 0xd4, 0x70, 0x92, 0xfb, 0x40, 0x26, 1916 0xc7, 0x9b, 0xe8, 0xd2, 0x10, 0x11, 0xcf, 0x7f, 1917 0x23, 0xd0, 0xed, 0x55, 0x52, 0x6d, 0xd3, 0xb2, 1918 0x56, 0x53, 0x8d, 0x7c, 0x4c, 0xb8, 0xcc, 0xb5, 1919 0xfd, 0xd0, 0x45, 0x4f, 0x62, 0x40, 0x54, 0x42, 1920 0x68, 0xd5, 0xe5, 0xdd, 0xf0, 0x76, 0x94, 0x59, 1921 0x1a, 0x57, 0x13, 0xb4, 0xc3, 0x70, 0xcc, 0xbd, 1922 0x4c, 0x2e, 0xc8, 0x6b, 0x9d, 0x68, 0xd0, 0x72, 1923 0x6a, 0x94, 0xd2, 0x18, 0xb5, 0x3b, 0x86, 0x45, 1924 0x95, 0xaa, 0x50, 0xda, 0x35, 0xeb, 0x69, 0x44, 1925 0x1f, 0xf3, 0x3a, 0x51, 0xbb, 0x1d, 0x08, 0x42, 1926 0x12, 0xd7, 0xd6, 0x21, 0xd8, 0x9b, 0x87, 0x55, 1927}; 1928 1929static const unsigned char rsa_sigverx931_1_sig[] = { 1930 0x3b, 0xba, 0xb3, 0xb1, 0xb2, 0x6a, 0x29, 0xb5, 1931 0xf9, 0x94, 0xf1, 0x00, 0x5c, 0x16, 0x67, 0x67, 1932 0x73, 0xd3, 0xde, 0x7e, 0x07, 0xfa, 0xaa, 0x95, 1933 0xeb, 0x5a, 0x55, 0xdc, 0xb2, 0xa9, 0x70, 0x5a, 1934 0xee, 0x8f, 0x8d, 0x69, 0x85, 0x2b, 0x00, 0xe3, 1935 0xdc, 0xe2, 0x73, 0x9b, 0x68, 0xeb, 0x93, 0x69, 1936 0x08, 0x03, 0x17, 0xd6, 0x50, 0x21, 0x14, 0x23, 1937 0x8c, 0xe6, 0x54, 0x3a, 0xd9, 0xfc, 0x8b, 0x14, 1938 0x81, 0xb1, 0x8b, 0x9d, 0xd2, 0xbe, 0x58, 0x75, 1939 0x94, 0x74, 0x93, 0xc9, 0xbb, 0x4e, 0xf6, 0x1f, 1940 0x73, 0x7d, 0x1a, 0x5f, 0xbd, 0xbf, 0x59, 0x37, 1941 0x5b, 0x98, 0x54, 0xad, 0x3a, 0xef, 0xa0, 0xef, 1942 0xcb, 0xc3, 0xe8, 0x84, 0xd8, 0x3d, 0xf5, 0x60, 1943 0xb8, 0xc3, 0x8d, 0x1e, 0x78, 0xa0, 0x91, 0x94, 1944 0xb7, 0xd7, 0xb1, 0xd4, 0xe2, 0xee, 0x81, 0x93, 1945 0xfc, 0x41, 0xf0, 0x31, 0xbb, 0x03, 0x52, 0xde, 1946 0x80, 0x20, 0x3a, 0x68, 0xe6, 0xc5, 0x50, 0x1b, 1947 0x08, 0x3f, 0x40, 0xde, 0xb3, 0xe5, 0x81, 0x99, 1948 0x7f, 0xdb, 0xb6, 0x5d, 0x61, 0x27, 0xd4, 0xfb, 1949 0xcd, 0xc5, 0x7a, 0xea, 0xde, 0x7a, 0x66, 0xef, 1950 0x55, 0x3f, 0x85, 0xea, 0x84, 0xc5, 0x0a, 0xf6, 1951 0x3c, 0x40, 0x38, 0xf7, 0x6c, 0x66, 0xe5, 0xbe, 1952 0x61, 0x41, 0xd3, 0xb1, 0x08, 0xe1, 0xb4, 0xf9, 1953 0x6e, 0xf6, 0x0e, 0x4a, 0x72, 0x6c, 0x61, 0x63, 1954 0x3e, 0x41, 0x33, 0x94, 0xd6, 0x27, 0xa4, 0xd9, 1955 0x3a, 0x20, 0x2b, 0x39, 0xea, 0xe5, 0x82, 0x48, 1956 0xd6, 0x5b, 0x58, 0x85, 0x44, 0xb0, 0xd2, 0xfd, 1957 0xfb, 0x3e, 0xeb, 0x78, 0xac, 0xbc, 0xba, 0x16, 1958 0x92, 0x0e, 0x20, 0xc1, 0xb2, 0xd1, 0x92, 0xa8, 1959 0x00, 0x88, 0xc0, 0x41, 0x46, 0x38, 0xb6, 0x54, 1960 0x70, 0x0c, 0x00, 0x62, 0x97, 0x6a, 0x8e, 0x66, 1961 0x5a, 0xa1, 0x6c, 0xf7, 0x6d, 0xc2, 0x27, 0x56, 1962 0x60, 0x5b, 0x0c, 0x52, 0xac, 0x5c, 0xae, 0x99, 1963 0x55, 0x11, 0x62, 0x52, 0x09, 0x48, 0x53, 0x90, 1964 0x3c, 0x0b, 0xd4, 0xdc, 0x7b, 0xe3, 0x4c, 0xe3, 1965 0xa8, 0x6d, 0xc5, 0xdf, 0xc1, 0x5c, 0x59, 0x25, 1966 0x99, 0x30, 0xde, 0x57, 0x6a, 0x84, 0x25, 0x34, 1967 0x3e, 0x64, 0x11, 0xdb, 0x7a, 0x82, 0x8e, 0x70, 1968 0xd2, 0x5c, 0x0e, 0x81, 0xa0, 0x24, 0x53, 0x75, 1969 0x98, 0xd6, 0x10, 0x01, 0x6a, 0x14, 0xed, 0xc3, 1970 0x6f, 0xc4, 0x18, 0xb8, 0xd2, 0x9f, 0x59, 0x53, 1971 0x81, 0x3a, 0x86, 0x31, 0xfc, 0x9e, 0xbf, 0x6c, 1972 0x52, 0x93, 0x86, 0x9c, 0xaa, 0x6c, 0x6f, 0x07, 1973 0x8a, 0x40, 0x33, 0x64, 0xb2, 0x70, 0x48, 0x85, 1974 0x05, 0x59, 0x65, 0x2d, 0x6b, 0x9a, 0xad, 0xab, 1975 0x20, 0x7e, 0x02, 0x6d, 0xde, 0xcf, 0x22, 0x0b, 1976 0xea, 0x6e, 0xbd, 0x1c, 0x39, 0x3a, 0xfd, 0xa4, 1977 0xde, 0x54, 0xae, 0xde, 0x5e, 0xf7, 0xb0, 0x6d, 1978}; 1979 1980static const struct rsa_sigver_st rsa_sigver_data[] = { 1981 { 1982 "pkcs1", /* pkcs1v1.5 */ 1983 2048, 1984 "SHA224", 1985 ITM(rsa_sigver15_0_msg), 1986 ITM(rsa_sigver15_0_n), 1987 ITM(rsa_sigver15_0_e), 1988 ITM(rsa_sigver15_0_sig), 1989 NO_PSS_SALT_LEN, 1990 PASS 1991 }, 1992 { 1993 "pkcs1", /* pkcs1v1.5 */ 1994 2048, 1995 "SHA224", 1996 ITM(rsa_sigver15_1_msg), 1997 ITM(rsa_sigver15_1_n), 1998 ITM(rsa_sigver15_1_e), 1999 ITM(rsa_sigver15_1_sig), 2000 NO_PSS_SALT_LEN, 2001 FAIL 2002 }, 2003 { 2004 "x931", 2005 3072, 2006 "SHA1", 2007 ITM(rsa_sigverx931_0_msg), 2008 ITM(rsa_sigverx931_0_n), 2009 ITM(rsa_sigverx931_0_e), 2010 ITM(rsa_sigverx931_0_sig), 2011 NO_PSS_SALT_LEN, 2012 PASS 2013 }, 2014 { 2015 "x931", 2016 3072, 2017 "SHA256", 2018 ITM(rsa_sigverx931_1_msg), 2019 ITM(rsa_sigverx931_1_n), 2020 ITM(rsa_sigverx931_1_e), 2021 ITM(rsa_sigverx931_1_sig), 2022 NO_PSS_SALT_LEN, 2023 FAIL 2024 }, 2025 { 2026 "pss", 2027 4096, 2028 "SHA384", 2029 ITM(rsa_sigverpss_0_msg), 2030 ITM(rsa_sigverpss_0_n), 2031 ITM(rsa_sigverpss_0_e), 2032 ITM(rsa_sigverpss_0_sig), 2033 48, 2034 PASS 2035 }, 2036 { 2037 "pss", 2038 4096, 2039 "SHA384", 2040 ITM(rsa_sigverpss_1_msg), 2041 ITM(rsa_sigverpss_1_n), 2042 ITM(rsa_sigverpss_1_e), 2043 ITM(rsa_sigverpss_1_sig), 2044 48, 2045 FAIL 2046 }, 2047}; 2048 2049struct rsa_decrypt_prim_st { 2050 const unsigned char *ct; 2051 size_t ct_len; 2052}; 2053 2054static const unsigned char rsa_decrypt_prim_0_ct[] = { 2055 0x09, 0x7e, 0x82, 0xfe, 0xc7, 0x24, 0x65, 0xe0, 2056 0x49, 0x2e, 0x78, 0xed, 0xf4, 0x7d, 0x05, 0x0d, 2057 0xff, 0x2f, 0x1a, 0x95, 0xeb, 0x74, 0x60, 0x3d, 2058 0xd3, 0x3a, 0xec, 0x8a, 0x2c, 0x8b, 0x00, 0xa5, 2059 0x75, 0x2c, 0x87, 0x7b, 0xa5, 0x76, 0x08, 0xee, 2060 0x99, 0xab, 0x5b, 0x21, 0x69, 0x90, 0x72, 0x0d, 2061 0x55, 0xe4, 0x7d, 0x1d, 0xcb, 0xaa, 0xeb, 0x32, 2062 0x24, 0xf7, 0xce, 0x95, 0xb5, 0x3e, 0x0e, 0x57, 2063 0xd4, 0x2a, 0x5b, 0xfc, 0x1f, 0xf7, 0x28, 0x3f, 2064 0xd6, 0x31, 0x36, 0x92, 0xc5, 0x13, 0xe3, 0x4e, 2065 0x28, 0x53, 0xbe, 0x60, 0x5f, 0x82, 0x12, 0x7a, 2066 0x50, 0xe6, 0x91, 0x40, 0xcf, 0x52, 0x3a, 0xd2, 2067 0x15, 0x20, 0xd5, 0x82, 0x6d, 0x5e, 0xab, 0x47, 2068 0xd1, 0x2d, 0x00, 0xf5, 0xea, 0xf4, 0x68, 0x88, 2069 0x38, 0x43, 0xd6, 0xcb, 0xaa, 0xd0, 0xd1, 0x75, 2070 0xe6, 0x87, 0x5f, 0xd1, 0x89, 0xd3, 0x57, 0x1b, 2071 0xf2, 0x45, 0x8a, 0x92, 0xe6, 0x95, 0xb8, 0x99, 2072 0x80, 0xe9, 0xe6, 0x5f, 0x2b, 0x48, 0x2b, 0xb3, 2073 0x2b, 0x80, 0x56, 0xf8, 0xd4, 0x96, 0x44, 0xb5, 2074 0xae, 0x6d, 0x4a, 0x3d, 0x7b, 0x0a, 0x54, 0x3c, 2075 0xa8, 0x21, 0x8b, 0x64, 0x96, 0xea, 0xc2, 0xef, 2076 0x60, 0xbb, 0xd3, 0x4e, 0xaf, 0x6c, 0x5b, 0x06, 2077 0x57, 0xe8, 0x5e, 0x2c, 0x87, 0x46, 0x12, 0xeb, 2078 0xfb, 0xe2, 0xdb, 0x7b, 0xac, 0x09, 0x8b, 0xa0, 2079 0x98, 0x6e, 0xc6, 0x3f, 0x98, 0xdd, 0x7d, 0xc6, 2080 0xc6, 0x32, 0xc2, 0xcc, 0x73, 0xe2, 0x15, 0xde, 2081 0xb2, 0x0f, 0x41, 0x08, 0x1e, 0x2e, 0xba, 0x93, 2082 0x65, 0x94, 0xab, 0x84, 0x0e, 0x1e, 0xda, 0x1b, 2083 0xf0, 0xe0, 0x13, 0x13, 0xe2, 0xa5, 0x31, 0xb8, 2084 0x80, 0xc1, 0x38, 0xc5, 0x08, 0x09, 0x0a, 0xe2, 2085 0x78, 0x7d, 0xd6, 0xcf, 0x8d, 0x6b, 0xe8, 0x1b, 2086 0x47, 0x83, 0x80, 0x71, 0xe2, 0xd3, 0x01, 0xbc, 2087}; 2088 2089static const unsigned char rsa_decrypt_prim_1_ct[] = { 2090 0xff, 0xd5, 0xaa, 0x3f, 0x0c, 0x7c, 0x78, 0x7e, 2091 0xe3, 0x8a, 0x4f, 0xcc, 0x20, 0x3f, 0x51, 0xe5, 2092 0xf4, 0x9c, 0xc5, 0x62, 0xcc, 0xa3, 0xcb, 0xce, 2093 0x39, 0x80, 0x35, 0xef, 0xd5, 0x95, 0x56, 0xcb, 2094 0xb2, 0x62, 0x8c, 0xe6, 0x8b, 0x20, 0xe4, 0x36, 2095 0xae, 0xe8, 0x07, 0x07, 0xc2, 0x23, 0x6a, 0xfc, 2096 0x83, 0xf0, 0x04, 0x88, 0x19, 0xf8, 0x9f, 0x5c, 2097 0x59, 0x4d, 0xb3, 0x81, 0x86, 0x9d, 0x3b, 0x61, 2098 0x73, 0x31, 0x03, 0xec, 0x9c, 0xdd, 0x75, 0xb7, 2099 0x37, 0x0a, 0x8d, 0x94, 0xd9, 0x9f, 0x6d, 0x85, 2100 0xb0, 0x5c, 0x08, 0xcc, 0xb4, 0x27, 0x8c, 0xf0, 2101 0xe6, 0xd6, 0xe0, 0xc1, 0x57, 0x59, 0xaa, 0xc7, 2102 0x8f, 0x5c, 0xa7, 0x4b, 0x3c, 0x81, 0x4a, 0xa3, 2103 0x9b, 0x18, 0x88, 0x04, 0x98, 0x54, 0x3d, 0x87, 2104 0x2a, 0x89, 0xb6, 0x41, 0xe8, 0xbd, 0x37, 0x17, 2105 0x03, 0xa8, 0xf1, 0x37, 0xa5, 0x5e, 0x02, 0x13, 2106 0x67, 0x08, 0xec, 0x9e, 0x97, 0xf5, 0xcc, 0x5f, 2107 0x75, 0x37, 0xbe, 0xce, 0xe8, 0x5e, 0xa1, 0xca, 2108 0x46, 0xa3, 0xda, 0xe4, 0x1f, 0xf8, 0xc4, 0xa3, 2109 0x26, 0xbb, 0xed, 0xa2, 0x71, 0xb2, 0x44, 0x00, 2110 0xd3, 0xe5, 0x06, 0xf1, 0xb4, 0xc1, 0xe0, 0x29, 2111 0xca, 0xeb, 0xe0, 0xdf, 0xd1, 0x69, 0x5f, 0xa9, 2112 0x03, 0x7c, 0x49, 0x93, 0xfb, 0xc2, 0xdf, 0x39, 2113 0xbc, 0x2a, 0x6b, 0x59, 0x7d, 0xf4, 0x84, 0x93, 2114 0xa2, 0x8b, 0x7a, 0x5a, 0x7a, 0xa9, 0xff, 0x41, 2115 0x4c, 0x52, 0x5c, 0xf9, 0x59, 0xd2, 0x91, 0xc3, 2116 0xa9, 0xe8, 0x23, 0x36, 0x5f, 0x2f, 0xb9, 0xbe, 2117 0x22, 0xc4, 0xfd, 0x84, 0x5f, 0x81, 0x3d, 0x94, 2118 0xf8, 0xa4, 0x9b, 0xae, 0xc0, 0xb5, 0x78, 0x4f, 2119 0x91, 0x76, 0x02, 0x5d, 0x60, 0x71, 0x8b, 0xeb, 2120 0x08, 0x42, 0xe3, 0xb3, 0x63, 0x05, 0x60, 0x59, 2121 0x98, 0xc1, 0x6d, 0x66, 0xb3, 0xc5, 0x8a, 0xbc, 2122}; 2123 2124static const struct rsa_decrypt_prim_st rsa_decrypt_prim_data[] = { 2125 { 2126 ITM(rsa_decrypt_prim_0_ct), 2127 }, 2128 { 2129 ITM(rsa_decrypt_prim_1_ct), 2130 }, 2131}; 2132 2133struct drbg_st { 2134 const char *drbg_name; 2135 const char *cipher; 2136 int use_df; 2137 2138 const unsigned char *entropy_input; 2139 size_t entropy_input_len; 2140 const unsigned char *nonce; 2141 size_t nonce_len; 2142 const unsigned char *returned_bits; 2143 size_t returned_bits_len; 2144}; 2145 2146static const unsigned char drbg_entropy_input[] = { 2147 0x36, 0x40, 0x19, 0x40, 0xfa, 0x8b, 0x1f, 0xba, 2148 0x91, 0xa1, 0x66, 0x1f, 0x21, 0x1d, 0x78, 0xa0, 2149 0xb9, 0x38, 0x9a, 0x74, 0xe5, 0xbc, 0xcf, 0xec, 2150 0xe8, 0xd7, 0x66, 0xaf, 0x1a, 0x6d, 0x3b, 0x14 2151}; 2152 2153static const unsigned char drbg_nonce[] = { 2154 0x49, 0x6f, 0x25, 0xb0, 0xf1, 0x30, 0x1b, 0x4f, 2155 0x50, 0x1b, 0xe3, 0x03, 0x80, 0xa1, 0x37, 0xeb 2156}; 2157 2158static const unsigned char drbg_returned_bits[] = { 2159 0x58, 0x62, 0xeb, 0x38, 0xbd, 0x55, 0x8d, 0xd9, 2160 0x78, 0xa6, 0x96, 0xe6, 0xdf, 0x16, 0x47, 0x82, 2161 0xdd, 0xd8, 0x87, 0xe7, 0xe9, 0xa6, 0xc9, 0xf3, 2162 0xf1, 0xfb, 0xaf, 0xb7, 0x89, 0x41, 0xb5, 0x35, 2163 0xa6, 0x49, 0x12, 0xdf, 0xd2, 0x24, 0xc6, 0xdc, 2164 0x74, 0x54, 0xe5, 0x25, 0x0b, 0x3d, 0x97, 0x16, 2165 0x5e, 0x16, 0x26, 0x0c, 0x2f, 0xaf, 0x1c, 0xc7, 2166 0x73, 0x5c, 0xb7, 0x5f, 0xb4, 0xf0, 0x7e, 0x1d 2167}; 2168 2169static const unsigned char drbg_key_0[] = { 2170 0x33, 0x63, 0xd9, 0x00, 0x0e, 0x6d, 0xb4, 0x7c, 2171 0x16, 0xd3, 0xfc, 0x65, 0xf2, 0x87, 0x2c, 0x08, 2172 0xa3, 0x5f, 0x99, 0xb2, 0xd1, 0x74, 0xaf, 0xa5, 2173 0x37, 0xa6, 0x6e, 0xc1, 0x53, 0x05, 0x2d, 0x98 2174}; 2175 2176static const struct drbg_st drbg_data[] = { 2177 { 2178 "CTR-DRBG", 2179 "AES-256-CTR", 2180 1, 2181 ITM(drbg_entropy_input), 2182 ITM(drbg_nonce), 2183 ITM(drbg_returned_bits) 2184 } 2185}; 2186