\ What is a bitcoin wallet and how does it work? | BitReview

What is a Bitcoin Wallet?

By: David Marc
Updated: May 21, 2018

When you think of a wallet you most likely think of a folding slab of leather with slots to store cash, credit cards, IDs, and various half-filled “10 stamps for a Free Sub!” tickets.  While a bitcoin wallet does indeed share the name ‘wallet’ with that thing in your pocket, you cannot just stuff bitcoin into it. Bitcoin is a digital string of random numbers it has no physical form!  So what exactly is a bitcoin wallet then, and how does it hold bitcoin?

Actually, a bitcoin wallet does not really hold the bitcoin, at least not the way we usually visualize holding something.  A bitcoin wallet is more or less a program designed to create a pair of cryptographic keys, one private, the other(s) public.  The public address may only be unlocked by its private key, sort of like a key and it’s corresponding door lock. However, unlike with a door lock, if you lose your key you cannot simply call a locksmith to bust you in.  You would be locked out forever!

Public Keys

This is what a bitcoin address looks like – and feel free to send money to it, because it is one of my addresses.  Please, I have children to feed.

38LmAVDDvfevyeBzrtPEhwdpnEuecf5K3T

Bitcoin itself is actually composed of these same addresses!  If you were to look at a bitcoin on your computer, you would see a string of these different addresses, each address representing a different stop on bitcoin’s transactional journey, the last address representing bitcoin’s current location.  Hopefully in your public address! The private key that is associated with the last public address on a bitcoin string is the only key that can unlock that bitcoin. Hold that key and you hold the bitcoin.

Private Keys

A private key is a series of 64 characters representing a number between 0-9 and letters between A-Z.  It looks something like this:

33423E34DAD43DDS39645CDA754CFE3286CBEBAEF534AB543BDFD656CDAA3B21

Most wallets now generate this number from a list of ~2400 words, randomized into a series of 12 or 24 relatively easy mnemonic phrases.  Those words might look something like this:

Horse Dog Flying Green Straight Forest Walk Bleach Error Baby Sunshine Sorry

When you type those words into a compatible wallet, the wallet applies a standard cryptographic process to the words to generate the private address – which of course can access all corresponding public addresses, and the associated bitcoin. Remember your mnemonic and you hold your entire history.

Deterministic Wallets

Back in the bad old days wallets generated one public address for every private key.  This meant users had to compromise between privacy, as the use of one public address would mean an entirely public display of your wallet, or convenience/security, as creating more than one address meant creating multiple private keys, requiring more complicated storage and management.  

Bitcoin developer superstar Peter Wuille’s bitcoin improvement proposal (BIP) 32 introduced a new type of wallet known as the hierarchical deterministic wallet, HD for short.  HD wallets allow the generation of limitless public addresses, each associated to the same private key. Any wallet worth its salt is HD and will automatically generate a new public address for each inbound transaction.  This is a very important aspect from a privacy perspective, as the network cannot associate different public addresses to the same recipient without the private key. (Though with some detective work – checking IPs, the sending address, etc. –  internet sleuths can sometimes connect the dots.)

When you combine this HD wallet logic with the mnemonics, it means you can restore all your public addresses, your entire transaction history, and of course access to all your bitcoin, simply by inputting the 12 word phrase into a compatible wallet.  

Now that you have got the basics, check out how to pick a bitcoin wallet to get yourself started.