diff --git a/bip-0390.mediawiki b/bip-0390.mediawiki index a9660521..3c3e63e8 100644 --- a/bip-0390.mediawiki +++ b/bip-0390.mediawiki @@ -9,7 +9,7 @@ Type: Informational Created: 2024-06-04 License: CC0-1.0 - Requires: 380 + Requires: 380, 328 ==Abstract== @@ -30,6 +30,9 @@ in a MuSig2 aggregate key to be expressed in descriptors so that wallets can mor A new key expression is defined: musig(). +In the following sections, the term KEY refers to key expressions as defined in BIPs 380 +and 389. + ===musig(KEY, KEY, ..., KEY)=== The musig(KEY, KEY, ..., KEY) expression can only be used inside of a tr() @@ -49,16 +52,17 @@ backed up, or guess, the correct order of keys.. ===musig(KEY, KEY, ..., KEY)/NUM/.../*=== -musig(KEY, KEY, ..., KEY)/NUM/.../* expressions are also allowed, with the same usage -restrictions as in the previous section. The aggregate public key -is first computed as described above, with the keys also being sorted after all derivation and prior -to aggregation. Then further BIP 32 derivation will be performed on the aggregate public key as described in -[[bip-0328.mediawiki|BIP 328]]. As there is no aggregate private key, -only unhardened derivation from the aggregate public key is allowed, and thus the derivation steps -following the musig() expression cannot contain -/NUMh or /NUM' derivation steps nor /*h, or /*' child derivation. -For these musig() expressions, the KEY expressions contained within must be xpubs or derived from -xpubs, and cannot contain child derivation as specified by a /*, /*', /*h, or multipath as specified with /. +musig(KEY, KEY, ..., KEY)/NUM/.../* expressions are also allowed if no KEY expression +contains child derivation as specified by /* or multipath as specified with +/, in addition to the same usage restrictions as in the previous section. The KEY expressions +additionally must be xpubs or derived from xpubs. The aggregate public key is first computed as +described above, with the keys also being sorted after all derivation and prior to aggregation. +Then further BIP 32 derivation will be performed on the aggregate public key as described in +[[bip-0328.mediawiki|BIP 328]]. The /NUM/.../* following the musig() specifies +the derivation path to be used when deriving from the aggregate public key. /* is also +optional. As there is no aggregate private key, only unhardened derivation from the aggregate public +key is allowed. Thus these derivation steps cannot contain /NUMh or /NUM' +nor can child derivation be specified as /*h, or /*'. ==Test Vectors== @@ -99,6 +103,7 @@ Invalid descriptors * Cannot have multipath participants if musig() is also multipath: tr(musig(xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/<0;1>,xpub68NZiKmJWnxxS6aaHmn81bvJeTESw724CRDs6HbuccFQN9Ku14VQrADWgqbhhTHBaohPX4CjNLf9fq9MYo6oDaPPLPxSb7gwQN3ih19Zm4Y)/<2;3>) * musig() cannot have hardened derivation steps: tr(musig(xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL,xpub68NZiKmJWnxxS6aaHmn81bvJeTESw724CRDs6HbuccFQN9Ku14VQrADWgqbhhTHBaohPX4CjNLf9fq9MYo6oDaPPLPxSb7gwQN3ih19Zm4Y)/0h/*) * musig() cannot have hardened child derivation: tr(musig(xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL,xpub68NZiKmJWnxxS6aaHmn81bvJeTESw724CRDs6HbuccFQN9Ku14VQrADWgqbhhTHBaohPX4CjNLf9fq9MYo6oDaPPLPxSb7gwQN3ih19Zm4Y)/0/*h) +* musig() cannot have participants with child derivation when musig() has derivation steps: tr(musig(xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/*,xpub68NZiKmJWnxxS6aaHmn81bvJeTESw724CRDs6HbuccFQN9Ku14VQrADWgqbhhTHBaohPX4CjNLf9fq9MYo6oDaPPLPxSb7gwQN3ih19Zm4Y/*)/1/2 ==Backwards Compatibility==