summaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_local.h
diff options
context:
space:
mode:
authorNeil Horman <nhorman@openssl.org>2023-08-28 08:48:34 -0400
committerTomas Mraz <tomas@openssl.org>2024-01-09 12:03:32 +0100
commitf3be536686654016adc9e22024c06036f949f2b0 (patch)
treee9820696aca63223707eb34e77af676fc0646538 /crypto/rsa/rsa_local.h
parent0a22436ea5826d0089db7f1cd97b7c90135ca165 (diff)
Augment RSA provider to generate CRT coefficients on EVP_PKEY_fromdata()
It would be helpful to be able to generate RSA's dmp1/dmq1/iqmp values when not provided in the param list to EVP_PKEY_fromdata. Augment the provider in ossl_rsa_fromdata to preform this generation iff: a) At least p q n e and e are provided b) the new parameter OSSL_PARAM_RSA_DERIVE_PQ is set to 1 Fixes #21826 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21875)
Diffstat (limited to 'crypto/rsa/rsa_local.h')
-rw-r--r--crypto/rsa/rsa_local.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/rsa/rsa_local.h b/crypto/rsa/rsa_local.h
index ea70da05ad..f0084aeab4 100644
--- a/crypto/rsa/rsa_local.h
+++ b/crypto/rsa/rsa_local.h
@@ -150,6 +150,10 @@ struct rsa_meth_st {
/* Macros to test if a pkey or ctx is for a PSS key */
#define pkey_is_pss(pkey) (pkey->ameth->pkey_id == EVP_PKEY_RSA_PSS)
#define pkey_ctx_is_pss(ctx) (ctx->pmeth->pkey_id == EVP_PKEY_RSA_PSS)
+int ossl_rsa_multiprime_derive(RSA *rsa, int bits, int primes,
+ BIGNUM *e_value,
+ STACK_OF(BIGNUM) *factors, STACK_OF(BIGNUM) *exps,
+ STACK_OF(BIGNUM) *coeffs);
RSA_PSS_PARAMS *ossl_rsa_pss_params_create(const EVP_MD *sigmd,
const EVP_MD *mgf1md, int saltlen);