Sub topic 7
Hardware wallets and what they protect against
This chapter assumes you know that a wallet manages private keys and signs transactions, that a seed phrase can regenerate those keys, and that a "hot" wallet is connected to the internet while "cold" storage is not. If any of that is unclear, review the chapters on keys, seed phrases, and hot and cold storage first.
What a hardware wallet is
A hardware wallet is a small, dedicated device that generates and stores private keys and signs transactions inside itself. The private key is never sent to the computer or phone it is connected to. The computer sends the device an unsigned transaction. The device shows the details on its own screen, waits for you to confirm with a physical button, signs, and returns only the signature.
This design answers one specific problem. A phone or laptop runs many programs, browsers, and downloads. Any of them might contain malware. If your keys live on that machine, malware can read them. A hardware wallet moves the key to a device that runs very little software and has no general-purpose way to export the key.
A hardware wallet is usually a self-custody tool. You still hold the keys, so you still carry the user-error risks covered elsewhere in this tutorial. It reduces one category of risk (key theft from an infected computer) and leaves others unchanged.
How signing works
The device acts as a signing oracle. It answers one question: "Do you approve this exact transaction?"
Two details matter in practice.
- The app is untrusted. It builds the transaction, so a compromised app can build a malicious one, for example with the attacker's address. The device screen is your check. If you approve without reading it, the device protects nothing.
- The screen is the trusted display. Only what the device shows is guaranteed to match what it will sign. What the computer screen shows is not.
What a hardware wallet protects against
| Threat | Protected? | Why |
|---|---|---|
| Malware that reads keys from your computer or phone | Yes | Keys are never present on the host machine. |
| Malware that silently signs transactions | Yes | Signing needs a physical button press on the device. |
| Phishing sites that ask you to type your seed phrase | Partly | Protects you only if you never type the seed into a computer. |
| Remote attackers who have no access to the device | Yes | The key has no network path out of the device. |
| Someone who steals the device | Mostly | A PIN limits guessing. Many devices wipe after repeated wrong tries. |
| Malware that swaps the destination address on the host | Yes, if you verify | The device screen shows the real address. |
What a hardware wallet does not protect against
Knowing the limits is as important as knowing the benefits.
- Your own approvals. If you confirm a transaction that sends coins to a scammer, the device signs it correctly. It cannot tell a good recipient from a bad one.
- Blind signing. For smart contract interactions, some devices can only show a hash or raw data, not a readable description. If you approve data you cannot read, a malicious contract can drain your tokens. Prefer devices and apps that decode transactions, and be cautious with unlimited token approvals.
- A leaked or badly stored seed phrase. Anyone with the seed phrase can rebuild your keys on another device. The hardware wallet does not protect a seed phrase that you photographed, stored in cloud notes, or typed into a website.
- Loss without a backup. If the device breaks or is lost and you have no seed backup, the coins are gone.
- A compromised supply chain. A device that was tampered with before reaching you can be dangerous.
- Physical coercion. Someone who forces you to unlock the device can make you sign.
Where the key lives: the secure element
Hardware wallets differ in how they protect the key inside the device.
- Secure element chips. These are tamper-resistant chips of the kind used in bank cards and passports. They are designed to resist physical attacks such as probing and voltage glitching. The tradeoff is that the chip designs are often covered by non-disclosure agreements, so the firmware and chip internals are harder for outsiders to inspect.
- General-purpose microcontrollers. These are fully open to inspection, which makes the code easier to audit. They offer less hardware resistance to an attacker with physical access and plenty of time, so a strong PIN and a passphrase matter more.
- Hybrid designs. Some devices combine a secure element with open firmware.
There is no single correct choice. Open designs favor transparency. Secure elements favor resistance to physical extraction. Your threat model decides which matters more. If your main fear is remote malware, any reputable device does the job. If you fear a thief with lab equipment, the chip design matters.
The seed phrase is still the master key
When you set up a device it generates a seed phrase, usually 12 or 24 words, and shows it once. This phrase is a backup of every key the device will ever derive. The device protects the working copy of the key, but the written backup is your responsibility.
Three consequences follow.
- The security of your funds is the lower of two things: the device's protection and your backup's protection.
- A seed phrase generated on a computer, or one that came pre-printed in the box, cannot be trusted. Generate the seed on the device yourself.
- Test your backup. Recover the wallet from the words on a spare device, or with the maker's built-in recovery check, before you put a large amount in.
The optional passphrase
Many devices support an extra passphrase, sometimes called the "25th word". The passphrase is combined with the seed to derive a different set of keys. The same 12 or 24 words with a different passphrase produce a completely different wallet.
This gives two benefits. A thief who finds only the written seed gets an empty wallet or a small decoy balance. And you can keep a hidden wallet behind the passphrase.
It also adds a failure mode. The device does not store the passphrase and cannot tell you it is wrong. It simply opens a different, empty wallet. If you forget the passphrase, the funds cannot be recovered by anyone. Treat the passphrase as a second secret that needs its own backup, stored apart from the seed.
Supply chain and device hygiene
A hardware wallet is only as trustworthy as the path it took to reach you.
- Buy directly from the manufacturer or an authorized reseller. Second-hand devices and marketplace listings carry a risk of tampering.
- Check tamper-evident seals and packaging, and use the maker's authenticity check, which usually verifies that the firmware is signed by the manufacturer.
- Reject any device that arrives already set up, with a seed card filled in, or with a PIN written on a note.
- Update firmware only through the maker's official app, and verify that it is signed.
- Choose a PIN you do not use elsewhere. Do not keep the PIN with the seed.
Hardware wallets in the custody picture
A hardware wallet changes how well you protect your own keys. It does not change who holds them. That is why it appears in this tutorial as a tool within self-custody and not as a third model.
It also combines with other methods. Multisignature setups often use several hardware wallets from different makers, so that one flawed device cannot spend funds alone. Those setups are covered in the multisig chapter. A hardware wallet can also sit beside a custodial account: you keep long-term savings on the device and leave spending money on an exchange.
Practical routine
- Buy from the maker and check the packaging.
- Initialize the device yourself and write the seed on durable material, offline.
- Do a recovery test with a small amount before moving a large one.
- Send a small test transaction first, and compare the address on the device screen to your intended recipient.
- Store the seed backup and the device in separate places.
Exercise
Malware on your laptop changes the recipient address in your wallet app to an attacker's address. You use a hardware wallet. Describe what stops the theft and the one step you must not skip. Then name one threat the device cannot stop even when used correctly.
Show answer
The private key never leaves the device, so the malware cannot sign anything itself. It can only send a changed unsigned transaction to the device. The device shows the real recipient address on its own screen, and signing requires a button press. The step you must not skip is reading and comparing the address on the device screen before approving. If you press confirm without checking, the device signs the attacker's transaction. Threats the device cannot stop include a seed phrase stored in cloud notes, approving a malicious smart contract you cannot read (blind signing), a tampered device bought second-hand, or losing both the device and the seed backup.
Exercise
You set up a hardware wallet with a 24-word seed and a passphrase. Months later you restore from the 24 words on a new device, and the wallet opens with a zero balance. Give the most likely cause and the fix.
Show answer
The passphrase was not entered, or was entered differently (a different spelling, case, or spacing). The same seed with a different or missing passphrase derives a different, empty wallet, and the device does not warn you. The fix is to enter the exact original passphrase during restore. This is why the passphrase needs its own backup, stored separately from the seed.