From what i understand private is a point on the Elliptic curve and a public key is x,y
co-ordinates on the curve therefore showing them on the graph should be easy to those who knows how to code.
The below code shows the graph using python
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = [7.50, 3.50]
plt.rcParams["figure.autolayout"] = True
x = [3, 1, 2, 5]
y = [5, 2, 4, 7]
plt.plot(x, y, 'r*')
plt.axis([0, 6, 0, 20])
for i, j in zip(x, y):
plt.text(i, j+0.5, '({}, {})'.format(i, j))
plt.show()
I need to do the same but with Elliptic curve and x,y
co-ordinates of public key.
My goal is to find the relationship between 2 public key with bitcoin addresses that share the 8 first characters, so it would be easy if i see them on a curve.
i have read Scalar multiplication HERE
can someone show me how to show public and private key on the curve using python?
The below code is a sample from HERE
import numpy as np
import matplotlib.pyplot as plt
def main():
a = -1
b = 1
y, x = np.ogrid[-5:5:100j, -5:5:100j]
plt.contour(x.ravel(), y.ravel(), pow(y, 2) - pow(x, 3) - x * a - b, [0])
plt.grid()
plt.show()
if __name__ == '__main__':
main()
I am still learning python.