Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import random
- priv_key = random.getrandbits(256)
- print("Private Key is:", hex(priv_key))
- G = {
- 'x': 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,
- 'y': 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8
- }
- print("G point is:", G)
- pub_key = {
- 'x_pub': G['x'] * priv_key,
- 'y_pub': G['y'] * priv_key
- }
- print("Public Key is:", pub_key)
- print("x Public Key in Hex:", hex(pub_key['x_pub']))
- print("y Public Key in Hex:", hex(pub_key['y_pub']))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement