Skip to main content

Verifiable Delay Functions

Verifiable Delay Functions (VDF) was introduced in 2018 and has become an active research aera in cryptography. VDF has many applications in blockchains, such as randomness beacon, resource-efficient blockchain, computational timestamping, etc. In this chapter, we first give a brief overview of VDF, then study and discuss several existing VDF constructions.

Author(s): phamnhatminh1292001

Introduction to VDF

Verifiable Delay Functions (VDF) were introducted by Boneh et al BBBF18 in 2018. Informally, a VDF is a funtion that requires a specified number of step to compute its output, even with a large number of parallel processor, but the correctness of the output can be quickly verified. While there can be many functions that require a specified of step to compute its output, not all of them are qualified to become VDFs. For example, consider the function f(X)=SHA256t(X)=SHA256(SHA256(...(SHA256(X))...))f(X)=\mathsf{SHA256}^t(X)=\mathsf{SHA256}(\mathsf{SHA256}(...(\mathsf{SHA256}(X))...)). Calculating f(X)f(X) require tt iterations, even on a parallel computer. However, verification would also require tt iterations, thus the function f(X)f(X), while VDF verification time must be within O(poly(logt))O(poly(\log t)). VDFs has found it application in many aspects BBBF18. We will highlight some of them later in the Application section.

VDF Algorithms

A VDF consists of three algorithms (Gen,Eval,Verify) (\mathsf{Gen}, \mathsf{Eval}, \mathsf{Verify}) where:

(ek,vk)Gen(1λ,t)(ek,vk) \leftarrow \mathsf{Gen}(1^{\lambda},t): This algorithm takes as input as a security parameter λ\lambda, and outputs a public key pair (ek,vk) (ek,vk).

(Y,π)Eval(X,ek,t) (Y,\pi) \leftarrow \mathsf{Eval}(X,ek,t): This algorithm takes an input an evaluation key sksk, a value XX a time parameter tt and outputs a value Y0,1out(λ)Y \in \\{0,1\\}^{out(\lambda)} and a proof π\pi.

bVerify(vk,X,Y,π,t) b \leftarrow \mathsf{Verify}(vk,X,Y,\pi,t): This algorithm takes an input a verification key vkvk , a value XX, a value YY, a proof π\pi, a time parameter tt and outputs a bit bb that determines whether Y=Eval(X,ek)Y=\mathsf{Eval}(X,ek). This algorithm run within time O(poly(logt))O(poly(\log t)).

VDF Properties

We require a VDF to have the following security properties:

Correctness: For all parameter xx,tt and (ek,vk)Gen(1λ)(ek,vk) \leftarrow \mathsf{Gen}(1^{\lambda}) if (Y,π)=Eval(ek,X,t)(Y,\pi)=Eval(ek,X,t) then Verify(vk,X,Y,π,t)=1Verify(vk,X,Y,\pi,t)=1

Soundness: A VDF is sound if every algorithms AA can solve the following problem with negligible probability in λ\lambda: Given ev,vkev,vk output X,Y,πX,Y,\pi such that (Y,π)Eval(ek,X,t)(Y,\pi) \neq Eval(ek,X,t) and Verify(vk,X,Y,π,t)=1Verify(vk,X,Y,\pi,t)=1.

Sequentiality: A VDF is tt-sequentiality if for all algorithms AA with at most O(poly(t))O(\mathsf{poly}(t)) parallel processors and runs within time O(poly(t))O(\mathsf{poly}(t)), the experiment ExpSeqVDFA(1λ)ExpSeq*{VDF}^{A}(1^\lambda) is negilible in λ\lambda, where ExpSeqVDFA(1λ)ExpSeq*{VDF}^{A}(1^\lambda) is described as follows:

ExpSeq_VDFA(1λ)ExpSeq\_{VDF}^{A}(1^\lambda):

  • (ek,vk)Gen(1λ)(ek,vk) \leftarrow \mathsf{Gen}(1^{\lambda})
  • X$0,1in(λ)X {\stackrel{\$}{\leftarrow}} \\{0,1\\}^{in(\lambda)}
  • (Y,π)A(X,ek,vk)(Y,\pi) \leftarrow A(X,ek,vk)
  • Return (Y,π)==Eval(X,ek,t)(Y,\pi)==\mathsf{Eval}(X,ek,t)

VDF Applications

We present several applications of VDF below:

