Bugs item #1680034, was opened at 2007-03-13 17:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1680034&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Steve Tyler (stephent98)
Assigned to: Nobody/Anonymous (nobody)
Summary: Importing SystemRandom wastes entropy.

Initial Comment:
Importing SystemRandom wastes entropy.
The strace snippet shows a 16 byte read from /dev/urandom, which is presumably 
done to seed a random number generator. However SystemRandom does not need a 
seed, so the read is not needed.

test case:
#!/usr/bin/python
from random import SystemRandom

strace snippet:
open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 4
read(4, "\\\333\277Q\243>K\350 \321\316\26_\271\364~", 16) = 16
close(4)                                = 0

Python version:
python-2.4.4-1.fc6 (Fedora Core 6)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1680034&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to