RT3066: rewrite RSA padding checks to be slightly more constant time.
authorEmilia Kasper <emilia@openssl.org>
Thu, 28 Aug 2014 17:43:49 +0000 (19:43 +0200)
committerEmilia Kasper <emilia@openssl.org>
Wed, 24 Sep 2014 12:17:41 +0000 (14:17 +0200)
commit0f04b004acb27a705578d5b2cede0a84ba9af0dd
tree87b6b2c27eb5a43da411a5666f7284a6dbb1250a
parent81e3a6055ca84c8cc9f3732f74b678959b8a4266
RT3066: rewrite RSA padding checks to be slightly more constant time.

Also tweak s3_cbc.c to use new constant-time methods.
Also fix memory leaks from internal errors in RSA_padding_check_PKCS1_OAEP_mgf1

This patch is based on the original RT submission by Adam Langley <agl@chromium.org>,
as well as code from BoringSSL and OpenSSL.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Conflicts:
crypto/rsa/rsa_oaep.c
crypto/constant_time_locl.h
crypto/constant_time_test.c
crypto/rsa/Makefile
crypto/rsa/rsa.h
crypto/rsa/rsa_err.c
crypto/rsa/rsa_oaep.c
crypto/rsa/rsa_pk1.c
ssl/s3_cbc.c