From b56a04c300c00609f38b1b70cf005458abbe705d Mon Sep 17 00:00:00 2001 From: BitWasp Date: Thu, 12 Feb 2015 21:02:56 +0000 Subject: [PATCH 01/13] Add BIP90 - until a correct BIP number is assigned --- bip-0090.mediawiki | 106 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 bip-0090.mediawiki diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki new file mode 100644 index 00000000..36ec551e --- /dev/null +++ b/bip-0090.mediawiki @@ -0,0 +1,106 @@ + +
+  BIP: xx
+  Title: Deterministic Pay-to-script-hash multisignature addresses through public key sorting
+  Author: Thomas Kerin, Jean-Pierre Rupp, Ruben de Vries
+  Status: Draft
+  Type: Informational
+  Created: 8 February 2015
+
+ +==Abstract== + +This BIP describes a method to deterministically generate multi-signature transaction scripts. It focuses on defining how the public keys must be encoded and sorted so that the redeem script and corresponding P2SH address are always the same for a given set of keys and number of required signatures. + +==Motivation== + +Most multi-signature transactions are addressed to P2SH (pay-to-script-hash) addresses, as defined in BIP-0016. + +Multi-signature redeem scripts do not require a particular ordering or encoding for public keys. This means that for a given set of keys and number of required signatures, there are as many as 2(n!) possible standard redeem scripts, each with its separate P2SH address. Adhering to a an ordering scheme and key encoding would ensure that a multi-signature “account” (set of public keys and required signature count) has a canonical P2SH address. + +By adopting a sorting and encoding standard, compliant wallets will always produce the same P2SH address for the same given set of keys and required signature count, making it easier to recognize transactions involving that multi-signature account. This is particularly attractive for multisignature hierarchical-deterministic wallets, as less state is required to setup multi-signature accounts: only the number of required signatures and master public keys of participants need to be shared, and all wallets will generate the same addresses. + +While most web wallets do not presently facilitate the setup of multisignature accounts with users of a different service, conventions which ensure cross-compatibility should make it easier to achieve this. + +Many wallet as a service providers use a 2of3 multi-signature schema where the user stores 1 of the keys (offline) as backup while using the other key for daily use and letting the service cosign his transactions. +This standard will help in enabling a party other than the service provider to recover the wallet without any help from the service provider. + +==Implementation== + +For a set of public keys, ensure that they have been received in compressed form, sort them lexicographically according to their binary representation before using the resulting list of keys in a standard multisig redeem script. Hash the redeem script according to BIP-0016 to get the P2SH address. + +==Compatibility== + +* Uncompressed keys are incompatible with this specificiation. A compatible implementation should not automatically compress keys. Receiving an uncompressed key from a multisig participant should be interpreted as a sign that the user has an incompatible implementation. +* P2SH addressses do not reveal information about the script that is receiving the funds. For this reason it is not technically possible to enforce this BIP as a rule on the network. Also, it would cause a hard fork. +* Implementations that do not conform with this BIP will have compatibility issues with strictly-compliant wallets. +* Implementations which do adopt this standard will be cross-compatible when choosing multisig addressses. +* If a group of users were not entirely compliant, there is the possibility that a participant will derive an address that the others will not recognize as part of the common multisig account. + +==Test vectors== +Two signatures are required in each of these test vectors. + +Vector 1 +* List +** 02ff12471208c14bd580709cb2358d98975247d8765f92bc25eab3b2763ed605f8 +** 02fe6f0a5a297eb38c391581c4413e084773ea23954d93f7753db7dc0adc188b2f +* Sorted +** 02fe6f0a5a297eb38c391581c4413e084773ea23954d93f7753db7dc0adc188b2f +** 02ff12471208c14bd580709cb2358d98975247d8765f92bc25eab3b2763ed605f8 +* Script +** 522102fe6f0a5a297eb38c391581c4413e084773ea23954d93f7753db7dc0adc188b2f2102ff12471208c14bd580709cb2358d98975247d8765f92bc25eab3b2763ed605f852ae +* Address +** 39bgKC7RFbpoCRbtD5KEdkYKtNyhpsNa3Z + +Vector 2 (Already sorted, no action required) +* List: +** 02632b12f4ac5b1d1b72b2a3b508c19172de44f6f46bcee50ba33f3f9291e47ed0 +** 027735a29bae7780a9755fae7a1c4374c656ac6a69ea9f3697fda61bb99a4f3e77 +** 02e2cc6bd5f45edd43bebe7cb9b675f0ce9ed3efe613b177588290ad188d11b404 +* Sorted: +** 02632b12f4ac5b1d1b72b2a3b508c19172de44f6f46bcee50ba33f3f9291e47ed0 +** 027735a29bae7780a9755fae7a1c4374c656ac6a69ea9f3697fda61bb99a4f3e77 +** 02e2cc6bd5f45edd43bebe7cb9b675f0ce9ed3efe613b177588290ad188d11b404 +* Script +** 522102632b12f4ac5b1d1b72b2a3b508c19172de44f6f46bcee50ba33f3f9291e47ed021027735a29bae7780a9755fae7a1c4374c656ac6a69ea9f3697fda61bb99a4f3e772102e2cc6bd5f45edd43bebe7cb9b675f0ce9ed3efe613b177588290ad188d11b40453ae +* Address +** 3CKHTjBKxCARLzwABMu9yD85kvtm7WnMfH + +Vector 3: +* List: +** 030000000000000000000000000000000000004141414141414141414141414141 +** 020000000000000000000000000000000000004141414141414141414141414141 +** 020000000000000000000000000000000000004141414141414141414141414140 +** 030000000000000000000000000000000000004141414141414141414141414140 +* Sorted: +** 020000000000000000000000000000000000004141414141414141414141414140 +** 020000000000000000000000000000000000004141414141414141414141414141 +** 030000000000000000000000000000000000004141414141414141414141414140 +** 030000000000000000000000000000000000004141414141414141414141414141 +* Script +** 522102000000000000000000000000000000000000414141414141414141414141414021020000000000000000000000000000000000004141414141414141414141414141210300000000000000000000000000000000000041414141414141414141414141402103000000000000000000000000000000000000414141414141414141414141414154ae +* Address +** 32V85igBri9zcfBRVupVvwK18NFtS37FuD + +Vector 4: (from bitcore) +* List: +** 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da +** 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 +** 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 +* Sorted: +** 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 +** 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da +** 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 +* Script +** 5221021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc1821022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da2103e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e953ae +* Address +** 3Q4sF6tv9wsdqu2NtARzNCpQgwifm2rAba + +==Usage & Implementations== +* BIP45 - Structure for Deterministic P2SH Multisignature Wallets - https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki#address-generation-procedure +* Bitcore - https://github.com/bitpay/bitcore/blob/50a868cb8cdf2be04bb1c5bf4bcc064cc06f5888/lib/script/script.js#L541 +* Haskoin - https://github.com/haskoin/haskoin/blob/master/Network/Haskoin/Script/Parser.hs#L112-122 +* Armory - https://github.com/etotheipi/BitcoinArmory/blob/268db0f3fa20c989057bd43343a43b2edbe89aeb/armoryengine/ArmoryUtils.py#L1441 +* Multisignature Brainwallet - http://ms-brainwallet.org/ + + From 9b5c50ef7b94464382c7416b198d31c13b419018 Mon Sep 17 00:00:00 2001 From: BitWasp Date: Thu, 12 Feb 2015 21:13:30 +0000 Subject: [PATCH 02/13] Add dashes. --- bip-0090.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki index 36ec551e..11961f60 100644 --- a/bip-0090.mediawiki +++ b/bip-0090.mediawiki @@ -16,7 +16,7 @@ This BIP describes a method to deterministically generate multi-signature transa Most multi-signature transactions are addressed to P2SH (pay-to-script-hash) addresses, as defined in BIP-0016. -Multi-signature redeem scripts do not require a particular ordering or encoding for public keys. This means that for a given set of keys and number of required signatures, there are as many as 2(n!) possible standard redeem scripts, each with its separate P2SH address. Adhering to a an ordering scheme and key encoding would ensure that a multi-signature “account” (set of public keys and required signature count) has a canonical P2SH address. +Multi-signature redeem scripts do not require a particular ordering or encoding for public keys. This means that for a given set of keys and number of required signatures, there are as many as 2(n!) possible standard redeem scripts, each with its separate P2SH address. Adhering to an ordering and key encoding would ensure that a multi-signature “account” (set of public keys and required signature count) has a canonical P2SH address. By adopting a sorting and encoding standard, compliant wallets will always produce the same P2SH address for the same given set of keys and required signature count, making it easier to recognize transactions involving that multi-signature account. This is particularly attractive for multisignature hierarchical-deterministic wallets, as less state is required to setup multi-signature accounts: only the number of required signatures and master public keys of participants need to be shared, and all wallets will generate the same addresses. From 9ce316de9439b8f8871ac6ab12b70c34859543d3 Mon Sep 17 00:00:00 2001 From: BitWasp Date: Fri, 13 Feb 2015 12:26:12 +0000 Subject: [PATCH 03/13] Rename implementation -> specification --- bip-0090.mediawiki | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki index 11961f60..6cd2ac91 100644 --- a/bip-0090.mediawiki +++ b/bip-0090.mediawiki @@ -25,10 +25,24 @@ While most web wallets do not presently facilitate the setup of multisignature a Many wallet as a service providers use a 2of3 multi-signature schema where the user stores 1 of the keys (offline) as backup while using the other key for daily use and letting the service cosign his transactions. This standard will help in enabling a party other than the service provider to recover the wallet without any help from the service provider. -==Implementation== +==Specification== -For a set of public keys, ensure that they have been received in compressed form, sort them lexicographically according to their binary representation before using the resulting list of keys in a standard multisig redeem script. Hash the redeem script according to BIP-0016 to get the P2SH address. +For a set of public keys, ensure that they have been received in compressed form: + 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da + 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 + 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 + +Sort them lexicographically according to their binary representation: + 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 + 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da + 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 +..before using the resulting list of keys in a standard multisig redeem script: + OP_m 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 OP_n OP_CHECKSIG + +Hash the redeem script according to BIP-0016 to get the P2SH address. + 3Q4sF6tv9wsdqu2NtARzNCpQgwifm2rAba + ==Compatibility== * Uncompressed keys are incompatible with this specificiation. A compatible implementation should not automatically compress keys. Receiving an uncompressed key from a multisig participant should be interpreted as a sign that the user has an incompatible implementation. From 5cf77f147a6fce18fa900174592dc4474c41611a Mon Sep 17 00:00:00 2001 From: BitWasp Date: Fri, 13 Feb 2015 21:08:13 +0000 Subject: [PATCH 04/13] update script --- bip-0090.mediawiki | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki index 6cd2ac91..aaec6ac2 100644 --- a/bip-0090.mediawiki +++ b/bip-0090.mediawiki @@ -38,13 +38,12 @@ Sort them lexicographically according to their binary representation: 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 ..before using the resulting list of keys in a standard multisig redeem script: - OP_m 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 OP_n OP_CHECKSIG + OP_2 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 OP_3 OP_CHECKSIG Hash the redeem script according to BIP-0016 to get the P2SH address. 3Q4sF6tv9wsdqu2NtARzNCpQgwifm2rAba ==Compatibility== - * Uncompressed keys are incompatible with this specificiation. A compatible implementation should not automatically compress keys. Receiving an uncompressed key from a multisig participant should be interpreted as a sign that the user has an incompatible implementation. * P2SH addressses do not reveal information about the script that is receiving the funds. For this reason it is not technically possible to enforce this BIP as a rule on the network. Also, it would cause a hard fork. * Implementations that do not conform with this BIP will have compatibility issues with strictly-compliant wallets. From 9f15ac4eb457c50d989d5da5305107e04a938937 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Wed, 11 Mar 2015 12:30:59 +0000 Subject: [PATCH 05/13] Add line so that pubkeys + address in specificiation are displayed --- bip-0090.mediawiki | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki index aaec6ac2..f7904eb0 100644 --- a/bip-0090.mediawiki +++ b/bip-0090.mediawiki @@ -28,19 +28,23 @@ This standard will help in enabling a party other than the service provider to r ==Specification== For a set of public keys, ensure that they have been received in compressed form: + 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 Sort them lexicographically according to their binary representation: + 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 ..before using the resulting list of keys in a standard multisig redeem script: + OP_2 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 OP_3 OP_CHECKSIG Hash the redeem script according to BIP-0016 to get the P2SH address. + 3Q4sF6tv9wsdqu2NtARzNCpQgwifm2rAba ==Compatibility== From 376d3cd6f8752db3b434a64b63f903f3f429518c Mon Sep 17 00:00:00 2001 From: Ruben de Vries Date: Wed, 11 Mar 2015 18:56:53 +0100 Subject: [PATCH 06/13] add bitcoinJ --- bip-0090.mediawiki | 1 + 1 file changed, 1 insertion(+) diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki index f7904eb0..dee9c5d9 100644 --- a/bip-0090.mediawiki +++ b/bip-0090.mediawiki @@ -119,5 +119,6 @@ Vector 4: (from bitcore) * Haskoin - https://github.com/haskoin/haskoin/blob/master/Network/Haskoin/Script/Parser.hs#L112-122 * Armory - https://github.com/etotheipi/BitcoinArmory/blob/268db0f3fa20c989057bd43343a43b2edbe89aeb/armoryengine/ArmoryUtils.py#L1441 * Multisignature Brainwallet - http://ms-brainwallet.org/ +* BitcoinJ - https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L331 From 08655a0ccc3a89b2e714248e6ded127ee26a2874 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Sun, 15 Mar 2015 12:43:02 +0000 Subject: [PATCH 07/13] Rename to assigned number: BIP 0067 --- bip-0090.mediawiki => bip-0067.mediawiki | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename bip-0090.mediawiki => bip-0067.mediawiki (99%) diff --git a/bip-0090.mediawiki b/bip-0067.mediawiki similarity index 99% rename from bip-0090.mediawiki rename to bip-0067.mediawiki index dee9c5d9..15fb48f6 100644 --- a/bip-0090.mediawiki +++ b/bip-0067.mediawiki @@ -1,6 +1,6 @@
-  BIP: xx
+  BIP: 67
   Title: Deterministic Pay-to-script-hash multisignature addresses through public key sorting
   Author: Thomas Kerin, Jean-Pierre Rupp, Ruben de Vries
   Status: Draft
