Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

wj-diode-quantum

Collects quantum random numbers from the Australian National University, pushes them across a data diode, and serves them one at a time on the protected side.

A data diode only carries data one way, so a machine behind one cannot ask ANU for random numbers itself. This program splits the job in two: one side collects and pushes, the other stockpiles what arrives and hands it out on request.

Quick start

Two machines, one command each.

Machine 1 — internet side

uv tool install wj-diode-quantum
wj-diode-quantum setup send
wj-diode-quantum collect -c config.json

Machine 2 — protected side

uv tool install wj-diode-quantum
wj-diode-quantum setup recv
wj-diode-quantum serve -c config.json

Check it works

curl localhost:8099/api/status    # numbers are arriving
curl localhost:8099/api/random    # take one
{
  "value": "a3f1c8d20b74e569ff10c3a8827d4e61",
  "timestamp": "2026-08-02T04:14:58Z",
  "source": "quantumnumbers"
}

value is your 128-bit random number, timestamp is when it was collected. You will never be given that number again.

Full documentation: docs.waterjuice.org/wj-diode-quantum

Features

  • Both ANU APIs — the current keyed service and the older unkeyed one. Enable either or both.
  • Any diode tool — the transfer is a configured external command. Built against diodetool, but nothing about it is hard-coded.
  • Never serves the same number twice — guaranteed across crashes. A value is recorded as consumed and flushed to disk before it reaches the client.
  • Bounded, self-trimming pool — newest served first, oldest discarded at capacity.
  • One process per machine — the receiving side supervises the diode tool for you.
  • Rejects damaged batches whole — a diode cannot retransmit, so anything malformed is set aside.
  • Zero dependencies — a single static binary, Go standard library only.

Requirements

  • A tool that can move a file across your diode, on both sides.
  • An ANU API key from quantumnumbers.anu.edu.au, free with an account. Optional if you only use the legacy endpoint.

Building

make build        # wheels for all platforms, plus documentation
make check        # tests, format check, and vet
make dev          # run from source via a .venv launcher

How it fits together

  internet side                    diode                 protected side
  ─────────────                    ─────                 ──────────────
  ANU ──> collect ──> outbox ──> [ send ] ══════> [ recv ] ──> ingest ──> spool
                                                                            │
                                                                            v
                                                         pool.json <── serve ──> GET /api/random

Nothing comes back, so the collector never learns whether a batch arrived. Both sides are built to be restartable and to keep a buffer: batches wait in the outbox until the send succeeds, and the pool holds a reserve so the server keeps working while the other side is down.

Security

There is no authentication on the API. Anyone who can reach the port can drain the pool. The default binds to 127.0.0.1 — keep it on loopback or a trusted network, or put a reverse proxy in front of it.

Diode passwords are written to a file with mode 0600 and passed with --password-file rather than on a command line, where ps would expose them.

Because a diode carries nothing back, the collector cannot be told the server is running low. Watch /api/status or wj-diode-quantum stats on the protected side.

Licence

Released under the Unlicense — public domain.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

wj_diode_quantum-1.0.0b2-py3-none-win_arm64.whl (2.6 MB view details)

Uploaded Python 3Windows ARM64

wj_diode_quantum-1.0.0b2-py3-none-win_amd64.whl (2.9 MB view details)

Uploaded Python 3Windows x86-64

wj_diode_quantum-1.0.0b2-py3-none-manylinux_2_17_x86_64.whl (2.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

wj_diode_quantum-1.0.0b2-py3-none-manylinux_2_17_aarch64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

wj_diode_quantum-1.0.0b2-py3-none-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

wj_diode_quantum-1.0.0b2-py3-none-macosx_10_9_x86_64.whl (2.9 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file wj_diode_quantum-1.0.0b2-py3-none-win_arm64.whl.

File metadata

File hashes

Hashes for wj_diode_quantum-1.0.0b2-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 c377f8dcbc75296d410cfede8d1510126907cc576dfd8298ea229cc5f7b14ed6
MD5 955e52c7e206daa1e201d2438bbd7d34
BLAKE2b-256 7635d57ae8d47dbe5c05b04e16a48b0b2b636547ab2224c5e50b4337f652c25f

See more details on using hashes here.

File details

Details for the file wj_diode_quantum-1.0.0b2-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for wj_diode_quantum-1.0.0b2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e3edaa55e2a5d7e49bd312088b79455902439ebd6d61108bf67d92b5336aa425
MD5 c82346991773a844732bd5c34f55cbc8
BLAKE2b-256 183e83be34c2fdab79156bbb235f7b7b53ce86d25eed7cc19a429bbac241d58d

See more details on using hashes here.

File details

Details for the file wj_diode_quantum-1.0.0b2-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for wj_diode_quantum-1.0.0b2-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 119b48b04cd018533f442eb7a70d1a54659d01b8f3a5dd2cb7013f86cd84c9c9
MD5 b3f277b0c8c6612851aa2ab4b9998b97
BLAKE2b-256 181f52221ddfe9a3e4c9128b0666b75b4a10571109bb520ec14d38b8512307fa

See more details on using hashes here.

File details

Details for the file wj_diode_quantum-1.0.0b2-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for wj_diode_quantum-1.0.0b2-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 b325c0bb6c0cef54086417e150beb35524d3948f54151e2a2111bb4cba7fe273
MD5 d58c56646956ca55c8c747cc66493308
BLAKE2b-256 e58dea64ecc6836f8dd2e68176e83003f3d7e20ec5567ea1be69bfb485145831

See more details on using hashes here.

File details

Details for the file wj_diode_quantum-1.0.0b2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wj_diode_quantum-1.0.0b2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 814a3dbdddf60ed89cde36dc02ddf864e0c4c5e84ee884dfd1370ab79a88eb44
MD5 10ef7d27bf41b078af16d3c9cfef0fa2
BLAKE2b-256 1b1e938fa899072001c92ab6c282dd229b2decb0d04baa6aaaf8ce4e39a72b48

See more details on using hashes here.

File details

Details for the file wj_diode_quantum-1.0.0b2-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for wj_diode_quantum-1.0.0b2-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 99cc82d241b44f592e853cde35b691b6898f4f266f94314c535e6e012b9cc117
MD5 67355daafed02afea6c4b96ba2e813c8
BLAKE2b-256 63949b887338ac428bcc501f02173b2b5603e5ad9ab7dcb85461c9b086049134

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

6 files

This release

1.0.0b2 This release

6 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page