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
ec_asn1.c
ec_key.c
ec_montgomery.c
ec_test.cc
ec.c
example_mul.c
internal.h
oct.c
p224-64.c Simplify ec_GFp_nistp224_points_mul logic. 2017-01-05 23:32:59 +00:00
p256-64.c
p256-x86_64_test.cc
p256-x86_64_tests.txt
p256-x86_64-table.h
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
util-64.c
wnaf.c Remove 'pivot element' from wNAF code. 2017-01-12 16:45:23 +00:00