378cca8016
Historically, OpenSSL's modular exponentiation functions tolerated negative moduli by ignoring the sign bit. The special case for a modulus of 1 should do the same. That said, this is ridiculous and the only reason I'm importing this is BN_abs_is_word(1) is marginally more efficient than BN_is_one() and we haven't gotten around to enforcing positive moduli yet. Thanks to Guido Vranken and OSSFuzz for finding this issue and reporting to OpenSSL. (Imported from upstream's 235119f015e46a74040b78b10fd6e954f7f07774.) Change-Id: I526889dfbe2356753aa1e6ecfd3aa3dc3a8cd2b8 Reviewed-on: https://boringssl-review.googlesource.com/31085 Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com> |
||
---|---|---|
.. | ||
asm | ||
add.c | ||
bn_test_to_fuzzer.go | ||
bn_test.cc | ||
bn_tests.txt | ||
bn.c | ||
bytes.c | ||
check_bn_tests.go | ||
cmp.c | ||
ctx.c | ||
div_extra.c | ||
div.c | ||
exponentiation.c | ||
gcd_extra.c | ||
gcd.c | ||
generic.c | ||
internal.h | ||
jacobi.c | ||
montgomery_inv.c | ||
montgomery.c | ||
mul.c | ||
prime.c | ||
random.c | ||
rsaz_exp.c | ||
rsaz_exp.h | ||
shift.c | ||
sqrt.c |