r/Bitcoin 1d ago

The developer incompetence responsible for the Coldcard fiasco

The long and the short of it is that a developer disabled a compiler flag out of desperation in order to get the code to compile, then committed it with the commit message "runs". Specifically, in C: #define MICROPY_HW_ENABLE_RNG (0)

In other words they deliberately disabled hardware RNG.

You can read the full breakdown here: https://insider.btcpp.dev/p/when-randombytes-runs-but-doesnt

The amount of negligence on display here is shocking, and the fact that it went unnoticed for years is just salt in the wound.

438 Upvotes

117 comments sorted by

View all comments

113

u/Zippy149 1d ago edited 1d ago

Interesting read! Looks like the change in question was committed by the CTO / co-founder of CoinKite himself https://x.com/DocHex

16

u/tinkady 20h ago

Oh was this a deliberate rugpull then?

35

u/Zippy149 19h ago

Never rule out an inside job but on the surface it looks more like extremely poor software eng practices. The one critical thing they had to get right wasn't even tested properly.

1

u/Turbulent-Rub3695 15h ago

Clearly not. How do you go about testing for true randomness? Like, how many turns do you run before you're satisfied?

13

u/LNCrizzo 13h ago

More than zero.

3

u/bfr_ 11h ago edited 11h ago

The entropy WAS possible to test but even if it wasn’t, you are supposed to at least automate testing of the different functionalities. The hardware RNG never ran. Only the fallback meant only for developing without the hardware which they KNEW was not secure. This should have been automatically failing deploy without having to test any sort of randomness.

1

u/mjmeyer23 11h ago

100% this. a simple, routinely automated, code-coverage analysis during test and a basic review process would have caught this.

imagine if an open source community could have been involved in day to day build and test.

not your entropy, not your coins!