New submission from Ivan Anishchuk:

Right now secrets module uses SystemRandom which is hardcoded to use 
os.urandom() which is fine for most users but some have good hardware sources 
of entropy (or otherwise replenish entropy pool) in which case it would be much 
better to use getrandom() with GRND_RANDOM flag i.e. to read from /dev/random 
pool.

Simply subclassing SystemRandom is not enough, the idea is to make it possible 
for every library and program to use the big entropy pool if it's available. So 
I'm thinking it would be best to configure it with an environment variable, 
something like PYTHONTRUERANDOM or PYTHONDEVRANDOM.

Admittedly, only a small subset of users would benefit from this but changes 
required are also small and I'm willing to do all the work here. Are there any 
reason this patch won't be accepted? Any preferences regarding variable name?

----------
components: Library (Lib)
messages: 289410
nosy: IvanAnishchuk
priority: normal
severity: normal
status: open
title: Optional use of /dev/random on linux
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29790>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to