2
$\begingroup$

Basic question: ENT seems to trip up generators that pass NIST 800-22 and maybe even dieharder. How do the latter two test suites miss such an obvious failure?

There are two things I want to mention about the well-known randomness test suite ENT, which is, as far as I understand, considered to be far less rigorous than test suites like NIST SP 800-22 and diehard(er).

I've applied ENT, the NIST test suite, and dieharder to my own TRNG throughout different stages of development, both with and without post-processing, etc. Eventually, I got to a stage where the TRNG consistently passed the NIST test suite—both their official implementation and a third party one I found on github. I was pretty rigorous with the testing, looking for any indications the test gave for non-randomness, plotting p-values, etc., but the TRNG consistently passed easily as far as I can tell. As for dieharder, the large data requirements that have been discussed on this forum made that difficult, but here too it seems that I was able to get the TRNG to pass at a similar rate as other "gold standard" PRNGs (in the words of the creators of the test suite).

I was surprised then to see that the generator (at one point in development when it passed NIST) consistently failed the ENT Chi squared tests, with a summary that the Chi squared statistic "would exceed this value 0.01 percent of the times," i.e. a p-value of 1e-4. This is the same generator that handily passed NIST 800-22 and almost dieharder - although here it seemed to get tripped up a bit by dieharder, but not severely.


I noticed that Hotbits, who's methodology/results have been praised on this forum, have what seems to be a failing Chi squared test with ENT displayed on their statistics page. It is the same type of failure I mentioned earlier: a Chi squared test statistic with a p-value of 1e-4, if I understand correctly. Indeed, per the ENT website, "If the percentage is greater than 99% or less than 1%, the sequence is almost certainly not random." In fact that wording seems a bit odd to me, since we would expect to see a p-value > .99 or < .01 exactly 2% of the time for an ideal generator, but the point stands and the p-value of 1e-4 is quite a bit lower.

So both my RNG and the Hotbits RNG seem to pass NIST and dieharder pretty easily, only to be tripped up by the ENT Chi squared tests.


My question: How would the NIST test suite let a generator off the hook that fails a basic Chi squared test as in ENT? Am I missing something or misunderstanding ENT's Chi squared test?


Side notes:

  • I linked to someone on the forum "praising" the results of Hotbits, and they themselves ran ENT on some of their data. The ENT results they presented were indeed passes, with a reasonable Chi squared test statistic. I haven't tested any of their data myself, I just noticed the 1e-4 p-value on their site front and center, hence the post.

  • I noticed that Fourmilab maintains both hotbits and ENT.. Not sure where this fact fits in.


Edit: I've since thought about this a little more, and done some plotting of the distribution of my RNG, and sure enough typically one byte value is quite a bit more likely than the others. Not a ton—the difference is small enough to still get a min-entropy upwards of 7.9 bits/byte—but it is noticable. First, I imagine the reason it might not show up in NIST is because the test is done on multiple bit streams (at least that's the way I've applied it), and this "splitting up" of the data would reduce the effect on individual segments. As for dieharder I am not sure.

It seems like the phenomenon I observe, where one byte is more likely than the others by enough to give the Chi squared test statistic of 1e-4, would be the main thing to cause such a test statistic. After all, the test statistic is a normalized sum of squares, so intuitively it is inordinate empirical probabilities like that that really throw the test statistic off. I wonder if Hotbits experiences something similar ...

$\endgroup$
1
  • $\begingroup$ Adam, I'm excited about your TRNG and would love to know more. A schematic would be great. But your question is getting a little bit complicated, especially with the robo-bots. Speak... $\endgroup$
    – Paul Uszak
    Commented Jun 10, 2022 at 7:20

1 Answer 1

1
$\begingroup$

Well spotted, I hadn't noticed that. Yes, ent is the most robust randomness test out there whilst not necessarily being the most sophisticated, But look at this bit wise ent test of your Hotbits file:-

ent -b /tmp/hotbits
Entropy = 1.000000 bits per bit.

Optimum compression would reduce the size
of this 91750400 bit file by 0 percent.

Chi square distribution for 91750400 samples is 0.05, and randomly
would exceed this value 81.93 percent of the times.

Arithmetic mean value of data bits is 0.5000 (0.5 = random).
Monte Carlo value for Pi is 3.141486168 (error 0.00 percent).
Serial correlation coefficient is -0.000773 (totally uncorrelated = 0.0).

