This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author IvanAnishchuk
Recipients IvanAnishchuk
Date 2017-03-10.20:53:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1489179183.06.0.602244031276.issue29790@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2017-03-10 20:53:03IvanAnishchuksetrecipients: + IvanAnishchuk
2017-03-10 20:53:03IvanAnishchuksetmessageid: <1489179183.06.0.602244031276.issue29790@psf.upfronthosting.co.za>
2017-03-10 20:53:03IvanAnishchuklinkissue29790 messages
2017-03-10 20:53:02IvanAnishchukcreate