Anatomy of a Bitcoin Wallet

Anatomy of a Bitcoin Wallet

12/31/25By Tomás MamedeReading time: 10 minutes

What is a Bitcoin wallet?

A Bitcoin wallet can be conceptualized as a collection of addresses controlled by the same keys. The app each bitcoiner uses day to day is simply an interface—or a coordinator—that helps generate addresses, check balances, and build transactions.


The starting point: Entropy

To create keys securely, the starting point is entropy, which can be thought of as randomness. High-quality entropy matters because weak randomness can lead to predictable keys and loss of funds.

Entropy can be generated using specialized software or an offline device, such as a hardware wallet, which helps prevent mistakes and reduce exposure to internet-connected environments.


From entropy to the recovery phrase

Entropy (a large random number) is critical information to store and protect. If it is lost and there is no backup stored elsewhere, access to the bitcoins controlled by those keys can be lost forever.

A recovery phrase for a private key is a set of words that represents the entropy. Recovery phrases are created by expressing the entropy in binary code (bits: 0s and 1s). Generally, a 128-bit recovery phrase produces 12 words, and a 256-bit recovery phrase produces 24 words.


Recovery phrase and storage

The recovery phrase represents the entropy and must be kept secret. If someone obtains it, they can derive the private keys it generates and gain permanent ability to spend the bitcoin from the wallets protected by that recovery phrase.

Best practices say the recovery phrase should always be generated and stored offline—i.e., written on paper or engraved in metal. In addition, storing it in digital form should be avoided, except on a device made specifically to protect it from internet exposure, as is the case with hardware wallets.


Master private key

A master private key (often simply called a private key) is a string of alphanumeric characters used to apply cryptographic signatures to transactions that spend bitcoin. The master private key is created from the recovery phrase through a series of cryptographic hashing operations. The master private key is as sensitive as the recovery phrase, so sharing it with someone gives that other person total or partial control over the funds.


Hot keys vs. cold keys

After a cold wallet (hardware wallet) derives the master private key from the recovery phrase, that key remains offline and stored only on that device. On the other hand, if a private key is generated or stored on an internet-connected device, it is considered a hot key (hot wallet), which is substantially less secure.


Extended public key (xpub) and wallet construction

With the master private key, the next step is to generate an extended public key. This key is a string of alphanumeric characters that serves as the main ingredient for building the wallet’s structure.

In this way, the master private key can create several different xpubs, which means it can be associated with several different wallets. A single xpub is enough to create a single-signature (singlesig) wallet where only one private key is needed to authorize spending bitcoin. By contrast, combining xpubs from different master private keys is how a multi-signature (multisig) wallet is created.


Derivation paths

Since a master private key can create multiple xpubs, the question becomes which is which. That is determined by the derivation path, which can be seen as the path of instructions that leads to a particular set of keys. Sometimes the user chooses the derivation path. Other times, the software chooses automatically.


What xpubs cannot do

An xpub cannot approve spending funds the way a private key can. Instead, xpubs are used to generate information to receive bitcoins (addresses) and to verify the wallet balance.

This makes xpubs less sensitive from a security standpoint compared to recovery phrases and private keys, but they can still be sensitive from a privacy standpoint, since they reveal the wallet’s structure and activity.


Why do wallets have multiple addresses?

An xpub can create millions of public keys. While the xpub is responsible for building the wallet, a single public key is the main ingredient used to create an address. That is why a wallet consists of multiple addresses.

Thus, a public key is as sensitive as an address, which means it is shared to receive Bitcoin.


Address types

An address is a string of alphanumeric characters used to receive Bitcoin. The recipient provides the address to the sender in order to specify the destination of the payment.

There are several types of addresses (P2PKH, P2WPKH, etc.). For singlesig wallets, an address is created from a public key by applying SHA-256, RIPEMD-160, plus a prefix and a checksum at the end.


Privacy: Why not reuse addresses

Sharing addresses is required to receive Bitcoin, but once an address is shared, anyone can monitor deposits or payments to that address and check the current balance.

For better privacy, it is best practice to use a new address for each deposit to a wallet. Beyond the privacy impact, address reuse increases the cryptographic exposure of the corresponding public key. Although the algorithms currently used by Bitcoin are considered secure, repeated exposure of the same key increases the surface available for analysis for potential cryptographic attacks.

For that reason, generating a new address for each receipt is a fundamental operational security practice. This approach reduces the ability to correlate transactions, preserves user privacy, and maintains a more robust cryptographic safety margin over time.