usnistgov / SP800-90B_EntropyAssessment

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

Support large files and fix an initialization problem #217

Closed joshuaehill closed 1 year ago

joshuaehill commented 1 year ago
joshuaehill commented 1 year ago

This is mainly useful because it allows for more samples of wide data; this comes up most frequently with the bitstring tests. For 8-bit data, the prior code would fail when the dataset was larger than about 256MB.

celic commented 1 year ago

The changes look fine but we need to do some testing with this to ensure that including the new -ldivsufsort64 library doesn't affect our ESVTS build process. Are both libraries needed? Or can we remove the -ldivsufsort now?

joshuaehill commented 1 year ago

Both libraries are required when linking. The tool opportunistically uses the 32-bit-index version of the tool when it can, because the 32-bit-index version of the library uses literally half the memory of the 64-bit-index version.

celic commented 1 year ago

The math checks out on that one. I'll test this out on an internal ESV environment to ensure it doesn't break anything before I merge it in.