SHA-based subclass for random module

Trevor Perrin trevp at trevp.net
Mon Mar 22 17:08:02 EST 2004


Paul Rubin <http://phr.cx@NOSPAM.invalid> wrote in message news:<7xptbgjpk4.fsf at ruckus.brouhaha.com>...
> http://www.nightsong.com/phr/python/sharandom.c
> 
> This is intended to be less predicable/have fewer correlations than
> the default Mersenne Twister or Wichmann-Hill generators.  Comments
> are appreciated.

Slightly OT, but...

What about a subclass of Random that provides an interface to
platform-specific secure RNGs:
 - /dev/urandom on some unixes
 - CryptGenRandom on windows
 - SecureRandom on Java

I think you've suggested this yourself, a few times.  Is any work
being done in this direction?


Trevor



More information about the Python-list mailing list