bn/bn_lib.c: add computationally constant-time bn_bn2binpad.
authorAndy Polyakov <appro@openssl.org>
Sun, 4 Feb 2018 14:20:29 +0000 (15:20 +0100)
committerAndy Polyakov <appro@openssl.org>
Fri, 10 Aug 2018 19:07:14 +0000 (21:07 +0200)
commit6412738be390dd9bf680cef89f22e4c810ab065f
tree92d2bd37bd9a9c3bc43ea7b94905b5dd8d9a05b8
parentf72a7ce8bc0a5c0866c6a848a7f54854d67aeba2
bn/bn_lib.c: add computationally constant-time bn_bn2binpad.

"Computationally constant-time" means that it might still leak
information about input's length, but only in cases when input
is missing complete BN_ULONG limbs. But even then leak is possible
only if attacker can observe memory access pattern with limb
granularity.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6889)

(cherry picked from commit 89d8aade5f4011ddeea7827f08ec544c914f275a)

Resolved conflicts:
crypto/bn/bn_lib.c
crypto/bn/bn_lib.c
crypto/bn_int.h