How to generate private keys and public keys

With the private key, a public key is generated. Perform this step by passing the private key that was generated to the privtopub function, as shown here:

# Generate Public Key
my_public_key = privtopub(my_private_key)
print("Public Key: %s " % my_public_key)

Now, with the public key, generate a bitcoin address. Do this by passing the public key that is generated to the pubtoaddr function:

# Create a bitcoin address
my_bitcoin_address = pubtoaddr(my_public_key)
print("Bitcoin Address: %s " % my_bitcoin_address)

The following screenshot shows the private key, public key and bitcoin address that is generated:

Bitcoin address
A bitcoin address is a single-use token. Just as people use email addresses to send and receive emails, you can use this bitcoin address to send and receive bitcoins. Unlike email addresses, however, people have many different bitcoin addresses, and a unique address should be used for each transaction.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.24.30