diff options
author | Robert Spigler <RobertSpigler@ProtonMail.ch> | 2021-03-11 16:17:51 -0500 |
---|---|---|
committer | Robert Spigler <RobertSpigler@ProtonMail.ch> | 2021-03-11 16:17:51 -0500 |
commit | a067f9ca085e296d383399aa62e1752b09117523 (patch) | |
tree | 8a0b54d188d0e544b73a43bef2145ab58f49c68a | |
parent | 675c3a8703d79e09807d6426c73f7c301c1d3eb7 (diff) | |
download | bips-a067f9ca085e296d383399aa62e1752b09117523.tar.xz |
Formatting
-rw-r--r-- | Multisig Derivation Standard.mediawiki | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/Multisig Derivation Standard.mediawiki b/Multisig Derivation Standard.mediawiki index 6d11c6e..e44dcdc 100644 --- a/Multisig Derivation Standard.mediawiki +++ b/Multisig Derivation Standard.mediawiki @@ -16,16 +16,13 @@ This BIP is licensed under the 2-clause BSD license. ==Abstract== -This BIP defines a sane hierarchy for deterministic multisig wallets based on an algorithm described in BIP-0032 (BIP32 from now on), purpose scheme described in -BIP-0043 (BIP43 from now on), and multi-account hierarchy described in BIP-0044 (BIP44 from now on). +This BIP defines a sane hierarchy for deterministic multisig wallets based on an algorithm described in BIP-0032 (BIP32 from now on), purpose scheme described in BIP-0043 (BIP43 from now on), and multi-account hierarchy described in BIP-0044 (BIP44 from now on). This BIP is a particular application of BIP43. ==Motivation== -With the increase of more user friendly (offline) multisignature wallets, and adoption of new technologies such as -[https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md the descriptor language] and [https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki -BIP-0174 (Partially Signed Bitcoin Transactions)] it is necessary to create a common derivation scheme that makes use of all new technologies. +With the increase of more user friendly (offline) multisignature wallets, and adoption of new technologies such as [https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md the descriptor language] and [https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki BIP-0174 (Partially Signed Bitcoin Transactions)] it is necessary to create a common derivation scheme that makes use of all new technologies. There are many issues with the current standards. As background, BIP 44/49/84 specifies: @@ -33,9 +30,7 @@ There are many issues with the current standards. As background, BIP 44/49/84 sp m / purpose' / coin_type' / account' / change / address_index </pre> -where the BIP43 <code>purpose'</code> path is separate for each script (P2PKH, P2WPKH-in-P2SH, and P2WPKH respectively). However, these per-script derivations -are made redundant with descriptors, which describe a collection of output scripts. Note also that these are single sig derivations (which souldn't be reused for -multisig). +where the BIP43 <code>purpose'</code> path is separate for each script (P2PKH, P2WPKH-in-P2SH, and P2WPKH respectively). However, these per-script derivations are made redundant with descriptors, which describe a collection of output scripts. Note also that these are single sig derivations (which shouldn't be reused for multisig). Standardization is needed for multisig derivation paths. There are some in existence, but all have issues. For example, BIP45 specifies: @@ -43,24 +38,17 @@ Standardization is needed for multisig derivation paths. There are some in exis m / purpose' / cosigner_index / change / address_index </pre> -Like BIP44/49/84, BIP45 unecessarily demands a single script type (here, P2SH). In addition, BIP45 sets <code>cosigner_index</code> in order to sort the -<code>purpose'</code> public keys of each cosigner. This too is redundant, as descriptors can set the order of the public keys with <code>multi</code> or have -them sorted lexicographically (as described in [https://github.com/bitcoin/bips/blob/master/bip-0067.mediawiki BIP67) with <code>sortedmulti</code>. Sorting -public keys between cosigners in order to create the full derivation path, prior to sending the key record to the coordinator to create the descriptor, merely adds -additional unnecessary communication rounds. +Like BIP44/49/84, BIP45 unecessarily demands a single script type (here, P2SH). In addition, BIP45 sets <code>cosigner_index</code> in order to sort the <code>purpose'</code> public keys of each cosigner. This too is redundant, as descriptors can set the order of the public keys with <code>multi</code> or have them sorted lexicographically (as described in [https://github.com/bitcoin/bips/blob/master/bip-0067.mediawiki BIP67]) with <code>sortedmulti</code>. Sorting public keys between cosigners in order to create the full derivation path, prior to sending the key record to the coordinator to create the descriptor, merely adds additional unnecessary communication rounds. -There is an additional multisig derivation path in use "BIP"48 (there is no real standard), which specifies: +The second multisignature "standard" in use is m/48', which specifies: <pre> m / purpose' / coin_type' / account' / script_type' / change / address_index </pre> -Rather than having a separate BIP per script type after P2SH (BIP45), vendors decided to insert <code>script_type'</code> into the derivation path (where -P2SH-P2WSH=1, P2WSH=2, Future_Script=3, etc). As described previously, this is unnecessary, as the descriptor sets the script. While it attempts to reduce -maintainence work by getting rid of new BIPs-per-script, it still requires maintaining an updated, redundant, script_type list. +Rather than having a separate BIP per script after P2SH (BIP45), vendors decided to insert <code>script_type'</code> into the derivation path (where P2SH-P2WSH=1, P2WSH=2, Future_Script=3, etc). As described previously, this is unnecessary, as the descriptor sets the script. While it attempts to reduce maintainence work by getting rid of new BIPs-per-script, it still requires maintaining an updated, redundant, <code>script_type</code> list. -The hierarchy proposed in this paper is quite comprehensive. It allows the handling of multiple accounts, external and internal chains per account, and millions -of addresses per chain. +The hierarchy proposed later in this paper solves these issues and is quite comprehensive. It allows the handling of multiple accounts, external and internal chains per account, and millions of addresses per chain. Any script that is supported by descriptors (and the specific wallet implementation) is compatible with this BIP. @@ -68,8 +56,7 @@ This paper was inspired from BIP44. ==Key sorting== -Any wallet that supports descriptors inherently supports deterministic key sorting as per BIP67 (through the <code>sortedmulti</code> function) so that all -possible multisignature addresses/scripts are derived from deterministically sorted public keys. +Any wallet that supports descriptors inherently supports deterministic key sorting as per BIP67 (through the <code>sortedmulti</code> function) so that all possible multisignature addresses/scripts are derived from deterministically sorted public keys. ==Path levels== @@ -95,7 +82,7 @@ Hardened derivation is used at this level. One master node (seed) can be used for multiple Bitcoin networks. Sharing the same space for various networks has some disadvantages. -Avoiding reusing addresses across networks and improving privacy issues. +This level creates a separate subtree for every network, avoiding reusing addresses across networks and improving privacy issues. Coin type <code>0</code> for mainnet and <code>1</code> for testnet. @@ -105,8 +92,7 @@ Hardened derivation is used at this level. This level splits the key space into independent user identities, following the BIP44 pattern, so the wallet never mixes the coins across different accounts. -Users can use these accounts to organize the funds in the same fashion as bank accounts; for donation purposes (where all addresses are considered public), for -saving purposes, for common expenses, etc. +Users can use these accounts to organize the funds in the same fashion as bank accounts; for donation purposes (where all addresses are considered public), for saving purposes, for common expenses, etc. Accounts are numbered from index 0 in sequentially increasing manner. This number is used as child index in BIP32 derivation. @@ -115,9 +101,7 @@ Hardened derivation is used at this level. ===Change=== -Constant 0 is used for external chain and constant 1 for internal chain (also known as change addresses). External chain is used for addresses that are meant to be -visible outside of the wallet (e.g. for receiving payments). Internal chain is used for addresses which are not meant to be visible outside of the wallet and is -used for return transaction change. +Constant 0 is used for external chain and constant 1 for internal chain (also known as change addresses). External chain is used for addresses that are meant to be visible outside of the wallet (e.g. for receiving payments). Internal chain is used for addresses which are not meant to be visible outside of the wallet and is used for return transaction change. Public derivation is used at this level. @@ -232,6 +216,7 @@ Original mailing list thread: TBD * [[bip-0032.mediawiki|BIP32 - Hierarchical Deterministic Wallets]] * [[bip-0043.mediawiki|BIP43 - Purpose Field for Deterministic Wallets]] * [[bip-0044.mediawiki|BIP44 - Multi-Account Hierarchy for Deterministic Wallets]] -* [[https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md - Output Descriptors]] +* [https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md Output Descriptors] * [[bip-0174.mediawiki|BIP174 - Partially Signed Bitcoin Transaction Format]] * [[bip-0067.mediawiki|BIP67 - Deterministic Pay-to-script-hash multi-signature addresses through public key sorting]] + |