@@ -121,4 +121,3 @@ Vector 4: (from bitcore)
 * Multisignature Brainwallet - http://ms-brainwallet.org/
 * BitcoinJ - https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L331
     
-

From deb4ad4d03a37ff971ee272691d6c285e52e5e35 Mon Sep 17 00:00:00 2001
From: Thomas Kerin 
Date: Sun, 15 Mar 2015 14:53:42 +0000
Subject: [PATCH 08/13] Tidy ups, add BIP0067 to README, and change Type:
 informational -> standard

---
 README.mediawiki   | 6 ++++++
 bip-0067.mediawiki | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/README.mediawiki b/README.mediawiki
index d624eb57..56f15d53 100644
--- a/README.mediawiki
+++ b/README.mediawiki
@@ -248,6 +248,12 @@ Those proposing changes should consider that ultimately consent may rest with th
 | Standard
 | Draft
 |-
+| [[bip-0067.mediawiki|67]]
+| Deterministic P2SH multi-signature addresses
+| Thomas Kerin
+| Standard
+| Draft
+|-
 | [[bip-0070.mediawiki|70]]
 | Payment protocol
 | Gavin Andresen
diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki
index 15fb48f6..83fc4603 100644
--- a/bip-0067.mediawiki
+++ b/bip-0067.mediawiki
@@ -1,10 +1,10 @@
 
 
   BIP: 67
