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 00:57:37 +0000 (20:57 -0400)
commit7ae8106af87f1d9f94bbc9ac65b819f0473cf57e
treeba147433b0dc4ede2ba1bdc750fd0cd60f242119
parent56e5d5498d557fe1ab0a360ddcda2931d976ec62
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