# Are cold wallets safe? The Coldcard flaw explained

> Are cold wallets safe? We analyze the Coldcard flaw and why cryptography fails in the code and not in the math
> By José Maldonado · AI Agents · 2026-08-05

**Are cold wallets safe?** The panic unleashed after the hacking of Coinkite's devices has put the crypto sector's sacred maxim in check: not your keys, not your coins. With more than 1,500 BTC liquidated in three waves of silent attacks, the community is discovering the hard way that a *hardware wallet* is only as secure as the code its firmware runs. We analyze what really failed in Coldcard and what lessons this historic flaw leaves for the future of self-custody.

On July 30, 2026, an attacker emptied bitcoin wallets worth about 70 million dollars in 41 minutes, all without touching a single device. In the following days the figure kept growing: three confirmed waves and fourteen minor incidents have taken 1,596 BTC, equivalent to more than 100 million dollars, from some 7,300 addresses linked to Coldcard, the hardware wallet from Canadian firm Coinkite, and a fourth wave still unconfirmed would raise the total to about 2,055 BTC, close to 130 million.

The cause of all this disaster was not an attack on the bitcoin network, nor a backdoor: it was an integration error of more than five years in the firmware's random number generator. Cryptography is that fragile. The algorithms are solid mathematics, but if that algorithm is badly written, however minimal the flaw, then disaster is guaranteed.

## The strength of a chain is measured by its weakest link

To understand the Coldcard incident and other serious ones that preceded it in the sector, such as Heartbleed in 2014 and OpenSSL on Debian in 2008, two levels that are often confused must be separated.

The first is that of mathematics. The hash functions, ciphers and digital signatures that make up, for example, the BIP-39 standard used by Bitcoin wallets. That level is very difficult to break; after decades of attacks, cryptographers trust it. The second level is the implementation. The concrete code that turns that mathematics into software. That is where almost all disasters happen.

Take, for example, a 12-word seed from a standard Bitcoin wallet, which represents 128 bits of entropy. This means there are 2^128 possible combinations, a number so large that it is unapproachable even for all the computing power on the planet. It would take trillions of years to calculate all the values.

But that level of security ONLY EXISTS if the random number that gives rise to the seed is truly unpredictable. If the random number generator (RNG) fails, everything else, the encryption, the address verification, the signing, is theater, and bad theater at that. It is such a well-known point that it has its own axiom: cryptography does not break (generally) in the mathematics, it breaks in the random number generator and in the integration errors that nobody looks at twice.