Randomness Beacon: To see the application of VDF in randomness beacons, we take a look at two examples below: In proof of work blockchains, miners find solutions to computational puzzles and then submits them for monetary rewards. However, there can be more than one solution, and a miner may submit the one that benefits him the most, or refuse to submit if it does not benefit him. Using VDF, then given the deterministic nature of VDF, a miner cannot choose any output other than the VDF output for his goal. Another example is the the RANDAO Ra17 that use "commit-and-reveal" paradigm. In RANDAO, each participant PiP_i submit the commitment of a random value sis_i, after each participants reveal sis_i and the final output is defined to be s=i=1nsi.s=\oplus_{i=1}^ns_i.. The problem is that the last participant may not submit his value if the final output does not benefit him. One approach to solve this problem is to use VDF. After all sis_is are revealed, the value H(s1,s2,...,sn)H(s_1,s_2,...,s_n) is used as the seed of the VDF and the beacon output is the VDF output LW15. With a sufficient time parameter, the last participant cannot predict the output on time, even if he knows the seed.

Resource efficient Blockchain: Various attempts have been made to develop resource-efficient blockchains to reduce energy consumption. However, resource-efficient mining suffers from nothing-at-stake attack BBBF18. Cohen proposes to combine proof of resources KCMW15 with an incremental verifiable delay function and use the product of proven resources and induced delay as a measure of blockchain quality. This scheme prevents nothing-at-stake attacks by simulating the proof-of-work mining process WXWJWR22. For other applications of VDF, we refer the readers to BBBF18.

A Survey of VDF Constructions

In this section, we study several well known candidates for VDF constructions. These include: the construction of Dwork and Naor DN92, the construction of Pietrzak Pie19 and Wesolowski Wes19, and the isogeny based construction of de Feo et al FMPS19. Then we compare these constructions. Finally, we discuss a possible construction based on incremential verifiable computation BBBF18.

Modular Square Root based Construction

One of the early example of VDF can be found in the paper of Dwork and Naor DN92. Their construction require a prover, to compute Y=(X)(modp)Y=\sqrt(X) \pmod{p} for a prime pp and input XX. When p3(mod4)p \equiv 3 \pmod{4} we see that Y=Xp+14(modp)Y=X^{\dfrac{p+1}{4}} \pmod{p}, and thus computing YY requires O(logp)O(\log p) computation steps. Verifying only require one multiplication by checking Y2X(modp)Y^2 \equiv X \pmod{p}. The construction is formally described as follow.

Gen(1λ)\mathsf{Gen}(1^\lambda): The algorithm outputs a λ\lambda bit prime pp where p3(mod4)p \equiv 3 \pmod{4}.

Eval(X)\mathsf{Eval}(X): Compute Y=Xp+14(modp)Y=X^{\dfrac{p+1}{4}} \pmod{p}. The proof π\pi is YY.

Verify(X,Y,π)\mathsf{Verify}(X,Y,\pi): Check if Y2X(modp)Y^2 \equiv X \pmod{p}.

This construction, althought very simple, has two problem: First, the time parameter tt is only to logp\log p, thus to increase tt, a very large prime pp is required. Second, it is possible to use parallel processors to speed up in field multiplications.

Group of Unknown Order based Constructions

As its name suggests, most constructions follow this direction uses a group GG such that G|G| is unknown. These constructions require the prover to calculate the value y=g2ty=g^{2^t} and provide a proof π\pi of yy that allows efficient verification. Without the knowledge of G|G|, calculating yy requires O(t)O(t) steps. There are two candidates for such a group: The RSA group and the Class Group of Imaginary Quadratic Number Field. The RSA group is the group G=(Z×,.)G=(\mathbb{Z}^\times,.) where NN is a product of two primes with unknown factorization. Computing the group order of NN is as hard as factoring NN, so GG can be seen as a Group of Unknown Order. However, the problem of the RSA group is that we require a trusted party to generate NN. To avoid trusted setup, we can choose GG to be the class group of an imaginary quadratic field. For a large d3(mod4)d \equiv 3 \pmod{4}, it is assumed that the order of the class group of Q(d)\mathbb{Q}(\sqrt{d}) is hard to compute.

Pietrzak's Construction

Pietrzak Pie19 proposed a VDF based on a Group of Unknown Order. His idea for generating the proof for y=g2ty=g^{2^t} is to use the identity zry=(grz)2t/2z^ry=(g^rz)^{2^{t/2}} for any rr where z=g2t/2z=g^{2^{t/2}}. His construction is described below.

Gen(1λ)\mathsf{Gen}(1^\lambda): The algoritms outputs pp=(G,H)pp=(G,H), where:

  • GG is a finite group.
  • HH, a hash function that maps arbitary input length to a bit string.

