ZKP Schnorr Protocol

2023-12-22 00:01
文章标签 protocol zkp schnorr

本文主要是介绍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

这篇关于ZKP Schnorr Protocol的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/521970

相关文章

WebDriver与Chrome DevTools Protocol:如何在浏览器自动化中提升效率

介绍 随着互联网数据的爆炸式增长,爬虫技术成为了获取信息的重要工具。在实际应用中,如何提升浏览器自动化的效率是开发者常常面临的挑战。Chrome DevTools Protocol(CDP)与Selenium WebDriver相结合,为浏览器自动化提供了强大的控制能力,并允许用户直接与浏览器的底层交互。本文将通过使用CDP优化Selenium的效率,结合代理IP技术,实现对微博数据的高效采

Pencils Protocol生态新进展,即将上线 Vault 产品

“极高的盈利预期、通证的持续回购与销毁,Vault产品的推出正在成为Pencils Protocol生态发展的重磅利好。” Pencils Protocol是目前Scroll生态TVL最高的DeFi平台 ,即便是行情整体较为平淡,其仍旧能够保持在3亿美元左右的锁仓价值,并拥有超过247,000名活跃用户。 而进入到9月,Pencils Protocol陆续迎来了

ios开发之Protocol

一.特点: 1.Protocol有点类似于java中的接口(interface),只有申明没有实现 2.任何类都可以实现协议 3.实现了协议的类,不一定需要实现协议中定义的所有方法,只有在协议中定义的方法有@required修饰的时候,才表示这个方法必须被实现.采用@optional修饰的方法表示,可以实现也可以不实现. 二.利用Xcode创建协议 1.new file-->iOS

使用Protocol Buffers传输数据

使用 Google Protocol Buffers(ProtoBuf)与 Kafka 结合来定义和传输数据,可以确保传输数据的结构性、可扩展性和高效性。以下是一个简单的步骤指南,帮助你实现生产者和消费者。 1. 定义 ProtoBuf 消息格式 首先,你需要定义传输内容的消息格式。 示例:message.proto syntax = "proto3";message ExampleMes

RFC6455-The WebSocket protocol 之一:1. Introduction

1. Introduction 1、介绍 1.1. Background 1.2 背景 _This section is non-normative._ 这部分是非正式的。 Historically, creating web applications that need bidirectional communication between a client and a server (

RFC6455-The WebSocket protocol 之八:7. Closing the Connection 8. Error Handling

7.  Closing the Connection 7.关闭连接 7.1.  Definitions 7.1 术语 7.1.1.  Close the WebSocket Connection 7.1.1 关闭WebSocket连接    To _Close the WebSocket Connection_, an endpoint closes the    underlying T

RFC6455-The WebSocket protocol 之七:6. Sending and Receiving Data

6.  Sending and Receiving Data 6、发送和接收数据 6.1.  Sending Data 6.1 发送数据    To _Send a WebSocket Message_ comprising of /data/ over a WebSocket    connection, an endpoint MUST perform the following st

RFC6455-The WebSocket protocol 之六:5. Data Framing

5.  Data Framing 数据块 5.1.  Overview    In the WebSocket Protocol, data is transmitted using a sequence of    frames.  To avoid confusing network intermediaries (such as    intercepting proxies) and

RFC6455-The WebSocket protocol 之五:Opening Handshake 4.2-4.4

参考:http://jinnianshilongnian.iteye.com/blog/1898350 4.2 Server-Side Requirements 服务器端的要求 Servers MAY offload the management of the connection to other agents    on the network, for ex

RFC6455-The WebSocket protocol 之四:Opening Handshake 4.1. Client Requirements

4.Opening Handshake 4.1. Client Requirements 第四章:握手 第一节:客户端的要求 To _Establish a WebSocket Connection_, a client opens a connection and sends a handshake as defined in this section. A connect