Commit Graph

6 Commits

Author SHA1 Message Date
Leopere 63fe7059ca
Add randomness validation test suite
- Add scripts/test-randomness.py with 8 statistical tests based on
  NIST SP 800-22 and ENT methodologies (Shannon entropy, chi-square,
  Monte Carlo Pi, serial correlation, bit balance, etc.)
- Update README with Randomness Validation section documenting the
  test suite, usage examples, and pass criteria
- Script supports testing from server, file, or stdin

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 15:18:51 -05:00
Leopere df18197a1d
Add OpenSSL provider, camera reconnection, manpage, and cross-compile support
Major changes:
- Refactor entropy extraction into modular src/entropy/ with camera, config,
  extract, and pool submodules
- Add automatic camera reconnection with retry logic (5 retries, 500ms delay)
  so the service survives temporary camera disconnections
- Build as OpenSSL 3.x provider (cdylib) for system-wide entropy integration
- Add manpage (man/camera-qrng.1) with setup instructions and API docs
- Add cross-compilation script for ARM64/x86_64 on macOS and Linux
- Add helper scripts: release-camera.sh, stream-random.sh, stream-demo.sh

The camera now automatically attempts to reconnect when frame capture fails
instead of dying, making the service more resilient for long-running deployments.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 14:53:19 -05:00
Leopere fd0598be09
Dramatically increase QRNG throughput with chunked hashing and high-res support
- Replace whole-frame hashing with chunked SHA-256 (256-byte chunks → 32 bytes)
- Default to 1080p resolution (~1.5 Gbps raw, ~23 MB/s conditioned)
- Support 4K cameras (~6 Gbps raw, ~93 MB/s conditioned)
- Add CAMERA_WIDTH/CAMERA_HEIGHT env vars for resolution control
- Increase max request from 1KB to 1MB
- Update documentation with Gbps throughput figures per Steve Gibson
- Rename to camera-qrng to reflect quantum-origin entropy source

Throughput improvement: ~1 KB/s → ~23-186 MB/s depending on resolution
2026-01-26 12:31:17 -05:00
Leopere b66d7f8873
Add LavaRnd-style thermal noise configuration and research documentation
- Configure camera for optimal noise capture (maximize gain, brightness, exposure)
- Update README with lens-covering instructions and security model
- Add RESEARCH.md with academic background on camera-based entropy
2026-01-26 12:18:07 -05:00
Leopere 8608b530ee
Add FAKE_CAMERA mode and OBS virtual camera testing support
- Add FAKE_CAMERA=1 env var to use /dev/urandom instead of real camera
  for testing in environments without camera hardware (Docker, CI)
- Add extract_entropy_fake() that simulates camera frames with random data
- Add web UI (index.html) and MCP well-known endpoint
- Add Dockerfile with multi-stage build for containerized deployment
- Add OBS virtual camera scripts for testing with simulated noise input
- Update Dockerfile to use rust:latest and add clang for bindgen
2026-01-22 16:14:30 -05:00
Leopere 1b7e21a8a0
Initial commit: Camera TRNG project
Rust project for true random number generation using camera input.
2026-01-22 11:53:10 -05:00