boringssl/crypto
David Benjamin 7743c026cb Ensure EC private keys retain leading zeros
RFC 5915 requires the use of the I2OSP primitive as defined in RFC 3447
for encoding ECPrivateKey. Fix this and add a test.

See also upstream's 30cd4ff294252c4b6a4b69cbef6a5b4117705d22, though it mixes
up degree and order.

Change-Id: I81ba14da3c8d69e3799422c669fab7f16956f322
Reviewed-on: https://boringssl-review.googlesource.com/4469
Reviewed-by: Adam Langley <agl@google.com>
2015-04-28 21:03:27 +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 Ensure EC private keys retain leading zeros 2015-04-28 21:03:27 +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 sha/asm/sha512-armv4.pl: adapt for use in Linux kernel context. 2015-04-28 20:55:54 +00:00
stack Modify sk_find() so it returns 1 on success and 0 otherwise. 2015-04-24 23:19:56 +00:00
test Convert ec_test to C++ 2015-04-28 21:00:34 +00: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 Add visibility rules. 2014-07-31 22:03:11 +00:00
ex_data.c Remove hash table lookups from ex_data. 2015-04-15 23:59:35 +00:00
header_removed.h Add ISC header to a handful of files. 2014-06-26 10:26:42 -07:00
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