1. 背景知识
Prover 需要在不reveal permutation 的基础上,证明其确实知道,且在收到Verifier challenge信息后,Prover对challenge 信息采用相同的处理并将处理后的消息发送给Verifier,Verifier应可验证所收到的消息确实是采用了相同的permutation 处理,尽管其并不知道具体的permutation 内容。
在Jens Groth 2010年论文《A Verifiable Secret Shuffle of Homomorphic Encryptions》和Stephanie Bayer和Jens Groth 2012年论文《Efficient Zero-Knowledge Argument for Correctness of a Shuffle》中,均有对permutation 证明算法实现,具体也可结合这两篇博客来看:
- 博客Efficient Zero-Knowledge Argument for Correctness of a Shuffle学习笔记(1) 第2节内容。
- 博客A Verifiable Secret Shuffle of Homomorphic Encryptions学习笔记 第3节内容。
假设均针对长度为的Permutation 进行证明,且均采用Pedersen commitment规则:
2. Groth2010的permutation 零知识证明
Jens Groth 2010年论文《A Verifiable Secret Shuffle of Homomorphic Encryptions》的思路为:
Common Input: public commitment key 。【length为】
Prover’s witness: permutation 。
证明:在不暴露permutation 的前提下,Verifier给challenge(s),Prover respond,Verifier需验证:Prover确实知道某permutation ;Prover respond的消息内采用了相同的permutation 。
1)Prover:对permutation 进行commit ,其实就是对数字的permutation commit。只需证明为a commit to a permutation of the numbers ,这样就可以保证the prover is bound to some permutation he knows, but the permutation remains hidden.
同时选个随机数用于保护permutation 不被reveal,对这些随机数进行commit 。
将和发送给Verifier。
2)Verifier:Challenges 。【length为】
3)Prover:对收到的按相同的permutation 进行permute,计算。Prover给Verifier发送。【length为】
4)Prover:提供证明 have been formed correctly, using the same permutation that used to form 。
Common Input: 、、、以及。
Prover’s witness: permutation 。
证明:中的permutation 和commitment 中的permutation 是相同的。
- Verifier:challenge
- Common input:构建向量(构建依据为为a commit to a permutation of the numbers )。
- Prover:
(1)利用witness permutation 构建向量,引入随机值,Prover可计算。
实际上,利用commitment的加法同态性,Verifier和Prover均可获得。
从而为common input,无需传递。
(2)已知和,证明Prover知道相应的permutation 和randomizer :(显然地,可以借助博客博客A Verifiable Secret Shuffle of Homomorphic Encryptions学习笔记第二节的“shuffle of known contents 明文shuffle证明”来实现。同时注意,其中的challenge 可复用以上(1)中的challenge ) - Prover和Verifier:均计算。
- Prover:复用,复用之前的,从而有:
由此,即完成整个permutation 零知识证明。
3. Groth2012的permutation 零知识证明
Stephanie Bayer和Jens Groth 2012年论文《Efficient Zero-Knowledge Argument for Correctness of a Shuffle》的思路为:
Prover’s witness: permutation 。
Common Input: public commitment key 。【length为】(将向量以行列的矩阵表示,减少的长度减少倍。)
证明:在不暴露permutation 的前提下,Verifier给challenge(s),Prover respond,Verifier需验证:Prover确实知道某permutation ;Prover respond的消息内采用了相同的permutation 。
1)Prover:将向量以行列的矩阵表示,逐列进行commit ,其实就是对数字的permutation commit。
将发送给Verifier。【length为】【第一组commitment】
2)Verifier:Challenges 。【length为】
3)Prover:采用相同的permutation 构建行列的矩阵,逐列进行commit
Prover给Verifier发送。【length为】【第二组commitment】
4)Prover:提供证明 have been formed correctly, using the same permutation that used to form 。
Prover提供argument,证明其知道相应的openings of the commitments to permutations of respectively 和,同时证明这两组commitment采用的是相同的permutation。【即第二组commitment是对 permuted in an order that was fixed before the prover saw 】。
- 4.1 为了证明两组commitment采用的是相同的permutation,Verifier给Prover random challenges 和。
- 4.2 Prover commit to 一系列 。使用product argument,即可证明等式成立。【想象其为的N阶多项式,是对其root根的permute,基于Schwartz-Zippel lemma可知,针对特定的值Prover伪造找到相应值使该等式成立的概率不高于,可忽略。同理,针对值,Prover伪造两组commitment使等式成立的概率也可忽略。】