News for hackers. Stuff that matters.
Re:Randomness in .NET by Insanity on Tuesday August 28, 2018 @06:41AM (#17857762)
I might be missing something, but the three predicated values are not in the "nextSeed" table? Whereas the original three are.

EDIT: I feel like I miss something in the explanation. Can anyone explain how the seed table is actually used?

Re:Randomness in .NET by lowleveldesign on Tuesday August 28, 2018 @06:57AM (#17857835)
The seed array is an internal state of the PRNG algorithm. It evolves over time and PRNG uses values from this array (plus some additional parameters, such as inext or inextp) to generate new "random" numbers. Thus, after seeding, there is no real randomness in the non-cryptographic PRNGs. To learn more, have a look at Marsenne Twister, which is also quite popular and has a nice description in Wikipedia [1].

[1] https://en.wikipedia.org/wiki/Mersenne_Twister

Re:Randomness in .NET by Insanity on Tuesday August 28, 2018 @07:31AM (#17857965)
Thanks for the link! I kind of figured it out over time, but the explanation helps!

And thanks for the interesting article btw, just realised you're the author :-)

Re:Randomness in .NET by lowleveldesign on Tuesday August 28, 2018 @08:03AM (#17858126)
Thanks :)
Re:Randomness in .NET by Insanity on Tuesday August 28, 2018 @06:54AM (#17857821)
Edit again: I think I figured it out(?). The previous values are 'recorded' in the seed array, but the last one (2012846163) is what you put the offset to for generating the next one. The next one is generated and in it's turn becomes the 'seed' etc. So the new values wouldn't be in the array _yet_ at the point we inspected. But all we have to do is 'replay' the RNG starting at the 'previous recorded value' to be predicting it correctly?