What is Nostr?
waxwing /
npub1vad…nuu7
2023-08-09 15:37:22

waxwing on Nostr: It took a bit of digging but I believe this is the commit that introduced the use of ...

It took a bit of digging but I believe this is the commit that introduced the use of MT19937 into libbitcoin:

https://github.com/libbitcoin/libbitcoin-system/commit/6d5a06e283d81260165e0eab95175069bf03b408

I would like to hear from Eric what was the thought process behind this.

It's widely known (and certainly was, back then) that seeding a PRNG with a mersenne twister is not cryptographically secure. In the case of 32 bit MT19937 it's even comically insecure as you can just brute force every possible seed (you can also 'play back' earlier MT output if you see enough outputs in sequence).

But, the thing is, in that commit you can see that the approach taken is to use uniform_int_distribution taken from the std library, then seed it. As far as I can tell this function is platform dependent/implementation dependent and certainly not claimed to be cryptographically secure. What is going on here? Was there never an attempt in libbitcoin to use cryptographically secure random numbers? There is probably a bit more to the story.
Author Public Key
npub1vadcfln4ugt2h9ruwsuwu5vu5am4xaka7pw6m7axy79aqyhp6u5q9knuu7