Book a free call

How to Design a Cold Wallet Architecture

A cold wallet architecture keeps keys offline: a secure element holds them, a screen shows what is signed, and no connected computer can fake the signing step.

Hertiv engineering teamReviewed by a senior engineer
8 min read
How to Design a Cold Wallet Architecture
On this page

Short answer

A cold wallet architecture is the design of a wallet that keeps private keys offline: keys are created and stored inside a secure element, transactions are signed on the device itself, and only the signed result ever reaches a connected computer. The design makes theft hard even if the computer is compromised, because the key never leaves the device and every signing step is shown on the device screen first.

What is a cold wallet architecture?

A cold wallet architecture is the design of a wallet that keeps private keys offline: the hardware that holds the keys, the firmware that runs on it, and the signing flow that moves transactions between the device and a connected computer without ever exposing a key.

The idea is simple to state and hard to get right. The private key is created on the device, stored in a chip that resists extraction, and used only inside that chip. A connected computer prepares a transaction, the device shows the details on its own screen, the owner confirms them, and the device returns only the signed transaction for broadcast.

That separation is what makes cold storage different from a wallet app. A wallet app keeps keys on a general-purpose computer or phone, where other software can reach them.

A cold wallet puts the keys behind hardware and a screen the computer cannot control, so a compromised computer can lie about what it shows but cannot sign without the owner seeing the real details on the device. The user-level view is covered in what a cold wallet is, while this article is about the design behind it.

What parts does a cold wallet have?

A cold wallet has six parts, and each one guards a different step between the key and the outside world. The table shows what each part does and what breaks when it is weak.

PartWhat it doesWhat breaks if it is weak
Secure elementCreates and stores keys in a tamper-resistant chipKeys can be read out of the device
Main processorRuns the firmware and talks to the outside worldA bug can reach the key or the screen
Screen and buttonsShows what is being signed and takes the owner approvalThe owner cannot tell what they are signing
TransportMoves unsigned and signed data by USB, QR code or cardUnsigned data can be swapped in transit
Firmware and bootloaderRuns the wallet and checks updates before installing themA bad update can change signing behaviour
Backup materialThe recovery phrase or shares that restore the keysOne lost copy can mean lost funds

The most important boundary is between the secure element and everything else. The main processor asks the secure element to sign, and the secure element signs only after the owner has approved what is on the screen. If the main processor is compromised, it can ask for signatures, but it cannot read the key and it cannot change what the screen shows.

How are keys created and stored?

Keys are created inside the secure element from randomness produced on the device, and they never leave it. The device generates the seed from a hardware random source, derives the keys from that seed, and stores them in the secure element memory. No copy of the key is written to the main processor, to a file, or to any connected computer.

The owner backup is the recovery phrase, usually 12 or 24 words, written on paper or metal and stored away from the device. The phrase is shown once, on the device screen, during setup. Some designs split the backup into shares, so several parts must be brought together to restore the wallet; losing one share does not lose the funds.

A passphrase adds a second layer: the same seed plus a different passphrase produces a different wallet, so the passphrase acts as an extra word the owner remembers.

The design should also plan for key rotation and for what happens when a device is lost or suspected of being tampered with. The answer is always the same: restore from the backup onto a new device from the maker, and move the funds if the old device cannot be trusted.

How does offline signing work?

Offline signing works by keeping the key on the device and moving only data, never the key, between the device and the connected computer. The flow has four steps, and the device screen is the check at the middle of it.

First, the connected app prepares an unsigned transaction with the recipient, the amount and the fee. Second, that unsigned data moves to the device by USB, QR code or memory card. Third, the device shows the recipient and amount on its own screen and waits for the owner to confirm with the physical buttons. Fourth, the device signs inside the secure element and returns only the signed transaction, which the app broadcasts.

The screen check is the part that stops most attacks. A compromised computer can prepare a transaction to a different address and show the owner a fake one on the computer screen, but it cannot change what the device screen shows. The rule for owners is simple: trust the device screen, not the computer screen. The signing steps are also covered in the guide to setting up a cold wallet.

Multisignature setups add a second device to the same flow, as explained in what a multisignature wallet is.

How do firmware updates stay safe?

Firmware updates stay safe because the device only installs code signed by the maker, and the bootloader checks that signature before the new code runs. The update arrives over the same transport as transactions, but it is treated as a different kind of data: it is verified first, and it cannot run until the check passes.

The bootloader is the small program that starts the device, and it holds the maker public key used to check updates. If the signature does not match, the device refuses the update and keeps running the old firmware. Good designs also prevent rollback: once a version with a security fix is installed, the device refuses to install an older version that still has the flaw.

