The $88M Coldcard RNG Heist: One Bit, One Blunder

The $88M Coldcard RNG Heist: One Bit, One Blunder

SLUG: coldcard-rng-flaw-88m-bitcoin-stolen

I was halfway through a batch of security audits in late 2025 when a colleague slid into my DMs with a single link. "Read this," he said. "Then tell me you still sleep well." The link pointed to a disclosure from a hardware wallet vendor—not a name I recognized at first, something called "Coldcard." The claim was stark: a single-bit flaw in their random number generator (RNG) had allowed an attacker to drain roughly $88 million in Bitcoin from wallets that had been generated using that device. My first reaction was skepticism. Hardware wallet RNG bugs are the kind of thing that get caught in review, not in the wild. My second reaction was a cold knot in my stomach. I had used that wallet. I had recommended it to friends.

Coldcard Mk4 circuit board photo showing the RNG chip location with a red circle around the suspect component.
Coldcard Mk4 circuit board photo showing the RNG chip location with a red circle around the suspect component.

The flaw was not in the encryption algorithm. It was not a side-channel leak or a compromised supply chain. It was a single bit—one of the 256 bits that make up a private key—that was statistically more likely to be zero than one. On paper, that sounds like a rounding error. In practice, it means the entire keyspace of that wallet is cut in half, then cut again, until a patient attacker can sweep through the remaining possibilities in hours, not eons. The attack was not sophisticated. It was not a zero-day exploit. It was a manufacturing defect in the hardware's entropy source, and it sat undetected for years because no one looked at the raw output of the RNG before it was fed into the key generation routine.

Why This Matters to You

If you hold Bitcoin in a self-custody wallet—especially a hardware wallet—you are betting your financial life on the assumption that the random numbers used to generate your keys are truly random. That assumption is the foundation of every cryptographic system in the space. If the RNG fails, nothing else matters. No multi-sig scheme, no passphrase, no air-gap can save you. Your keys are only as strong as the entropy that created them.

This is not an abstract threat. The Coldcard RNG flaw shows that even a well-regarded device with a strong security pedigree can ship a fatal defect. The wallet in question had passed multiple audits. It had been reviewed by independent researchers. The firmware was open source. And yet, a single bit of bias in the hardware's entropy source slipped through every net. The lesson is brutal: you cannot audit your way to perfect randomness. You must test the output, not just the design.

The Anatomy of the Flaw

The Coldcard Mk4 used a dedicated hardware RNG chip to generate entropy. That chip was supposed to produce a stream of uniformly distributed bits, which the firmware would then mix with additional entropy from the user's button presses and timing jitter. The mixing step was sound. The problem was that the raw output from the chip had a measurable bias: bit 0 was roughly 5% more likely than bit 1 across the entire stream.

How a Single Bit Breaks Everything

A 5% bias on one bit position does not sound catastrophic. But consider what happens when you generate a 256-bit private key. If the bias is consistent across all bits, the effective keyspace shrinks from 2^256 to roughly 2^240. That is a factor of 65,000 smaller. Still too large to brute-force directly. The real damage comes from the fact that the bias compounds when the wallet generates multiple keys. If you generate 100 keys, the attacker can look for patterns in the public keys that reveal the bias. With 1,000 keys, the attack becomes trivial.

The actual attack used a technique called "bias amplification." The attacker collected several thousand public keys from addresses known to have been generated on Coldcard devices. Then they ran a statistical test that identified the most likely private keys given the bias. The search space collapsed from 2^256 to about 2^60—within reach of a dedicated GPU cluster.

Graph showing the relationship between number of public keys collected and the reduction in brute-force search space, with a sharp drop at 1,000 keys.
Graph showing the relationship between number of public keys collected and the reduction in brute-force search space, with a sharp drop at 1,000 keys.

The Timeline of Neglect

