Sub topic 2
Keys, Addresses, and What a Wallet Really Holds
Assume you know that public and private keys are related by cryptography and that a blockchain records transactions. This chapter adds the practical model: a wallet usually does not contain coins. It manages keys that authorize transactions.
Private keys authorize spending
A private key is a secret number generated with secure randomness. Whoever controls it can create a valid digital signature for its funds. The network checks the signature against the corresponding public key before accepting a transaction.
A public key is derived from the private key. An address is usually a shorter, encoded identifier derived from public-key data or from a script describing spending conditions. You can share an address. You must keep the private key secret.
The relationship is one-way for practical purposes:
- A wallet generates or restores a private key.
- The private key produces a public key.
- The public key or a spending script produces an address.
- A transaction uses the private key to create a signature.
- Network nodes verify the signature without learning the private key.
What a wallet stores
A non-custodial wallet stores private keys or the information needed to recreate them. Modern wallets often use a hierarchical deterministic design. One random seed produces a tree of many keys and addresses. A seed phrase is a human-readable backup for that seed.
The phrase is not an account password. Anyone who obtains it can usually recreate the wallet on another device and spend its funds. A wallet application may also store public addresses, transaction history, network settings, and encrypted key data.
| Item | Can you share it? | Main purpose |
|---|---|---|
| Address | Yes | Receive funds |
| Public key | Usually | Verify signatures or derive addresses |
| Private key | No | Authorize spending |
| Seed phrase | No | Restore the wallet and its keys |
A hardware wallet keeps signing keys in a device designed to resist extraction. It displays transaction details and signs internally. This reduces exposure to malware, but it does not protect you from approving a fraudulent transaction or losing the backup.
Bitcoin and Ethereum use different records
Bitcoin commonly uses the unspent transaction output model, or UTXO model. A payment creates outputs locked by conditions. The wallet tracks which outputs it can spend and selects them as inputs for a new transaction. Change usually returns to a new address controlled by the same wallet.
Ethereum uses an account model. An externally owned account has an address, a balance, and a transaction sequence number called a nonce. The private key authorizes transactions from that account. Smart contracts also have accounts, but contract accounts follow program rules instead of holding a private key.
The same seed phrase does not guarantee the same addresses across every network or wallet. Different derivation paths, standards, and account types can produce different results. Verify the network and address before sending funds.
Privacy and custody
Address reuse can reveal that several payments belong to one user. Wallets often generate fresh receiving addresses, especially for Bitcoin. This improves privacy but does not make transactions anonymous.
A custodial exchange holds the private keys for you. You receive an account claim rather than direct key control. Custody can simplify recovery and trading, but withdrawals can be blocked by outages, policy decisions, insolvency, or regulation. Non-custodial control removes that intermediary and makes backup and transaction verification your responsibility.
Exercise
You receive Bitcoin at an address shown by your wallet. What does the wallet need to spend it later?
Show answer
It needs the private key, or a recoverable backup such as the wallet's seed, and it must construct a transaction that satisfies the output's spending conditions.