Skip to main content

How Do Hardware Wallets Work? Keys, Signing and Setup Explained

A hardware wallet keeps your private keys on a dedicated chip and signs transactions inside the device. How signing, PINs, seeds and passphrases work.

· By ZIPMEX · 15 min read

A hardware wallet is a small dedicated device that creates and stores your private keys. It uses them to sign transactions inside the device. Your computer or phone builds an unsigned transaction and passes it to the wallet. You check the details on the wallet's own screen and approve with a button. Only the signature goes back out. The coins themselves stay on the blockchain. The device holds the keys that control them, and a written recovery phrase can rebuild those keys if the device is lost.

What a hardware wallet actually stores

A hardware wallet holds no coins. Balances are recorded on the blockchain. The device stores the private key material that proves you control an address and lets you authorise spending from it.

Most wallets derive all their keys from one master seed defined by the BIP-39 standard. BIP-39 turns random data into a mnemonic sentence of 12, 15, 18, 21 or 24 words, chosen from a list of 2,048 words. The seed is then computed from that sentence with PBKDF2 (HMAC-SHA512, 2,048 iterations). The salt is the word "mnemonic" plus an optional passphrase. Whoever has the words, plus the passphrase if one is set, can rebuild every key on any compatible wallet.

That is why the recovery phrase matters more than the device. Lose the device and you can restore from the phrase. Lose both and nobody can recover the funds. Ledger's support documentation says this directly: without the recovery phrase, access to the assets is impossible, and Ledger cannot retrieve the phrase or the PIN for you.

