[issue21305] PEP 466: update os.urandom

Charles-François Natali report at bugs.python.org
Mon Apr 28 13:51:11 CEST 2014


Charles-François Natali added the comment:

> "Depleting" /dev/urandom isn't actually a thing. /dev/urandom on all modern *nix OSs uses a fast PRNG which is secure as long as it has received enough bytes of initial entropy.

I didn't say "deplete /dev/urandom", I said that when reading from
/dev/urandom "you're depleting your entropy pool". So reading from
/dev/urandom won't block, but it can starve processes that read from
/dev/random, and that's a problem.

See https://groups.google.com/forum/#!msg/fa.linux.kernel/Ocl01d8TzT0/KDCon2ZUm1AJ

I think since 2.6 Linux uses two different entropy pools for
/dev/random and /dev/urandom, but that might not be true for every OS.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21305>
_______________________________________


More information about the Python-bugs-list mailing list