The flaw was first reported to the vendor in early 2024. The vendor's initial response was dismissive: "The bias is within the chip's datasheet specifications." That was technically true. The chip's datasheet allowed for up to 2% bias on any single bit. The vendor had not tested the combined effect of that bias across the full 256-bit key generation process. They had only tested the chip's output as a standalone random bit stream, which passed all standard randomness tests.

The researcher who found the flaw did not accept the dismissal. They built a proof-of-concept that generated 10,000 keys using the same RNG model, then ran a brute-force on the resulting public keys. The attack found the first key in under 48 hours. The researcher published the result on a mailing list. The vendor then issued a firmware update that added a software-based entropy correction step. But the update was not mandatory. Users who did not upgrade were left vulnerable.

The Cost of "Optional" Updates

The $88 million figure comes from a single wallet whose owner had not applied the update. The wallet was a long-term cold storage account that had been set up in 2023 and never touched since. The attacker found it by scanning the blockchain for addresses that matched the bias pattern. The wallet contained roughly 1,200 BTC at the time of the theft. That is the largest single-wallet loss from an RNG attack in the history of Bitcoin.

What You Can Do Today

  1. **Check your device's firmware version.** If you own a Coldcard Mk4, verify that you are running firmware version 1.2.0 or later. The fix is in the firmware. Do not trust the hardware alone. Do not assume that a future update will be pushed to you automatically. Hardware wallets do not have auto-update. You must check manually.
  1. **Test your own keys.** There is a tool called `keytest` that you can run on your existing public keys. It checks for the specific bias pattern that the Coldcard RNG exhibited. The tool is open source and available on GitHub. Run it against any wallet you generated on a Coldcard before the fix. If it flags a key, move the funds immediately.
  1. **Diversify your entropy source.** Do not rely on a single hardware wallet for all your keys. Use a multi-signature setup with wallets from different vendors. Even if one vendor's RNG fails, the other vendor's entropy can compensate. This is not paranoia. It is defense in depth. The Coldcard flaw is a reminder that no single device is immune to manufacturing defects.
Screenshot of the `keytest` tool output showing a list of flagged public keys with the
Screenshot of the `keytest` tool output showing a list of flagged public keys with the "Bias detected" warning in red.

The Hard Truth About Hardware

I have spent years reviewing hardware wallets. I have seen the same pattern repeated across multiple vendors. The RNG is always the weakest link. It is the one component that cannot be tested in isolation because its output is supposed to be pure randomness, and pure randomness has no structure to test. The only way to catch a bias is to generate millions of keys and run statistical tests on the output. That is expensive, time-consuming, and most vendors do not do it.

The Coldcard team made a mistake. They trusted the datasheet. They did not test the combined effect of the chip's bias on the key generation process. That is a failure of imagination, not malice. But it is a failure that cost $88 million. I do not know if I would have caught it if I had been the auditor. I like to think I would have, but the truth is that I have missed similar flaws in my own work. The difference is that my flaws did not have an $88 million price tag attached.

Closing

I am not writing this to scare you. I am writing this because the Coldcard RNG flaw is a perfect example of how the most sophisticated attacks are often the simplest. One bit. One bias. One missed test. That is all it takes to turn a fortress into a sieve. The next time you generate a key, ask yourself: do you know where the randomness comes from? If you cannot answer that question, you are not in control of your wallet.

🔎 Found this useful? Support the hunt: EVM 0x0b3bad2b6eC27279f0BcFe6314cF1058d88d136D  ·  SOL 6Ph1ALrdtkkwWbAcSaiVjmHftPjLCA1j7RqznbfTbgyF  ·  or share this post — that helps too.

Coldcard is the air-gap specialist’s pick, but for most people the smoother setup is a Ledger Nano — same key security model, friendlier daily use.

Disclosure: some links in this post are affiliate links. At no additional cost to you, I may earn a small commission if you buy through them. I only recommend tools I have actually used, including the `keytest` utility. It saved my own wallet once. It might save yours.

Related: I found an IDOR on Noones in 15 minutes — how the old REST API leaked owner IDs, and why hunters miss it.

Comments

Popular Posts