Remove unnecessary loop in pkey_rsa_decrypt.
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 26 Apr 2017 07:59:18 +0000 (09:59 +0200)
committerRich Salz <rsalz@openssl.org>
Thu, 27 Apr 2017 01:00:16 +0000 (21:00 -0400)
commitde46e8246bf30f9d8a6b8a66b37f8bf63115aeb6
tree1da42cc4d561e9426601286490b5b6d73c8341ce
parentb99f1023f8ac357ffb8d009cf78fba586de26b5a
Remove unnecessary loop in pkey_rsa_decrypt.

It is not necessary to remove leading zeros here because
RSA_padding_check_PKCS1_OAEP_mgf1 appends them again. As this was not done
in constant time, this might have leaked timing information.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3313)
(cherry picked from commit 237bc6c997e42295eeb32c8c1c709e6e6042b839)
crypto/rsa/rsa_pmeth.c