Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对zksnark文章的疑问 #1

Open
zhaozicen1998 opened this issue Jan 10, 2025 · 1 comment
Open

对zksnark文章的疑问 #1

zhaozicen1998 opened this issue Jan 10, 2025 · 1 comment

Comments

@zhaozicen1998
Copy link

https://simplexity.cn/articles/zk-snark-paper/

大佬您好!这篇文章我暂时有一个问题没有明白。在 3.3.4 Encrypted Polynomial节中,verifier通过检查g^p是否等于(g^h)^t(s)来验证证明者是否有多项式,加密s保证了prover不能作弊。但是我认为,prover在没有得到明文s的情况下也很容易完成作弊,因为他知道多项式t(x),因此只需随便用一个h(x)生成一个p(x)就能骗过verifier。请问这样的理解是否正确呢?

@simplexity-ckcclc
Copy link
Owner

实际上,prover只要证明自己拥有一个多项式p(x)能被t(x)整除就可以了,这个p(x)的系数是跟电路的具体输入有关的,它不是随意生成的,而是通过电路约束计算而来的,这个也是prover要隐藏的秘密所在。所以verifier只需要能验证p=ht就可以了,就说明了prover的输入是符合电路定义的约束的。这样的符合约束的电路输入可以有很多组,prover选择不同的电路输入组,就对应得到不同的p(x),这些都是合法的。但同时,电路的输入通常包含了公开输入,也就是这个p(x)的构造是受到公开输入的限制的,verifier在验证阶段也会加入公开输入进行验证,从而约束了p(x)也不能是任意的多项式。所以随便用一个h(x)生成一个p(x)就能骗过verifier,实际上是不可行的。

https://simplexity.cn/articles/zk-snark-paper/

大佬您好!这篇文章我暂时有一个问题没有明白。在 3.3.4 Encrypted Polynomial节中,verifier通过检查g^p是否等于(g^h)^t(s)来验证证明者是否有多项式,加密s保证了prover不能作弊。但是我认为,prover在没有得到明文s的情况下也很容易完成作弊,因为他知道多项式t(x),因此只需随便用一个h(x)生成一个p(x)就能骗过verifier。请问这样的理解是否正确呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants