Unwind multiprime RSA support.
FIPS is not compatible with multiprime RSA. Any multiprime RSA private
keys will fail to parse after this change.
Change-Id: I8d969d668bf0be4f66c66a30e56f0e7f6795f3e9
Reviewed-on: https://boringssl-review.googlesource.com/14984
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/evp/print.c b/crypto/evp/print.c
index b2e3509..214ada2 100644
--- a/crypto/evp/print.c
+++ b/crypto/evp/print.c
@@ -150,17 +150,6 @@
update_buflen(rsa->dmp1, &buf_len);
update_buflen(rsa->dmq1, &buf_len);
update_buflen(rsa->iqmp, &buf_len);
-
- if (rsa->additional_primes != NULL) {
- for (size_t i = 0;
- i < sk_RSA_additional_prime_num(rsa->additional_primes); i++) {
- const RSA_additional_prime *ap =
- sk_RSA_additional_prime_value(rsa->additional_primes, i);
- update_buflen(ap->prime, &buf_len);
- update_buflen(ap->exp, &buf_len);
- update_buflen(ap->coeff, &buf_len);
- }
- }
}
m = (uint8_t *)OPENSSL_malloc(buf_len + 10);
@@ -204,26 +193,6 @@
!bn_print(out, "coefficient:", rsa->iqmp, m, off)) {
goto err;
}
-
- if (rsa->additional_primes != NULL &&
- sk_RSA_additional_prime_num(rsa->additional_primes) > 0) {
- if (BIO_printf(out, "otherPrimeInfos:\n") <= 0) {
- goto err;
- }
- for (size_t i = 0;
- i < sk_RSA_additional_prime_num(rsa->additional_primes); i++) {
- const RSA_additional_prime *ap =
- sk_RSA_additional_prime_value(rsa->additional_primes, i);
-
- if (BIO_printf(out, "otherPrimeInfo (prime %u):\n",
- (unsigned)(i + 3)) <= 0 ||
- !bn_print(out, "prime:", ap->prime, m, off) ||
- !bn_print(out, "exponent:", ap->exp, m, off) ||
- !bn_print(out, "coeff:", ap->coeff, m, off)) {
- goto err;
- }
- }
- }
}
ret = 1;
diff --git a/crypto/rsa/internal.h b/crypto/rsa/internal.h
index 589fd3a..29202b6 100644
--- a/crypto/rsa/internal.h
+++ b/crypto/rsa/internal.h
@@ -117,26 +117,6 @@
size_t len);
-/* RSA_additional_prime contains information about the third, forth etc prime
- * in a multi-prime RSA key. */
-typedef struct RSA_additional_prime_st {
- BIGNUM *prime;
- /* exp is d^{prime-1} mod prime */
- BIGNUM *exp;
- /* coeff is such that r×coeff ≡ 1 mod prime. */
- BIGNUM *coeff;
-
- /* Values below here are not in the ASN.1 serialisation. */
-
- /* r is the product of all primes (including p and q) prior to this one. */
- BIGNUM *r;
- /* mont is a |BN_MONT_CTX| modulo |prime|. */
- BN_MONT_CTX *mont;
-} RSA_additional_prime;
-
-void RSA_additional_prime_free(RSA_additional_prime *ap);
-
-
/* The following utility functions are exported for test purposes. */
extern const BN_ULONG kBoringSSLRSASqrtTwo[];
diff --git a/crypto/rsa/rsa.c b/crypto/rsa/rsa.c
index f84c42a..b16d55c 100644
--- a/crypto/rsa/rsa.c
+++ b/crypto/rsa/rsa.c
@@ -110,19 +110,6 @@
return rsa;
}
-void RSA_additional_prime_free(RSA_additional_prime *ap) {
- if (ap == NULL) {
- return;
- }
-
- BN_clear_free(ap->prime);
- BN_clear_free(ap->exp);
- BN_clear_free(ap->coeff);
- BN_clear_free(ap->r);
- BN_MONT_CTX_free(ap->mont);
- OPENSSL_free(ap);
-}
-
void RSA_free(RSA *rsa) {
unsigned u;
@@ -157,10 +144,6 @@
}
OPENSSL_free(rsa->blindings);
OPENSSL_free(rsa->blindings_inuse);
- if (rsa->additional_primes != NULL) {
- sk_RSA_additional_prime_pop_free(rsa->additional_primes,
- RSA_additional_prime_free);
- }
CRYPTO_MUTEX_cleanup(&rsa->lock);
OPENSSL_free(rsa);
}
@@ -584,23 +567,6 @@
goto out;
}
- size_t num_additional_primes = 0;
- if (key->additional_primes != NULL) {
- num_additional_primes = sk_RSA_additional_prime_num(key->additional_primes);
- }
-
- for (size_t i = 0; i < num_additional_primes; i++) {
- const RSA_additional_prime *ap =
- sk_RSA_additional_prime_value(key->additional_primes, i);
- if (!BN_mul(&n, &n, ap->prime, ctx) ||
- !BN_sub(&pm1, ap->prime, BN_value_one()) ||
- !BN_mul(&lcm, &lcm, &pm1, ctx) ||
- !BN_gcd(&gcd, &gcd, &pm1, ctx)) {
- OPENSSL_PUT_ERROR(RSA, ERR_LIB_BN);
- goto out;
- }
- }
-
if (!BN_div(&lcm, NULL, &lcm, &gcd, ctx) ||
!BN_gcd(&gcd, &pm1, &qm1, ctx) ||
/* de = d*e mod lcm(prime-1, for all primes). */
@@ -626,7 +592,7 @@
goto out;
}
- if (has_crt_values && num_additional_primes == 0) {
+ if (has_crt_values) {
if (/* dmp1 = d mod (p-1) */
!BN_mod(&dmp1, key->d, &pm1, ctx) ||
/* dmq1 = d mod (q-1) */
@@ -734,11 +700,6 @@
return 0;
}
- if (rsa->additional_primes != NULL) {
- OPENSSL_PUT_ERROR(RSA, RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY);
- return 0;
- }
-
/* This uses the algorithm from section 9B of the RSA paper:
* http://people.csail.mit.edu/rivest/Rsapaper.pdf */
diff --git a/crypto/rsa/rsa_asn1.c b/crypto/rsa/rsa_asn1.c
index 88b1dfb..d6e28ad 100644
--- a/crypto/rsa/rsa_asn1.c
+++ b/crypto/rsa/rsa_asn1.c
@@ -169,36 +169,9 @@
return 1;
}
-/* kVersionTwoPrime and kVersionMulti are the supported values of the version
- * field of an RSAPrivateKey structure (RFC 3447). */
+/* kVersionTwoPrime is the value of the version field for a two-prime
+ * RSAPrivateKey structure (RFC 3447). */
static const uint64_t kVersionTwoPrime = 0;
-static const uint64_t kVersionMulti = 1;
-
-/* rsa_parse_additional_prime parses a DER-encoded OtherPrimeInfo from |cbs| and
- * advances |cbs|. It returns a newly-allocated |RSA_additional_prime| on
- * success or NULL on error. The |r| and |mont| fields of the result are set to
- * NULL. */
-static RSA_additional_prime *rsa_parse_additional_prime(CBS *cbs) {
- RSA_additional_prime *ret = OPENSSL_malloc(sizeof(RSA_additional_prime));
- if (ret == NULL) {
- OPENSSL_PUT_ERROR(RSA, ERR_R_MALLOC_FAILURE);
- return 0;
- }
- OPENSSL_memset(ret, 0, sizeof(RSA_additional_prime));
-
- CBS child;
- if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) ||
- !parse_integer(&child, &ret->prime) ||
- !parse_integer(&child, &ret->exp) ||
- !parse_integer(&child, &ret->coeff) ||
- CBS_len(&child) != 0) {
- OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_ENCODING);
- RSA_additional_prime_free(ret);
- return NULL;
- }
-
- return ret;
-}
RSA *RSA_parse_private_key(CBS *cbs) {
BN_CTX *ctx = NULL;
@@ -216,7 +189,7 @@
goto err;
}
- if (version != kVersionTwoPrime && version != kVersionMulti) {
+ if (version != kVersionTwoPrime) {
OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_VERSION);
goto err;
}
@@ -232,50 +205,6 @@
goto err;
}
- if (version == kVersionMulti) {
- /* Although otherPrimeInfos is written as OPTIONAL in RFC 3447, it later
- * says "[otherPrimeInfos] shall be omitted if version is 0 and shall
- * contain at least one instance of OtherPrimeInfo if version is 1." The
- * OPTIONAL is just so both versions share a single definition. */
- CBS other_prime_infos;
- if (!CBS_get_asn1(&child, &other_prime_infos, CBS_ASN1_SEQUENCE) ||
- CBS_len(&other_prime_infos) == 0) {
- OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_ENCODING);
- goto err;
- }
- ret->additional_primes = sk_RSA_additional_prime_new_null();
- if (ret->additional_primes == NULL) {
- OPENSSL_PUT_ERROR(RSA, ERR_R_MALLOC_FAILURE);
- goto err;
- }
-
- ctx = BN_CTX_new();
- product_of_primes_so_far = BN_new();
- if (ctx == NULL ||
- product_of_primes_so_far == NULL ||
- !BN_mul(product_of_primes_so_far, ret->p, ret->q, ctx)) {
- goto err;
- }
-
- while (CBS_len(&other_prime_infos) > 0) {
- RSA_additional_prime *ap = rsa_parse_additional_prime(&other_prime_infos);
- if (ap == NULL) {
- goto err;
- }
- if (!sk_RSA_additional_prime_push(ret->additional_primes, ap)) {
- OPENSSL_PUT_ERROR(RSA, ERR_R_MALLOC_FAILURE);
- RSA_additional_prime_free(ap);
- goto err;
- }
- ap->r = BN_dup(product_of_primes_so_far);
- if (ap->r == NULL ||
- !BN_mul(product_of_primes_so_far, product_of_primes_so_far,
- ap->prime, ctx)) {
- goto err;
- }
- }
- }
-
if (CBS_len(&child) != 0) {
OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_ENCODING);
goto err;
@@ -310,13 +239,9 @@
}
int RSA_marshal_private_key(CBB *cbb, const RSA *rsa) {
- const int is_multiprime =
- sk_RSA_additional_prime_num(rsa->additional_primes) > 0;
-
CBB child;
if (!CBB_add_asn1(cbb, &child, CBS_ASN1_SEQUENCE) ||
- !CBB_add_asn1_uint64(&child,
- is_multiprime ? kVersionMulti : kVersionTwoPrime) ||
+ !CBB_add_asn1_uint64(&child, kVersionTwoPrime) ||
!marshal_integer(&child, rsa->n) ||
!marshal_integer(&child, rsa->e) ||
!marshal_integer(&child, rsa->d) ||
@@ -324,35 +249,8 @@
!marshal_integer(&child, rsa->q) ||
!marshal_integer(&child, rsa->dmp1) ||
!marshal_integer(&child, rsa->dmq1) ||
- !marshal_integer(&child, rsa->iqmp)) {
- OPENSSL_PUT_ERROR(RSA, RSA_R_ENCODE_ERROR);
- return 0;
- }
-
- CBB other_prime_infos;
- if (is_multiprime) {
- if (!CBB_add_asn1(&child, &other_prime_infos, CBS_ASN1_SEQUENCE)) {
- OPENSSL_PUT_ERROR(RSA, RSA_R_ENCODE_ERROR);
- return 0;
- }
- for (size_t i = 0; i < sk_RSA_additional_prime_num(rsa->additional_primes);
- i++) {
- RSA_additional_prime *ap =
- sk_RSA_additional_prime_value(rsa->additional_primes, i);
- CBB other_prime_info;
- if (!CBB_add_asn1(&other_prime_infos, &other_prime_info,
- CBS_ASN1_SEQUENCE) ||
- !marshal_integer(&other_prime_info, ap->prime) ||
- !marshal_integer(&other_prime_info, ap->exp) ||
- !marshal_integer(&other_prime_info, ap->coeff) ||
- !CBB_flush(&other_prime_infos)) {
- OPENSSL_PUT_ERROR(RSA, RSA_R_ENCODE_ERROR);
- return 0;
- }
- }
- }
-
- if (!CBB_flush(cbb)) {
+ !marshal_integer(&child, rsa->iqmp) ||
+ !CBB_flush(cbb)) {
OPENSSL_PUT_ERROR(RSA, RSA_R_ENCODE_ERROR);
return 0;
}
diff --git a/crypto/rsa/rsa_impl.c b/crypto/rsa/rsa_impl.c
index 650f6f3..eb0a13e 100644
--- a/crypto/rsa/rsa_impl.c
+++ b/crypto/rsa/rsa_impl.c
@@ -651,11 +651,6 @@
BIGNUM *r1, *m1, *vrfy;
int ret = 0;
- size_t i, num_additional_primes = 0;
-
- if (rsa->additional_primes != NULL) {
- num_additional_primes = sk_RSA_additional_prime_num(rsa->additional_primes);
- }
BN_CTX_start(ctx);
r1 = BN_CTX_get(ctx);
@@ -733,31 +728,6 @@
goto err;
}
- for (i = 0; i < num_additional_primes; i++) {
- /* multi-prime RSA. */
- RSA_additional_prime *ap =
- sk_RSA_additional_prime_value(rsa->additional_primes, i);
-
- /* c will already point to a BIGNUM with the correct flags. */
- if (!BN_mod(r1, I, ap->prime, ctx)) {
- goto err;
- }
-
- if (!BN_MONT_CTX_set_locked(&ap->mont, &rsa->lock, ap->prime, ctx) ||
- !BN_mod_exp_mont_consttime(m1, r1, ap->exp, ap->prime, ctx, ap->mont)) {
- goto err;
- }
-
- if (!BN_sub(m1, m1, r0) ||
- !BN_mul(m1, m1, ap->coeff, ctx) ||
- !BN_mod(m1, m1, ap->prime, ctx) ||
- (BN_is_negative(m1) && !BN_add(m1, m1, ap->prime)) ||
- !BN_mul(m1, m1, ap->r, ctx) ||
- !BN_add(r0, r0, m1)) {
- goto err;
- }
- }
-
ret = 1;
err:
@@ -1032,10 +1002,6 @@
goto bn_err;
}
- sk_RSA_additional_prime_pop_free(rsa->additional_primes,
- RSA_additional_prime_free);
- rsa->additional_primes = NULL;
-
/* The key generation process is complex and thus error-prone. It could be
* disastrous to generate and then use a bad key so double-check that the key
* makes sense. */
diff --git a/crypto/rsa/rsa_test.cc b/crypto/rsa/rsa_test.cc
index e84a727..cd1ff6d 100644
--- a/crypto/rsa/rsa_test.cc
+++ b/crypto/rsa/rsa_test.cc
@@ -274,204 +274,6 @@
0x6a, 0xce, 0x9f, 0xc8,
};
-static const uint8_t kThreePrimeKey[] =
- "\x30\x82\x04\xd7\x02\x01\x01\x02\x82\x01\x00\x62\x91\xe9\xea\xb3\x5d\x6c"
- "\x29\xae\x21\x83\xbb\xb5\x82\xb1\x9e\xea\xe0\x64\x5b\x1e\x2f\x5e\x2c\x0a"
- "\x80\x3d\x29\xd4\xfa\x9a\xe7\x44\xe6\x21\xbd\x98\xc0\x3d\xe0\x53\x59\xae"
- "\xd3\x3e\xfe\xc4\xc2\xc4\x5a\x5a\x89\x07\xf4\x4f\xdc\xb0\x6a\xd4\x3e\x99"
- "\x7d\x7a\x97\x26\x4e\xe1\x93\xca\x6e\xed\x07\xfc\xb4\xfa\x95\x1e\x73\x7b"
- "\x86\x08\x6a\xb9\xd4\x29\xb0\x7e\x59\xb7\x9d\x7b\xeb\x67\x6e\xf0\xbb\x5e"
- "\xcf\xb9\xcd\x58\x93\xf0\xe7\x88\x17\x6c\x0d\x76\x1e\xb9\x27\x9a\x4d\x02"
- "\x16\xb6\x49\x6d\xa7\x83\x23\x4d\x02\x48\x0c\x0c\x1f\x0e\x85\x21\xe3\x06"
- "\x76\x0a\x73\xe6\xc1\x21\xfa\x30\x18\x78\x29\x5c\x31\xd0\x29\xae\x6f\x7d"
- "\x87\xd8\x2f\x16\xfa\xbc\x67\x8a\x94\x71\x59\x9b\xec\x22\x40\x55\x9f\xc2"
- "\x94\xb5\xbd\x78\x01\xc9\xef\x18\xc8\x6d\x0d\xdc\x53\x42\xb2\x5c\xab\x65"
- "\x05\xbd\x35\x08\x85\x1b\xf8\xe9\x47\xbc\xfe\xc5\xae\x47\x29\x63\x44\x8e"
- "\x4d\xb7\x47\xab\x0d\xd8\x76\x68\x4f\xc7\x07\x02\xe4\x86\xb0\xcf\xd8\x19"
- "\xad\xf4\x85\x76\x8b\x3b\x4e\x40\x8d\x29\x7a\x8a\x07\x36\xf3\x78\xae\x17"
- "\xa6\x8f\x53\x58\x65\x4c\x86\x9e\xd7\x8b\xec\x38\x4f\x99\xc7\x02\x01\x03"
- "\x02\x82\x01\x00\x41\xb6\x9b\xf1\xcc\xe8\xf2\xc6\x74\x16\x57\xd2\x79\x01"
- "\xcb\xbf\x47\x40\x42\xe7\x69\x74\xe9\x72\xb1\xaa\xd3\x71\x38\xa7\x11\xef"
- "\x83\x44\x16\x7e\x65\xd5\x7e\x95\x8c\xe6\x74\x8c\xd4\xa9\xd8\x81\xd8\x3c"
- "\x3c\x5b\x5a\xa2\xdf\xe8\x75\x9c\x8d\x7f\x10\xfe\x51\xba\x19\x89\xeb\xb7"
- "\xdc\x49\xf3\x5a\xa8\x78\xa7\x0e\x14\x4c\xfd\x04\x05\x9c\x7b\xe2\xc5\xa3"
- "\x04\xee\xd9\x4c\xfd\x7d\x47\xb0\x0d\x9b\x3d\x70\x91\x81\x2c\xab\x2b\x87"
- "\xad\x11\x68\x24\xfc\x2b\xd4\xee\x5e\x28\xeb\x6d\xab\xde\x0f\x77\x15\x58"
- "\x76\x39\xc9\x59\x3a\x7f\x19\x9d\xc6\x7e\x86\xe4\xd5\x38\x70\x9e\xae\xb9"
- "\xfb\x33\x33\xd1\x0c\x2d\xab\x01\x20\xe1\x8b\x29\x99\xd3\xeb\x87\x05\x72"
- "\xaa\x43\x58\x64\x8e\x9e\x31\xdb\x45\x9b\x2b\xac\x58\x80\x5d\x33\xa2\x43"
- "\x05\x96\xcc\xca\x2d\x04\x5f\xd6\xb7\x3d\x8b\x8f\x2d\xa3\xa5\xf8\x73\xf5"
- "\xd7\xc0\x19\xff\x10\xe6\xee\x3a\x26\x2f\xe1\x64\x3d\x11\xcd\x2d\xe4\x0a"
- "\x84\x27\xe3\xcb\x16\x62\x19\xe7\xe3\x0d\x13\xe8\x09\x5a\x53\xd0\x20\x56"
- "\x15\xf5\xb3\x67\xac\xa1\xb5\x94\x6b\xab\xdc\x71\xc7\xbf\x0a\xde\x76\xf5"
- "\x03\xa0\x30\xd8\x27\x9d\x00\x2b\x02\x57\x00\xf1\x4f\xc2\x86\x13\x06\x17"
- "\xf7\x69\x7e\x37\xdf\x67\xc5\x32\xa0\x74\x1c\x32\x69\x0f\x9f\x08\x88\x24"
- "\xb1\x51\xbc\xbc\x92\xba\x73\x1f\x9c\x75\xc2\x14\x6d\x4f\xc4\x5a\xcf\xda"
- "\x44\x35\x00\x6b\x42\x3b\x9f\x14\xf1\x05\xb3\x51\x22\xb6\xbe\x9c\xe0\xc1"
- "\x5c\x48\x61\xdf\x4e\x4c\x72\xb8\x05\x35\x7c\xac\xf1\xbb\xa0\x3b\x2a\xea"
- "\xf7\x86\xe9\xd2\xff\x1e\x1d\x02\x56\x00\xca\xb1\x39\xf6\xa2\xc6\x3b\x65"
- "\x45\x2f\x39\x00\xcd\x6e\xd6\x55\xf7\x71\x37\x89\xc2\xe7\x7a\xc0\x1a\xa6"
- "\x2f\xea\x17\x7c\xaa\x2a\x91\x8f\xd4\xc7\x50\x8b\xab\x8e\x99\x3b\x33\x91"
- "\xbc\x02\x10\x58\x4b\x58\x40\x9b\xc4\x8f\x48\x2b\xa7\x44\xfd\x07\x04\xf0"
- "\x98\x67\x56\xea\x25\x92\x8b\x2e\x4b\x4a\xa1\xd3\xc2\xa4\xb4\x9b\x59\x70"
- "\x32\xa6\xd8\x8b\xd9\x02\x57\x00\xa0\xdf\xd7\x04\x0c\xae\xba\xa4\xf0\xfe"
- "\xcf\xea\x45\x2e\x21\xc0\x4d\x68\x21\x9b\x5f\xbf\x5b\x05\x6d\xcb\x8b\xd3"
- "\x28\x61\xd1\xa2\x15\x12\xf9\x2c\x0d\x9e\x35\x2d\x91\xdf\xe6\xd8\x23\x55"
- "\x9c\xd6\xd2\x6a\x0d\xf6\x03\xcc\xe0\xc1\xcf\x29\xbd\xeb\x2b\x92\xda\xeb"
- "\xea\x34\x32\xf7\x25\x58\xce\x53\x1d\xf6\x7d\x15\x7c\xc7\x47\x4f\xaf\x46"
- "\x8c\xaa\x14\x13\x02\x56\x00\x87\x20\xd1\x4f\x17\x2e\xd2\x43\x83\x74\xd0"
- "\xab\x33\x9f\x39\x8e\xa4\xf6\x25\x06\x81\xef\xa7\x2a\xbc\x6e\xca\x9c\x0f"
- "\xa8\x71\x71\xb6\x5f\xe3\x2f\x8b\x07\xc7\xb4\x66\x27\x77\xb6\x7d\x56\xb5"
- "\x90\x32\x3a\xd5\xbd\x2d\xb4\xda\xc7\xc4\xd8\xa8\xaf\x58\xa0\x65\x9a\x39"
- "\xf1\x6e\x61\xb2\x1e\xdc\xdc\x6b\xe2\x81\xc3\x23\x12\x3b\xa0\x21\xc4\x90"
- "\x5d\x3b\x02\x57\x00\xe6\x8a\xaa\xb8\x6d\x2c\x81\x43\xb5\xd6\xa0\x2b\x42"
- "\x49\xa9\x0a\x51\xfa\x18\xc8\x32\xea\x54\x18\xf3\x60\xc2\xb5\x4a\x43\x05"
- "\x93\x9c\x01\xd9\x28\xed\x73\xfa\x82\xbc\x12\x64\xcb\xc4\x24\xa9\x3e\xae"
- "\x7c\x4b\x8f\x94\x57\x7b\x14\x10\x41\xdc\x62\x12\x8c\xb2\x4a\x7c\xf6\x53"
- "\xd4\xc6\xe4\xda\xd1\xa2\x00\x0e\x3d\x30\xf7\x05\x4f\x1d\x82\xbc\x52\xd9"
- "\xb1\x30\x82\x01\x0a\x30\x82\x01\x06\x02\x56\x00\x84\x12\x4f\xf7\x3b\x65"
- "\x53\x34\x6c\x6c\x4d\x77\xdf\xfd\x1f\xb6\x16\xe2\x25\x15\xca\xc9\xc1\x41"
- "\x9a\x50\xda\xeb\x88\x4f\x3d\xb3\x01\x00\x44\xc4\xac\xe7\x14\x62\xa6\x56"
- "\xde\xc5\xb7\xc3\x1d\x07\xbd\x7d\x64\xc5\x7e\x45\x25\x56\xed\x7a\xd2\x14"
- "\xdb\x4e\x27\xd4\x1f\xf8\x94\xa7\xef\x07\xce\xdb\x24\xb7\xdd\x71\x5c\x63"
- "\xc9\x33\xfe\xde\x40\x52\xeb\x02\x55\x58\x0c\x35\x4f\x7c\xee\x37\x78\x48"
- "\x48\x33\xa5\x3f\xfe\x15\x24\x0f\x41\x6e\x0e\x87\x31\x2b\x81\x11\x8b\x3c"
- "\x9d\x05\x8a\x29\x22\x00\xaa\xd8\x83\x1d\xef\x62\xec\x6e\xe4\x94\x83\xcf"
- "\xd7\x68\xaf\xd3\xa8\xed\xd8\xfe\xd8\xc3\x8f\x48\xfc\x8c\x0d\xe7\x89\x6f"
- "\xe2\xbf\xfb\x0d\xc5\x4a\x05\x34\x92\x18\x7a\x93\xa0\xe8\x42\x86\x22\xa9"
- "\xe9\x80\x37\x47\x02\x55\x60\x76\xab\xde\x2b\xf5\xa2\x2c\xaa\x0c\x99\x81"
- "\xee\x72\x2c\x7d\x22\x59\x2a\x35\xea\x50\x4e\x47\x6b\x92\x2d\x30\xa1\x01"
- "\xa5\x9e\x26\x6e\x27\xca\xf5\xf2\x87\x5d\x31\xaf\xe9\x32\xcd\x10\xfd\x4d"
- "\xdb\xf9\x86\x05\x12\x1b\x01\x84\x55\x97\x5f\xe2\x78\x27\xd9\xe4\x26\x7d"
- "\xab\x0e\xe0\x1b\x6f\xcb\x4b\x14\xdd\xdc\xdc\x8b\xe8\x9f\xd0\x62\x96\xca"
- "\xcf";
-
-static const uint8_t kThreePrimeEncryptedMessage[] = {
- 0x58, 0xd9, 0xea, 0x8a, 0xf6, 0x3d, 0xb4, 0xd9, 0xf7, 0xbb, 0x02, 0xc5,
- 0x58, 0xd2, 0xa9, 0x46, 0x80, 0x70, 0x70, 0x16, 0x07, 0x64, 0x32, 0x4c,
- 0x4e, 0x92, 0x61, 0xb7, 0xff, 0x92, 0xdc, 0xfc, 0xf8, 0xf0, 0x2c, 0x84,
- 0x56, 0xbc, 0xe5, 0x93, 0x76, 0xe5, 0xa3, 0x72, 0x98, 0xf2, 0xdf, 0xef,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0x47, 0xc3,
- 0x99, 0x29, 0x23, 0x79, 0x36, 0x88, 0xad, 0x40, 0x3e, 0x27, 0x7d, 0xf0,
- 0xb6, 0xfa, 0x95, 0x20, 0x3c, 0xec, 0xfc, 0x56, 0x3b, 0x20, 0x91, 0xee,
- 0x98, 0x10, 0x2c, 0x82,
-};
-
-static const uint8_t kSixPrimeKey[] =
- "\x30\x82\x05\x20\x02\x01\x01\x02\x82\x01\x00\x1c\x04\x39\x44\xb9\xb8\x71"
- "\x1c\x1c\xf7\xdc\x11\x1b\x85\x3b\x2b\xe8\xa6\xeb\xeb\xe9\xb6\x86\x97\x73"
- "\x5d\x75\x46\xd1\x35\x25\xf8\x30\x9a\xc3\x57\x44\x89\xa6\x44\x59\xe3\x3a"
- "\x60\xb5\x33\x84\x72\xa4\x03\xc5\x1a\x20\x98\x70\xbd\xe8\x3b\xc1\x9b\x8a"
- "\x3a\x24\x45\xb6\x6a\x73\xb4\xd0\x6c\x18\xc6\xa7\x94\xd3\x24\x70\xf0\x2d"
- "\x0c\xa5\xb2\x3b\xc5\x33\x90\x9d\x56\x8d\x33\xf6\x93\x7d\xa7\x95\x88\x05"
- "\xdf\xf5\x65\x58\xb9\x5b\xd3\x07\x9c\x16\x8e\x74\xfc\xb8\x76\xaf\x62\x99"
- "\x6c\xd4\xc5\xb3\x69\xe5\x64\xdf\x38\x00\x25\x24\xe9\xb1\x4a\x85\xa6\xf4"
- "\xb6\x23\x68\x67\x4a\x2c\xbd\x9d\x01\x3b\x04\x8c\x70\x94\x82\x76\x45\x0c"
- "\x8b\x95\x8a\x07\x1c\x32\xe7\x09\x97\x3a\xfd\xca\x57\xe9\x57\x0c\xae\x2b"
- "\xa3\x25\xd1\xf2\x0d\x34\xa1\xe6\x2f\x7b\x1b\x36\x53\x83\x95\xb9\x26\x6e"
- "\x4f\x36\x26\xf8\x47\xae\xdf\xe8\x4d\xf6\xb2\xff\x03\x23\x74\xfa\xa5\x6d"
- "\xcb\xcb\x80\x12\xc3\x77\xf0\x19\xb7\xf2\x6b\x19\x5c\xde\x0a\xd7\xee\x8c"
- "\x48\x2f\x50\x24\xa5\x2e\xcc\x2a\xed\xc2\x35\xe0\x3d\x29\x31\x17\xd6\x8f"
- "\x44\xaa\x5b\x33\xbd\xb4\x88\x87\xd9\x29\x3f\x94\xe7\x75\xe3\x02\x01\x03"
- "\x02\x82\x01\x00\x12\xad\x7b\x83\x26\x7a\xf6\x12\xbd\xfa\x92\xb6\x12\x58"
- "\xd2\x1d\x45\xc4\x9d\x47\xf1\x24\x59\xba\x4c\xe8\xf8\xd9\xe0\xce\x19\x50"
- "\x20\x67\x2c\xe4\xd8\x5b\xc4\x2d\x91\x41\xeb\x05\x4f\xf4\xb4\x20\xc7\xbc"
- "\xd6\xe2\x5c\xa0\x27\xcf\xb8\xb3\x3b\x5c\xeb\x5e\x96\xb7\x99\x4b\x8a\xc3"
- "\x70\xaf\x7f\xd8\x5f\xeb\xcb\x1a\x79\x44\x68\x97\x84\xd8\x29\x87\x64\xba"
- "\x18\x2e\x95\x66\x1a\x7d\xd9\x35\x3a\x5c\x92\x7a\x81\x1b\x6c\xa9\xf8\xfa"
- "\x05\x23\x18\x5b\xb2\xf8\x77\x1c\xc5\x1b\x7d\x26\x5f\x48\x69\x1b\xc4\x34"
- "\xef\x6e\xa1\x15\xd2\xb2\xac\xb8\xa8\xed\x1e\xee\xdc\xb5\xb9\x5c\x79\x25"
- "\x48\xbb\xe5\x9d\xd8\xe5\xe2\x94\xdf\xd5\x32\x22\x84\xbf\xc2\xaa\xa4\x54"
- "\xbb\x29\xdb\x13\x4a\x28\x3d\x83\x3a\xff\xa3\xae\x38\x08\xfc\x36\x84\x91"
- "\x30\xd1\xfd\x82\x64\xf1\x0f\xae\xba\xd7\x9a\x43\x58\x03\x5e\x5f\x01\xcb"
- "\x8b\x90\x8d\x77\x34\x6f\x37\x40\xb6\x6d\x22\x23\x90\xb2\xfd\x32\xb5\x96"
- "\x45\xbf\xae\x8c\xc4\x62\x03\x6c\x68\x90\x59\x31\x1a\xcb\xfb\xa4\x0b\x94"
- "\x15\x13\xda\x1a\x8d\xa7\x0b\x34\x62\x93\xea\xbe\x6e\x71\xc2\x1d\xc8\x9d"
- "\xac\x66\xcc\x31\x87\xff\x99\xab\x02\x2c\x00\xa5\x57\x41\x66\x87\x68\x02"
- "\x6a\xdf\x97\xb0\xfe\x6b\x34\xc4\x33\x88\x2b\xce\x82\xaf\x2d\x33\x5a\xad"
- "\x75\x2d\xac\xa5\xd6\x3a\x2d\x65\x43\x68\xfb\x44\x9e\xb8\x25\x05\xed\x97"
- "\x02\x2c\x00\xd2\x77\x34\x24\xac\x60\x9a\xc4\x68\x34\xe5\x6a\xa3\xdc\xe2"
- "\xb0\x58\x5c\x35\x83\x5a\xc7\xa7\xc1\x0b\x7e\x9e\xa5\x85\x32\x47\x93\x22"
- "\xee\xb6\x59\xe9\xe3\x61\x94\xd0\x0e\xcb\x02\x2b\x6e\x3a\x2b\x99\xaf\x9a"
- "\xac\x47\x3f\xba\x75\xfe\xf2\x23\x2d\x77\xb0\x1d\x34\x57\x1f\x73\x77\x91"
- "\xc8\xf8\xc9\x1d\xc3\xe4\x26\xc8\xee\x2c\xf0\xa7\x83\x14\x7a\xc3\x59\x49"
- "\x0f\x02\x2c\x00\x8c\x4f\x78\x18\x72\xeb\x11\xd8\x45\x78\x98\xf1\xc2\x93"
- "\x41\xca\xe5\x92\xce\x57\x91\xda\x6f\xd6\x07\xa9\xbf\x19\x03\x76\xda\x62"
- "\x17\x49\xce\xe6\x9b\xec\xeb\xb8\x8a\xb4\x87\x02\x2c\x00\xa3\xc2\x29\xa6"
- "\xa7\xe1\x3c\xe9\xcf\x0f\x50\x51\x1c\xcc\xc8\x5b\x08\x9c\x97\x24\x3a\x86"
- "\x23\xa8\x0b\xbb\x54\xa6\xb9\x70\x3d\x1d\xd0\x1b\xa3\xac\xd9\xb2\x03\x80"
- "\xd7\x67\xec\x30\x82\x02\x29\x30\x81\x88\x02\x2c\x00\x97\x5d\x3b\xf2\xcc"
- "\xba\xd9\x77\x67\xaa\xd2\x22\xa7\xa3\x49\x08\xc7\xb8\x27\xa1\x59\x4b\xa7"
- "\xa5\xd2\x74\x05\xe7\x5a\x35\xd7\x25\x79\x18\x20\x8a\x25\xec\x3b\x52\xaf"
- "\xcb\xdb\x02\x2b\x64\xe8\xd2\xa1\xdd\xd1\xe6\x4f\x9a\x71\xe1\x6c\x6f\xc2"
- "\x30\xb0\x85\x25\x6f\xc0\xe6\x32\x6f\xc3\xe1\xa2\xae\x9a\x3c\x23\xe4\xc3"
- "\xa6\x10\x15\xb1\x6e\x9d\x7c\xe1\xca\x87\xe7\x02\x2b\x5e\xef\x25\x29\xed"
- "\xf6\x52\x15\xd3\x60\xb6\x88\xcf\x0f\xe2\x24\xa4\x04\x97\x9c\x9d\x58\x13"
- "\xbb\x00\x6d\x39\xf6\xad\x21\x7e\x56\x2c\x2e\x06\x06\xc4\x6d\x44\xac\x79"
- "\x1f\xe5\x30\x81\x89\x02\x2c\x00\xdb\xf1\x78\xf9\xa4\x94\xea\x39\x8a\x3f"
- "\x23\x48\x2a\x23\x8f\xd2\x18\x97\xd2\xdf\x0f\xb8\x2b\x33\xa0\xe8\x8f\xbc"
- "\x4e\x42\xfd\x54\xc7\x0f\xde\xba\x6d\xba\x96\xa7\xce\x67\x3d\x02\x2c\x00"
- "\x92\xa0\xfb\x51\x18\x63\x46\xd1\x06\xd4\xc2\x30\x1c\x17\xb5\x36\xbb\x0f"
- "\xe1\xea\x0a\x7a\xc7\x77\xc0\x9b\x0a\x7d\x89\x81\xfe\x38\x84\xb5\x3f\x26"
- "\xf3\xd1\xb9\xc5\x34\x44\xd3\x02\x2b\x4c\xbd\x1d\x44\xc8\x19\x23\xd8\xb3"
- "\x96\x66\x4b\x62\xcb\x3e\xe6\x6c\x11\xdf\xb2\x92\xd3\xc8\x34\xb9\xa6\x5a"
- "\x2f\x19\xf4\x0b\xb2\xe6\x8e\xa6\xaf\xa3\xae\xa4\xb3\x92\xc4\x79\x30\x81"
- "\x85\x02\x2b\x00\x89\xab\x30\xfc\x7b\x37\x94\x11\x9f\x4d\x31\x3b\xac\x09"
- "\x57\xe6\x64\xec\xa0\xc8\xf8\x04\x1a\xf9\x2a\xa4\x4b\x36\x18\xbb\x5f\xdc"
- "\xcd\xf0\xc8\xcb\x97\xd1\xdf\x13\x12\x3f\x02\x2a\x5b\xc7\x75\xfd\xa7\x7a"
- "\x62\xb6\x6a\x33\x76\x27\xc8\x06\x3a\x99\x98\x9d\xc0\x85\xfa\xad\x67\x50"
- "\xc7\x18\x32\x24\x10\x7c\xea\x93\x33\xf5\xdb\x32\x65\x36\x94\xb7\x61\x7f"
- "\x02\x2a\x16\x6c\x96\xa1\x50\x6f\x3a\x92\xc0\x75\x43\xb5\x6b\x9c\x17\x09"
- "\xd3\xf0\x67\x69\x45\x92\xfb\x7b\x50\xa8\x42\x9b\x33\x92\xab\xd5\xe6\x49"
- "\xb3\x26\x99\x55\x16\x3a\x39\x63\x30\x81\x87\x02\x2b\x00\xc1\x25\x19\x1d"
- "\x6e\x18\xcb\x2d\x64\xe2\xe6\xb6\x1c\xe4\xaa\x9c\xb9\xee\x18\xd4\xf7\x5f"
- "\x66\x40\xf0\xe1\x31\x38\xf2\x53\x00\x8b\xcc\xe4\x0d\xb7\x81\xb4\xe6\x1c"
- "\x19\xaf\x02\x2b\x00\x80\xc3\x66\x13\x9e\xbb\x32\x1e\x43\x41\xef\x24\x13"
- "\x43\x1c\x68\x7b\xf4\x10\x8d\xfa\x3f\x99\x80\xa0\x96\x20\xd0\xa1\x8c\xab"
- "\x07\xdd\xed\x5e\x7a\x56\x78\x99\x68\x11\x1f\x02\x2b\x00\xb0\x59\xea\x67"
- "\x93\x42\xbf\x07\x54\x38\x41\xcb\x73\xa4\x0e\xc2\xae\x56\x19\x41\xc9\x8a"
- "\xb2\x2f\xa8\x0a\xb1\x4e\x12\x39\x2e\xc0\x94\x9a\xc6\xa3\xe4\xaf\x8a\x16"
- "\x06\xb8";
-
-static const uint8_t kSixPrimeEncryptedMessage[] = {
- 0x0a, 0xcb, 0x6c, 0x02, 0x9d, 0x1a, 0x7c, 0xf3, 0x4e, 0xff, 0x16, 0x88,
- 0xee, 0x22, 0x1d, 0x8d, 0xd2, 0xfd, 0xde, 0x83, 0xb3, 0xd9, 0x35, 0x2c,
- 0x82, 0xe0, 0xff, 0xe6, 0x79, 0x6d, 0x06, 0x21, 0x74, 0xa8, 0x04, 0x0c,
- 0xe2, 0xd3, 0x98, 0x3f, 0xbf, 0xd0, 0xe9, 0x88, 0x24, 0xe2, 0x05, 0xa4,
- 0x45, 0x51, 0x87, 0x6b, 0x1c, 0xef, 0x5f, 0x2d, 0x61, 0xb6, 0xf1, 0x4c,
- 0x1f, 0x3d, 0xbf, 0x4b, 0xf2, 0xda, 0x09, 0x97, 0x81, 0xde, 0x91, 0xb7,
- 0x0d, 0xb4, 0xc2, 0xab, 0x41, 0x64, 0x9d, 0xd9, 0x39, 0x46, 0x79, 0x66,
- 0x43, 0xf1, 0x34, 0x21, 0x56, 0x2f, 0xc6, 0x68, 0x40, 0x4a, 0x2d, 0x73,
- 0x96, 0x50, 0xe1, 0xb0, 0xaf, 0x49, 0x39, 0xb4, 0xf0, 0x3a, 0x78, 0x38,
- 0x70, 0xa9, 0x91, 0x5d, 0x5e, 0x07, 0xf4, 0xec, 0xbb, 0xc4, 0xe5, 0x8a,
- 0xb8, 0x06, 0xba, 0xdf, 0xc6, 0x48, 0x78, 0x4b, 0xca, 0x2a, 0x8a, 0x92,
- 0x64, 0xe3, 0xa6, 0xae, 0x87, 0x97, 0x12, 0x16, 0x46, 0x67, 0x59, 0xdf,
- 0xf2, 0xf3, 0x89, 0x6f, 0xe8, 0xa9, 0x13, 0x57, 0x63, 0x4e, 0x07, 0x98,
- 0xcc, 0x73, 0xa0, 0x84, 0x9d, 0xe8, 0xb3, 0x50, 0x59, 0xb5, 0x51, 0xb3,
- 0x41, 0x7d, 0x55, 0xfe, 0xd9, 0xf0, 0xc6, 0xff, 0x6e, 0x96, 0x4f, 0x22,
- 0xb2, 0x0d, 0x6b, 0xc9, 0x83, 0x2d, 0x98, 0x98, 0xb2, 0xd1, 0xb7, 0xe4,
- 0x50, 0x83, 0x1a, 0xa9, 0x02, 0x9f, 0xaf, 0x54, 0x74, 0x2a, 0x2c, 0x63,
- 0x10, 0x79, 0x45, 0x5c, 0x95, 0x0d, 0xa1, 0x9b, 0x55, 0xf3, 0x1e, 0xb7,
- 0x56, 0x59, 0xf1, 0x59, 0x8d, 0xd6, 0x15, 0x89, 0xf6, 0xfe, 0xc0, 0x00,
- 0xdd, 0x1f, 0x2b, 0xf0, 0xf7, 0x5d, 0x64, 0x84, 0x76, 0xd3, 0xc2, 0x92,
- 0x35, 0xac, 0xb5, 0xf9, 0xf6, 0xa8, 0x05, 0x89, 0x4c, 0x95, 0x41, 0x4e,
- 0x34, 0x25, 0x11, 0x14,
-};
-
// kEstonianRSAKey is an RSAPublicKey encoded with a negative modulus. See
// https://crbug.com/532048.
static const uint8_t kEstonianRSAKey[] = {
@@ -609,40 +411,21 @@
INSTANTIATE_TEST_CASE_P(, RSAEncryptTest, testing::ValuesIn(kRSAEncryptParams));
-struct RSAMultiPrimeParam {
- const uint8_t *der;
- size_t der_size;
- const uint8_t *enc;
- size_t enc_size;
-} kRSAMultiPrimeParams[] = {
- {kTwoPrimeKey, sizeof(kTwoPrimeKey) - 1, kTwoPrimeEncryptedMessage,
- sizeof(kTwoPrimeEncryptedMessage)},
- {kThreePrimeKey, sizeof(kThreePrimeKey) - 1, kThreePrimeEncryptedMessage,
- sizeof(kThreePrimeEncryptedMessage)},
- {kSixPrimeKey, sizeof(kSixPrimeKey) - 1, kSixPrimeEncryptedMessage,
- sizeof(kSixPrimeEncryptedMessage)},
-};
-
-class RSAMultiPrimeTest : public testing::TestWithParam<RSAMultiPrimeParam> {};
-
-TEST_P(RSAMultiPrimeTest, TestDecrypt) {
- const auto ¶m = GetParam();
+TEST(RSATest, TestDecrypt) {
bssl::UniquePtr<RSA> rsa(
- RSA_private_key_from_bytes(param.der, param.der_size));
+ RSA_private_key_from_bytes(kTwoPrimeKey, sizeof(kTwoPrimeKey) - 1));
ASSERT_TRUE(rsa);
EXPECT_TRUE(RSA_check_key(rsa.get()));
uint8_t out[256];
size_t out_len;
- ASSERT_TRUE(RSA_decrypt(rsa.get(), &out_len, out, sizeof(out), param.enc,
- param.enc_size, RSA_PKCS1_PADDING));
+ ASSERT_TRUE(RSA_decrypt(
+ rsa.get(), &out_len, out, sizeof(out), kTwoPrimeEncryptedMessage,
+ sizeof(kTwoPrimeEncryptedMessage), RSA_PKCS1_PADDING));
EXPECT_EQ(Bytes("hello world"), Bytes(out, out_len));
}
-INSTANTIATE_TEST_CASE_P(, RSAMultiPrimeTest,
- testing::ValuesIn(kRSAMultiPrimeParams));
-
TEST(RSATest, BadKey) {
bssl::UniquePtr<RSA> key(RSA_new());
bssl::UniquePtr<BIGNUM> e(BN_new());
diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h
index 50c7a53..7f5e4c5 100644
--- a/include/openssl/rsa.h
+++ b/include/openssl/rsa.h
@@ -96,16 +96,14 @@
const BIGNUM **out_e, const BIGNUM **out_d);
/* RSA_get0_factors sets |*out_p| and |*out_q|, if non-NULL, to |rsa|'s prime
- * factors. If |rsa| is a public key, they will be set to NULL. If |rsa| is a
- * multi-prime key, only the first two prime factors will be reported. */
+ * factors. If |rsa| is a public key, they will be set to NULL. */
OPENSSL_EXPORT void RSA_get0_factors(const RSA *rsa, const BIGNUM **out_p,
const BIGNUM **out_q);
/* RSA_get0_crt_params sets |*out_dmp1|, |*out_dmq1|, and |*out_iqmp|, if
* non-NULL, to |rsa|'s CRT parameters. These are d (mod p-1), d (mod q-1) and
* q^-1 (mod p), respectively. If |rsa| is a public key, each parameter will be
- * set to NULL. If |rsa| is a multi-prime key, only the CRT parameters for the
- * first two primes will be reported. */
+ * set to NULL. */
OPENSSL_EXPORT void RSA_get0_crt_params(const RSA *rsa, const BIGNUM **out_dmp1,
const BIGNUM **out_dmq1,
const BIGNUM **out_iqmp);
@@ -603,8 +601,6 @@
BIGNUM *dmq1;
BIGNUM *iqmp;
- STACK_OF(RSA_additional_prime) *additional_primes;
-
/* be careful using this if the RSA structure is shared */
CRYPTO_EX_DATA ex_data;
CRYPTO_refcount_t references;
diff --git a/include/openssl/stack.h b/include/openssl/stack.h
index c0cd0f6..70e09fb 100644
--- a/include/openssl/stack.h
+++ b/include/openssl/stack.h
@@ -138,7 +138,6 @@
* STACK_OF:POLICYINFO
* STACK_OF:POLICYQUALINFO
* STACK_OF:POLICY_MAPPING
- * STACK_OF:RSA_additional_prime
* STACK_OF:SSL_COMP
* STACK_OF:SSL_CUSTOM_EXTENSION
* STACK_OF:STACK_OF_X509_NAME_ENTRY
diff --git a/include/openssl/stack_macros.h b/include/openssl/stack_macros.h
index a5f36fb..5750572 100644
--- a/include/openssl/stack_macros.h
+++ b/include/openssl/stack_macros.h
@@ -1786,101 +1786,6 @@
copy_func), \
CHECKED_CAST(void (*)(void *), void (*)(POLICY_MAPPING *), free_func)))
-/* RSA_additional_prime */
-#define sk_RSA_additional_prime_new(comp) \
- ((STACK_OF(RSA_additional_prime) *)sk_new(CHECKED_CAST( \
- stack_cmp_func, \
- int (*)(const RSA_additional_prime **a, const RSA_additional_prime **b), \
- comp)))
-
-#define sk_RSA_additional_prime_new_null() \
- ((STACK_OF(RSA_additional_prime) *)sk_new_null())
-
-#define sk_RSA_additional_prime_num(sk) \
- sk_num(CHECKED_CAST(const _STACK *, const STACK_OF(RSA_additional_prime) *, \
- sk))
-
-#define sk_RSA_additional_prime_zero(sk) \
- sk_zero(CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk));
-
-#define sk_RSA_additional_prime_value(sk, i) \
- ((RSA_additional_prime *)sk_value( \
- CHECKED_CAST(const _STACK *, const STACK_OF(RSA_additional_prime) *, \
- sk), \
- (i)))
-
-#define sk_RSA_additional_prime_set(sk, i, p) \
- ((RSA_additional_prime *)sk_set( \
- CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk), (i), \
- CHECKED_CAST(void *, RSA_additional_prime *, p)))
-
-#define sk_RSA_additional_prime_free(sk) \
- sk_free(CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk))
-
-#define sk_RSA_additional_prime_pop_free(sk, free_func) \
- sk_pop_free(CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk), \
- CHECKED_CAST(void (*)(void *), void (*)(RSA_additional_prime *), \
- free_func))
-
-#define sk_RSA_additional_prime_insert(sk, p, where) \
- sk_insert(CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk), \
- CHECKED_CAST(void *, RSA_additional_prime *, p), (where))
-
-#define sk_RSA_additional_prime_delete(sk, where) \
- ((RSA_additional_prime *)sk_delete( \
- CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk), (where)))
-
-#define sk_RSA_additional_prime_delete_ptr(sk, p) \
- ((RSA_additional_prime *)sk_delete_ptr( \
- CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk), \
- CHECKED_CAST(void *, RSA_additional_prime *, p)))
-
-#define sk_RSA_additional_prime_find(sk, out_index, p) \
- sk_find(CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk), \
- (out_index), CHECKED_CAST(void *, RSA_additional_prime *, p))
-
-#define sk_RSA_additional_prime_shift(sk) \
- ((RSA_additional_prime *)sk_shift( \
- CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk)))
-
-#define sk_RSA_additional_prime_push(sk, p) \
- sk_push(CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk), \
- CHECKED_CAST(void *, RSA_additional_prime *, p))
-
-#define sk_RSA_additional_prime_pop(sk) \
- ((RSA_additional_prime *)sk_pop( \
- CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk)))
-
-#define sk_RSA_additional_prime_dup(sk) \
- ((STACK_OF(RSA_additional_prime) *)sk_dup(CHECKED_CAST( \
- const _STACK *, const STACK_OF(RSA_additional_prime) *, sk)))
-
-#define sk_RSA_additional_prime_sort(sk) \
- sk_sort(CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk))
-
-#define sk_RSA_additional_prime_is_sorted(sk) \
- sk_is_sorted(CHECKED_CAST(const _STACK *, \
- const STACK_OF(RSA_additional_prime) *, sk))
-
-#define sk_RSA_additional_prime_set_cmp_func(sk, comp) \
- ((int (*)(const RSA_additional_prime **a, const RSA_additional_prime **b)) \
- sk_set_cmp_func( \
- CHECKED_CAST(_STACK *, STACK_OF(RSA_additional_prime) *, sk), \
- CHECKED_CAST(stack_cmp_func, \
- int (*)(const RSA_additional_prime **a, \
- const RSA_additional_prime **b), \
- comp)))
-
-#define sk_RSA_additional_prime_deep_copy(sk, copy_func, free_func) \
- ((STACK_OF(RSA_additional_prime) *)sk_deep_copy( \
- CHECKED_CAST(const _STACK *, const STACK_OF(RSA_additional_prime) *, \
- sk), \
- CHECKED_CAST(void *(*)(void *), \
- RSA_additional_prime *(*)(RSA_additional_prime *), \
- copy_func), \
- CHECKED_CAST(void (*)(void *), void (*)(RSA_additional_prime *), \
- free_func)))
-
/* SSL_COMP */
#define sk_SSL_COMP_new(comp) \
((STACK_OF(SSL_COMP) *)sk_new(CHECKED_CAST( \
diff --git a/tool/const.cc b/tool/const.cc
index 7b7001e..0372e4c 100644
--- a/tool/const.cc
+++ b/tool/const.cc
@@ -323,112 +323,3 @@
};
const size_t kDERRSAPrivate4096Len = sizeof(kDERRSAPrivate4096);
-
-const uint8_t kDERRSAPrivate3Prime2048[] = {
- 0x30, 0x82, 0x04, 0xd7, 0x02, 0x01, 0x01, 0x02, 0x82, 0x01, 0x00, 0x62,
- 0x91, 0xe9, 0xea, 0xb3, 0x5d, 0x6c, 0x29, 0xae, 0x21, 0x83, 0xbb, 0xb5,
- 0x82, 0xb1, 0x9e, 0xea, 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 0xaa, 0xd8, 0x83, 0x1d, 0xef, 0x62, 0xec, 0x6e, 0xe4, 0x94, 0x83, 0xcf,
- 0xd7, 0x68, 0xaf, 0xd3, 0xa8, 0xed, 0xd8, 0xfe, 0xd8, 0xc3, 0x8f, 0x48,
- 0xfc, 0x8c, 0x0d, 0xe7, 0x89, 0x6f, 0xe2, 0xbf, 0xfb, 0x0d, 0xc5, 0x4a,
- 0x05, 0x34, 0x92, 0x18, 0x7a, 0x93, 0xa0, 0xe8, 0x42, 0x86, 0x22, 0xa9,
- 0xe9, 0x80, 0x37, 0x47, 0x02, 0x55, 0x60, 0x76, 0xab, 0xde, 0x2b, 0xf5,
- 0xa2, 0x2c, 0xaa, 0x0c, 0x99, 0x81, 0xee, 0x72, 0x2c, 0x7d, 0x22, 0x59,
- 0x2a, 0x35, 0xea, 0x50, 0x4e, 0x47, 0x6b, 0x92, 0x2d, 0x30, 0xa1, 0x01,
- 0xa5, 0x9e, 0x26, 0x6e, 0x27, 0xca, 0xf5, 0xf2, 0x87, 0x5d, 0x31, 0xaf,
- 0xe9, 0x32, 0xcd, 0x10, 0xfd, 0x4d, 0xdb, 0xf9, 0x86, 0x05, 0x12, 0x1b,
- 0x01, 0x84, 0x55, 0x97, 0x5f, 0xe2, 0x78, 0x27, 0xd9, 0xe4, 0x26, 0x7d,
- 0xab, 0x0e, 0xe0, 0x1b, 0x6f, 0xcb, 0x4b, 0x14, 0xdd, 0xdc, 0xdc, 0x8b,
- 0xe8, 0x9f, 0xd0, 0x62, 0x96, 0xca, 0xcf,
-};
-
-const size_t kDERRSAPrivate3Prime2048Len = sizeof(kDERRSAPrivate3Prime2048);
diff --git a/tool/internal.h b/tool/internal.h
index 80c9dc9..a3d608a 100644
--- a/tool/internal.h
+++ b/tool/internal.h
@@ -88,8 +88,6 @@
extern const size_t kDERRSAPrivate2048Len;
extern const uint8_t kDERRSAPrivate4096[];
extern const size_t kDERRSAPrivate4096Len;
-extern const uint8_t kDERRSAPrivate3Prime2048[];
-extern const size_t kDERRSAPrivate3Prime2048Len;
#endif /* !OPENSSL_HEADER_TOOL_INTERNAL_H */
diff --git a/tool/speed.cc b/tool/speed.cc
index 3e5952f..6d3997e 100644
--- a/tool/speed.cc
+++ b/tool/speed.cc
@@ -620,18 +620,6 @@
return false;
}
- key.reset(RSA_private_key_from_bytes(kDERRSAPrivate3Prime2048,
- kDERRSAPrivate3Prime2048Len));
- if (key == nullptr) {
- fprintf(stderr, "Failed to parse RSA key.\n");
- ERR_print_errors_fp(stderr);
- return false;
- }
-
- if (!SpeedRSA("RSA 2048 (3 prime, e=3)", key.get(), selected)) {
- return false;
- }
-
key.reset(
RSA_private_key_from_bytes(kDERRSAPrivate4096, kDERRSAPrivate4096Len));
if (key == nullptr) {