From IPA to Bulletproofs

2024-02-08 06:20
文章标签 ipa bulletproofs

本文主要是介绍From IPA to Bulletproofs,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Inner product argument (IPA)

Construction of IPA

Public parameter: g , h ∈ G n \mathbf{g}, \mathbf{h} \in \mathbb{G}^n g,hGn
Prover input: a , b ∈ F p n \mathbf{a}, \mathbf{b} \in \mathbb{F}_p^n a,bFpn
Verifier input: C a = g a C_a = \mathbf{g}^{\mathbf{a}} Ca=ga, C b = h b C_b = \mathbf{h} ^ {\mathbf{b}} Cb=hb, c ∈ F p c \in \mathbb{F}_p cFp

To prove ⟨ a , b ⟩ = c \langle \mathbf{a}, \mathbf{b} \rangle = c a,b=c, the main idea is using a random challenge to fold the vector of length n n n into a vector of length n / 2 n/2 n/2, and recursively make inner product argument for vectors of length n / 2 n/2 n/2. Until the length is 1 1 1, the prover can directly send the single element to verifier.

The vector a \mathbf{a} a can be divided into a L ∣ ∣ a R \mathbf{a}_L || \mathbf{a}_R aL∣∣aR, where both a L \mathbf{a}_L aL and a R \mathbf{a}_R aR are of length n / 2 n / 2 n/2. So can b \mathbf{b} b be divided into b L ∣ ∣ b R \mathbf{b}_L || \mathbf{b}_R bL∣∣bR.

When combining short vectors with a random challenge x ∈ F x \in \mathbb{F} xF such that
a ′ = a L + x ⋅ a R b ′ = b L + x − 1 ⋅ b R \begin{align*} \mathbf{a'} &= \mathbf{a}_L + x \cdot \mathbf{a}_R \\ \mathbf{b'} &= \mathbf{b}_L + x^{-1} \cdot \mathbf{b}_R \end{align*} ab=aL+xaR=bL+x1bR
we can find ⟨ a ′ , b ′ ⟩ = ⟨ a L , b L ⟩ + ⟨ a R , b R ⟩ + x − 1 ⋅ ⟨ a L , b R ⟩ + x ⋅ ⟨ a R , b L ⟩ = ⟨ a , b ⟩ + x − 1 ⋅ ⟨ a L , b R ⟩ + x ⋅ ⟨ a R , b L ⟩ \langle \mathbf{a'}, \mathbf{b'} \rangle = \langle \mathbf{a}_L, \mathbf{b}_L \rangle + \langle \mathbf{a}_R, \mathbf{b}_R \rangle + x^{-1} \cdot \langle \mathbf{a}_L, \mathbf{b}_R \rangle + x \cdot \langle \mathbf{a}_R, \mathbf{b}_L \rangle = \langle \mathbf{a}, \mathbf{b} \rangle + x^{-1} \cdot \langle \mathbf{a}_L, \mathbf{b}_R \rangle + x \cdot \langle \mathbf{a}_R, \mathbf{b}_L \rangle a,b=aL,bL+aR,bR+x1aL,bR+xaR,bL=a,b+x1aL,bR+xaR,bL.

Prover can send ⟨ a L , b R ⟩ \langle \mathbf{a}_L, \mathbf{b}_R \rangle aL,bR, ⟨ a R , b L ⟩ \langle \mathbf{a}_R, \mathbf{b}_L \rangle aR,bL before receiving the challenge. Now, there is a problem to get commitment of g ′ a ′ \mathbf{g'}^{\mathbf{a'}} ga, h ′ b ′ \mathbf{h'}^{\mathbf{b'}} hb.

