summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRohan McLure <rohanmclure@linux.ibm.com>2022-11-25 14:41:08 +1100
committerHugo Landau <hlandau@openssl.org>2022-11-30 07:13:42 +0000
commitca0dd5f4a303def58800a7e4d7edf9242ed73241 (patch)
tree2da736b462aeccc47f177eff66b061cb5ab72cd6
parent059123bed8fa4e6d5af2d30063ebffeb0020ee85 (diff)
Remove redundant assignment in felem_mul_ref in p521
ftmp4 is assigned immediately before receiving the reduced output of the multiplication of ftmp and ftmp3, without being read inbetween these assignments. Remove redundant assignment. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19766) (cherry picked from commit 3d4dfeb28a5cb944b8300b4cf807e19ab97d04f5)
-rw-r--r--crypto/ec/ecp_nistp521.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c
index 31a97d7937..7e1e7e2d7c 100644
--- a/crypto/ec/ecp_nistp521.c
+++ b/crypto/ec/ecp_nistp521.c
@@ -782,7 +782,6 @@ static void felem_inv(felem out, const felem in)
felem_reduce(ftmp3, tmp); /* 2^7 - 2^3 */
felem_square(tmp, ftmp3);
felem_reduce(ftmp3, tmp); /* 2^8 - 2^4 */
- felem_assign(ftmp4, ftmp3);
felem_mul(tmp, ftmp3, ftmp);
felem_reduce(ftmp4, tmp); /* 2^8 - 2^1 */
felem_square(tmp, ftmp4);