boringssl/crypto/bn
Brian Smith 9f05de4ebb Remove the non-no_branch branch of BN_div.
Simplify the code, and in particular make |BN_div|, |BN_mod|, and
|BN_nnmod| insensitive to |BN_FLG_CONSTTIME|. This improves the
effectiveness of testing by reducing the number of branches that are
likely to go untested or less tested.

There is no performance-sensitive code that uses BN_div but doesn't
already use BN_FLG_CONSTTIME except RSA signature verification and
EC_GROUP creation. RSA signature verification, ECDH, and ECDSA
performance aren't significantly different with this change.

Change-Id: Ie34c4ce925b939150529400cc60e1f414c7676cd
Reviewed-on: https://boringssl-review.googlesource.com/9105
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2016-12-17 19:11:19 +00:00
..
asm Remove RSAZ-512. 2016-12-14 22:12:50 +00:00
add.c
bn_asn1.c
bn_test.cc Remove the non-no_branch branch of BN_div. 2016-12-17 19:11:19 +00:00
bn_tests.txt Remove RSAZ-512. 2016-12-14 22:12:50 +00:00
bn.c Add BN_set_u64. 2016-09-18 20:12:25 +00:00
check_bn_tests.go Fix mixed comment markers. 2016-08-01 14:52:39 +00:00
CMakeLists.txt Remove RSAZ-512. 2016-12-14 22:12:50 +00:00
cmp.c Add BN_rand_range_ex and use internally. 2016-07-29 16:09:26 +00:00
convert.c Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
ctx.c
div.c Remove the non-no_branch branch of BN_div. 2016-12-17 19:11:19 +00:00
exponentiation.c Remove RSAZ-512. 2016-12-14 22:12:50 +00:00
gcd.c Remove the non-no_branch branch of BN_div. 2016-12-17 19:11:19 +00:00
generic.c Fix up macros. 2016-10-18 18:28:23 +00:00
internal.h Calculate Montgomery RR without division. 2016-12-16 17:41:01 +00:00
kronecker.c Fix BN_kronecker on unreachable BN_rshift error. 2016-12-12 21:40:20 +00:00
montgomery_inv.c Calculate Montgomery RR without division. 2016-12-16 17:41:01 +00:00
montgomery.c Calculate Montgomery RR without division. 2016-12-16 17:41:01 +00:00
mul.c
prime.c Add constants for BN_rand and use them. 2016-08-18 18:18:31 +00:00
random.c Add constants for BN_rand and use them. 2016-08-18 18:18:31 +00:00
rsaz_exp.c Remove RSAZ-512. 2016-12-14 22:12:50 +00:00
rsaz_exp.h Remove RSAZ-512. 2016-12-14 22:12:50 +00:00
shift.c Fix some more negative zeros and add tests for each case. 2016-11-16 19:20:27 +00:00
sqrt.c Check for BN_lshift failure in BN_sqrt. 2016-11-29 00:55:56 +00:00