Bitcoin Q&A: Public keys vs. addresses

What is the difference between public keys and addresses? How are new addresses generated? How are change addresses generated? Why have two outputs? Do you still pay fees if you are sending bitcoin to new addresses in your own wallet? What is the VanityGen command? What does the SIG_HASH flag do?

More from ‘Mastering Bitcoin’:

These questions are from the MOOC 9.3 and 9.5 sessions which took place on March 2nd and March 16th, 2018 respectively. Andreas is a teaching fellow with the University of Nicosia. The first course in their Master of Science in Digital Currency degree, DFIN-511: Introduction to Digital Currencies, is offered for free as an open enrollment MOOC course to anyone interested in learning about the fundamental principles.

If you want early-access to talks and a chance to participate in the monthly live Q&As with Andreas, become a patron:

Advanced Bitcoin Scripting Part 1: Transactions and Multi-sig –
Advanced Bitcoin Scripting Part 2: SegWit, Consensus, and Trustware –
Reusing addresses –
Airdrop coins and privacy implications –
Wealth distribution statistics –
Mixing services –
How do mnemonic seeds work? –
Using paper wallets –
What is Segregated Witness? –
Spam transactions and Child Pays For Parent (CPFP) –

Andreas M. Antonopoulos is a technologist and serial entrepreneur who has become one of the most well-known and respected figures in bitcoin.

Follow on Twitter: @aantonop

He is the author of two books: “Mastering Bitcoin,” published by O’Reilly Media and considered the best technical guide to bitcoin; “The Internet of Money,” a book about why bitcoin matters.





Subscribe to the channel to learn more about Bitcoin & open blockchains!

Music: “Unbounded” by Orfan (
Outro Graphics: Phneep (
Outro Art: Rock Barcellos (

23 thoughts on “Bitcoin Q&A: Public keys vs. addresses”

  1. Do I have to pay a higher fee when I send 1 output out of various inputs instead of sending 1 transaction from 1 adress?

    Thank you for your answer in advance, I really like your videos!

  2. Especially with Vanity address creation, wont we run out of possible addresses? How many possible addresses can there be.. 58 to the power of 58?

  3. Is it likely that someone could create public / private keys with a CPU array and then scan the blockchain, waiting for a user to move coins to an address where a private key is known?

  4. i have 1 question sir,Suppose transaction A of .5 btcand transaction B of 20 btc. is A and B both transaction will use same mining power if not why the fee is same for both.

  5. Can the vanity addresses be reversed ,I mean finding the private key by using graphic cards to try private keys?

  6. The parent public key, chain code, and the index number are combined and hashed with the HMAC-SHA512 algorithm to produce a 512-bit hash. This 512-bit hash is split into two 256-bit halves. The right-half 256 bits of the hash output become the chain code for the child. The left-half 256 bits of the hash are added to the parent private key to produce the child private key. Why is this last step needed? why not just take left-half 256 bits of the hash as child private key?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.