Docs

node key …

Overview

VOID is Quantum-as-a-Service (QaaS): a node that sits in front of quantum hardware and turns its measurements into randomness Web3 can use and check, over plain HTTP. It does five things: it publishes a public beacon every 10 seconds, it serves private entropy on request, it computes provably fair draws from beacon rounds, it runs quantum circuits and samples their measurements with quantum entropy, and it supplies the node half of the Key Forge, which makes wallets in your browser.

One file, client/voidlib.js, holds every rule a third party needs to re-check the node's work. The node imports the same file, so the published rules and the running code cannot drift apart.

Sources

LfD QRNGQuantum device. An ID Quantique Quantis photonic quantum random number generator run by the Laboratory for Digitalisation at OTH Regensburg. The node pulls 1,024 raw bytes every 20 seconds.
ANU QRNGQuantum device. Measures vacuum fluctuations of the electromagnetic field at the Australian National University. Used when the node operator sets an API key.
NIST BeaconPublic beacon. A signed 512-bit pulse every 60 seconds from the US National Institute of Standards and Technology.
drandPublic beacon. Threshold randomness produced jointly by the League of Entropy.
LocalThe operating system's cryptographic generator, used for the node's own contribution.

The node runs four statistical tests on the latest 4,096 bytes from its quantum devices: the share of 1 bits, a runs test, a chi-square test over byte values and serial correlation, plus a Shannon entropy estimate. The console shows the results and the status of every source.

Pool and reservoir

The pool is 64 bytes of secret state. Each input is absorbed with pool = SHA3-512(pool | lengths | tag | bytes). Hashing only ever adds uncertainty, so a weak or unavailable source cannot make the pool worse. The pool never leaves the node.

The reservoir holds raw quantum bytes that have not been used yet, up to 32,768 of them. A byte leaves the reservoir exactly once: into one beacon round, one entropy response or one raw response. Nothing is served twice.

Beacon

A round is produced every 10 seconds and contains all of its own inputs:

output = SHA3-512( "VOID-BEACON-v1" | index | time | previous output
                   | quantum bytes | node value | NIST value | drand value )
sig    = ed25519( "VOID-ROUND-v1" | index | output )      signed with the node key

Integers are 8-byte big-endian. The four variable inputs are each prefixed with a 4-byte length, so two different sets of inputs can never produce the same message.

quantum32 raw bytes taken from the reservoir for this round, printed in hex, with the device they came from.
localThe node's own 32-byte value. The previous round published its SHA3-256 hash as commitNext, so the node fixed it before this round's outside values existed.
nist, drandThe latest NIST pulse and drand round the node has seen in the last two minutes, with their public indexes so you can look them up at the source.
prevThe output of the previous round. Changing any past round would change every round after it.

The node cannot steer a round toward a result it likes: its own value is committed one round ahead, and the NIST and drand values are produced by parties it does not control.

Draws and shuffles

A draw is a pure function of a round's output and a seed you choose:

block i = HMAC-SHA512( key = round output, message = "VOID-DRAW-v1|" + seed + "|" + i )
each block gives ten 48-bit values; a value is kept only if it is below
the largest multiple of the range, then reduced modulo the range

Rejecting values above the last full multiple removes modulo bias, so every number in the range is exactly as likely as any other. A shuffle is a Fisher-Yates shuffle over the same stream.

For a draw nobody can front-run: publish the round number and the seed before the round exists, then call the endpoint once it does. Asking for a future round returns status 425 with the seconds left.

Entropy and raw bytes

/api/entropy returns bytes for secrets: keys, nonces, salts. Each response is

HKDF-SHA-512( input = fresh quantum bytes | pool | 32 local bytes,
              salt  = latest beacon output,
              info  = "VOID-ENTROPY-v1|" + request id )

Up to 32 fresh quantum bytes go into each request and are removed from the reservoir. The response states how many were used. It also carries a receipt: the request id, time, beacon round, byte counts and the SHA3-256 digest of the bytes, signed by the node. The receipt lets you prove later what the node gave you without revealing it.

/api/quantum returns bytes exactly as the device produced them, with no hashing, up to 64 at a time. They are removed from the reservoir on delivery.

Simulator

