Compact Multi-Signatures for Smaller Blockchains学习笔记

1. 引言

Boneh等人2018年论文《Compact Multi-Signatures for Smaller Blockchains
在《Simple Schnorr Multi-Signatures with Applications to Bitcoin》论文的Musig方案的基础上,做了改进。(参见博客 Simple Schnorr Multi-Signatures with Applications to Bitcoin 学习笔记

本论文的设计目标是:
reduce the size of the Bitcoin blokchain。

  • 支持signature compression。
  • 支持public-key aggregation。
  • multi-signature scheme:a number of parties signed a common message m m 满足completeness和unforgeability特性。
  • 基于Schnorr signatures和BLS signatures。
  • 支持plain public key model,即:users do not need to prove knowledge or possession of their secret key。
  • 构建了第一个short accountable-subgroup multi-signature (ASM) scheme。
  • ASM(Accountable-Subgroup Multi-signautres)的signature size 仅为 O ( k ) \mathcal{O}(\mathcal{k}) bits over the description of S S ,其中 k \mathcal{k} 为security parameter。
  • aggregate public key 仅为 O ( k ) \mathcal{O}(\mathcal{k}) bits,与 n n 无关。
  • 与Musig的基于Schnorr signature实现相比,本论文是基于BLS signature(即pairings)来实现的,提出了BLS-based multi-signature scheme MSP和AMSP。
  • 有重点关注 t o f n t-of-n Multisig address,不再像Musig方案那样受限于 ( n t ) \binom{n}{t} 的组合数。【ASM特别适合 t o f n t-of-n signatures when ( n t ) \binom{n}{t} is very large.】

在这里插入图片描述

  • Aggregate signatures [12, 24, 1] are a closely related concept where signatures by different signers on different messages can be compressed together.
  • Sequential aggregate signatures [33, 32, 41, 14, 23] are a variant where signers take turns adding their own signature onto the aggregate.

代码实现:
https://github.com/lovesh/signature-schemes
https://github.com/KZen-networks/multi-party-schnorr 【第5章实现,类似Musig方案】

1.1 ASM定义

ASM (accountable-subgroup multi-signature)是指:
enables any subset S S of a set of n n parties to sign a message m m so that a valid signature discloses which subset generated the signature (hence the subset S S is accountable for signing m m )。

1.2 multi-signature scheme定义

multi-signature 多重签名 scheme是指:
a protocol that 允许 n n 个签名者对消息 m m 进行联合签名生产short signature σ \sigma σ \sigma 可让verifier相信所有的 n n 个签名者均对消息 m m 进行了签名。

相应的多重签名验签算法为:

  • 输入为: n n 个签名者的公钥,消息 m m ,多重签名 σ \sigma
  • 输出为:接受 σ \sigma n n 个签名者对消息 m m 的联合签名。

多重签名应具有的特性是:

  • 多重签名 σ \sigma should be short;
  • σ \sigma 的长度应与签名者数量 n n 无关。

多重签名可基于Schnorr signature以及BLS signature等构建。

1.3 aggregate signature scheme定义

aggregate signature 聚合签名 scheme是指:
允许 n n 个签名者对不同的消息进行签名,最终所有的签名将聚合为a single short signature σ \sigma

相应的聚合签名验签算法为:

  • 输入为: n n 个签名者的公钥 ( P 1 , , P n ) (P_1,\cdots,P_n) n n 个消息 ( m 1 , , m n ) (m_1,\cdots,m_n) ,聚合签名 σ \sigma
  • 输出为:接受 σ \sigma P 1 m 1 P n m n P_1对m_1签名,\cdots,P_n对m_n签名 的聚合签名。

multi-sgiantures和aggregate signatures可用于对Bitcoin blockchain的size进行瘦身。

  • 在Blockstream 团队 Maxwell等人2018年论文《Simple schnorr multi-signatures with applications to bitcoin》(可参见博客 Simple Schnorr Multi-Signatures with Applications to Bitcoin 学习笔记)中提出了a Schnorr-based multi-sgnature scheme (Musig方案),可use multi-signatures to shrink the transaction data associated with Bitcoin Multisig addresses。 理论上,a Multisig address为:n个public keys p k 1 , , p k n pk_1,\cdots,pk_n 和threshold t { 1 , , n } t\in \{1,\cdots,n\} 的hash值。
    为了花费Multisig address上的资金,需要创建一个transaction,该transaction内包含:所有 n n 个public keys ( p k 1 , , p k n pk_1,\cdots,pk_n ) + t t 个有效签名(from t t of the n n public keys)。然后将该transaction写入到区块链中。
    t t 个签名签署的是相同的内容——即transaction data。
    实际使用时,通常会取 t = n t=n ,即要求所有的签名者均签名后才可花费该地址的资金。将所有 n n 个签名通过multi-signature scheme压缩为a signle short signature,将有效缩减overall transaction size,从而减少写入到区块链中的数据量。
    Maxwell的Musig方案也可用于 t < n t<n 的场景,当 ( n t ) \binom{n}{t} 组着值比较小时,可枚举所有的 t t -size 子集。(参见博客 ECDSA VS Schnorr signature VS BLS signature 2.2.4节。)

Multi-signatures也可用于压缩multi-input transactions,为了简化,本文重点关注针对Multisig address transactions的压缩。

注意,若仍然需要将所有 n n 个public keys都写入到区块链中,则仅仅是压缩签名可节约的空间是有效的。Maxwell所提出的Musig方案支持public key aggregation,这样verifier仅需a short aggregate public key就行而不再要求an explicit list of all n n public keys。

an n o f n n-of-n Multisig address 可简单地为:short aggregate public key的hash值。
写入区块链的spending transaction可简单为:a signle short aggregated public key + a single short compressed signature + the message。
这些数据足以使verifier相信所有的 n n 个签名者均对该交易进行了签名。由此,将写入区块链的数据缩小了 n n 倍。

在本论文第5章,对Maxwell的Musig方案进行了改进,证明在standard discrete-log assumption下是secure的。本文提出的为MSDL scheme。【其实就是Musig方案的早期版本存在安全漏洞,无法通过2round来实现,而需要通过3round来实现,后期Maxwell论文对此作了改进。在最新版本的《Simple schnorr multi-signatures with applications to bitcoin》不存在安全问题了。】

1.4 Aggregate Multi-Signature

aggregate multi-signature结合了aggregate signature和multi-signature的特点,允许将多个multi-signatures aggregated into one。

最直观的方式是将各个multi-signature信息直接拼接在一起,验签的时候直接验证各个独立的multi-signature是否有效,若所有都通过,则说明aggregate multi-siganture 验签成功,否则失败无效。
在这里插入图片描述

以上方式的缺点是aggregate multi-signature的size与multi-signature的个数 m m 成正比。理想的情况应为constant size,且与个数 m m 无关。

aggregate multi-signature也应具有completeness完备性和unforgeability防伪造性特性。

1.5 基于的安全假设(Computational Problems)

  • Discrete Log Problem:
    在这里插入图片描述
  • Computational co-Diffie-Hellman Problem:
    在这里插入图片描述
  • Computational ψ \psi -co-Diffie-Hellman Problem:
    在这里插入图片描述
    在这里插入图片描述
  • Generalized Forking Lemma
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

2. BLS signature scheme

在这里插入图片描述
详细亦可参见博客 ECDSA VS Schnorr signature VS BLS signature 第三节内容。

Naive BLS signature aggregation存在rouge public-key attack问题。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

避免BLS signature aggregation rogue public-key attack的常规操作有2种:

  • 要求每个签名者证明其拥有与所声称公钥相应的私钥。
  • 要求BLS signature aggregation中每个签名者所签署的消息必须互不相同,verifier在验签时,若消息不是互不相同则直接判定签名无效。这个足以抵抗roue key attack。【参见论文Boneh 等人 2003年论文《Aggregate and verifiably encrypted signatures from bilinear maps》和 Bellare等人 2007年论文《Unrestricted aggregate signatures》】 实际若待签名的消息相同,可通过在签名前在消息签名附加public key的方式来让消息不同,但是就无法拥有公式(3)中利用public-key aggregation进行验签的优势了。

不同于以上2种方式,在本论文第三章,提供了新的可抵御rogue public-key attack的新方式(构建方式是基于Bellare等人2009年论文《Multi-signatures in the plain public-key model and a general forking lemma》和Maxwell 2018年论文《Simple Schnorr Multi-Signatures with Applications to Bitcoin》。),支持public key aggregation和公式(3)的fast verification。同时secure in plain public-key model。同时可提供2个额外的特性:

  • 支持batch verification,即a set of multi-signatures can be verified as a batch faster than verifying them one by one。
  • 支持aggregate several multi-signautres on different messages into a single short signature。从而可进一步缩小区块链上的数据量。

2.1 BLS(pairing)-based multi-signature scheme MSP/AMSP

Musig采用的是Schnorr multi-signature,存在以下问题:

  • aggregation仅能在签名过程中发生;
  • 各个签名者之间需要multi-round protocol。

BLS-based multi-signature scheme MSP的优势有:

  • aggregation支持离线模式,即can take place publicly by a simple multiplication,even long after all the signatures have been generated and the signer no longer available。
  • 各签名方不再需要交互,也不需要同时online。所有签名者可将各自的签名发送给one party,one party可直接将所有签名aggregate into a single signature。

AMSP(aggregate multi-signature scheme)甚至支持compress multi-signatures on the different transactions into a single aggregate signature,从而节约更多的空间。

2.1.1 公钥和签名group选择

Bilinear group通常为非对称的,其中的1个group具有a more compact(紧凑的) representation。 pairing-based MSP/AMSP均要求public key和signature在不同的groups(即live in different groups)。

  • 对于标准签名来说,一个公钥会对很多消息签名,通常会选择用更紧凑的group来表示signatures。
  • 而在本论文中,由于需要同时支持signature aggregation和public key aggregation,则要根据实际应用来确定group选择。

2.1.2 MSP

在这里插入图片描述
b b 个multi-signatures所签名的消息是distinct互不相同的话,则可采用公式(1)的方式来实现Batch Verification,否则需要引入随机exponents ρ 1 , , ρ b \rho_1,\cdots,\rho_b
在这里插入图片描述
在这里插入图片描述
MSP的安全性要求为co-CDH。

2.1.3 AMSP

以下针对的是对互不相同的消息进行签名的multi-signatures 的aggregate,与MSP所不同的在于,签名时 H 0 H_0 hash运算中除了消息 m m 外,还增加了aggregate public key:
在这里插入图片描述

AMSP的安全性要求为 ψ \psi -co-CDH,即要求 G 1 \mathbb{G_1} G 2 \mathbb{G_2} 具有isomorphism ψ \psi

2.2 Accountable-Subgroup Multi-signatures (ASM)

假设有 n n 方,每方拥有独立的用于签名的公私钥对。
所谓ASM,是指:
n n 方内的任意子集 S S ,可对消息 m m 进行联合签名,最终根据签名可验证确实是子集 S S 生成了该签名。从而可以说 S S is accountable for signing m m

ASM对应的验签算法为:
1)输入有:

  • (aggregate) ASM public key representing all n n parties;
  • the set S { 1 , , n } S\subseteq \{1,\cdots,n\}
  • the multi-signature generated by the set S S
  • the message m m

