I have a point in affine coordinates: $(x,y)$.

What should I do when I want to convert to $(X,Y,Z)$ in Jacobian coordinates? I need it for calculating ECC in a prime field.


When you go from Affine to Jacobian, $X$ and $Y$ stay the same, and $Z$ is equal to $1$

Affine -> Jacobian:

$(X',Y',Z') = (X,Y,1)$

Jacobian -> Affine:

$(X',Y') = (\frac{X}{Z^2}, \frac{Y}{Z^3} )$

  • 3
    $\begingroup$ Note that the division in the Jacobian -> Affine transformation is based on the Modular multiplicative inverse. You can't just use the integer division operation offered by common programming languages. $\endgroup$ Oct 13 '14 at 10:20
  • $\begingroup$ and what if $Z=0$? $\endgroup$ Jun 1 at 23:48
  • $\begingroup$ Z = 0 means something went wrong in your algorithm. It should never occur if you add or multiply points on the curve. $\endgroup$
    – Nayuki
    Jul 31 at 2:55

If you have a point $(x,y)$ to get its Jacobian coordinates $(X,Y,Z)$, take a $\lambda \in K^*$ and $(X,Y,Z) = (x\lambda^2, y\lambda^3, \lambda)$. The special/identity point is mapped to $(1,1,0)$.

Where $K$ is the field (of the definition of the Elliptic curve)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.