boringssl/crypto/ec
Brian Smith b4cc925c30 Remove specialized assembly language |ecp_nistz256_from_mont|.
This function is only called twice per ECDH or ECDSA operation, and
it only saves a few scalar multiplications and additions compared to
the alternative, so it doesn't need to be specialized.

As the TODO comment above the callers notes, the two calls can be
reduced to one. Implementing |ecp_nistz256_from_mont| in terms of
|ecp_nistz256_mul_mont| helps show that that change is safe.

This also saves a small amount of code size and improves testing and
verification efficiency.

Note that this is already how the function is implemented for targets
other than x86-64 in OpenSSL.

Change-Id: If1404951f1a787d2618c853afd1f0e99a019e012
Reviewed-on: https://boringssl-review.googlesource.com/13021
Reviewed-by: Adam Langley <alangley@gmail.com>
2017-01-13 17:27:13 +00:00
..
asm Remove specialized assembly language |ecp_nistz256_from_mont|. 2017-01-13 17:27:13 +00:00
CMakeLists.txt Depend all_tests on p256-x86_64_test. 2016-11-17 02:56:51 +00:00
ec_asn1.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ec_key.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ec_montgomery.c Don't use BN_mod_inverse for inverses mod p in RSA keygen. 2017-01-04 13:56:11 +00:00
ec_test.cc ec/ecp_nistz256: harmonize is_infinity with ec_GFp_simple_is_at_infinity. 2016-11-16 18:16:54 +00:00
ec.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
example_mul.c Remove some easy obj.h dependencies. 2016-03-31 20:50:33 +00:00
internal.h Don't use function wrappers for EC_METHOD. 2016-08-16 19:27:52 +00:00
oct.c Fix error code for unreduced x. 2016-11-29 00:55:04 +00:00
p224-64.c Simplify ec_GFp_nistp224_points_mul logic. 2017-01-05 23:32:59 +00:00
p256-64.c Simplify ec_GFp_nistp256_points_mul logic. 2017-01-05 23:23:46 +00:00
p256-x86_64_test.cc Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
p256-x86_64_tests.txt ec/ecp_nistz256: harmonize is_infinity with ec_GFp_simple_is_at_infinity. 2016-11-16 18:16:54 +00:00
p256-x86_64-table.h Use |alignas| for alignment. 2016-01-25 23:05:04 +00:00
p256-x86_64.c Save one call to |ecp_nistz256_from_mont| in |ecp_nistz256_get_affine|. 2017-01-12 21:10:17 +00:00
p256-x86_64.h Remove specialized assembly language |ecp_nistz256_from_mont|. 2017-01-13 17:27:13 +00:00
simple.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
util-64.c Remove unused code for multiple-point ECC multiplication. 2016-03-09 19:47:19 +00:00
wnaf.c Remove 'pivot element' from wNAF code. 2017-01-12 16:45:23 +00:00