openssl/crypto/rsa
Richard Levitte b305452f69 Redesign the KEYMGMT libcrypto <-> provider interface - the basics
The KEYMGMT libcrypto <-> provider interface currently makes a few
assumptions:

1.  provider side domain parameters and key data isn't mutable. In
    other words, as soon as a key has been created in any (loaded,
    imported data, ...), it's set in stone.
2.  provider side domain parameters can be strictly separated from the
    key data.

This does work for the most part, but there are places where that's a
bit too rigid for the functionality that the EVP_PKEY API delivers.
Key data needs to be mutable to allow the flexibility that functions
like EVP_PKEY_copy_parameters promise, as well as to provide the
combinations of data that an EVP_PKEY is generally assumed to be able
to hold:

- domain parameters only
- public key only
- public key + private key
- domain parameters + public key
- domain parameters + public key + private key

To remedy all this, we:

1.  let go of the distinction between domain parameters and key
    material proper in the libcrypto <-> provider interface.

    As a consequence, functions that still need it gain a selection
    argument, which is a set of bits that indicate what parts of the
    key object are to be considered in a specific call.  This allows
    a reduction of very similar functions into one.

2.  Rework the libcrypto <-> provider interface so provider side key
    objects are created and destructed with a separate function, and
    get their data filled and extracted in through import and export.

(future work will see other key object constructors and other
functions to fill them with data)

Fixes #10979

squash! Redesign the KEYMGMT libcrypto <-> provider interface - the basics

Remedy 1 needs a rewrite:

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11006)
2020-02-07 09:37:56 +01:00
..
build.info FIPS 186-4 RSA Generation & Validation 2019-03-12 12:00:52 +00:00
rsa_ameth.c Redesign the KEYMGMT libcrypto <-> provider interface - the basics 2020-02-07 09:37:56 +01:00
rsa_asn1.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_chk.c Add RSA key validation to default provider 2020-01-29 20:32:32 +10:00
rsa_crpt.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_depr.c Update source files for pre-3.0 deprecation 2019-11-07 11:37:25 +01:00
rsa_err.c util/mkerr.pl: make it not depend on the function code 2019-09-12 17:59:52 +02:00
rsa_gen.c New RSA keymgmt implementation to handle import / export of RSA keys 2019-10-17 18:07:45 +02:00
rsa_lib.c Params: change UTF8 construct calls to avoid explicit strlen(3) calls. 2020-02-06 16:22:00 +10:00
rsa_local.h CRYPTO: Remove support for ex_data fields when building the FIPS module 2020-01-15 23:45:41 +01:00
rsa_meth.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_mp.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_none.c Following the license change, modify the boilerplates in crypto/rsa/ 2018-12-06 15:20:59 +01:00
rsa_oaep.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_ossl.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_pk1.c Teach the RSA implementation about TLS RSA Key Transport 2019-12-05 16:12:18 +00:00
rsa_pmeth.c libcrypto: Eliminate as much use of EVP_PKEY_size() as possible 2020-01-19 02:47:46 +01:00
rsa_prn.c Following the license change, modify the boilerplates in crypto/rsa/ 2018-12-06 15:20:59 +01:00
rsa_pss.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_saos.c Following the license change, modify the boilerplates in crypto/rsa/ 2018-12-06 15:20:59 +01:00
rsa_sign.c Remove asn1 module dependency from RSASSA-PKCS1-v1_5 implementation. 2019-12-22 09:37:17 +10:00
rsa_sp800_56b_check.c Add RSA key validation to default provider 2020-01-29 20:32:32 +10:00
rsa_sp800_56b_gen.c New RSA keymgmt implementation to handle import / export of RSA keys 2019-10-17 18:07:45 +02:00
rsa_ssl.c rsa: replace magic number '11' by RSA_PKCS1_PADDING_SIZE 2019-10-03 14:37:16 +02:00
rsa_x931.c Following the license change, modify the boilerplates in crypto/rsa/ 2018-12-06 15:20:59 +01:00
rsa_x931g.c New RSA keymgmt implementation to handle import / export of RSA keys 2019-10-17 18:07:45 +02:00