Simple Schnorr Multi-Signatures with Applications to Bitcoin 学习笔记

article/2025/10/4 4:50:05

1. 引言

Blockstream团队2018年论文《Simple Schnorr Multi-Signatures with Applications to Bitcoin》。
对应的代码实现:
https://github.com/KZen-networks/multi-party-schnorr
https://github.com/lovesh/signature-schemes

论文要点:

  • MuSig——new Schnorr-based multi-signature scheme:即一群签名者对同一消息进行联合签名,最终的签名长度要短。
  • MuSig方案在plain public-key model下是安全的:即signers are only required to have a public key, but do not have to prove knowledge of the private key corresponding to their public key to some certificate authority or to other signers before engaging the protocol。
  • MuSig的主要优势为:
    1)Simple and efficient,具有与标准Schnorr签名相同的key size 和 signature size。
    2)允许key aggregation,即最终的联合签名可采用与标准验签方式类似的方式来验证,使用的是a single “aggregated” public key——可computed from the individual public keys of the signers。
  • 提出了a simple (yet non black-box) way to turn the BN multi-signautre scheme into a secure IAS scheme。

1.1 What is Multi-Signature?

Itakura和Nakamura 1983年论文《[A public-key cryptosystem suitable for digital multisignatures]》中首次提出了Multi-Signature概念:
Allow a group of signers (each possessing its own private/public key pair) to produce a single signature σ \sigma σ on a message m m m.
Verification of the validity of a purported signature σ \sigma σ can be publicly performed given the message and the set of public keys of all signers.

直观的方式是采用标准签名的方式,每个签名者用自己的私钥对消息 m m m进行签名,将所有的独立签名拼接在一起。存在的问题是该方式最终产生的签名长度过长,且与签名者数量成正比。

多重签名要求最终的签名长度应与签名者数量无关,且尽量接近标准签名的长度。

1.2 多重签名中的rogue-key attacks

rogue-key attacks即流氓密钥攻击,详见博客 ECDSA VS Schnorr signature VS BLS signature 2.2.2节。

避免rogue-key attacks的方法有:

  • 要求签名者prove knowledge of the secret key during public key registration with a certification authority,即knowledge of secret key(KOSK) assumption。该方案存在问题,详情参见[BN06, RY07]。

1.3 What is key aggregation?

Key aggregation是指根据参与多重签名的所有签名者的public keys,生成一个新的aggregated key,利用该aggregated key可对多重签名进行验签。
Key aggregation的好处有:

  • a group of n n n signers want to authorize an action (say, spend some bitcoins) only if all of them agree, but do not necessarily wish to reveal their individual public keys. Then, they can privately compute the aggregated key X ~ \tilde{X} X~ corresponding to their multiset of public keys and publish it as an ordinary (non-aggregated) key. Signers are ensured that all of them will need to cooperate to produce a signature which is valid under X ~ \tilde{X} X~, whereas verifiers will not even learn that X ~ \tilde{X} X~ is in fact an aggregated key.
  • aggregated key也可由知道所有public keys的第三方(如someone sending bitcoins to the group of signers)直接计算。

1.5 DL-based多重签名方案对比

在这里插入图片描述
[BCJ08](2008年论文《Multisignatures Secure Under the Discrete Logarithm Assumption and a Generalized Forking Lemma》)利用了homomorphic commitment scheme,将number of rounds由3减为2,代价是增加了签名的长度以及签名过程和验签过程的计算负担。不支持key aggregation。
[MWLD10](2010年论文《Efficient discrete logarithm based multi-signature scheme in the plain public key model》)基于Okamoto’s signature机制和double hashing(组合hash,而不是2个hash运算相乘)技术,在保证round数为2的同时,相比于[BCJ08],减少了签名长度。不支持key aggregation。

1.6 interactive aggregate signature

与多重签名不同,多重签名是对同一消息 m m m,由多个签名者进行签名。
当每个签名者has its own message m i m_i mi时,然后joint signature proves that the i i i-th signer has signed m i m_i mi,则称为an interactive aggregate signature (IAS) scheme。

IAS schemes are more general than multi-signature schemes, but less flexible than non-interactive aggregate signatures [BGLS03,BNN07] and sequential aggregate signatures [LMRS04].
[BN06] 中指出了a generic (i.e., black-box) way to turn any multi-signature scheme an IAS scheme:
the signers simply run the multi-signature protocol using as message the tuple of all public key/message pairs involved in the IAS protocol.

1.7 Musig的优点

