ZKP Schnorr Protocol

Schnorr Protocol

The Schnorr Protocol is a cryptographic protocol used for secure communication and digital signatures. It was originally proposed by Claus-Peter Schnorr in 1989 and has gained attention for its simplicity and efficiency. There are both interactive and non-interactive versions of the Schnorr Protocol.

Interactive Schnorr Protocol

a. Key Generation:

The prover generates a public-private key pair.

s k = a ; p k = a ⋅ G sk = a; pk = a \cdot G sk=a;pk=aG

b. Commitment:

The prover chooses a random number r r r and commits to the value R R R.

R = r ⋅ G R = r \cdot G R=rG

c. Challenge:

The verifier sends a random challenge c c c to the prover.

d. Response:

The prover responds to the challenge with information derived from the secret key. The prover sends z z z to the verifier.

z = r + c ⋅ s k z = r + c \cdot sk z=r+csk

e. Verification:

The verifier checks the validity of the response and decides whether to accept or reject.

z ⋅ G = ? R + c ⋅ p k z \cdot G \overset{\text{?}}{=} R + c \cdot pk zG=?R+cpk

Non-Interactive Schnorr Protocol

The non-interactive version is designed to be more efficient and is often used in scenarios where a single round of communication is preferred.
This is achieved by using a technique called a Fiat-Shamir transform, which converts an interactive protocol into a non-interactive one by replacing the challenge from the verifier with a hash function.
The steps involved in the non-interactive Schnorr Protocol are as follows:

a. Key Generation:

The prover generates a public-private key pair.
s k = a ; p k = a ⋅ G sk = a; pk = a \cdot G sk=a;pk=aG

b. Commitment:

The prover chooses a random number r r r and commits to the value R R R, similar to the interactive version.

R = r ⋅ G R = r \cdot G R=rG

c. Hashing:

The prover hashes the commitment and other relevant information to generate a challenge.

c = Hash ( p k , R ) c = \text{Hash}(pk,R) c=Hash(pk,R)

d. Response:

The prover responds to the challenge with information derived from the secret key. The prover sends z z z and R R R to the verifier.

z = r + c ⋅ s k z = r + c \cdot sk z=r+csk

e. Verification:

The verifier checks the validity of the response using the hash function and decides whether to accept or reject.

c ′ = Hash ( p k , R ) c^{'} = \text{Hash}(pk,R) c=Hash(pk,R)
z ⋅ G = ? R + c ′ ⋅ p k z \cdot G \overset{\text{?}}{=} R + c^{'} \cdot pk zG=?R+cpk

  • 38
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值