1. Introduction
SNARKs [
1,
2,
3,
4], which stands for succinct non-interactive arguments of knowledge, is a cryptographic protocol that enables the verification of the correctness of computations. SNARKs are particularly useful in scenarios where privacy and efficiency are paramount, such as blockchain and decentralized applications. The main goal of SNARKs is to provide a succinct and efficient way to prove the validity of computations or statements, also known as proofs, while minimizing the computational and communication overhead. In a SNARK protocol, a prover generates a proof attesting to the correctness of a computation, and a verifier efficiently verifies the proof’s validity.
In order to construct a SNARK for a particular computation, it is necessary to represent the computation using a specific form. One commonly used computational model for this purpose is the arithmetic circuit. Given an arithmetic circuit with an input and output , the prover aims to convince the verifier that . To achieve this, we can define a transcript w, which represents the values of every wire in the circuit except for the input/output wires. In addition to w, we can define a vector that includes the values of every wire in the circuit, including the input/output wires. The prover executes the arithmetic circuit correctly if and only if the vector z satisfies certain constraints imposed by the circuit. For example, let us consider a multiplicative gate in the arithmetic circuit where and are the inputs to the gate, and is the output of this gate. In this case, the constraint imposed by the gate is that the output must equal the product of the inputs and , i.e., .
The Rank-1 Constraint System (R1CS) is the most commonly used constraint system for representing arithmetic circuit constraints. For a sufficiently large finite field
, an R1CS instance includes three matrices,
with dimension
and a vector
with length
, where
. The matrices
A,
B, and
C are a representation of an arithmetic circuit, and the vector
x is the public input/output of the circuit. If the prover executes the circuit correctly, then he will obtain a vector
, which represents the values of every wire in the circuit except for the input/output wires. The constraint for correctness is given by the equation
, where
is the combined vector of the input/output and inner wire values, and ∘ denotes the pair-wise product. For example, consider the arithmetic circuit in
Figure 1; the prover wants to convince the verifier that
. After executing the circuit, the prover will obtain the values of the intermediate wires, i.e.,
in
Figure 1. To convince the verifier of the correctness of the computation, the prover must prove that
satisfies the following constraints for the two multiplicative gates (we compress the constraint for an additive gate to a multiplicative gate):
Consider the matrices
A,
B, and
C, defined as follows:
Let
, where
represents the input/output variables and
represents the intermediate wire values. It can be observed that the constraints in Equation (
1) are satisfiable if and only if the R1CS relation
is satisfied. By evaluating the expressions on both sides of the equation, we have the following:
If the R1CS relation is satisfiable, the prover can provide evidence to convince the verifier of the correctness of the computation. In an instance of R1CS, each matrix is sparse, meaning that the number of non-zero elements in each matrix is . The transformation from an arithmetic circuit to an R1CS instance demonstrates that R1CS is -Complete.
Modern SNARKs are typically constructed using two main components: an information-theoretic probabilistic proof system called polynomial Interactive Oracle Proofs (IOPs) [
5] and a cryptographic tool called a polynomial commitment [
6]. Finally, we can achieve non-interactivity via a standard Fiat–Shamir transformation [
7] if the polynomial IOP and polynomial commitments are public coin.
Polynomial IOP. IOP [
5] combines the definition of Interactive Proofs (IPs) [
8,
9] and Probabilistic Checkable Proofs (PCPs) [
10,
11]. In each round, the prover will send some proofs to the verifier, and the verifier can access these proofs at any location. After the interaction, the verifier either accepts or rejects them. Polynomial IOP [
12,
13] is a special kind of IOP. In the polynomial IOP, all proofs sent by the prover are polynomial oracles, and the verifier can query these polynomial oracles at any location to obtain the corresponding evaluations of these polynomials.
Polynomial commitment. Polynomial commitment [
6] is a cryptographic tool that enables the prover to commit to a polynomial
f and later provide a short proof
to the verifier, demonstrating that
for a specific query
x made by the verifier. The commitment scheme ensures that the prover cannot change the polynomial after the commitment is made, and the proof
convinces the verifier of the correctness of the evaluated value
y without revealing the polynomial’s details.
Many papers [
12,
13,
14] have already provided numerous methods on how to combine polynomial IOPs with polynomial commitment to construct SNARK. In our work, we primarily focus on constructing a polynomial IOP for R1CS to achieve a linear-time prover and a logarithmic-time verifier. However, it is important to note that achieving sublinear verification is not possible for arbitrary R1CS instances. This is because the verifier needs to access and process the entire instance, which includes reading all the matrices involved in the R1CS representation. Therefore, the verifier’s time complexity is inherently bound by the size of the instance being proven. To achieve a logarithmic-time verifier, we allow a one-time public offline preprocessing phase for arbitrary R1CS instances. In this phase, an entity called the indexer receives the three matrices
A,
B, and
C as input and generates some polynomial oracles corresponding to these matrices. The verifier then can access these oracles at any location without reading the full description of these three matrices. Importantly, the offline phase of generating the polynomial oracles only relies on the circuit description provided by the matrices
A,
B, and
C. It does not depend on the specific input
x to the circuit. Therefore, the offline phase needs to be executed only once for a given R1CS instance, regardless of the different inputs that may be provided.
Proof systems that incorporate an offline preprocessing phase are commonly referred to as
holographic proofs [
15], a term that carries historical significance but may not accurately convey the nature of such systems. A polynomial IOP with an offline preprocessing phase is commonly referred to as a polynomial holographic IOP [
13,
16]. We recall the definition of polynomial holographic IOPs in
Section 2.4. Furthermore, our definition of the polynomial oracles supports different query forms, which will be discussed in
Section 2.4.1.
1.1. Related Works
Constructing SNARKs for
-Complete problems (such as R1CS) is currently a prominent research topic in the fields of cryptography and computational complexity. The initial construction of SNARKs originated from the well-known PCP theorem [
10,
11]. The PCP theorem establishes that any
statement can be verified by a constant number of queries to the proof. By combining the Merkle tree scheme [
17] with the Fiat–Shamir transformation [
7], we can obtain a SNARK based on the PCP theorem.
However, constructing SNARKs directly from the PCP theorem is known to be impractical due to the high complexity and overhead involved. The PCP theorem provides theoretical guarantees but does not offer efficient constructions in practice. The first practical SNARK, called Pinocchio [
18], was constructed using linear PCP [
19], which is a variant of the PCP model where the proof sent by the prover is a linear function. Pinocchio specifically aimed to construct a SNARK for Quadratic Arithmetic Programs (QAPs) [
20], which is an
-Complete problem that can be efficiently transformed from R1CS. Building upon Pinocchio, Groth16 [
21] further optimized the construction, achieving a proof size consisting of only three group elements, which is currently the smallest known proof size for SNARKs. Furthermore, they proved the impossibility of achieving a proof size of 1. However, all of these works rely on a trusted setup process to generate a common reference string (CRS). The CRS contains certain cryptographic parameters and keys that are used during the SNARK construction. It is crucial to keep the CRS secret and securely generated by a trusted third party. Otherwise, if the CRS is compromised or manipulated, the prover could potentially deceive the verifier by producing fraudulent proofs.
While it is true that constructing SNARKs directly from the PCP theorem is known to be inefficient, one advantage of such constructions is their transparency (no need for a trusted third party) and security assumptions. Unlike the linear PCP model, PCP-based SNARKs only rely on the random oracle model for their security. In recent years, there has been renewed interest in PCP-based constructions. Eli Ben-Sasson, Alessandro Chiesa, and Nicholas Spooner introduced a new probabilistic proof model called IOP [
5]. It can be viewed as an interactive version of the PCP model. Benedikt Bünz, Ben Fisch, and Alan Szepieniec introduced a restriction to the IOP model and proposed the concept of polynomial IOP [
12]. In this model, the prover’s proof is represented as a polynomial oracle. Starting from their work, the construction of modern SNARKs can be viewed as a combination of two main components: polynomial IOP and polynomial commitment. The polynomial IOP provides information-theoretic security, meaning that its security is based on mathematical properties rather than any specific cryptographic assumptions. On the other hand, the polynomial commitment scheme relies on cryptographic assumptions. For example, In PCP-based constructions, the polynomial commitment scheme is formed by combining the low-degree testing scheme [
22] and the Merkle tree scheme [
17]. The security of this polynomial commitment scheme relies on the assumption that we view the hash function used in the Merkle tree scheme as a random oracle, and no trusted setup is required for such a scheme.
Some polynomial commitment schemes, like the KZG (Kate–Zaverucha–Goldberg) scheme [
6], require a trusted setup process. However, they offer advantages such as small proof sizes and efficient verification. In SNARKs based on these schemes, along with suitable polynomial IOPs, a trusted third party is still needed to generate the common reference string (CRS). However, the key difference from earlier SNARKs based on linear PCP is that a single trusted setup can now support multiple circuits. This advancement allows for the construction of universal SNARKs [
13,
14,
23,
24], where a single trusted setup suffices for many circuits. Furthermore, in these schemes, the CRS is updatable, which means that the CRS can be updated by several parties, and the security of the system is guaranteed as long as at least one of the parties involved in the update process is honest.
Several transparent polynomial commitment schemes do not require a trusted setup. Examples of such schemes include the Fast Reed–Solomon Interactive Oracle Proof of proximity (FRI) protocol [
25], which is a low-degree testing based scheme derived from the PCP literature, and Bulletproofs [
26], which is an inner product-based scheme. SNARKs constructed from these polynomial commitment schemes are also transparent, meaning they do not rely on trusted setups [
12,
27,
28,
29,
30,
31]. However, it is important to note that transparent SNARKs generally have larger proof sizes and longer verification times compared to universal SNARKs.
The SNARKs mentioned before all have a prover with quasilinear time complexity, which means that the prover’s runtime is
with the circuit size
N. One of the primary reasons for the quasilinear prover time in the mentioned SNARKs is the execution of the Fast Fourier Transform (FFT) algorithm for polynomial operations. Ongoing research and development efforts are focused on further reducing the cost for the prover. Bootle et al. [
32] made significant contributions in this area by introducing the first SNARK that achieves a linear-time
prover and a proof size of
. Their construction relies on the utilization of a linear-time encodable error-correcting code. Building upon their initial work, Bootle et al. [
33] continued to optimize the proof size in their subsequent construction. They achieved a proof size of
for any constant
by leveraging the concept of tensor IOP and tensor codes. Furthermore, Bootle et al. [
34] made additional advancements by employing a proof composition technique, which enabled them to achieve a proof size of
. This breakthrough not only significantly reduces the proof size but also maintains a linear-time prover.
Golovnev et al. [
35] made an intriguing observation regarding the transformation from tensor IOP to standard IOP, as described by Bootle et al. They recognized that this transformation can be interpreted as a form of polynomial commitment. Building upon this insight, Golovnev et al. derived a polynomial commitment scheme from the work of Bootle et al. [
33] This newly devised polynomial commitment scheme exhibited desirable properties, including a linear-time prover and a proof size of
. Capitalizing on these advancements, Golovnev et al., in conjunction with the polynomial IOP for R1CS known as Spartan [
36], developed a novel SNARK for R1CS called Brakedown [
35]. Brakedown achieved a linear-time prover and sublinear verification. Similar to the PCP-based SNARKs, Brakedown is transparent and post-quantum. The security guarantees of Brakedown rely on the random oracle model.
IOP, as a variant of PCP, has also received significant attention from the theoretical computer science research community. Many works are dedicated to studying the lower bounds of IOPs [
37,
38,
39], aiming to understand their inherent computational limitations and capabilities. In the field of PCP, there is an important conjecture called the sliding-scale conjecture [
40]. Arnon et al. [
39] proved that constructing an IOP protocol satisfying certain properties implies the truth of this conjecture. Recent work by Arnon et al. [
41] has made important progress in this direction by constructing an IOP that comes very close to satisfying the desired properties. In theoretical computer science, another important application of PCP is in the study of hardness of approximation [
11]. Recent research [
42] has explored the use of IOP to prove the hardness of approximation results.
The lookup protocol, which is a key tool for achieving holography in our work, was initially proposed by Bootle et al [
43]. Its purpose is to enable the prover to convince the verifier that all elements in a vector are contained in another vector. Building upon Bootle et al.’s work, Gabizon and Williamsom simplified the protocol and introduced a novel version called plookup [
44]. However, the prover time of their construction is
. Bootle et al. [
33] previously presented a linear-time lookup protocol in the tensor IOP model. In our work, we follow their approach and present a linear-time lookup protocol in the polynomial IOP model. This allows us to achieve efficient holography while maintaining linear-time complexity.
1.2. Motivation, Results, and Discussion
1.2.1. Motivation
Achieving succinctness is the most critical and challenging goal in the construction of SNARKs. Succinctness requires both a short proof size and fast verification time; verification time should be sublinear in the size of the circuit being proven. Several prior works have made significant progress toward this goal, but each has certain limitations that motivate our approach.
Spartan [
36] was the first protocol for R1CS that achieved logarithmic verification time. They introduced the concept of computation commitments to preprocess the circuit and employed the GKR protocol for proof generation. However, Spartan lacked a rigorous formal proof of security, leaving room for improvement in both soundness and practicality.
Marlin [
13], another protocol for R1CS, not only achieved logarithmic verification time but also introduced the influential concept of “holography”, where the verifier benefits from preprocessing. However, Marlin’s prover complexity is
.
BCG20 [
33] constructed a protocol for R1CS with linear-time proving. However, their protocol had two key drawbacks: (1) the verifier’s complexity was
for some small constant
, rather than logarithmic, and (2) they employed a tensor IOP model instead of polynomial IOP. This tensor-based approach hindered compatibility with modern polynomial commitment schemes, limiting its practicality for real-world deployment.
Our work builds upon the core ideas of BCG20 [
33], including the use of the SumCheck and lookup protocols. However, we overcome their limitations by achieving logarithmic verification time while maintaining linear-time proving. Crucially, our protocol is constructed under the polynomial IOP model, allowing for combination with any polynomial commitment scheme. This advancement enables us to construct a highly efficient, transparent SNARK for R1CS with better performance across proof size, verification time, and prover complexity.
1.2.2. Our Results
In our work, we propose a novel polynomial holographic IOP for R1CS. For an R1CS instance
defined over a finite field
, where
and
denotes the size of the public input/output, we achieve a linear-time prover and polylogarithmic-time verifier. Specifically, our offline phase runs in
time, while the online phase requires
time for the prover and
time for the verifier. By combining our polynomial IOP with a linear-time polynomial commitment scheme, such as the state-of-the-art Orion [
45], we can construct a SNARK with a prover time complexity of
, a verifier time complexity of
, and a proof size complexity of
. Our contributions include:
A definition of polynomial holographic IOP with different query forms. The polynomial oracles in our definition of the polynomial holographic IOP support different query forms. Specifically, our polynomial oracle is specified by a vector
with length
. The verifier can query this oracle in one form with an element
, and the oracle returns a value
, which is equal to
The verifier can also query this oracle in another form with a vector
, and the oracle returns a value
, which is equal to
This returned value comes from the multilinear extension of
a, which is explained in more detail in
Section 2.2. We provide the definition of a polynomial holographic IOP with different query forms in
Section 2.4. We believe that incorporating different query forms into polynomial oracles makes it more flexible and convenient to construct polynomial IOPs. However, combining this type of polynomial IOP with polynomial commitment to construct a SNARK is more challenging because not all polynomial commitment schemes support this query mode.
A linear-time polynomial IOP for R1CS. We construct a new polynomial IOP for R1CS with a linear-time prover and polylogarithmic-time verifier. The core technique in our construction is the classical SumCheck protocol [
46], which has been used to prove many celebrated results in complexity theory such as
[
47]. Suppose
is the witness of an R1CS instance
; let
and
,
,
. Our construction consists of three parts:
- −
RowCheck. A polynomial IOP (
Section 3.1) check that
, where ∘ denotes the pair-wise product.
- −
LinCheck. A polynomial IOP (
Section 3.2) check that for all
,
.
- −
ConsistencyCheck. A polynomial IOP (
Section 3.3) check that the first
elements of
z are exactly
x.
We present the non-holographic part of our protocol in
Section 3 and show how to achieve holography in
Section 4.
A linear-time polynomial IOP for lookup relation. The lookup protocol, which allows us to verify whether all elements in one vector are contained in another vector, is highly beneficial in our pursuit of holography, as described in [
33]. We present a novel linear-time polynomial IOP for the lookup condition, inspired by the work of Bootle et al. [
33]. Their research introduced a linear-time lookup protocol in the tensor IOP model. Our construction consists of two parts:
- −
CSLCheck. A polynomial IOP (
Section 4.3.1) check of whether one vector is a cyclic left shift of another vector.
- −
ProductCheck. A polynomial IOP (
Section 4.3.2) check of whether the product of all elements in a vector is equal to a specific value.
In
Section 4.2, we will demonstrate the utilization of the lookup protocol to achieve holography, while in
Section 4.3.3, we will provide a comprehensive description of the lookup protocol.
Based on the protocols mentioned above, we construct the polynomial IOP for R1CS. The properties of each protocol are summarized in
Table 1, where PIOP for R1CS refers to the non-holographic protocol, PHIOP refers to the holographic protocol,
N denotes the number of rows and columns in the R1CS matrices, and
M denotes the number of non-zero entries in the matrices.
1.2.3. Discussion
Our polynomial IOP for R1CS achieves a query complexity of
, where the query complexity refers to the number of queries made by the verifier to the polynomial oracles. When combining our polynomial IOP with the polynomial commitment Orion [
45], we obtain an efficient SNARK of invoking Orion only a constant number of times. Since the polynomial commitment Orion has
prover time,
verifier time, and
proof size, our final SNARK has
prover time,
verifier time, and
proof size. We provide an overview of some classical and recent works about SNARKs for R1CS in
Table 2.
While our proposed protocol achieves good prover efficiency, verifier complexity, and proof size, it does have an important limitation: the requirement for a sufficiently large finite field. To ensure the soundness of the protocol, the size of the field must be at least as large as the size of the circuit being proven (). The complexity analysis of our protocol assumes that a single field operation (addition, subtraction, and multiplication) is treated as an atomic operation. However, as the field size increases, the time required for each atomic operation also increases. This dependency on large fields can lead to efficiency overhead.
2. Preliminaries
2.1. Indexed Relation
Recall that a relation is a set of tuples where is the instance and is the witness. If is an relation, then can be decided in polynomial time. Let be the corresponding language, i.e., . If is an language, then there exists a polynomial time decider D; if the instance , then there exists a witness with polynomial size such that . An proof system for an language is a protocol between an unlimited prover and a polynomial time verifier. For a public input , the prover wants to convince the verifier that . The prover can send the witness to the verifier, and the verifier can decide whether in polynomial time.
In order to achieve holographic proof, we consider the indexed relation. An indexed relation is a set of triples where is the index, is the instance, and is the witness. If is an indexed relation, then can be decided in polynomial time. The corresponding language consists of pairs . If is an indexed language, then there exists a polynomial time decider D; if the instance , then there exists a witness with polynomial size such that . A holographic proof system for an indexed language consists of two phases: an offline phase executed by the indexer, where the indexer takes the index as the input and outputs the encoding (polynomial oracle in our work) of , and an online phase executed by the prover and verifier, where the prover can send the witness to the verifier, and the verifier can decide whether by querying the encoding of produced by the indexer. This enables the verifier to avoid reading the entire description of , reducing the runtime of the verifier to sublinear in .
For example, the indexed Boolean circuit satisfiability relation consists of triples , where is the description of a Boolean circuit, is the partial assignment of the input, and is the remaining assignment such that the output of the circuit is 1. In the traditional proof system, the verifier must read the entire description of the circuit , so the verifier’s cost is at least in such a case. In the holographic proof system, the verifier can query the encoding of the circuit , which is produced by the indexer in the offline phase, so we can achieve the verifier’s cost to sublinear in the circuit size .
In this paper, we will focus on the indexed R1CS relation, which serves as a representation of the arithmetic circuit computation. The formal definition of the indexed R1CS relation, denoted as , is as follows:
Definition 1. Let be a finite field and A, B, C be three sparse matrices over with dimensions . Each matrix has at most non-zero entries. Suppose ; let and be two vectors. Then, the indexed R1CS relation is the set of all triplessuch that , where , and ∘ denotes the pair-wise product. Without loss of generality, we assume that N, M and are powers of 2, i.e., , , and . Let be the corresponding language. It is easy to see that is an language since we can verify the equation in polynomial time. Additionally, any instance of arithmetic circuit satisfiability can be efficiently reduced to an instance of R1CS. This reduction demonstrates that the language is -Complete.
In the industry, R1CS has also gained significant attention. Through certain compilers [
49,
50,
51], a program or code snippet can be transformed into an instance of R1CS. If the prover accurately executes the program, the prover can obtain a witness regarding the R1CS instance, which allows the R1CS relation to be satisfied. This enables a mechanism where the execution of a program can be verified using the R1CS relation, ensuring the integrity and correctness of the program’s execution.
2.2. Multilinear Extension
We define a
-variate polynomial
such that
where
. Note that for all
, this polynomial has the following properties:
Suppose
is a function defined on the Boolean hypercube; the multilinear extension of
f is the multivariate polynomial
such that
for all
. Formally,
The polynomial family is also known as the Lagrange bases. If we view the function f as a vector of length , then the multilinear extension of f is an inner product of f and the Lagrange bases.
Given any vector
, and assuming that all values of
f on the Boolean hypercube are known,
can be computed in
time using Equation (
4). Using dynamic programming, we can reduce the time complexity to
, but this comes with an additional space overhead.
Theorem 1 ([
52]).
For any positive integer n, suppose is a function defined on the Boolean hypercube, is the multilinear extension of f; given for all and an arbitrary vector as input, we can compute in time and space . 2.3. Schwartz–Zippel Lemma
The soundness analysis of our construction is heavily based on the Schwartz–Zipple Lemma, which we state below:
Lemma 1 (Schwartz–Zippel Lemma [
53]).
Let be a field, and is a non-zero n-variate polynomial with total degree of at most d. Then, for any finite set , 2.4. Polynomial Holographic IOP
IOP [
5] is a proof system that combines the features of PCP [
10,
11] and IP [
8,
9]. In the PCP model, the prover convinces the verifier of the truth of a statement by providing a proof that can be efficiently verified by making a small number of queries to the proof via oracle access. In the IOP model, similar to the IP model, the prover and verifier engage in an interactive protocol where the prover provides proofs in multiple rounds of interaction. This allows for more flexibility between the prover and verifier.
A holographic IOP refers to a proof system that consists of two distinct phases: an offline phase and an online phase. During the offline phase, the indexer takes the index as input and generates a set of precomputed proofs. During the online phase, the prover and verifier engage in a traditional IOP. The verifier can also query the precomputed proofs generated in the offline phase via oracle access. This prevents the verifier from reading the full description of the index, and the verifier can be implemented with sublinear time complexity relative to the size of the index.
In a polynomial holographic IOP [
12,
13,
16], each proof generated by the indexer or prover is a polynomial oracle. The verifier is empowered to make queries to these oracles at any location. Moreover, in
Section 2.4.1, we will elaborate on the various query forms available to the verifier when querying the polynomial oracles. The introduction of a polynomial oracle that supports different query forms enables the design of polynomial holographic IOP to be more flexible and convenient.
2.4.1. Polynomial Oracles with Different Query Forms
A polynomial oracle can be specified by a vector ; we assume that the length of the vector is a power of two, i.e., . We denote the polynomial oracle specified by vector a as . The verifier has the flexibility to query the polynomial oracle using different query forms, which are as follows:
Univariate canonical form: In this form, when the verifier queries the polynomial oracle with an element , the oracle returns the value . To represent this returned value, we use the notation , which denotes the polynomial .
Multilinear Lagrange form: In this form, when the verifier queries the polynomial oracle
with a vector
(
), the oracle returns the value
we can view every element of
as a binary string with length
. Note that
is the multilinear extension of
a.
These two query modes are sufficient to construct the polynomial IOP in this paper. It is possible to define additional query modes to further enhance the flexibility of the polynomial oracle.
2.4.2. Polynomial Holographic IOP with Different Query Forms
A polynomial holographic IOP with different query forms for an indexed relation is a protocol among three parties: an indexer, a prover, and a verifier. The protocol executes in two distinct stages: an offline preprocessing phase and an online verification phase.
In the offline phase, the indexer outputs some polynomial oracles from the index . This preprocessing stage is deterministic and instance-agnostic.
In the online phase, the prover seeks to establish the membership claim , where the prover’s input is and the verifier’s input is with some indexer’s precomputed polynomial oracles. The interaction proceeds through multiple rounds, where:
Let induced by , the protocol satisfies:
Perfect Completeness. Any ensures the verifier’s certainty of acceptance.
Soundness bound . For any , for any prover’s strategy, no adversarial prover strategy can induce acceptance with probability exceeding .
Protocol performance is quantified through:
Rounds. Count of interactive rounds.
Communication complexity. Total size of non-oracle messages.
Query complexity. Number of oracle queries made by the verifier.
Prover’s time. The prover’s execution time.
Verifier’s time. The verifier’s execution time.
A polynomial holographic IOP is public-coin if all verifier-generated randomness is transparently disclosed. This characteristic enables conversion to non-interactive protocols via the Fiat–Shamir heuristic [
7] under the random oracle model. All constructions presented in this work adopt this public-coin framework.
2.5. SumCheck Protocol
The SumCheck protocol [
46] is a fundamental component for probabilistic proofs. Many celebrated results in complexity theory such as
[
47] and
[
54] have been obtained using this technique. Given a finite field
, suppose
is an
n-variate polynomial and
; the purpose of the protocol is for the prover to convince the verifier that
Obviously, the verifier can compute
from Equation (
5) by evaluating
f at all points in
. This takes time
, where
T is the cost to compute
f at a single point in
. Using the SumCheck protocol, with the help of a prover, we can reduce the verifier’s time complexity to
, where
d is the maximal individual degree of
f. This is an exponential improvement in efficiency. The SumCheck protocol works as follows:
Protocol 1. SumCheck protocol:
Inputs.
Prover’s input:
- −
An n-variate polynomial f with maximal individual degree d.
Verifier’s input:
- −
An n-variate polynomial f with maximal individual degree d.
- −
An element provided by the prover.
Goal.
The protocol:
- 1.
In the first round, the prover sends a univariate polynomial the verifier checks that and rejects it if this equation does not hold. The verifier samples a random element from and sends to the prover.
- 2.
In the i-th round, where , the prover sends a univariate polynomial the verifier checks that and rejects it if this equation does not hold. The verifier samples a random element from and sends to the prover.
- 3.
In the n-th (final) round, the prover sends a univariate polynomial The verifier checks that and rejects it if this equation does not hold. The verifier samples a random element from and computes , and it accepts it if and only if .
The completeness of the SumCheck protocol is straightforward. For the soundness, it can be shown by induction on
n that if
does not equal the value
in Equation (
5), then
is accepted with a probability of at most
. Recall that
d is the maximal individual degree of
f. The efficiency of this protocol is shown in
Table 3.
In our work, when the SumCheck protocol is applied, the verifier does not receive the polynomial f explicitly as input. Instead, the verifier has access to the polynomial oracle . Specifically, f in our case is always a composition of multilinear polynomials. As a result, the polynomial oracle can be specified by some vectors which correspond to the evaluations of the multilinear polynomials on the Boolean hypercube. The verifier can query this oracle using the multilinear Lagrange form.
3. Linear Time Polynomial IOP for R1CS
We construct a polynomial IOP for R1CS with a linear time prover. In the R1CS relation, the prover wants to convince the verifier that the equation holds (∘ is the pairwise product), where , , , and is the witness of the relation. The prover computes and sends the polynomial oracles to the verifier. Without loss of generality, we assume N is the power of 2. Let . In order to verify whether the R1CS relation holds, the verifier need to perform the following check:
RowCheck: check that , namely, for all , (the index starts from 0).
LinCheck: check that . Intuitively, since for all , , the SumCheck protocol is naturally suitable for this task.
ConsistencyCheck: check that the first elements of z are exactly x.
In this section, we assume the indexer has sent the polynomial oracles
,
,
to the verifier in the offline phase. The verifier can query
(
,
) at any point
to obtain
(
,
). We will show how to achieve holography setting in
Section 4.
3.1. RowCheck
In this section, we give the RowCheck protocol. Suppose are three vectors. Given three polynomial oracles , , and , the purpose of RowCheck is for the prover to convince the verifier that , where ∘ denotes the pairwise product for two vectors. Let . We can view the vectors as three functions on the Boolean hypercube, namely . Let be the multilinear extension of . If the vector relation holds, then for all .
Let
. We want to check that
vanishes on the Boolean hypercube (
for all
). This task is often referred to as ZeroTest. In the worst case, the verifier should query all
points from polynomial oracles
to obtain
for all
, since the polynomial
may be zero everywhere except for one point on the Boolean hypercube. We can construct an efficient protocol for ZeroTest by reducing this task to SumCheck. We define a new polynomial
,
We have the following lemma:
Lemma 2. If for all , then . If there exists such that , then .
Proof. If for all , then H is a zero polynomial; namely, for all , . If there exists such that , then based on the Schwartz–Zippel Lemma (Lemma 1), since the degree of each variable in H is at most one. □
The random vector is chosen and sent by the verifier. After receiving the random vector, the prover and verifier run the SumCheck protocol on the statement “”, where . We describe the RowCheck protocol as follows:
Protocol 2. RowCheck Protocol:
Inputs.
Prover’s input:
- −
Three vectors .
Verifier’s input:
- −
Three polynomial oracles , , .
Goal.
The protocol:
- 1.
The verifier samples and sends it to the prover.
- 2.
Let . The prover and verifier run SumCheck protocol for the claim “”.
In the last round of the SumCheck protocol, the verifier should compute
at a random point
, which can be done by querying
at
r and computing
in
time.
The maximal individual degree of h is at most 3. Since has an individual degree of at most 2, this introduces an additional soundness error . Together with Lemma 2, the soundness error of the RowCheck protocol is and is union bound.
We analyze the time complexity of the prover. In the
j-th round of the SumCheck protocol, the prover should send a polynomial
Since
has a degree of at most 3, the prover can specify
by sending
,
,
,
, and the verifier can reconstruct the polynomial using a standard interpolation in constant time. From Theorem 1, the cost of the prover in the
j-th round is
. Overall, the total cost of the prover in the RowCheck protocol is
.
Using a similar idea to the proof of Theorem 1, the prover can be implemented in time
[
55,
56]. For completeness, we will present the details of how to implement the prover in linear time. Note that
are multilinear polynomials. We will show the following lemma:
Lemma 3. Suppose is a multilinear polynomial and we can evaluate at all points in in time . Then, for every , the following quantities can be computed in time :where are random elements in . Proof. We show this fact via induction on
j. Let
and
we wish to compute
for all
and
. Based on the induction hypothesis, assuming that we have computed
for all
and
in time
. Note that
since the polynomial
is multilinear. We can express
via the following:
For
, and for
, we can compute the following:
From the induction hypothesis, the values
and
have already been computed when
. Therefore, we can obtain
for
immediately. For
, note that
since
is multilinear. Hence, we can obtain
for all
,
in time
.
We finish the proof by showing that in the base case, when
, the following quantities can be computed in time
:
For
, we can compute
for all
in
time based on the assumption (we can evaluate
at all points in
in time
). For
, we can also compute
in constant time using the following equation:
In total, we can compute for all and all in time . □
, and satisfy the requirements of Lemma 3 because they are multilinear polynomials. To see why we can evaluate all points in in time , notice that are vectors of length . We can consider them as three arrays of length , so we can access any entry in time . Indeed, we can evaluate , , and at any point in in time and all points in in time . The polynomial is also suitable for Lemma 3 from the following lemma.
Lemma 4. Let and . Then, we can evaluate at all points in in time .
We have demonstrated that
,
,
, and
all satisfy the requirements of Lemma 3. Since
, it follows that we can evaluate
,
,
,
in time
, where
In other words, the cost of the prover in j-th round of the SumCheck is , so the total cost of the prover in the RowCheck is = , which is linear.
We summarize the properties of the RowCheck protocol in
Table 4. The communication complexity represents the number of non-oracle elements sent by the prover, which is
since in every round, the prover just sends 4 elements. The query complexity represents the number of queries made by the verifier to the polynomial oracles, which is 3.
3.2. LinCheck
3.2.1. Single LinCheck
Suppose is a matrix, and are two vectors with length N. Given three polynomial oracles , , , the purpose of LinCheck is for the prover to convince the verifier that . , are polynomial oracles sent by the prover, and is a polynomial oracle provided by the indexer, which we will implement in the next section. Let . We can view as three functions on the Boolean hypercube, namely and (or ). Let be low-degree extensions of . If the relation holds, then for all , . In other words, the polynomial vanishes on the Boolean hypercube. We can utilize the ZeroTest method from the RowCheck protocol to verify this relationship. Fortunately, ZeroTest is not necessary here since and are multilinear polynomials with an equal number of variables. If two multilinear polynomials agree on the Boolean hypercube, then they must be the same. We can apply the standard polynomial identity test to check that the polynomial relation holds; that is, sampling a random vector and checking that . Based on the Schwartz–Zippel Lemma, if , then the test will pass with a probability of at most .
The verifier samples and queries at to obtain . Suppose . Next, we can check via the SumCheck protocol. In the last round of the SumCheck protocol, the verifier should compute at a random point , which can be done by querying at to obtain , querying at to obtain , and computing in constant time. The round complexity of the protocol is . The time complexity of the verifier is also since the cost of each round is constant in the SumCheck protocol.
The polynomial
has a maximal individual degree of 2 since
and
are multilinear. From
Table 3, we find that the soundness of the SumCheck is
. Overall, the soundness error of the LinCheck protocol is
and is union bound.
Similar to the RowCheck protocol, we can utilize Lemma 3 to implement the prover in linear time. In
Section 3.2.2, we will present the complete LinCheck protocol and provide the necessary details on how to achieve the linear time prover.
3.2.2. Batched LinCheck
In order to verify the R1CS relation, three LinCheck protocols are required to check that , , and . Namely, the verifier samples and queries at to obtain , , . Suppose . The verifier should check the three claims “”, “”, and “” by running three SumCheck protocols in parallel.
In this section, we present a method to merge these three LinCheck protocols into a single one. Before running the SumCheck protocol, the verifier samples three random elements
and sends them to the prover. The prover and verifier run the SumCheck protocol for the following single claim:
We describe the batched LinCheck protocol as follows:
Protocol 3. Batched LinCheck Protocol:
Inputs.
Prover’s input:
- −
Four vectors , three matrices .
Verifier’s input:
- −
Four polynomial oracles , , provided by the prover.
- −
Three polynomial oracles provided by the indexer.
Goal.
The protocol:
- 1.
The verifier samples and queries at . Suppose the return values are , and .
- 2.
The verifier samples , and sends them to the prover.
- 3.
The prover and verifier run the SumCheck protocol for the following claim:
The following lemma states that combining the three LinCheck protocols into one protocol would increase the soundness error by .
Lemma 5. Suppose for some , and are sampled uniformly random from . Then, the equationholds with probability at most . Proof. Without loss of generality, assuming that
, then
is a non-zero polynomial with three variables and total degree 1. The result follows immediately from the Schwartz–Zippel Lemma. □
Now, we analyze the soundness error of the batched LinCheck protocol.
Lemma 6. Suppose or or . Then, in the Batched LinCheck protocol, the verifier accepts with probability at most .
In the last round of the SumCheck protocol, the verifier should compute at a random point , which can be done by querying at , querying , , at , and computing for all in constant time. The round complexity of the protocol is . The time complexity of the verifier is also since the cost of each round of the SumCheck protocol is constant.
We will show that we can implement the prover in linear time in the batched LinCheck protocol. The main cost of the protocol is running the SumCheck protocol for the claim
Let
. Tn the
j-th round of the SumCheck protocol, since the individual degree of
is 2, the prover should compute
,
,
and send them to the verifier, where
and
are uniformly random elements sampled from
by the verifier. Similar to the RowCheck protocol, we can show that the prover can evaluate
,
and
in
time from Lemma 3. Without loss of generality, it is sufficient to show that the following quantities can be computed in
time:
and
where
is a uniformly random vector, and
are uniformly random elements in
. For quantities (
18), we can apply Lemma 3 directly since
is multilinear and the prover knows all evaluations of
for all
(
for all
). To apply Lemma 3, we need to prove the following lemma, which is similar to Lemma 4.
Lemma 7. Let , and is the multilinear extension of matrix A. Then, we can evaluate at all points in in time .
From Lemma 7, we can apply Lemma 3 to the polynomial
, and the quantities (
17) can be computed in
time. Therefore, in the
j-th round of the SumCheck in the batched LinCheck protocol, the prover can be implemented in time
. In total, the prover time in the batched LinCheck protocol is
.
We summarize the properties of the batched LinCheck in the
Table 5 below, where
N represents the size of matrix
and vector
z. The communication complexity represents the number of non-oracle elements sent by the prover, which is
since in every round, the prover just sends 3 elements. The verifier should query
,
,
at
, query
at
, and query
,
,
at
. Therefore, the query complexity is 7.
3.3. ConsistencyCheck
Suppose
is a vector of length
N, and
is a vector of length
. Given a polynomial oracle
and a vector
x, the purpose of ConsistencyCheck is for the prover to convince the verifier that the first
elements of
z are exactly
x. Let
,
. We can view
as two functions on the Boolean hypercube, namely
and
. Let
be low-degree extensions of
. If the first
elements of
z are exactly
x, then for all
(
), we have
, where
. Therefore, the following polynomial identity holds:
The verifier samples a random
and checks that
Based on the Schwartz–Zippel Lemma, if Equation (
19) does not hold, then the verifier will accept it with a probability of at most
since both sides are multilinear polynomial with
variables. Note that the prover does not need to do anything in this protocol. The verifier should query the oracle
at point
and compute
, which takes time
. We summarize the properties of the ConsistencyCheck protocol in the
Table 6 below, where
represents the size of
x.
3.4. Polynomial IOP for R1CS
We provide a comprehensive description of the polynomial IOP for R1CS by combining the RowCheck, LinCheck, and ConsistencyCheck protocols. In the context of this section, we assume that the indexer, who prepares the R1CS index , has already sent three polynomial oracles , and to the verifier before the interaction between the prover and the verifier. The verifier can query , and at any points to obtain , and , where , and are multilinear extensions of A, B, and C. We describe the polynomial IOP for R1CS as follows:
Protocol 4. Polynomial IOP for R1CS:
Inputs.
Prover’s input:
- −
Three matrices .
- −
A vector , a vector .
Verifier’s input:
- −
Three polynomial oracles , provided by the indexer.
- −
A vector .
Goal.
The protocol:
- 1.
The prover computes , , and sends four polynomial oracles , , , to the verifier.
- 2.
The prover and verifier run the RowCheck protocol (Protocol 2) to check that .
- 3.
The prover and verifier run the batched LinCheck protocol (Protocol 3) to check that , , and .
- 4.
The prover and verifier run the ConsistencyCheck protocol to check that the first elements of z are exactly x.
The round complexity, communication complexity, query complexity, and the cost of the prover and verifier of this protocol are from
Table 4,
Table 5 and
Table 6. For all matrices
, it is worth noting that they are sparse matrices, meaning that there are only a limited number of non-zero elements in each matrix. Specifically, there are only
non-zero elements in each matrix. Consequently, the cost for computing the matrix–vector product
for each
U is
. For the soundness error of the protocol, we present the following lemma.
Lemma 8. Let be the indexed R1CS relation and be the corresponding language. If , then for any prover, the verifier accepts with probability at most .
Proof. Since , there is no such that . In the context of the R1CS relation, there is no such that , where .
Fix a malicious prover and suppose the four polynomial oracles sent by the prover are , and the corresponding vectors are . Then, one of the following conditions must hold:
. Based on the soundness error of the RowCheck protocol (Protocol 2) from
Table 4, the verifier will accept it with a probability of at most
.
for some
. Based on the soundness error of the batched LinCheck protocol (Protocol 3) from
Table 5, the verifier will accept it with a probability of at most
.
is not consistent with the vector
x. Based on the soundness error of the ConsistencyCheck protocol from
Table 6, the verifier will accept it with a probability of at most
.
Therefore, the verifier will accept it with a probability of at most .
If the three conditions mentioned above do not hold—specifically, if , for all , and is consistent with the vector x—then we can consider taking as the last elements of . In this case, it holds that , which contradicts our initial assumption. □
We summarize the properties of the polynomial IOP for the R1CS protocol in the
Table 7 below. It should be noted that the logarithmic verification of the protocol is based on the assumption that the indexer has already sent the three polynomial oracles
,
and
to the verifier.
4. Achieving Holography
In the holographic setting [
13,
29], we divide the protocol into two parts: an offline phase that produces an encoding of the circuit by the deterministic indexer, and an online phase that checks that the
relation holds via interactions between the prover and verifier. We have finished the description of the online phase in
Section 3, except that we assume that the indexer has completed the preprocessing task and has sent three polynomial oracles
,
,
to the verifier. The verifier can query these oracles at any points
to obtain
,
and
. Without these oracles, in the final round of the LinCheck protocol, the verifier should evaluate the polynomial
at a random point
, which costs at least
time, even if the matrices are sparse (
non-zero elements for each matrix). In this section, we will demonstrate the implementation of the indexer. We provide a deterministic algorithm for preprocessing the circuit during the offline phase. Next, we will modify the verifier’s method of computing
for all
in the online phase.
In the R1CS instance, we represent the circuit by three matrices, A, B, and C of size . The simplest approach is to send the three polynomial oracles , , and directly. Indeed, due to the size of these matrices being , even when using the fastest available polynomial commitment scheme, the time complexity of the committer will not be lower than . Remember that in the R1CS instance, for all , U is a sparse matrix, i.e., the number of non-zero elements in U is . Therefore, the multilinear extension of U is sparse, i.e, there are only non-zero coefficients in the polynomial . Let ; is a multiliear polynomial with variables. To construct a linear-time ( time) prover SNARK, we aim to represent the -variate polynomial using a set of -variate polynomials for all .
We will implement the algorithm for the indexer in
Section 4.1, and we will show how to represent the
-variate polynomial
using a set of
-variate polynomials. The indexer will send these polynomial oracles to the verifier in the offline phase. As mentioned before, for all
, the verifier should compute
in the LinCheck protocol. In the actual protocol, the value
is provided by the prover. Suppose the prover sends a value
and claims that
. In
Section 4.2, we will present a protocol for verifying the condition
. We demonstrate that this condition can be checked using the lookup protocol [
43,
44], which enables the prover to convince the verifier that all elements in one vector,
, are contained within another vector,
. However, the classical lookup protocol proposed by Gabizon and Williamson [
44] is not suitable for our purposes because their prover’s cost is quasilinear, whereas we require the prover to operate in strictly linear time. Therefore, in
Section 4.3, we will introduce a new polynomial IOP specifically designed for the lookup condition. This protocol will meet our requirement of linear time implementation for the prover.
4.1. Offline Phase
The index
consists of three matrices,
A,
B, and
C. The encoding scheme used in our work is derived from Marlin [
13] and Zhang et al.’s work [
31], but their constructions support univariate polynomials, whereas we are using multivariate polynomials.
We describe the algorithm of the indexer. The input of the indexer is the index , where . Similar to Marlin, for all , we assume that the non-zero elements of U are presented in some canonical order (e.g., row-wise or column-wise). Let be the number of non-zero elements of matrix U; note that . Let m be the smallest integer such that , and let . Note that since all matrices are sparse. For all , we define such that -th non-zero element of U if (we start the index from 0), and if . Let be a canonical injection from to and be its inverse, where . For with , let () be the row (column) index of the k-th non-zero entry in U (note that ). Define two functions , such that , if , and let , be 0 if . Let , , be the multilinear extension of , , . The following lemma states that the multilinear extension of U can be computed from , , .
Lemma 9. Let , where . Then, the following two properties hold:
, ,
is multilinear.
These two properties imply that is the multilinear extension of U.
Proof. From the definition of , we know it is a multilinear polynomial, since is multilinear. For any , it holds that if and if . Therefore, if and only if . Similarly, if and only if . It follows that for all :
if
is the
-th non-zero entry of
U, then
and
, i.e.,
and
. Therefore,
if , then is also 0. Otherwise, if , then there exists a such that , and . This implies that is the -th non-zero entry in U, which contradicts our assumption.
□
The indexer sends the 10 functions , , for all and to the prover (we can view these functions as vectors of length or ) and sends ten polynomial oracles , , for all and to the verifier. The verifier can query , , at any point to obtain , , and query at any point to obtain . The cost of the indexer is since there are at most non-zero elements in each matrix. We describe the offline phase as follows:
Protocol 5. Offline Phase for Encoding the Circuit:
Inputs.
Indexer’s input:
- −
Three matrices . (Assume that the non-zero elements of each matrix are presented in some canonical order.)
Goal.
The indexer sends ten functions (vectors) and ϕ to the prover and sends ten polynomial oracles and to the verifier.
The protocol:
The indexer specifies a canonical injection .
The indexer find m such that m is the smallest integer such that , and let . Then, for all , we perform the following step:
- 1.
Initial three vectors with length M.
- 2
For :
- (a)
Suppose that () is the row (column) index of the k-th non-zero entry in U.
- (b)
Set , , .
- 3.
For :
- (a)
Set .
The indexer sends ten functions (vectors) and ϕ to the prover.
The indexer sends ten polynomial oracles and to the verifier.
4.2. Online Phase
In
Section 3.2, we assume that the indexer has provided the three polynomial oracles
. The verifier can query these oracles to obtain
,
,
at any point. However, in the actual protocol, the indexer provides ten polynomial oracles
,
,
for all
and
. Remember that in the last round of the batched LinCheck protocol, the verifier should evaluate
at a random point
. In the actual protocol, we delegate the task of computing
for all
to the prover. We then verify the validity of the evaluation using the SumCheck protocol and the polynomial oracles provided by the indexer.
In the batched LinCheck protocol, the verifier samples two random vectors
. These vectors are chosen randomly and independently by the verifier. At the end of the protocol, the verifier sends these vectors to the prover. Suppose the prover responds with
and claims that
. For all
, the verifier should check that the provided values are indeed correct. From Lemma 9, we know that
At first glance, the SumCheck protocol seems suitable for checking this equation, and it is indeed employed in the Marlin protocol [
13] using univariate polynomials. However, a potential challenge arises in the last round of the SumCheck protocol when the verifier needs to compute
for a random vector
. The function
may not be defined for
if
does not belong to the binary domain
, as the corresponding
might not fall within the range of the mapping
. Furthermore, it should be noted that the function
is not a polynomial. Consequently, we cannot directly apply the SumCheck protocol to verify Equation (
22).
To address this issue, we define two functions such that for all ,
,
.
Let
be the multilinear extension of
. The prover sends the polynomial oracles
. Then, the prover and verifier run the SumCheck protocol for the following claim:
The polynomials , and are multilinear, so we can implement the prover in time from Lemma 3. After the SumCheck protocol, the verifier should check that for all :
,
.
In Spartan [
36] and Brakedown [
35], they use an offline memory-checking technique [
57] to verify that these two conditions hold. They create an additional circuit specifically for the checking procedure and utilize another SNARK to convince the verifier that the checking procedure has been executed correctly. In our work, we propose a new polynomial IOP that eliminates the need for the second SNARK to check these conditions. A crucial component in our construction is the lookup protocol [
44], which allows the prover to convince the verifier that all elements in a vector
are contained within another vector
. We first show how to check the above conditions using the lookup protocol as a subroutine, then we revise the classical lookup protocol to fit our setting.
Let and . We define two vectors and with length such that the i-th () entry of () is (). Note that we can also view and as two vectors of length . The key observation is that for all , if , then , i.e., the k-th entry of is exactly the -th entry of . Therefore, the function (vector) is constructed correctly if and only if for all , there exists an such that . This is equivalent to since is a injection. Let be a vector of length , and the k-th (index starts from 0) entry of the vector is a tuple . Let be a vector of length , and the i-th entry of the vector is a tuple . We have argued that every element of the vector is contained within the vector . We use the shorthand to represent the lookup relation. Similarly, we can define two vectors and . The function (vector) is constructed correctly if and only if . We can apply the lookup protocol to check whether the two conditions hold. In this section, we use the lookup protocol as a black-box subroutine. We will provide a detailed construction of the lookup protocol in the subsequent section. We describe the protocol for checking as follows:
Protocol 6. Protocol for Checking :
Inputs.
Prover’s input:
- −
A matrix ,
- −
Four functions (vectors) provided by the indexer in the offline phase,
- −
Two random vectors () provided by the verifier.
Verifier’s input:
- −
Two random vectors ,
- −
Four polynomial oracles provided by the indexer. The verifier has the ability to query the former three oracles at any point r in and the last oracle at any point r in .
- −
A element provided by the prover.
Goal.
The protocol:
- 1.
Let and . The prover constructs two vectors of length (we can view these two vectors as two functions from to ) such that and for all .
- 2.
The prover constructs two vectors of length (we can view these two vectors as two functions from to ) such that and for all . Then, it sends the polynomial oracles to the verifier.
- 3.
The prover and verifier run the SumCheck protocol to check the following claim: - 4.
The prover and verifier run the lookup protocol to check the following two claims:
,
.
We analyze the properties of Protocol 6 without considering the lookup protocol. In the last round of the SumCheck protocol of step 3, the verifier should compute
for a random vector
. The verifier can query
,
,
at
to obtain
,
,
. The verifier can compute their product in constant time. The soundness error of the protocol is
from
Table 3, since
,
,
are multilinear. In step 1 of the protocol, the prover should construct two vectors
and
with length
. This is equivalent to evaluating
and
at all points in the Boolean hypercube
. According to Lemma 4, the cost for the prover is
. In step 2 of the protocol, the prover constructs two vectors,
and
with length
. Each entry of these vectors is taken from
and
, respectively. This implies that
and
can be constructed in
time. In step 3 of the protocol, the cost of the prover for the SumCheck protocol is
according to Lemma 3. This is because the polynomials
,
, and
are multilinear, and the prover can evaluate these polynomials at all points in the Boolean hypercube
in
time. (The vectors
and
are constructed by the prover himself, and the vector
is sent by the indexer.)
Ignoring the lookup protocol, we summarize the properties of Protocol (6) in the
Table 8 below. The round and communication complexity are both determined by the SumCheck protocol.
4.3. Lookup Protocol
In this section, we propose a lookup protocol to check that the condition holds (the same protocol can be applied to check ). We will replace the condition with the simpler inclusion using the standard randomized hashing scheme, where and . The verifier samples a random element to the prover, then the prover defines two new vectors () and () such that for all , , and for all , . Remember that is a natural canonical injection from to . It is not hard to see that if and only if , except with a small probability. Formally, we have the following claim:
Lemma 10. Suppose . Let ξ be a random element from . Define two vectors and :
,
.
Then, with a probability of at most .
Proof. There exists at least one
such that
, since
. If
, then there exists an
such that
There exists at most one
such that Equation (
24) holds, i.e., Equation (
24) holds with a probability of at most
for a particular
. Based on the union boundary, there exists
such that Equation (
24) holds with a probability of at most
. Therefore,
with a probability of at most
. □
Gabizon and Williamson [
44] proposed a lookup protocol for checking the
condition. Their construction relies on the following lemma:
Lemma 11. Let and . Then, if and only if there exists such thatwhere and are the cyclic shifts left of b and s. We can construct as follows: Initialize a vector . Then for each (), find in s such that (at least one entry exists since ) and insert after in s. To check that Equation (
25) holds, we can apply a standard polynomial identity testing scheme; namely, we can sample two random elements
and check
If Equation (
25) does not hold, then the test will pass with a probability of at most
from the Schwartz–Zippel Lemma. Gabizon and Williamson verified the Equation (
26) by performing a ZeroTest on a multiplicative subgroup of
, resulting in a quasilinear prover time. However, their approach is not suitable for our work, as we require the prover to be implemented in strictly linear time. We will give a new polynomial IOP for the lookup condition with a linear time prover in this section. Our construction is inspired by the work of Bootle et al. [
33], where they introduced a protocol based on the tensor IOP model.
Without loss of generality, we assume that the vectors a and b have the same length, which is M (we can pad b with repetitions of the last element). Therefore, s is a vector with length . We can view the vectors as three functions defined on the Boolean hypercube, i.e., and . Let and be the multilinear extensions of . The prover sends three polynomial oracles to the verifier. (Note that in the actual protocol, the prover needs not send the oracle , since for any , the verifier can obtain from and . Let be the cyclic shift left of , and let and be the multilinear extension. The prover sends the polynomial oracles to the verifier. The verfier can query the polynomial oracles , , at any point to obtain , , and query the polynomial oracles , at any point to obtain , .
The verifier samples two random elements
and sends them to the prover. The prover constructs three functions (vectors)
and
such that for all
and
:
Let
and
be the multilinear extension of
and
. Then, the prover sends the polynomial oracles
and non-oracle messages
to the verifier. The verfier can query the polynomial oracles
,
at any point
to obtain
,
and query the polynomial oracles
at any point
to obtain
. Note that in the actual protocol, which will be provided in
Section 4.3.3, the prover does not need to send the polynomial oracles
, and
. This is because for any
and
, the verifier can obtain
,
, and
using the values of
,
,
,
, and
. In this section, we request that the prover sends these polynomial oracles for the sole purpose of making the structure of the protocol more clear.
The verifier first checks that
and rejects it if the equation does not hold. Next, the verifier checks that
and
are the cyclic shifts left of
b and
s by running the Cyclic Shift Left Check (CSLCheck) protocol, which will be constructed in the
Section 4.3.1. Finally, the verifier checks Equations (
28) by running the ProductCheck protocol, which will be constructed in
Section 4.3.2. In
Section 4.3.3, we present a detailed explanation and analysis of the lookup protocol.
4.3.1. CSLCheck Protocol
Suppose are two vectors with length M. Given two polynomial oracles and , the verifier checks that for all (), if , otherwise. Indeed, the verifier checks that is the cyclic shift left of b.
Let
and
. If
is the cyclic shift left
b, then
. Therefore, the following polynomial identity holds:
The verifier checks that the above polynomial identity holds via standard polynomial identity testing. Namely, the verifier first samples a random element
. Then, the verifier can obtain
by querying the polynomial oracle
in the univariate canonical form, as mentioned in
Section 2.4.1. Note that in our work, the verifier always queries the polynomial oracles in the multilinear Lagrange form, except for in this section. Similarly, the verifier can obtain
by querying the polynomial oracle
in the univariate canonical form. Next, the verifier queries
at 0 to obtain
(note that in the actual protocol, the verifier can compute
by itself since
) and computes
in
time. Finally, the verifier checks that
holds. Based on the Schwartz–Zippel Lemma, if
is not the cyclic shift left of
b, then the verifier will accept it with a probability of at most
. We describe the protocol for checking the cyclic shift left as follows:
Protocol 7. CSLCheck Protocol:
Inputs.
Prover’s input:
- −
Two vectors .
Verifier’s input:
- −
Two polynomial oracles , .
Goal.
The protocol:
- 1.
The verifier samples , and queries , at in the univariate canonical form. Suppose the return values are and .
- 2.
The verifier queries at 0 to obtain (regardless of the query form, the return value is always ).
- 3.
We summarize the properties of the CSLCheck protocol in the
Table 9 below. Note that there is nothing for the prover to do in this protocol. Remember that
.
4.3.2. ProductCheck Protocol
Suppose
is a vector with length
M. Given a polynomial oracle
, an element
, the verifier checks that
(
). We utilize the partial product technique from PLONK to construct the ProductCheck protocol. The prover first constructs three functions,
such that every entry of the vectors is a partial product of
. Formally, for all
:
We can view these three functions as vectors of length
M. Note that
is the cyclic shift left of
, and
and
are the same vectors except for the last element.
The prover sends three polynomial oracles , and to the verifier.
The verifier first checks that
, where ∘ denotes the pairwise product of two vectors. Indeed, the verifier checks that for all
, it holds that
. Note that this task is identical to the problem addressed by the RowCheck protocol described in
Section 3.1. Next, the verifier proceeds to check whether
corresponds to the cyclic shift left of
, employing the protocol outlined in
Section 4.3.1. In the CSLCheck protocol, the verifier will query
at 0 to obtain
. The verifier will reject it if it is not equal to 1. Then, the verifier samples a random vector
, queries
at point
, and checks
where
is the
i-th entry of
. If the prover is honest, then
denotes the all 1 vector
. Therefore,
. We describe the ProductCheck protocol as follows:
Protocol 8. ProductCheck Protocol:
Inputs.
Prover’s input:
- −
A vector .
Verifier’s input:
- −
A polynomial oracle .
- −
A single field element .
Goal.
The protocol:
- 1.
The prover constructs three vectors , , with length (three functions ) such that for all : The prover sends three polynomial oracles , , to the verifier.
- 2.
The prover and verifier run the RowCheck protocol (Protocol 2) to check that .
- 3.
The prover and verifier run the CSLCheck protocol (Protocol 7) to check that is the cyclic shift left of . During the CSLCheck phase, the verifier will query at 0 to obtain and reject it if .
- 4.
The verifier samples a random vector and queries , at point to obtain and . Finally, the verifier checks the following:
From
Table 4 and
Table 9, the verifier’s cost is
and the prover’s cost is
in steps 2 and 3 of the ProductCheck protocol. In the final step, the verifier needs to compute
for a randomly chosen vector
, which can be done in
time. Hence, the total cost of the verifier in this protocol is
. The prover’s cost is also
in step 1, as every entry of the three vectors is a partial product of
. Therefore, the total cost of the prover in this protocol is
.
The round and communication complexity (non-oracle messages) are determined by the RowCheck protocol, which is . The query complexity of the RowCheck protocol and CSLCheck protocol is both 3, and in step 4, the query complexity is 2. Therefore, the total query complexity in the ProductCheck protocol is 8, which is constant.
For the soundness error of the ProductCheck protocol, we have the following lemma:
Lemma 12. If , then in Protocol (8), the verifier accepts it with a probability of at most .
We summarize the properties of the ProductCheck protocol in the
Table 10 below.
4.3.3. Putting Everything Together
In this section, we present a detailed explanation and analysis of the Lookup protocol. Remember that the purpose of the lookup protocol is for the prover to convince the verifier that . (The same protocol can be applied to check .) To align the lengths of the vectors and , the prover pads the vector , which has a length of , such that it matches the length of , which is . The prover can just pad with repetitions of the last element. Let be the vector after padding. We have the following lemma:
Lemma 13. Let , be the multilinear extension of ; then,
,
,
where .
The above lemma states that for any points , the verifier can compute by itself and compute by querying at . Now, we describe the complete lookup protocol.
Protocol 9. Lookup Protocol:
Inputs.
Prover’s input:
- −
Two vectors with length and with length ().
Verifier’s input:
- −
Two polynomial oracles , provided by the indexer.
- −
A polynomial oracle provided by the prover.
Goal.
The protocol.
- 1.
The prover pads with repetitions of the last element. Let be the vector after padding.
- 2.
The verifier samples a random element and sends it to the prover.
- 3.
The prover computes two vectors :
,
,
and constructs a vector that satisfies Lemma 11. Formally, the prover does the following:
Initialize a vector with length N, where the i-th (index starts from 0) element represents the frequency of appearing in vector . Scan the vector to deduce the vector .
Initialize a vector s with length and perform a linear scan on s, where for each , if , insert copies of into s. If , insert copies of into s. It is easy to verify that the vector s we have constructed satisfies Lemma 11.
The prover then sets and to be the cyclic shift left of b and s. Then, the prover sends four polynomial oracles , , , and .
- 4.
The verifier checks that via the standard polynomial testing technique. In other words, the verifier samples , queries at to obtain and queries at to obtain , where . The verifier then queries at to obtain and checks that since . Equation (37) is deduced from Lemma 13. - 5.
The verifier samples two random elements and sends it to the prover.
- 6.
The prover constructs three functions and such that for all and : Next, the prover computes the following: Then, the prover sends three elements to the verifier.
- 7.
The verifier checks that .
- 8.
The prover and verifier then run three ProductCheck protocols (Protocol 8) in parallel to verify Equation (39). Let , and be the multilinear extensions of , , and . During the execution of the ProductCheck protocol, the verifier should compute , , and at some random points , and (step 2 of Protocol (8)). To obtain , the verifier queries at to obtain , queries at to obtain , and computes To obtain , the verifier queries at to obtain , queries at to obtain , and computes To obtain , the verifier queries at to obtain , queries at to obtain , and computes
- 9.
The prover and verifier then execute two CSLCheck protocols (Protocol 7) in parallel to verify that and are cyclic shifts left of b and s, respectively.
From
Table 9 and
Table 10, the verifier’s cost is
in the CSLCheck and ProductCheck phases. In step 4 of the protocol, the verifier can compute the right-hand side of Equation (
37) in
time. Therefore, the total cost of the verifier in Protocol (9) is
. The query complexity of this protocol is constant; specifically,
. This is because each sub-protocol has a constant query complexity, and in step 4, the verifier makes three queries to the polynomial oracles. The round and communication complexity are determined by the ProductCheck protocol, which is
.
We then analyze the prover’s cost in Protocol (9). In step 3, when constructing the vector
, the prover first scans the vector
to deduce a frequency vector
and then construct vector
s from
by performing a linear scan on
s. The total cost of step 3 is
. In step 6, the prover should construct two vectors with length
M and one vector with length
and compute the entry product of each vector, which takes time
. From
Table 10, the prover’s cost in the ProductCheck is
. Therefore, the total cost of the prover in Protocol 9 is
.
For the soundness error of the lookup protocol, we have the following lemma:
Lemma 14. If , then in Protocol (9), for any prover’s strategy, the verifier accepts it with a probability of at most .
We summarize the properties of the lookup protocol in the
Table 11 below.