[Cryptech Tech] FIPS 140-2 test program

Fredrik Thulin fredrik at thulin.net
Tue Sep 2 06:55:13 UTC 2014


On Wednesday, July 30, 2014 06:24:02 PM Stephan Mueller wrote:
...
> Note, this test is a necessary, but not sufficient indication for
> randomness. Thus, when this smoke test fails, you can already forget any
> other analysis and have to solve a more fundamental problem. When the
> smoke test passes, you can continue with your analysis.
> 
> In any case, Chi-Square is very sensitive to even the slightest
> patterns, much better than monobit test, poker test and other easy
> tests.
...
> Read the man page to get an easy answer: the percentage value must be
> between 10 and 90% to "pass" the Chi-Square.

Thanks for the very polite RTFM ;) and sorry for being slow in responding.

If anyone besides me want to understand how the Chi-square test works and not 
just how to interpret the output, Knuth (TAoCP, Seminumerical Algorithms) does 
a fair job at explaining it for those who don't like trees.

This online resource also explains it well IMO for this context, and more to 
the point:

  http://www-users.math.umn.edu/~garrett/students/reu/pRNGs.pdf

Both talk about combining Chi-squared with Kolmogorov-Smirnov (KS) - that 
might be worthwhile, or maybe one should just go straight to dieharder when 
Chi-squared looks good.

/Fredrik



More information about the Tech mailing list