Edition of Mon 30 Nov 2026 UTC Free to read. No paywall. RSS · X
Infrastructure Intel

Crypto and AI agent infrastructure, read by a network architect. No hype. No shilling.

Deep Dives

The Hardware Generator Was in the Device. For Five Years the Seeds Never Used It

By · · 11 min read

Coinkite's postmortem on the COLDCARD failure is out, with a commissioned review of the fix. One build flag set to zero, one check that asked the wrong question, and a wallet that drew its secrets from software for five years while every test passed. I read both reports. The failure is one every infrastructure team has a version of.

15independent reviews and research efforts between 2021 and 2026, by Coinkite's count. None found it.

A COLDCARD is a hardware wallet. Its one job is to make a secret nobody can guess and keep it. The chip inside has a hardware random number generator for that purpose. The generator worked. Its code was in the firmware, and release checks confirmed it was there. From March 29, 2021 to July 30, 2026, the code that creates wallet seeds never called it.

Coinkite, which makes the device, published an 18-page postmortem on Tuesday, November 24. Three days earlier it published a review of the fix by a firm called Keylabs. I read both, and Coinkite’s Security Status page. What follows is from those three documents unless I say otherwise.

A word on the sources first. Coinkite wrote the postmortem about itself and modeled it on an NTSB accident report, with facts, analysis, findings and recommendations kept apart. It’s a good format, and it’s more candid than most. The NTSB is an outside body, though, and this report has no outside author. Keylabs’s cover page lists Coinkite as the client. Both documents are useful. Neither is independent in the way the word usually gets used.

One flag, one guard, one wrong function

Keylabs traced the failure to three steps.

  • The flag. COLDCARD’s board configuration set MICROPY_HW_ENABLE_RNG to 0.
  • The guard. A library called libNgU had a safety check for exactly this case, written as #ifndef MICROPY_HW_ENABLE_RNG. That tests whether the name is defined. It doesn’t test the value. Defined as zero is still defined, so the check passed.
  • The link. With the hardware generator switched off in the build, the function rng_get() resolved to MicroPython’s general-purpose software generator, called Yasmarang.

Nothing failed. Both generators offer the same interface, so the build linked cleanly and the device had no error to raise. Seed words came out in the right format.

What fed the software generator matters. Keylabs says it was seeded from the chip’s ID number and timer and clock state. That’s device identity and time of day, with no noise source anywhere. The output was hashed before use. Hashing changes how the output looks and adds nothing the input lacked.

A second weakness in the same path

Keylabs’s report contains a detail the postmortem’s summary doesn’t dwell on. On the newer models, firmware reseeded the generator at boot from the two secure chips on the board. It hashed their output into 32 bytes and then kept only the first four. A 256-bit value went in and 32 bits were used. Keylabs’s words: the reseed “narrowed but did not close the gap.”

Coinkite estimates affected seeds had about 40 bits of real randomness on the Mk2 and Mk3 and about 72 bits on the Mk4, Mk5 and Q. The target was 128. The gap between 40 and 72 is 32, the same size as that truncated reseed. Neither document says that’s where the difference comes from. It’s my arithmetic, and it fits.

Those two figures belong to Coinkite. Keylabs says the impact numbers are “not something we independently established.” Coinkite doesn’t show its working. I’d treat both as the vendor’s estimate until someone outside reproduces them.

Why 40 bits is no protection

Forty bits is about a trillion possibilities. Rented graphics cards can work through that. Coinkite’s analysis says both figures are “within reach of offline brute-force regeneration.” I can’t check that for 72 bits. On paper it’s a search four billion times larger, and the report doesn’t say how the attackers did it or which models the stolen seeds came from.

Thefts began on July 29, 2026. Attackers regenerated the weak keys on their own machines and moved the coins. No device was touched or accessed remotely. Users noticed on July 30, public reports reached Coinkite the same day, and it found the defect that day. Fixed firmware for every supported track went out on July 31.

Whose library was it

