boringssl/crypto/bn
David Benjamin c85573ccd8 Ensure BN_asc2bn, BN_dec2bn, and BN_hex2bn never give -0.
See upstream's a0eed48d37a4b7beea0c966caf09ad46f4a92a44. Rather than import
that, we should just ensure neg + zero isn't a possible state.

Add some tests for asc2bn and dec2bn while we're here. Also fix a bug with
dec2bn where it doesn't actually ignore trailing data as it's supposed to.

Change-Id: I2385b67b740e57020c75a247bee254085ab7ce15
Reviewed-on: https://boringssl-review.googlesource.com/4484
Reviewed-by: Adam Langley <agl@google.com>
2015-04-23 20:53:24 +00:00
..
asm Remove explicit .hiddens from x86_64 perlasm files. 2015-02-25 21:26:16 +00:00
add.c
bn_test.cc Ensure BN_asc2bn, BN_dec2bn, and BN_hex2bn never give -0. 2015-04-23 20:53:24 +00:00
bn.c Add in missing curly braces part 1. 2015-02-11 19:31:01 +00:00
CMakeLists.txt Convert bn_test to C++. 2015-04-01 19:53:51 +00:00
cmp.c
convert.c Ensure BN_asc2bn, BN_dec2bn, and BN_hex2bn never give -0. 2015-04-23 20:53:24 +00:00
ctx.c Add in missing curly braces part 1. 2015-02-11 19:31:01 +00:00
div.c Add some missing error failure checks. 2015-02-17 20:55:56 +00:00
exponentiation.c Fix error handling in bn_exp 2015-03-19 11:10:27 +00:00
gcd.c Add some missing error failure checks. 2015-02-17 20:55:56 +00:00
generic.c Add in missing curly braces part 1. 2015-02-11 19:31:01 +00:00
internal.h Define __STDC_FORMAT_MACROS before inttypes.h. 2015-04-02 18:39:18 +00:00
kronecker.c
montgomery.c Convert BN_MONT_CTX to new-style locking. 2015-04-14 20:10:27 +00:00
mul.c Add in missing curly braces part 1. 2015-02-11 19:31:01 +00:00
prime.c Avoid undefined behavior in probable_prime. 2015-03-19 11:36:49 +00:00
random.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
rsaz_exp.c Support building with PNaCl. 2014-07-11 19:04:04 +00:00
rsaz_exp.h Convert all zero-argument functions to '(void)' 2014-08-21 01:06:07 +00:00
shift.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
sqrt.c Add function to recover RSA CRT params. 2014-06-20 13:17:35 -07:00