Eval(X,pp,t)\mathsf{Eval}(X,pp,t): To generate the proof for Y=g2tY=g^{2^t}, compute ui+1=uiri+2t/2iu*{i+1}=u_i^{r_i+2^{t/2^i}}, where ri=H(ui,t/2i,vi,ui2t/2i)r_i=H(u_i,t/2^i,v_i,u_i^{2^{t/2^i}}) and vi=uiri2t/2i+2tv_i=u_i^{r_i2^{t/2^i}+2^t}. The algorithm outputs (Y,π)(Y,\pi)=(g2t,u1,u2,...,ulogt)(g^{2^t},\\{u_1,u_2,...,u_{\log t}\\}).

Verify(X,Y,π,pp,t)\mathsf{Verify}(X,Y,\pi,pp,t): To verify the output, compute vi=uiri2t/2i+2tv_i=u_i^{r_i2^{t/2^i}+2^t} and check if vlogt==u_logt2v_{\log t}==u\_{\log t}^2.

Wesolowski's Construction

Independently from Pietrzak, Wesolowski Wes19 also constructed a VDF based on a Group of Unknown Order. Unlike Pietrzak's, Wesolowski's construction has shorter proof size and allows faster verification. However, the proving time is slower, as it require O(t)O(t) computation steps compared to O(t)O(\sqrt{t}) in Pietrzak's construction.

Gen(1λ)\mathsf{Gen}(1^\lambda): The algoritms outputs (pk,sk)(pk,sk)=((G,H1,H2),G)((G,H_1,H_2),|G|) where:

  • GG is a finite group.

  • H1H_1 is a hash function that maps a bit string XX to an element gg in GG.

  • H2H_2 is a hash function that maps arbitary input length to a bit string. Eval(X,sk,t)\mathsf{Eval}(X,sk,t): By converting XX to an element g=H1(X)Gg=H_1(X) \in G, the algorithm outputs (Y,π)(Y,\pi)=(g2t,g(2tr)/l)(g^{2^t},g^{(2^t-r)/l}), where l=H2(gY)l=H_2(g||Y). The trapdoor information makes calculation faster as follow:

  • Eval with trapdoor: With the knowledge of G|G| as a trapdoor, the value of YY can be computed within OlogtO\log t time by calculating e=2t(modG)e=2^t \pmod{|G|} and Y=geY=g^e. Similarly, one can compute π\pi quickly by calculating q=(2tr)/l(modG)q=(2^t-r)/l \pmod{|G|} and π=gq\pi=g^q.

  • Eval without trapdoor: Without the knowledge of G|G|, computation of YY and π\pi require O(λt)O(\lambda t) and O(tlogt)O(t\\log t) time, respectively.

Verify(X,Y,π,pk,t)\mathsf{Verify}(X,Y,\pi,pk,t): To verify the output, simply check if grπl==Yg^r\pi^l==Y.

Isogeny based Constructions

In 2019, Luca de Feo et al FMPS19 constructed a VDF based on isogenies of supersingular elliptic curves and pairing. Their construction is motivated by the BLS signature, which uses a bilinear pairing. FMPS19.

For more information about elliptic curves and isogeny graph G_Fq(l)G\_{F_q}(l), we refer the reader to see the Elliptic Curve chapter I wrote earlier.. Before continuing, we introduce some notations. Let ll be a small prime. Let NN be a large prime and pp be another prime such that p+1p+1 is divisible by NN. For an elliptic curve E/FE/\mathbf{F}, define E[N]=PEN(P)=OE[N]=\\{P \in E | N_(P)=O\\} where OO is the infinity point. The definition and properties of Weil pairing can be found in BLS03. In the construction, the authors consider the pairing eN:E[N]×E[N]μNe_N: E[N]\times E'[N] \rightarrow \mu_N. As the authors stated in their paper, the main important property the pairing is that, for any curves EE, isogeny EEE \rightarrow E' and PE[N]P \in E[N] and QE[N]Q \in E'[N] we have eN(P,ϕ(Q)^)=eN(ϕ(P),Q)e_N(P,\hat{\phi(Q)})=e_N(\phi(P),Q). Now we move to describe the VDF Construction.

Gen(1λ,t)\mathsf{Gen}(1^\lambda,t): The algorithm selects a supersingular ellpitic curve E/FE/ \mathbb{F}, then choose a direction of the supersingular isogeny graph of degree ll, then compute the isogeny ϕEE\phi E \rightarrow E' of degree ltl^t and its dual isogeny ϕ^\hat{\phi}.

