How it works

Repeated squaring in a group of unknown order

The computation at the heart of a VDF is almost embarrassingly simple:

y=x2TmodNy = x^{2^T} \bmod N

computed by literally squaring TT times in a row, each squaring depending on the previous result:

y0=x,yi+1=yi2modN,y=yTy_0 = x, \qquad y_{i+1} = y_i^2 \bmod N, \qquad y = y_T

There’s no known way to compute x2TmodNx^{2^T} \bmod N faster than TT sequential squarings — not with more parallel hardware, not with a shortcut — as long as nobody knows the order of the group NN defines. That last condition is load-bearing: if you did know the group’s order φ(N)\varphi(N), you could reduce the giant exponent 2T2^T modulo that order first and then compute the result with a short, parallelizable modular-exponentiation instead of TT sequential steps.

Two ways to build a group of unknown order are used in practice:

The Wesolowski proof

Simply publishing yy isn’t enough — anyone could claim any yy. The prover needs to also produce a short proof that yy really is x2TmodNx^{2^T} \bmod N, checkable without redoing the TT squarings. Benjamin Wesolowski’s construction — a future History page on this site covers the citation and the alternative Pietrzak construction — does this with one extra group element:

=hash_to_prime(x,y,T)\ell = \text{hash\_to\_prime}(x, y, T)

a prime derived by hashing the statement itself — hash (x,y,T)(x, y, T) to a number, then search upward (checking primality with a Miller–Rabin test) until landing on a prime. Both prover and verifier compute \ell the same way, so nothing needs to be transmitted for it.

The prover then computes:

q=2T,r=2Tmod,π=xqmodNq = \left\lfloor \frac{2^T}{\ell} \right\rfloor, \qquad r = 2^T \bmod \ell, \qquad \pi = x^q \bmod N

Computing rr is a single fast modular exponentiation of the small base 2 — not TT sequential steps, since rr only needs 2Tmod2^T \bmod \ell, and \ell is small enough that this is a standard fast modpow. π\pi is the actual proof, sent to the verifier alongside yy.

Verification

The verifier recomputes \ell the same way the prover did, recomputes rr the same way, and checks one equation:

=hash_to_prime(x,y,T),r=2Tmod\ell' = \text{hash\_to\_prime}(x, y, T), \qquad r' = 2^T \bmod \ell' y=?πxr(modN)y \stackrel{?}{=} \pi^{\ell'} \cdot x^{r'} \pmod N

This holds because 2T=q+r2^T = q\ell + r by construction, so x2T=(xq)xr=πxr(modN)x^{2^T} = (x^q)^\ell \cdot x^r = \pi^\ell \cdot x^r \pmod N — exactly the right-hand side above. Verifying takes a small, fixed number of fast modular exponentiations, no matter how large TT was. That asymmetry — genuinely sequential to compute, cheap to check — is the entire point of the construction.

Two things this page won’t let you gloss over

Trusted setup, honestly stated. An RSA-modulus-based VDF is only as sequential as the guarantee that nobody knows NN‘s factorization. Generating pp and qq yourself and using them in your own computation is not a trusted setup in any meaningful sense — it’s the opposite: you’d know the group’s order and could skip straight to the answer, defeating the entire purpose. This site’s interactive demo generates its own RSA modulus client-side purely for demonstration purposes, and says so plainly rather than imply that’s how a real deployment works. A real deployment needs either an actual multi-party trusted-setup ceremony on a cryptographically-sized modulus, or a class group, which needs no trusted setup at all — Chia Network does the latter, covered on a future Applications page.

Proof generation is simplified here, honestly stated. Computing π=xqmodN\pi = x^q \bmod N by a direct modular exponentiation costs roughly the same number of sequential-ish operations as computing yy itself did, since qq is almost as large as 2T2^T. Production systems use smarter techniques — caching intermediate powers computed along the way during Eval, and splitting Wesolowski’s proof into many phases computed in parallel (“nn-Wesolowski”, used by Chia) — to make proof generation meaningfully faster than recomputing the delay from scratch. The interactive demo on this site (and a future Code page) use the direct, un-optimized computation of π\pi: correct, and fast enough at demo-sized TT, but not a demonstration of those production speedups.


Sources: Dan Boneh, Joseph Bonneau, Benedikt Bünz, Ben Fisch, “Verifiable Delay Functions,” CRYPTO 2018, pp. 757–788. Further pages on this site will cover the Wesolowski and Pietrzak papers individually, and Chia Network’s production use of class groups and nn-Wesolowski.