qcoin-1.1.0 is not a library.
qcoin - Quantum Coin Toss
A quantum-based binary choice maker that performs coin tosses using quantum random number generators. The application tries multiple quantum sources and uses a mix of cryptographically secure RNGs seeded with the quantum bytes obtained from a publicly available QRNG.
Installation
You can build the project from source or install it directly from crates.io.
Usage
Command Line Options
| Flag | Description | Default | Notes |
|---|---|---|---|
-n, --number <flips> |
Number of coin flips | 1 |
Must be greater than 0 |
-o, --output <file> |
Output file for quantum entropy | qrandom.bytes |
Saves quantum or hex entropy |
-s, --source <file> |
Use file as entropy source | None | Supports hex strings or binary data |
--hex <string> |
Use hex string directly as entropy source | None | Supports 0x prefix |
How it Works
Coin Flip Logic
Counts 1-bits vs 0-bits in entropy bytes:
- More 1-bits → YES ✅
- More 0-bits → NO ❌
Single flip: Uses entropy bytes directly
Multiple flips: N-1 CSRNG-generated with random bytes as its seed + 1 direct entropy flip
Entropy Sources
- ANU QRNG - Quantum random number generator
- qrandom.io - Alternative quantum source
- User input
--hex <entropy>or-s/--source <file> - Cryptographic SRNG - Fallback
- Saved quantum bytes from
qrandom.bytes