Since verifer has g L a L ⋅ g R a R \mathbf{g}_L^{\mathbf{a}_L} \cdot \mathbf{g}_R ^ {\mathbf{a}_R} gLaLgRaR at the beginning, prover can send g L a R \mathbf{g}_L^{\mathbf{a}_R} gLaR and g R a L \mathbf{g}_R^{\mathbf{a}_L} gRaL, so that verifier can construct
g ′ a ′ = g ′ a L + x ⋅ a R = g L a L + x ⋅ a R ⋅ ( g R x − 1 ) a L + x ⋅ a R = ( g L a R ) x ( g L a L ⋅ g R a R ) ( g R a L ) x − 1 \begin{align*} \mathbf{g'}^{\mathbf{a'}} &= \mathbf{g'}^{\mathbf{a}_L + x \cdot \mathbf{a}_R} \\ &= \mathbf{g}_L ^{\mathbf{a}_L + x \cdot \mathbf{a}_R} \cdot (\mathbf{g}_R^{x^{-1}})^{\mathbf{a}_L + x \cdot \mathbf{a}_R} \\ &= (\mathbf{g}_L^{\mathbf{a}_R})^x (\mathbf{g}_L^{\mathbf{a}_L} \cdot \mathbf{g}_R ^ {\mathbf{a}_R}) (\mathbf{g}_R^{\mathbf{a}_L})^{x^{-1}} \end{align*} ga=gaL+xaR=gLaL+xaR(gRx1)aL+xaR=(gLaR)x(gLaLgRaR)(gRaL)x1
with random challenge x x x. The construction of h ′ b ′ \mathbf{h'}^{\mathbf{b'}} hb is almost the same.

Here we show the construction of g ′ a ′ \mathbf{g'}^{\mathbf{a'}} ga is natural. Given vector v = ( g L a L , g L a R , g R a L , g R a R ) \mathbf{v} = (\mathbf{g}_L^{\mathbf{a}_L}, \mathbf{g}_L^{\mathbf{a}_R}, \mathbf{g}_R^{\mathbf{a}_L}, \mathbf{g}_R^{\mathbf{a}_R}) v=(gLaL,gLaR,gRaL,gRaR), the original C a C_a Ca can be regarded as inner product ( 1 , 0 , 0 , 1 ) (1, 0, 0, 1) (1,0,0,1) with v \mathbf{v} v, details neglected. Our objectivity is constructing inner product μ ( 1 , x , 0 , 0 ) + λ ( 0 , 0 , 1 , x ) \mu (1, x, 0, 0) + \lambda (0, 0, 1, x) μ(1,x,0,0)+λ(0,0,1,x) with v \mathbf{v} v, so choosing g L a R \mathbf{g}_L^{\mathbf{a}_R} gLaR, which is ( 0 , 1 , 0 , 0 ) (0, 1, 0, 0) (0,1,0,0) and g R a L \mathbf{g}_R^{\mathbf{a}_L} gRaL, which is ( 0 , 0 , 1 , 0 ) (0, 0, 1, 0) (0,0,1,0) is a really natural thought.
( 1 0 0 1 0 1 0 0 0 0 1 0 ) ⋅ ( 1 x x − 1 ) = ( 1 x x − 1 1 ) \left( \begin{matrix} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{matrix} \right) \cdot \left( \begin{matrix} 1 \\ x \\ x^{-1} \end{matrix} \right) = \left( \begin{matrix} 1 \\ x \\ x^{-1} \\ 1 \end{matrix} \right) 100010001100 1xx1 = 1xx11

Realistic IPA

In practice, the commited vector also has a random mask, and the inner product result may also be a secret. That is, Given commitments C a = u ρ a g a C_a = u^{\rho_a} \mathbf{g}^{\mathbf{a}} Ca=uρaga, C b = u ρ b h b C_b = u^{\rho_b} \mathbf{h}^{\mathbf{b}} Cb=uρbhb, C 0 = u ρ 0 g c C_0 = u^{\rho_0} g^{c} C0=uρ0gc, verifer need to be convinced that ⟨ a , b ⟩ = c \langle a, b \rangle = c a,b=c.

Prover can only change to send Pedersen commitments of ⟨ a L , b R ⟩ \langle \mathbf{a}_L, \mathbf{b}_R \rangle aL,bR, ⟨ a R , b L ⟩ \langle \mathbf{a}_R, \mathbf{b}_L \rangle aR,bL, instead of send them directly.

We also remark a trivial construction of IPA of a committed vector with a public vector can be derived, since verifier can construct commitment from public values on his own.

Add zero-knowledge

Previous construction doesn’t hold zero knowledge property. For example, an adversary knows the committed vector C a C_a Ca is either a 1 \mathbf{a}_1 a1 or a 2 \mathbf{a}_2 a2. He can simulate the folding procedure of two vectors with challenges each round, and checking the final folded result to discern a 1 \mathbf{a}_1 a1 or a 2 \mathbf{a}_2 a2.

