boringssl/crypto/bn
Brian Smith dc7a786d31 Use BN_nnmod instead of BN_mod in BN_mod_exp_mont_consttime.
|BN_mod_exp_mont| uses |BN_nnmod| so it seems like
|BN_mod_exp_mont_consttime| should too. Further, I created
these test vectors by doing the math by hand, and the tests
passed for |BN_mod_exp_mont| but failed for
|BN_mod_exp_mont_consttime| without this change.

Change-Id: I7cffa1375e94dd8eaee87ada78285cd67fff1bac
Reviewed-on: https://boringssl-review.googlesource.com/9032
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2016-08-02 20:24:58 +00:00
..
asm Switch perlasm calling convention. 2016-06-27 21:59:26 +00:00
add.c Switch unrolled loop in BN_usub with memcpy. 2015-12-16 17:38:48 +00:00
bn_asn1.c Rename the BIGNUM ASN.1 functions. 2016-01-27 22:37:44 +00:00
bn_test.cc Ensure |BN_div| never gives negative zero in the no_branch code. 2016-08-02 18:53:45 +00:00
bn_tests.txt Use BN_nnmod instead of BN_mod in BN_mod_exp_mont_consttime. 2016-08-02 20:24:58 +00:00
bn.c Ensure |BN_div| never gives negative zero in the no_branch code. 2016-08-02 18:53:45 +00:00
check_bn_tests.go Fix mixed comment markers. 2016-08-01 14:52:39 +00:00
CMakeLists.txt Calculate inverse in |BN_MONT_CTX_set| in constant time w.r.t. modulus. 2016-08-02 16:26:44 +00:00
cmp.c Add BN_rand_range_ex and use internally. 2016-07-29 16:09:26 +00:00
convert.c Tolerate -0 better in BN_bn2{dec,hex} 2016-08-02 17:35:16 +00:00
ctx.c
div.c Fix BN_mod_word bug. 2016-06-09 19:05:31 +00:00
exponentiation.c Use BN_nnmod instead of BN_mod in BN_mod_exp_mont_consttime. 2016-08-02 20:24:58 +00:00
gcd.c Add |BN_mod_inverse_blinded| and use it in RSA blinding. 2016-07-29 18:30:34 +00:00
generic.c Move |bn_div_words| to crypto/bn/div.c and make it static. 2016-02-25 16:16:14 +00:00
internal.h Calculate inverse in |BN_MONT_CTX_set| in constant time w.r.t. modulus. 2016-08-02 16:26:44 +00:00
kronecker.c
montgomery_inv.c Calculate inverse in |BN_MONT_CTX_set| in constant time w.r.t. modulus. 2016-08-02 16:26:44 +00:00
montgomery.c Calculate inverse in |BN_MONT_CTX_set| in constant time w.r.t. modulus. 2016-08-02 16:26:44 +00:00
mul.c Make local functions static. 2016-03-20 16:37:58 +00:00
prime.c Handle BN_mod_word failures. 2016-06-23 21:25:18 +00:00
random.c Add BN_rand_range_ex and use internally. 2016-07-29 16:09:26 +00:00
rsaz_exp.c Use |alignas| for alignment. 2016-01-25 23:05:04 +00:00
rsaz_exp.h
shift.c
sqrt.c Document that BN_mod_sqrt assumes p is a prime. 2016-07-06 23:15:41 +00:00