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

ea_restart: validity test failure? #233

Closed smuellerDD closed 2 months ago

smuellerDD commented 3 months ago

I have the following data for a reboot test calculated by ea_restart:

H_r: 2.805795
H_c: 6.959127
H_I: 1.000000

Validation Test Passed...

min(H_r, H_c, H_I): 1.000000

I am wondering why the test is flagged as "Validation Test Passed"? SP800-90B states in section 3.1.4.2:

The entropy estimates from the row and the column datasets are expected to be close to the initial entropy estimate H I. If the minimum of Hr and Hc is less than half of H I, the validation fails, and no entropy estimate is awarded.

H_r is significantly less than half of H_c - shouldn't the test fail?

joshuaehill commented 3 months ago

I don't understand why you think this ought to fail. H_I is the input entropy level. Half of H_I is 0.5 in your example, and both H_r and H_c are larger than that, so this should pass (not fail).

joshuaehill commented 3 months ago

Note that there is no comparison between H_r and H_c/2 (or vise versa). The failure criteria is essentially a statement like

If min(H_r, H_c) < H_I/2 then fail.
else pass.
smuellerDD commented 2 months ago

Agreed, sorry for the noise

joshuaehill commented 2 months ago

No worries!