Private:
8ac7230489e80000
Public:
041330daea0d10ec59a9f65dedd79651fad3388a2f16738678c2a1c67077038dab0e909efa28690 12fc532b4552ae7400c8760113b2fcc6f76b71a7077d43a5f9f
How can I get the format 1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm (public key) and 5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf (private key) ?
Try this:
from binascii import hexlify
def getKeys(secretNumber):
pubKey = Public_key(generator_secp256k1,generator_secp256k1*secretNumber)
formattedPubKey = hexlify('\x04'+int_to_string(pubKey.point.x())+int_to_string(pubKey.point.y()))
formattedPrivKey = hex(secretNumber)[2:-1]
return (formattedPrivKey, formattedPubKey)
If you don't have python-ecdsa installed, you can
get it here: https://github.com/warner/python-ecdsa