musig-spec: add motivation and design sections
This commit is contained in:
parent
686d96222d
commit
802b7daf23
@ -22,15 +22,36 @@ This document is licensed under the 3-clause BSD license.
|
||||
|
||||
=== Motivation ===
|
||||
|
||||
MuSig2 is a multi-signature scheme that allows multiple signers to create a single aggregate public key and cooperatively create a single Schnorr signature for the aggregate key and a message.
|
||||
This is more space-efficient and has lower verification costs than each signer providing an individual public key and signature.
|
||||
Since MuSig2 is not a threshold-signature scheme, the cooperation of ''all'' signers involved in key aggregation is required to produce a signature.
|
||||
|
||||
One of the primary motivations for MuSig2 is the activation of Taproot ([https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki BIP341]) on the Bitcoin network, which introduced the ability to authorize transactions with Schnorr signatures.
|
||||
This standard allows the creation of aggregate public keys that can be used in Taproot outputs.
|
||||
Such outputs are indistinguishable for a blockchain observer from regular, single-signer outputs but are actually controlled by multiple signers.
|
||||
Moreover, by tweaking an aggregate key, the shared Taproot output can have script spending paths that are hidden unless used.
|
||||
|
||||
There are multi-signature schemes other than MuSig2 that are fully compatible with Schnorr signatures.
|
||||
MuSig2 stands out by combining the following features:
|
||||
* '''Simple Key Setup''': Key aggregation is non-interactive and fully compatible with BIP340 public keys.
|
||||
* '''Two Communication Rounds''': MuSig2 is faster in practice than three-round multi-signature protocols, particularly when signers are connected through high-latency anonymizing links. Moreover, less communication rounds simplifies the specification and reduces the probability that users make security-relevant mistakes. To prove the security of using only two communication rounds, MuSig2 relies on the algebraic one-more discrete logarithm (AOMDL) assumption instead of the discrete logarithm assumption. AOMDL is a falsifiable and weaker variant of the well-studied OMDL problem.
|
||||
* '''Low complexity''': MuSig2 has a substantially lower computational and implementation complexity than alternative schemes like [https://eprint.iacr.org/2020/1057 MuSig-DN]. However, this comes at the cost of having no ability to generate nonces deterministically and the requirement to securely handle signing state.
|
||||
|
||||
=== Design ===
|
||||
|
||||
* The output of the ''KeyAgg'' algorithm depends on the order of the input public keys.
|
||||
* It is possible to sort the public keys with the ''KeySort'' algorithm before key aggregation to ensure the same output, independent of the (initial) order.
|
||||
* The KeyAgg coefficient is computed by hashing the key instead of key index. Otherwise, if the pubkey list gets sorted, the signer needs to translate between key indices pre- and post-sorting.
|
||||
* The second unique key in the pubkey list given to ''KeyAgg'' (as well as any keys identical to this key) gets the constant KeyAgg coefficient 1 which saves an exponentiation (see the MuSig2* appendix in the [https://eprint.iacr.org/2020/1261 MuSig2 paper]).
|
||||
* The public key inputs are serialized using x-only (32 byte) instead of compressed (33 byte) serialization. The reason for this is that as x-only keys are becoming more common, the full key may not be available.
|
||||
* The public nonces are serialized in compressed format (33 bytes). We accept the small overhead compared to x-only serialization to avoid complicating the specification.
|
||||
* This specification supports signing for ''tweaked'' aggregate public keys. There are two modes of tweaking. ''Ordinary'' tweaking allows deriving child aggregate public keys per [https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki BIP32]. ''X-only'' tweaking allows creating a [https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki BIP341] Taproot tweak. See section [[#tweaking|Tweaking]] below for details.
|
||||
* '''Compatibility with BIP340''': The aggregate public key created as part of this MuSig2 specification is a BIP340 X-only public key, and the signature output at the end of the protocol is a BIP340 signature that passes BIP340 verification for the aggregate key and a message. The public keys that are input to the key aggregation algorithm are also X-only public keys. Compared to compressed serialization, this adds complexity to the specification, but as X-only keys are becoming more common, the full key may not be available.
|
||||
* '''Tweaking for BIP32 derivations and Taproot''': The specification supports tweaking aggregate public keys and signing for tweaked aggregate public keys. We distinguish two modes of tweaking: ''Ordinary'' tweaking can be used to derive child aggregate public keys per [https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki BIP32]. ''X-only'' tweaking, on the other hand, allows creating a [https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki BIP341] tweak to add script paths to a Taproot output. See section [[#tweaking|Tweaking]] below for details.
|
||||
* '''Non-interactive signing with preprocessing''': The first communication round, exchanging the nonces, can happen before the message or even the exact set of signers is determined. Therefore, the signers can view it as a preprocessing step. Later, when the parameters of the signing session are chosen, they can send partial signatures without additional interaction.
|
||||
* '''Key aggregation optionally independent of order''': The output of the key aggregation algorithm depends on the order of the input public keys. The specification defines an algorithm to sort the public keys before key aggregation. This will ensure the same output, independent of the initial order. Key aggregation does not sort the public keys by default because applications often already have a common order of signers. Then, sorting is unnecessary and very slow for a large set of signers compared to the rest of the MuSig2 protocol. In the worst case, sorting algorithms in standard libraries can have quadratic run time, which is undesirable in adversarial settings. Nonetheless, standards using this specification can mandate sorting before aggregation. Note that the key aggregation coefficient is computed by hashing the public key instead of its index, which requires one more invocation of the SHA-256 compression function. However, it results in significantly simpler implementations because signers do not need to translate between public key indices before and after sorting.
|
||||
* '''Third party nonce aggregation''': Instead of every signer sending their nonce to every other signer, it is possible to use an untrusted third party that collects all signers' nonces, computes an aggregate nonce, and broadcasts it to the signers. This reduces the communication complexity from quadratic to linear in the number of signers. If the aggregator sends an incorrect aggregate nonce, the signing session will fail to produce a valid Schnorr signature. However, the aggregator cannot negatively affect the security of the scheme.
|
||||
* '''Partial signature verification''': If any signer sends a partial signature contribution that was not created by honestly following the protocol, the signing session will fail to produce a valid Schnorr signature. This standard specifies a partial signature verification algorithm to identify disruptive signers. It is incompatible with third-party nonce aggregation because it would be impossible to tell if a signer or the aggregator is to blame.
|
||||
* '''MuSig2* optimization''': The specification uses an optimization that allows saving a point multiplication in key aggregation. The MuSig2 scheme with this optimization is called MuSig2* and proven secure in the appendix of the [https://eprint.iacr.org/2020/1261 MuSig2 paper]. The optimization is that the second key in the list of public keys given to the key aggregation algorithm (as well as any keys identical to this key) gets the constant key aggregation coefficient ''1''.
|
||||
* '''Parameterization of MuSig2 and security''': In this specification, each signer's nonce consists of two elliptic curve points. The [https://eprint.iacr.org/2020/1261 MuSig2 paper] gives distinct security proofs depending on the number of points that constitute a nonce. See section [[#choosing-the-size-of-the-nonce|Choosing the Size of the Nonce]] for a discussion.
|
||||
|
||||
The specification itself is designed such that efficiency and clarity are balanced.
|
||||
The algorithms, as specified, are not optimal in terms of computation and space.
|
||||
In particular, some values are recomputed but can be cached in actual implementations (see [[#signing-flow|Signing Flow]]).
|
||||
Also, the signers' public nonces are serialized in compressed format (33 bytes) instead of the smaller (32 bytes) but more complicated X-only serialization.
|
||||
|
||||
== Description ==
|
||||
|
||||
@ -149,6 +170,7 @@ Input:
|
||||
|
||||
==== Nonce Aggregation ====
|
||||
|
||||
Input:
|
||||
* The number ''u'' of ''pubnonces'' with ''0 < u < 2^32''
|
||||
* The public nonces ''pubnonce<sub>1..u</sub>'': ''u'' 66-byte arrays
|
||||
|
||||
@ -183,6 +205,7 @@ We write "Let ''(aggnonce, u, pk<sub>1..u</sub>, v, tweak<sub>1..v</sub>, is_xon
|
||||
* Let ''e = int(hash<sub>BIP0340/challenge</sub>(bytes(R) || bytes(Q) || m)) mod n''
|
||||
* Return ''(Q, gacc<sub>v</sub>, tacc<sub>v</sub>, b, R, e)''
|
||||
|
||||
|
||||
'''''GetSessionKeyAggCoeff(session_ctx, P)''''':
|
||||
* Let ''(_, u, pk<sub>1..u</sub>, _, _, _, _) = session_ctx''
|
||||
* Return ''KeyAggCoeff(pk<sub>1..u</sub>, bytes(P))''
|
||||
@ -406,6 +429,25 @@ Given a successful adversary against the security game (EUF-CMA) for the modifie
|
||||
|
||||
We conclude that these two modifications preserve the security of the MuSig2* scheme.
|
||||
|
||||
|
||||
=== Choosing the Size of the Nonce ===
|
||||
|
||||
The [https://eprint.iacr.org/2020/1261 MuSig2 paper] contains two security proofs that apply to different protocol variants.
|
||||
The first is for a variant where each signer's nonce consists of four elliptic curve points and uses the random oracle model (ROM).
|
||||
In the second variant, the signers' nonces consist of only two points.
|
||||
Its proof requires a stronger model, namely the combination of the ROM and the algebraic group model (AGM).
|
||||
Relying on the stronger model is a legitimate choice for the following reasons:
|
||||
|
||||
First, an approach widely taken is interpreting a Forking Lemma proof in the ROM merely as design justification and ignoring the loss of security due to the Forking Lemma.
|
||||
If one believes in this approach, then the ROM may not be the optimal model in the first place because some parts of the concrete security bound are arbitrarily ignored.
|
||||
One may just as well move to the ROM+AGM model, which produces bounds close to the best-known attacks, e.g., for Schnorr signatures.
|
||||
|
||||
Second, as of this writing, there is no instance of a serious protocol with a security proof in the AGM that is not secure in practice.
|
||||
There are, however, insecure toy schemes with AGM security proofs, but those explicitly violate the requirements of the AGM.
|
||||
[https://eprint.iacr.org/2022/226.pdf Broken AGM proofs of toy schemes] provide group elements to the adversary without declaring them as group element inputs.
|
||||
In contrast, in MuSig2, all group elements that arise in the protocol are known to the adversary and declared as group element inputs.
|
||||
A scheme very similar to MuSig2 and with two-point nonces was independently proven secure in the ROM and AGM by [https://eprint.iacr.org/2020/1245 Alper and Burdges].
|
||||
|
||||
== Footnotes ==
|
||||
|
||||
<references />
|
||||
|
Loading…
x
Reference in New Issue
Block a user