boringssl/include/openssl
David Benjamin a63d0ad40d Require BN_mod_exp_mont* inputs be reduced.
If the caller asked for the base to be treated as secret, we should
provide that. Allowing unbounded inputs is not compatible with being
constant-time.

Additionally, this aligns with the guidance here:
https://github.com/HACS-workshop/spectre-mitigations/blob/master/crypto_guidelines.md#1-do-not-conditionally-choose-between-constant-and-non-constant-time

Update-Note: BN_mod_exp_mont_consttime and BN_mod_exp_mont now require
inputs be fully reduced. I believe current callers tolerate this.

Additionally, due to a quirk of how certain operations were ordered,
using (publicly) zero exponent tolerated a NULL BN_CTX while other
exponents required non-NULL BN_CTX. Non-NULL BN_CTX is now required
uniformly. This is unlikely to cause problems. Any call site where the
exponent is always zero should just be replaced with BN_value_one().

Change-Id: I7c941953ea05f36dc2754facb9f4cf83a6789c61
Reviewed-on: https://boringssl-review.googlesource.com/27665
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Steven Valdez <svaldez@google.com>
2018-04-24 18:29:29 +00:00
..
aead.h Add M=8 L=2 AES-128-CCM as well. 2018-03-02 18:45:06 +00:00
aes.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
arm_arch.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
asn1_mac.h
asn1.h Limit ASN.1 constructed types recursive definition depth 2018-03-27 15:40:37 +00:00
asn1t.h Remove ASN1_template_(i2d,d2i). 2017-09-15 22:53:43 +00:00
base64.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
base.h Add SSL_SESSION_get0_cipher. 2018-04-13 17:45:23 +00:00
bio.h Fix reference to nonexistent function. 2018-01-16 16:23:36 +00:00
blowfish.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
bn.h Require BN_mod_exp_mont* inputs be reduced. 2018-04-24 18:29:29 +00:00
buf.h Always process handshake records in full. 2017-10-17 14:53:11 +00:00
buffer.h
bytestring.h bytestring: document that |CBS_get_optional_asn1| can have a NULL output. 2018-03-19 20:22:25 +00:00
cast.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
chacha.h Add chacha.h to the list of documented headers. 2017-10-12 15:27:34 +00:00
cipher.h Add more compatibility symbols for Node. 2017-11-03 01:31:50 +00:00
cmac.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
conf.h Add more compatibility symbols for Node. 2017-11-03 01:31:50 +00:00
cpu.h Change OPENSSL_cpuid_setup to reserve more extended feature space. 2018-04-19 20:48:58 +00:00
crypto.h Add an OPENSSL_malloc_init stub. 2018-04-13 17:30:44 +00:00
curve25519.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
des.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
dh.h Switch OPENSSL_VERSION_NUMBER to 1.1.0. 2017-09-29 04:51:27 +00:00
digest.h Switch OPENSSL_VERSION_NUMBER to 1.1.0. 2017-09-29 04:51:27 +00:00
dsa.h Remove DSA_sign_setup too. 2017-11-22 21:01:11 +00:00
dtls1.h
ec_key.h Fold EC_KEY_copy into EC_KEY_dup. 2018-03-07 21:17:02 +00:00
ec.h Document preferences for EC_GROUP_new_by_curve_name. 2018-03-20 20:15:06 +00:00
ecdh.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
ecdsa.h Remove ECDSA_sign_setup and friends. 2017-11-22 20:23:40 +00:00
engine.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
err.h Bring ERR_ERROR_STRING_BUF_LEN down to 120. 2017-12-14 19:47:23 +00:00
evp.h Documentation typo. 2018-01-25 14:47:06 +00:00
ex_data.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
hkdf.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
hmac.h Switch OPENSSL_VERSION_NUMBER to 1.1.0. 2017-09-29 04:51:27 +00:00
is_boringssl.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
lhash_macros.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
lhash.h Unexport more of lhash. 2017-10-25 04:17:18 +00:00
md4.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
md5.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
mem.h Remove redundant calls to |OPENSSL_cleanse| and |OPENSSL_realloc_clean|. 2017-09-18 19:16:51 +00:00
nid.h Add OpenSSL 1.1.0's cipher property functions. 2017-08-11 02:08:58 +00:00
obj_mac.h
obj.h Reimplement OBJ_txt2obj and add a lower-level function. 2017-11-27 21:29:00 +00:00
objects.h
opensslconf.h Switch OPENSSL_VERSION_NUMBER to 1.1.0. 2017-09-29 04:51:27 +00:00
opensslv.h
ossl_typ.h
pem.h Switch a number of files to C++. 2017-07-12 20:54:02 +00:00
pkcs7.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
pkcs8.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
pkcs12.h
poly1305.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
pool.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
rand.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
rc4.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
ripemd.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
rsa.h Check d is mostly-reduced in RSA_check_key. 2018-03-30 19:54:10 +00:00
safestack.h
sha.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
span.h Add runtime bounds checks to bssl::Span. 2018-04-16 16:26:33 +00:00
srtp.h
ssl3.h Remove remnants of the HRR message. 2018-03-13 21:10:03 +00:00
ssl.h Add an API to disable RSA-PSS for certificates. 2018-04-16 20:02:43 +00:00
stack.h Avoid modifying stack in sk_find. 2018-04-12 21:02:12 +00:00
thread.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
tls1.h Add an API to disable RSA-PSS for certificates. 2018-04-16 20:02:43 +00:00
type_check.h Run comment conversion script on include/ 2017-08-18 23:38:51 +00:00
x509_vfy.h Unexport more of lhash. 2017-10-25 04:17:18 +00:00
x509.h Add RSA_PSS_PARAMS to bssl::UniquePtr. 2018-03-22 20:34:07 +00:00
x509v3.h Fix up AUTHORITY_INFO_ACCESS/ACCESS_DESCRIPTION's deleter. 2018-04-02 17:07:46 +00:00