[Python-ideas] Should our default random number generator be secure?

Stefan Krah skrah at bytereef.org
Thu Sep 10 18:32:13 CEST 2015


M.-A. Lemburg <mal at ...> writes:
> On 10.09.2015 15:39, Stefan Krah wrote:
> > M.-A. Lemburg <mal <at> ...> writes:
> >>  1. Someone goes and implements the OpenBSD random function in C
> >>     and put a package up on PyPI, updating it whenever OpenBSD
> >>     thinks that a new algorithm is needed or a security issue
> >>     has to be fixed (from my experience with other crypto software
> >>     like OpenSSL, this should be on the order of every 2-6 months )
> > 
> > The sane option would be to use the OpenBSD libcrypto, which seems to
> > be part of their OpenSSL fork (libressl), just like libcrypto is part
> > of OpenSSL.
> 
> Well, we already link to OpenSSL for SSL and hashes. I guess exposing
> the OpenSSL RAND interface in a module would be the easiest way
> to go about this.

Yes, my suggestion was based on the premise that OpenBSD's libcrypto
(which should include the portable arc4(chacha20)random) is more
secure, faster, etc.

That's a big 'if', their PRNG had a couple of bugs on Linux last year,
but OpenSSL also regularly has issues.


Stefan Krah




More information about the Python-ideas mailing list