openssl/providers/common
Matt Caswell d9a7510747 Teach the RSA implementation about TLS RSA Key Transport
In TLSv1.2 a pre-master secret value is passed from the client to the
server encrypted using RSA PKCS1 type 2 padding in a ClientKeyExchange
message. As well as the normal formatting rules for RSA PKCA1 type 2
padding TLS imposes some additional rules about what constitutes a well
formed key. Specifically it must be exactly the right length and
encode the TLS version originally requested by the client (as opposed to
the actual negotiated version) in its first two bytes.

All of these checks need to be done in constant time and, if they fail,
then the TLS implementation is supposed to continue anyway with a random
key (and therefore the connection will fail later on). This avoids
padding oracle type attacks.

This commit implements this within the RSA padding code so that we keep
all the constant time padding logic in one place. A later commit will
remove it from libssl.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10411)
2019-12-05 16:12:18 +00:00
..
ciphers Make sure we handle input NULL with length 0 2019-11-29 10:41:06 +00:00
digests Cleanup: move remaining providers/common/include/internal/*.h 2019-10-10 14:12:15 +02:00
include/prov Teach the RSA implementation about TLS RSA Key Transport 2019-12-05 16:12:18 +00:00
bio_prov.c PROV BIO: add a BIO_vprintf() upcall, and a provider BIO library 2019-11-29 20:55:16 +01:00
build.info PROV BIO: add a BIO_vprintf() upcall, and a provider BIO library 2019-11-29 20:55:16 +01:00
nid_to_name.c Rename providers/common/provlib.c to nid_to_name.c 2019-11-10 05:05:06 +01:00
provider_err.c Teach the RSA implementation about TLS RSA Key Transport 2019-12-05 16:12:18 +00:00
provider_util.c [KDF] Add feedback-mode and CMAC support to KBKDF 2019-10-17 12:45:03 +10:00