[Python-Dev] RNG in the core

Antoine Pitrou solipsis at pitrou.net
Tue Jan 3 18:46:05 CET 2012


On Tue, 03 Jan 2012 14:18:34 +0100
Christian Heimes <lists at cheimes.de> wrote:
> 
> I suggest Python/random.c as source file and Python/pyrandom.h as header
> file. Comments?

Looks good on the principle. The API names for MT are a bit ugly.

> The RNG should be suitable for cryptography.

Sounds like too strong a requirement. For cryptography, we have the ssl
module (and third-party libraries).
(also, "suitable for cryptography" is somewhat vague; for example, the
Linux man pages insist that /dev/urandom is ok for session keys
but /dev/random is needed for long-lived private keys)

Regards

Antoine.




More information about the Python-Dev mailing list