[Q]:Generate Unique ID's

Tim Peters tim.one at comcast.net
Mon May 26 17:55:14 EDT 2003


[Paul Rubin]
> ...
> I think that using the Mersenne twister was a mistake given that it
> replaced the WH generator that was already unsatisfactory.  I think
> they should have stopped fooling around and used a cryptographic RNG.
> Replacing an unsatisfactory RNG with a semi-satisfactory one doesn't
> seem that worthwhile a move.

The bit-for-bit reproducibility of a PRNG is vital in many applications of
RNGs, for debugging and verification.  Cryptography is just one application
of RNGs, and its needs are extreme.  On the box I'm typing at right now (an
866 MHz Pentium III), there's also that the Twister generates pseudo-random
numbers much faster from Python than the Intel HW RNG generates them from
pure C code -- monitoring thermal noise in a physical system is a
time-consuming process.  For most uses of RNGs, I'd much rather have the
speed.  Note that HW RNGs, and the software driving them, aren't immune to
bugs either -- there's no escape from the general rule that an algorithm
relying on RNGs has to be verified by statistical testing, and having
another high-quality source of RNGs is helpful in that even if you intend to
use truly random bits in deployment.






More information about the Python-list mailing list