SHA-based subclass for random module
Paul Rubin
http
Mon Mar 22 18:04:14 EST 2004
trevp at trevp.net (Trevor Perrin) writes:
> 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?
I think it's extremely desirable and important to add such an
interface, and maybe it should go in the random module, but it
shouldn't be a subclass of Random. Random is intended to be a
deterministic generator.
I have a pretty dim view of the built-in SecureRandom that comes with
Java (the one that works by counting thread switches per second) but I
guess it can also be subclassed to use better sources of entropy.
More information about the Python-list
mailing list