summaryrefslogtreecommitdiff
path: root/95/8aeba8693536069913d0d2c8abe24bc98a8a51
blob: c973bdc6cdeca301bb27c3a2e8363eada786ea29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
Return-Path: <pete@petertodd.org>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id CFEC798F
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed, 20 Jul 2016 05:46:59 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from outmail148102.authsmtp.net (outmail148102.authsmtp.net
	[62.13.148.102])
	by smtp1.linuxfoundation.org (Postfix) with ESMTP id 0EA2EA5
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed, 20 Jul 2016 05:46:58 +0000 (UTC)
Received: from mail-c247.authsmtp.com (mail-c247.authsmtp.com [62.13.128.247])
	by punt20.authsmtp.com (8.14.2/8.14.2/) with ESMTP id u6K5kvbo085476;
	Wed, 20 Jul 2016 06:46:57 +0100 (BST)
Received: from petertodd.org (ec2-52-5-185-120.compute-1.amazonaws.com
	[52.5.185.120]) (authenticated bits=0)
	by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id u6K5ktsg051023
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 20 Jul 2016 06:46:56 +0100 (BST)
Received: from [127.0.0.1] (localhost [127.0.0.1])
	by petertodd.org (Postfix) with ESMTPSA id A572840104;
	Wed, 20 Jul 2016 05:44:21 +0000 (UTC)
Received: by localhost (Postfix, from userid 1000)
	id 1037F20576; Wed, 20 Jul 2016 01:46:54 -0400 (EDT)
Date: Wed, 20 Jul 2016 01:46:54 -0400
From: Peter Todd <pete@petertodd.org>
To: Sean Bowe <sean@z.cash>,
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Message-ID: <20160720054654.GA1420@fedora-21-dvm>
References: <CAKazn3mKUMMz0wyqTsgbkd4mBLgvG2PXziXhgRTi4hX_ApbPhg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="CE+1k2dSO48ffgeK"
Content-Disposition: inline
In-Reply-To: <CAKazn3mKUMMz0wyqTsgbkd4mBLgvG2PXziXhgRTi4hX_ApbPhg@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Server-Quench: 5e554775-4e3d-11e6-bcde-0015176ca198
X-AuthReport-Spam: If SPAM / abuse - report it at:
	http://www.authsmtp.com/abuse
X-AuthRoute: OCd2Yg0TA1ZNQRgX IjsJECJaVQIpKltL GxAVKBZePFsRUQkR
	aAdMdAIUEkAYAgsB AmAbW1JeVFt7XGU7 bghPaBtcak9QXgdq
	T0pMXVMcUQMTBEdF RUkeVxhydQYIfHdx ZwhnC3VeWEN9cFt5
	F00ACGwHMGF9OjNL BV1YdwJRcQRMLU5E Y1gxNiYHcQ5VPz4z
	GA41ejw8IwAXAgVt Cg0XJFwOEw4rIhoX DwwYFDM0FEYZRiI1 NHQA
X-Authentic-SMTP: 61633532353630.1038:706
X-AuthFastPath: 0 (Was 255)
X-AuthSMTP-Origin: 52.5.185.120/25
X-AuthVirus-Status: No virus detected - but ensure you scan with your own
	anti-virus system.
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW
	autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Subject: Re: [bitcoin-dev] BIP draft: HTLC transactions
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: Wed, 20 Jul 2016 05:47:00 -0000


--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 19, 2016 at 10:35:39PM -0600, Sean Bowe via bitcoin-dev wrote:
> I'm requesting feedback for Hash Time-Locked Contract (HTLC) transactions
> in Bitcoin.
>=20
> HTLC transactions allow you to pay for the preimage of a hash. CSV/CLTV c=
an
> be used to recover your funds if the other party is not cooperative. These
> scripts take the following general form:
>=20
>     [HASHOP] <digest> OP_EQUAL
>     OP_IF
>         <seller pubkey>
>     OP_ELSE
>         <num> [TIMEOUTOP] OP_DROP <buyer pubkey>
>     OP_ENDIF
>     OP_CHECKSIG

Note that because you're hashing the top item on the stack regardless
scriptSig's that satisfy HTLC's are malleable: that top stack item can be
changed anything in the digest-not-provided case and the script still passe=
s.

--=20
https://petertodd.org 'peter'[:-1]@petertodd.org

--CE+1k2dSO48ffgeK
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----

iQEcBAEBCAAGBQJXjxBKAAoJEGOZARBE6K+y0zoH/32Xxikl8kJIDLmpsrTsqDDM
HkO3CvhkSwSp/VghY/Y8slJfybXTmBm68lgKuGJENqpvY/MuYf2xZdsHGpRQqkCD
mjtdsOUK00qkM8/izhFdM5Wp8JVkC7+TeZ0yZ3kC5jckx0SF5GRgoLIE41Hyq3/B
kafFjXJ/0a7oA0yV+3M0AtJ77MuXwMoQPkEZ3vIdo9V6o0YVrq7kV6fVN7H4BnW3
XwCtqCArWH3YzR+soK37zclA+eILMJtxetiaDktP10ZiqOnVR/OU/1hXh8i4y4CQ
uYUN3inXPNn+GDGL/ywyETp88uxaOOMxq+di3ofNfw3fPaRCh7Td8uP45vJlJJo=
=bIEY
-----END PGP SIGNATURE-----

--CE+1k2dSO48ffgeK--