lp: 4050 title: Entropy Source and Hardware Profiles description: The noise source, SP 800-90B health tests, conditioning and multi-source combiner beneath every Lux key. Defines the io.Reader plus Health() binding and the E-EMB / E-USB / E-PCIE hardware profiles. author: Lux Core Team (@luxfi) status: Final implementation-rust: none implementation-cpp: none implementation-go: shipped type: Standards Track category: Cryptography tags: [crypto, entropy, rng, sp-800-90b, hardware]
- lp-4060
LP-4050: Entropy Source and Hardware Profiles
Abstract
LP-4060 specifies a Hash-DRBG beacon and says it is reseeded from a QRNG entropy source. This LP specifies that entropy source: what a noise source must demonstrate before its output is used, how it is health-tested and conditioned, and how several independent sources compose. It also defines the hardware profiles that supply one, and states the boundary between entropy and consensus — which is the part that is easy to get wrong in a direction that looks like an improvement.
Motivation
Every secret Lux holds is a draw from some source: validator staking keys, ML-DSA and ML-KEM key pairs, TLS material, signing nonces, threshold dealer seeds. Their unpredictability is exactly the unpredictability of that draw and no more. A physical noise source is attractive here because its unpredictability rests on a measurement rather than on a computational assumption.
That argument applies to secrets. It does not apply to consensus, and the distinction is the substance of this LP.
The boundary
Entropy is for values only one party may know. Consensus randomness is for values every party must agree on. They are different problems and a source that answers one cannot answer the other.
Committee sortition in consensus/protocol/quasar/pulsar_sortition.go derives
its seed from values that were fixed before the current block existed:
sortitionSeed = H( "PULSAR_SORTITION_V1"
‖ prevFinalizedBlockID
‖ signerSetID
‖ pChainHeight
‖ epoch
‖ policyID )
That is not a shortcut awaiting better randomness. It is the security argument: the seed is public and identical for every verifier the instant the previous block finalized, so no proposer can influence which committee it faces. A value drawn from a proposer's own hardware has the opposite property — only that proposer knows it, and nothing stops it drawing again until it likes the committee that results.
Therefore:
- A node's local entropy source MUST NOT contribute to committee sortition, leader election, or any value a verifier must independently reproduce.
- Public randomness that consumers require MUST come from LP-4060's beacon, whose output is a threshold signature: unpredictable before it exists, and verifiable by anyone afterwards.
- An entropy source MAY seed a party's own contribution to that beacon. This is the one place the two layers meet, and it is safe because the beacon's output is not any single contribution.
Specification
Entropy source
An entropy source is a noise source, its health tests, and a conditioning stage. Each part is required; a noise source alone is not an entropy source.
Noise source. A physical process sampled to produce raw bits. The implementation MUST document the process, the sampling rate, and the min-entropy per sample it claims, with the assessment that supports the claim. Raw output MUST NOT be used directly for any cryptographic purpose.
Startup tests. On power-up and before any output is released, the source MUST collect at least 1024 consecutive samples and pass the health tests below. A source that fails startup MUST report unavailable rather than degraded output.
Continuous tests. While running, the source MUST apply, at minimum, the two approved tests of SP 800-90B §4.4:
- Repetition count: a cutoff derived from the claimed min-entropy such that the false-positive rate is at most 2^-40.
- Adaptive proportion: over a 512-sample window for binary sources or 1024 otherwise, with the same false-positive bound.
A source failing a continuous test MUST stop releasing output and raise a health fault. It MUST NOT silently continue: a noise source drifts with temperature, supply voltage, and age, and a source that has quietly stopped being random reads exactly like one that has not.
Conditioning. Raw samples MUST be conditioned before release, using a vetted conditioning function over SHA3-256 or SHAKE256 (LP-149). The implementation MUST document the input rate, and the conditioner MUST be fed at least twice the min-entropy it is credited with producing.
Combining sources
A deployment holds one or more entropy sources — the operating system's generator is always one of them. They are combined by
seed = SHAKE256( "LUX-ENTROPY-COMBINE-V1"
‖ LE64(len(s_1)) ‖ s_1
‖ LE64(len(s_2)) ‖ s_2
‖ ... ‖ s_n )
with sources in a fixed order, each length-prefixed, under a domain-separation tag distinct from every other use of SHAKE256 in Lux.
Two properties are required of this construction and both matter:
- Adding a source cannot weaken the result. The output is at least as unpredictable as the strongest single input, so an unknown-quality source can be included without risk. This is what makes new hardware safe to deploy.
- Length-prefixing keeps the inputs distinct. Concatenated raw, two different source sets can produce identical preimages, which would make two different deployments derive the same seed.
An implementation MUST include the operating system source. Hardware is an addition to the platform generator, never a replacement for it: a deployment whose only source is a device it cannot itself audit has moved its trust into that device.
Composition with the DRBG
An entropy source does not serve keys directly. It seeds a DRBG per SP 800-90A, and the DRBG's output is what callers consume, per the SP 800-90C construction. Reseeding MUST occur at the interval the profile sets, and immediately after any health fault clears.
Binding
The reference implementation is github.com/luxfi/crypto/entropy. LP-4060 names
luxfi/qrng; this layer lives beside mldsa, mlkem and slhdsa instead,
because a separate module would mean a separate go.mod, CI and release cadence
for one package whose only callers are its neighbours.
The interface is the one Go already uses for this purpose:
// An entropy source is an io.Reader whose Read fails closed.
type Source interface {
io.Reader // returns an error rather than weak bytes
Health() error // nil when startup and continuous tests are passing
}
Key generation across Lux already accepts a reader —
mldsa.GenerateKey(rand.Reader, …), ecdsa.GenerateKey(…, rand.Reader),
Sign(rand.Reader, …) — so a deployment adopts a source by supplying a
different reader. No consensus change, no fork, and no chain is required to
add hardware entropy.
Combine(sources ...Source) Source implements the combiner above, and
OS() the platform source that MUST be among them. Device(path, minEntropy)
opens a character device under the health tests of this LP, refusing one that
fails at startup.
Read MUST return an error rather than short or low-quality output when the
source is unhealthy. A caller that receives an error MUST fail the operation;
generating a key from a degraded source is worse than not generating one.
Hardware profiles
A device claiming conformance MUST state which profile it implements, its claimed min-entropy per sample, and the assessment supporting it.
| Profile | Form | Interface | Intended use |
|---|---|---|---|
E-EMB | Module | SPI / I²C / UART | Embedded and edge devices |
E-USB | USB-C | CDC / HID | Workstations, air-gapped ceremonies |
E-PCIE | PCIe card | Kernel driver | Validators, KMS and HSM hosts |
Every profile MUST expose health status out of band, so an operator can distinguish a source that is unavailable from one that is merely idle.
Rationale
Why not put the source in a chain VM? Nothing here is agreed state. Entropy is consumed locally to produce a secret that is, by construction, known to one party. A chain whose blocks carry per-node secrets has nothing to agree on, and a chain that agrees on randomness must produce it by threshold signature, which is LP-4060.
Why require the OS source? So that adopting hardware is never a downgrade. The combiner's first property makes this free.
Why fail closed? A degraded physical source produces output that looks correct. Nothing downstream can detect it — a key from a weak source verifies, signs, and behaves normally in every respect except the one that matters. The only place the fault can be caught is where it occurs.
Security considerations
- The source is not remotely verifiable. Entropy delivered over a network cannot be checked by its recipient: nothing in a byte string shows how it was produced. Any claim of remote quantum randomness is a claim about the operator, not about mathematics. Where public randomness must be verifiable, LP-4060's threshold construction is the mechanism, and its verifiability is cryptographic rather than physical.
- A conformance claim is an assessment, not a datasheet. An implementation states a min-entropy claim and the analysis behind it. Claiming conformance to SP 800-90B without that analysis is claiming the standard's name.
- Seed quality propagates. Corona's dealer expands one seed into every pairwise seed and MAC key of a ceremony, so the whole key material of that ceremony is exactly as good as that draw.
References
- LP-4060 — DRBG / randomness beacon, the consumer of this layer.
- LP-149 — SHA-3.
- LP-171 — Pulsar DKG.
- HIP-0073 — Hanzo QRNG standard.
- NIST SP 800-90A Rev. 1 — DRBG constructions.
- NIST SP 800-90B — entropy sources: noise, health tests, conditioning.
- NIST SP 800-90C — composition of sources and DRBGs into RBGs.