boringssl/crypto/fipsmodule/ecdsa
David Benjamin 7121fe24e9 Align ECDSA sign/verify scalar inversions.
We were still using the allocating scalar inversion for ECDSA verify
because previously it seemed to be faster. It appears to have flipped
now, though probably was always just a wash.

While I'm here, save a multiplication by swapping the inversion and
Montgomery reduction.

Did 200000 ECDSA P-256 signing operations in 10025749us (19948.6 ops/sec)
Did 66234 ECDSA P-256 verify operations in 10061123us (6583.2 ops/sec)

Did 202000 ECDSA P-256 signing operations in 10020846us (20158.0 ops/sec)
Did 68052 ECDSA P-256 verify operations in 10020592us (6791.2 ops/sec)

The actual motivation is to get rid of the unchecked EC_SCALAR function
and align sign/verify in preparation for the assembly scalar ops.

Change-Id: I1bd3a5719a67966dc8edaa43535a3864b69f76d0
Reviewed-on: https://boringssl-review.googlesource.com/27588
Reviewed-by: Adam Langley <alangley@gmail.com>
2018-04-24 16:00:12 +00:00
..
ecdsa_sign_tests.txt Add tests for large digests. 2018-04-02 18:18:23 +00:00
ecdsa_test.cc Remove ECDSA_sign_setup and friends. 2017-11-22 20:23:40 +00:00
ecdsa_verify_tests.txt Add tests for large digests. 2018-04-02 18:18:23 +00:00
ecdsa.c Align ECDSA sign/verify scalar inversions. 2018-04-24 16:00:12 +00:00