diff options
author | Martin Schwenke <martin@meltin.net> | 2021-05-12 11:47:55 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-05-29 16:07:15 +1000 |
commit | 3363a2c3d60a157817dce1d6d5af20de0e415875 (patch) | |
tree | 21941e439da8b99fa0019b8c5cbde3e4afab7ed0 /crypto/ec | |
parent | 77112270593c4c51631e9138174f6657096399e9 (diff) |
ec: Rename reference p521 field operations and use them via macros
This will allow clean addition of assembly versions of these operations.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15401)
Diffstat (limited to 'crypto/ec')
-rw-r--r-- | crypto/ec/ecp_nistp521.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c index c449b93a0a..e507c1e55c 100644 --- a/crypto/ec/ecp_nistp521.c +++ b/crypto/ec/ecp_nistp521.c @@ -401,7 +401,7 @@ static void felem_diff128(largefelem out, const largefelem in) * On exit: * out[i] < 17 * max(in[i]) * max(in[i]) */ -static void felem_square(largefelem out, const felem in) +static void felem_square_ref(largefelem out, const felem in) { felem inx2, inx4; felem_scalar(inx2, in, 2); @@ -485,7 +485,7 @@ static void felem_square(largefelem out, const felem in) * On exit: * out[i] < 17 * max(in1[i]) * max(in2[i]) */ -static void felem_mul(largefelem out, const felem in1, const felem in2) +static void felem_mul_ref(largefelem out, const felem in1, const felem in2) { felem in2x2; felem_scalar(in2x2, in2, 2); @@ -675,6 +675,9 @@ static void felem_reduce(felem out, const largefelem in) */ } +#define felem_square felem_square_ref +#define felem_mul felem_mul_ref + static void felem_square_reduce(felem out, const felem in) { largefelem tmp; |