[crypto/ec] Ladder tweaks
authorBilly Brumley <bbrumley@gmail.com>
Sat, 28 Mar 2020 18:35:43 +0000 (20:35 +0200)
committerNicola Tuveri <nic.tuv@gmail.com>
Wed, 1 Apr 2020 15:50:20 +0000 (18:50 +0300)
commita4a93bbfb0e679eaa249f77c7c4e7e823ca870ef
treedc1cdbca101c0ba69519ca94ea33ca5f0090456a
parent09736245b174a37abb87fb7ceb55462d940ff2bb
[crypto/ec] Ladder tweaks

- Convert to affine coords on ladder entry. This lets us use more efficient
  ladder step formulae.

- Convert to affine coords on ladder exit. This prevents the current code
  awkwardness where conversion happens twice during serialization: first to
  fetch the buffer size, then again to fetch the coords.

- Instead of projectively blinding the input point, blind both accumulators
  independently.

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/11435)
crypto/ec/ec_mult.c
crypto/ec/ecp_smpl.c