详细参见博客 ECDSA VS Schnorr signature VS BLS signature。。
相比于Bitcoin现在采用的ECDSA签名方案,基于Schnorr signature的Musig具有以下两个优点:

  • The availability of key aggregation removes the need for verifiers to see all the involved keys, improving bandwidth, privacy, and validation cost.
  • Security under the plain public-key model enables multi-signature across multiple inputs of a transaction, where the choice of signers cannot be committed to in advance. This greatly increases the number of situations in which multi-signatures are beneficial.

2. Musig多重签名方案

2.1 Musig的相关安全假设

定义 G \mathbb{G} G为a cyclic group of order p p p,其中 p p p为a k k k-bit integer, and g g g be a generator of G \mathbb{G} G ( G , p , g ) (\mathbb{G},p,g) (G,p,g)称为group parameters。

security要求为:it’s infeasible to forge multi-signatures involving at least one honest signer.

2.1.1 Discrete Logarithm (DL) problem

在这里插入图片描述

2.1.2 Generalized Forking Lemma

在这里插入图片描述
在这里插入图片描述

2.2 Musig算法实现

包含三大类算法KeyGenSignVer
要求setup phase结果可被checked efficiently,从而不需要依赖可信第三方来运行。

  • KeyGen:每个签名者生成公私钥对 ( x , X = g x ) (x,X=g^x) (x,X=gx)
  • Sign:待签名消息 m m m,所有签名者公钥 L = { X 1 , ⋯ , X n } L=\{X_1,\cdots,X_n\} L={X1,,Xn},对于 i ∈ { 1 , ⋯ , n } i\in\{1,\cdots,n\} i{1,,n},签名者计算 a i = H a g g ( L , X i ) a_i=H_{agg}(L,X_i) ai=Hagg(L,Xi),然后计算aggregated public key X ~ = ∏ i = 1 n X i a i \tilde{X}=\prod_{i=1}^{n}X_i^{a_i} X~=i=1nXiai;选择随机数 r 1 ← Z q r_1\leftarrow \mathbb{Z}_q r1Zq,计算 R 1 = G r 1 , t 1 = H c o m ( R 1 ) R_1=G^{r_1},t_1=H_{com}(R_1) R1=Gr1,t1=Hcom(R1),将 t 1 t_1 t1发送给所有其它签名者;当收齐其它签名者发来的 t 2 , ⋯ , t n t_2,\cdots,t_n t2,,tn时,将 R 1 R_1 R1发送给所有其它签名者;当收到其它签名者发来的 R 2 , ⋯ , R n R_2,\cdots,R_n R2,,Rn时,验证 t i = H c o m ( R i ) ) t_i=H_{com}(R_i)) ti=Hcom(Ri))是否成立(for all i ∈ { 2 , ⋯ , n } i\in\{2,\cdots,n\} i{2,,n}),若不成立则停止,否则继续计算 R = ∏ i = 1 n R i , c = H s i g ( X ~ , R , m ) , s 1 = r 1 + c a 1 x 1 m o d p R=\prod_{i=1}^{n}R_i,c=H_{sig}(\tilde{X},R,m),s_1=r_1+ca_1x_1\mod p R=i=1nRi,c=Hsig(X~,R,m),s1=r1+ca1x1modp,将 s 1 s_1 s1发送给其它所有签名者;当收到了所有的签名信息 s 2 , ⋯ , s n s_2,\cdots,s_n s2,,sn时,计算 s = ∑ i = 1 n s i m o d p s=\sum_{i=1}^{n}s_i\mod p s=i=1nsimodp,最终的签名信息为 σ = ( R , s ) \sigma=(R,s) σ=(R,s)
  • Ver:Given L = { X 1 , ⋯ , X n } , m , σ = ( R , s ) L=\{X_1,\cdots,X_n\},m,\sigma=(R,s) L={X1,,Xn},m,σ=(R,s),验签者计算 a i = H a g g ( L , X i ) , X ~ = ∏ i = 1 n X i a i , c = H s i g ( X ~ , R , m ) a_i=H_{agg}(L,X_i),\tilde{X}=\prod_{i=1}^{n}X_i^{a_i},c=H_{sig}(\tilde{X},R,m) ai=Hagg(L,Xi),X~=i=1nXiaic=Hsig(X~,R,m),验证 g s = R ∏ i = 1 n X i a i c = R X ~ c g^s=R\prod_{i=1}^{n}X_i^{a_ic}=R\tilde{X}^c gs=Ri=1nXiaic=RX~c是否成立,若成立则签名验证成功。

