openssl/include/crypto
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
..
__DECC_INCLUDE_EPILOGUE.H
__DECC_INCLUDE_PROLOGUE.H
aes_platform.h Add AES_CBC_HMAC_SHA ciphers to providers. 2020-01-06 13:02:16 +10:00
aria.h
asn1_dsa.h
asn1.h Redesign the KEYMGMT libcrypto <-> provider interface - the basics 2020-02-07 09:37:56 +01:00
async.h
bn_conf.h.in
bn_dh.h Add support for DH 'modp' group parameters (RFC 3526) 2020-01-31 08:18:46 +10:00
bn_srp.h
bn.h
chacha.h
cmll_platform.h CRYPTO: split cipher_platform.h into algorithm specific headers 2019-12-19 13:31:29 +01:00
cms.h
cryptlib.h
ctype.h
des_platform.h CRYPTO: split cipher_platform.h into algorithm specific headers 2019-12-19 13:31:29 +01:00
dh.h Add FFC param/key generation 2020-02-06 22:28:36 +10:00
dsa.h Add FFC param/key generation 2020-02-06 22:28:36 +10:00
dso_conf.h.in
ec.h
engine.h
err.h
ess.h
evp.h Redesign the KEYMGMT libcrypto <-> provider interface - the basics 2020-02-07 09:37:56 +01:00
lhash.h
md32_common.h
modes.h
objects.h
poly1305.h
rand.h Convert rand_bytes_ex and rand_priv_bytes_ex to public functions 2020-01-20 14:54:31 +00:00
rsa.h Add RSA key validation to default provider 2020-01-29 20:32:32 +10:00
serializer.h SERIALIZER: New API for serialization of objects through providers 2019-11-29 20:54:48 +01:00
sha.h
siphash.h
siv.h
sm2.h
sm2err.h
sm4.h
sparse_array.h
store.h
x509.h