
Open-source entropy harvesting from unconventional hardware sources. Rust + Python SDK.
Measure and operationalize hardware entropy for research and security.
Collect entropy from on-device hardware sources, analyze source quality with statistical tests, and deliver raw or conditioned output through CLI, Rust, Python, and HTTP interfaces.
One workflow for entropy research, validation, and cryptographic deployment.
By Amenti Labs
# Install
cargo install openentropy-cli
# Discover entropy sources on your machine
openentropy scan
# Benchmark all fast sources
openentropy bench
# Output 64 random hex bytes
openentropy stream --format hex --bytes 64
# Live TUI dashboard
openentropy monitor
By default, only fast sources (<2s) are used. Pass
--allto include slower sources (DNS, TCP, GPU, BLE). The positional aliasallis also accepted for compatibility.
Most OpenEntropy sources come from the host machine itself. OpenEntropy also supports external hardware devices when they are attached and discoverable:
qcicada source. OpenEntropy can read the device's quantum output and benchmark, analyze, record, or compare it alongside on-host sources. The device's own output modes map to raw, sha256, and samples, and OpenEntropy now uses QCicada's fresh-start continuous-mode helper from qcicada 0.2.2, so it discards already-buffered device input once after entering continuous mode instead of serving the first read from stale queued bytes. See the QCicada manual.pip install openentropy
from openentropy import EntropyPool, detect_available_sources
sources = detect_available_sources()
print(f"{len(sources)} entropy sources available")
pool = EntropyPool.auto()
source = sources[0]["name"]
data = pool.get_source_bytes(source, 256, conditioning="sha256")
Build from source (native extension):
git clone https://github.com/amenti-labs/openentropy.git && cd openentropy
pip install maturin
maturin develop
Security engineers use OpenEntropy to validate entropy quality and seed CSPRNGs:
openentropy analyze --profile security --output audit.md
Researchers use OpenEntropy to study raw noise characteristics:
openentropy analyze --profile deep --output analysis.json
Security engineers seed CSPRNGs, generate keys, and supplement /dev/urandom with independent hardware entropy. The SHA-256 conditioned output (--conditioning sha256, the default) produces cryptographic-quality random bytes. The security profile enables the NIST test battery, min-entropy breakdown, and SHA-256 conditioning in one flag.
Researchers study the raw noise characteristics of hardware subsystems. Pass --conditioning raw to get unwhitened, unconditioned bytes that preserve the actual noise signal from each source. The deep profile enables 100K samples, cross-correlation, and PEAR-style trial analysis.
Raw mode enables:
Most random number generators are pseudorandom — deterministic algorithms seeded once. OpenEntropy continuously harvests real physical noise from your hardware:
The pool XOR-combines independent streams. No single source failure can compromise the pool.
Conditioning is optional and configurable. Use --conditioning on the CLI or ?conditioning= on the HTTP API:
| Mode | Flag | Description |
|---|---|---|
| SHA-256 (default) | --conditioning sha256 | SHA-256 conditioning. Cryptographic quality output. |
| Von Neumann | --conditioning vonneumann | Debiasing only — removes bias while preserving more of the raw signal structure. |
| Raw | --conditioning raw | No processing. Source bytes with zero whitening — preserves the actual hardware noise signal for research. |
Raw mode is what makes OpenEntropy useful for research. Most HWRNG APIs run DRBG post-processing that makes every source look like uniform random bytes, destroying the information researchers need. Raw output preserves per-source noise structure: bias, autocorrelation, spectral features, and cross-source correlations. See Conditioning for details.