[Python-Dev] RNG in the core

Matthieu Brucher matthieu.brucher at gmail.com
Tue Jan 3 22:00:43 CET 2012


> The core RNG is going to be part of the randomized hashing function
> patch. The patch will be applied to all Python version from 2.6 to 3.3.
> Some people may want to applied it to 2.4 and 2.5, too. As the patch is
> going to affect six to eight Python versions, it should introduce as few
> new code as possible. Any new code might be a source of new bugs. The
> Mersenne Twister code is mature and works sufficiently as backup.
>
> Any new RNG should go through a PEP process, too. You are welcome to
> write a PEP and implement an additional RNG for the random module. New
> developers and new ideas are well received.
>

Good point.
In fact, these RNG are 100% based on the hash functions provided for
instance by OpenSSL. But I think this library is not a dependency so my
proposal still has the same impact.
The Random123 library is a reimplementation of some cryptographic functions
with two arguments, the key and the counter, and that's it. So if there is
somewhere in the Python C code such cryptographic function, it can be
reused to create Crush-resistant random numbers with no new code line.

Cheers,

Matthieu
-- 
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120103/83002103/attachment-0001.html>


More information about the Python-Dev mailing list