usnistgov / SP800-90B_EntropyAssessment

The SP800-90B_EntropyAssessment C++package implements the min-entropy assessment methods included in Special Publication 800-90B.
195 stars 88 forks source link

Consistently run both the chi-square independence and chi-square goodness-of-fit tests #235

Closed joshuaehill closed 2 months ago

joshuaehill commented 2 months ago

For large-scale (i.e., multi-block) IID testing, it is useful to know the results of all 22 of the tests specified in SP 800-90B Section 5. In the existing code, the two chi-square tests are conceptualized as a single test, and if the first one (independence) fails, the second chi-square test isn't run. This is fine when viewing the test in isolation, but in the instance where the tester is tracking the results of each of the tests, this is troublesome.

This small PR prevents this short-circuiting, and always runs both chi-square tests.