注意Musig中的随机数 r i r_i ri因为strong random number,不能是类似RFC6979( f ( x i , m ) f(x_i,m) f(xi,m))这种确定性的值,在不同的签名过程中应使用不同的随机值,否则会存在私钥泄露的问题,详细流程如下:
在这里插入图片描述

2.3 Musig安全性证明

Musig中使用了3个hash函数 H c o m H_{com} Hcom H a g g H_{agg} Hagg H s i g H_{sig} Hsig
在这里插入图片描述
详见该论文第4章的证明。

参考资料:
[1] 博客 Key Aggregation for Schnorr Signatures
[2] A Survey of Two Signature Aggregation Techniques
[3] 2018年论文Compact Multi-Signatures for Smaller Blockchains
[4] 2018年论文BLS Multi-Signatures With Public-Key Aggregation,Full Version改名为:Compact Multi-Signatures for Smaller Blockchains


http://chatgpt.dhexx.cn/article/DS2VIUBR.shtml

相关文章

【密码学原理】数字签名(ElGamal签名,Schnorr签名,椭圆曲线签名,RSA-PSS签名)

数字签名是公钥密码学发展过程中最重要的概念之一,产生和使用数字签名过程的一般模型如图所示 消息认证可以保护消息交换双方不受第三方的攻击,但是不能处理通信双方自身发生的攻击。例如对下图中的某种方式进行攻击,考虑两种情况&#xff1a…

Schnorr签名java实现

Schnorr签名(模指数)的实现java 1、算法描述2、算法的实现(java) 和ElGama数字签名一样,Schnorr数字签名方案也是基于离散对数。 Schnorr数字签名主要工作不依赖于消息,生成签名过程与消息相关的部分需要进…

Blind Schnorr Signature

1. 引言 前序博客有: 盲签名 blind signature Blind Schnorr Signature交互签名Demo见: Blind Schnorr Signature Interactive Demo 参考资料 [1] Schnorr Applications: Blind Signatures

本体技术视点 | 为什么 BIP - 340 选择引入 Schnorr 签名算法?

引言 备受瞩目的技术升级 Taproot 软分叉将于最近激活,激活高度为 709632,距今已不足 500 个区块。此次升级包括三个改进提案,分别是 BIP - 340、BIP - 341 和 BIP - 342。其中,BIP - 340 引入了 Schnorr 签名,BIP - …

【密码学】Schnorr认证,Schnorr签名,安全性证明

Schnorr是Sigma协议的实例,从Schnorr 认证协议和Schnor签名两个部分来介绍。在前面关于认证协议的讲述中,用到了一些特定的符号,这里会继续使用。 首先认识Schnorr认证协议,定义如图所示 Schnorr认证协议和Schnorr签名方案的安全…

零知识证明系列之二——Schnorr协议

​Schnorr协议简介 Schnorr协议是由德国数学家和密码学家Claus-Peter Schnorr在1991年提出,是一种基于离散对数难题的知识证明机制。Schnorr本质上是一种零知识的技术,即Prover声称知道一个密钥x的值,通过使用Schnorr加密技术,可…

Schnorr 签名方案和 BLS 签名方案的全面对比

原文:https://medium.com/cryptoadvance/bls-signatures-better-than-schnorr-5a7fe30ea716https://medium.com/cryptoadvance/how-schnorr-signatures-may-improve-bitcoin-91655bcb4744 Schnorr 签名算法最初是由德国密码学家 Claus Schnorr 于 2008 年提出的&…

Schnorr签名算法(初始化和签名)C语言实现

Schnorr签名算法(初始化和签名) Schnorr签名算法(验证) Schnorr签名算法(正确性) Schnorr签名算法(举例) Schnorr签名算法(举例) C语言实例 #include <stdlib.h> #include <stdio.h> #include <time.h> int xy[22]; // 判断两个数是否互质 int isHuZhi(int …

Schnorr数字签名方案

Schnorr数字签名方案 Schnorr签名算法最初由德国密码学家claus schnorr于2008年提出&#xff0c;在密码学中&#xff0c;它是一种数字签名方案&#xff0c;以其简单著称 Schnorr数字签名方案也是基于离散对数的&#xff08;基于离散对数的还有ElGamal数字签名方案、DSA数字签…

记录我看的密码学方案中的技术,Shamir秘密共享,Schnorr零知识证明,EIGamal密码体制

