Suppose a prover holds two vectors and claims that their inner product is a particular value. How can commitments and a verifier's challenge connect that claim to an algebraic check?
The construction below starts with two vector-valued linear polynomials. Their inner product gives a scalar quadratic polynomial. By committing to the coefficients first, the prover can later provide evaluations at a challenge chosen by the verifier. The verifier checks that these evaluations match the commitments and satisfy the claimed inner-product relation.
We will work through the polynomial expansion, the commitments, the challenge and response, and all four verification equations.
This post derives the uncompressed random-evaluation check and establishes only its honest-prover completeness. It does not prove soundness, knowledge extraction, or zero knowledge. A logarithmic inner-product argument that replaces transmission of the two evaluated vectors, such as the construction in Bulletproofs, is a separate construction outside this walkthrough.
1. Set up the notation
Let the vector entries and all other scalars belong to a finite field Fq. Let G be an additive group of large prime order q.
We use the following public group elements:
- G=(G1,…,Gn) for vector commitments.
- G for scalar commitments.
- H for the blinding term in both kinds of commitment.
Here, every commitment generator is assumed to be a nonidentity group element, and the prover is assumed unable to efficiently find any nontrivial linear relation among G1,…,Gn,G, and H. This is the computational-binding assumption that prevents the prover from changing a commitment's opening.
For two scalar vectors, angle brackets denote the usual inner product:
⟨a,b⟩=i=1∑naibi∈Fq.
When the second argument is a vector of group elements, the same notation denotes a linear combination in the group:
⟨a,G⟩=i=1∑naiGi∈G.
This distinction matters: an inner product of two scalar vectors produces a scalar, while a vector commitment produces a group element.
We write X for the formal polynomial variable and u for the verifier's eventual challenge.
2. Turn the inner product into a polynomial
Take four vectors f0,f1,g0,g1∈Fqn and define
f(X)g(X)=f1X+f0,=g1X+g0.
We also use the names
ℓ(X)=f(X),r(X)=g(X).
The claimed relation between the constant vectors is
v=⟨f0,g0⟩.
The algebra below holds for any choice of the linear coefficients. If those coefficients are intended to mask the constant vectors, sample f1 and g1 independently and uniformly for each interaction, and use a nonzero challenge as specified below. This describes the masking step; a zero-knowledge claim for the entire transcript still needs its own proof.
Define the scalar polynomial
t(X)=⟨ℓ(X),r(X)⟩.
Expanding by bilinearity gives
t(X)=⟨f1X+f0,g1X+g0⟩=⟨f1,g1⟩X2+(⟨f0,g1⟩+⟨f1,g0⟩)X+⟨f0,g0⟩.
Therefore,
t(X)=t2X2+t1X+t0,
with coefficients
t0t1t2=v=⟨f0,g0⟩,=⟨f0,g1⟩+⟨f1,g0⟩,=⟨f1,g1⟩.
The constant coefficient is the original inner-product claim. The linear coefficient collects the two cross terms, and the quadratic coefficient comes from multiplying the two linear terms.
3. Commit to the coefficients
A vector commitment combines a vector with a scalar blinding factor:
Cvec(a;ρ)=⟨a,G⟩+ρH.
A scalar commitment uses the same pattern:
Cscalar(a;ρ)=aG+ρH.
For newly created commitments, the prover samples scalar blinding factors α1,α2,β1,β2,γ0,γ1,γ2 independently and uniformly from Fq and constructs four vector commitments:
ABLR=⟨f0,G⟩+α1H,=⟨g0,G⟩+α2H,=⟨f1,G⟩+β1H,=⟨g1,G⟩+β2H.
The scalar coefficients receive their own commitments:
VT1T2=vG+γ0H,=t1G+γ1H,=t2G+γ2H.
Thus A and B commit to the constant vectors, L and R commit to the linear coefficients, and V, T1, and T2 commit to the scalar polynomial's coefficients.
All these commitments are fixed before the verifier chooses the challenge. The commitments A, B, and V identify the statement being checked. If they already exist, the prover uses their existing openings, while generating fresh masks and blinding factors for L, R, T1, and T2. The verifier must use the intended statement commitments throughout the interaction.
Here v is committed through V. If an application claims that v equals a separately advertised public number, it must also connect V to that number, for example by verifying its opening. The four checks below relate the committed values to one another.
4. Exchange the challenge and response
The interaction has three steps.
- The prover sends the commitments. The verifier receives A, B, L, R, V, T1, and T2.
- The verifier chooses a challenge. After all commitments are fixed, the verifier uses cryptographically secure randomness to sample an unpredictable u∈Fq× uniformly from the nonzero field elements and sends it to the prover.
- The prover opens the evaluations. The prover computes the two vector evaluations, the scalar evaluation, and their combined blinding factors.
The evaluations are
ℓ(u)r(u)t(u)=f1u+f0,=g1u+g0,=t2u2+t1u+v.
The combined blinding factors follow the same polynomial weights:
πℓπrπt=α1+uβ1,=α2+uβ2,=γ0+uγ1+u2γ2.
The complete response is
(ℓ(u),r(u),t(u),πℓ,πr,πt).
Here, the π values are scalar opening information. Their role is to account for the blinding terms when commitments are combined.
The prover must reject a zero challenge: it would give ℓ(0)=f0 and r(0)=g0, directly disclosing both constant vectors. The prover must also answer at most one challenge for each set of masks. Two distinct challenges with the same linear polynomial reveal its coefficients by interpolation.
5. Check the scalar polynomial commitment
The verifier first checks
t(u)G+πtH=V+uT1+u2T2.
Why does this hold for the intended construction? Expand the right-hand side:
V+uT1+u2T2=(vG+γ0H)+u(t1G+γ1H)+u2(t2G+γ2H)=(v+ut1+u2t2)G+(γ0+uγ1+u2γ2)H=t(u)G+πtH.
Equivalently, subtracting the combined blinding term yields
V+uT1+u2T2−πtH=(v+ut1+u2t2)G=t(u)G.
This check connects the submitted scalar evaluation to the committed coefficients.
6. Check the two vector commitments
The verifier performs an analogous check for each vector evaluation.
The right vector
The right-vector equation is
⟨r(u),G⟩+πrH=B+uR.
Expanding the commitments gives
B+uR=⟨g0,G⟩+α2H+u(⟨g1,G⟩+β2H)=⟨g0+ug1,G⟩+(α2+uβ2)H=⟨r(u),G⟩+πrH.
After subtracting the blinding term, the same calculation reads
B+uR−πrH=⟨g0,G⟩+u⟨g1,G⟩=⟨r(u),G⟩.
The left vector
The left-vector equation is
⟨ℓ(u),G⟩+πℓH=A+uL.
Its expansion follows the same pattern:
A+uL=⟨f0,G⟩+α1H+u(⟨f1,G⟩+β1H)=⟨f0+uf1,G⟩+(α1+uβ1)H=⟨ℓ(u),G⟩+πℓH.
Subtracting the blinding term gives
A+uL−πℓH=⟨f0,G⟩+u⟨f1,G⟩=⟨ℓ(u),G⟩.
Both vector checks rely on the linearity of the commitment: the vector entries and their blinding factors combine with the same weights.
7. Check the inner-product relation
The final check connects the two opened vectors to the opened scalar:
t(u)=⟨ℓ(u),r(u)⟩.
Start with the scalar polynomial:
t(u)=t2u2+t1u+v=⟨f1,g1⟩u2+(⟨f0,g1⟩+⟨f1,g0⟩)u+⟨f0,g0⟩.
Now expand the inner product of the evaluated vectors independently:
⟨ℓ(u),r(u)⟩=⟨f1u+f0,g1u+g0⟩=⟨f1,g1⟩u2+⟨f1,g0⟩u+⟨f0,g1⟩u+⟨f0,g0⟩.
The quadratic terms agree. The two linear terms agree after collecting them. The constant terms also agree. Therefore, an honestly constructed response satisfies
t(u)=⟨ℓ(u),r(u)⟩.
8. What the verifier accepts
The verifier accepts only when all four equations hold:
t(u)G+πtH⟨r(u),G⟩+πrH⟨ℓ(u),G⟩+πℓH⟨ℓ(u),r(u)⟩=V+uT1+u2T2,=B+uR,=A+uL,=t(u).
The first three equations connect the evaluations to the previously sent commitments. The fourth checks the relation between those evaluations.
This derivation establishes completeness: when the prover constructs the commitments and responses as described, every check succeeds. Soundness, knowledge extraction, and zero knowledge require separate arguments. The response here also includes both full vectors, so the construction as written has communication that grows linearly with the vector length. Replacing those explicit vectors with a logarithmic inner-product argument is a separate construction.
The central algebraic observation is that the same challenge weights apply to the values, their commitments, and their blinding factors. That shared structure lets the verifier check each opening and then compare the resulting inner product.
Editorial note: This post adapts the three-page handwritten inner-product notes. The polynomial initially called h is written consistently as t. The blinding generator is renamed H to distinguish it from commitment B, and the left-vector expansion uses β1, matching the definition of L. The original cross term ⟨g0,f1⟩ is written equivalently as ⟨f1,g0⟩. The review also makes fresh randomness, statement binding, and the nonzero, single-response challenge rule explicit. These operational clarifications extend the notes without changing their algebra.