DIEHARDER test suite

The first well-known suite of tests for random number generators was George Marsalia’s DIEHARD battery.

The name was a pun on DieHard car batteries.

Robert G.

Brown took over the DIEHARD test suite and called it DIEHARDER, presumably a pun on the Bruce Willis movie.

I’ve written lately about an entropy extractor that creates a stream of unbiased bits from streams of biased bits.

The output passes the NIST STS tests but fails the PractRand tests decisively.

I was curious to see how it did on DIEHARDER, whether the results would be more like STS or like PractRand.

Turns out they’re more like STS.

All tests pass, with the only minor anomaly being that one test out of 114 tests had a “weak” pass.

It’s remarkable that random number generators are even possible.

They’re deterministic programs that produce output that for many practical purposes behaves as if it’s random.

The entropy extractor convincingly imitates random output as far as the DIEHARDER tests are concerned, and as far as the STS tests are concerned, and even 2/3 of the PractRand tests.

The remaining 1/3 of the PractRand tests, however, are not impressed.

It would be too simplistic to say that an RNG is “bad” because it fails a particular test.

It would be even worse to assume and RNG is “good” because it passes a test or suite of tests.

Good and bad depend on suitability for a given tasks.

But all other things being equal, you can have more confidence in a generator that passes more tests.

.

Leave a Reply