It’s still early, but it’s not at all the case that we cant learn anything from this and do better. If I were a hardware wallet manufacturer, I think my takeaways/changes I’d make are:
1) insecure fallbacks or hashing in weak entropy should be explicitly verboten. Unless it’s 96 bits or higher, do not include it!
2) Anything generating keys on an embedded device should have at least two random inputs and should check them with even basic randomness tests. This requires pulling lots of extra bits in before they’ve been whitened which isn’t possible on all hardware, but hardware that does whitening usually will do tests for you so make sure you’re checking it! nevent1qqstx…4q9vun
3. (Obviously) Everyone should be doing regular LLM reviews of software and firmware.
4. HWWs should have an explicit QA step where each input to the RNG is logged and the result of adding those inputs together to build a seed is done on a separate device with a reimplementation and compared against the device's seed. This should be done for each firmware release.
I doubt almost any HWWs today do 2&4.
Sjors Provoost
sjors@sprovoost.nl
Re (1): perhaps devices should collect 128 bits of entropy independent of their secure enclave. That can be from multiple sources, but they have to add up. Like in the old PGP days, it could require the user to do something random. A cheap accelerometer plus the instruction to shake, should be intuitive and quick enough?
Sure, that’s a reasonable approach. Even just two HWRNGs (they’re cheap!) is better than one.
In the case of cc, have to hwrngs and actually use them!
That’s what suggestions 1,3, and 4 are meant to address.
You can check each individual source against its required minimum entropy. That seems better than not using a source entirely just because it's not enough on its own.
I dunno about that. If you have a source that’s just 32 bits (eg device ID) it’s not clear to me it’s worth including. Yes, if you screw everything else up it might save you, but in nearly every instance of weak entropy wallets a defining feature was some low entropy 32 bit counter that hid the bug. It seems like it’s worth banning this.