A cryptography engine that uses quantum entropy from consumer webcam CMOS sensors. Unlike algorithmic PRNGs, this system extracts randomness from quantum shot noise and thermal fluctuations in semiconductor physics.
Warning
Disclaimer; This is an experimental cryptographic system. While based on sound physical principles, it has not undergone formal security certification. Use at your own risk. For production systems requiring certified cryptography, consult with security professionals and use validated implementations. This was also tested using a Logi 1080p webcam, on windows 11.
- Quantum Entropy Collection: Extracts randomness from webcam CMOS sensor quantum noise
- Multiple Cipher Algorithms: AES-256-GCM and ChaCha20-Poly1305
- Digital Signatures: Ed25519 signature generation and verification
- Key Derivation: SHA-3 based KDF for key material generation
- Health Monitoring: Real-time entropy quality assessment
- Continuous Operation: Background entropy collection with automatic quality control
- Memory Security: Automatic zeroization of sensitive key material
The system exploits three quantum phenomena:
- Shot Noise: Poisson statistics of photon arrival at CMOS photodiodes
- Dark Current: Quantum tunneling in reverse-biased junctions
- Thermal Noise: Johnson-Nyquist noise from charge carrier agitation
# Ubuntu/Debian
sudo apt install libopencv-dev libclang-dev libasound2-dev
# Fedora
sudo dnf install opencv-devel clang-devel alsa-lib-devel
# Arch
sudo pacman -S opencv clang alsa-libgit clone https://github.com/CPScript/qce.git
cd qce
cargo build --releaseRun the provided examples:
# Basic encryption/decryption
cargo run --example basic_enc
# File encryption workflow
cargo run --example file_enc
# Key generation and signatures
cargo run --example key_gen./target/release/qce encrypt \
--input plaintext.txt \
--output encrypted.bin \
--algorithm aes256 \
--source webcam./target/release/qce decrypt \
--input encrypted.bin \
--output decrypted.txt \
--source webcam./target/release/qce generate-key \
--output master.key \
--length 32 \
--source webcam./target/release/qce status \
--source webcam \
--duration 30- Light Isolation: Cover webcam lens with opaque material (black tape, cardboard box)
- Pinhole Aperture: Create 0.5mm aperture for controlled light exposure
- Stability: Mount webcam in fixed position during entropy collection
- Environment: Dark, temperature-stable location
| Entropy Source | Bit Rate | Quantum Purity | Setup Complexity |
|---|---|---|---|
| Webcam | 2-5 Kbps | High | Medium |
| Audio | 10-20 Kbps | Medium | Low |
| Hybrid (both) | 3-8 Kbps | Very High | Medium |
- True quantum randomness from fundamental physical processes
- Continuous entropy collection with health monitoring
- Automatic quality control rejects degraded entropy
- Memory-safe implementation with automatic key zeroization
- Multiple independent entropy sources can be combined
- Depends on hardware quality (CMOS sensor characteristics)
- Environmental factors can affect entropy quality
- Not certified for government/military cryptographic use
- Should be combined with traditional CSPRNGs for defense-in-depth
- Use hybrid mode (webcam + audio) for critical applications
- Monitor entropy health status continuously
- Combine with existing OS entropy sources
- Regular hardware inspection for sensor degradation
- Consider commercial QRNGs for certified applications
The engine includes statistical testing:
# Run unit tests
cargo test
# Generate entropy samples for external analysis
./target/release/qce generate-key --output test.bin --length 1000000
# Test with dieharder suite
dieharder -a -f test.bin
# NIST statistical test suite
./assess 8000000 < test.binBased on principles from:
- Quantum random number generation research and Rust-QRNG
- NIST SP 800-90B entropy assessment
- Applied quantum optics literature
- Modern cryptographic engineering practices
Developers & Contributers; CPScript



