From: Martin Schwenke Date: Wed, 12 May 2021 01:47:55 +0000 (+1000) Subject: ec: Rename reference p521 field operations and use them via macros X-Git-Tag: openssl-3.0.0-beta1~319 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3363a2c3d60a157817dce1d6d5af20de0e415875;p=thirdparty%2Fopenssl.git 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 Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15401) --- diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c index c449b93a0aa..e507c1e55cb 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;