r =0x0861cce1da15fc2dd79f1164c4f7b3e6c1526e7e8d85716578689ca9a5dc349d
s1=0x6cf26e2776f7c94cafcee05cc810471ddca16fa864d13d57bee1c06ce39a3188
s2=0x4ba75bdda43b3aab84b895cfd9ef13a477182657faaf286a7b0d25f0cb9a7de2
z1=0x01b125d18422cdfa7b153f5bcf5b01927cf59791d1d9810009c70cd37b14f4e6
z2=0x339ff7b1ced3a45c988b3e4e239ea745db3b2b3fda6208134691bd2e4a37d6e1
"""
h1 = r*(s1-s2)
p1 = (z1s2) - (z2s1)
h1 = r*(s1+s2)
p1 = (z1s2) - (z2s1)
h1 = r*(-s1-s2)
p1 = (z1s2) - (z2s1)
h1 = r*(-s1+s2)
p1 = (z1s2) - (z2s1)
h1 = r*(s1-s2)
p1 = (z1s2) + (z2s1)
h1 = r*(s1+s2)
p1 = (z1s2) + (z2s1)
h1 = r*(-s1+s2)
p1 = (z1s2) + (z2s1)
"""
r =0x0861cce1da15fc2dd79f1164c4f7b3e6c1526e7e8d85716578689ca9a5dc349d
s1=0x6cf26e2776f7c94cafcee05cc810471ddca16fa864d13d57bee1c06ce39a3188
s2=0x4ba75bdda43b3aab84b895cfd9ef13a477182657faaf286a7b0d25f0cb9a7de2
z1=0x01b125d18422cdfa7b153f5bcf5b01927cf59791d1d9810009c70cd37b14f4e6
z2=0x339ff7b1ced3a45c988b3e4e239ea745db3b2b3fda6208134691bd2e4a37d6e1
h1 = r*(s1-s2)
p1 = (z1*s2) - (z2*s1)
h1 = r*(s1+s2)
p1 = (z1*s2) - (z2*s1)
h1 = r*(-s1-s2)
p1 = (z1*s2) - (z2*s1)
h1 = r*(-s1+s2)
p1 = (z1*s2) - (z2*s1)
h1 = r*(s1-s2)
p1 = (z1*s2) + (z2*s1)
h1 = r*(s1+s2)
p1 = (z1*s2) + (z2*s1)
h1 = r*(-s1+s2)
p1 = (z1*s2) + (z2*s1)
h1 = r*(-s1-s2)
p1 = (z1*s2) + (z2*s1)
print(hex((p1 *inverse_mod(h1, p)) % p))
h1 = r*(-s1-s2)
p1 = (z1s2) + (z2s1)
print(hex((p1 *inverse_mod(h1, p)) % p))output:
output:
0xe773cf35fce567d0622203c28f67478a3361bae7e6eb4366b50e1d27eb1ed82e
0xe773cf35fce567d0622203c28f67478a3361bae7e6eb4366b50e1d27eb1ed82e