boringssl/crypto/fipsmodule
David Benjamin cfd50c63a1 Route the tuned add/dbl implementations out of EC_METHOD.
Some consumer stumbled upon EC_POINT_{add,dbl} being faster with a
"custom" P-224 curve than the built-in one and made "custom" clones to
work around this. Before the EC_FELEM refactor, EC_GFp_nistp224_method
used BN_mod_mul for all reductions in fallback point arithmetic (we
primarily support the multiplication functions and keep the low-level
point arithmetic for legacy reasons) which took quite a performance hit.

EC_FELEM fixed this, but standalone felem_{mul,sqr} calls out of
nistp224 perform a lot of reductions, rather than batching them up as
that implementation is intended. So it is still slightly faster to use a
"custom" curve.

Custom curves are the last thing we want to encourage, so just route the
tuned implementations out of EC_METHOD to close this gap. Now the
built-in implementation is always solidly faster than (or identical to)
the custom clone.  This also reduces the number of places where we mix
up tuned vs. generic implementation, which gets us closer to making
EC_POINT's representation EC_METHOD-specific.

Change-Id: I843e1101a6208eaabb56d29d342e886e523c78b4
Reviewed-on: https://boringssl-review.googlesource.com/c/32848
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
2018-11-06 00:17:19 +00:00
..
aes Fix undefined block128_f, etc., casts. 2018-10-01 17:35:02 +00:00
bn Fix div.c to divide BN_ULLONG only if BN_CAN_DIVIDE_ULLONG defined. 2018-10-10 15:33:35 +00:00
cipher Fix redefinition of AEAD asserts in e_aes.c. 2018-10-24 00:29:29 +00:00
des
digest Match OpenSSL's EVP_MD_CTX_reset return value. 2018-05-29 17:07:16 +00:00
ec Route the tuned add/dbl implementations out of EC_METHOD. 2018-11-06 00:17:19 +00:00
ecdh Add ECDH_compute_key_fips inside the module. 2018-07-30 22:40:31 +00:00
ecdsa Speed up ECDSA verify on x86-64. 2018-11-05 23:48:07 +00:00
hmac
md4
md5 Mark the C version of md5_block_data_order static. 2018-09-07 20:00:12 +00:00
modes Include aes.h in mode/internal.h 2018-10-03 17:36:04 +00:00
policydocs Include details about latest FIPS certification. 2018-11-05 19:03:25 +00:00
rand Don't overflow state->calls on 16TiB RAND_bytes calls. 2018-11-02 18:33:43 +00:00
rsa Clarify thread-safety of key objects. 2018-08-28 18:52:59 +00:00
self_check Always print some diagnostic information when POST fails. 2018-09-28 19:33:38 +00:00
sha [perlasm] Hide OPENSSL_armcap_P in assembly 2018-10-02 20:36:43 +00:00
tls Fix include path. 2018-05-08 16:26:05 +00:00
bcm.c Always print some diagnostic information when POST fails. 2018-09-28 19:33:38 +00:00
CMakeLists.txt Speed up ECDSA verify on x86-64. 2018-11-05 23:48:07 +00:00
delocate.h Use a pool of |rand_state| objects. 2018-07-06 21:25:37 +00:00
FIPS.md Include details about latest FIPS certification. 2018-11-05 19:03:25 +00:00
intcheck1.png
intcheck2.png
intcheck3.png
is_fips.c Add some more compatibility functions. 2018-05-08 20:51:15 +00:00