Single random number generator feeding one wallet key, beside two independent generators combining into one protected key
Hardware Wallet

Where Does Your Seed Actually Come From?

In July 2026 the Coldcard hack drained roughly 1,800 bitcoin from hardware wallets that had done nothing wrong except trust a single source of randomness. Here is why that class of failure looks different on a two-card wallet.

Published 26 August 2026  ·  Cryptnox SA, Geneva

Short answer

A hardware wallet's entire security rests on one number: the random value it generates the moment you set it up. In July 2026, a five-year-old firmware bug quietly swapped a strong hardware random number generator for a weak software one on a well-known wallet, and attackers drained roughly 1,800 BTC once they worked that out. A Cryptnox card set up in dual generation mode does not depend on one generator. Two separate secure elements each contribute their own random number, and the two are combined through a Diffie–Hellman key agreement, so breaking one card's randomness, on its own, gets an attacker nothing.

Every self-custody wallet you have ever set up began with a coin flip. Not literally — but the first thing that happens, before the twelve words, before the addresses, before anything you can see, is that the device reaches for a source of randomness and asks it for a number nobody will ever guess.

Everything downstream is arithmetic. Your seed phrase, your master key, every address you will ever receive to, every signature you will ever make — all of it is derived, deterministically, from that one number. The mathematics that follows is public and well understood. The security of the whole arrangement rests on one question: was that first number genuinely unguessable?

Almost nobody checks. You cannot check. A wallet with a broken random number generator behaves exactly like a wallet with a perfect one — same words, same addresses, same signatures, same green checkmarks. The difference only surfaces when somebody else guesses your number first.

On 30 July 2026, somebody did.

The Coldcard hack: five years of a silent build flag

The incident is worth understanding precisely, because the interesting part is not that a bug existed. It is how ordinary the bug was.

Coldcard, a well-regarded and genuinely security-focused bitcoin hardware wallet, ships with a real hardware random number generator inside its microcontroller. Its firmware was written to use it. In March 2021, a firmware release changed which function the seed generator called, and a configuration macro was tested for existence rather than for being switched on. In the production build, that macro was set to zero. The check passed anyway.

The result: seed generation quietly stopped drawing from the hardware generator and started drawing from a software pseudo-random fallback that shipped with the embedded Python runtime. No error. No warning. No visible difference. For five years, devices generated seeds that looked completely normal and were drawn from a space small enough to search.

How much randomness was actually in those seeds
Intended128 bits

The design target for a 12-word seed. Not searchable by anyone, ever, with any amount of hardware.

Mk4 · Mk5 · Q~72 bits

Still a large number — but roughly 72 quadrillion times easier than intended. An attacker sweeping thousands of wallets at once only needs to get lucky occasionally.

Mk2 · Mk3~40 bits

Roughly 1.1 trillion possibilities — the vendor's own estimate. A single well-equipped machine works through that. No physical access to the wallet required; the attacker never needs to touch it.

Effective entropy by model, as reported in post-incident analysis. Bar widths are proportional to bits, not to search effort — each bit removed halves the work, so the real gap between the top bar and the bottom one is far larger than it looks here.

Exploitation, when it came, took 25 minutes. Between roughly 01:31 and 01:56 UTC on 30 July 2026, a first sweep took about 594 BTC — some 38 million dollars — out of around 500 single-signature wallets. Further waves ran for another week. Blockchain analysts at Galaxy Research put the confirmed total at roughly 1,800 BTC, about 115 million dollars at the time of the thefts, across some 8,900 addresses.

The vendor shipped emergency firmware for every affected model overnight. But firmware cannot repair a seed that has already been generated. Every affected user had to create a new wallet and move their coins — assuming they heard about it in time.

A patch fixes the next seed. It cannot fix the one you already own.

The shape of the failure

Strip away the specifics and this is what is left:

  • One source. The seed came from a single random number generator on a single device. There was nothing else in the recipe.
  • A silent fallback path. The device contained a weaker software generator that the build could accidentally select. The strong path and the weak path were interchangeable from the calling code's point of view.
  • No way to notice. Nothing the user could see, test, or compare would have revealed the difference — for five years.

That combination is what turns a small mistake into a total loss. Not the mistake itself — the fact that a single mistake was sufficient.

What two cards change

The cards in question are the Cryptnox Crypto Hardware Wallet — Dual-Card Set: two credit-card-sized NFC smart cards, made in Switzerland, each built on a Common Criteria EAL6+ certified secure element. You tap a card against your phone and the Cryptnox app talks to it over NFC. Private keys are generated inside the secure element and never leave it, which is the constraint the rest of this section follows from.

Cryptnox cards can generate a wallet in a mode we call dual generation, and it exists because of a different original problem: how do you get a backup of a key that is never allowed to leave the secure element it was born in? You cannot write it down, because nothing can read it out.

The answer is to have two cards agree on a secret that neither of them ever transmits. Each card generates its own private random number and keeps it. Each publishes only the corresponding public value. The two public values are exchanged — through your phone, which acts purely as a courier — and each card independently combines its own private number with the other card's public value.

This is Diffie–Hellman key agreement, the same mechanism that protects the connection to your bank. Both cards arrive at the identical shared secret. The seed is a hash of it. Two cards, one wallet, and the secret was never in the air, never in the phone, never on a screen.

Card A

Private random number, generated on-chip inside the secure element. Never leaves the card.

Card B

Private random number, generated on-chip inside the secure element. Never leaves the card.

shared secret → SHA-256 → your wallet seed

Why this matters