The postmortem calls this “a COLDCARD integration defect, not a defect in libNgU itself.” Keylabs lists the libNgU guard as a contributing control failure. Both can be read as true. They sit oddly together, because the postmortem also says who wrote libNgU: Coinkite’s own CTO, under a pseudonym, as a standalone project.

So the “pinned dependency” where the bad guard lived was in-house code in a separate repository. In May 2025 the Bitcoin developer James O’Beirne raised concerns about libNgU’s quality and recommended removing it. The report says he didn’t identify a specific defect and didn’t pursue it. That’s fair to him and to Coinkite. It’s also a year’s warning that the place to look was that library.

Why fifteen reviews missed it

Coinkite counts at least 15 independent review and research efforts on COLDCARD between 2021 and 2026, two of them paid product reviews. The source was public the whole time, with 54 contributors. None found the defect.

The report’s own explanation is the most useful line in it: every check “answered a nearby question rather than the critical one.”

  • Release checks confirmed the hardware generator’s code was in the build. They didn’t confirm seed generation reached it.
  • Functional tests confirmed seed words were well formed. They were.
  • Statistical tests looked at the output. Keylabs simulated the old generator and found it passes FIPS CRNGT, the SP 800-90B health tests, SP 800-22 and COLDCARD’s own sanity check. A software generator’s output looks uniform no matter how little went into it.

That last one is the trap. You can’t tell where randomness came from by looking at a sample of it. Output quality and source are different properties, and only the source was wrong.

Scope explains some of the fifteen. Several looked at dice-roll tooling, physical attacks or reproducible builds and never claimed the seed path. Two reviews did get close.

A paid pre-release review of the Mk4 in March 2022 covered random number generation and entropy hardening. It led to changes and didn’t find the defect.

A firmware review dated June 17, 2026 expressly had weak RNG in scope and concluded the path was sound. That was six weeks before the thefts.

What the AI reviews show

I write mostly about AI agents, so this part had my attention. The report records more model results than I expected, and they don’t point one way.

  • Before the thefts. From May 1 to June 26, 2026, a researcher ran a broad review with OpenAI’s Cybersecurity Harness. It produced 85 candidate findings and several real fixes. It missed this.
  • Right after disclosure. On August 1 an automated audit workflow was run against the pre-fix firmware. With a default checkout, which leaves out dependency submodules, it missed the defect. With the submodules pulled in, it found it.
  • Same prompt, different models. On August 3 and 4 another researcher reran the June reviewer’s prompt across several models. The report lists four misses and two hits.

The August 1 result is the one I’d keep. The bug lived in a submodule. A reviewer who never loaded that code couldn’t find it, and that holds for people as much as for models. Every hit in the list came after the defect was public, and the report is careful to say those are reproductions, not blind discoveries.

On who found it first, the report says plainly that it doesn’t know. It notes that an open-weights model’s full weights were released on July 27 and the thefts started on July 29, and calls AI-assisted discovery “a plausible hypothesis.” Two days is suggestive. It isn’t evidence, and Coinkite doesn’t claim it is.

The losses, counted three ways

The report gives several figures and warns against adding them together, because they count different things.

  • At least 328 seeds reconstructed in the first wave of thefts, from a public analysis the report cites.
  • 300 support tickets from 242 accounts reporting a loss, as of November 18. Coinkite puts that at about 0.21% of its estimated user base.
  • 1,778.84 BTC from more than 8,600 addresses, reported by Galaxy Research on August 14. I have that through Coinkite’s report and didn’t read Galaxy’s.

One seed can produce many addresses and one person can hold several seeds. Coinkite also can’t see customer balances, so its count only includes people who filed a ticket. The report says the real number is likely higher and that no total exists.

One small thing. Coinkite’s blog post announcing the report says 236 accounts. The report says 242. I’d go with the report, and I’d like the two to agree.

Compensation is undecided. The recommendation covering it is marked “Open; no decision.”

What the fix does

