boringssl/crypto/fipsmodule
David Benjamin 8370fb6b41 Implement constant-time generic multiplication.
This is slower, but constant-time. It intentionally omits the signed
digit optimization because we cannot be sure the doubling case will be
unreachable for all curves. This is a fallback generic implementation
for curves which we must support for compatibility but which are not
common or important enough to justify curve-specific work.

Before:
Did 814 ECDH P-384 operations in 1085384us (750.0 ops/sec)
Did 1430 ECDSA P-384 signing operations in 1081988us (1321.6 ops/sec)
Did 308 ECDH P-521 operations in 1057741us (291.2 ops/sec)
Did 539 ECDSA P-521 signing operations in 1049797us (513.4 ops/sec)

After:
Did 715 ECDH P-384 operations in 1080161us (661.9 ops/sec)
Did 1188 ECDSA P-384 verify operations in 1069567us (1110.7 ops/sec)
Did 275 ECDH P-521 operations in 1060503us (259.3 ops/sec)
Did 506 ECDSA P-521 signing operations in 1084739us (466.5 ops/sec)

But we're still faster than the old BIGNUM implementation. EC_FELEM
more than paid for both the loss of points_make_affine and this CL.

Bug: 239
Change-Id: I65d71a731aad16b523928ee47618822d503ea704
Reviewed-on: https://boringssl-review.googlesource.com/27708
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-04-27 20:11:29 +00:00
..
aes Always use adr with __thumb2__. 2018-02-22 22:28:15 +00:00
bn Add EC_FELEM for EC_POINTs and related temporaries. 2018-04-25 16:39:58 +00:00
cipher Require only that the nonce be strictly monotonic in TLS's AES-GCM 2018-01-26 20:09:44 +00:00
des Move OPENSSL_FALLTHROUGH to internal headers. 2018-01-29 18:17:57 +00:00
digest Switch OPENSSL_VERSION_NUMBER to 1.1.0. 2017-09-29 04:51:27 +00:00
ec Implement constant-time generic multiplication. 2018-04-27 20:11:29 +00:00
ecdsa Align ECDSA sign/verify scalar inversions. 2018-04-24 16:00:12 +00:00
hmac Switch OPENSSL_VERSION_NUMBER to 1.1.0. 2017-09-29 04:51:27 +00:00
md4 Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
md5 Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
modes ghashv8-armx.pl: add Qualcomm Kryo results. 2018-04-24 19:48:59 +00:00
policydocs
rand Fix up CTR_DRBG_update comment. 2018-01-23 22:19:03 +00:00
rsa Improve the RSA key generation failure probability. 2018-04-20 21:34:05 +00:00
self_check Split BORINGSSL_self_test into its own file. 2018-01-22 23:06:41 +00:00
sha Add SHA256_TransformBlocks. 2018-04-25 17:51:50 +00:00
tls add missing #includes 2018-01-22 21:54:08 +00:00
bcm.c Implement constant-time generic multiplication. 2018-04-27 20:11:29 +00:00
CMakeLists.txt
delocate.h Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
FIPS.md Update link to CMVP certificate. 2018-02-26 22:14:35 +00:00
intcheck1.png
intcheck2.png
intcheck3.png
is_fips.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00