Install-time calibration of the two runtime entropy-source knobs in
stEntropySource:
EntropyHealthMinEntropy - the claimed per-sample min-entropy (health-test
cutoffs + per-round credit cap)
gCollectIterations - how many timed iterations each round samples
A calibration file produced on the target box is applied at application
startup, BEFORE the first tEntropy is created (both globals are re-read per
construction, there is no latch).
TWO ABSOLUTE RULES, each moving its knob only toward MORE conservative:
* EntropyHealthMinEntropy is only ever LOWERED (claim less per sample).
* gCollectIterations is only ever RAISED (collect more per round).
A value in the other direction is ignored. Because both loads are one-way, a
tampered or corrupt file can at worst make the source slower or over-collect
(a denial of service) -- it can never weaken the entropy claim. A missing,
unreadable, or malformed file leaves both compiled-in defaults untouched
(fail-closed).
File format (plain text, invariant decimals, one key=value per line, any
order, unknown keys ignored):
claim=0.175000
iterations=192
LoadCalibration / ParseCalibration are the shipping consumer API. The routines
that PRODUCE a calibration file (SaveCalibration, RunInstallerCalibration) are
compiled only under ENTROPY_CALIBRATE: they drive and tap the raw noise source
and are for an installer/lab tool, not the product runtime.Feature notes: DRBG and entropy source (SP 800-90) notes
ClaimPerSample : Double;
Iterations : Cardinal;