Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YM1jc-00050k-JJ for bitcoin-development@lists.sourceforge.net; Thu, 12 Feb 2015 21:55:44 +0000 X-ACL-Warn: Received: from static.204.212.9.5.clients.your-server.de ([5.9.212.204] helo=thelaboratory.tk) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1YM1jY-0004Tb-H3 for bitcoin-development@lists.sourceforge.net; Thu, 12 Feb 2015 21:55:44 +0000 Received: from [192.168.0.222] (unknown [89.100.72.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: me@thomaskerin.io) by thelaboratory.tk (Postfix) with ESMTPSA id BB3029BA084E for ; Thu, 12 Feb 2015 21:55:33 +0000 (UTC) Message-ID: <54DD2154.5050609@thomaskerin.io> Date: Thu, 12 Feb 2015 21:55:32 +0000 From: Thomas Kerin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: bitcoin-development@lists.sourceforge.net OpenPGP: url=http://pgp.mit.edu/pks/lookup?op=get&search=0x3F0D2F83A2966155 Content-Type: multipart/mixed; boundary="------------080702080102090504080509" X-Spam-Score: 0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 T_FILL_THIS_FORM_SHORT Fill in a short form with personal information 0.5 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1YM1jY-0004Tb-H3 Subject: [Bitcoin-development] BIP for deterministic multisig addresses X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:55:44 -0000 This is a multi-part message in MIME format. --------------080702080102090504080509 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Not sure what happened there - I'll drop the PGP. Hi all, I have drafted a BIP with Jean Pierre and Ruben after the last discussion, related to a standard for deriving a canonical pay-to-script-hash address given a set of public keys and the number of signatures required. There have been two or three discussions about it on the mailing list to date, and various services already carry out this process. I hope a BIP to describe this process will allow services to declare themselves as BIPXX compliant, working towards interoperability of services and simplifying the derivation of scripts and their addresses by all parties. BIP: XX 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: Standards Track Created: 8 February 2015 =3D=3DAbstract=3D=3D 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. =3D=3DMotivation=3D=3D 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 =E2=80=9Caccount=E2=80=9D (set of public keys and require= d 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= . =3D=3DImplementation=3D=3D 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. =3D=3DCompatibility=3D=3D * Uncompressed keys are incompatible with this specificiation. A compatible implementation should not automatically compress keys.=20 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. =3D=3DTest vectors=3D=3D The required number of signatures in each case is 2. Vector 1 * List ** 02ff12471208c14bd580709cb2358d98975247d8765f92bc25eab3b2763ed605f8 ** 02fe6f0a5a297eb38c391581c4413e084773ea23954d93f7753db7dc0adc188b2f * Sorted ** 02fe6f0a5a297eb38c391581c4413e084773ea23954d93f7753db7dc0adc188b2f ** 02ff12471208c14bd580709cb2358d98975247d8765f92bc25eab3b2763ed605f8 * Script ** 522102fe6f0a5a297eb38c391581c4413e084773ea23954d93f7753db7dc0adc188b2f210= 2ff12471208c14bd580709cb2358d98975247d8765f92bc25eab3b2763ed605f852ae * Address ** 39bgKC7RFbpoCRbtD5KEdkYKtNyhpsNa3Z Vector 2 (Already sorted, no action required) * List: ** 02632b12f4ac5b1d1b72b2a3b508c19172de44f6f46bcee50ba33f3f9291e47ed0 ** 027735a29bae7780a9755fae7a1c4374c656ac6a69ea9f3697fda61bb99a4f3e77 ** 02e2cc6bd5f45edd43bebe7cb9b675f0ce9ed3efe613b177588290ad188d11b404 * Sorted: ** 02632b12f4ac5b1d1b72b2a3b508c19172de44f6f46bcee50ba33f3f9291e47ed0 ** 027735a29bae7780a9755fae7a1c4374c656ac6a69ea9f3697fda61bb99a4f3e77 ** 02e2cc6bd5f45edd43bebe7cb9b675f0ce9ed3efe613b177588290ad188d11b404 * Script ** 522102632b12f4ac5b1d1b72b2a3b508c19172de44f6f46bcee50ba33f3f9291e47ed0210= 27735a29bae7780a9755fae7a1c4374c656ac6a69ea9f3697fda61bb99a4f3e772102e2cc= 6bd5f45edd43bebe7cb9b675f0ce9ed3efe613b177588290ad188d11b40453ae * Address ** 3CKHTjBKxCARLzwABMu9yD85kvtm7WnMfH Vector 3: * List: =20 ** 030000000000000000000000000000000000004141414141414141414141414141 ** 020000000000000000000000000000000000004141414141414141414141414141 ** 020000000000000000000000000000000000004141414141414141414141414140 ** 030000000000000000000000000000000000004141414141414141414141414140 * Sorted: ** 020000000000000000000000000000000000004141414141414141414141414140 ** 020000000000000000000000000000000000004141414141414141414141414141 ** 030000000000000000000000000000000000004141414141414141414141414140 ** 030000000000000000000000000000000000004141414141414141414141414141 * Script ** 5221020000000000000000000000000000000000004141414141414141414141414140210= 2000000000000000000000000000000000000414141414141414141414141414121030000= 0000000000000000000000000000000041414141414141414141414141402103000000000= 000000000000000000000000000414141414141414141414141414154ae * Address ** 32V85igBri9zcfBRVupVvwK18NFtS37FuD Vector 4: (from bitcore) * List: ** 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da ** 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 ** 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 * Sorted: ** 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 ** 022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da ** 03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 * Script ** 5221021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18210= 22df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da2103e381= 8b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e953ae * Address ** 3Q4sF6tv9wsdqu2NtARzNCpQgwifm2rAba =3D=3DUsage & Implementations=3D=3D * BIP45 - Structure for Deterministic P2SH Multisignature Wallets - https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki#address-ge= neration-procedure * Bitcore - https://github.com/bitpay/bitcore/blob/50a868cb8cdf2be04bb1c5bf4bcc064cc0= 6f5888/lib/script/script.js#L541 * Haskoin - https://github.com/haskoin/haskoin/blob/master/Network/Haskoin/Script/Par= ser.hs#L112-122 * Armory - https://github.com/etotheipi/BitcoinArmory/blob/268db0f3fa20c989057bd4334= 3a43b2edbe89aeb/armoryengine/ArmoryUtils.py#L1441 * Multisignature Brainwallet - http://ms-brainwallet.org/ =20 For now, the BIP will live here: https://github.com/afk11/bips/blob/bip0090/bip-0090.mediawiki/ Looking forward to any feedback and discussions that arise! - --=20 Thomas Kerin --------------080702080102090504080509 Content-Type: application/pgp-keys; name="0xA2966155.asc" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0xA2966155.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1 mQINBFIo7+cBEACr9+6kdQHmlSb8YWhlroBv4yE0opZphlZmX0+1O82oYZItMfIE q8mY0MTwtiknFQdxUnRxCZj9y/XihqXl9a+z6QF5+YkLXPYCRrQokHkcHKZmHggv eqogEgUzeYIvnx+FWxD8pXa9T2aQ1DnyRbbAYIcqs9KJFfpE8i8v9tkm3CN8u0iU 9bxObYXOtni2XPoAlEJIM5U0xRftq1+W7Y4Wh8DxgibftcmKPDqrIUpHhJN8uRHj CQCU9hIwyy7TQXOKCQUyg7yneLyKva+XcrFyndpPC8gx2cbziaHNlq5Oj69ggicl deC8GDKBFbnEcdSLlvq++HylFbydPPFtbaT0c4gzVKFsYSS4lWaXsCv8Lm6rk41N h4xloou3qm/9kciLwzHC+RPca+vg+EBh7NLmozxTLm1/zH5yyB1WFEjwl+mbznsh KbMKQYIdQUnWhwfasiGsBhkUW/C40PhuZQEtloBYLygNYft4KCzlOIo5VVtSapr8 n1wEUGsSmuzmknRzHJPYnt/QAAktVvwolHs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mFVDb4P/i/En9gxNav9shtoMTR+ oQkU5xkHRwbwu0H1FrW2yH0B0ooZkcn6QQ+CxGZsO7fwEzMcok8AqlFyDrJWyYS/ My0PzwYkpBhJ6vyh7SLI9G0hrjOySoAVfPuY2rDkydlbD/Ep4QGrvCUDUN81hLNx bJrtyqxooJkkYKjUg6LIViRJM5wTDFJCV6/LaNump/tl0dreIdZ8C9p2GBTWqR0U ouPGpNs5+UXb6DTd6j79QbOy/QpAGssbCHy58ewGV8vtWwCd9InJaeH7yfHcq4tw +nkT61wNJ/eb5JlX7kmwme8lc+zQobGk3kaYP8stcfhTpl4IkS5Ln8VRbyXUZovx mK1X9GwlhMXI+SAKCcHgmgj3B2CCj45Mh/AMAqgsBv9FQdGDjk7GR9dYea77kpfm jrXMX0d6U+Z/0OItSsZMsvxbLulCtyJMcgDx8cVq6WQyMlwGeoKKTfGc7a/9NAFT cIIqgFpVcSUKNBQnQFFvMWxCkc7f7S/Ep2TxypwNUVBfwJYe658VVi/PRlh4Usza r69k5TTMQOS/54Hos13y+MYhizjr7PDXFz9HbPQymUd/+OPUPI982AJ1e0QNB/0r idvufh02N+l6zOzPaVPQAZJ89/MU6ehTo81aYXkG3GB7LQB2FN+gVd4ml4HMa0r+ JDB0hVaFYV98nLJ9V9LtEA9P =ntkV -----END PGP PUBLIC KEY BLOCK----- --------------080702080102090504080509--