Docs.
What it does
bitsig makes random results that other people can trust without having to trust you, or bitsig.
Why bitsig is fair, in plain terms, is on the About page.
Functions
- Random
- Bits, coins, dice, numbers, picks and shuffles from a public randomness beacon. Each result names its round and seed, so anyone can recompute it.
- Fair drawing
- Pick winners at a time set in advance. Share the link before the drawing; nobody, including you, can know the result until then.
- Organizers
- A public, numbered log of every drawing you make, so a redone drawing can’t be hidden.
- Seeds
- One random number per moment, named by its time. Announce the time first, use the seed after. Today’s seed.
- Callbacks
- bitsig sends the result to your server when it arrives.
- Sign
- A receipt signed by bitsig showing a file or text existed at a time. Only its fingerprint leaves your device.
- Signatures
- Every result and receipt is signed by bitsig’s key, so an altered copy fails the check.
- Verify
- Check any result or receipt yourself, on the verify page or with a few lines of Python.
- The shared bit
- The square in the corner is one bit shared by everyone on the site. Tap it to flip it.
Random
bitsig.net | 0 or 1 |
bitsig.net/256 | 256 bits (max 4096) |
bitsig.net/coin | heads or tails |
bitsig.net/d20 | die, any sides |
bitsig.net/1-100 | integer, inclusive |
bitsig.net/hex/32 | bytes as hex (max 1024) |
bitsig.net/pick?a,b,c | one item |
bitsig.net/shuffle?a,b,c | items in random order |
bitsig.net/today | today’s seed (round at 00:00 UTC) |
bitsig.net/day/2026-12-01 | the seed for any date |
bitsig.net/seed?at=2026-12-01T09:00Z | the seed for a moment, past or future |
POST bitsig.net/sign | signed receipt for a SHA-256 |
bitsig.net/key | bitsig’s public key |
POST bitsig.net/draw | make a fair drawing |
bitsig.net/draw/ID | its status or result |
POST bitsig.net/organizer | start a public drawing log |
bitsig.net/o/ID | an organizer’s log |
bitsig.net/state | the shared bit |
POST bitsig.net/flip | flip it |
Options: seed=, round=, json. Joined with &.
Fair drawing
$ curl bitsig.net/draw -d choices=alice,bob,carol -d in=60
https://bitsig.net/draw/k3x9m2pq7a
draws 2026-11-17T03:10:00.000Z
$ curl bitsig.net/draw/k3x9m2pq7a
bob
Fields: choices, title, mode (winners, order, groups, lottery or santa) with winners or groups, and one of in (seconds), at (ISO time; add tz=Asia/Singapore to give a local time without an offset) or round. JSON in, JSON out with Accept: application/json. The seed is the drawing ID. Share the link before the drawing time.
For a Secret Santa circle, send mode=santa. To keep some people from drawing each other, add circle_teams, one whole number per entry (a team label; 0 for none), for example 1,1,2,2,0,0, and circle_not, extra pairs by entry number, for example 3-7,4-9. Entries are numbered from 1 in the list as sent. Keep repeated lines (duplicates=keep). A setup that is impossible or too tight is refused with a plain reason. The drawing’s op is then circle?…; see the specification.
Other fields: lottery takes one entry per line as Name: chances (whole numbers) and an optional lottery_picks; santa draws a circle of at least three people. mask_scheme=v2 marks a drawing whose entries are already 16-digit tags made in the organizer’s browser; the server never receives the names, so the API can’t hide names for you. The mask field in a drawing’s JSON shows the scheme. duplicates is keep, remove or reject.
Picking winners takes up to 1,000,000 entries (a request of up to 16 MB, a list of up to 10,000,000 bytes); order, groups and lotteries take up to 10,000. Past 10,000 entries the drawing’s op names its list by SHA-256 (shuffle@COUNT:SHA256) and the list is at /draw/ID/list.txt; see the specification.
Prefilled links, for assistants and developers
Every tool page fills its form from the part of the link after #. That part is never sent to bitsig, so names in a link are not logged. The page shows the filled form and makes nothing until a person presses the button.
Keys: title, names (entries separated by commas), winners and groups (whole numbers, where the tool has them), and, on Secret Santa, teams (one label per name, in the same order, empty for none) and pairs (pairs separated by ;, the two names in a pair separated by a comma). Percent-encode a comma, & or ; that belongs inside a value. A key the form can’t use is ignored, and the form says which one.
https://bitsig.net/secret-santa#title=Office&names=Ana,Ben,Chi,Dev,Eli,Fay&teams=Red,Red,Blue,Blue,Green,Green
A short description of the site and its tools for assistants is at /llms.txt.
Organizers
An organizer is a public, numbered log of every drawing made with its token. Nobody can make a drawing under your name and hide it, including you, so a redone drawing shows up as #2. Announce your log link once; a drawing without an organizer proves nothing about how many others were made.
$ curl bitsig.net/organizer -d name='Acme giveaways'
id q7h2m4x9ka
token bsg_…
page https://bitsig.net/o/q7h2m4x9ka
$ curl bitsig.net/draw -H 'Authorization: Bearer bsg_…' -d choices=a,b,c -d in=60
$ curl 'bitsig.net/o/q7h2m4x9ka?json'
The token is shown once and bitsig stores only its hash. Each entry links to the one before it: entry = SHA-256 of the canonical JSON of {organizer, seq, prev, draw, title, op, winners, round, created_at} (plus groups for a drawing split into groups), with prev = the previous entry, or 64 zeros for #1. The log is signed by bitsig, so a saved copy shows later tampering.
bitsig can remove the text of an entry that is unlawful or exposes someone’s personal details. A removed entry keeps its number, times and hashes and is marked removed, so the chain still links; its own hash can no longer be recomputed. Requests: abuse@bitsig.net.
Seeds
A seed is the 32-byte randomness of one drand round, named by time. Announce the time first, use the seed after. Add as=u32 or as=u64 for an integer. A future time answers 425 with Retry-After until it arrives.
$ curl bitsig.net/today
$ curl 'bitsig.net/seed?at=2026-12-01T09:00:00Z&as=u32'
Callbacks
Add callback=https://… to POST /seed or POST /draw and bitsig posts the JSON result to that URL when it arrives. The round must be at least a minute away when you ask. The URL must use https on the standard port; redirects aren’t followed. Up to three tries, after no answer, a 429 or a 5xx. Check the result against drand rather than trusting the callback.
$ curl bitsig.net/seed -d in=3600 -d callback=https://example.com/hook
Sign
Send a SHA-256 and get back a receipt signed by bitsig: the fingerprint, the time, and the latest drand round, which proves the receipt was made after that round. bitsig keeps nothing.
$ curl bitsig.net/sign -d hash=$(sha256sum file.pdf | cut -d' ' -f1)
$ curl bitsig.net/sign -d text='hello' -d label='note'
Signatures
Results, seeds, drawings, drawing receipts and sign receipts carry a bitsig: an Ed25519 signature by bitsig over the record’s canonical JSON (the record without bitsig, keys sorted, no whitespace, UTF-8). Public key: /key, /key.pem. Key id 2907723a1e0413bb, in use since 17 November 2026. If the key is ever replaced, /key keeps the old public key under keys, so older records can still be checked; match a record’s bitsig.key to a key id there.
import base64, json, sys, urllib.request
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
rec = json.load(open(sys.argv[1])); sig = rec.pop("bitsig")
key = json.load(urllib.request.urlopen("https://bitsig.net/key"))
assert sig["key"] == key["key_id"]
pub = Ed25519PublicKey.from_public_bytes(base64.urlsafe_b64decode(key["public_key"] + "=="))
msg = json.dumps(rec, sort_keys=True, separators=(",", ":"), ensure_ascii=False).encode()
pub.verify(base64.urlsafe_b64decode(sig["sig"] + "=="), msg)
print("signed by bitsig")
Clients
Python: bitsg.py, one file, standard library only, except that checking bitsig’s signatures needs cryptography and checking drand’s needs py_ecc. It makes drawings, checks the drand round and recomputes results.
import bitsg
d = bitsg.draw(["alice", "bob", "carol"], at="2026-12-01T09:00", tz="Asia/Singapore")
print(d["url"])
r = bitsg.get(d["id"]) # after the drawing time
bitsg.verify_draw(r) # drand round checked, result recomputed
bitsg.verify_signature(r) # signed by bitsig
JavaScript: /random.js (derivation), /drand.js (drand signature check) and /sign.js (bitsig signature check) are ES modules you can import in a browser or Deno.
Method
- R = SHA-256 of the signature on drand quicknet round N. The League of Entropy signs each round with a threshold BLS key; bitsig, the verify page and the Python client check that signature before using a round.
- Block i = SHA-256(R ‖ seed ‖ i as uint32 big-endian).
- Bits and hex: read from the front, MSB first. Coin: first bit, 1 = heads.
- Ranges: 4-byte words, rejection-sampled.
- Shuffle: Fisher–Yates, last item down.
Full detail, with test vectors: specification. Source: /random.js, /drand.js.
Check in Python
import hashlib, json, sys, urllib.request
chain = "52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
rnd, seed = sys.argv[1], sys.argv[2]
b = json.load(urllib.request.urlopen(f"https://api.drand.sh/{chain}/public/{rnd}"))
r = bytes.fromhex(b["randomness"])
print(hashlib.sha256(r + seed.encode() + bytes(4)).digest()[0] >> 7)