• Wallets are software apps which generate and store keys used to send and receive bitcoin.
  • Wallets can be backed up by storing the 12-24 word recovery phrase given by the wallet at inception.
  • This recovery phrase allows ultimate recovery of all funds within a wallet, so they must be protected against loss and theft.

How Do Bitcoin Wallets Work?

Private and Public Keys

Cryptographic key pairs are used to send and receive Bitcoin. A key pair is comprised of a private key and a corresponding public key. Private keys are used for sending bitcoin and must be kept secret. Public keys are used for receiving bitcoin and can be shared with anyone. Public keys are derived directly from a corresponding private key.

Bitcoin wallets contain a user’s keys, not bitcoin. Conceptually, a wallet is like a keychain in the sense that it holds many pairs of private and public keys. These keys are used to sign transactions, allowing a user to prove they own transaction outputs on the blockchain, i.e. their bitcoin. All bitcoin is recorded on the blockchain in the form of transaction outputs.

Key Generation

When you create your bitcoin wallet, a seed is created. Seeds are displayed in the form of a series of words, known as mnemonic code words. This seed is used to derive every individual bitcoin key that you’ll use to send and receive bitcoin. This is known as a Hierarchical Deterministic (HD) framework, which is industry standard for bitcoin key generation and management. Many wallets will automatically create a new public key when you want to receive Bitcoin.

If you use the same public key every time you received bitcoin, it would become trivial for anyone to track your entire payment history. This method of treating keys as single use tokens greatly improves a user’s privacy.

Addresses vs. Public Keys

Public keys are often conflated with addresses. An address is derived directly from a public key (through a hashing algorithm), and almost all wallets and transactions will display addresses rather than public keys. However, behind every address is a public key.

Backing Up Your Bitcoin Wallet

As long as a user has the recovery seed, typically a 12 or 24 word list that was initialized with their wallet, they will always be able to restore their wallet.

While many addresses are created as you send and receive bitcoin, you only need to backup your wallet once. Because an HD wallet creates addresses deterministically using the same seed, all of your addresses can be backed up using the mnemonic word representation of that seed, known as a recovery phrase.

Likewise, if your recovery phrase is exposed to someone, they have the ability to steal all of your funds. Keeping the recovery phrase safe from strangers and ensuring you do not lose or forget it are equally important.