2)输出为:接受该签名或者拒绝。

ASM的security要求:
a set of signers S S S'\nsupseteq S cannot issue a signature that will be accepted as if it were generated by S S .

本论文所构建的ASM(Accountable-Subgroup Multi-signautres)具有如下特性:

  • signature size 仅为 O ( k ) \mathcal{O}(\mathcal{k}) bits over the description of S S ,public key 仅为 O ( k ) \mathcal{O}(\mathcal{k}) bits,与 n n 无关。其中 k \mathcal{k} 为security parameter。
  • multi-signature 仅有2个group elements, along with the description of S S
  • public key为a single group element。【支持key aggregation。】
  • 整个签名过程为非交互的。但是初始的key generation 需要在所有 n n 个签名者之间运行a simple one-round protocol,使得每个签名者都可obtain a group-specific membership key m k mk that it needs to sign messages for the group P K \mathcal{PK}
  • 当用于 t o f n t-of-n Multisig address时,哪怕 ( n t ) \binom{n}{t} 组合数为指数级的,ASM方案仍然适用。写入区块链中的信息有:a description of S S + 3个group elements(其中1个for public key,2个for signature。)【An ASM scheme can be combined with an arbitrary access structure over P K \mathcal{PK} to determine whether the subset S S is authorized to sign on behalf of P K \mathcal{PK} . 如,要求 S > t |S|>t ,即可将ASM表示为threshold signature scheme whereby the signature also authenticates the set of signers that participated.】

