boringssl/crypto/bn
David Benjamin 6544426d82 Fix a ** 0 mod 1 = 0 for real this time.
Commit 2b0180c37fa6ffc48ee40caa831ca398b828e680 attempted to do this but
only hit one of many BN_mod_exp codepaths. Fix remaining variants and
add a test for each method.

Thanks to Hanno Boeck for reporting this issue.

(Imported from upstream's 44e4f5b04b43054571e278381662cebd3f3555e6.)

Change-Id: Ic691b354101c3e9c3565300836fb6d55c6f253ba
Reviewed-on: https://boringssl-review.googlesource.com/6820
Reviewed-by: Adam Langley <agl@google.com>
2015-12-22 23:30:22 +00:00
..
asm Re-apply 75b833cc81 2015-12-03 17:25:12 +00:00
add.c Switch unrolled loop in BN_usub with memcpy. 2015-12-16 17:38:48 +00:00
bn_asn1.c Work around even more Estonian ID card misissuances. 2015-09-23 20:35:47 +00:00
bn_test.cc Fix a ** 0 mod 1 = 0 for real this time. 2015-12-22 23:30:22 +00:00
bn.c Share common definitions of |TOBN| and |BIGNUM_STATIC|. 2015-11-19 01:38:52 +00:00
CMakeLists.txt Add AArch64 Montgomery assembly. 2015-11-10 19:13:46 +00:00
cmp.c
convert.c Convert ssl3_send_client_key_exchange to CBB. 2015-12-22 17:00:56 +00:00
ctx.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
div.c Do away with BN_LLONG in favor of BN_ULLONG. 2015-11-20 19:59:07 +00:00
exponentiation.c Fix a ** 0 mod 1 = 0 for real this time. 2015-12-22 23:30:22 +00:00
gcd.c s/BN_BITS/BN_BITS2/ in |BN_mod_inverse_ex|; remove |BN_BITS| & |BN_MASK|. 2015-11-19 01:39:32 +00:00
generic.c Do away with BN_LLONG in favor of BN_ULLONG. 2015-11-20 19:59:07 +00:00
internal.h Do away with BN_LLONG in favor of BN_ULLONG. 2015-11-20 19:59:07 +00:00
kronecker.c
montgomery.c Remove the |ri| field of |BN_MONT_CTX|. 2015-11-19 01:40:13 +00:00
mul.c Check for BN_copy failures. 2015-06-15 17:52:40 +00:00
prime.c Avoid signed/unsigned comparison in crypto/bn's |probable_prime|. 2015-10-26 21:27:12 +00:00
random.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
rsaz_exp.c
rsaz_exp.h Fix license on rsaz_exp.h. 2015-07-27 22:21:11 +00:00
shift.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
sqrt.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00