We directly discuss the hardest problem: prove inner product result of two commited vectors a \mathbf{a} a, b \mathbf{b} b equals a committed value c 0 c_0 c0. To obtain a zero knowledge IPA, prover can use random vectors to mask secret vectors.

Before the first round, prover randomly choose s , t ∈ F p n , ρ s , ρ t ∈ F p \mathbf{s}, \mathbf{t} \in \mathbb{F}_p^n, \rho_s, \rho_t \in \mathbb{F}_p s,tFpn,ρs,ρtFp and commit C s = C o m ( s ; ρ s ) = u ρ s g s C_s = Com(\mathbf{s}; \rho_s) = u^{\rho_s}\mathbf{g}^{\mathbf{s}} Cs=Com(s;ρs)=uρsgs, C t = C o m ( t ; ρ t ) = u ρ t h t C_t = Com(\mathbf{t}; \rho_t) = u^{\rho_t}\mathbf{h}^{\mathbf{t}} Ct=Com(t;ρt)=uρtht to verifier.

Define l ( X ) = a + s ⋅ X l(X) = \mathbf{a} + \mathbf{s} \cdot X l(X)=a+sX r ( X ) = b + t ⋅ X r(X) = \mathbf{b} + \mathbf{t} \cdot X r(X)=b+tX. Define ⟨ l ( X ) , r ( X ) ⟩ = ⟨ a , b ⟩ + ( ⟨ s , b ⟩ + ⟨ a , t ⟩ ) X + ⟨ s , t ⟩ X 2 = c 0 + c 1 X + c 2 X 2 \langle l(X), r(X) \rangle = \langle \mathbf{a}, \mathbf{b} \rangle + (\langle \mathbf{s}, \mathbf{b} \rangle + \langle \mathbf{a}, \mathbf{t} \rangle) X + \langle \mathbf{s}, \mathbf{t} \rangle X^2 = c_0 + c_1 X + c_2 X^2 l(X),r(X)⟩=a,b+(⟨s,b+a,t⟩)X+s,tX2=c0+c1X+c2X2. For random x x x, prover can commit c 1 , c 2 c_1, c_2 c1,c2 and prove ⟨ l ( x ) , r ( x ) ⟩ = c 0 + c 1 x + c 2 x 2 \langle l(x), r(x) \rangle = c_0 + c_1 x + c_2 x^2 l(x),r(x)⟩=c0+c1x+c2x2.

More precisely, besides commitment C s C_s Cs and C t C_t Ct, prover also commit C 1 = C o m ( c 1 ; ρ 1 ) = u ρ 1 g c 1 C_1 = Com(c_1; \rho_1) = u^{\rho_1} g^{c_1} C1=Com(c1;ρ1)=uρ1gc1 and C 2 = C o m ( c 2 ; ρ 2 ) = u ρ 2 g c 2 C_2 = Com(c_2; \rho_2) = u^{\rho_2} g^{c_2} C2=Com(c2;ρ2)=uρ2gc2. After that, verifier sends random challenge x x x and prover proves ⟨ a + x s , b + x t ⟩ = c 0 + c 1 x + c 2 x 2 \langle \mathbf{a} + x\mathbf{s}, \mathbf{b} + x\mathbf{t}\rangle = c_0 + c_1 x + c_2 x^2 a+xs,b+xt=c0+c1x+c2x2 through IPA scheme. Due to homomorphism of Pedersen commitment, previous commitments ensure verifier can compute commitments of random linear combined vectors and inner product result.

Proof size

Each round, prover send pedersen commitment of ⟨ a L , b R ⟩ \langle \mathbf{a}_L, \mathbf{b}_R \rangle aL,bR, ⟨ a R , b L ⟩ \langle \mathbf{a}_R, \mathbf{b}_L \rangle aR,bL, and g L a R \mathbf{g}_L^{\mathbf{a}_R} gLaR, g R a L \mathbf{g}_R^{\mathbf{a}_L} gRaL, h L b R \mathbf{h}_L^{\mathbf{b}_R} hLbR, h R b L \mathbf{h}_R^{\mathbf{b}_L} hRbL. So the proof size is 6 log ⁡ n + O ( 1 ) 6\log n + O(1) 6logn+O(1).

