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)
committerJanusz Kozerski <j.kozerski@samsung.com>
Mon, 20 Oct 2014 13:26:05 +0000 (15:26 +0200)
commitaa4180df90711670172a4409d935bce71f6f51d4
treee305c734be3c2bc311fc36c771de3b7eded30e92
parent1735ece938c848d8bd2a004dd5f7e993eb0d0b1a
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