Of the use of unpredictableSeed

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Sun Mar 5 12:21:35 PST 2017


On Sunday, 5 March 2017 at 15:30:29 UTC, Andrei Alexandrescu 
wrote:
> Another good thing pointed by the article would be to use the 
> Mersenne twister for unpredictableSeed, which would make it 
> difficult to infer the sequence from a few samples. Please 
> share if that would be a good thing to do.

"From just a few samples" yes, but in general the internal state 
of Mersenne twister is easy to reverse – e.g. check out 
https://github.com/fx5/not_random for a nice little demonstration.

IMHO there is no problem with unpredictableSeed not being 
cryptographically secure, as long as the docs point out it is not 
to be used anywhere near where a CSPRNG should be. But I'm hardly 
an expert either.

  — David


More information about the Digitalmars-d mailing list