Post
Topic
Board Development & Technical Discussion
Re: y coordinate calculation (PUBLIC KEY BITCOIN)
by
mausuv
on 19/11/2021, 15:09:46 UTC


script : x from y

Code:
## Input
y = 0x3199555CE45C38B856C9F64AC6DB27000AB6CEA10CAD76B2B6E246C9A020E707

## Field parameters
# Field modulus
p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
# Cube root of 1
beta = 0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee

## Actual code
xcubed = (y*y - 7) % p
print ("xcubed = 0x%x" % xcubed)

x = pow(xcubed, (p + 2) / 9, p)
print ("x1 = 0x%x" % x)
print ("x2 = 0x%x" % (x * beta % p))
print ("x3 = 0x%x" % (x * beta * beta % p))



guys please tell two point subtract example i need


tell easy understand because, i know tow point add and multipliction


but subtract not understand please write example easy math

for example :
2p - 3p = 1p
3000p - 2p = 2998p

c = K(qy-py)/(qx-px)
rx1 = K(c^2-px-qx)
ry2 = K(c*(px-rx))

your example write this method or python code write  #sorrymyBADenglish