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

Why we need a cutoff value in restart-test #209

Closed MenolGone closed 1 year ago

MenolGone commented 1 year ago

Sorry I am not good at this program and I am confused why we need a cutoff value but not the H_I in restart_main.cpp . In SP800-90B 3.1.3 it introduces the way to get the proper H_I and uses it in 3.1.4.3 , but in restart_main.cpp , it doesn't calculate the H_original,doesn't compare the H_original and the H_I entered by the submitter , I am confused why it is designed this way

joshuaehill commented 1 year ago

The ea_restart program essentially performs the testing described in SP 800-90B Section 3.1.4 and its subsections.

At this stage of the testing, H_I is passed in on the command line; ea_restart presumes that you've already performed other testing prior to the restart testing, as directed in SP 800-90B. In particular at this point of the tested you should have already derived H_submitter through analysis and calculated H_original as directed, and perhaps calculated the H_bitstring value, depending on the type of data.

The cutoff value (X_max X_cutoff) is required to perform the sanity check (SP 800-90B Section 3.1.4.3).

MenolGone commented 1 year ago

Thanks for your reply . But in 3.1.4.3, the value of x_max is the largest of x_r and x_c, does this mean that we don't need the value of x_cutoff( it doesn't appear in 3.1.4.3 ), why do we need to calculate x_cutoff in restart_main.cpp ? image

joshuaehill commented 1 year ago

Sorry, I mis-stated the meaning of X_max in my response above.

The way that the test is performed in the tool is by establishing the smallest value for the cutoff (X_cutoff) for which for which the probability of getting Pr (X_max > X_cuttoff) < alpha under the ambient assumptions. The test then fails if X_max > X_cuttoff, and passes otherwise.

In the tool, this cutoff is calculated using simulation, because the stated formula is incorrect (the underlying distribution ends up not being reasonably modeled using the binomial distribution). See Comment 3a here for details.

MenolGone commented 1 year ago

I see ,thanks for your patience and helpful answers

joshuaehill commented 1 year ago

If you issue has been addressed, could you please close it?