Jens Groth 2010年论文《A Verifiable Secret Shuffle of Homomorphic Encryptions》的思路为: Common Input: public commitment key ck。【length为N+1】 Prover’s witness: permutation π∈∑N。 证明:在不暴露permutation π的前提下,Verifier给challenge(s),Prover respond,Verifier需验证:Prover确实知道某permutation π;Prover respond的消息内采用了相同的permutation π。
1)Prover:对permutation π进行commit c=comck=(π(1),⋯,π(N);r),其实就是对数字1,⋯,N的permutation commit。只需证明c为a commit to a permutation of the numbers 1,⋯,N,这样就可以保证the prover is bound to some permutation he knows, but the permutation remains hidden. 同时选N个随机数−d1,⋯,−dN用于保护permutation π不被reveal,对这些随机数进行commit cd=comck(−d1,⋯,−dN;rd)。 将c和cd发送给Verifier。 2)Verifier:Challenges t1,⋯,tN。【length为N】 3)Prover:对收到的t1,⋯,tN按相同的permutation π进行permute,计算si=tπ(i)+di。Prover给Verifier发送s1,⋯,sN。【length为N】 4)Prover:提供证明si have been formed correctly, using the same permutation π that used to form c。 Common Input: ck、c、cd、(s1,⋯,sN)以及t1,⋯,tN。 Prover’s witness: permutation π∈∑N。 证明:s1,⋯,sN中的permutation π和commitment c中的permutation π是相同的。
Verifier:challenge λ
Common input:构建向量(m1,⋯,mN)=(λ⋅1+t1,⋯,λ⋅N+tN)(构建依据为c为a commit to a permutation of the numbers 1,⋯,N)。
Prover: (1)利用witness permutation π构建向量(mπ(1),⋯,mπ(N))=(λπ(1)+tπ(1),⋯,λπ(N)+tπ(N)),引入随机值ρ=rλ+rd,Prover可计算cλ=comck(λπ(1)+tπ(1),⋯,λπ(N)+tπ(N);ρ)=comck(mπ(1),⋯,mπ(N);ρ)。 实际上,利用commitment的加法同态性,Verifier和Prover均可获得cλ=cλcdcomck(s1,⋯,sN;0)。 从而cλ为common input,无需传递。 (2)已知cλ=comck(mπ(1),⋯,mπ(N);ρ)和(m1,⋯,mN),证明Prover知道相应的permutation π和randomizer ρ:(显然地,可以借助博客博客A Verifiable Secret Shuffle of Homomorphic Encryptions学习笔记第二节的“shuffle of known contents 明文shuffle证明”来实现。同时注意,其中的challenge x可复用以上(1)中的challenge λ)
Prover和Verifier:均计算cλ=cλcdcomck(s1,⋯,sN;0)。
Prover:复用x=λ,复用之前的cd=−cd,c=cλ,从而有:
由此,即完成整个permutation π零知识证明。
3. Groth2012的permutation π零知识证明
Stephanie Bayer和Jens Groth 2012年论文《Efficient Zero-Knowledge Argument for Correctness of a Shuffle》的思路为: Prover’s witness: permutation π∈∑N。 Common Input: public commitment key ck。【length为n+1】(将(π(1),⋯,π(N))向量以n行m列的矩阵表示,减少ck的长度减少m倍。) 证明:在不暴露permutation π的前提下,Verifier给challenge(s),Prover respond,Verifier需验证:Prover确实知道某permutation π;Prover respond的消息内采用了相同的permutation π。
1)Prover:将(π(1),⋯,π(N))向量以n行m列的矩阵表示A=a=(a1,⋯,am)={π(i)}i=1N,逐列进行commit cA=comck(A;r)=comck(a;r)=(comck(a1;r1),⋯,comck(am;rm)),其实就是对数字1,⋯,N的permutation commit。 将cA发送给Verifier。【length为m】【第一组commitment】 2)Verifier:Challenges x。【length为1】 3)Prover:采用相同的permutation π构建n行m列的矩阵B=b=(b1,⋯,bm)={xπ(i)}i=1N,逐列进行commit cB=comck(B;s)=comck(b;s)=(comck(b1;s1),⋯,comck(bm;sm)) Prover给Verifier发送cB。【length为m】【第二组commitment】 4)Prover:提供证明cB have been formed correctly, using the same permutation π that used to form cA。 Prover提供argument,证明其知道相应的openings of the commitments to permutations of respectively 1,…,N和x1,…,xN,同时证明这两组commitment采用的是相同的permutation。【即第二组commitment是对x1,…,xN permuted in an order that was fixed before the prover saw x】。
4.1 为了证明两组commitment采用的是相同的permutation,Verifier给Prover random challenges y和z。