openssl/providers/implementations
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
..
asymciphers Teach the RSA implementation about TLS RSA Key Transport 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 PROV: Avoid NULL dereference in SHA3 dup call. 2019-11-22 15:20:54 +10:00
exchange Cleanup: move providers/common/include/internal/provider_args.h 2019-10-10 14:12:15 +02:00
include/prov PROV SERIALIZER: add support for writing DSA keys and parameters 2019-11-29 20:55:16 +01:00
kdfs kdfs: make free calls check for NULL. 2019-11-22 15:19:28 +10:00
keymgmt CORE & PROV: make export of key data leaner through callback 2019-11-14 10:53:14 +01:00
macs Add ChaCha related ciphers to default provider 2019-10-16 16:18:42 +10:00
serializers PROV SERIALIZER: add support for writing DSA keys and parameters 2019-11-29 20:55:16 +01:00
signature Cleanup: move remaining providers/common/include/internal/*.h 2019-10-10 14:12:15 +02:00
build.info PROV SERIALIZER: add common functionality to serialize keys 2019-11-29 20:55:16 +01:00