Prover complexity is obvious O ( n ) O(n) O(n) and verifier complexity is also O ( n ) O(n) O(n), since verifier have to compute g ′ \mathbf{g'} g and h ′ \mathbf{h'} h each round, which incurs linear complexity.

Range proof

Zero knowledge IPA proposed above can be used to construct range proof, which plays an important role in confidential transactions (CT).

Take an example in Bitcoin. Alice wants to transfer 5 bucks to Bob, and she holds a UXTO, whose amout of money is committed use Pedersen commitment, denoted as C = u ρ g m C = u^{\rho}g^m C=uρgm. Subtract 5 bucks, her new UTXO’s commitment should be C ′ = C / g 5 = u ρ g m − 5 C' = C / g^{5} = u^{\rho}g^{m - 5} C=C/g5=uρgm5. However, if m < 5 m < 5 m<5, the transaction should not be allowed, but Alice don’t want to leak her UTXO’s money amount. Proving money amout represented by C ′ C' C belongs to [ 0 , N ] [0, N] [0,N] is range proof. Notice that N N N should smaller half of ∣ F p ∣ |\mathbb{F}_p| Fp.

To prove u ρ g m u^{\rho} g^m uρgm represents a m m m falls in [ 0 , 2 n − 1 ] [0, 2^n - 1] [0,2n1], prover first decomposes m m m into a bit vector a ∈ F p n \mathbf{a} \in \mathbb{F}_p^n aFpn such that ⟨ a , 2 n ⟩ = m \langle \mathbf{a}, \mathbf{2}^n \rangle = m a,2n=m, a ∘ ( a − 1 n ) = 0 n \mathbf{a} \circ (\mathbf{a} - \mathbf{1}^n) = \mathbf{0}^n a(a1n)=0n, where k n = ( 1 , k , k 2 , ⋯ , k n − 1 ) \mathbf{k}^n = (1, k, k^2, \cdots, k^{n-1}) kn=(1,k,k2,,kn1).

The hadamard product a ∘ ( a − 1 n ) = 0 n \mathbf{a} \circ (\mathbf{a} - \mathbf{1}^n) = \mathbf{0}^n a(a1n)=0n can be transformed into ⟨ a ∘ ( a − 1 n ) , y n ⟩ = ⟨ a , ( a − 1 n ) ∘ y n ⟩ = 0 \langle \mathbf{a} \circ (\mathbf{a} - \mathbf{1}^n), \mathbf{y}^n \rangle = \langle \mathbf{a}, (\mathbf{a} - \mathbf{1}^n) \circ \mathbf{y}^n \rangle = 0 a(a1n),yn=a,(a1n)yn=0.

Given the commitment of g a \mathbf{g}^{\mathbf{a}} ga, the commitment of ( a ) ∘ y n (\mathbf{a}) \circ \mathbf{y}^n (a)yn can be derived from setting h = g ( 1 / y ) n \mathbf{h} = \mathbf{g}^{(\mathbf{1/y})^n} h=g(1/y)n. Then
C o m ( a ∘ y n ) = h a ∘ y n = g ( 1 / y ) n ∘ a ∘ y n = g a = C o m ( a ) \begin{align*} Com(\mathbf{a} \circ \mathbf{y}^n) &= \mathbf{h}^{\mathbf{a} \circ \mathbf{y}^n} \\ &= \mathbf{g}^{(\mathbf{1/y})^n \circ \mathbf{a} \circ \mathbf{y}^n} \\ &= \mathbf{g}^{\mathbf{a}} = Com(\mathbf{a}) \end{align*} Com(ayn)=hayn=g(1/y)nayn=ga=Com(a)

After sending commitment C a = u ρ a g a C_a = u^{\rho_a}\mathbf{g}^\mathbf{a} Ca=uρaga and receiving random challenges y , z ∈ F p y, z \in \mathbb{F}_p y,zFp, prover use zkIPA to prove ⟨ a , 2 n + z ⋅ ( a − 1 n ) ⟩ = m \langle \mathbf{a}, \mathbf{2}^n + z \cdot (\mathbf{a} - \mathbf{1}^n) \rangle = m a,2n+z(a1n)⟩=m.

