3 ms·
"/dev/urandom and CryptGenRandom which are known to be good" Check out "A good idea with bad usage: /dev/urandom": http://insanecoding.blogspot.com/2014/05/a-
by miles 11y ago
"/dev/urandom and CryptGenRandom which are known to be good"
Check out "A good idea with bad usage: /dev/urandom":
http://insanecoding.blogspot.com/2014/05/a-good-idea-with-bad-usage-devurandom.html http://insanecoding.blogspot.com/2014/05/a-good-idea-with-ba...
Just stumbled onto it in the new submissions queue:
https://news.ycombinator.com/item?id=11485876 https://news.ycombinator.com/item?id=11485876
- geofft 11y ago... I'm not sure I can take an article seriously that suggests "but what if the attacker can modify files in /dev?". In any case, the meaningful concerns from that article have been addressed with the getrandom syscall on Linux, introduced a few months after this article was written: https://lwn.net/Articles/606141/ https://lwn.net/Articles/606141/ Perhaps we should start saying "getrandom" / "getentropy" instead of "/dev/urandom", but they're the same underlying CSPRNG (although getrandom has the distinct advantage of allowing you to tell if the urandom pool has been initialized, which /dev/urandom doesn't let you do), so I can understand being sloppy with usage. I would sort of assume anyone in a position to patch OpenSSL's RNG either upstream or in a distro is aware of getrandom and why it exists, but maybe that's a bad assumption.
- ryuuchin 11y agoI forgot about the new getrandom syscall but yes that would be preferred if supported.
- maxerickson 11y agoThat article says //Continue filling with other sources where it should say //exit with an error.