Keylabs checked the repair in source and in four signed release binaries, and ran the same analysis on a pre-fix binary to prove the method could see the defect. It found four separate controls:

  • Compile time. The guard now checks the flag’s value.
  • Build time. The software generator’s object file is replaced with an empty one, and its symbol is poisoned so nothing can link to it.
  • Build time. A check named rng-code-check follows the linked chain and fails the build unless rng_get() ends at the board’s hardware driver.
  • Boot time. A self-test calls the generator before anything else starts and halts the device if it doesn’t reach hardware.

Disassembly showed the fixed firmware reading the chip’s hardware RNG register, and the old firmware running pure arithmetic with no hardware read. The boot reseed now uses the full 256 bits. Since the August 20 releases for the Mk4, Mk5 and Q, every new seed also requires input from the user: 65 key presses, 50 dice rolls or 128 coin flips.

Keylabs’s conclusion is that the defect is “fully closed” on the firmware it reviewed. Three limits come with that.

  • Four binaries. Mk5 5.6.2 and 5.6.3, and Q 1.5.2Q and 1.5.3Q. Edge releases weren’t reviewed. Further review, Edge included, is the other recommendation still open.
  • One fix. It wasn’t a full audit of any model.
  • Dates. The review is dated October 15 and the postmortem says it was published then. Coinkite’s blog posted it on November 21, and the Security Status changelog shows it added the same day.

One wording point. Coinkite’s announcement says each new seed combines your input with “three hardware sources.” Keylabs describes the third, the second secure chip, as “a static per-device value.” A fixed value that’s different on every device is worth mixing in. It isn’t a third fresh source of randomness, and the postmortem’s own analysis section says so more carefully than the announcement does.

If you own one

Updating the firmware doesn’t fix your seed. New firmware makes good seeds from now on. A seed made on affected firmware is exactly as weak as the day it was made, and it stays weak if you restore it onto a new device.

These are the minimum fixed releases from the Security Status page, which Coinkite marks as verified November 23:

  • Mk2 and Mk3: 4.2.0
  • Mk4 and Mk5: 5.6.0. The current release is 5.6.3.
  • Q: 1.5.0Q. The current release is 1.5.3Q.
  • Mk4 and Mk5 Edge: 6.6.0X
  • Q Edge: 6.6.0QX

If your seed was created on anything older, install verified fixed firmware, create a new seed, check the backup and move the funds.

There are two exceptions and one false comfort.

  • Imported seeds. A seed made safely somewhere else and imported into an affected device wasn’t weakened.
  • Dice. A seed made with at least 50 fair, private dice rolls through Add Dice Rolls, where the rolls were never written down or exposed, wasn’t weakened. Read the migration guide’s exact conditions before you rely on that.
  • Passphrases. A strong passphrase adds a barrier. Coinkite still tells passphrase users with an affected seed to move.

Expect scammers. Coinkite says never to send seed words, passphrases, dice rolls or backups to anyone, itself included, and to treat any unsolicited offer of recovery or compensation as impersonation.

The same failure outside a wallet

I’ve spent a career on systems where the configuration says one thing and the box does another. This is that, at a very high price.

  • A check that tests for presence when it should test the value. “Is the setting there” and “is the setting on” are different questions.
  • A fallback with the same interface. If the weaker path answers the same call the same way, nothing breaks when you land on it.
  • A health check that measures the output. Green means the output looks right. It says nothing about where it came from.
  • A review that stops at the top-level repository. The code that decides the outcome is often one level down, in something pinned years ago.

The fixes carry over as well. Verify the path the shipped binary takes, at build time and again when it runs. Remove the weak fallback from the build so a wrong link breaks the build. Halt when a security source fails. And when you pay for a review, get it tied to a specific release file, with a list of the critical paths it tested and the ones it didn’t. Coinkite now requires that of its own reviewers.

What’s still open

  • Who found the defect and who took the funds. The report says law enforcement is investigating and that the Canadian Centre for Cyber Security has its own case.
  • The total loss and the number of people affected.
  • Compensation.
  • Review of the Edge releases.
  • The 40-bit and 72-bit estimates, which nobody outside Coinkite has confirmed.

David Cooper, CCIE #14019

Not financial or legal advice. Views are my own.

Sources