The total proof size is also 6 log ⁡ n + O ( 1 ) 6\log n + O(1) 6logn+O(1).

Bulletproofs

Bulletproofs mainly aims to deal with range proof with a smaller proof size. The main idea is commit a \mathbf{a} a and a − 1 n \mathbf{a} - \mathbf{1}^n a1n simultaneously.

Inner product argument

Different from IPA defined previously, Bulletproofs IPA commits two vector together instead of independently in the statement. Specifically, it proves the following relation:
( g , h ∈ G n , u , P ∈ G ; a , b ∈ F p n ) (\mathbf{g}, \mathbf{h} \in \mathbb{G}^n, u, P \in \mathbb{G}; \mathbf{a}, \mathbf{b} \in \mathbb{F}_p^n) (g,hGn,u,PG;a,bFpn)
such that P = g a h b ⋅ u ⟨ a , b ⟩ P = \mathbf{g}^{\mathbf{a}} \mathbf{h}^{\mathbf{b}} \cdot u^{\langle \mathbf{a}, \mathbf{b} \rangle} P=gahbua,b, where g , h , u , P \mathbf{g}, \mathbf{h}, u, P g,h,u,P are public instance, a , b \mathbf{a}, \mathbf{b} a,b are witness.

Similar with previous IPA, it folds vectors with random challenge into half in each round. Although previous scheme also applies, we will follow the folding result in Bulletproofs paper,
a ′ = x a L + x − 1 a R b ′ = x − 1 b L + x b R \begin{align*} \mathbf{a'} &= x \mathbf{a}_L + x^{-1} \mathbf{a}_R \\ \mathbf{b'} &= x^{-1} \mathbf{b}_L + x \mathbf{b}_R \end{align*} ab=xaL+x1aR=x1bL+xbR
Define H ( v 1 , v 2 , v 3 , v 4 , v ) = g L v 1 ⋅ g R v 2 ⋅ h L v 3 ⋅ h R v 4 ⋅ u v H(\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4, v) = \mathbf{g}_L^{\mathbf{v}_1} \cdot \mathbf{g}_R^{\mathbf{v}_2} \cdot \mathbf{h}_L^{\mathbf{v}_3} \cdot \mathbf{h}_R^{\mathbf{v}_4} \cdot u^v H(v1,v2,v3,v4,v)=gLv1gRv2hLv3hRv4uv
This time, prover firsly commit L , R L, R L,R to verifier, where
L = H ( 0 a L b R 0 ⟨ a L , b R ⟩ ) R = H ( a R 0 0 b L ⟨ a R , b L ⟩ ) P = H ( a L a R b L b R ⟨ a , b ⟩ ) \begin{matrix*} L = H(& \mathbf{0} & \mathbf{a}_L & \mathbf{b}_R & \mathbf{0} & \langle \mathbf{a}_L, \mathbf{b}_R \rangle &) \\ R = H(& \mathbf{a}_R & \mathbf{0} & \mathbf{0} & \mathbf{b}_L & \langle \mathbf{a}_R, \mathbf{b}_L \rangle &) \\ P = H(& \mathbf{a}_L & \mathbf{a}_R & \mathbf{b}_L & \mathbf{b}_R & \langle \mathbf{a}, \mathbf{b} \rangle &) \end{matrix*} L=H(R=H(P=H(0aRaLaL0aRbR0bL0bLbRaL,bRaR,bLa,b)))