2.2.1 ASM scheme的构建

所有签名者都有全局统一的index。
To participate in a group of signatures P K = { p k 1 , , p k n } \mathcal{PK}=\{pk_1,\cdots,pk_n\} , each signer in P K \mathcal{PK} runs the interactive algorithm G S e t u p ( s k , P K ) GSetup(sk,\mathcal{PK}) to obtain a membership key m k mk

ASM也应满足完备性和不可伪造性要求。

ASM构建过程中引入了3个hash函数 H 0 : { 0 , 1 } G 1 , H 1 : { 0 , 1 } Z q , H 2 : { 0 , 1 } G 2 H_0:\{0,1\}^*\rightarrow\mathbb{G}_1,H_1:\{0,1\}^*\rightarrow\mathbb{Z}_q,H_2:\{0,1\}^*\rightarrow\mathbb{G}_2 ,总的算法流程如下:
在这里插入图片描述

3. Discrete-Logarithm based multi-signature scheme MSDL

针对Maxwell早期论文版本的改进。与最新的Musig方案一致。
在这里插入图片描述

4. Proofs of possession

在第2节中提到,抵御rogue key attack的方式之一是:要求每个签名者证明其拥有与所声称公钥相应的私钥。
即对于不论是BLS-based还是Schnorr-based multi-signature,都可以要求所有的签名者provide a proof of possession (PoP) of their secret key。

Proofs of possession最主要的缺点是:将增加单个public key的size,但是对于不关注单个key size的情况下仍然有应用场景。如:Bitcoin的Multisig addresses,仅需在区块链上记录aggregate public key,而各个单独的public keys仅与签名者相关,可以kept off-chain 链下存储,或者仅需要验证一次就不再需要。以及other applications may involve a more or less static set of signing nodes whose keys can be verified once and used in arbitrary combinations thereafter.

4.1 Pairing-based schemes with PoPs

在这里插入图片描述

4.2 Accountable-Subgroup Scheme with PoPs

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

4.3 Discrete Logarithms with PoPs

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/mutourend/article/details/106951560