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?