Verifier can compute
L x 2 ⋅ P ⋅ R x − 2 = H ( x − 1 a ′ , x a ′ , x b ′ , x − 1 b ′ , ⟨ a ′ , b ′ ⟩ ) = ( g L x − 1 ∘ g R x ) a ′ ⋅ ( h L x ∘ h R x − 1 ) b ′ ⋅ u ⟨ a ′ , b ′ ⟩ L^{x^2} \cdot P \cdot R^{x^{-2}} = H(x^{-1} \mathbf{a'}, x \mathbf{a'}, x \mathbf{b'}, x^{-1}\mathbf{b'}, \langle \mathbf{a'}, \mathbf{b'} \rangle) = \left(\mathbf{g}_L^{x^{-1}} \circ \mathbf{g}_R^{x}\right) ^ {\mathbf{a'}} \cdot \left(\mathbf{h}_L^{x} \circ \mathbf{h}_R^{x^{-1}}\right) ^ {\mathbf{b'}} \cdot u^{\langle \mathbf{a'}, \mathbf{b'} \rangle} Lx2PRx2=H(x1a,xa,xb,x1b,a,b⟩)=(gLx1gRx)a(hLxhRx1)bua,b
Thus, the witness is halved. After log ⁡ n \log n logn rounds, it will be reduced to only 2 2 2 element. Proof size is only 2 group element each round, so total proof size is 2 log ⁡ n + O ( 1 ) 2\log n + O(1) 2logn+O(1), only 1/3 campared to previous IPA.

A proof of relation below can be constructed utilizing this inner product argument.

( g , h ∈ G n , P ∈ G , c ∈ F p ; a , b ∈ F p n ) (\mathbf{g}, \mathbf{h} \in \mathbb{G}^n, P \in \mathbb{G}, c \in \mathbb{F}_p; \mathbf{a}, \mathbf{b} \in \mathbb{F}_p^n) (g,hGn,PG,cFp;a,bFpn)
such that P = g a h b P = \mathbf{g}^{\mathbf{a}} \mathbf{h}^{\mathbf{b}} P=gahb and c = ⟨ a , b ⟩ c = \langle \mathbf{a}, \mathbf{b} \rangle c=a,b.

在这里插入图片描述

Range proof

In Bulletproofs range proof, prover commit bit decomposition of secret value a L \mathbf{a}_L aL and a R = a L − 1 n \mathbf{a}_R = \mathbf{a}_L - \mathbf{1}^n aR=aL1n together as A = r α g a L h a R A = r^{\alpha} \mathbf{g}^{\mathbf{a}_L} \mathbf{h}^{\mathbf{a}_R} A=rαgaLhaR. The secret value is committed as V = r γ g v V = r^{\gamma} g^v V=rγgv.

We need to prove three equations below
⟨ a L , 2 n ⟩ = v , ⟨ a L , a R ∘ y n ⟩ = 0 , a L = a R + 1 n \langle \mathbf{a}_L, \mathbf{2}^n\rangle = v, \qquad \langle \mathbf{a}_L, \mathbf{a}_R \circ \mathbf{y}^n \rangle = 0, \qquad \mathbf{a}_L = \mathbf{a}_R + \mathbf{1}^n aL,2n=v,aL,aRyn=0,aL=aR+1n

