Ask Your Question

Revision history [back]

Convert secp256k1 G point to twist sextic curve

I need to convert point from one curve to another twist curve of previous curve.

from sage.all import *

p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
K = GF(p)
a = K(0x0000000000000000000000000000000000000000000000000000000000000000)
b = K(0x0000000000000000000000000000000000000000000000000000000000000007)
E = EllipticCurve(K, (a, b))
G = E(0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798, 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8)

D = K(2)

W = E.sextic_twist(D)

# Convert secp256k1 G point to sextic twist curve