4 ms·
Obligatory "How To Safely Generate A Random Number" link[1] that I always wind up posting in threads like these. There's also the getrandom syscall[2] which us
by ryuuchin 10y ago
Obligatory "How To Safely Generate A Random Number" link[1] that I always wind up posting in threads like these. There's also the getrandom syscall[2] which uses the /dev/urandom pool.
[1] http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/ http://sockpuppet.org/blog/2014/02/25/safely-generate-random...
[2] http://man7.org/linux/man-pages/man2/getrandom.2.html http://man7.org/linux/man-pages/man2/getrandom.2.html
- duaneb 10y agoWhy are the man pages not so clear?
- ryuuchin 10y agoI'm not sure. I think part of the problem is that Linux still uses entropy estimation. This is also one of the issues I have with the proposed replacement[1][2] for Linux's current CSPRNG implementation since it still retains entropy estimations. [1] https://lwn.net/Articles/684568/ https://lwn.net/Articles/684568/ [2] https://news.ycombinator.com/item?id=11561340 https://news.ycombinator.com/item?id=11561340 (HN thread for [1])
- disposeofnick9 10y agoBtw Linux / Fortuna http://lkml.iu.edu/hypermail/linux/kernel/0504.1/1964.html http://lkml.iu.edu/hypermail/linux/kernel/0504.1/1964.html
- masklinn 10y ago> There's also the getrandom syscall[2] which uses the /dev/urandom pool. Sadly they just had to include GRND_RANDOM then compound that with GRND_NONBLOCK.