Files
zeekayandHanzo Dev 86ce8b49d5 entropy: the source LP-187 specifies
Every secret here is a draw — ML-DSA and ML-KEM keys, TLS material, signing
nonces, threshold dealer seeds — and each is exactly as unpredictable as the
draw that made it. This is the layer that produces those draws and says whether
they are worth anything.

A source is bytes plus a verdict on them, and the verdict is the part usually
left out. A physical source that has drifted, saturated or stuck still emits
bytes of the expected length; a key made from them verifies, signs and behaves
correctly in every respect except being unpredictable, and nothing downstream
can tell. So Read fails closed, and the two continuous tests of SP 800-90B §4.4
run over every sample: repetition count for a source that has stopped changing,
adaptive proportion for one still changing but drawing from far fewer values
than it claims. Cutoffs come from the device's own min-entropy claim, so a
weaker claim is allowed longer runs rather than being refused for being honest.
Nothing is released until a startup run has passed.

Sources combine so that adding one cannot weaken the result: predicting the
output means predicting every contribution, so one unpredictable source carries
the whole combination. That is what makes it safe to put an unproven device
into a running deployment — at worst it contributes nothing. The platform
generator is always among the sources, because a deployment whose only source
is a device it cannot audit has moved its trust rather than removed it.

Mixing is separated from reading so the property it exists for can be tested
directly. It needs to be: with a fixed draw per source the contributions are
always the same length, so a test of injectivity through Combine passes with or
without the length prefixes and proves nothing. Against mix, ["ab","c"] and
["a","bc"] collide the moment the prefixes are removed.

Lives beside mldsa and mlkem rather than in a module of its own. LP-176 names
luxfi/qrng, but a separate module means a separate go.mod, CI, and release
cadence for one package whose only callers are its neighbours here.

Integration is the claim LP-187 makes: mldsa.GenerateKey(src, …) — adopting a
hardware source is supplying a different reader. No consensus change and no
fork. A key is generated, signed with and verified in the tests, and refused
outright when a source is unhealthy.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-26 15:46:19 -07:00
..
2026-08-26 15:46:19 -07:00