Only the second equation is easy to prove through Bulletproofs IPA directly, by setting h ′ = h ( 1 / y ) n \mathbf{h'} = \mathbf{h}^{(\mathbf{1/y})^n} h=h(1/y)n. The first and third isn’t quite simple.

However, due to ⟨ a L , a R ⟩ = 0 \langle \mathbf{a}_L, \mathbf{a}_R \rangle = 0 aL,aR=0, the first equation can be transformed into ⟨ a L , a R + z ⋅ 2 n ⟩ = z ⋅ v \langle \mathbf{a}_L, \mathbf{a}_R + z \cdot \mathbf{2}^n \rangle = z \cdot v aL,aR+z2n=zv for random z z z, which can prove straightforwardly. And the third equation can be transformed into ⟨ a L − a R − 1 n , y n ⟩ = 0 \langle \mathbf{a}_L - \mathbf{a}_R - \mathbf{1}^n, \mathbf{y}^n \rangle = 0 aLaR1n,yn=0 for random y y y, and it can be then transformed into
⟨ a L − 1 n , y n ∘ ( a R + 1 n ) ⟩ = ⟨ a L , y n ∘ a R ⟩ + ⟨ a L , y n ⟩ − ⟨ a R , y n ⟩ − ⟨ 1 n , y n ⟩ = ⟨ a L , y n ⟩ − ⟨ a R , y n ⟩ − ⟨ 1 n , y n ⟩ = ⟨ a L − a R − 1 n , y n ⟩ = 0 \begin{align*} \langle \mathbf{a}_L - \mathbf{1}^n, \mathbf{y}^n \circ (\mathbf{a}_R + \mathbf{1}^n) \rangle &= \langle \mathbf{a}_L, \mathbf{y}^n \circ \mathbf{a}_R \rangle + \langle \mathbf{a}_L, \mathbf{y}^n\rangle - \langle \mathbf{a}_R, \mathbf{y}^n\rangle - \langle \mathbf{1}^n, \mathbf{y}^n\rangle \\ &= \langle \mathbf{a}_L, \mathbf{y}^n\rangle - \langle \mathbf{a}_R, \mathbf{y}^n\rangle - \langle \mathbf{1}^n, \mathbf{y}^n\rangle = \langle \mathbf{a}_L - \mathbf{a}_R - \mathbf{1}^n, \mathbf{y}^n \rangle = 0 \end{align*} aL1n,yn(aR+1n)⟩=aL,ynaR+aL,ynaR,yn1n,yn=aL,ynaR,yn1n,yn=aLaR1n,yn=0

Up till now, we show three equations in range proof can be proved independently. As usual, they can be prove together through random linear combination. So the total prove size is only 2 log ⁡ n + O ( 1 ) 2\log n + O(1) 2logn+O(1).

We can see the bulletproofs now isn’t zero-knowledge. This problem can be easily dealt with by utilizating techniques in construction of zero knowlodge IPA. Detailed protocol can be seen in the whole paper.

Prover can aggregate multiple range proofs for m m m committed values. It’s straightforward that we can use a vector of length m ⋅ n m \cdot n mn to binary represent all m m m values. Proof size of aggregating range proof is log ⁡ ( m ⋅ n ) + O ( 1 ) \log (m \cdot n) + O(1) log(mn)+O(1).

Remarks

IPA of two commited vectors

Can we construct an IPA of two commited vectors through Bulletproofs IPA? It can reduce proof size of IPA to only 2 log ⁡ n + O ( 1 ) 2\log n + O(1) 2logn+O(1). Here’s my failure attempt below.

Given C a = g a , C b = h b , c = ⟨ a , b ⟩ C_a = \mathbf{g}^{\mathbf{a}}, C_b = \mathbf{h}^{\mathbf{b}}, c = \langle \mathbf{a}, \mathbf{b} \rangle Ca=ga,Cb=hb,c=a,b,verifier sends challenge x x x,then using Bulletproofs IPA prove knowledge of a ′ , b ′ \mathbf{a'}, \mathbf{b'} a,b such that u x , P = C a C b x u x 2 ⋅ c u^{x}, P = C_a C_b^x u^{x^2 \cdot c} ux,P=CaCbxux2c. Completeness holds since a ′ = a \mathbf{a'} = \mathbf{a} a=a, b ′ = x b \mathbf{b'} = x\mathbf{b} b=xb satisfy the relation.

However, soundness doesn’t hold. A simple counterexample is prover set C a = h b C_a = \mathbf{h}^{\mathbf{b}} Ca=hb, C b = g a C_b = \mathbf{g}^{\mathbf{a}} Cb=ga and c = ⟨ a , b ⟩ c = \langle \mathbf{a}, \mathbf{b} \rangle c=a,b. We can find a ′ = x a \mathbf{a'} = x\mathbf{a} a=xa, b ′ = b \mathbf{b'} = \mathbf{b} b=b satisfy the Bulletproofs IPA relation, but prover doesn’t possess a knowledge of an vector v \mathbf{v} v such that g v = C a \mathbf{g}^{\mathbf{v}} = C_a gv=Ca.

这篇关于From IPA to Bulletproofs的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/690138

相关文章

安装ipa报错:“未能同步iphone 因为这台电脑不再被授权”

问题描述: app打包完毕,准备放到真机测试,连接iTunes同步时就提示: “未能同步iphone 因为这台电脑不再被授权”。 但是授权电脑之后依旧提示“未能同步iphone 因为这台电脑不再被授权”,怎么办? 解决方案: 原来是因为装了商店以外的东西,被苹果爸比发现了。 于是删除了苹果xy,同步助手之类的软件后,就能够正常使

IOS开发之生成IPA文件并安装到越狱后的真机上

1 前言 由于工作需要,公司要求将Xcode中的项目生成IPA文件,用于版本记录,由于没有咱们木有开发者账号,所以需要另类的IPA生成和发布方式,今天折腾了一番终于搞定了,特此与大家分享。 2 操作流程 2.1 将运行时Schema设置为IOS Device,如图: 2.2 点击Product->Archive归档项目: 2.3 归档后进入到归档窗口,选择分配方

Xcode缩小ipa包大小及symbols设置等

其实被这个问题困扰了好久,不过秉承着三分钟热度的新年新气象,还是要多弄懂一点(⊙_⊙)ゞ Symbols是什么东西呢?虽然我对它没有深入的了解,但是大概知道它的作用。摘抄《深入理解计算机系统》里的一些描述: 一个典型的ELF可重定位目标文件包含下面几个节: ... ... .symtab:一个符号表,它存放在程序中定义和引用的函数和全局变量信息。一些程序员错误地认为必须通过-g选项来编

如何制作一个可以上传到fir.im的ipa文件(包含最新的Xcode打包方式)

1、拥有一个开发者账号(99美刀)2、登录苹果开发者网站,添加想要安装测试应用的设备的UDID,可以使用 fir.im 提供的的接口快速获取 UDID (fi r.im-工具-UDID获取工具)(1)添加UDID:Devices---All或者iPhoneimage1.png(2)+添加image2.png(3)Register Deviceimage3.png3、得到电脑的钥匙串左上角-钥匙串

mac安装ipa包【金铲铲为例】

mac安装ipa包 安装PlayCover 链接:https://github.com/PlayCover/PlayCover 1、点最新Releases 2、cmd + ↓,拉到最下面下载dmg 3、安装 图标拖拽到Applications里 IPA下载 以金铲铲为例,良心砸壳包站点,有能力可以支持一下 苹果iOS【金铲铲之战】IPA下载 - IPA商店 点击下载,网盘三选一,我选

iOS 获取App的ipa包以及资源文件

本文介绍两种工具,用于Mac获取App Store线上项目的ipa包 1、iTunes; 2、Apple Configurator; 前言 Mac在iTunes 12.7中取消了App Store应用商店模块,这也就意味着不能从iTunes中安装或者获取应用的ipa包。 那么问题来了,现在想获取某App的ipa包,该怎么办呢? 本文介绍两种办法,可以让你轻松获取到ipa包,下一篇文章会写获取到

iOS 到处 ipa包的时候 会有四个选项分别代表什么

如图 在 iOS 到处 ipa包的时候 会有四个选项  1.Save for iOS App Store Deployment 保存到本地 准备上传App Store 或者在越狱的iOS设备上使用 2.Save for Ad Hoc Deployment 保存到本地 准备在账号添加的可使用设备上使用(具体为在开发者账户下添加可用设备的udid),该app包是发布证书编

App分发苹果ios内测ipa应用文件签名分发平台剖析

一、    应用分发下载速度为何快速 App内测签名分发平台能够提供快速的应用分发下载速度,主要有以下几个原因:提供的服务器带宽资源大。这些平台通常采用高性能服务器,并且拥有强大的带宽资源,能够支持高并发下载。 采用分布式技术。平台将应用文件分散存储在多个服务器上,通过负载均衡技术将用户的下载请求分配到空闲的服务器上,大大提高了下载速度。 使用内容分发网络(CDN)加速。应用分发平台通过与CDN合

IPA清洁棉签 IPA清洁擦拭棒:打印机头、电子设备等清洁的有力工具!

在数字化快速发展的今天,打印机头、电子设备等已经成为了我们日常生活和工作中不可或缺的一部分。然而,随着使用时间的增长,这些设备往往会因为灰尘、油渍等污染物的积累而影响其性能。此时,一款高效、便捷的清洁工具就显得尤为重要。IPA清洁棉签正是这样一款产品,它以其出色的清洁能力和使用便利性,成为了打印机头、电子设备等清洁的有力工具。 IPA(异丙醇)酒精清洁棉签是清洁打印机头、电子设备等精密部件的

关于xcode导出ipa的几种方式

1.方式一       1,编译:   Product -> Archive       2,导出:   Window -> Organizer (Command + Shift +2) -> Archives ->Distribute..    如图:根据需要3选1       二.方式2