From b56a04c300c00609f38b1b70cf005458abbe705d Mon Sep 17 00:00:00 2001 From: BitWasp Date: Thu, 12 Feb 2015 21:02:56 +0000 Subject: 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 0000000..36ec551 --- /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/ + + -- cgit v1.2.3 From 9b5c50ef7b94464382c7416b198d31c13b419018 Mon Sep 17 00:00:00 2001 From: BitWasp Date: Thu, 12 Feb 2015 21:13:30 +0000 Subject: Add dashes. --- bip-0090.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki index 36ec551..11961f6 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. -- cgit v1.2.3 From 9ce316de9439b8f8871ac6ab12b70c34859543d3 Mon Sep 17 00:00:00 2001 From: BitWasp Date: Fri, 13 Feb 2015 12:26:12 +0000 Subject: Rename implementation -> specification --- bip-0090.mediawiki | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki index 11961f6..6cd2ac9 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== - -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. - +==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_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. -- cgit v1.2.3 From 5cf77f147a6fce18fa900174592dc4474c41611a Mon Sep 17 00:00:00 2001 From: BitWasp Date: Fri, 13 Feb 2015 21:08:13 +0000 Subject: update script --- bip-0090.mediawiki | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki index 6cd2ac9..aaec6ac 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. -- cgit v1.2.3 From 9f15ac4eb457c50d989d5da5305107e04a938937 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Wed, 11 Mar 2015 12:30:59 +0000 Subject: 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 aaec6ac..f7904eb 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== -- cgit v1.2.3 From 376d3cd6f8752db3b434a64b63f903f3f429518c Mon Sep 17 00:00:00 2001 From: Ruben de Vries Date: Wed, 11 Mar 2015 18:56:53 +0100 Subject: add bitcoinJ --- bip-0090.mediawiki | 1 + 1 file changed, 1 insertion(+) diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki index f7904eb..dee9c5d 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 -- cgit v1.2.3 From 08655a0ccc3a89b2e714248e6ded127ee26a2874 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Sun, 15 Mar 2015 12:43:02 +0000 Subject: Rename to assigned number: BIP 0067 --- bip-0067.mediawiki | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++ bip-0090.mediawiki | 124 ----------------------------------------------------- 2 files changed, 123 insertions(+), 124 deletions(-) create mode 100644 bip-0067.mediawiki delete mode 100644 bip-0090.mediawiki diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki new file mode 100644 index 0000000..15fb48f --- /dev/null +++ b/bip-0067.mediawiki @@ -0,0 +1,123 @@ + +
+  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
+  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 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. + +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. + +==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== +* 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/ +* BitcoinJ - https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L331 + diff --git a/bip-0090.mediawiki b/bip-0090.mediawiki deleted file mode 100644 index dee9c5d..0000000 --- a/bip-0090.mediawiki +++ /dev/null @@ -1,124 +0,0 @@ - -
-  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 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. - -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. - -==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== -* 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/ -* BitcoinJ - https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java#L331 - - -- cgit v1.2.3 From deb4ad4d03a37ff971ee272691d6c285e52e5e35 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Sun, 15 Mar 2015 14:53:42 +0000 Subject: 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 d624eb5..56f15d5 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 15fb48f..83fc460 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
 
-- cgit v1.2.3 From b8bcab2947d0295a91b59a372a00dbea1969c220 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Sun, 12 Apr 2015 15:57:19 +0100 Subject: Remove multisignature brainwallet --- bip-0067.mediawiki | 1 - 1 file changed, 1 deletion(-) diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki index 83fc460..f0596d3 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 -- cgit v1.2.3 From ff22fdf042dd9e16627a5ca57fc6991d5d449f63 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Sun, 12 Apr 2015 15:58:45 +0100 Subject: With acknowledgements to BtcDrak --- bip-0067.mediawiki | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki index f0596d3..54afa00 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 -- cgit v1.2.3 From 1c000480d4af17bb19e0bfc42ecddc76a393ad59 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Mon, 27 Apr 2015 17:15:26 +0100 Subject: Specifically mention BIP-0011 (P2SH) Also add acknowledgement to Luke-Jr --- bip-0067.mediawiki | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki index 54afa00..a7aacec 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. - -==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 +The authors wish to thank BtcDrak and Luke-Jr for their involvement & contributions in the early discussions of this BIP. + +==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]] -- cgit v1.2.3 From 01e427ad97bd6050a015cdcca3a409eaef58eed5 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Mon, 27 Apr 2015 17:17:47 +0100 Subject: Add references section --- bip-0067.mediawiki | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki index a7aacec..1b09afa 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 == + -- cgit v1.2.3 From 213e8a27a3a2eaaf44f79221a9f9f888af002801 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Mon, 27 Apr 2015 17:18:44 +0100 Subject: remove whitespace --- bip-0067.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bip-0067.mediawiki b/bip-0067.mediawiki index 1b09afa..9c4f3de 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 == -- cgit v1.2.3