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} )$
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)