Skip to content

Commit

Permalink
Remove redundant assignment in felem_mul_ref in p521
Browse files Browse the repository at this point in the history
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 #19766)

(cherry picked from commit 3d4dfeb)
  • Loading branch information
Rohan McLure authored and hlandau committed Nov 30, 2022
1 parent 059123b commit ca0dd5f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion crypto/ec/ecp_nistp521.c
Expand Up @@ -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);
Expand Down

0 comments on commit ca0dd5f

Please sign in to comment.