I'm working with the secp256k1 elliptic curve and have point doubling and point addition formulas for this curve. Given the following formulas:

Point Addition Formula in Python3:

s = (Qy - Gy) * pow(Qx - Gx, -1, p) % p
Rx = (s**2 - Qx - Gx) % p
Ry = (s * (Qx - Rx) - Qy) % p

Point Doubling Formula in Python3:

s = (3 * Qx**2) * pow(Qy*2, -1, p) % p
Rx = (s**2 - Qx*2) % p
Ry = (s * (Qx - Rx) - Qy) % p

If a point is given Qx and Qy

Qx = 112711660439710606056748659173929673102114977341539408544630613555209775888121
Qy = 25583027980570883691656905877401976406448868254816295069919888960541586679410

performing point doubling on the given points (Qx, Qy) will get the below output

Rx1 = 115780575977492633039504758427830329241728645270042306223540962614150928364886
Ry1 = 78735063515800386211891312544505775871260717697865196436804966483607426560663

Performing point addition on the given points (Qx, Qy) will get

Rx2 = 103388573995635080359749164254216598308788835304023601477803095234286494993683
Ry2 = 37057141145242123013015316630864329550140216928701153669873286428255828810018

Now, I'm looking for a way to convert (Rx1, Ry1) to (Rx2, Ry2) without knowing the original given values (Qx, Qy). Is there a method or algorithm to achieve this conversion?

  • Hello Aviril, this question has already an answer, so please refrain from heavily editing your question at this point. If you want to ask something different, please start a new topic.
    – Murch
    Commented Oct 9, 2023 at 0:32
  • @Murch the answer provide below does not answer my question. I already gotten the answer somewhere else so if you don't mind stop editing the question back, I tried deleting it but since some already tried answering the question I can't. Commented Oct 9, 2023 at 16:25
  • It is not clear to me how your edit improves the question except that it removes context relevant to the answer below. I’ve already requested once that you stop removing content. I’ve locked this question to edits.
    – Murch
    Commented Oct 9, 2023 at 16:57
  • I’m voting to close this question because it was crossposted to Crypto SE, where someone figured out that the asker meant to ask how to get from R_1 = 2Q to R_2 = Q + G which lead to a better answer.
    – Murch
    Commented Nov 6, 2023 at 22:13

1 Answer 1


Yes, but it's pretty silly.

If you use your addition formula for Qx = Gx, the intermediary s will be 0. From this, it follows that Rx = -2Qx = -2Gx and Ry = -Qy.

So if you instead wanted doubling (all you need to do is take the Rx and Ry values, compute Qx and Qy from those, and substitute those expressions in the correct doubling formula.

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