by petrosagg on 8/31/15, 8:52 PM with 106 comments
by po on 9/1/15, 12:55 AM
by tytso on 9/1/15, 4:25 AM
http://man7.org/linux/man-pages/man2/getrandom.2.html
With the flags set to zero, it works like the getentropy(2) system call in OpenBSD. In fact, code that uses getentropy(buf, buflen) can be trivially ported to Linux as getrandom(buf, buflen, 0).
by antirez on 9/1/15, 10:36 AM
by AndyKelley on 9/1/15, 1:22 AM
[1]: https://github.com/andrewrk/genesis/blob/0d545d692110d33068d...
by msm23 on 9/1/15, 3:15 AM
The excerpt below is from https://www.nsa.gov/ia/_files/factsheets/I43V_Slick_Sheets/S... (which in turn also references https://www.nsa.gov/ia/_files/factsheets/I43V_Slick_Sheets/S... )
Unix-like Platforms (e.g. Linux, Android, and Mac OS X):
Application developers should use the fread function to read random bytes from /dev/random for cryptographic RNG services. Because /dev/random is a blocking device, /dev/random may cause unacceptable delays, in which case application developers may prefer to implement a DRBG using /dev/random as a conditioned seed.
Application developers should use the “Random Number Generators: Introduction for Operating System Developers” guidance in developing this solution. If /dev/random still produces unacceptable delays, developers should use /dev/urandom which is a non-blocking device, but only with a number of additional assurances:
- The entropy pool used by /dev/urandom must be saved between reboots. - The Linux operating system must have estimated that the entropy pool contained the appropriate security strength entropy at some point before calling /dev/urandom. The current pool estimate can be read from /proc/sys/kernel/random/entropy_avail.
At most 2^80 bytes may be read from /dev/urandom before the developer must ensure that new entropy was added to the pool.
by panic on 9/1/15, 1:58 AM
by aidenn0 on 9/1/15, 12:14 AM
by 1_player on 9/1/15, 1:56 PM
I know that a PRNG is predictable if you know all the input variables, and the code for it is publicly available, but has anybody in practice been able to exploit that?
EDIT: that's an honest question. I'd like to read a paper about that.
by theophrastus on 9/1/15, 1:27 AM
[1]: http://www.linuxplanet.com/news/linux-4.2-released-improving...
by snorrah on 9/1/15, 1:47 AM
by vbezhenar on 9/1/15, 8:48 PM
Fun thing is, if you pass "/dev/urandom" to this parameter, Java will read /dev/random anyway. May be that was a wise decision 20 years ago.
by wangweij on 9/1/15, 2:28 AM
by frankzinger on 9/1/15, 5:30 AM