Re: /dev/random vs. /dev/urandom

Andrew Kuchling <[email protected]>
Newsgroups gmane.comp.python.cryptography
Message-ID <[email protected]>
On Tue, Jun 11, 2002 at 10:27:31AM -0500, Mark McEahern wrote:
>Nonetheless, I noticed in the recently released pycrypto-1.0a2
>(http://www.amk.ca/python/code/crypto.html), the randpool.py initializes
>with /dev/urandom rather than /dev/random.  That leads to two questions:

It uses /dev/urandom simply because urandom won't block; using
/dev/random, the test suite could just hang, waiting for enough
entropy to accumulate.

>1.  Should the selection of which random device to use be optional?

Quite possibly; this is after all a choice of mechanism that users
might not agree with.  I haven't yet come to a decision on this, and
it might well change in 1.9alpha4.  (1.9alpha3 will be coming out
tonight, in order to fix a refcounting error in 1.9a2 that causes core
dumps.)

--amk                                                             (www.amk.ca)
HAMLET: Let me not think on't -- Frailty, thy name is woman!
    -- _Hamlet_, I, ii
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.