boringssl/crypto/fipsmodule/bn
David Benjamin 2ccdf584aa Factor out BN_to_montgomery(1) optimization.
This cuts down on a duplicated place where we mess with bn->top. It also
also better abstracts away what determines the value of R.

(I ordered this wrong and rebasing will be annoying. Specifically, the
question is what happens if the modulus is non-minimal. In
https://boringssl-review.googlesource.com/c/boringssl/+/25250/, R will
be determined by the stored width of mont->N, so we want to use mont's
copy of the modulus. Though, one way or another, the important part is
that it's inside the Montgomery abstraction.)

Bug: 232
Change-Id: I74212e094c8a47f396b87982039e49048a130916
Reviewed-on: https://boringssl-review.googlesource.com/25247
Reviewed-by: Adam Langley <agl@google.com>
2018-02-02 18:42:39 +00:00
..
asm Silence ARMv8 deprecated IT instruction warnings. 2017-12-14 01:56:22 +00:00
add.c Clear no-op BN_MASK2 masks. 2017-10-27 02:38:45 +00:00
bn_test_to_fuzzer.go Generate bn_div and bn_mod_exp corpus from bn_tests.txt. 2017-10-27 18:57:48 +00:00
bn_test.cc Do RSA sqrt(2) business in BIGNUM. 2018-02-02 18:32:32 +00:00
bn_tests.txt bn/asm/rsaz-avx2.pl: fix digit correction bug in rsaz_1024_mul_avx2. 2017-12-07 16:54:32 +00:00
bn.c Add bn_copy_words. 2018-02-02 18:24:39 +00:00
bytes.c Add initial support for non-minimal BIGNUMs. 2018-02-02 18:03:46 +00:00
check_bn_tests.go
cmp.c Do RSA sqrt(2) business in BIGNUM. 2018-02-02 18:32:32 +00:00
ctx.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
div.c Enable __asm__ and uint128_t code in clang-cl. 2017-12-11 22:46:26 +00:00
exponentiation.c Factor out BN_to_montgomery(1) optimization. 2018-02-02 18:42:39 +00:00
gcd.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
generic.c Enable __asm__ and uint128_t code in clang-cl. 2017-12-11 22:46:26 +00:00
internal.h Factor out BN_to_montgomery(1) optimization. 2018-02-02 18:42:39 +00:00
jacobi.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
montgomery_inv.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
montgomery.c Factor out BN_to_montgomery(1) optimization. 2018-02-02 18:42:39 +00:00
mul.c Include a couple of missing header files. 2017-11-20 20:36:38 +00:00
prime.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
random.c Make ECDSA signing 10% faster and plug some timing leaks. 2017-11-22 22:51:40 +00:00
rsaz_exp.c Fix alignment-violating cast. 2017-12-01 22:32:17 +00:00
rsaz_exp.h
shift.c Add bn_mod_exp_mont_small and bn_mod_inverse_prime_mont_small. 2017-11-20 16:23:48 +00:00
sqrt.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00