openssl/crypto/rsa
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
..
build.info
rsa_ameth.c Increase OSSL_PARAM_BLD_MAX for multi-prime RSA 2019-11-14 09:29:46 +00:00
rsa_asn1.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_chk.c Add BN_check_prime() 2019-10-14 22:54:02 +02: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
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 PROV SERIALIZER: add support for writing RSA keys 2019-11-29 20:55:16 +01:00
rsa_local.h New RSA keymgmt implementation to handle import / export of RSA keys 2019-10-17 18:07:45 +02: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
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 Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_prn.c
rsa_pss.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_saos.c
rsa_sign.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_sp800_56b_check.c RSA generation: Use more bits of 1/sqrt(2) 2019-11-09 16:01:54 +01: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
rsa_x931g.c New RSA keymgmt implementation to handle import / export of RSA keys 2019-10-17 18:07:45 +02:00