boringssl/crypto/fipsmodule/ec
David Benjamin 8618f2bfe0 Optimize EC_GFp_mont_method's cmp_x_coordinate.
For simplicity, punt order > field or width mismatches. Analogous
optimizations are possible, but the generic path works fine and no
commonly-used curve looks hits those cases.

Before:
Did 5888 ECDSA P-384 verify operations in 3094535us (1902.7 ops/sec)
After [+6.7%]:
Did 6107 ECDSA P-384 verify operations in 3007515us (2030.6 ops/sec)

Also we can fill in p - order generically and avoid extra copies of some
constants.

Change-Id: I38e1b6d51b28ed4f8cb74697b00a4f0fbc5efc3c
Reviewed-on: https://boringssl-review.googlesource.com/c/33068
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-13 01:48:21 +00:00
..
asm Revert "Revert "Speed up ECDSA verify on x86-64."" 2018-11-07 23:57:22 +00:00
ec_key.c Remove some easy BN_CTXs. 2018-11-12 22:04:40 +00:00
ec_montgomery.c Optimize EC_GFp_mont_method's cmp_x_coordinate. 2018-11-13 01:48:21 +00:00
ec_scalar_base_mult_tests.txt Add some EC base point multiplication test vectors. 2018-03-27 23:33:24 +00:00
ec_test.cc Remove some easy BN_CTXs. 2018-11-12 22:04:40 +00:00
ec.c Optimize EC_GFp_mont_method's cmp_x_coordinate. 2018-11-13 01:48:21 +00:00
felem.c Add missing #include of <openssl/err.h>. 2018-05-01 01:00:44 +00:00
internal.h Optimize EC_GFp_mont_method's cmp_x_coordinate. 2018-11-13 01:48:21 +00:00
make_ec_scalar_base_mult_tests.go Add some EC base point multiplication test vectors. 2018-03-27 23:33:24 +00:00
make_p256-x86_64-table.go Add utility program for emitting P-256 x86-64 table. 2018-03-26 16:28:42 +00:00
oct.c Name constant-time functions more consistently. 2018-03-29 23:30:55 +00:00
p224-64.c Push BIGNUM out of EC_METHOD's affine coordinates hook. 2018-11-12 21:32:53 +00:00
p256-x86_64_test.cc Revert "Revert "Speed up ECDSA verify on x86-64."" 2018-11-07 23:57:22 +00:00
p256-x86_64_tests.txt Add some tests for scalar operations. 2018-04-24 16:12:34 +00:00
p256-x86_64-table.h Add utility program for emitting P-256 x86-64 table. 2018-03-26 16:28:42 +00:00
p256-x86_64.c Optimize EC_GFp_mont_method's cmp_x_coordinate. 2018-11-13 01:48:21 +00:00
p256-x86_64.h Revert "Revert "Speed up ECDSA verify on x86-64."" 2018-11-07 23:57:22 +00:00
scalar.c Push BIGNUM out of the cmp_x_coordinate interface. 2018-11-12 21:46:36 +00:00
simple_mul.c Devirtualize ec_simple_{add,dbl}. 2018-11-06 18:32:11 +00:00
simple.c Push BIGNUM out of the cmp_x_coordinate interface. 2018-11-12 21:46:36 +00:00
util.c ec/p256.c: fiat-crypto field arithmetic (64, 32) 2017-12-11 17:55:46 +00:00
wnaf.c Devirtualize ec_simple_{add,dbl}. 2018-11-06 18:32:11 +00:00