openssl/include/crypto
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
..
__DECC_INCLUDE_EPILOGUE.H
__DECC_INCLUDE_PROLOGUE.H
aria.h
asn1_dsa.h
asn1.h PKEY: adapt the export_to_provider funtions to handle domain params too 2019-10-17 13:01:14 +02:00
async.h
bn_conf.h.in
bn_dh.h
bn_srp.h
bn.h RSA generation: Use more bits of 1/sqrt(2) 2019-11-09 16:01:54 +01:00
chacha.h
ciphermode_platform.h
cms.h
cryptlib.h
ctype.h
dso_conf.h.in
ec.h
engine.h
err.h
ess.h
evp.h CORE & PROV: make export of key data leaner through callback 2019-11-14 10:53:14 +01:00
lhash.h
md32_common.h
modes.h
objects.h
poly1305.h Add ChaCha related ciphers to default provider 2019-10-16 16:18:42 +10:00
rand.h
rsa.h Teach the RSA implementation about TLS RSA Key Transport 2019-12-05 16:12:18 +00: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 Update source files for deprecation at 3.0 2019-11-07 11:37:25 +01:00
sm4.h
sparse_array.h
store.h
x509.h