Eval(Q)\mathsf{Eval}(Q): For a point QE[N]E(F)Q \in E'[N]\cap E(\mathbf{F}), outputs ϕ(Q)^\hat{\phi(Q)}.

Verify(E,E,P,Q,ϕ(P),ϕ(Q)^)\mathsf{Verify}(E,E',P,Q,\phi(P),\hat{\phi(Q)}): Check that ϕ(Q)^E[N]E(F)\hat{\phi(Q)} \in E[N]\cap E(\mathbf{F}) and eN(P,ϕ(Q)^)=eN(ϕ(P),Q)e_N(P,\hat{\phi(Q)})=e_N(\phi(P),Q).

The security of the VDF is based on the assumption that, to compute the isogeny the map ϕ^\hat{\phi}, we are expected to walk tt times between some vertices in the isogeny graph G_Fq(l)G\_{F_q}(l). Currently, there is no efficient algorithm to find shortcut between these vertices of the graph. Finally, while the VDF is isogeny-based, it is not completely quantum secure, due to of the relation eN(P,ϕ(Q)^)=eN(ϕ(P),Q)e_N(P,\hat{\phi(Q)})=e_N(\phi(P),Q) of bilinear pairing. Since Shor's algorithm can break the pairing inversion problem FMPS19, it can trivially recover the output ϕ(Q)^\hat{\phi(Q)} from the relation above.

Comparision

Now that we have described several well known VDF constructions, we would like to compare them. The table below compares the evaluation time, proof size and verification time of the VDF we described. Note that the value PP in the table denote the number of processors.

ConstructionEval TimeEval Time (parallel)Verification TimeProof Size
Dwork and NaorO(t)O(t)O(t2/3)O(t^{2/3})O(1)O(1)O(λ)O(\lambda)
PietrzakO(t+t)O(t+\sqrt{t})O(t+tP)O(t+\frac{\sqrt{t}}{P})O(logt)O(\log t)O(logt)O(\log t)
WesolowskiO(t+tlogt)O(t+\frac{t}{\log t})O(t+tPlogt)O(t+\frac{\sqrt{t}}{P \log t})λ4\lambda^4O(λ3)O(\lambda^3)
Feo et al.O(t)O(t)O(t)O(t)λ4\lambda^4O(λ)O(\lambda)

Possible IVC based construction

Apart from the previous well-known constructions, we now discuss another possible direction to construct a VDF is to use Incrementally Verifiable Computation (IVC) BBBF18. The basic idea of IVC is that after each computation step, the prover can produce a proof of the current state. The proof can also be updated after each step to produce a new proof for the corresponding step. The definition and properties of IVC can be found in Pa08. Now, consider a IVC system (IVC.Setup,IVC.Prove,IVC.Verify)(\mathsf{IVC.Setup}, \mathsf{IVC.Prove}, \mathsf{IVC.Verify}) for a function ff, it is possible to construct a VDF as follow:

Gen(1λ,t)\mathsf{Gen}(1^\lambda,t): Run (ek,vk)(ek,vk) \leftarrow IVC.Gen(1λ,f,t)\mathsf{IVC.Gen}(1^\lambda,f,t).

Eval(X,ek,t)\mathsf{Eval}(X,ek,t): Run and output (Y,π)(Y,\pi)\leftarrow IVC.Prove(X,ek,t)\mathsf{IVC.Prove}(X,ek,t).

Verify(X,Y,π,vk,t)\mathsf{Verify}(X,Y,\pi,vk,t): Outputs IVC.Verify(X,Y,π,vk,t)\mathsf{IVC.Verify}(X,Y,\pi,vk,t).

The construction above is rather general. Therefore, it remains a question to choose a suitable IVC system and a function ff to make the construction pratical. As suggested by Boneh et al BBBF18 and Ethereum KMT22, there are several candidate functions ff, for example VeeDo, Sloth++ BBBF18 or Minroot KMT22. Most previous IVCs involves using succinct non-interactive arguments of knowledge (SNARK). For these IVC constructions, at each step the prover has to constructs a SNARK which verifies a SNARK BBBF18. This involves many FFT operations each step, and the SNARK verification circuit can be very expensive. In the recent NOVA KST22 proof system, the prover does not have to compute any FFT, and the recursion overhead is much lower than SNARK based IVCs KST22. It is interesting to see if there will be any IVC based VDF using NOVA.