boringssl/include/openssl
David Benjamin 6a289b3ec4 Remove EC_POINTs_make_affine and related logic.
This does not appear to actually pull its weight. The purpose of this
logic is to switch some adds to the faster add_mixed in the wNAF code,
at the cost of a rather expensive inversion. This optimization kicks in
for generic curves, so P-384 and P-521:

With:
Did 32130 ECDSA P-384 signing operations in 30077563us (1068.2 ops/sec)
Did 27456 ECDSA P-384 verify operations in 30073086us (913.0 ops/sec)
Did 14122 ECDSA P-521 signing operations in 30077407us (469.5 ops/sec)
Did 11973 ECDSA P-521 verify operations in 30037330us (398.6 ops/sec)

Without:
Did 32445 ECDSA P-384 signing operations in 30069721us (1079.0 ops/sec)
Did 27056 ECDSA P-384 verify operations in 30032303us (900.9 ops/sec)
Did 13905 ECDSA P-521 signing operations in 30000430us (463.5 ops/sec)
Did 11433 ECDSA P-521 verify operations in 30021876us (380.8 ops/sec)

For single-point multiplication, the optimization is not useful. This
makes sense as we only have one table's worth of additions to convert
but still pay for the inversion. For double-point multiplication, it is
slightly useful for P-384 and very useful for P-521. However, the next
change to stack-allocate EC_FELEMs will more than compensate for
removing it.  (The immediate goal here is to simplify the EC_FELEM
story.)

Additionally, that this optimization was not useful for single-point
multiplication implies that, should we wish to recover this, a modest
8-entry pre-computed (affine) base point table should have the same
effect or better.

Update-Note: I do not believe anything was calling either of these
functions. (If necessary, we can always add no-op stubs as whether a
point is affine is not visible to external code. It previously kicked in
some optimizations, but those were removed for constant-time needs
anyway.)

Bug: 239
Change-Id: Ic9c51b001c45595cfe592274c7d5d652f4234839
Reviewed-on: https://boringssl-review.googlesource.com/27667
Reviewed-by: Adam Langley <agl@google.com>
2018-04-25 16:12:06 +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 Purge the remainder of asn1_mac.h. 2016-08-03 21:37:31 +00:00
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 Remove EC_POINTs_make_affine and related logic. 2018-04-25 16:12: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