Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing an application that uses Elliptic curve Diffie–Hellman for authentication.

I found two formulas for point doubling in Jacobian coordinates.

1st) \begin{equation} X_1 = (3x^2 + aZ^4)^2 - 8xy^2 \end{equation} 2nd) \begin{equation} X_1 = (3 (x - z^2)(x + z^2))^2 - 8xy^2 \end{equation}

The second formula is for curve \begin{equation} y^2 = x^3 -3x +b \end{equation}

I noticed that for curve "SECP112R1", both formulas give identical results. But for a random curve (example $p = 263$, $a = 2$, $b = 3$, $x = 200$, $y = 39$) it is not the same.

Is there a way I can transform my curve such that I can get identical result from both formulas?

Is there a way I can generate a curve that can use both the formulas for point doubling?

share|improve this question
the 2nd formula can be used for curves that that dont have a = -3 but have a = p - 3 and probably some other criteria. "SECP112R1", "SECP128R1", "SECP160R1", "nistp256" are such curves. – user469635 Mar 30 at 22:24

The 2nd formula is the first formula with $a=-3$

$3x^{2} + (-3)z^{4}$

$= 3(x^2 - z^4)$

$= 3(x-z^2)(x+z^2)$

So the result isn't going to be the same when $a$ is different.

share|improve this answer

If $a = -3$, then we have $3(x - z^2)(x + z^2) = 3x^2 - 3z^4 = 3x^2 + az^4$, and so the two formulii give the same result.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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