Guess Card A's number perfectly and you still have nothing. The shared secret depends on both. An attacker needs to break both cards' randomness, independently, in the same pair.

That last point is the one worth sitting with, because it is a mathematical property, not a policy or a promise. Combining the two private numbers is a reversible operation in the underlying arithmetic — which means that if either of them is genuinely unpredictable, the result is genuinely unpredictable. A completely broken generator in one card is not enough. It is not even close to enough.

Compare that with the failure above, where one flawed generator on one device was the entire attack.

Three structural differences

Single-source generationCryptnox dual generation
How many things must be rightOne generator, on one device.Two generators, in two separate certified secure elements. Both must fail.
Is there a weak path to fall intoYes — a software generator sat alongside the hardware one, selectable by a build setting.No software generator exists in the applet to fall back to. Key generation is a primitive of the certified smart-card platform, not application code that a build flag can reroute.
Can the owner detect a problemNo. A weak seed is indistinguishable from a strong one.Partly, and by design: two cards that generated correctly derive identical addresses. A mismatch is visible.

And the seed is never assembled anywhere else

Worth stating plainly, because it is where a lot of wallets are quietly weakest: at no point does a Cryptnox seed exist on your phone, your laptop, or a screen. The cards exchange public values only, and each card authenticates the other's value using a secret installed at the factory and shared only within a card pair. Your phone cannot substitute its own key into the exchange, and cannot compute the result of it. It genuinely is a courier.

What we changed anyway

Reading an incident like this and concluding that your own design is fine is the wrong reflex. Two sources are better than one; three are better than two, and the marginal cost is close to zero.

So the current card firmware adds an independent entropy contribution from your phone, mixed into the on-card randomness for both single-card and dual-card wallet creation. Mixed, not substituted — the phone's contribution is combined with the card's own, so a phone that contributes nothing useful, or a phone that is actively malicious, cannot weaken the result. It can only add to it.

For a dual-card wallet that means three independent sources — two secure elements and your handset — where the industry's worst recent failure came from having one.

The question is never whether a generator can fail. It is how many have to fail at once.

If you hold a hardware wallet — any hardware wallet

  • Check whether your device was affected. The Coldcard advisory covers Mk2 through Q. If you generated a seed on affected firmware, updating is not sufficient — the seed itself must be replaced and the coins moved.
  • Ask any vendor where the first number comes from. How many independent sources? Is there a weaker path the code could take? Can you, the owner, detect it if something went wrong? These are answerable questions, and a vendor who cannot answer them clearly has told you something.
  • Prefer designs where one mistake is not enough. That principle is worth more over a decade than any individual audit.

Randomness is the one part of self-custody that you cannot verify by looking. It deserves more than one source.

Frequently asked questions

How is a hardware wallet seed generated?

Every seed starts as a single random number. The device asks a source of randomness for a value, and the seed phrase, master key, addresses and signatures are all derived from it deterministically. The mathematics that follows is public and well understood, so the security of the whole wallet rests on whether that first number was genuinely unguessable.

What caused the Coldcard hack in July 2026?

A firmware change in March 2021 tested a configuration macro for existence rather than for its value. The macro was set to zero in the production build, the check passed anyway, and seed generation silently fell back from the hardware random number generator to a software pseudo-random generator shipped with the embedded Python runtime. Effective entropy dropped to about 72 bits on Mk4, Mk5 and Q, and about 40 bits on Mk2 and Mk3, against a 128-bit design target.

How much bitcoin was lost in the Coldcard hack?

The first sweep ran for 25 minutes on 30 July 2026 and took about 594 BTC from around 500 single-signature wallets. Galaxy Research put the confirmed total at roughly 1,800 BTC — about 115 million dollars at the time of the thefts — across some 8,900 addresses, with no confirmed attacker activity after 6 August 2026.

Can a firmware update fix a seed that was already generated?

No. A patch changes how the next seed is generated; it cannot change a seed that already exists. Anyone whose seed was created on affected firmware has to create a new wallet and move their coins to it.

What is dual generation on a Cryptnox card?

Dual generation is a setup mode in which two Cryptnox cards each generate their own private random number inside their own secure element and exchange only the matching public values, using the phone as a courier. Each card combines its private number with the other card's public value through Diffie–Hellman key agreement, both arrive at the same shared secret, and the seed is a hash of it. Because the result depends on both numbers, one card's randomness failing is not enough to make the seed predictable.

Does a Cryptnox hardware wallet have a seed phrase to write down?

Not by default. The Dual-Card Set ships uninitialised and you create the wallet through a paired ceremony in the Cryptnox app; the seed is generated inside both secure elements, so the second card is the backup. Importing an existing 12- or 24-word BIP39 phrase, or initialising a single card, are available as advanced options.

The card in one paragraph

The Cryptnox Crypto Hardware Wallet — Dual-Card Set is a pair of credit-card-sized NFC smart cards, made in Switzerland, each built on a Common Criteria EAL6+ certified secure element. The set ships uninitialised: you create the wallet yourself through a paired ceremony in the Cryptnox app, and because the seed is generated inside both secure elements, the second card is the backup — there is no 24-word phrase to write down by default. It holds Bitcoin, Ethereum, XRP, Tron and 1,000+ EVM tokens, and connects to dApps through WalletConnect and MetaMask.

See dual generation for yourself

Set up a Cryptnox card pair, run dual generation, and compare the addresses the two cards derive.


Sources

Reported figures on the Coldcard incident moved substantially in the weeks after disclosure; the totals above are those confirmed as of 24 August 2026. Cryptnox cards ship with a certified secure element and no software fallback random number generator. Cryptnox cards are made in Switzerland.