3 ms·
Thinking out loud here: 1 - try to read from /dev/random. 2 - While 1 has not succeeded, wait and try again 3 - Once it has succeeded, read from /dev/urandom
by raverbashing 11y ago
Thinking out loud here:
1 - try to read from /dev/random.
2 - While 1 has not succeeded, wait and try again
3 - Once it has succeeded, read from /dev/urandom on next reads
- loup-vaillant 11y agoI've heard that reading from /dev/random tends to "steal" entropy from /dev/urandom or something. I'm not sure. But if you only use urandom, you're safe. Here, from a quick search: http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/ http://sockpuppet.org/blog/2014/02/25/safely-generate-random... http://www.2uo.de/myths-about-urandom/ http://www.2uo.de/myths-about-urandom/
- raverbashing 11y agoThen you came to a different conclusion than me, because the text say a lot of times to use urandom There's no stealing with entropy. And once random returns a read the RNG is seeded, period.
- loup-vaillant 11y agoMy memories are foggy, unreliable, and out of date. I did say I was not sure…