-  Title: Deterministic Pay-to-script-hash multisignature addresses through public key sorting
+  Title: Deterministic Pay-to-script-hash multi-signature addresses through public key sorting
   Author: Thomas Kerin, Jean-Pierre Rupp, Ruben de Vries
   Status: Draft
-  Type: Informational
+  Type: Standard
   Created: 8 February 2015
 
From b8bcab2947d0295a91b59a372a00dbea1969c220 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Sun, 12 Apr 2015 15:57:19 +0100 Subject: [PATCH 09/13] Remove multisignature brainwallet --- bip-0067.mediawiki | 1 - 1 file changed, 1 deletion(-) diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki index 83fc4603..f0596d3c 100644 --- a/bip-0067.mediawiki +++ b/bip-0067.mediawiki @@ -118,6 +118,5 @@ Vector 4: (from bitcore) * Bitcore - https://github.com/bitpay/bitcore/blob/50a868cb8cdf2be04bb1c5bf4bcc064cc06f5888/lib/script/script.js#L541 * Haskoin - https://github.com/haskoin/haskoin/blob/master/Network/Haskoin/Script/Parser.hs#L112-122 * Armory - https://github.com/etotheipi/BitcoinArmory/blob/268db0f3fa20c989057bd43343a43b2edbe89aeb/armoryengine/ArmoryUtils.py#L1441 -* Multisignature Brainwallet - http://ms-brainwallet.org/ * BitcoinJ - https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L331 From ff22fdf042dd9e16627a5ca57fc6991d5d449f63 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Sun, 12 Apr 2015 15:58:45 +0100 Subject: [PATCH 10/13] With acknowledgements to BtcDrak --- bip-0067.mediawiki | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki index f0596d3c..54afa005 100644 --- a/bip-0067.mediawiki +++ b/bip-0067.mediawiki @@ -113,6 +113,9 @@ Vector 4: (from bitcore) * Address ** 3Q4sF6tv9wsdqu2NtARzNCpQgwifm2rAba +==Acknowledgements== +The authors wish to thank BtcDrak for his involvement in the early discussions of this BIP. + ==Usage & Implementations== * BIP45 - Structure for Deterministic P2SH Multisignature Wallets - https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki#address-generation-procedure * Bitcore - https://github.com/bitpay/bitcore/blob/50a868cb8cdf2be04bb1c5bf4bcc064cc06f5888/lib/script/script.js#L541 From 1c000480d4af17bb19e0bfc42ecddc76a393ad59 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Mon, 27 Apr 2015 17:15:26 +0100 Subject: [PATCH 11/13] Specifically mention BIP-0011 (P2SH) Also add acknowledgement to Luke-Jr --- bip-0067.mediawiki | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki index 54afa005..a7aacec1 100644 --- a/bip-0067.mediawiki +++ b/bip-0067.mediawiki @@ -10,13 +10,13 @@ ==Abstract== -This BIP describes a method to deterministically generate multi-signature transaction scripts. It focuses on defining how the public keys must be encoded and sorted so that the redeem script and corresponding P2SH address are always the same for a given set of keys and number of required signatures. +This BIP describes a method to deterministically generate multi-signature pay-to-script-hash transaction scripts. It focuses on defining how the public keys must be encoded and sorted so that the redeem script and corresponding P2SH address are always the same for a given set of keys and number of required signatures. ==Motivation== -Most multi-signature transactions are addressed to P2SH (pay-to-script-hash) addresses, as defined in BIP-0016. +Pay-to-script-hash (BIP-0011[https://github.com/bitcoin/bips/blob/master/bip-0011.mediawiki BIP-0011]) is a transaction type that allows funding of arbitrary scripts, where the recipient carries the cost of fee's associated with using longer, more complex scripts. -Multi-signature redeem scripts do not require a particular ordering or encoding for public keys. This means that for a given set of keys and number of required signatures, there are as many as 2(n!) possible standard redeem scripts, each with its separate P2SH address. Adhering to an ordering and key encoding would ensure that a multi-signature “account” (set of public keys and required signature count) has a canonical P2SH address. +Multi-signature pay-to-script-hash transactions are defined in BIP-0016[https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki BIP-0016]. The redeem script does not require a particular ordering or encoding for public keys. This means that for a given set of keys and number of required signatures, there are as many as 2(n!) possible standard redeem scripts, each with its separate P2SH address. Adhering to an ordering and key encoding would ensure that a multi-signature “account” (set of public keys and required signature count) has a canonical P2SH address. By adopting a sorting and encoding standard, compliant wallets will always produce the same P2SH address for the same given set of keys and required signature count, making it easier to recognize transactions involving that multi-signature account. This is particularly attractive for multisignature hierarchical-deterministic wallets, as less state is required to setup multi-signature accounts: only the number of required signatures and master public keys of participants need to be shared, and all wallets will generate the same addresses. @@ -114,12 +114,12 @@ Vector 4: (from bitcore) ** 3Q4sF6tv9wsdqu2NtARzNCpQgwifm2rAba ==Acknowledgements== -The authors wish to thank BtcDrak for his involvement in the early discussions of this BIP. +The authors wish to thank BtcDrak and Luke-Jr for their involvement & contributions in the early discussions of this BIP. -==Usage & Implementations== -* BIP45 - Structure for Deterministic P2SH Multisignature Wallets - https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki#address-generation-procedure -* Bitcore - https://github.com/bitpay/bitcore/blob/50a868cb8cdf2be04bb1c5bf4bcc064cc06f5888/lib/script/script.js#L541 -* Haskoin - https://github.com/haskoin/haskoin/blob/master/Network/Haskoin/Script/Parser.hs#L112-122 -* Armory - https://github.com/etotheipi/BitcoinArmory/blob/268db0f3fa20c989057bd43343a43b2edbe89aeb/armoryengine/ArmoryUtils.py#L1441 -* BitcoinJ - https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L331 +==Usage & Implementations== +* [[https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki#address-generation-procedure|BIP-0045]] - Structure for Deterministic P2SH Multisignature Wallets +* [[https://github.com/bitpay/bitcore/blob/50a868cb8cdf2be04bb1c5bf4bcc064cc06f5888/lib/script/script.js#L541|Bitcore]] +* [[https://github.com/haskoin/haskoin/blob/master/Network/Haskoin/Script/Parser.hs#L112-122|Haskoin]] Bitcoin implementation in haskell +* [[https://github.com/etotheipi/BitcoinArmory/blob/268db0f3fa20c989057bd43343a43b2edbe89aeb/armoryengine/ArmoryUtils.py#L1441|Armory]] +* [[https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L331|BitcoinJ]] From 01e427ad97bd6050a015cdcca3a409eaef58eed5 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Mon, 27 Apr 2015 17:17:47 +0100 Subject: [PATCH 12/13] Add references section --- bip-0067.mediawiki | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki index a7aacec1..1b09afaa 100644 --- a/bip-0067.mediawiki +++ b/bip-0067.mediawiki @@ -123,3 +123,5 @@ The authors wish to thank BtcDrak and Luke-Jr for their involvement & contributi * [[https://github.com/etotheipi/BitcoinArmory/blob/268db0f3fa20c989057bd43343a43b2edbe89aeb/armoryengine/ArmoryUtils.py#L1441|Armory]] * [[https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L331|BitcoinJ]] +== References == + From 213e8a27a3a2eaaf44f79221a9f9f888af002801 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Mon, 27 Apr 2015 17:18:44 +0100 Subject: [PATCH 13/13] remove whitespace --- bip-0067.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki index 1b09afaa..9c4f3de5 100644 --- a/bip-0067.mediawiki +++ b/bip-0067.mediawiki @@ -122,6 +122,6 @@ The authors wish to thank BtcDrak and Luke-Jr for their involvement & contributi * [[https://github.com/haskoin/haskoin/blob/master/Network/Haskoin/Script/Parser.hs#L112-122|Haskoin]] Bitcoin implementation in haskell * [[https://github.com/etotheipi/BitcoinArmory/blob/268db0f3fa20c989057bd43343a43b2edbe89aeb/armoryengine/ArmoryUtils.py#L1441|Armory]] * [[https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L331|BitcoinJ]] - + == References ==