Augment RSA provider to generate CRT coefficients on EVP_PKEY_fromdata()
authorNeil Horman <nhorman@openssl.org>
Mon, 28 Aug 2023 12:48:34 +0000 (08:48 -0400)
committerTomas Mraz <tomas@openssl.org>
Tue, 9 Jan 2024 11:03:32 +0000 (12:03 +0100)
commitf3be536686654016adc9e22024c06036f949f2b0
treee9820696aca63223707eb34e77af676fc0646538
parent0a22436ea5826d0089db7f1cd97b7c90135ca165
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)
CHANGES.md
crypto/rsa/rsa_backend.c
crypto/rsa/rsa_gen.c
crypto/rsa/rsa_lib.c
crypto/rsa/rsa_local.h
crypto/rsa/rsa_sp800_56b_gen.c
doc/man7/EVP_PKEY-RSA.pod
include/crypto/rsa.h
test/evp_extra_test.c
test/evp_pkey_provided_test.c
util/perl/OpenSSL/paramnames.pm