boringssl/crypto/bn
David Benjamin 5148345282 BN_mod_exp_mont_consttime: check for zero modulus.
Don't dereference |d| when |top| is zero. Also test that various BIGNUM
methods behave correctly on zero/even inputs.

(Imported from upstream's cf633fa00244e39eea2f2c0b623f7d5bbefa904e.)

We already had the BN_div and BN_MONT_CTX_set tests, but align them with
upstream's for consistency.

Change-Id: Ice5d04f559b4d5672e23c400637c07d8ee401727
Reviewed-on: https://boringssl-review.googlesource.com/5783
Reviewed-by: Adam Langley <agl@google.com>
2015-09-01 19:12:28 +00:00
..
asm Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
add.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
bn_asn1.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
bn_test.cc BN_mod_exp_mont_consttime: check for zero modulus. 2015-09-01 19:12:28 +00:00
bn.c Get overflow checks right in BN_bin2bn. 2015-08-17 20:30:00 +00:00
CMakeLists.txt Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
cmp.c Inital import. 2014-06-20 13:17:32 -07:00
convert.c Re-add |BN_bn2mpi| and |BN_mpi2bn| from OpenSSL at fd682e4c. 2015-08-18 23:49:31 +00:00
ctx.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
div.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
exponentiation.c BN_mod_exp_mont_consttime: check for zero modulus. 2015-09-01 19:12:28 +00:00
gcd.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
generic.c Add in missing curly braces part 1. 2015-02-11 19:31:01 +00:00
internal.h Get overflow checks right in BN_bin2bn. 2015-08-17 20:30:00 +00:00
kronecker.c Inital import. 2014-06-20 13:17:32 -07:00
montgomery.c Check for 0 modulus in BN_MONT_CTX_set. 2015-08-17 20:32:38 +00:00
mul.c Check for BN_copy failures. 2015-06-15 17:52:40 +00:00
prime.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
random.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
rsaz_exp.c Support building with PNaCl. 2014-07-11 19:04:04 +00:00
rsaz_exp.h Fix license on rsaz_exp.h. 2015-07-27 22:21:11 +00:00
shift.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
sqrt.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00