20b6a4e2a1
Otherwise, if the output BIGNUM was previously negative, we'd incorrectly give a negative result. Thanks to Guide Vranken for reporting this issue! Fortunately, this does not appear to come up in any existing caller. This isn't all that surprising as negative numbers never really come up in cryptography. Were it not for OpenSSL historically designing a calculator API, we'd just delete the bit altogether. :-( Bug: chromium:865924 Change-Id: I28fdc986dfaba3e38435b14ebf07453d537cc60a Reviewed-on: https://boringssl-review.googlesource.com/29944 Commit-Queue: David Benjamin <davidben@google.com> Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> |
||
---|---|---|
.. | ||
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 |