Back to all posts

Variants of KZG: Part II, Multilinear Commitments with PST

KZG-II Header

In Part I, we studied KZG commitments in the univariate setting, i.e., the prover wants to prove to a verifier that $\hat f(u)=v$, where $\hat f$ is a univariate polynomial. In this and the subsequent parts of the series, we will explore KZG-based polynomial commitments for multilinear polynomials. A multilinear polynomial is a multivariate polynomial with degree at most one in each of its variables.

The key question we want to study throughout the remainder of this series is:

Can we construct an opening argument for a multilinear polynomial $f(X_0,\ldots,X_{n-1})$ at a point $(u_0,\ldots,u_{n-1})$, proving that $f(u_0,\ldots,u_{n-1})=v$?

Such commitments can be used with a multilinear IOP, such as Spartan, to construct a SNARK. In this part, we will study the Papamanthou-Shi-Tamassia (PST) commitment scheme.

Notation. We continue to use the notation from Part I. Write $\vec{X}=(X_0,\ldots,X_{n-1})$ and $\vec{u}=(u_0,\ldots,u_{n-1})$. Univariate polynomials are denoted with a hat, while multilinear polynomials are denoted without a hat.

Before we dive into the construction, let us study a polynomial identity for the multilinear setting.

Multilinear Polynomial Identity

In Part I, we looked at a polynomial identity in the univariate setting based on the factor theorem. If $\hat f(u)=v$, then there exists a unique quotient polynomial:

$$ \hat q(X)=\frac{\hat f(X)-v}{X-u}. $$

The key idea was to check the identity $\hat f(X)-v=(X-u)\hat q(X)$ at the randomly sampled hidden setup value. If the identity is false, then it holds at the random setup value only with small probability, by the Schwartz-Zippel Lemma. The verifier performs this check using the public parameters, the commitments to $\hat f$ and $\hat q$, and bilinear pairings.

We want a similar identity in the multilinear setting. Let us specialize the variables in the reverse order $X_{n-1},X_{n-2},\ldots,X_0$. Consider the partial evaluation of $f(X_0,\ldots,X_{n-1})$ obtained by setting $X_{n-1}=u_{n-1}$:

$$ f_{n-1}(X_0,\ldots,X_{n-2}) = f(X_0,\ldots,X_{n-2},u_{n-1}). $$

Now the difference

$$ f(X_0,\ldots,X_{n-1})-f_{n-1}(X_0,\ldots,X_{n-2}) = f(X_0,\ldots,X_{n-1})-f(X_0,\ldots,X_{n-2},u_{n-1}) $$

vanishes when $X_{n-1}=u_{n-1}$. Thus, by the factor theorem for multivariate polynomials, it is divisible by $(X_{n-1}-u_{n-1})$, and there exists a quotient $q_{n-1}$ such that

$$ q_{n-1}(X_0,\ldots,X_{n-2}) = \frac{f(X_0,\ldots,X_{n-1})-f_{n-1}(X_0,\ldots,X_{n-2})} {X_{n-1}-u_{n-1}}. $$

Thus,

$$ f(X_0,\ldots,X_{n-1})-f_{n-1}(X_0,\ldots,X_{n-2}) =(X_{n-1}-u_{n-1}) \cdot q_{n-1}(X_0,\ldots,X_{n-2}) \tag{1} $$

Next, consider the partial evaluation of $f_{n-1}(X_0,\ldots,X_{n-2})$,

$$ f_{n-2}(X_0,\ldots,X_{n-3}) = f_{n-1}(X_0,\ldots,X_{n-3},u_{n-2}), $$

obtained by setting $X_{n-2}=u_{n-2}$. Applying the factor theorem again gives

$$ f_{n-1}(X_0,\ldots,X_{n-2})-f_{n-2}(X_0,\ldots,X_{n-3}) =(X_{n-2}-u_{n-2}) \cdot q_{n-2}(X_0,\ldots,X_{n-3}) \tag{2} $$

Adding the equations $(1)$ and $(2)$, we get

$$ \begin{aligned} f(X_0,\ldots,X_{n-1})-f_{n-2}(X_0,\ldots,X_{n-3}) ={}&(X_{n-1}-u_{n-1}) \cdot q_{n-1}(X_0,\ldots,X_{n-2})\\ &+(X_{n-2}-u_{n-2}) \cdot q_{n-2}(X_0,\ldots,X_{n-3}). \end{aligned} $$

Continuing in the same way down to $X_0=u_0$, we obtain the following identity:

$$ f(X_0,\ldots,X_{n-1})-f(u_0,\ldots,u_{n-1}) = \sum_{k=0}^{n-1}(X_k-u_k) \cdot q_k(X_0,\ldots,X_{k-1}). $$

Here, $q_k$ depends only on the first $k$ variables, $X_0,\ldots,X_{k-1}$, and is multilinear in those variables, while $q_0$ is constant. For the fixed specialization order $X_{n-1},X_{n-2},\ldots,X_0$, these quotient polynomials are unique.

Thus, proving $f(u_0,\ldots,u_{n-1})\stackrel{?}{=}v$ reduces to proving that there exist multilinear polynomials $q_k$ satisfying the following identity:

$$ f(X_0,\ldots,X_{n-1}) - v \; \stackrel{?}{=} \; \sum_{k=0}^{n-1}(X_k-u_k) \cdot q_k(X_0,\ldots,X_{k-1}). $$

We will use this as the starting point for PST. With the basics aside, we will now look at the construction.

PST Commitment Scheme

PST is a direct multivariate generalization of KZG. The original construction supports general multivariate polynomials, but we focus on its multilinear specialization, which is more common in practice.

We need to check the following identity:

$$ f(X_0,\ldots,X_{n-1})-v \; \stackrel{?}{=} \; \sum_{k=0}^{n-1}(X_k-u_k)q_k(X_0,\ldots,X_{k-1}). $$

By the Schwartz-Zippel Lemma, if the above equation is not a valid polynomial identity, then it holds at a randomly chosen point only with small probability.

Thus, during $setup$, we sample a random point $\vec{\tau}=(\tau_0,\ldots,\tau_{n-1})$ at which the above equation will be checked. The verifier performs this check using the public parameters, commitments to $f$ and the $q_k$, and bilinear pairings.

The algorithms for the construction are defined as follows.

Complexity of the Opening Protocol

For an $n$-variate multilinear polynomial with $2^n$ coefficients, the complexity of the opening protocol is explained as follows.

Equivalently, the costs can be summarized as follows:

Component Cost
Proof size $O(n)$ field elements
Prover Work $O(2^n)$ field operations, $O(2^n)$ group scalar mults
Verifier Work $O(n)$ group scalar mults, $n+1$ pairings

Limitations of PST

Conclusion

PST extends the KZG quotient argument directly to multilinear polynomials. For an evaluation claim $f(\vec{u})=v$, the prover commits to one multilinear quotient polynomial for each variable, and the verifier checks the resulting identity using bilinear pairings.

This direct approach is conceptually simple, but it requires a specialized multivariate setup and a number of pairing terms that grows linearly with the number of variables. This motivates a different question:

Can we retain the multilinear quotient identity while using univariate polynomial commitments?

In the next part, we will study Zeromorph, which constructs a multilinear PCS using an additively homomorphic univariate PCS (like univariate KZG) and a degree check protocol.

zkSecurity offers auditing, research, and development services for cryptographic systems including zero-knowledge proofs, MPCs, FHE, consensus protocols and more.

Learn More →