[Python-ideas] Should our default random number generator be secure?

Sturla Molden sturla.molden at gmail.com
Tue Sep 15 16:54:13 CEST 2015


On 15/09/15 16:20, M.-A. Lemburg wrote:

> http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/M062821.pdf
> (which again refers to this paper:
> http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/HONGKONG/hong-fin4.pdf)

You seem to be confusing the DCMT with the SFMT which is a fast SIMD 
friendly Mersenne Twister.

The DCMT is intended for using the Mersenne Twister in parallel 
computing (i.e. one Mersenne Twister per processor). It is not a 
Mersenne Twister accelerated with parallel hardware. That would be the 
SFMT.

http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/DC/dc.html
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/DC/dgene.pdf

The period for the DC Mersenne Twisters they report are long enough, 
e.g. 2^127-1 or 2^521-1, but much shorter than the period of MT19937 
(2^19937-1). This does not matter because the period of MT19937 is 
excessive. In scientific computing, the sequence is long enough for most 
practical purposes if it is larger than 2^64. 2^127-1 is more than 
enough, and this is the shortest period DCMT reported in the paper. So 
do we care? Probably not.


Sturla



More information about the Python-ideas mailing list