Notice the -b flag. The above is a clear pass. And so is this NIST test of exactly the same sample set (if you only test 10 number bit streams of 1,000,000 bits):-

------------------------------------------------------------------------------
RESULTS FOR THE UNIFORMITY OF P-VALUES AND THE PROPORTION OF PASSING SEQUENCES
------------------------------------------------------------------------------
   generator is </tmp/hotbits>
------------------------------------------------------------------------------
 C1  C2  C3  C4  C5  C6  C7  C8  C9 C10  P-VALUE  PROPORTION  STATISTICAL TEST
------------------------------------------------------------------------------
  0   0   2   1   3   1   0   0   0   3  0.122325     10/10      Frequency
  0   1   0   2   2   0   1   3   1   0  0.350485     10/10      BlockFrequency
  0   0   1   2   1   0   2   1   1   2  0.739918     10/10      CumulativeSums
  1   0   1   2   0   0   2   1   0   3  0.350485     10/10      CumulativeSums
  3   2   1   1   0   1   0   0   0   2  0.350485      8/10      Runs
  0   0   1   3   1   1   1   3   0   0  0.213309     10/10      LongestRun
  2   1   1   0   2   1   1   0   2   0  0.739918     10/10      Rank
  2   0   1   2   0   3   0   1   1   0  0.350485     10/10      FFT
  0   2   0   1   0   0   0   1   2   4  0.066882     10/10      NonOverlappingTemplate
  1   1   1   2   0   0   0   1   2   2  0.739918     10/10      NonOverlappingTemplate
  0   1   1   3   0   0   2   2   0   1  0.350485     10/10      NonOverlappingTemplate
  2   0   0   2   1   1   0   2   1   1  0.739918      9/10      NonOverlappingTemplate
  0   0   1   0   2   2   0   1   1   3  0.350485     10/10      NonOverlappingTemplate
  1   2   1   1   0   3   1   0   1   0  0.534146     10/10      NonOverlappingTemplate
  1   0   3   2   1   1   0   1   1   0  0.534146     10/10      NonOverlappingTemplate
  2   0   1   0   0   4   2   0   0   1  0.066882     10/10      NonOverlappingTemplate
  0   2   1   2   1   1   2   1   0   0  0.739918     10/10      NonOverlappingTemplate
  0   3   0   4   0   0   0   0   2   1  0.017912     10/10      NonOverlappingTemplate
  0   1   3   1   1   0   1   1   2   0  0.534146     10/10      NonOverlappingTemplate
  2   0   0   2   1   1   2   1   1   0  0.739918     10/10      NonOverlappingTemplate
  1   2   0   3   0   1   1   1   0   1  0.534146     10/10      NonOverlappingTemplate
  2   2   0   1   0   1   0   2   2   0  0.534146      9/10      NonOverlappingTemplate
  1   1   1   0   3   1   0   2   1   0  0.534146      9/10      NonOverlappingTemplate
  0   1   2   2   1   2   0   0   1   1  0.739918     10/10      NonOverlappingTemplate
  1   0   0   2   2   0   1   2   1   1  0.739918     10/10      NonOverlappingTemplate
  2   0   3   0   0   0   1   2   1   1  0.350485      9/10      NonOverlappingTemplate
  1   1   1   2   2   0   1   1   0   1  0.911413     10/10      NonOverlappingTemplate
  2   3   1   0   2   0   1   0   0   1  0.350485     10/10      NonOverlappingTemplate
  1   3   1   0   2   1   1   1   0   0  0.534146     10/10      NonOverlappingTemplate
  1   2   1   1   1   1   1   2   0   0  0.911413     10/10      NonOverlappingTemplate
  5   0   0   1   1   1   0   2   0   0  0.008879     10/10      NonOverlappingTemplate
  0   2   1   1   0   1   1   1   1   2  0.911413     10/10      NonOverlappingTemplate
  0   1   1   0   3   1   1   1   2   0  0.534146     10/10      NonOverlappingTemplate
  1   1   1   1   3   0   0   2   0   1  0.534146      9/10      NonOverlappingTemplate
  1   1   2   1   1   1   0   1   1   1  0.991468     10/10      NonOverlappingTemplate
  1   0   2   3   0   0   0   2   0   2  0.213309     10/10      NonOverlappingTemplate
  1   2   0   1   0   0   1   2   1   2  0.739918     10/10      NonOverlappingTemplate
  0   1   1   0   2   0   0   1   4   1  0.122325     10/10      NonOverlappingTemplate
  0   0   1   2   1   3   0   2   1   0  0.350485     10/10      NonOverlappingTemplate
  0   2   1   2   1   0   1   1   2   0  0.739918     10/10      NonOverlappingTemplate
  2   2   0   1   0   0   1   1   2   1  0.739918      9/10      NonOverlappingTemplate
  2   1   2   0   2   1   0   1   1   0  0.739918      9/10      NonOverlappingTemplate
  2   1   2   0   0   3   1   0   1   0  0.350485     10/10      NonOverlappingTemplate
  2   0   1   0   3   1   1   0   1   1  0.534146     10/10      NonOverlappingTemplate
  2   2   1   1   0   2   0   0   1   1  0.739918     10/10      NonOverlappingTemplate
  0   0   0   4   1   1   1   1   1   1  0.213309     10/10      NonOverlappingTemplate
  3   1   0   1   0   0   3   0   2   0  0.122325      9/10      NonOverlappingTemplate
  0   2   1   1   1   1   1   2   1   0  0.911413     10/10      NonOverlappingTemplate
  0   3   2   2   0   1   0   0   1   1  0.350485     10/10      NonOverlappingTemplate
  1   0   1   3   0   2   1   1   0   1  0.534146      9/10      NonOverlappingTemplate
  1   2   1   1   0   2   0   0   1   2  0.739918     10/10      NonOverlappingTemplate
  2   2   0   2   1   0   2   0   0   1  0.534146     10/10      NonOverlappingTemplate
  0   1   1   2   2   0   1   2   1   0  0.739918     10/10      NonOverlappingTemplate
  0   1   1   2   0   2   1   1   1   1  0.911413     10/10      NonOverlappingTemplate
  4   0   0   1   1   0   1   3   0   0  0.035174     10/10      NonOverlappingTemplate
  0   4   1   1   0   0   2   2   0   0  0.066882     10/10      NonOverlappingTemplate
  1   0   3   1   1   2   1   0   1   0  0.534146     10/10      NonOverlappingTemplate
  1   1   0   1   1   1   1   1   1   2  0.991468     10/10      NonOverlappingTemplate
  2   2   2   1   0   1   0   0   1   1  0.739918     10/10      NonOverlappingTemplate
  1   1   0   1   2   1   2   0   1   1  0.911413     10/10      NonOverlappingTemplate
  1   1   0   0   2   1   2   2   1   0  0.739918     10/10      NonOverlappingTemplate
  1   0   2   1   1   0   2   2   1   0  0.739918     10/10      NonOverlappingTemplate
  3   1   1   1   0   1   1   1   1   0  0.739918     10/10      NonOverlappingTemplate
  2   0   2   2   1   2   0   1   0   0  0.534146     10/10      NonOverlappingTemplate
  2   1   2   1   0   1   2   0   0   1  0.739918     10/10      NonOverlappingTemplate
  2   2   0   0   0   1   3   1   0   1  0.350485     10/10      NonOverlappingTemplate
  1   1   1   1   2   2   1   0   1   0  0.911413     10/10      NonOverlappingTemplate
  1   2   1   3   0   0   0   1   1   1  0.534146     10/10      NonOverlappingTemplate
  0   1   1   2   0   0   2   1   2   1  0.739918     10/10      NonOverlappingTemplate
  0   1   2   0   3   0   2   1   0   1  0.350485     10/10      NonOverlappingTemplate
  0   2   0   3   1   0   1   2   0   1  0.350485     10/10      NonOverlappingTemplate
  1   0   1   1   2   1   0   0   4   0  0.122325      9/10      NonOverlappingTemplate
  2   2   1   1   0   1   0   2   1   0  0.739918      9/10      NonOverlappingTemplate
  1   1   2   0   3   1   1   1   0   0  0.534146     10/10      NonOverlappingTemplate
  1   1   1   0   1   2   1   0   2   1  0.911413     10/10      NonOverlappingTemplate
  1   0   1   1   1   3   1   1   0   1  0.739918      9/10      NonOverlappingTemplate
  0   0   0   1   0   1   3   1   0   4  0.035174     10/10      NonOverlappingTemplate
  2   3   0   0   0   2   1   0   1   1  0.350485      9/10      NonOverlappingTemplate
  0   0   0   0   1   3   2   2   1   1  0.350485     10/10      NonOverlappingTemplate
  2   0   2   1   2   0   0   0   0   3  0.213309     10/10      NonOverlappingTemplate
  0   1   1   0   2   1   1   1   1   2  0.911413     10/10      NonOverlappingTemplate
  2   0   2   1   1   0   2   0   1   1  0.739918     10/10      NonOverlappingTemplate
  0   2   0   1   0   0   0   1   2   4  0.066882     10/10      NonOverlappingTemplate
  1   1   2   0   0   4   1   1   0   0  0.122325     10/10      NonOverlappingTemplate
  3   1   0   1   0   1   0   3   1   0  0.213309     10/10      NonOverlappingTemplate
  1   0   1   2   1   1   1   0   1   2  0.911413     10/10      NonOverlappingTemplate
  3   1   2   1   1   0   2   0   0   0  0.350485     10/10      NonOverlappingTemplate
  2   0   2   1   1   0   0   2   2   0  0.534146     10/10      NonOverlappingTemplate
  0   3   1   2   2   0   1   0   0   1  0.350485     10/10      NonOverlappingTemplate
  1   2   1   4   1   1   0   0   0   0  0.122325     10/10      NonOverlappingTemplate
  1   2   1   3   0   1   0   1   0   1  0.534146     10/10      NonOverlappingTemplate
  0   1   4   0   0   1   0   1   1   2  0.122325     10/10      NonOverlappingTemplate
  0   2   0   0   1   1   1   3   1   1  0.534146     10/10      NonOverlappingTemplate
  1   0   2   1   0   1   1   0   2   2  0.739918     10/10      NonOverlappingTemplate
  1   3   2   2   1   1   0   0   0   0  0.350485     10/10      NonOverlappingTemplate
  2   3   2   2   0   1   0   0   0   0  0.213309     10/10      NonOverlappingTemplate
  2   1   1   0   1   3   2   0   0   0  0.350485     10/10      NonOverlappingTemplate
  1   0   3   0   1   0   2   0   2   1  0.350485      9/10      NonOverlappingTemplate
  1   1   1   0   4   0   1   0   0   2  0.122325     10/10      NonOverlappingTemplate
  0   0   0   1   0   1   1   0   3   4  0.035174     10/10      NonOverlappingTemplate
  0   4   2   0   1   0   0   1   1   1  0.122325     10/10      NonOverlappingTemplate
  0   1   3   1   2   1   0   1   0   1  0.534146     10/10      NonOverlappingTemplate
  1   0   2   1   1   1   2   1   1   0  0.911413     10/10      NonOverlappingTemplate
  2   1   0   0   1   0   0   3   1   2  0.350485     10/10      NonOverlappingTemplate
  0   1   1   1   1   1   2   1   1   1  0.991468     10/10      NonOverlappingTemplate
  1   1   3   1   0   2   1   0   1   0  0.534146     10/10      NonOverlappingTemplate
  2   1   1   0   2   2   0   0   0   2  0.534146     10/10      NonOverlappingTemplate
  2   0   0   1   3   0   1   0   2   1  0.350485      8/10      NonOverlappingTemplate
  2   1   1   0   1   1   0   1   2   1  0.911413      9/10      NonOverlappingTemplate
  1   1   2   0   1   2   0   1   1   1  0.911413     10/10      NonOverlappingTemplate
  0   1   3   0   1   2   1   1   1   0  0.534146     10/10      NonOverlappingTemplate
  0   0   2   1   2   0   0   1   2   2  0.534146     10/10      NonOverlappingTemplate
  2   0   1   1   1   1   0   3   1   0  0.534146      9/10      NonOverlappingTemplate
  0   0   4   2   1   0   1   0   1   1  0.122325     10/10      NonOverlappingTemplate
  3   1   0   0   3   0   1   2   0   0  0.122325     10/10      NonOverlappingTemplate
  1   2   1   1   2   1   0   1   1   0  0.911413     10/10      NonOverlappingTemplate
  2   1   1   1   2   0   0   2   0   1  0.739918      9/10      NonOverlappingTemplate
  2   2   0   1   0   2   1   1   0   1  0.739918     10/10      NonOverlappingTemplate
  0   2   0   0   0   2   2   1   2   1  0.534146     10/10      NonOverlappingTemplate
  1   1   2   3   1   2   0   0   0   0  0.350485     10/10      NonOverlappingTemplate
  0   1   1   0   2   0   1   2   1   2  0.739918     10/10      NonOverlappingTemplate
  2   1   2   0   0   2   0   1   1   1  0.739918      9/10      NonOverlappingTemplate
  1   1   0   1   3   2   0   1   1   0  0.534146     10/10      NonOverlappingTemplate
  0   2   0   2   1   2   1   0   1   1  0.739918     10/10      NonOverlappingTemplate
  2   1   0   1   0   2   1   1   2   0  0.739918     10/10      NonOverlappingTemplate
  1   0   1   0   4   2   0   1   0   1  0.122325     10/10      NonOverlappingTemplate
  1   2   0   0   0   4   1   0   0   2  0.066882     10/10      NonOverlappingTemplate
  2   1   0   0   3   0   1   1   1   1  0.534146      9/10      NonOverlappingTemplate
  3   1   0   0   2   1   0   2   0   1  0.350485     10/10      NonOverlappingTemplate
  1   0   1   1   0   1   1   1   2   2  0.911413     10/10      NonOverlappingTemplate
  0   2   1   0   2   0   0   0   3   2  0.213309     10/10      NonOverlappingTemplate
  0   0   2   1   2   3   0   1   1   0  0.350485     10/10      NonOverlappingTemplate
  1   1   0   2   2   1   2   0   0   1  0.739918     10/10      NonOverlappingTemplate
  4   0   1   1   1   0   1   1   1   0  0.213309      9/10      NonOverlappingTemplate
  1   0   2   0   0   2   1   3   0   1  0.350485     10/10      NonOverlappingTemplate
  1   1   0   1   2   0   0   2   3   0  0.350485     10/10      NonOverlappingTemplate
  1   0   2   2   0   2   1   0   1   1  0.739918     10/10      NonOverlappingTemplate
  0   2   3   1   1   0   1   1   1   0  0.534146     10/10      NonOverlappingTemplate
  2   0   0   0   1   3   2   1   1   0  0.350485      9/10      NonOverlappingTemplate
  1   1   2   0   1   2   1   1   0   1  0.911413     10/10      NonOverlappingTemplate
  1   1   2   3   0   3   0   0   0   0  0.122325     10/10      NonOverlappingTemplate
  0   2   0   2   3   0   1   0   1   1  0.350485     10/10      NonOverlappingTemplate
  1   0   2   1   2   0   2   1   0   1  0.739918     10/10      NonOverlappingTemplate
  0   1   2   1   1   1   2   1   1   0  0.911413     10/10      NonOverlappingTemplate
  1   1   1   0   0   5   0   1   1   0  0.017912     10/10      NonOverlappingTemplate
  0   0   1   0   1   1   2   2   1   2  0.739918     10/10      NonOverlappingTemplate
  1   4   1   2   1   0   0   1   0   0  0.122325     10/10      NonOverlappingTemplate
  1   1   2   1   2   0   0   0   2   1  0.739918     10/10      NonOverlappingTemplate
  0   1   1   2   1   0   0   3   1   1  0.534146     10/10      NonOverlappingTemplate
  1   0   2   0   2   0   1   0   2   2  0.534146     10/10      NonOverlappingTemplate
  2   1   1   1   1   0   1   0   2   1  0.911413     10/10      NonOverlappingTemplate
  0   2   2   1   0   1   1   1   2   0  0.739918     10/10      NonOverlappingTemplate
  2   0   1   0   1   0   0   2   2   2  0.534146     10/10      NonOverlappingTemplate
  3   1   1   1   0   0   1   0   0   3  0.213309     10/10      NonOverlappingTemplate
  0   0   2   1   0   2   1   0   2   2  0.534146     10/10      NonOverlappingTemplate
  2   0   2   1   1   0   2   0   1   1  0.739918     10/10      NonOverlappingTemplate
  1   1   2   1   0   1   2   2   0   0  0.739918     10/10      OverlappingTemplate
  3   0   1   0   2   0   1   3   0   0  0.122325     10/10      Universal
  2   4   1   0   0   1   0   1   1   0  0.122325     10/10      ApproximateEntropy
  1   1   1   2   0   0   0   1   1   1     ----       8/8       RandomExcursions
  1   1   0   1   3   1   1   0   0   0     ----       8/8       RandomExcursions
  0   1   0   0   0   0   1   2   3   1     ----       8/8       RandomExcursions
  0   1   0   0   2   2   0   0   2   1     ----       8/8       RandomExcursions
  0   0   0   1   1   2   2   1   0   1     ----       8/8       RandomExcursions
  0   1   0   0   2   1   2   1   0   1     ----       8/8       RandomExcursions
  0   1   1   1   1   1   2   0   0   1     ----       8/8       RandomExcursions
  0   0   1   1   1   0   1   0   1   3     ----       8/8       RandomExcursions
  1   0   0   2   1   1   1   0   0   2     ----       8/8       RandomExcursionsVariant
  1   0   0   1   2   1   0   1   0   2     ----       8/8       RandomExcursionsVariant
  1   0   1   0   2   0   1   1   0   2     ----       8/8       RandomExcursionsVariant
  1   0   1   1   0   1   3   0   1   0     ----       7/8       RandomExcursionsVariant
  1   2   0   0   0   2   1   1   1   0     ----       7/8       RandomExcursionsVariant
  3   0   0   1   0   1   1   0   1   1     ----       7/8       RandomExcursionsVariant
  1   1   2   0   1   0   0   1   1   1     ----       7/8       RandomExcursionsVariant
  1   0   1   3   0   0   1   0   2   0     ----       8/8       RandomExcursionsVariant
  0   0   2   1   1   1   0   1   0   2     ----       8/8       RandomExcursionsVariant
  0   1   0   0   1   0   2   0   3   1     ----       8/8       RandomExcursionsVariant
  0   0   2   0   1   0   0   2   2   1     ----       8/8       RandomExcursionsVariant
  0   0   2   1   1   0   0   0   1   3     ----       8/8       RandomExcursionsVariant
  0   1   0   2   0   0   1   3   1   0     ----       8/8       RandomExcursionsVariant
  1   0   0   2   1   0   0   0   1   3     ----       8/8       RandomExcursionsVariant
  0   2   1   1   0   1   0   2   1   0     ----       8/8       RandomExcursionsVariant
  2   0   1   1   0   2   0   1   1   0     ----       8/8       RandomExcursionsVariant
  2   1   0   1   0   1   1   0   2   0     ----       8/8       RandomExcursionsVariant
  2   1   0   1   0   2   1   1   0   0     ----       8/8       RandomExcursionsVariant
  2   1   1   1   0   2   1   1   1   0  0.911413     10/10      Serial
  0   3   3   1   0   0   2   0   1   0  0.122325     10/10      Serial
  1   1   0   1   3   1   0   0   2   1  0.534146     10/10      LinearComplexity


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The minimum pass rate for each statistical test with the exception of the
random excursion (variant) test is approximately = 8 for a
sample size = 10 binary sequences.

