pull down to refresh

Updating the firmware does not repair a seed that was generated by affected firmware. A new seed must be generated and the funds migrated to the new wallet.
reply
Mk4, MK5, Q will get drained.

72 bits of entropy is not great but definitely not trivial to crack. Bitcoin Puzzle 71 is still uncracked after all.

So users who generated their wallet on Mk4, Mk5, or Q don't need to panic immediately, but their wallets might be cracked in the next few months/years.

reply

Praveen seems to think that 72 bits should be treated more as an upper bound. I can't find the specific post right now, but this is their conclusion:

As does @raw_avocado:

reply

You can check for yourself that Puzzle 71 is uncracked:
https://bitcointalk.org/index.php?topic=5218972.msg53649852#msg53649852

https://mempool.space/address/1PWo3JeB9jrGwfHDNpdGK54CRas7fsVzXU


This additional entropy materially improves the situation for Mk4, Q and Mk5. Under the same current assumptions, we estimate the effective search space at about 72 bits.

Source: https://blog.coinkite.com/entropy-technical-backgrounder/

reply

I don't dispute the 71 bit puzzle beingbunsolved, but what do you make of this from the block report:

Mk4/Q/Mk5Mk4/Q/Mk5

For a successful reseed with known fallback state and call history:
  • Secure reseed possibilities: at most 2^32
  • Average enumeration: approximately 2^31
A deliberately loose known-UID ceiling can be obtained by treating every timer field as independent:
120,000 SysTick values
× 86,400 RTC times
× 256 RTC subsecond values
≈ 2^41.27 fallback states
Including the reseed gives a raw ceiling near 2^73.27.

This is not 73-bit cryptographic security. The timer fields are correlated, may occupy much smaller ranges, and can potentially be observed or reconstructed.
reply

I had not read the Block report before. But this changes things.

If the entropy is sourced from timers that count from zero at boot, then an attacker is more likely to find a wallet by brute-forcing small timer values.

And also a correlation between SysTick and RTC might bring the effective bits of entropy down.

reply

This may also be helpful:

source

reply
I think we can use STM32 UIDs to identify legitimate coin owners

That might be hard. Only 32 bits of the UID are used and it's also XORed with SysTick.

pad = UID_low32 ^ SysTick->VAL;

In all fairness I did add this clarification after :p

reply

Ah, thanks! I missed that!

reply

You did not miss anything, I re-wrote the single tweet after replying to Kevin.
You linked the first time i mentioned it.

If you had a geographically distributed multisig where all the keys were generated by CCs, this would be a very unpleasant moment.

reply

If you didn't dice. But even then, think about what it takes to reconstruct a redeemscript. The multisig buys you a few days now. So, better get going.

reply

This comment from ColdCard's micropython:

 #else // MICROPY_HW_ENABLE_RNG

// For MCUs that don't have an RNG we still need to provide a rng_get() function,
// eg for lwIP and random.seed().  A pseudo-RNG is not really ideal but we go with
// it for now, seeding with numbers which will be somewhat different each time.  We
// don't want to use urandom's pRNG because then the user won't see a reproducible
// random stream.
reply

remember, this is exactly the same reason why many people don't want to talk to Voskuil anymore. Same bug error.

reply

Voskuil was before my time. What was that situation like?

reply

I think this was 2021 or 2022 or so, not too long ago...

There was a keygen tool recommendation in mastering bitcoin that was maintained within libbitcoin. At some point, they replaced the (poor) entropy generator, because it could be relatively easily attacked, with a mersenne twister over timestamp (kinda means no entropy) and noted somewhere in the wiki help page to not use it.

However people did use it (after all it was a recommendation from the #1 bitcoin book) and got swept. Similar to this episode.

reply

I was thinking about that earlier.

Also the privacy implications of this might be a bit of a bummer:

reply

Kevin is panicking a bit

reply

Yes, I think he was up all night.

reply

Time for many to get some snores in.

Then in the morning, have a cup of whatever your starter is and perhaps, finally admit that process is everything. Tools are never enough. Not cold cards, not wasabi, not your paper wallet in your sock that you scan with seedsigner.

reply
Why Existing Review Did Not Catch It (the real answer)

Nobody at coinkite is attacking their code with AI, case-in-point:

A few weeks ago, we used one of the best available AI models to review our code for security issues, and it did not find this bug or anything serious.

AI is not just a consultant you book for a weekly review. It can be a 24/7 watchdog that isn't just looking for vague "security issues" whenever someone feels like checking the code. It can wake up automatically every hour and re-write it's own prompts to attack the problem from different sides.

This is how AI-powered attackers find these kinds of vulns. So the defenders should probably get with the times!

reply

actually, entropy was the feature you were missing

reply

Ouch!

reply

Why Existing Review Did Not Catch ItWhy Existing Review Did Not Catch It

Both RNG implementations had the same function signature, and the intended board-specific TRNG code was present in the binary. Existing review verified that code but did not verify end-to-end symbol resolution and call reachability from wallet seed generation.

The relevant preprocessor guard is visible in this section of code:

random.c:22-31

The guard used #ifndef, which tests whether MICROPY_HW_ENABLE_RNG is defined, rather than whether its value is nonzero. We defined that macro as zero, so the #error did not stop the build.

The hotfix now explicitly excludes MicroPython’s fallback PRNG object and adds a build-time RNG symbol check. The build fails unless the board-specific object defines the global rng_get() symbol and the upstream fallback object defines no symbols.

I feel like that last bit should've been part of the package from the beginning. The process should error out if it can't hardware rng generation. There shouldn't have been a fallback to begin with.

reply
There shouldn't have been a fallback to begin with.

It's not the first time I see this in sensitive software/wallet stuff, and it makes me wonder. Why have fallbacks to weak entropy at all?

Genuinely asking from a place of ignorance. Is it for other (less-sensitive than seed creation) functions that need entropy, but occasional weak rng isn't breaking?

reply

It does seem like they could have made a process that would catch this. At the same time, no one else caught it for five years...

reply
Dice rolls are optional and are not required to address this issue.

I'd ignore that "advice" and do them regardless. Even though the RNG gives 32 bits worth of data at a time, it doesn't mean you get 32 bits of actual entropy; any bias in the RNG weakens entropy but not the length of the data it returns. This is tricky to detect.

With dice rolls, preferably with a set not a single one, 99 times, you basically add a whole 256 bits of random that is completely separate from any hardware RNG. More separate sources of entropy = better, as long as the combination mechanism is hardened (i.e. stream it through sha256, which is what coldcard does.)

reply

Milk Sad 2.0

reply

You beat me by 16 seconds. #1536740

reply

how's 49%?

reply

hehe... now to edit the content :P

reply

I have issues too

reply