ec/ecdsa_ossl.c: revert blinding in ECDSA signature.
authorAndy Polyakov <appro@openssl.org>
Fri, 6 Jul 2018 13:55:34 +0000 (15:55 +0200)
committerAndy Polyakov <appro@openssl.org>
Wed, 18 Jul 2018 14:08:59 +0000 (16:08 +0200)
commit3fc7a9b96cbed0c3da6f53c08e34d8d0c982745f
tree47fd1b4a09f2482d51d461450f1cc21b6cb970f0
parent83e034379fa3f6f0d308ec75fbcb137e26154aec
ec/ecdsa_ossl.c: revert blinding in ECDSA signature.

Originally suggested solution for "Return Of the Hidden Number Problem"
is arguably too expensive. While it has marginal impact on slower
curves, none to ~6%, optimized implementations suffer real penalties.
Most notably sign with P-256 went more than 2 times[!] slower. Instead,
just implement constant-time BN_mod_add_quick.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: David Benjamin <davidben@google.com>
(Merged from https://github.com/openssl/openssl/pull/6664)
crypto/bn/bn_mod.c
crypto/ec/ecdsa_ossl.c
crypto/include/internal/bn_int.h