How signing works, step by step

  1. You build the transaction on your computer or phone. In the companion app (Trezor Suite, Ledger's app, or a compatible third-party wallet) you enter the recipient, the amount and the fee.
  2. The unsigned transaction goes to the device. It travels over USB, Bluetooth on some models, or QR codes on air-gapped designs. For Bitcoin, BIP-174 (the Partially Signed Bitcoin Transaction format, PSBT) was written so that "offline signers such as air-gapped wallets and hardware wallets" receive everything they need to sign without a network connection.
  3. You check it on the device's screen. The wallet shows the address and amount it is actually about to sign. This screen is the part your computer cannot alter.
  4. The device signs internally. The private key is used inside the device and never leaves it.
  5. The signature comes back and the app broadcasts it. The app sends the signed transaction to the network.

Step 3 is where most of the protection comes from. Trezor's guidance warns that malware on a computer can swap a copied address, so the sender pays an attacker instead. Compare every character of the address on the device, not just the first and last few. If the address on the device does not match the one on your computer, Trezor says not to send, and to treat the computer as compromised.

The security layers

Secure element chip

Many current models keep keys in a secure element, a tamper-resistant chip certified under Common Criteria. Ledger lists the Nano X's ST33J2M0 chip as CC EAL5+. Trezor lists the Safe 3 as having an EAL6+ certified chip. Older Trezor models (Model One and Model T) have no secure element. On those, the PIN directly encrypts the stored keys, and Trezor recommends a long, random PIN as the main defence against physical attacks.

PIN and wipe limits

The PIN is entered on the device and protects it if stolen. After too many wrong attempts the device erases itself:

  • Ledger: resets after three incorrect PIN entries. When restoring, you set a new PIN of 4 to 8 digits.
  • Trezor: PINs of 4 to 50 digits. The wallet is erased after 16 wrong attempts on the Safe 3 and Safe 5, and after 10 on the Safe 7.

A wiped device is not lost money. You restore from the recovery phrase.

Optional passphrase

A BIP-39 passphrase adds a secret word to the seed. Each different passphrase opens a different wallet. Trezor notes that there is no "incorrect" passphrase: a typo simply opens a new, empty wallet. The passphrase is not stored on the device, and if you forget it, the funds in that wallet are gone for good. It protects you if someone finds your written words. It also adds a second secret you must back up separately.

Firmware integrity and open source

Trezor says its official firmware is signed by the SatoshiLabs master key. Unofficial firmware wipes the device's storage and triggers a warning at every startup. Trezor publishes its design and firmware as open source. Ledger publishes most of its software but keeps parts of the secure element's firmware closed. It cites its agreement with chipmaker STMicroelectronics and says those parts are audited by third parties.

Can you still reach your coins?

Answer a few questions about what happened to your hardware wallet to see whether your recovery words can restore it.

  1. What happened to your hardware wallet?

    • It was lost, broken or stolen → next question
    • It wiped itself after too many wrong PINs (3 on Ledger; 16 on Trezor Safe 3 and Safe 5, 10 on Safe 7) → next question
    • The address on the device screen does not match the one on my computer → Do not send
    • A website or someone claiming to be support wants my recovery phrase → Never share the words
  2. Do you still have your written recovery words, in order?

  3. Did you set an optional BIP-39 passphrase on this wallet?

  4. Do you know the passphrase exactly, character for character?

Restore from your recovery words

A lost or wiped device is not lost money. Restore the wallet on a new compatible device from your recovery words, then set a new PIN on the device.

Restore with the words and the same passphrase

Enter the recovery words, then the same passphrase. There is no 'incorrect' passphrase: a typo simply opens a new, empty wallet, so an empty balance usually means the passphrase was not typed exactly.

The passphrase wallet cannot be opened

The passphrase is not stored on the device, and each different passphrase opens a different wallet. Your words alone still restore the wallet without a passphrase, but funds held in the passphrase wallet are gone for good if the passphrase is forgotten.

The funds cannot be recovered

Without the recovery words, nobody can rebuild the keys. Ledger says access to the assets is then impossible and it cannot retrieve the phrase or the PIN for you.

Do not send

Trezor says not to send if the address on the device does not match the one on your computer, and to treat the computer as compromised. Malware can swap a copied address so you pay an attacker.

Never share the words

No device helps if you type the recovery words into a website or read them to someone claiming to be support. Ledger says it will never ask for your recovery phrase.

This covers only restoring access and the warning signs the article describes: it cannot check whether your words or device are genuine, recover stolen funds, or reflect wipe limits on models and firmware not named here.

What a hardware wallet does not protect against

  • Approving a malicious transaction. The device signs whatever you confirm. On 14 December 2023, an attacker published malicious versions (1.1.5 to 1.1.7) of the Ledger Connect Kit library to npm, after phishing a former employee's account. The code was injected into decentralised application front ends, and users who signed the resulting transactions were drained. Ledger's report frames this as a signing-flow problem rather than a device compromise. Its fixes included promoting "clear signing" on the device's display and removing blind signing as an option.
  • Giving away your recovery phrase. No device helps if you type the words into a website or read them to someone claiming to be support. Ledger says it will never ask for your recovery phrase. See our guide to spotting crypto scams.
  • Tampered or fake devices. Trezor warns of swapped devices, including fakes that could send your PIN to an attacker. Buy from the manufacturer or an authorised reseller, check that the packaging seals and holograms are intact, and run the maker's authenticity check during setup.

The threat is real for individuals. Chainalysis counted 158,000 personal-wallet theft incidents in 2025, affecting at least 80,000 unique victims. Stolen value from individuals fell to $713 million, down from $1.5 billion in 2024.

Setting one up

  1. Buy new, from the manufacturer or an authorised reseller. Do not use a second-hand device, or one that arrives with a recovery phrase already printed or filled in.
  2. Install the official companion app from the maker's own website.
  3. Create a new wallet on the device. The keys are generated on the device. Never restore from words that someone else supplied.
  4. Write down the recovery words in order, on paper or a metal backup, and confirm them when the device asks. Never photograph them or store them in a cloud note.
  5. Set a PIN on the device. Avoid birthdays and sequences like 12345.
  6. Consider a passphrase, but only if you will back it up separately from the words.
  7. Send a small test amount first, verifying the receive address on the device screen.

To use decentralised applications, you can connect a hardware wallet to a browser wallet. MetaMask supports Ledger and Trezor through its Hardware Wallet Hub. Only EVM-based Ledger accounts can be connected, and every signature still needs the device to be present.

Choosing a device

Compare specs on the manufacturers' own pages:

Ledger Nano XTrezor Safe 3
Secure elementST33J2M0, CC EAL5+Certified chip, EAL6+
ConnectionBluetooth (BLE 5.2), USB-CUSB-C only
FirmwarePartly closed (secure element)Open source
Wrong-PIN wipeAfter 3 attemptsAfter 16 attempts
Listed priceNot shown when checked$59 (trezor.io, October 2026)

For more on Trezor's range, see our Trezor guide.

Frequently asked questions

Can a hardware wallet be hacked?

Remote theft of the keys is much harder because they never leave the device. Users still lose funds by approving malicious transactions, revealing their recovery phrase, or using a tampered device. Researchers have also demonstrated physical attacks on some models, which is why PIN wipe limits and secure elements exist.

What happens if I lose the device?

Restore your wallet on a new compatible device from your recovery words, plus your passphrase if you set one. Without the words, the funds cannot be recovered.

Is a hardware wallet the same as a cold wallet?

"Cold" means the keys are kept off internet-connected machines. A hardware wallet is the most common form of cold storage. Paper backups and air-gapped computers also count.

Hardware wallet or paper wallet?

A paper wallet is a printed key with no PIN, no screen to verify addresses, and no protection once someone sees it. A hardware wallet adds on-device signing, a trusted display and PIN protection.

Limitations: features, prices and wipe limits change with new models and firmware, so check the manufacturer's current documentation before you buy. This article is not investment advice.

Updated on Oct 25, 2026