Subject: | |
From: | |
Reply To: | |
Date: | Mon, 21 Jan 2008 13:41:38 +0000 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Sean Luke wrote:
> Mersenne Twister has an internal state of 624 longs. If you fill those
> longs with a poor-entropy value, or successive poor-entropy values,
Didn't spot this when I first read your email; ec.util.MersenneTwister
has an internal state of 624 /ints/, not 624 longs. FastRNG has the same
amount of internal state (in normal mode, slightly more in secure mode),
but as per the MT19937-64 spec it's organised as 312 64-bit values
instead of 624 32-bit ones.
You may be thinking of old C compilers that defined int as 16 bits and
long as 32 bits. The source for the MersenneTwisterFast class has
several instances of 'a = a&0xffffffff' (where a is an int) with the
comment 'for >32 bit machines'. Of course this has no effect in Java
because ints are fixed at 32 bits regardless of size.
Michael Wilson
Software Engineer
Purple Frog Text
|
|
|