Last updated
Last updated
is a new Polynomial Commitment Scheme that is field-agnostic, with verifier complexity of and prover complexity of . While the RS-code used in FRI-IOPP requires an FFT-friendly field, BaseFold eliminates this constraint by introducing the concept of random foldable code, making it usable with sufficiently large fields.
In FRI, the following polynomial is folded using a random value .
After the first round, the polynomial becomes:
If this folding process is repeated times, the resulting polynomial will eventually reduce to a constant polynomial, which looks like:
The matrix on the left can be transformed into the matrix on the right by applying a row permutation.
If the matrix used in the encoding of a linear code takes the form above, it is referred to as a foldable linear code. Let us define this more formally.
To design a linear code that is foldable and efficiently encodable regardless of its finite field, BaseFold uses this algorithm:
The encoding can be computed recursively as follows:
This approach is valid and can be proven inductively:
The prover sends the following to the verifier:
The verifier checks that
In a 256-bit PCS:
BaseFold compared to field-agnostic Brakedown:
Prover time: Slower
Verifier time: Faster
Proof size: Bigger with a small number of variables but smaller with a large number of variables.
BaseFoldFri compared to the non-field-agnostic ZeromorphFri:
Prover time: Faster
Verifier time: Faster
Proof size: Larger
In a 64-bit PCS:
BaseFold compared to field-agnostic Brakedown:
Prover time: Slower
Verifier time: Faster
Proof size: Smaller
BaseFoldFri compared to the non-field-agnostic ZeromorphFri:
Prover time: Faster
Verifier time: Slower
Proof size: Larger
In a 256-bit SNARK:
BaseFold compared to field-agnostic Brakedown:
Prover time: Faster with a small number of variables but similar with a large number of variables.
Verifier time: Faster
Proof size: Smaller
BaseFoldFri compared to the non-field-agnostic ZeromorphFri:
Prover time: Similar
Verifier time: Similar
Proof size: Larger
In a 64-bit SNARK:
Both BaseFold and BaseFoldFri, compared to Zeromorph:
Prover time: Similar
Verifier time: Slower with a small number of variables but faster with a large number of variables.
Proof size: Larger
This constant polynomial is identical to the evaluation of the multilinear polynomial at point .
It is well-known that RS (Reed-Solomon) codes are a type of , and the encoding of linear codes can be represented as a matrix-vector multiplication. For example, the encoding of an -RS code, when and , can be represented as follows:
If we divide the matrix on the right into four parts, the red and yellow-colored sections are identical and correspond to the matrix used in RS encoding when and . The green-colored section is equivalent to multiplying the red matrix by a . Similarly, the blue-colored section is equivalent to multiplying the red matrix by another diagonal matrix .
Let , for every . A -foldable linear code is a with a generator matrix and rate with the following properties:
the diagonal matrices satisfies that for every .
the matrix equals (up to row permutation)\
Set , where is a distribution that outputs with 100% probability. Such a is referred to as a -foldable distribution.
Sample and set .
Generate using .
Repeat steps 2 and 3 until a of the desired size is obtained.
This type of code is called a Random Foldable Code (RFC). The paper demonstrates that this code has good relative minimum distance. For those interested, refer to Section 3.1 of the paper. Additionally, it is noted that this is a special case of punctured . For further details, consult Appendix D of the paper.
If , return .
Unpack matrix into a pair of matrix .
Set , , and then pack a pair of matrices to matrix.
If , , which holds by definition.
If , holds because of the recursive construction of .
To use this in IOPP, we need to ensure that is indeed an encoded random linear combination derived from . To demonstrate this, let represent the message at the -th layer and the oracle (or block) at the -th layer. Then, the following holds:
Thus, for , the following conditions are satisfied, where is the length of :
The values and are evaluations of the polynomial at and , respectively. When using the sampled value at each -th layer, can be constructed as follows, ensuring that encodes the message :
Using this property, an IOPP (Interactive Oracle Proof of Proximity) can be designed. Here, refers to the computation of a degree-1 polynomial such that .
Prover witness: the polynomial
For from to :
The verifier samples and sends it to the prover.
For each index , the prover
sets .
sets .
The prover outputs oracle .
The verifier samples an index .
For from to , the verifier
queries oracle entries .
computes .
checks that .
if and , update .
If is a valid codeword w.r.t. generator matrix , output accept, otherwise output reject.
When performing the sumcheck protocol, the problem is reduced to an evaluation claim. Interestingly, the BaseFold IOPP shares a similar structure: given an input oracle that encodes a polynomial , the final oracle sent by the honest prover in the IOPP protocol is precisely an encoding of a random evaluation , where .
Thus, the sumcheck protocol and the IOPP protocol can be executed interleaved, sharing the same random challenge. At the end, the verifier needs to check whether the evaluation claim , obtained through the sumcheck protocol, matches the final prover message from the IOPP protocol. It performs as follows:
Public input: oracle , point , claimed evaluation
Prover witness: the polynomial
For from to :
Verifier samples and sends to the prover.
For each , the prover
sets .
sets .
The prover outputs oracle .
if , the prover sends verifier.
outputs accept.
and for every , .
.
Written by from
This article aims to provide an intuitive explanation of the goals and processes of the Basefold protocol.