Skip to content

Commit

Permalink
fix: twistedEdwards zero affine point conversion to projective
Browse files Browse the repository at this point in the history
  • Loading branch information
mratsim committed Jun 27, 2024
1 parent b5e5ad6 commit c1da0b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions constantine/math/elliptic/ec_twistededwards_projective.nim
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ func fromAffine*[F](
proj.y = aff.y
proj.z.setOne()

let inf = aff.isNeutral()
proj.x.csetZero(inf)
proj.y.csetOne(inf)
proj.z.csetOne(inf)

# Vartime overloading
# ------------------------------------------------------------
# For generic vartime operations on both ShortWeierstrass curves and Twisted Edwards
Expand Down

0 comments on commit c1da0b0

Please sign in to comment.