Back to the blog

Random

Prove a random draw was fair, with no server.

Show a fingerprint of a draw before it is made, let anyone add words, and publish a record they can check. How Prove it works, and what it cannot prove.

By 5 min read

A wheel of eight names in coloured slices with a pointer at the top, and beside it the pick, Priya, in large letters

When a prize or a turn depends on a draw, people want to know it was not chosen by whoever pressed the button. Without a trusted server, the best answer is to commit to the draw in public before it happens. Here is how Prove it does that.

Commit first: a fingerprint before the draw.

With Prove it on, the page makes a secret of 32 random bytes and shows only its fingerprint: SHA-256 of the secret and the list. A fingerprint like that cannot be undone to find the secret, and no other secret gives the same one, so once it is shown, neither the secret nor the list can change unseen.

Let the room add words.

After the fingerprint is shown, anyone may type words into the field: a team name, a line from the chat, anything. The draw is made from the secret, the list and those words together, so whoever draws cannot pick a secret that favours a result, because they did not know the words when they committed.

Publish the record; anyone can check it.

After the draw, the page shows a record: the list, the fingerprint, the words, the secret and the result. Paste it into “Check a draw” and the page makes the draw again and says whether the secret matches the fingerprint and the result is the same. The method is written in our documentation, so it can be checked with other software too.

What it cannot prove.

Someone could make many secrets and show only the one they like, but only before anyone types words. If nobody adds words, that loophole is open. No link or time stamp made on one device can prove when a draw happened or how many times it was tried; the page says so.

Further reading

Topics: provably fair draw · fair giveaway picker · verify random draw · commitment scheme · raffle proof · wheel of names rigged

A little less theory. A little more doing.

Try it on your own terms, with a free browser tool.

Try the tool