Sub topic 2
Cold wallets: slow and sheltered
This chapter assumes you know that a public key derives an address, a private key signs transactions, and a wallet holds keys rather than coins. You should also have sent crypto from a wallet app before.
What makes a wallet cold
A cold wallet keeps its private keys on a device or medium that never connects to the internet. Signing happens offline, and the network receives only the finished, signed transaction. Because the key never leaves the offline device, malware on your laptop cannot copy it.
The cost is friction. Each spend requires moving data between an online machine and the offline signer, which takes minutes instead of seconds.
Seed phrases and how to back them up
Most cold wallets derive all their keys from a seed phrase, a list of 12 or 24 words. Anyone who holds those words can rebuild every key, so the phrase is effectively the wallet.
Common errors:
- Storing a photo or cloud note of the phrase. Photo libraries and cloud sync copy it to places you do not control.
- Keeping a single copy. A fire or flood can destroy it.
- Never testing the backup. A copied word with a typo can make the backup useless.
Write the words on paper or metal, keep two copies in separate places, and restore the wallet on a second device with a small amount of funds before you trust it.
def check_seed_phrase(phrase: str) -> bool:
words = phrase.lower().split()
if len(words) not in (12, 24):
return False
return all(w.isalpha() for w in words)
print(check_seed_phrase("word " * 12)) # True
print(check_seed_phrase("only five words here")) # FalseHardware wallets in practice
A hardware wallet is a small device that generates and stores keys internally and signs a transaction only after you approve it on its own screen. It works as a practical cold wallet. The key stays inside the device, and the connected computer relays only unsigned and signed data.
| Setup | Where the key lives | Typical use |
|---|---|---|
| Paper seed only | Offline, no device | Long-term savings |
| Hardware wallet | Inside the device | Regular spending with cold-level key safety |
| Software hot wallet | Phone or computer | Small daily balance |
Exercise
Your seed phrase is saved as a photo on your phone. Why is that risky, and what should you do?
Show answer
Phone photos sync to cloud services and can be read by malware or by anyone who unlocks the phone. Copy the words to paper or metal, store two copies apart, delete the photo, and run a restore test.