Chaincamp

A minimal blog on the building blocks of ethereum & cryptographic primitives

16 Feb 2024

VDF Math

To delve into Verifiable Delay Functions (VDFs) with a strictly mathematical perspective, we must start with their foundational principles. VDFs are cryptographic primitives that ensure a specific amount of time has passed before an output can be computed from a given input. They are crucial in various blockchain and cryptographic applications, providing security and fairness in the presence of potentially malicious actors.

1. Definition and Purpose

A Verifiable Delay Function \( f \) takes an input \( x \), and produces an output \( y \), with two key properties:

  • Delay: Computation of \( f(x) \) requires a predetermined number of sequential steps, which implies that parallel processing cannot significantly speed up the computation. This enforced delay is crucial for applications that require time-lock puzzles or proofs of sequential work.

  • Verifiability: Given \( x \), \( y \), and a proof \( \pi \), anyone can efficiently verify \( y = f(x) \) without redoing the time-consuming computation of \( f \).

2. Mathematical Construction

At its core, a VDF is constructed using three algorithms:

  • Setup(\( \lambda \), \( T \)): Takes a security parameter \( \lambda \) and a time parameter \( T \) to produce public parameters \( pp \). \( T \) dictates the computational effort required.
  • Evaluate(\( pp \), \( x \)): Given \( pp \) and an input \( x \), it produces an output \( y \) and a proof \( \pi \) after performing \( T \) sequential operations.
  • Verify(\( pp \), \( x \), \( y \), \( \pi \)): Efficiently verifies whether \( y \) is the correct output for \( x \), using \( pp \) and \( \pi \).

3. Security Properties

VDFs must satisfy two critical security properties:

  • Soundness: If the verifier accepts \( \pi \), then it must be that \( y = f(x) \) with overwhelming probability. This ensures that correct computation can be efficiently verified.

  • Sequentiality: No algorithm, even with significant parallel computational resources, can compute \( f(x) \) significantly faster than \( T \) sequential steps. This is often ensured by relying on inherently sequential mathematical problems.

4. Example Implementation

One popular construction of VDFs is based on repeated squaring in a group of unknown order, such as RSA groups or class groups. The essence of this approach is:

  • Setup: Generate a group \( G \) of unknown order and select a random element \( g \in G \).

  • Evaluate: Compute \( y = g^{2^T} \mod N \) for an RSA group \( G \) with modulus \( N \), where \( 2^T \) represents the sequential squaring operations.

  • Verify: Utilize the proof \( \pi \) to check the correctness of \( y \) without performing all \( 2^T \) squarings.

5. Challenges and Open Problems

While the concept of VDFs is relatively straightforward, their secure and efficient implementation faces several challenges, including:

  • Trusted Setup: Ensuring the setup process is secure and generates parameters that do not compromise the function’s integrity.
  • Efficiency: Balancing the trade-off between the time required to perform the sequential work and the efficiency of the verification process.
  • Adaptive Security: Protecting against adversaries who may gain computational advantages over time.

VDFs are a fascinating area of research within cryptography, providing essential functionality for decentralized systems and beyond. Their mathematical foundations lie in the complexity of sequential computation and the ability to verify such computation efficiently.