记录我看的论文中基于的技术&#xff0c;对他们进行大概介绍 Shamir 秘密共享方案零知识证明EIGamal密码体制 Shamir 秘密共享方案 1979年&#xff0c;Shamir提出的一个基于拉格朗日插值的(k,n)门限方案 目的&#xff1a;可以将秘密s分给n个成员&#xff0c;规定至少有k&#…

schnorr签名和batch verification

schnorr 签名 概念&#xff1a;Schnorr签名算法最初是由德国密码学家ClausSchnorr于2008年提出的&#xff0c;在密码学中&#xff0c;它是一种数字签名方案&#xff0c;以其简单高效著称 原理&#xff1a;其安全性基于某些离散对数问题的难处理性。 签名过程&#xff1a; 和…

密码学学习笔记(十六 ):Schnorr签名算法

交互式零知识证明 零知识证明(ZKP)就是不会将证据泄露给验证者的知识证明。Schnorr身份认证识别协议是一个交互式ZKP&#xff0c;它满足了完备性、可靠性、零知识性。所谓的交互式ZKP方案通常包含3个步骤&#xff08;承诺、挑战和证明&#xff09;&#xff0c;在文献中通常被称…

ECDSA VS Schnorr signature VS BLS signature

1. ECDSA ECDSA&#xff0c;全称为Elliptic curve Digital Signature Algorithm&#xff0c;采用Elliptic curve cryptography来实现的数字签名算法。 公私钥对 ( p k , P ) (pk,P) (pk,P)&#xff0c;其中公钥 P p k G Ppk\times G PpkG&#xff0c; G G G为所选椭圆曲线的…

BSV 上的 Schnorr 签名

我们已经在 BSV 上实现了 Schnorr 签名。这是第一个也是唯一一个已知的实现&#xff0c;没有对原始协议进行任何更改。 一笔交易一个签名 Schnorr 是一种可以用于替代比特币签名当前使用的 ECDSA 算法的替代算法。一个关键优势是&#xff0c;同一交易的一个输入或多个输入中的多…

深入浅出零知识证明(一):Schnorr协议

最近在学习零知识证明&#xff0c;因为内容很多并且难度也大&#xff0c;想根据自己的学习路线做一系列总结&#xff0c;这是第一篇文章&#xff0c;主要介绍零知识证明的一些重要概念和思想&#xff0c;可以对零知识证明有直观的理解&#xff0c;然后讲解一个经典简洁的零知识…

密码学——Schnorr签名算法

一、基本知识 1.1 概述 Schnorr签名算法最初是由德国密码学家ClausSchnorr于2008年提出的&#xff0c;在密码学中&#xff0c;它是一种数字签名方案&#xff0c;以其简单高效著称&#xff0c;其安全性基于某些离散对数问题的难处理性。 1.2 椭圆曲线上的计算 密码学中&…

什么是 Schnorr 签名?

在密码学中&#xff0c;Schnorr 签名是由 Schnorr 签名算法生成的数字签名。 与大多数区块链不同&#xff0c;BTC自其早期以来基本保持不变&#xff0c;大多数升级都是有限的&#xff0c;并旨在增强网络的效率而不是功能。BTC协议的更新是非常罕见的&#xff0c;并且通常用于技…

史上最全的Schnorr签名方案和BLS签名方案的全面对比

前言 Schnorr 签名算法最初是由德国密码学家 Claus Schnorr 于 2008 年提出的&#xff0c;而来自区块链协议公司 Blockstream 的密码学家 Gregory Maxwell、Pieter Wuille 等人&#xff0c;则在 2018 年提出了一种名为 MuSig 的 Schnorr 签名方案&#xff0c;这也是我们即将探索…

Schnorr身份识别方案

Schnorr身份识别协议是又一个零知识证明协议&#xff0c;相比Fiamt协议有两点不同&#xff0c;一是其安全性依赖于离散对数的困难性&#xff0c;二是该方案使用乘法群&#xff0c;从而可以提前计算了一些参数&#xff0c;减小了证明者实时计算开销&#xff0c;特别适合计算能力…

Schnorr协议:非交互零知识身份证明和数字签名

本文首发公众号区块链之美&#xff01;致力于区块链技术研究&#xff0c;传播区块链技术和解决方案、区块链应用落地、区块链行业动态等。 摘要&#xff1a;本篇文章介绍Schnorr的两大应用场景&#xff1a;从交互式零知识身份证明到非交互零知识身份证明、数字签名实现基本原理…