The Bulletproofs paper introduces a log-sized inner-product argument and thereafter constructs the state-of-the-art range proof protocol in non-trusted setup setting.
We will discuss the inner-product argument and how it motivated the idea of recursive proof systems like Halo.
We assume basic familiarity of the reader with elliptic curve group operations and Pedersen commitments.
Introduction
Suppose you have some secret information (say, passkeys to two lockers) encoded in a couple of vectors a,b.
You (the prover) want to convince the government (the verifier) that you are the owner of those lockers, so naturally you will have to prove that you know the vectors a,b. But you cannot just reveal them for obvious reasons. Can you prove the knowledge of a,b without revealing them? The inner-product argument lets you do so such that the government would be convinved about your ownership without knowing much about your secrets.
We assume that size of the vectors a,b are a power of two, but it is fairly straghtforward to extend the analysis for cases otherwise.
The Inner-Product Argument
The inner-product argument proves the knowledge of witness vectors a,b∈Fqn given a Pedersen vector commitment P∈G to a,b and the inner product c=⟨a,b⟩∈Fq.
The following relation proves describes the inner-product argument in a mathematical form.
LIP(σ)={statementg,h∈Gn,P∈G,c∈Zq;witnessa,b∈Zqn∣∣∣∣∣relationP=ga⋅hb⋅uc∧c=⟨a,b⟩}
where the common reference stringσ contains the public information g,h∈Gn,u∈G.
To construct the inner-product argument, we first split the secret vectors into half,
a=(a1,a1),b=(b1,b1)
where the red vector denotes the left half while the blue denotes right half.
The 1 in the subscript denotes the step number in recursion.
We now compute Pedersen vector commitments to (a1,b1) and (a1,b1). Note that we can split the base vectors too as g=(g1,g1),h=(h1,h1) and use them to compute:
L1=g1a1⋅h1b1⋅u⟨a1,b1⟩,R1=g1a1⋅h1b1⋅u⟨a1,b1⟩.
We send L1,R1∈G to the verifier. The verifier sends back a challenge scalar x1∈Fq.
For the next round, we (as well as the verifer) update the base vectors as the combined Pedersen commitment as
g1h1P1=g1x1−1∘g1x1∈G2n,=h1x1∘h1x1−1∈G2n,=L1x2⋅P⋅R1x−2∈G.
Notice that on substituting for L1,R1 and P, the commitment P1 has the form
P1=(g1a1⋅h1b1⋅u⟨a1,b1⟩)x12⋅(g1a1⋅g1a1⋅h1b1⋅h1b1⋅u⟨a,b⟩)⋅(g1a1⋅h1b1⋅u⟨a1,b1⟩)x1−2=g1a1+x1−2a1⋅g1x12a1+a1⋅h1b1+x12b1⋅h1x1−2b1+b1⋅ux12⟨a1,b1⟩+⟨a1,b1⟩+⟨a1,b1⟩+x1−2⟨a1,b1⟩=g1x1−1⋅(x1a1+x1−1a1)⋅g1x1⋅(x1a1+x1−1a1)⋅h1x1⋅(x1−1b1+x1b1)⋅h1x1−1⋅(x1−1b1+x1b1)⋅u⟨x1a1,x1b1⟩+⟨x1a1,x1−1b1⟩+⟨x1−1a1,x1b1⟩+⟨x1−1a1,x1−1b1⟩=(g1x1−1∘g1x1)(x1a1+x1−1a1)⋅(h1x1∘h1x1−1)(x1−1b1+x1b1)⋅u⟨(x1a1+x1−1a1),(x1−1b1+x1b1)⟩=g1(x1a1+x1−1a1)⋅h1(x1−1b1+x1b1)⋅u⟨(x1a1+x1−1a1),(x1−1b1+x1b1)⟩
Therefore, P1 is in fact the Pedersen commitment to the quantities
a1b1=(x1⋅a1+x1−1⋅a1)∈Fq2n=(x1−1⋅b1+x1⋅b1)∈Fq2n.
Note that we could send the vectors (a1,b1) to the verifier and she could verify (and be convinced about our knowledge of vectors (a,b) without actually knowing them!) the last equality above, but this results in prover communication to be n field elements. We wish to reduce it to logarithmic in n.
With that in mind, we can now repeat the above process with the new secrets (a1,b1), bases (g1,h1) and commitment P1. We can keep doing so until the size of the new bases is 1. In this process, the verifier would have sent l=log2(n) challenges, viz. (x1,x2,…,xl) and we would have sent (L1,R1,L2,R2,…,Ll,Rl)∈G2l elements.
For the last round, we send the elements (alast,blast)∈Fq2 and all the verifier has to check is
Plast=?glastalast⋅hlastblast⋅ualast⋅blast(1)
where Plast,glast,hlast can be computed by the verifier from all the information she has in the previous l rounds!
Thus, the total prover communication would then be 2log2(n) group elements plus 2 field elements.
Prover and Verifier Costs
In the i-th round, the prover computes Li,Ri∈G and base vectors gi,hi∈G2in.
This amounts to 2 group exponentiations of size 2⋅2in+1 and 2 group exponentiations of size 2⋅2in, so a total of 2i−3n+2 group exponentiations. In total, the prover would need 8(n−1) group exponentiations. Since field operations are typically orders of magnitude faster than group exponentiations, we consider the costs only due to group exponentiations.
On the other hand, the verifier only needs to validate equation (1) in the last round.
All she needs for validation is to compute glast,hlast and Plast.
Note that glast,hlast would depend only on the challenges (x1,x2,…,xl).
Let us try to compute the base vector g2 for round 2 for n=8.
g1g2glast=g3=g1x1−1∘g1x1∈G2n=(g1,g2,g3,g4)x1−1∘(g5,g6,g7,g8)x1=(g1x1−1g5x1,g2x1−1g6x1,g3x1−1g7x1,g4x1−1g8x1)∈G4=(g1x1−1g5x1,g2x1−1g6x1)x2−1∘(g3x1−1g7x1,g4x1−1g8x1)x2=(g1x1−1x2−1g5x1x2−1g3x1−1x2g7x1x2,g2x1−1x2−1g6x1x2−1g4x1−1x2g8x1x2)∈G2=(g1x1−1x2−1g5x1x2−1g3x1−1x2g7x1x2)x3−1∘(g2x1−1x2−1g6x1x2−1g4x1−1x2g8x1x2)x3=g1x1−1x2−1x3−1g5x1x2−1x3−1g3x1−1x2x3−1g7x1x2x3−1g2x1−1x2−1x3g6x1x2−1x3g4x1−1x2x3g8x1x2x3=g1x1−1x2−1x3−1g2x1−1x2−1x31g3x1−1x21x3−1g4x1−1x21x31g5x11x2−1x3−1g6x11x2−1x31g7x11x21x3−1g8x11x21x31∈G
Note the following pattern in the powers of challenges (x1,x2,x3).
generator
powers of (x1,x2,x3)
binary form
decimal
g1
−1,−1,−1
000
0
g2
−1,−1,1
001
1
g3
−1,1,−1
010
2
g4
−1,1,1
011
3
g5
1,−1,−1
100
4
g6
1,−1,1
101
5
g7
1,1,−1
110
6
g8
1,1,1
111
7
Similarly, we can compute hlast with a difference that the powers of the challenges in the exponent get inverted.
hlast=h3=h1x11x21x31h2x11x21x3−1h3x11x2−1x31h4x11x2−1x3−1h5x1−1x21x31h6x1−1x21x3−1h7x1−1x2−1x31h8x1−1x2−1x3−1∈G
The ghastly looking expressions for glast and hlast (for even n=3) can be written in a much simpler form as
glast=i=1∏ngisi,hlast=i=1∏nhisi−1,
such that
si=j=1∏lxjb(i,j), where b(i,j)={1−1if the j-th bit of (i−1) is 1otherwise.
On a similar note, we can compute Plast as
P2∴Plast=L2x22⋅P1⋅R2x2−2=L2x22⋅(L1x12⋅P⋅R1x1−2)⋅R2x2−2=L2x22⋅L1x12⋅P⋅R1x22⋅R2x12=(Llxl2⋅…⋅L2x22⋅L1x12)⋅P⋅(R1x22⋅R2x12⋅…⋅Rlxl2)=P⋅(j=1∏lLjxj2⋅Rjxj−2)
Therefore from (1), the verification of an inner-product argument boils to a single multi-exponentiation check of size (2n+2l+1)P⋅(j=1∏lLjxj2⋅Rjxj−2)=?ga⋅s⋅hb⋅s−1⋅ua⋅b
where s=(s1,s2,…,sn).
Closing Comments
The log-sized inner-product in a non-trusted setup was an important breakthrough in applied cryptography research.
For cryptocurrencies like Monero, the inner-product powered range proof protocol bulletproofs helped reduce the transaction sizes by a whopping 80%1.
The downside, however, of the inner-product argument is the linear verification times in spite of aggregated proof verification, causing practical bottlenecks for deployment for large arithmetic circuits.
Nevertheless, the inner-product argument opened up avenues for future research in the direction of recursive proofs.
Stay tuned to understand how the beautiful technique of inner-product argument helped in construction of Halo.