3 ms·
On Linux /dev/random and /dev/urandom are rather oddly misshapen abstractions. Neither device has sensible behaviour. /dev/random blocks unnecessarily after see
by slavik81 9y ago
On Linux /dev/random and /dev/urandom are rather oddly misshapen abstractions. Neither device has sensible behaviour. /dev/random blocks unnecessarily after seeding, and /dev/urandom doesn't block even if it hasn't been seeded yet. Contrast that with FreeBSD, which provides exactly the behaviour I'd want: block until the RNG has been seeded, then never block again.
- rocqua 9y ago> /dev/random blocks unnecessarily after seeding That's because it's supposed to be a random-number-generator, not a pseudo-random-number-generator. It needs real entropy.
- slavik81 9y agoI am not a cryptographer, but my impression is that the points at which /dev/random stops are not well-justified. It doesn't directly pass out entropy, but instead feeds it through a cryptographically-secure PRNG first, making it a rather arbitrary line that's drawn to decide when entropy is 'exhausted'. There was a brief HN discussion on the topic when FreeBSD made their change: https://news.ycombinator.com/item?id=8550457 https://news.ycombinator.com/item?id=8550457
- paulddraper 9y agoRight, but the point is that the entropy can be reused. I mean, maybe you say that my next 4,096 bits of entropy need to be completely independent from the last 4,096, but ib the usual case, I doubt it.