News for hackers. Stuff that matters.
Re:Specific Problems with Other RNGs by dspillett on Wednesday November 11, 2015 @11:07AM (#10547307)
Produce a set of random numbers once and store them as part of the test set. That way your test is independent of the black box which is your RNG. Or make your own simple RNG - in these cases you are looking for "arbitrary, definitely not just sequential" rather than cryptographically random (or, indeed, truly random at all).

If you rely on the order of the output, for reliably consistent test cases in this instance, avoid using black-box RNGs which could change implementation under your nose without much or any warning.

Re:Specific Problems with Other RNGs by Veedrac on Wednesday November 11, 2015 @04:44PM (#10549553)
Cryptographically random isn't the aim here - pseudorandom is.

A seedable black-box RNG that guarantees what seed corresponds to what stream is way simpler to use than a list of random numbers, IMHO. It's the difference between copying one number and copying a million.

Re:Specific Problems with Other RNGs by dspillett on Thursday November 12, 2015 @04:55AM (#10552199)
> Cryptographically random isn't the aim here

We are agreeing here.

> A seedable black-box RNG that guarantees what seed corresponds

If you can control when the blackbox gets updated, or the blackbox carries a guarantee of stable output for any given seed over the while time of its existence, yes. But if you are using OS provided RNGs, as a for instance, their behaviour is not defined (well they are, but those definitions are not set in stone) and may change as kernel updates happen.

That is why I suggest "making your own simple PRNG". This could be as simple as picking a known documented algorithm as implemented by a particular library and using that in your test cases - it doesn't need to be as much as writing your own function even.

Re:Specific Problems with Other RNGs by Veedrac on Thursday November 12, 2015 @06:33AM (#10552540)
Right... but nobody's suggesting replacing the OS's RNG.