Cryptography

Verifiable Random Functions Explained: Randomness You Can Check But Not Predict

June 22, 2026 9 min read Haven Team

Picture a lottery where the operator draws the winning number in private, then announces it. How would you know they did not pick a number their friend already held? A verifiable random function solves exactly this. It lets one party produce an output that is unpredictable to everyone else, along with a proof that the output was computed honestly, so nobody has to trust the operator's word.


Randomness is easy to generate and hard to trust. A coin flip is fair only if you can watch it. The moment one party controls the source, everyone else has to take their result on faith, and faith is the wrong foundation for a security system. Plenty of protocols need a number that is both unpredictable in advance and provably not rigged after the fact: leader election, lotteries, anti-spam puzzles, and privacy-preserving lookups all share this need.

A verifiable random function, or VRF, is the cryptographic tool built for this. Introduced by Silvio Micali, Michael Rabin, and Salil Vadhan in 1999 and standardized in RFC 9381, it is the public-key cousin of a keyed hash. It binds three things together: a secret key, an input, and an output that looks random but is fully determined by the key and input, plus a proof anyone can check.

The three properties that make it useful

A VRF has a key pair. The holder of the secret key can evaluate the function on any input to get an output and a proof. Anyone with the public key can verify that the output matches the input. Three properties have to hold at once, and the tension between them is what makes the construction interesting.

Property What it guarantees
Uniqueness For a given key and input, only one output can pass verification. The key holder cannot produce two different valid answers and choose the one they prefer.
Pseudorandomness Without the secret key, the output is indistinguishable from random. Nobody can predict it for an input they have not yet seen evaluated.
Verifiability The proof lets anyone holding the public key confirm the output is correct, without learning the secret key.

Uniqueness is the property that separates a VRF from a plain signature. A standard digital signature can be non-deterministic, meaning the same message can have many valid signatures. That flexibility would be fatal here, because a key holder could grind through many valid outputs and publish whichever one served their interest. A VRF nails the output to exactly one value, then proves it.

The commitment angle

A VRF is effectively a hash that is keyed by a private key and verifiable by a public one. Like a cryptographic commitment, it removes the chance to change the answer after seeing the question, but unlike a commitment, the answer is also unpredictable until the key holder reveals it.

How it is built, in outline

Without drowning in the algebra, the shape of an elliptic-curve VRF is worth seeing. The evaluator hashes the input onto a point on an elliptic curve, then multiplies that point by their secret scalar key. The result is hashed to produce the final output. Because scalar multiplication on the curve is deterministic, the same input always yields the same point, which gives uniqueness.

The proof is the clever part. The evaluator attaches a non-interactive zero-knowledge proof that the same secret key was used both to derive their public key and to compute the output point. A verifier checks this proof against the public key and is convinced the output is correct, while learning nothing about the secret key itself. The construction leans on the same hardness assumptions that make Diffie-Hellman secure.

Where VRFs are quietly load-bearing

VRFs are not a household term, but several systems people rely on cannot work correctly without one.

Privacy-preserving DNSSEC

Classic DNSSEC has a privacy flaw called zone enumeration. To prove that a name does not exist, the old NSEC mechanism reveals the alphabetically neighboring names that do, which lets anyone walk the entire zone and list every record. The NSEC5 proposal replaces this with a VRF. The server proves a name's non-existence using a VRF output, so it can deny a query without leaking the names around it, and without holding the zone's signing key online.

Key transparency

Systems that publish a verifiable directory of users' public keys, the foundation of key transparency, use VRFs to protect privacy. Instead of indexing the directory by username in the clear, which would expose the full membership list, they index by the VRF output of the username. A user can prove their own entry is correct, but an outsider cannot enumerate everyone in the directory by scraping it.

Consensus leader selection

Distributed systems that need to pick a leader or committee for each round face a manipulation problem: whoever chooses must not be able to choose themselves. Several modern consensus designs have each participant evaluate a VRF on the round number using their own key. The output decides whether they are selected, it is unpredictable to others in advance, and the proof lets everyone verify the selection was not rigged after the fact.

VRF versus the things it resembles

It is easy to confuse a VRF with neighboring primitives. The distinctions are sharp once you focus on who can predict the output and who can verify it.

A plain hash is verifiable by everyone but keyed by no one, so it is predictable. An HMAC is keyed and unpredictable but only verifiable by someone holding the same secret. A signature is publicly verifiable but not necessarily unique or pseudorandom. A VRF is the one construction that is unpredictable to outsiders, publicly verifiable, and uniquely determined all at once.

That combination is rare and that is the whole point. Most of the time you only need two of the three. The systems that reach for a VRF are the ones where all three matter simultaneously, usually because a single party is generating a value that everyone else must be able to trust without trusting the party.

The takeaway

A verifiable random function turns "trust me, the draw was fair" into "here is the draw and the proof it was fair." It is a small piece of cryptographic machinery that shows up wherever a system needs randomness that cannot be predicted in advance, cannot be changed after the fact, and can be checked by anyone. The next time a protocol promises an unbiased random choice from a party who could profit by biasing it, a VRF is very likely the reason that promise holds.

Try Haven free for 15 days

Encrypted email and chat in one app. No credit card required.

Get Started →