The minimum pass rate for the random excursion (variant) test
is approximately = 7 for a sample size = 8 binary sequences.

For further guidelines construct a probability table using the MAPLE program
provided in the addendum section of the documentation.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

However, if you test all of the bits as ./assess 8000000 times 10 bit streams, the NIST test fails the file with

8   0   1   0   1   0   0   0   0   0  0.000000 *    7/10   *  Runs  

It's an interesting statistical anomaly isn't it? Probably something to do with the bit wise manner the samples were generated, and pretty poor NIST modeling which is well known about. Clearly $\chi^2$ varies according to the sample window size, i.e. 1 bit, 8 bits e.t.c. And that randomness is not an exact science. I've realized that it's more about how you feel about your TRNG.

So in conclusion, I've not entirely answered your question but rather added to it...

$\endgroup$
1
  • $\begingroup$ Thanks! I agree with most of what you say, except I think its worth point something out at the end, when you say that chi squared varies according to sample window size, and that it's more about how you feel about your TRNG. In fact, the bits are iid Bernoulli(.5) if and only if the bytes are iid uniform random over [0, 256). Thus, a failing chi2 test indicating the bytes are likely NOT uniform random necessarily implies that the bits are likely NOT iid Bernoulli(.5) like we want them. It's just that the chi2 test wasn't able to detect this. Not saying you disagree, just mentioning... $\endgroup$
    – Adam
    Commented May 14, 2022 at 1:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.