Skip to content

Recap and First Protocol โ€‹

We now have the tools to define a preliminary validation protocol for computing the squared 4th Fibonacci number. Here's an outline of each party's steps:

1. Setup โ€‹

  1. (Both) Fix a working field Fp and note that we will interpolate polynomials of degree โ‰ค3.
  2. (Both) Compute selector polynomials qL,qR,qM corresponding to this circuit.

2. Prover Computation โ€‹

  1. (Prover P) Computes the 4th Fibonacci number squared F42 by forming a table of intermediate values, then interpolates them as 3rd-degree polynomials:

    a(x),b(x),c(x).

    as well as selectors qL(x),qR(x),qM(x).

  2. (Prover P) Computes

    t(x)=qL(x)โ‹…a(x)+qR(x)โ‹…b(x)+qM(x)โ‹…(a(x)โ‹…b(x))โˆ’c(x)

    as well as the quotient polynomial Q(x) satisfying

    t(x)=Q(x)โ‹…Z(x).
  3. (Prover P) Similarly constructs

    f1(x)=a(x+1)โˆ’b(x),f2(x)=b(x+1)โˆ’c(x),

    along with their quotient polynomials

    Q1(x),Q2(x)

    using Z1(x) for the domain {1,2}.

3. Prover โ†’ Verifier Communication โ€‹

  1. (Prover P) Sends the polynomialsa(x),b(x),c(x),Q(x),Q1(x),Q2(x)to the Validator V.

4. Verifier Checks โ€‹

  1. (Verifier V) Checks the base conditions:

    a(1)=0,b(1)=1.
  2. (Verifier V) Computes t(x)=qL(x)โ‹…a(x)+qR(x)โ‹…b(x)+qM(x)โ‹…(a(x)โ‹…b(x))โˆ’c(x) and verifies

    t(x)=Q(x)โ‹…Z(x).

    That is, t(x) is indeed divisible by Z(x).

  3. (Verifier V) Checks the recursive constraints:

    f1(x)=Q1(x)โ‹…Z1(x),f2(x)=Q2(x)โ‹…Z1(x).
  4. (Verifier V) Checks the square gate constraints:

    f3(4)=c(3)โˆ’b(4)=0,f4(4)=a(4)โˆ’b(4)=0.
  5. (Verifier V) If all checks pass, the Verifier concludes

    c(4)is the correct value ofย F42.

This protocol is correct but seems quite inefficient: instead of doing only 3 additions and one multiplication, we end up performing polynomial multiplications of polynomials of degree 3 over a very large prime field Fp. We will now consider a more efficient version.

๐’ซ๐”ฉ๐”ฌ๐”ซ๐’ฆ Tutorial by zkSecurity