- Yu Guo [email protected]
- Jade Xie [email protected]
Below, we present a proof of implementing IOPP using Foldable codes.
Suppose there is an MLE polynomial
Since
We encode the coefficient vector
Similar to the FRI protocol, the Basefold-IOPP protocol is used to prove that a commitment
Proof of Proximity leverages a remarkable property of linear codes: the "Proximity Gap." Specifically, if two vectors
This indicates that the folding process of the codeword does not disrupt the distance between the vector and the legitimate codeword space. By folding the vector sufficiently, the Verifier can use a very short code to verify whether the final folded vector is a legitimate codeword, thereby determining whether the original vector is a legitimate codeword.
📖 Notes on Proximity Gap Proof of Proximity utilizes a remarkable property of linear codes: the "Proximity Gap." Specifically, for two vectors
$\pi, \pi'$ , folding them with a random scalar$\alpha \in \mathbb{F}$ yields a set$A = {\pi+\alpha\cdot \pi': \alpha \in \mathbb{F}}$ . Different$\alpha$ correspond to different elements in set$A$ . The "Proximity Gap" theorem states that the elements in this set are either all close to the legitimate codeword space$C_{i}$ or only a negligible fraction of the elements are close to$C_{i}$ , while the majority are at a distance of$\delta$ from$C_{i}$ . In probabilistic terms:
$$ \Pr_{a \in A}[\Delta(a, C_{i}) \le \delta] = \begin{cases} \epsilon \quad \text{(small enough)}\ 1 \end{cases} $$ Thus, the Verifier can confidently use a random scalar
$\alpha$ for folding, because even if only one of the two vectors$\pi, \pi'$ provided by a cheating Prover is at a distance$\delta$ from$C_i$ , the probability that the folded result is close to$C_i$ is only$\epsilon$ , which is very small. In other words, a cheating Prover would need to be as lucky as winning the lottery to evade detection by the Verifier's scrutiny. Therefore, if the Prover initially selects a$\pi_d$ that is far from the legitimate codeword space, the Verifier selects a series of random scalars to iteratively fold it until obtaining$\pi_0$ . During this process, there is a high probability that$\pi_0$ does not become close to the legitimate codeword space, allowing the Verifier to detect cheating.
The "Proximity Gap" theorem provides a significant advantage to the Verifier: instead of verifying all elements in the set
$A = {\pi+\alpha\cdot \pi': \alpha \in \mathbb{F}}$ to check their proximity to the legitimate codeword space, the Verifier only needs to randomly select one point for verification. This greatly reduces the Verifier's computational load.
The Proof of Proximity protocol consists of two phases: the Commit-phase and the Query-phase. The former involves the subprotocol that performs multiple folding processes of the codeword and generates commitments (or oracles) for each folded codeword. The latter, the Query-phase, involves the Verifier performing random sampling to verify the legitimacy of each folding step.
First, we explain the Commit-phase. The Prover performs multiple foldings of the encoded
Remember that this is an interactive protocol with a total of
Next, we analyze the technical details of a single folding
We split this vector into two parts and stack them:
At this point, the Verifier needs to provide a random scalar
$$ \pi_{i-1} = \big(\mathsf{fold}{\alpha_i}(c_0, c{n_{i-1}}), \mathsf{fold}{\alpha_i}(c_1, c{n_{i-1}+1}), \ldots, \mathsf{fold}{\alpha_i}(c{n_{i-1}}, c_{n_{i}-1})\big) $$
The above is the folded vector
$$ \mathsf{fold}{\alpha}(c_j, c{n_{i-1}+j}) = \frac{t_j\cdot c_{n_{i-1}+j} - t'j\cdot c{j} }{t_j + t'j} + \alpha\cdot \frac{(c{j} - c_{n_{i-1}+j})}{t_j - t'_j} $$
How should we understand the $\mathsf{fold}{\alpha}(\cdot, \cdot)$ function? It is essentially a polynomial interpolation process. We treat the two rows to be folded as sets of points on two separate domains, specifically the $\mathsf{diag}(T_i)=(t_0, t_1, \ldots, t{n_{i-1}-1})$ and $\mathsf{diag}(T'_i)=(t'0, t'1, \ldots, t'{n{i-1}-1})$ used in the recursive encoding process:
$$ \left( \begin{array}{cccc} (t_0, c_0), & (t_1, c_1), & \ldots, & (t_{i-1}, c_{n_{i-1}-1}) \ (t'0, c{n_{i-1}}), & (t'1, c{n_{i-1}+1}), & \ldots, & (t'{i-1}, c{n_{i}-1}) \ \end{array} \right) $$
We then interpolate each column of the above matrix over the domain $(t_j, t'j)$ to produce a set of $n{i-1}={n_i}/{2}$ polynomials, denoted as $p^{(i-1)}j(X)$, where $0\leq j < n{i-1}$. The Prover then evaluates each $p^{(i-1)}j(X)$ at $X = \alpha{i}$, resulting in
The definition of the folding function aligns with the linear polynomial interpolation process. We can manually derive the origin of the folding function definition. Since we are performing a half-folding of
Substituting $x_0=t_j, x_1=t'j$, and $X=\alpha$ yields the definition of the folding function $\mathsf{fold}\alpha(y_0, y_1)$ as above.
If
Since we have defined the folded codeword
$$ \begin{split} \pi_{i} &= \mathbf{m} G_i \ & = (\mathbf{m}l \parallel \mathbf{m}r)\begin{bmatrix} G{i-1} & G{i-1} \ G_{i-1}\cdot T_{i-1} & G_{i-1}\cdot T'{i-1} \end{bmatrix}\[4ex] &=\Big(\mathbf{m}l G{i-1} + \mathbf{m}r G{i-1}\circ \mathbf{diag}(T{i-1})\Big) \parallel \Big(\mathbf{m}l G{i-1} + \mathbf{m}r G{i-1}\circ \mathbf{diag}(T'_{i-1})\Big)\ \end{split} $$
The Prover folds it in half to obtain the new codeword:
$$ \begin{split} \mathsf{fold}\alpha(\pi{i}) &= \Big(\mathsf{fold}\alpha(\pi{i}[0], \pi_{i}[n_{i-1}]), \mathsf{fold}\alpha(\pi{i}[1], \pi_{i}[n_{i-1}+1]), \ldots, \mathsf{fold}\alpha(\pi{i}[n_{i-1}-1], \pi_{i}[n_{i}-1])\Big) \ \end{split} $$
We now verify that each $\mathsf{fold}\alpha(\pi{i}[j], \pi_{i}[n_{i-1}+j])$ is a linear combination of $\mathbf{m}lG{i-1}[j]$ and $\mathbf{m}rG{i-1}[j]$ with respect to
$$ \begin{split} \mathsf{fold}\alpha(\pi{i}[j], \pi_{i}[n_{i-1}+j]) & = \frac{1}{t_j - t'_j}\cdot\Big( t_j\cdot (\mathbf{m}l G{i-1}[j] + t'_j\cdot \mathbf{m}r G{i-1}[j]) - t'_j\cdot(\mathbf{m}l G{i-1}[j] + t_j\cdot \mathbf{m}r G{i-1}[j]) \Big)\ & + \frac{\alpha}{t_j - t'_j}\cdot \Big(\mathbf{m}l G{i-1}[j] + t_j\cdot \mathbf{m}r G{i-1}[j] - \mathbf{m}l G{i-1}[j] - t'_j\cdot \mathbf{m}r G{i-1}[j] \Big) \ & = \mathbf{m}l G{i-1}[j] + \alpha\cdot \mathbf{m}r G{i-1}[j] \end{split} $$
Thus, the entire folding of
$$ \mathsf{fold}\alpha(\pi{i}) = \mathbf{m}l G{i-1} + \alpha\cdot \mathbf{m}r G{i-1} = (\mathbf{m}_l + \alpha\cdot \mathbf{m}r)G{i-1} $$
The folded codeword is exactly the half-folded version of
Below, we walk through a simple example to illustrate how the Commit-phase of the Basefold-IOPP protocol operates.
Public Input
- The codeword of the MLE polynomial
$\tilde{f}$ ,$\pi_3=\mathsf{Enc}_3(\mathbf{f})=\mathbf{f}G_3$
Witness
- The coefficient vector of the MLE polynomial
$\tilde{f}$ ,$\mathbf{f} = (f_0, f_1, f_2, f_3, f_4, f_5, f_6, f_7)$
First Round: Verifier sends a random scalar
Second Round: Prover computes
The process of computing
The computed
Third Round: Verifier sends a random scalar
Fourth Round: Prover computes
The process of computing
The computed
Fifth Round: Verifier sends a random scalar
Sixth Round: Prover computes
The process of computing
Similarly,
At this point, the Commit-phase ends, and the Prover has sent
Similar to the FRI protocol, in the Query-phase, the Verifier conducts multiple rounds of random sampling on the
The Verifier will randomly select a position
Upon receiving these, the Verifier first verifies that these three points correspond correctly to the codewords
$$ \pi_{d-1}[\mu] \overset{?}{=} \mathsf{fold}{\alpha{d-1}}(\pi_{d}[\mu], \pi_{d}[\mu+n_{d-1}]) $$
Merely verifying the folding relationship from
In this way, by providing a single random scalar
To elevate reliability to a sufficient level, the Verifier must perform multiple rounds to ensure that the Prover has no room to cheat. The Query-phase leverages the Proximity Gap property. A cheating Prover who alters the codeword is likely to be far from the legitimate encoding space, enabling the Verifier to detect cheating with only a small number of sampling attempts.
This article described the framework of the Commit-phase and Query-phase of the Basefold-IOPP protocol. This framework generalizes and extends the FRI protocol, expanding from RS-Codes to any Foldable Linear Codes. However, it is important to note that Basefold does not support codeword folding of degree greater than 2. This is because the Basefold-IOPP protocol must not only perform Proximity Testing but also provide an operational result of an MLE polynomial. This will be the topic of the next article in this series.
- [ZCF23] Zeilberger, H., Chen, B., Fisch, B. (2024). BaseFold: Efficient Field-Agnostic Polynomial Commitment Schemes from Foldable Codes. In: Reyzin, L., Stebila, D. (eds) Advances in Cryptology – CRYPTO 2024. CRYPTO 2024. Lecture Notes in Computer Science, vol 14929. Springer, Cham.
- [BCIKS20] Eli Ben-Sasson, Dan Carmon, Yuval Ishai, Swastik Kopparty, and Shubhangi Saraf. Proximity Gaps for Reed–Solomon Codes. In Proceedings of the 61st Annual IEEE Symposium on Foundations of Computer Science, pages 900–909, 2020.