Verifiable randomness from a physical entropy source.
queyquantum.io · Documentation · Verify a draw
Quey extracts true randomness from photonic shot noise — a measurable physical process, not an algorithm. The entropy is captured by a dedicated hardware node (Raspberry Pi 5 + NoIR camera in an isolated enclosure), processed through an extraction pipeline (LSB extraction → Von Neumann debiasing → SHA3-256 hashing), and served via a REST API.
Every selection can be signed with Ed25519 and published to a verification page anyone can check in their browser — trustlessly, via WebCrypto, with no server call required.
Validation: NIST SP 800-90B (min-entropy: 0.6236 bits/bit) · NIST SP 800-22 (188/188 sub-tests passed) · Shannon entropy: 7.999994 bits/byte.
pip install quey-randomOptional, for NumPy array methods:
pip install numpyfrom quey_random import QueyRandom
# Reads QUEY_API_KEY from environment if not provided
qr = QueyRandom()
# Random float in [0, 1)
value = qr.random()
print(value) # 0.7391042...
# Raw entropy bytes
entropy = qr.get_bytes(32)
# Pick a winner from a list
participants = ["Alice", "Bob", "Charlie", "Diana", "Eve"]
winner = qr.choice(participants)
print(f"Winner: {winner}")Or with an explicit API key:
qr = QueyRandom(api_key="qu_cloud_xxxxxxxxxxxxxxxx")Creates a client. If api_key is omitted, reads from the QUEY_API_KEY environment variable.
| Method | Returns | Description |
|---|---|---|
random() |
float |
Random float in [0, 1) |
get_bytes(length) |
bytes |
Raw physical entropy |
choice(seq) |
T |
Random element from a sequence |
randbelow(n) |
int |
Random integer in [0, n) |
uniform_array(shape) |
np.ndarray |
Uniform [0, 1) array — requires NumPy |
normal_array(shape, loc=0.0, scale=1.0) |
np.ndarray |
Normal distribution array — requires NumPy |
mixed_entropy(length) |
bytes |
Mixed local + cloud entropy |
hkdf_derive(length, info=b'', salt=None, input_entropy_length=32) |
bytes |
HKDF key derivation from physical entropy |
| Exception | When |
|---|---|
AuthenticationError |
Invalid or missing API key |
QuotaExceededError |
Monthly quota exceeded |
MissingDependencyError |
NumPy not installed (for array methods) |
QueyAPIError |
Base exception for other API errors |
Quey can produce cryptographically signed selections via the Verifiable Draw API:
- Winners are selected using rejection sampling — never biased modulo
- The result is signed with Ed25519
- A certificate is published to a public verification page
Anyone can verify the draw in their browser via WebCrypto — no server call, no trust in Quey required.
See a real verified draw → queyquantum.io/verify/89421ffc-...
This SDK connects to Quey's cloud buffer, which is continuously fed by a dedicated hardware node running a C extraction engine (closed-source). The extraction pipeline processes photonic shot noise through LSB extraction, Von Neumann debiasing, and SHA3-256 cryptographic hashing. This SDK and the benchmark scripts in this repository are fully open for review.
- Website: queyquantum.io
- Documentation: queyquantum.io/documentation
- NIST Validation: queyquantum.io/stats
- Verify a Draw: queyquantum.io/verify/89421ffc-...
- Node.js SDK:
npm install quey-random