Skip to content

Commit ef3a16e

Browse files
author
Robert Spigler
authored
Update and rename Multisig Derivation Standard.mediawiki to Modern Derivation Standard.mediawiki
Multisig and singlesig support
1 parent a067f9c commit ef3a16e

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

Multisig Derivation Standard.mediawiki renamed to Modern Derivation Standard.mediawiki

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<pre>
22
BIP: Number not assigned
33
Layer: Applications
4-
Title: Modern Hierarchy for Deterministic Multisignature Wallets
4+
Title: Signature and Script Independant Hierarchy for Deterministic Wallets
55
Author: Robert Spigler <[email protected]>
66
Comments-Summary: No comments
77
Comments-URI:
@@ -16,23 +16,23 @@ This BIP is licensed under the 2-clause BSD license.
1616

1717
==Abstract==
1818

19-
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).
19+
This BIP defines a sane hierarchy for deterministic 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).
2020

2121
This BIP is a particular application of BIP43.
2222

2323
==Motivation==
2424

25-
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.
25+
With the increase of adoption of new technologies such as [https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md the descriptor language] it is necessary to create a common derivation scheme that makes use of all new technologies.
2626

2727
There are many issues with the current standards. As background, BIP 44/49/84 specifies:
2828

2929
<pre>
3030
m / purpose' / coin_type' / account' / change / address_index
3131
</pre>
3232

33-
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).
33+
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 BIPs are restricted for single sig wallets. This is unecessary, as descriptors handle whether the scripts are single-key or multi-key.
3434

35-
Standardization is needed for multisig derivation paths. There are some in existence, but all have issues. For example, BIP45 specifies:
35+
Modification is also needed for multisig derivation paths. For example, BIP45 specifies:
3636

3737
<pre>
3838
m / purpose' / cosigner_index / change / address_index
@@ -46,9 +46,9 @@ The second multisignature "standard" in use is m/48', which specifies:
4646
m / purpose' / coin_type' / account' / script_type' / change / address_index
4747
</pre>
4848

49-
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.
49+
Rather than following in BIP 44/49/84's path and 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.
5050

51-
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.
51+
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, regardless of the script or signature type.
5252

5353
Any script that is supported by descriptors (and the specific wallet implementation) is compatible with this BIP.
5454

@@ -60,7 +60,9 @@ Any wallet that supports descriptors inherently supports deterministic key sorti
6060

6161
==Path levels==
6262

63-
You should not be mixing keys and scripts. We define the following 5 levels in the BIP32 path:
63+
We should not be mixing keys and scripts in the same layer. The wallet should create extended private/public keys independent of the script or signature type, whereas the descriptor language tells wallets to watch (single or multi-sig) outputs with the specified public keys.
64+
65+
We define the following 5 levels in the BIP32 path:
6466

6567
<pre>
6668
m / purpose' / coin_type' / account' / change / address_index
@@ -99,6 +101,10 @@ This number is used as child index in BIP32 derivation.
99101

100102
Hardened derivation is used at this level.
101103

104+
It is crucial that the index is increased for each new wallet joined or private/public keys created; for both privacy and cryptographic purposes.
105+
For example, in multisignature wallets, before sending a new key record to a coordinator, the wallet must increment the <code>account'</code> level. Before creating it's own single signature wallet, the <code>account'</code> level must again be incremented.
106+
This prevents key reuse - across single signature and multisignature wallets, across ECDSA and Schnorr signatures, and inbetween the same wallet types.
107+
102108
===Change===
103109

104110
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.
@@ -217,6 +223,5 @@ Original mailing list thread: TBD
217223
* [[bip-0043.mediawiki|BIP43 - Purpose Field for Deterministic Wallets]]
218224
* [[bip-0044.mediawiki|BIP44 - Multi-Account Hierarchy for Deterministic Wallets]]
219225
* [https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md Output Descriptors]
220-
* [[bip-0174.mediawiki|BIP174 - Partially Signed Bitcoin Transaction Format]]
221226
* [[bip-0067.mediawiki|BIP67 - Deterministic Pay-to-script-hash multi-signature addresses through public key sorting]]
222227

0 commit comments

Comments
 (0)