waxwing's avatar
waxwing 3 months ago
We all (who have tech skills) are at least a little bit at fault. We never developed some kind of norm of: how can you assure your users that their private keys are 'proper'? Were they supposed to look at them? No. If you grab your randomness from the OS, you can't know, via testing, that the result will be random for a *user*, who is using a different machine than you. But why don't they have a simple push button test to check by sampling? Obviously it's a bit harder with HWW but same principle. Actually I'm genuinely curious what people think about that.

Replies (7)

waxwing's avatar
waxwing 3 months ago
Exactly. And where it goes wrong is where the randomness sources are fine (only needs one to be good!) but somehow the logic of combining them gets badly screwed up. 'After the event ' could catch that. But, tricky.
How many random numbers do you need to generate to be able to reasonably verify the distribution is uniform? There could be a well tested lib that does that and that's included by the wallets? I guess the issue is that getting the randomness even for a single number takes too long?
waxwing's avatar
waxwing 3 months ago
Yeah it's very tricky. I'm not sure how to make it practical; it has to be the *souce* value that you're testing for uniformity. It doesn't have to be *perfectly* uniform, or even that close. But it has to be like 100 bits of genuine entropy... note for nonces that would not cut it, but for private keys it does. Not easy!
waxwing's avatar
waxwing 3 months ago
You make some good points. I am leery of this whole 'mix in some more entropy' by adding more steps, however.
hash(0) looks random. Maybe hashing is evil? The entropy has to be inspected pre-hashing? Also if dice roll is the new standard which I hope we won't go for, it has to be standardized so that wallet X generates the same wallet as Y from the same dice roll or else we have no way of checking the working of wallet Y.
I have an intuitive idea what it means for the entropy to not look proper (random enough), but at same time I thought there isn't a way to define such a thing since all values are equally likely
โ†‘