<div dir="ltr"><div><div>In May 2019, I noticed strange results of the Dieharder statistical test suite with Linux /dev/urandom <br>Very often, dieharder reported inconclusive "WEAK" results on some tests, even when running "<span class="il">dieharder</span> -a -g 501 -k 2 -Y 1", which looks suspicious (-Y 1 = "resolve ambiguity" mode)<br>(WEAK is inconclusive, FAIL reports a real weakness.See the thread "<span class="il">Dieharder</span> & /dev/urandom" on this ML, starting from 2019-05-14)<br><br><div>A totally predictable PRNG which just hashes (SHA1) a counter with a constant string passes all Dieharder tests with flying colours. I expected a cryptographic PRNG to exhibit the same behaviour.<br></div><div><br>Now, I noticed that AES_OFB produces the same suspicious results. Once again, I cannot explain this. As far as I know, AES_OFB should be totally unpredictable and immune from any statistical weaknesses. I do not get any FAIL, but I don't understand why Dieharder reports so many inconclusive results.<br><br><span style="font-family:monospace">$</span><span style="font-family:monospace"><span style="font-family:monospace"> </span> dieharder -a -g 205 -k 2 -Y 1<br>#=============================================================================#<br>#            dieharder version 3.31.1 Copyright 2003 Robert G. Brown          #<br>#=============================================================================#<br>   rng_name    |rands/second|   Seed   |<br>        AES_OFB|  2.45e+07  |3424392396|<br>#=============================================================================#<br>        test_name   |ntup| tsamples |psamples|  p-value |Assessment<br>#=============================================================================#<br>   diehard_birthdays|   0|       100|     100|0.55850015|  PASSED  <br>[snip]<br>    diehard_2dsphere|   2|      8000|     100|0.31695338|  PASSED  <br>    diehard_3dsphere|   3|      4000|     100|0.72645403|  PASSED  <br>     diehard_squeeze|   0|    100000|     100|0.99526250|   WEAK   <br>     diehard_squeeze|   0|    100000|     200|0.75277078|  PASSED  </span></div><div><span style="font-family:monospace">[snip]<br>       rgb_lagged_sum|   2|   1000000|     100|0.97574458|  PASSED  <br>      rgb_lagged_sum|   3|   1000000|     100|0.99541232|   WEAK   <br>      rgb_lagged_sum|   3|   1000000|     200|0.87608184|  PASSED  <br></span></div><div><span style="font-family:monospace">[snip]</span></div><div><span style="font-family:monospace">      rgb_lagged_sum|   2|   1000000|     100|0.97574458|  PASSED  <br>      rgb_lagged_sum|   3|   1000000|     100|0.99541232|   WEAK   <br>      rgb_lagged_sum|   3|   1000000|     200|0.87608184|  PASSED  </span></div><div><span style="font-family:monospace">[snip]</span></div>        dab_monobit2|  12|  65000000|       1|0.58649430|  PASSED  <br>$  <br><br></div>I am looking for any kind of explanation.Is there a bug in Dieharder? Did I over-estimated the importance of WEAK results? Is OFB_AES known to be slightly biased?<br></div><div><div><br>-- <br>Michel Arboi<br>PGP key ID : 0x85A1C6A1 - 0x05054F8485A1C6A1<br>Fingerprint: 1DC3 8857 B930 0B6B 9420  5D56 0505 4F84 85A1 C6A1</div></div></div>