696b6b50b0
Firstly, FIPS 186-4 C.3.2 is broken for w=3. In step 4.1 it generates a random, 2-bit number but in step 4.2 it rejects all four possible values and loops forever. Secondly, BN_is_prime_fasttext_ex is broken when trial division is requested and the prime is small. It finds that the prime is a multiple of a known prime and rejects it. We inherited this from OpenSSL. Thirdly, we were missing a BN_CTX_start/end in BN_enhanced_miller_rabin_primality_test, which didn't matter but could have mattered in the future. Change-Id: Ie988e37b14bb22acb005fc0652860be6bbd2a55f Reviewed-on: https://boringssl-review.googlesource.com/15264 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> |
||
---|---|---|
.. | ||
asm | ||
add.c | ||
bn_asn1.c | ||
bn_test.cc | ||
bn_tests.txt | ||
bn.c | ||
check_bn_tests.go | ||
CMakeLists.txt | ||
cmp.c | ||
convert.c | ||
ctx.c | ||
div.c | ||
exponentiation.c | ||
gcd.c | ||
generic.c | ||
internal.h | ||
kronecker.c | ||
montgomery_inv.c | ||
montgomery.c | ||
mul.c | ||
prime.c | ||
random.c | ||
rsaz_exp.c | ||
rsaz_exp.h | ||
shift.c | ||
sqrt.c |