Switch between secp256k1 and secq256k1 - vjudeu/curves1000 GitHub Wiki
Switching between two curves:
d1=0x7b960bba19d8f574817b5b9fa155cb7f773f268e68feb1cc53e5a4245bd91e1b
d2=0xb82ea11a4bcaea112d8ccd07e6ccb2c43c0969df64ded8edb63766f4fe8e7723
d3=0xcc3b532b9a5c207a50f7d75877dd81b9c215295f90b3b5bd7587b2004604ed44
d4=0x146d3b65add9f54ccca28533c88e2cbc63f7443e1658783ab41f8ef97c2a10b5
d5=0x1fe1e5ef3fceb5c135ab7741333ce5a6e80d68167653f6b2b24bcbcfaaaff507
d6=0xcbb0deab125754f1fdb2038b0434ed9cb3fb53ab735391129994a535d925f673
counter=0
while counter<10:
p=0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
K=GF(p)
a=K(0)
b=K(7)
E=EllipticCurve(K,(a,b))
G=E(0x146d3b65add9f54ccca28533c88e2cbc63f7443e1658783ab41f8ef97c2a10b5,0x1)
h=1
E.set_order(0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141*h)
P1=d1*G
P2=d2*G
P3=d3*G
print(hex(P1[0]),hex(P1[1]))
print(hex(P2[0]),hex(P2[1]))
print(hex(P3[0]),hex(P3[1]))
p=0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
K=GF(p)
a=K(0)
b=K(7)
E=EllipticCurve(K,(a,b))
G=E(0x7b960bba19d8f574817b5b9fa155cb7f773f268e68feb1cc53e5a4245bd91e1b,0x1)
h=1
E.set_order(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f*h)
P4=d4*G
P5=d5*G
P6=d6*G
print(hex(P4[0]),hex(P4[1]))
print(hex(P5[0]),hex(P5[1]))
print(hex(P6[0]),hex(P6[1]))
d1=P4[0]
d2=P5[0]
d3=P6[0]
d4=P1[0]
d5=P2[0]
d6=P3[0]
counter+=1
Note: https://docs.rs/ark-secq256k1/latest/ark_secq256k1/
This is the proper generator for secq256k1:
p=0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
K=GF(p)
a=K(0)
b=K(7)
E=EllipticCurve(K,(a,b))
G=E(0x76c39f5585cb160eb6b06c87a2ce32e23134e45a097781a6a24288e37702eda6,0x3ffc646c7b2918b5dc2d265a8e82a7f7d18983d26e8dc055a4120ddad952677f)
h=1
E.set_order(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f*h)
d=0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffe18
P=d*G
print(hex(d))
print(hex(P[0]),hex(P[1]))