[The Coldcard attack is still active and losses could reach 130 million dollars](https://observatorioblockchain.com/en/cybersecurity/el-ataque-a-coldcard-sigue-activo-perdidas-de-130-millones/)

## Coldcard, the loaded dice that worked for five years

Let's look at this with the most recent incident: Coldcard. The problem was born in March 2021, when the company migrated its wallet's seed generation to a library called [libngu](https://github.com/switck/libngu), built on [MicroPython](https://micropython.org/). The team wanted to use the hardware random number generator (RNG) of the STM32 chip in its devices, but in the process, they disabled a MicroPython compilation macro, `MICROPY_HW_ENABLE_RNG`, setting it to zero.

One line, a one-line error, is costing more than 100 million dollars today. And all because in the production configuration (used in end-user devices), that macro did not disable MicroPython's software generator: it selected it.

And the libngu code that was supposed to detect the problem was badly written: it only checked whether the macro was *defined,* and it was, it had a zero value, what was not enabled was the use of the STM32's RNG. The result is that seed generation, the most delicate moment in all of the wallet's security, was silently connected to the deterministic substitute that MicroPython uses for boards without a hardware RNG: a small algorithm called [Yasmarang](http://www.literatecode.com/yasmarang).

## Reducing entropy: when the lack of chaos is insecurity

Coinkite estimates that the affected Mk2 and Mk3 devices were left with an effective entropy of about 40 bits. The generator was seeded with the chip's serial number and clock registers, neither of which is secret: the attacker could reproduce the machine's state with a device of their own.

A search space of 2^40 (around a trillion possibilities) is enumerable with a modern GPU and some time. The Mk4, Mk5 and Q models added entropy from their secure element, but Coinkite itself acknowledged that the reduction from a 32-bit reseed left those seeds at about 72 bits, still far below the 128-bit standard.

For more than five years, those loaded dice seemed normal. Every generated seed looked as random as a correct one; no user noticed anything. The key check was not detected by tests or audits: the attackers discovered it.

On July 30, 2026, Galaxy Research [detected](https://x.com/glxyresearch/status/2083181683067506899) a first wave of withdrawals: 1,082.65 BTC, about 70.2 million dollars, taken from 1,196 addresses in 41 minutes. Chainalysis calculates that in the first ten minutes about 30 million dollars had already moved, and that a single victim lost 1.8 million. Coinkite states that at least fifteen different attackers rushed to exploit the same hole.

[Windows 11 26H2 news: the complete list of changes](https://observatorioblockchain.com/en/technology/novedades-windows-11-26h2-la-lista-completa-de-cambios/)

## The error nobody saw execute

The most uncomfortable part of this story is that the code was open source, auditable and truly auditable. Coldcard built its reputation precisely on that: inspectable firmware, reproducible builds and air between the funds and the network. The hardware RNG that was supposed to be used was present in the binary all along; it was just, by accident, not the one the seed generation path invoked.

Block's bitcoin engineering teams, who published their analysis on July 30, 2026, summed it up bluntly: security reviews confirmed that the correct code *existed* in the firmware, but none verified which implementation actually reached the seed generation path between the two submodules.

The lesson goes beyond Coldcard: in cryptography, auditing the code that is written is not enough. You have to verify the code that *executes*, with the real configuration with which it is compiled. A badly written guard (`#ifndef` instead of an enablement check) does not generate any compilation error, does not crash in tests and produces output that is perfectly random in appearance. It only fails in the one property that matters: unpredictability.

## Quick response, but what is lost is lost

Coinkite's response was quick and unusual for the sector. The CEO, Rodolfo Novak, publicly asked users to "move their funds now", said the company was "devastated" and assumed "full responsibility". He published an unusually transparent technical document in which he acknowledged that "most of Coldcard's randomness came from a PRNG that it didn't even know was in the code".

He destroyed the pending inventory to be shipped with the vulnerable firmware. And he repeated a message nobody likes: updating the firmware does not repair seeds already generated. Exposure travels with the seed, not with the device; anyone who created a seed with the affected firmware has to generate a new one and migrate the funds. Those who added at least 50 private dice rolls when creating their seed, which contribute more than 128 bits of entropy outside the generator, are considered safe from this specific flaw; the rest are not.

The alarm triggered one of the largest migrations of small bitcoin since the FTX collapse in November 2022: according to CryptoQuant analyst Julio Moreno, 39,600 BTC moved in a single day in transfers of less than one bitcoin, the largest volume in that category in almost four years. About 90% of the loot, however, remains intact in the attackers' addresses. In bitcoin there is no reversal: if the money reaches a regulated service, investigators can try to freeze it; if not, it disappears.

[MCP, A2A and micropayments: the infrastructure of autonomous commerce between AI agents](https://observatorioblockchain.com/en/ai-agents/mcp-a2a-micropagos-comercio-autonomo/)

## Heartbleed, when two thirds of the Web is the target

But Coldcard is only the latest chapter in a story that has been repeating for decades. Twelve years ago, in April 2014, modern cryptography's most famous bug showed that the problem was not exclusive to small projects or new currencies.

Heartbleed (CVE-2014-0160) was a flaw in the OpenSSL library, the software that protected and still protects most of the Internet's TLS connections. The error was in the TLS protocol's heartbeat extension, designed to check that the other party in a connection is still alive. The OpenSSL implementation read the declared length of the message, but did not check whether the actual content matched it: so an attacker could declare that they were sending 64 kilobytes and attach barely a few bytes, and the server would return 64 kilobytes of its own memory. In those 64 KB could be private keys, passwords, session tokens or the encrypted content of communications. And it could be repeated as many times as desired, without leaving a trace: heartbeats are not recorded in the logs.

## Two years exploitable

The bug was introduced in December 2011 and came into the world with OpenSSL 1.0.1 in March 2012. It remained exploitable for two years. It was discovered independently by the Finnish team at Codenomicon and by Neel Mehta of Google Security, who notified OpenSSL; the patch, published on April 7, 2014, was a two-line fix: check the length before copying. The irony is that the correction was trivially simple, but the cost was not: server operators had to revoke and reissue certificates and keys across the entire web, because anyone who had intercepted traffic for two years could have been decrypting it in retrospect. Leaked secrets cannot be "un-leaked".

Heartbleed also revealed something structural: the world's most critical cryptographic infrastructure was maintained by a handful of volunteers with minimal funding. A one-line flaw in a library without money and without enough staff brought down the trust of two thirds of the internet. It was not a mathematical error; it was a perfectly ordinary implementation bug, with planet-scale consequences for the simple fact of being at the base of everything.

## The Debian lesson: never silence Valgrind

There is a third case that sums up better than any other how fragile the craft is: the OpenSSL bug on Debian, disclosed in May 2008 (CVE-2008-0166, DSA-1571-1). In 2006, a Debian developer was trying to silence the warnings from Valgrind, a memory analysis tool, in OpenSSL's random number generator.

To do so he commented out two lines of the `MD_Update` function in `md_rand.c`, which mixed data into the entropy pool. He consulted the change on the OpenSSL mailing list, received an approval that he interpreted with excessive confidence, and published it. To make it a little simpler to understand: this developer silenced a development tool that was telling him there were flaws in OpenSSL's random number generator or RNG. Very bad idea.

The result: for about twenty months, keys generated on Debian and Ubuntu were created with a practically empty source of randomness. In the most notorious case, `ssh-keygen` could only generate 32,767 different SSH keys of each type and size, one for each process ID value, which meant that thousands of people shared the same key.

This was not a theoretical error: any attacker could reconstruct the key space in seconds. Millions of SSH, OpenVPN, DNSSEC and certificate keys had to be regenerated. The bug was found by Luciano Bello and fixed in May 2008, but the lesson is identical to Coldcard's: a change that apparently improves the ecosystem, in this case cleaning up the output of a debugging tool (again, a very, very bad idea), applied to the wrong link, destroyed the cryptographic security of an entire distribution.

[Immutable Linux Distributions: Complete guide to atomic distributions 2026](https://observatorioblockchain.com/en/technology/distribuciones-linux-inmutables-guia-2026/)

## Why is cryptography so difficult to develop?

Taken together, these three cases point to the same diagnosis. The problem is not that the mathematics are weak; it is that cryptography has properties that make it singularly difficult to implement well.

First, the flaws are silent by nature. A cryptography bug does not crash, does not produce errors and does not show corrupted data. It produces output that looks correct in every respect except the one that matters: unpredictability. There is no test for "this number is random" that works on a finite sample; that is why the Coldcard error survived five years and multiple audits, and why the Debian one survived twenty months with thousands of users generating keys.

Second, the errors do not live where you look for them. Cryptography breaks in the integration: in a misconfigured macro, in a check that verifies the wrong thing, in two lines deleted for tooling reasons. Auditors look for flaws in the algorithms and in the cryptographic routines, and rarely verify what code actually runs on the critical path with the production configuration. In all three cases, the code review existed; what failed was the verification of execution.

## An asymmetric nightmare

Third, the asymmetry of effort is brutal. The defender has to be right 100% of the time, in all configurations, for the entire life of the product; the attacker only needs to be right once, and has all the time and all the computing power they want. A single 40-bit hole turned a device whose entire marketing rests on being "impossible to hack" into an open drawer for fifteen attacks in a week.

And fourth, correctness is not the same as repair. In most software, a bug is fixed and that's the end of it. In cryptography, a flaw in the generation of secrets is not repaired: the compromised secret is unrecoverable, and the remedy, revoking keys, reissuing certificates, regenerating seeds, migrating funds, is paid by the end user. Heartbleed forced the revocation of keys across half the Internet; Coldcard forces every affected holder to rebuild their wallet from scratch and to trust that the new one really is random.

## Protecting it, at all costs

And this makes clear why we must protect cryptography at all costs. All modern digital security rests on this layer. HTTPS, banking, encrypted messaging, electronic signatures, elections, identity and, of course, the self-custody of cryptoassets: when the underlying cryptography fails, everything built on top of it fails, and not partially. Cryptographic trust is binary. A certificate that could be decrypted is not a "slightly less secure" certificate; a predictable seed is not a "slightly weaker" wallet; it is a wallet that, at some point, someone else owns.

Hence things like; the policy of planting backdoors or intentionally weakening encryption so as to "not let the bad guys get away with it", is not a double-edged sword, it is directly the death sentence for digital security. It is something that must always be opposed, at any price.

[Cybersecurity in the AI Era: How Red, Blue and Green teams protect your company](https://observatorioblockchain.com/en/ai-agents/ciberseguridad-en-la-era-de-la-ia-el-trinomio-red-blue-y-green/)

## More than a niche task

That is why protecting cryptography, the code, the generators, the protocols, the supply chain that delivers them, is not a niche task. It is the critical infrastructure on which everything else rests, and its maintenance has proven to be systematically underfunded: OpenSSL protected two thirds of the web with a minimal team in 2014, and Coldcard's firmware, one of the most audited products in its category, carried the error in its code without anyone noticing for five years.

The Coldcard incident also adds a layer of irony that is hard to ignore. The product was sold precisely as the solution to the trust problem: air-gapped, open source, no dependencies. And yet, the flaw was not in the hardware or the network, but in a configuration error that turned randomness into a deterministic source. The same as in Heartbleed and in Debian. After all, cryptography does not break where you suspect, it breaks where nobody was looking.
