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

Pedersen Commitment (佩德森承诺) #7

Open
winterpi opened this issue Aug 16, 2022 · 0 comments
Open

Pedersen Commitment (佩德森承诺) #7

winterpi opened this issue Aug 16, 2022 · 0 comments

Comments

@winterpi
Copy link
Owner

winterpi commented Aug 16, 2022

Pedersen Commitment

Pedersen Commitment 是基于离散对数难题实现的
离散对数

其构造过程分为三段:

  1. 初始化阶段:选择阶为大素数 q 的乘法群 G,生成元为 g 和 h, 公开元组 (g, h, q)
  2. 承诺阶段: 承诺方选择随机数 r 作为盲因子,计算对数值 v 的承诺 comm, 并发送给接收者;
  3. 打开阶段:承诺方发送 (v, r) 给接收者,接收者验证 comm 是否等于 image,如果相等则接受,否则就拒绝承诺。

基于 Pedersen Commitment 的加法同态

如果 comm1, comm2 分别是使用盲因子 r1, r2 对 v1, v2 的承诺,则 comm1 + comm2 就是使用盲因子 r1 + r2 对 v1 + v2 的承诺,即
image

Pedersen Commitment 的算法实现

参考:https://github.com/threehook/go-pedersen-commitment

Pedersen Commitment 的应用

在交易过程中,在隐藏交易的数值的基础上,确认交易的正确性(如门罗币)
image

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

1 participant