The Paranoid Wallet | Historical analysis of the Coldcard RNG debacle
The post explains the background behind the recently discovered random number generator bug in a COLDCARD bitcoin hardware wallet.
What mistakes were made, when, and why.
TLDR:
After a competitor has introduced a "clone" of a COLDCARD, Coinkite, the maker of COLDCARD has overreacted by dropping all the GPL licensed code from its codebase, including a certain cryptographic library.
Coinkite managed to replace it with another publicly available library (libngu), allegedly written by unaffiliated anonymous author, who was later identified as a sockpuppet of the Coinkte's own CTO.
After a mistake has been introduced into the code and a faulty check did not detect it at compile time, the knowingly bad software RNG fallback by the libngu, instead of the hardware RNG, have been combined with the software random number generator included in the MicroPython interpreter, producing bitcoin wallet keys with low enough entropy to be guessed by the attacker.
Lessons learned:
- Do not make rush decisions when dealing with cryptography.
- Avoid creating a sock-puppet accounts when you're already a public figure, unless you want to look like a criminal when the shit hits the fan.
Archive link, because I feel like the shit has not hit the biggest fan yet : https://archive.is/JvlLf
https://www.citadel21.com/the-paranoid-walletOpen linkView original on lemmy.world
2 replies
This was a very good read. Coinkite is pretty much dead in the water, I can't see how they'd recover from this.
I seriously considered getting myself a coldcard for my stack some years back, but their change from GPL to MIT+CC, and especially the reason for it, turned me away. I'm glad it did. This has made me even more of a FOSS maxi now.
The funny thing is, Trezor team has over-reacted in similar way back when the first Trezor clone hit the market. They retroactively changed the licensing of some of their software stack, but eventually backtracked few days after.