random: Make the min-entropy estimate configurable
Right now the cutoff values for the RCT and APT tests are computed with
a fixed min-entropy estimate of 1. In preparation for permitting
alternative estimates for "pure" sources (i.e., hardware noise sources),
extend the code to handle alternative estimates of an integer number of
bits.
For the RCT test, the cutoff is simply the formula from section 4.4.1 of
NIST SP 800-90B. For the APT test, I used Excel to compute a lookup
table using the formula provided in section 4.4.2.
Reviewed by: cem
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D52228
(cherry picked from commit 228302e630dd95586fc22b29b025b8a98b593740)