Repository navigation
BIP Draft: NestedMuSig2 for BIP340-compatible Signatures - #2297
BEULAHEVANJALIN wants to merge 3 commits into
Conversation
|
Hi Beulah, thank you for your submission. At first glance your document makes a great impression. I just wanted to let you know that I have seen it, but I will only get around to giving it a full read in a few weeks. |
|
Congratulations on your hard work and reaching this milestone! I ran a few million tokens over your BIP and got these findings and fixes: https://github.com/patrickdugan/bips/blob/nested-musig2-review/nested-musig2-review/FINDINGS.md |
|
@patrickdugan addressing F1. Fixed the inconsistent wording in 4523ee0. I’ve kept the 32-byte xbytes(pubkey) hash input, following BIP327’s convention. |
danielabrozzoni
left a comment
There was a problem hiding this comment.
I'm unfortunately not knowledgeable enough to fully review this, but the structure looks good, and the introduction section is well written and understandable :)
I think you should submit the proposal to the mailing list to receive more feedback, and add the "Discussion:" link to the preamble, as specified in BIP3 (https://github.com/bitcoin/bips/blob/master/bip-0003.md#overview)
IsaqueFranklin
left a comment
There was a problem hiding this comment.
I've finished a first reading, and overall I think the text looks pretty solid. Nice work! Next, I'm planning to take a closer look at the main algorithms over the next few weeks.
I just think it's missing a general overview section, just like the one in BIP 327, especially the sub-section there about general signing flow. I think this would be a nice-to-have considering that most people reading this BIP won't read the paper, so a general introduction (without getting into much detail) just to build some context before the specification would be interesting.
| The Nested MuSig2 construction referenced by this specification does not define aggregate-key tweaking. This specification also supports the BIP327 aggregate-key tweaking mechanism only at the root aggregation node. If the application specifies root-level aggregate-key tweaks, it MUST apply them sequentially to ''keyagg_ctx<sub>0</sub>'' using BIP327 ''ApplyTweak''. Any participants who act as an aggregator at the root level MUST use the same ordered tweak sequence and the same ''is_xonly_t'' value for each tweak. For tweaks ''tweak<sub>1</sub>, ..., tweak<sub>v</sub>'', let ''keyagg_ctx<sub>0,0</sub> = keyagg_ctx<sub>0</sub>'' and, for ''i = 1, ..., v'', ''keyagg_ctx<sub>0,i</sub> = ApplyTweak(keyagg_ctx<sub>0,i−1</sub>, tweak<sub>i</sub>, is_xonly_t<sub>i</sub>)''. Fail if any invocation of ''ApplyTweak'' fails according to BIP327. | ||
|
|
There was a problem hiding this comment.
This specification also supports the BIP327 aggregate-key tweaking mechanism only at the root aggregation node.
I saw the explanation in the rationale about it. Is this just to simplify the specification, or is there a deeper cryptographic assumption/problem?
There was a problem hiding this comment.
This is just a simplification. If a non-root level aggregator is allowed to tweak then key aggregation and partialsig aggregation gets complicated.
| * Let ''R'<sub>1</sub> = cpoint_ext(nonce_path[0][0:33])''; if that fails, fail. | ||
| * Let ''R'<sub>2</sub> = cpoint_ext(nonce_path[0][33:66])''; if that fails, fail. | ||
| * Let ''R' = R'<sub>1</sub> + b<sub>0</sub>⋅R'<sub>2</sub>''. | ||
| * If ''R''' is the point at infinity, let ''R = G''. Otherwise, let ''R = R'''. |
There was a problem hiding this comment.
I believe this should be "If
| * Let ''out<sub>0</sub> = cbytes_ext(R<sub>1,0</sub>) || cbytes_ext(R<sub>2,0</sub>)''. Compute ''R' = R<sub>1,0</sub> + b<sub>0</sub>·R<sub>2,0</sub>''.<br>If ''R'' is the point at infinity, let ''R = G''; otherwise, let ''R = R''. This is the unchanged BIP327 root effective-nonce rule.<br>Intermediate binding factors do not appear explicitly in this root expression because they have already been incorporated into nested nonce contributions by preceding invocations of ''NonceAggExt''. | ||
|
|
There was a problem hiding this comment.
I think the infinity check here should refer to
If R is the point at infinity, let
$R = G$ ; otherwise, let$R = R$ .
Since
| Status: Draft | ||
| Type: Specification | ||
| Assigned: ? | ||
| License: BSD-3-Clause |
There was a problem hiding this comment.
Per BIP 3, please add a Discussion: 2026-11-19: https://groups.google.com/g/bitcoindev/c/eSgxP8NmEnA/m/oSxrtE9jAQAJ header on the line after License.
There was a problem hiding this comment.
Concept ACK. The main gap here was the mailing-list discussion (normally required prior to opening a PR here; see this repo's README and BIP 3) and addressing outstanding review feedback (thank you @IsaqueFranklin!)
Ran the tests locally.
it's missing a general overview section, just like the one in BIP 327, especially the sub-section there about general signing flow. I think this would be a nice-to-have considering that most people reading this BIP won't read the paper, so a general introduction (without getting into much detail) just to build some context before the specification would be interesting.
Agree.
|
|
||
| ==Security Considerations== | ||
|
|
||
| NestedMuSig2 is an interactive multi-signature protocol. Its security depends on correct nonce handling, correct recursive computation of key and nonce coefficients, consistent session state, and faithful implementation of the algorithms specified in this document. The security considerations of BIP327 apply in addition to the NestedMuSig2-specific considerations described below. |
There was a problem hiding this comment.
Should there be anything in this section about depth bounds / instantiation choices?
This PR proposes NestedMuSig2 for BIP340-compatible Signatures, a BIP draft extending BIP327 MuSig2 to support trees of nested signing groups. Each subgroup participates through its aggregate public key, and the complete tree produces a single BIP340 signature verifiable without knowledge of the internal structure.
The proposal includes the specification, a Python reference implementation, and test vectors covering nested key and nonce aggregation, signing, partial-signature verification, signature aggregation, and error handling. Multi-level examples and randomized tree tests accompany the vectors.
Review is particularly welcome on recursive nonce binding, signer session construction, root tweaks, and compatibility with BIP327 in the flat case. The construction remains n-of-n at each aggregation node.