How random is the uranda?

On Linux, how random is /dev/urandom/ ? Is it considered safe?

Also can I get a stream of 1?

+7
linux random entropy
source share
3 answers

Note 4.5 years later: this is bad advice. See these links for more details.

If you create cryptographic keys in Linux, you want /dev/random , even if it blocks - you do not need so many bits.

For anything, for example, to generate random test data or unpredictable session identifiers, /dev/urandom is fine. Most systems have enough sources of entropy (keyboard and mouse event times, network packets, etc.) that the output will be unpredictable.

+9
source share

Please view the man page :

 Yarrow is a fairly resilient algorithm, and is believed to be resistant to non-root. The quality of its output is however dependent on regular addition of appropriate entropy. If the SecurityServer system daemon fails for any reason, output quality will suffer over time without any explicit indication from the random device itself. Paranoid programmers can counteract this risk somewhat by collecting entropy of their choice (eg from keystroke or mouse timings) and seed- ing it into random directly before obtaining important random numbers. 
+4
source share

use / dev / urandom, its cryptographically secure.

good read: http://www.2uo.de/myths-about-urandom/

"If you are not sure whether to use / dev / random or / dev / urandom, then you probably want to use the latter.

When you doubt early loading, you have enough entropy. use the getrandom() system call getrandom() . [1] He blocks his best of both worlds until (only once!) Enough entropy, after which he will never be blocked again.

[1] git kernel transfer

0
source share

All Articles