summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamian Williamson <willtech@live.com.au>2017-12-21 11:19:52 +0000
committerbitcoindev <bitcoindev@gnusha.org>2017-12-21 11:19:56 +0000
commit09443b8c273c904ab0e2f44dd4a08f49f9f27f60 (patch)
treecc826ad4940aeaa3e49b64d978db275097b326e5
parent44b00d62f7dd175651b4401879c76117c3fd74e6 (diff)
downloadpi-bitcoindev-09443b8c273c904ab0e2f44dd4a08f49f9f27f60.tar.gz
pi-bitcoindev-09443b8c273c904ab0e2f44dd4a08f49f9f27f60.zip
[bitcoin-dev] Sign / Verify message against SegWit P2SH addresses.
-rw-r--r--9a/89fb735868698dbc5b70d64ceb963c542f532b325
1 files changed, 325 insertions, 0 deletions
diff --git a/9a/89fb735868698dbc5b70d64ceb963c542f532b b/9a/89fb735868698dbc5b70d64ceb963c542f532b
new file mode 100644
index 000000000..d160fb205
--- /dev/null
+++ b/9a/89fb735868698dbc5b70d64ceb963c542f532b
@@ -0,0 +1,325 @@
+Return-Path: <willtech@live.com.au>
+Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
+ [172.17.192.35])
+ by mail.linuxfoundation.org (Postfix) with ESMTPS id 2766B941
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Thu, 21 Dec 2017 11:19:56 +0000 (UTC)
+X-Greylist: whitelisted by SQLgrey-1.7.6
+Received: from APC01-SG2-obe.outbound.protection.outlook.com
+ (mail-oln040092253092.outbound.protection.outlook.com [40.92.253.92])
+ by smtp1.linuxfoundation.org (Postfix) with ESMTPS id B16CECA
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Thu, 21 Dec 2017 11:19:54 +0000 (UTC)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1;
+ h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
+ bh=1gK+Su5LDaj5UMx6GYVS8G1Y1ZV8IH/VXWyXvuf+iVE=;
+ b=sRuMAyRiVuNHgdL9wSB5BTZKsXttU3UItptt6TZ52N1WY/uG9L3T1+jderuzqaMM4og+Kufe0eX8ODtrh/4SaJr/K4vl9YgV2ne4yu13t5s+yj67fqRPeQ5DtmBp+XlZ5NR+QFdBgfPJWc5CrJTX4RgGa8tCf6RDsabO9hYOol9jGqCsjQ/SV5hoyiYQuTgaBwet79WbIG1SAY3eDwWWhZ7eDpsVDBkUmOyGwrryLxmEXxkYeeC1ibEQg/a34MAcH4DSFZpMUbXGLvrnaEsVLDEb6CPHKX2PZ756y1qJ278uP6u3TioBjJfIUAeZL0UMzG/vvMxuCc8um18c7kPkOQ==
+Received: from HK2APC01FT061.eop-APC01.prod.protection.outlook.com
+ (10.152.248.56) by HK2APC01HT231.eop-APC01.prod.protection.outlook.com
+ (10.152.249.141) with Microsoft SMTP Server (version=TLS1_2,
+ cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.302.6;
+ Thu, 21 Dec 2017 11:19:52 +0000
+Received: from PS2P216MB0179.KORP216.PROD.OUTLOOK.COM (10.152.248.51) by
+ HK2APC01FT061.mail.protection.outlook.com (10.152.249.105) with
+ Microsoft SMTP Server (version=TLS1_2,
+ cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.302.6 via
+ Frontend Transport; Thu, 21 Dec 2017 11:19:52 +0000
+Received: from PS2P216MB0179.KORP216.PROD.OUTLOOK.COM ([10.171.225.19]) by
+ PS2P216MB0179.KORP216.PROD.OUTLOOK.COM ([10.171.225.19]) with mapi id
+ 15.20.0323.018; Thu, 21 Dec 2017 11:19:52 +0000
+From: Damian Williamson <willtech@live.com.au>
+To: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
+Thread-Topic: [bitcoin-dev] Sign / Verify message against SegWit P2SH
+ addresses.
+Thread-Index: AQHTcFI5PaOqXF1QmUWXRWYAS68OraNLQkqAgAAGIACAAm27cA==
+Date: Thu, 21 Dec 2017 11:19:52 +0000
+Message-ID: <PS2P216MB01795FCE6D61A62EBEA79AD79D0D0@PS2P216MB0179.KORP216.PROD.OUTLOOK.COM>
+References: <CAAUFj10gEPBS3nTZ6aJn4UazhcJKPni6_pYGWwOs+QNeDo9NaA@mail.gmail.com>
+ <52b65bab-ff84-7e21-e35a-f6ebd8106767@satoshilabs.com>,
+ <725C679B-60E2-4E21-9F7D-10F67118D58D@friedenbach.org>
+In-Reply-To: <725C679B-60E2-4E21-9F7D-10F67118D58D@friedenbach.org>
+Accept-Language: en-AU, en-US
+Content-Language: en-AU
+X-MS-Has-Attach:
+X-MS-TNEF-Correlator:
+x-incomingtopheadermarker: OriginalChecksum:23FFC948D8C71319A09742303C4D73DB74C93623AF72A67B8168D0DB677A658E;
+ UpperCasedChecksum:FA57C480C7D6082859CB845448B3007664F3B78CD733DA7DD07A6F3305B5A9F8;
+ SizeAsReceived:7216; Count:46
+x-ms-exchange-messagesentrepresentingtype: 1
+x-tmn: [gsNBickGwE8B7tZ8z9Tp3IWOfBRp0R8U]
+x-ms-publictraffictype: Email
+x-microsoft-exchange-diagnostics: 1; HK2APC01HT231;
+ 6:JAPk5qKsAGXKN/0vSo9SWQbbCLDxZw8DOBU2OXIl31r3AigjPGjx1Dx1/jJwDieZkAC5Wgj5LCQQm/K9N89k3talI5zoj3ZDdw9ObliPoQeVCUUIDMt9QvczyEStZquT9TzqLSxK+z5y5rsYRhQ0jUFkJ7AjxAtTisPX0ViwiUOzv4gHBSsyrNhmk+IlP1nzsh5La55GzEOMq7uAWw/UVgbjYlPBGZZztVvFI5AQDpjfNG/gPigQvbu4/y0XJmaEjZs/zZQPRQrz8A4qJZhwGttH2vmNM0fSrKQsj3/GQnM/Cj+H9k1XxLGMIBiN2svL40DcJ1UhhG9Bz7LFUbf7hYFLFZSP1z1zm8R6j/LKub8=;
+ 5:nU9joKmUuCS1WQGuTHqBaVMiEOTPGkq7NPsiqZhm2faZ+k4hNlL5NWYSZD7hdFjo4rLYSlLFZyLHMW7RIJaxwkcnGT4z7WPW/ByjTpVfbVq/AyvvP2NTrAovC/lwfGY4Wh3eYzkfxawnxFeljgwechr86Aa0ZOyVGIom13Pc+6w=;
+ 24:I6wwNFrgkBg/ugcd8b+wjgAfqCWAOqqfkSBOcMBOXEOIQ9TReyLp/W4KQQIOIcRh9n11etm37NaT+7BeKWElat/+LAuFXkaJxAVRFb/t7Mc=;
+ 7:gvDAMc+QtfywTh+b0iBtfX5JyQPtT4Art7FqlJygJqjNlUTgYTrUZzcdgVWm+XR/ikX6weYMkPE4nLBkZpBfCitudPS9yghGUyN3rfCyio9/X0wz2ooPiLmUTyLVNz2rxlecLIPSABxfx7Xml6X/hRDEozePWWtWQaZbH74oVCF60xd0GTr9YMp/z/DSI51wdia18qpXvigZI7HUk98pJwF59X2TXlnrVP6d/aL+5AF0buiZy7f48CGzp7sPnIpu
+x-incomingheadercount: 46
+x-eopattributedmessage: 0
+x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
+ RULEID:(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045);
+ SRVR:HK2APC01HT231;
+x-ms-traffictypediagnostic: HK2APC01HT231:
+x-ms-office365-filtering-correlation-id: b6853339-a528-4514-eece-08d54864c182
+x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031);
+ SRVR:HK2APC01HT231; BCL:0; PCL:0;
+ RULEID:(100000803101)(100110400095); SRVR:HK2APC01HT231;
+x-forefront-prvs: 0528942FD8
+x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT;
+ SFP:1901; SCL:1; SRVR:HK2APC01HT231;
+ H:PS2P216MB0179.KORP216.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:;
+spamdiagnosticoutput: 1:99
+spamdiagnosticmetadata: NSPM
+Content-Type: multipart/alternative;
+ boundary="_000_PS2P216MB01795FCE6D61A62EBEA79AD79D0D0PS2P216MB0179KORP_"
+MIME-Version: 1.0
+X-OriginatorOrg: outlook.com
+X-MS-Exchange-CrossTenant-Network-Message-Id: b6853339-a528-4514-eece-08d54864c182
+X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Dec 2017 11:19:52.0806 (UTC)
+X-MS-Exchange-CrossTenant-fromentityheader: Internet
+X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
+X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT231
+X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,
+ DKIM_VALID, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
+X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
+ smtp1.linux-foundation.org
+X-Mailman-Approved-At: Thu, 21 Dec 2017 14:25:50 +0000
+Subject: [bitcoin-dev] Sign / Verify message against SegWit P2SH addresses.
+X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
+X-Mailman-Version: 2.1.12
+Precedence: list
+List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
+List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
+ <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
+List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
+List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
+List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
+List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
+ <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
+X-List-Received-Date: Thu, 21 Dec 2017 11:19:56 -0000
+
+--_000_PS2P216MB01795FCE6D61A62EBEA79AD79D0D0PS2P216MB0179KORP_
+Content-Type: text/plain; charset="Windows-1252"
+Content-Transfer-Encoding: quoted-printable
+
+In all seriousness, being able to sign a message is an important feature wh=
+ether it is with Bitcoin Core or, with some other method. It is a good feat=
+ure and it would be worthwhile IMHO to update it for SegWit addresses. I do=
+n't know about renewing it altogether, I like the current simplicity.
+
+
+Regards,
+
+Damian Williamson
+
+
+------------------------------------
+
+Sometimes I like to sign a message just to verify that is what I have said.
+
+-
+
+Bitcoin: 1PMUf9aaQ41M4bgVbCAPVwAeuKvj8CwxJg
+
+------------------------------------
+
+Signature:
+HwJPqyWF0CbdsR7x737HbNIDoRufsrMI5XYQsKZ+MrWCJ6K7imtLY00sTCmSMDigZxRuoxyYZyQ=
+Uw/lL0m/MV9M=3D
+
+(Of course, signed messages will verify better usually with plain text and =
+not HTML interpreted email - need a switch for outlook.com to send plaintex=
+t.)
+________________________________
+From: bitcoin-dev-bounces@lists.linuxfoundation.org <bitcoin-dev-bounces@li=
+sts.linuxfoundation.org> on behalf of Mark Friedenbach via bitcoin-dev <bit=
+coin-dev@lists.linuxfoundation.org>
+Sent: Wednesday, 20 December 2017 8:58 AM
+To: Pavol Rusnak; Bitcoin Protocol Discussion
+Subject: Re: [bitcoin-dev] Sign / Verify message against SegWit P2SH addres=
+ses.
+
+For what it=92s worth, I think it would be quite easy to do better than the=
+ implied solution of rejiggering the message signing system to support non-=
+P2PKH scripts. Instead, have the signature be an actual bitcoin transaction=
+ with inputs that have the script being signed. Use the salted hash of the =
+message being signed as the FORKID as if this were a spin-off with replay p=
+rotection. This accomplishes three things:
+
+(1) This enables signing by any infrastructure out there =97 including hard=
+ware wallets and 2FA signing services =97 that have enabled support for FOR=
+KID signing, which is a wide swath of the ecosystem because of Bitcoin Cash=
+ and Bitcoin Gold.
+
+(2) It generalizes the message signing to allow multi-party signing setups =
+as complicated (via sighash, etc.) as those bitcoin transactions allow, usi=
+ng existing and future tools based on Partially Signed Bitcoin Transactions=
+; and
+
+(3) It unifies a single approach for message signing, proof of reserve (whe=
+re the inputs are actual UTXOs), and off-chain colored coins.
+
+There=92s the issue of size efficiency, but for the single-party message si=
+gning application that can be handled by a BIP that specifies a template fo=
+r constructing the pseudo-transaction and its inputs from a raw script.
+
+Mark
+
+> On Dec 19, 2017, at 1:36 PM, Pavol Rusnak via bitcoin-dev <bitcoin-dev@li=
+sts.linuxfoundation.org> wrote:
+>
+> On 08/12/17 19:25, Dan Bryant via bitcoin-dev wrote:
+>> I know there are posts, and an issue opened against it, but is there
+>> anyone writing a BIP for Sign / Verify message against a SegWit address?
+>
+> Dan, are you still planning to write this BIP?
+>
+> --
+> Best Regards / S pozdravom,
+>
+> Pavol "stick" Rusnak
+> CTO, SatoshiLabs
+> _______________________________________________
+> bitcoin-dev mailing list
+> bitcoin-dev@lists.linuxfoundation.org
+> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
+
+_______________________________________________
+bitcoin-dev mailing list
+bitcoin-dev@lists.linuxfoundation.org
+https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
+
+--_000_PS2P216MB01795FCE6D61A62EBEA79AD79D0D0PS2P216MB0179KORP_
+Content-Type: text/html; charset="Windows-1252"
+Content-Transfer-Encoding: quoted-printable
+
+<html>
+<head>
+<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
+252">
+<style type=3D"text/css" style=3D"display:none;"><!-- P {margin-top:0;margi=
+n-bottom:0;} --></style>
+</head>
+<body dir=3D"ltr">
+<div id=3D"divtagdefaultwrapper" style=3D"font-size: 12pt; color: rgb(0, 0,=
+ 0); font-family: Calibri,Helvetica,sans-serif,&quot;EmojiFont&quot;,&quot;=
+Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,NotoColorEmoji,&quot;Seg=
+oe UI Symbol&quot;,&quot;Android Emoji&quot;,EmojiSymbols;" dir=3D"ltr">
+<p style=3D"margin-top:0;margin-bottom:0">In all seriousness, being able to=
+ sign a message is an important feature whether it is with Bitcoin Core or,=
+ with some other method. It is a good feature and it would be worthwhile IM=
+HO to update it for SegWit addresses.
+ I don't know about renewing it altogether, I like the current simplicity.<=
+br>
+</p>
+<p style=3D"margin-top:0;margin-bottom:0"><br>
+</p>
+<p style=3D"margin-top:0;margin-bottom:0">Regards,</p>
+<p style=3D"margin-top:0;margin-bottom:0">Damian Williamson<br>
+</p>
+<p style=3D"margin-top:0;margin-bottom:0"><br>
+</p>
+<p style=3D"margin-top:0;margin-bottom:0">---------------------------------=
+---</p>
+<p style=3D"margin-top:0;margin-bottom:0"></p>
+<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
+<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
+<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
+<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;">Sometime=
+s I like to sign a message just to verify that is what I have said.</p>
+<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;">-</p>
+<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;">Bitcoin:=
+ 1PMUf9aaQ41M4bgVbCAPVwAeuKvj8CwxJg</p>
+<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
+<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
+<p style=3D"margin: 0px; text-indent: 0px; white-space: pre-wrap;"></p>
+<p></p>
+<p style=3D"margin-top:0;margin-bottom:0">---------------------------------=
+---<br>
+</p>
+Signature:<br>
+<span><span><span><span>HwJPqyWF0CbdsR7x737HbNIDoRufsrMI5XYQsKZ&#43;MrWCJ6K=
+7imtLY00sTCmSMDigZxRuoxyYZyQUw/lL0m/MV9M=3D</span><br>
+<br>
+</span></span></span><span>(Of course, signed messages will verify better u=
+sually with plain text and not HTML interpreted email - need a switch for o=
+utlook.com to send plaintext.)</span><br>
+<div style=3D"color: rgb(0, 0, 0);">
+<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
+<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font style=3D"font-size:11pt" face=
+=3D"Calibri, sans-serif" color=3D"#000000"><b>From:</b> bitcoin-dev-bounces=
+@lists.linuxfoundation.org &lt;bitcoin-dev-bounces@lists.linuxfoundation.or=
+g&gt; on behalf of Mark Friedenbach via bitcoin-dev
+ &lt;bitcoin-dev@lists.linuxfoundation.org&gt;<br>
+<b>Sent:</b> Wednesday, 20 December 2017 8:58 AM<br>
+<b>To:</b> Pavol Rusnak; Bitcoin Protocol Discussion<br>
+<b>Subject:</b> Re: [bitcoin-dev] Sign / Verify message against SegWit P2SH=
+ addresses.</font>
+<div>&nbsp;</div>
+</div>
+<div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;=
+">
+<div class=3D"PlainText">For what it=92s worth, I think it would be quite e=
+asy to do better than the implied solution of rejiggering the message signi=
+ng system to support non-P2PKH scripts. Instead, have the signature be an a=
+ctual bitcoin transaction with inputs
+ that have the script being signed. Use the salted hash of the message bein=
+g signed as the FORKID as if this were a spin-off with replay protection. T=
+his accomplishes three things:<br>
+<br>
+(1) This enables signing by any infrastructure out there =97 including hard=
+ware wallets and 2FA signing services =97 that have enabled support for FOR=
+KID signing, which is a wide swath of the ecosystem because of Bitcoin Cash=
+ and Bitcoin Gold.<br>
+<br>
+(2) It generalizes the message signing to allow multi-party signing setups =
+as complicated (via sighash, etc.) as those bitcoin transactions allow, usi=
+ng existing and future tools based on Partially Signed Bitcoin Transactions=
+; and<br>
+<br>
+(3) It unifies a single approach for message signing, proof of reserve (whe=
+re the inputs are actual UTXOs), and off-chain colored coins.<br>
+<br>
+There=92s the issue of size efficiency, but for the single-party message si=
+gning application that can be handled by a BIP that specifies a template fo=
+r constructing the pseudo-transaction and its inputs from a raw script.<br>
+<br>
+Mark<br>
+<br>
+&gt; On Dec 19, 2017, at 1:36 PM, Pavol Rusnak via bitcoin-dev &lt;bitcoin-=
+dev@lists.linuxfoundation.org&gt; wrote:<br>
+&gt; <br>
+&gt; On 08/12/17 19:25, Dan Bryant via bitcoin-dev wrote:<br>
+&gt;&gt; I know there are posts, and an issue opened against it, but is the=
+re<br>
+&gt;&gt; anyone writing a BIP for Sign / Verify message against a SegWit ad=
+dress?<br>
+&gt; <br>
+&gt; Dan, are you still planning to write this BIP?<br>
+&gt; <br>
+&gt; -- <br>
+&gt; Best Regards / S pozdravom,<br>
+&gt; <br>
+&gt; Pavol &quot;stick&quot; Rusnak<br>
+&gt; CTO, SatoshiLabs<br>
+&gt; _______________________________________________<br>
+&gt; bitcoin-dev mailing list<br>
+&gt; bitcoin-dev@lists.linuxfoundation.org<br>
+&gt; <a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-=
+dev" id=3D"LPlnk12677" previewremoved=3D"true">
+https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a><br>
+<br>
+_______________________________________________<br>
+bitcoin-dev mailing list<br>
+bitcoin-dev@lists.linuxfoundation.org<br>
+<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
+id=3D"LPlnk370485" previewremoved=3D"true">https://lists.linuxfoundation.or=
+g/mailman/listinfo/bitcoin-dev</a><br>
+</div>
+</span></font></div>
+</div>
+</div>
+</body>
+</html>
+
+--_000_PS2P216MB01795FCE6D61A62EBEA79AD79D0D0PS2P216MB0179KORP_--
+