boringssl/crypto
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
..
aes Add arm-xlate.pl and initial iOS asm support. 2015-04-20 19:08:26 +00:00
asn1 Ensure BN_asc2bn, BN_dec2bn, and BN_hex2bn never give -0. 2015-04-23 20:53:24 +00:00
base64 Convert base64_test to C++. 2015-04-01 19:54:13 +00:00
bio bio: remove BIO_CTRL_PUSH/_POP. 2015-04-16 00:16:20 +00:00
bn Ensure BN_asc2bn, BN_dec2bn, and BN_hex2bn never give -0. 2015-04-23 20:53:24 +00:00
buf Precompute sorted array for error strings. 2015-02-09 17:35:31 -08:00
bytestring Check for leading zeros in CBS_get_asn1_uint64. 2015-04-06 20:54:53 +00:00
chacha Switch nonce type in chacha_vec.c to uint32_t. 2015-02-13 13:16:59 -08:00
cipher Compatibility changes for wpa_supplicant and OpenSSH. 2015-04-14 20:18:28 +00:00
conf Add NCONF_load_bio. 2015-04-06 16:58:45 -07:00
des Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
dh Remove hash table lookups from ex_data. 2015-04-15 23:59:35 +00:00
digest Replace MD5 in examples with SHA-256. 2015-04-13 20:55:48 +00:00
dsa Remove hash table lookups from ex_data. 2015-04-15 23:59:35 +00:00
ec Fix standalone build on Mac. 2015-04-20 16:50:18 +00:00
ecdh Add in missing curly braces part 2. 2015-02-11 23:14:04 +00:00
ecdsa Convert ecdsa_test to C++. 2015-04-15 21:11:56 +00:00
engine Precompute sorted array for error strings. 2015-02-09 17:35:31 -08:00
err Add 64-bit, P-256 implementation. 2015-04-16 13:53:05 -07:00
evp Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
hkdf Rename BIO_print_errors_fp back to ERR_print_errors_fp & refactor it. 2015-04-13 20:23:29 +00:00
hmac Remove gotos from HMAC code. 2015-04-13 20:54:26 +00:00
lhash Remove more bits of ERR_STRING_DATA. 2015-02-10 02:10:46 +00:00
md4 Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
md5 Remove explicit .hiddens from x86_64 perlasm files. 2015-02-25 21:26:16 +00:00
modes Add arm-xlate.pl and initial iOS asm support. 2015-04-20 19:08:26 +00:00
obj Fix logic error that was breaking OBJ_create. 2015-04-23 01:46:15 +00:00
pem Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
perlasm Add arm-xlate.pl and initial iOS asm support. 2015-04-20 19:08:26 +00:00
pkcs8 Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
poly1305 Add in missing curly braces part 3. 2015-02-11 15:14:46 -08:00
rand Fix Windows build failures caused by 310d4dd. 2015-04-15 03:06:29 +00:00
rc4 Remove explicit .hiddens from x86_64 perlasm files. 2015-02-25 21:26:16 +00:00
rsa Remove hash table lookups from ex_data. 2015-04-15 23:59:35 +00:00
sha Add arm-xlate.pl and initial iOS asm support. 2015-04-20 19:08:26 +00:00
stack Add sk_deep_copy and its macro. 2015-02-13 10:59:10 -08:00
test Add 64-bit, P-256 implementation. 2015-04-16 13:53:05 -07:00
x509 Remove hash table lookups from ex_data. 2015-04-15 23:59:35 +00:00
x509v3 Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
arm_arch.h aarch64 support. 2015-01-14 23:38:11 +00:00
CMakeLists.txt 32-bit ARM perlasm should be 'linux32', not 'elf'. 2015-04-20 22:50:44 +00:00
constant_time_test.c Update constant-time operations. 2014-11-10 13:48:30 -08:00
cpu-arm-asm.S Don't probe for NEON with SIGILL on aarch64. 2015-02-03 19:56:25 +00:00
cpu-arm.c Don't set NEON_FUNCTIONAL in the getauxval path. 2015-03-31 00:26:25 +00:00
cpu-intel.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
cpu-x86_64-asm.pl Remove explicit .hiddens from x86_64 perlasm files. 2015-02-25 21:26:16 +00:00
cpu-x86-asm.pl Never set RC4_CHAR. 2015-02-20 23:59:59 +00:00
crypto.c Compatibility changes for wpa_supplicant and OpenSSH. 2015-04-14 20:18:28 +00:00
directory_posix.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
directory_win.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
directory.h
ex_data.c Remove hash table lookups from ex_data. 2015-04-15 23:59:35 +00:00
header_removed.h
internal.h Remove hash table lookups from ex_data. 2015-04-15 23:59:35 +00:00
mem.c Lowercase some Windows headers. 2015-03-31 22:21:42 +00:00
thread_pthread.c crypto: add mutexes. 2015-04-14 20:07:15 +00:00
thread_test.c Add native support for onces and thread-local storage. 2015-03-31 22:37:12 +00:00
thread_win.c crypto: add mutexes. 2015-04-14 20:07:15 +00:00
thread.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
time_support.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00