The simulator runs quantum circuits exactly. A circuit on n qubits is held as 2^n complex amplitudes, starting from the state where every qubit is 0, and each gate is applied to them in order. It supports up to 12 qubits, 400 gates and 8,192 shots.

one qubith x y z s sdg t tdg, and the rotations rx(θ) ry(θ) rz(θ) p(θ)
controlledcx cy cz ch, cp(θ) crz(θ), and the Toffoli gate ccx
otherswap
anglesnumbers and pi joined by * and /, such as pi/2 or -pi/4

Gates are deterministic. The one random step is measurement, and that is where the node comes in. For a sampled run it derives a 32-byte sampling key by HKDF from fresh quantum bytes, the pool and local bytes, then draws each shot:

block i = HMAC-SHA512( key = sampling key, message = "VOID-SIM-v1|" + i )
each block gives ten 48-bit values; value / 2^48 picks a basis state
by its cumulative probability

The response returns the probabilities, the counts, the sampling key and a signed receipt binding the circuit and the counts. With the key you can re-derive the counts yourself, which is what the simulator page does before it shows a tick. Basis states are written with qubit 0 on the right.

curl -X POST /api/sim -H "content-type: application/json" \
  -d '{"qubits":2,"code":"h 0\ncx 0 1","shots":1024}'

Key Forge

The Forge requests 64 bytes from /api/entropy, checks the receipt, draws 64 more from your browser's own generator and computes SHA3-512("VOID-FORGE-v1" | node bytes | local bytes). The first 32 bytes of the result become a 24-word BIP-39 recovery phrase. From the phrase it derives:

EVMsecp256k1 at m/44'/60'/0'/0/0, the first account in Rabby and MetaMask.
Solanaed25519 by SLIP-0010 at m/44'/501'/0'/0', the first account in Phantom.
ML-DSA-65A post-quantum signature key pair (FIPS 204), derived from the other 32 bytes by HKDF. The page signs and verifies a message with it as a self-test.
ML-KEM-768A post-quantum key-exchange key pair (FIPS 203), derived the same way.

All of this runs in the page. The node learns that someone asked for 64 bytes and nothing else. The cryptography comes from the audited noble and scure libraries, served from this node.

API

GET /api/beacon/latest                      the newest round
GET /api/beacon/:index                      one round (425 if it does not exist yet)
GET /api/beacon?limit=20                    recent rounds, newest first (max 100)
GET /api/stream                             server-sent events, one message per round
GET /api/draw?round&seed&min&max&count      whole numbers in [min, max], up to 1000
GET /api/shuffle?round&seed&n               a shuffled order of 0 … n-1, n up to 10000
GET /api/entropy?bytes=32                   1 to 1024 private bytes with a signed receipt
GET /api/quantum?bytes=32                   1 to 64 raw device bytes, served once
POST /api/sim  { qubits, code, shots }      run a circuit, sample it with quantum entropy
GET /api/stats                              counters, reservoir, sources, health tests
GET /api/config                             node key, round length, limits, token

All responses are JSON and allow cross-origin requests. round defaults to the latest round. Limits per address: 120 entropy requests a minute and 30 raw requests a minute. The node keeps the latest 3,000 rounds; older indexes return 410.

curl "/api/draw?round=1200&seed=my-raffle&min=1&max=500&count=3"
curl "/api/entropy?bytes=32"

Verify it yourself

Every page on this site that shows a result recomputes it with voidlib.js first. You can do the same from any JavaScript runtime:

import { verifyRound, draw } from './voidlib.js';

const base = '';
const { nodeKey } = await (await fetch(base + '/api/config')).json();
const r    = await (await fetch(base + '/api/beacon/1200')).json();
const prev = await (await fetch(base + '/api/beacon/1199')).json();

verifyRound(r, nodeKey, prev).ok;          // output, signature, chain link, commitment
draw(r.output, 'my-raffle', 1, 500, 3);    // the same numbers the node returns

To check the outside inputs, look up the NIST pulse index at beacon.nist.gov/beacon/2.0/chain/2/pulse/<index> and the drand round at api.drand.sh/public/<round>, and compare the values with the ones printed in the round.

Token

$VOID is the token of the protocol. It funds the node, its sources and the roadmap: posting rounds on-chain so contracts can read them, adding a second quantum device that works on a different physical principle, and independent operators whose rounds are combined.