FIPS-140-2 and ENT validation vs ring RNG
NIST lists some more test suites. NIST also have their own suite, but it is now Windows-only, and lacks a necessary DLL to run there. The last UNIX version segfaulted here before giving any results... sigh.
I ran the last 10MByte sample against ENT and TestU01... to cut a long story short
$ ./ent ../die.c/dump3 Entropy = 7.999980 bits per byte. Optimum compression would reduce the size of this 10002432 byte file by 0 percent. Chi square distribution for 10002432 samples is 281.26, and randomly would exceed this value 25.00 percent of the times. Arithmetic mean value of data bytes is 127.4958 (127.5 = random). Monte Carlo value for Pi is 3.140111525 (error 0.05 percent). Serial correlation coefficient is -0.000212 (totally uncorrelated = 0.0).7.9999 bits of entropy per byte! TestU01 is less turnkey than the other suites -- it's literally a test library with some example code. I amended an example to call the FIPS-140-2 tests:
So the design's output is compliant to FIPS-140-2, a requirement for many uses.============== Summary results of FIPS-140-2 ============== File: dump3 Number of bits: 20000 Test s-value p-value FIPS Decision -------------------------------------------------------- Monobit 9933 0.83 Pass Poker 11.88 0.69 Pass 0 Runs, length 1: 2482 Pass 0 Runs, length 2: 1227 Pass 0 Runs, length 3: 630 Pass 0 Runs, length 4: 319 Pass 0 Runs, length 5: 161 Pass 0 Runs, length 6+: 166 Pass 1 Runs, length 1: 2466 Pass 1 Runs, length 2: 1302 Pass 1 Runs, length 3: 620 Pass 1 Runs, length 4: 311 Pass 1 Runs, length 5: 140 Pass 1 Runs, length 6+: 146 Pass Longest run of 0: 16 0.14 Pass Longest run of 1: 14 0.46 Pass ---------------------------------------------------------- All values are within the required intervals of FIPS-140-2