Updates should never touch the keys. The secure element keeps the keys through an update, and the update process should be tested so a failed install leaves the device working on the old firmware rather than bricked. Owners should only ever install updates from the maker own app or site, and the device should warn clearly if an update arrives from an unexpected source.

How do you build a cold wallet in 6 steps?

You build a cold wallet by starting with the key boundary and working outward, testing the signing flow against attacks at each step.

  1. Choose the secure element. Pick a chip that creates and stores keys internally and resists physical extraction.
  2. Separate the processors. Keep signing in the secure element and let the main processor handle only the screen, buttons and transport.
  3. Design the signing flow. Unsigned data in, screen check, physical confirmation, signed data out, and nothing else.
  4. Build the backup. Recovery phrase shown once on the device screen, plus shares or multisignature for shared funds.
  5. Lock down updates. Signed firmware, a bootloader that checks the signature, and no rollback to older versions.
  6. Test the attacks. Try a swapped address, a fake update, a lost device and a stolen backup, and check each one fails safely.

Test with small amounts on a live chain before anyone trusts the device with real funds, and repeat the tests after every firmware change. The setup steps for owners are covered in how to set up a cold wallet.

Example (hypothetical): a team designs a signing flow

Example (hypothetical): a small team is building a hardware wallet for a fund that holds crypto worth about 200,000 dollars. The team starts with the key boundary: keys are created inside a secure element, and the main processor can only ask it to sign.

The signing flow is drawn on paper first. The companion app builds the transaction, the device shows the recipient and amount on its own screen, and two buttons confirm it. The team tests the attack that worries them most: a compromised computer that swaps the recipient address. The computer screen shows the right address, the device screen shows the swapped one, and the test confirms the owner catches it by reading the device.

For backup, the team uses a recovery phrase plus a second device, so either device can sign with the other as a check. Firmware updates are signed, and the bootloader refuses older versions.

The team counts the work: about 40 hours to draw and test the signing flow, and three full attack tests before the first real transaction. The fund moves a test amount of 100 dollars first, then the rest in three transfers, checking the balance after each one.

What are the common mistakes?

The most common cold wallet architecture mistakes are letting the main processor see the key, trusting the computer screen, and treating the backup as an afterthought.

  • Keys outside the secure element. A key that lives in main memory or on disk is reachable by any bug in the firmware. Keep creation, storage and signing inside the secure element.
  • No screen check. A device without a trusted screen cannot show the owner what is being signed, so a swapped address goes unnoticed.
  • Unsigned firmware. If the bootloader accepts any code, an attacker who reaches the update path owns the device.
  • Rollback allowed. Letting the device install an older firmware version reopens flaws that were already fixed.
  • One backup, one place. A single paper copy in the same room as the device can be lost with it. Split the backup or store copies apart.
  • Never testing recovery. A backup that has never been used to restore a wallet is only a hope. Test the restore before moving real funds.

Key takeaways

  • Keys are created and stored inside a secure element and never leave it
  • The device screen is the check that stops a compromised computer swapping the address
  • Unsigned data goes in, signed data comes out, and the key stays on the device
  • Firmware updates must be signed, checked by the bootloader, and never rolled back
  • Test the restore from backup before moving real funds onto the device

Frequently asked questions

What is a cold wallet architecture?

It is the design of a wallet that keeps private keys offline: the hardware that holds the keys, the firmware that runs on it, and the signing flow that moves transactions between the device and a connected computer without ever exposing a key.

What is a secure element?

A secure element is a tamper-resistant chip that creates, stores and uses cryptographic keys internally. Software outside the chip can ask it to sign, but cannot read the key out of it. It is the part of a cold wallet that makes key theft hard even with physical access.

Why does the device need its own screen?

The screen shows the recipient and amount being signed, and only the device controls what it displays. A compromised computer can show a fake address on its own screen, but it cannot change the device screen, so the owner can catch a swapped address before confirming.

How is a cold wallet different from a multisignature wallet?

A cold wallet is about where keys live: offline, on a device. A multisignature wallet is about how many keys must approve a transaction. The two can be combined: several cold wallets can each hold one key of a multisignature setup, so no single device can move funds alone.

What happens if the device is lost or breaks?

The funds are recovered from the backup: the recovery phrase, or the shares that rebuild it, restore the keys onto a new device. That is why the backup must be tested before real funds are moved, and why a lost device alone should never mean lost funds.

Can firmware updates steal keys?

Only if the update path is weak. A sound design installs only firmware signed by the maker, checked by the bootloader before it runs, and keeps keys inside the secure element through the update. An unsigned or roll-backable update path is a serious design flaw.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building wallet hardware or a signing flow and need the design right? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Crypto Wallet service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call