public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Luke Dashjr <luke@dashjr.org>
To: bitcoin-dev@lists.linuxfoundation.org, Peter Todd <pete@petertodd.org>
Subject: Re: [bitcoin-dev] BIP draft: HTLC transactions
Date: Wed, 20 Jul 2016 06:17:39 +0000	[thread overview]
Message-ID: <201607200617.40917.luke@dashjr.org> (raw)
In-Reply-To: <20160720054654.GA1420@fedora-21-dvm>

On Wednesday, July 20, 2016 5:46:54 AM Peter Todd via bitcoin-dev wrote:
> 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.
> > 
> > HTLC transactions allow you to pay for the preimage of a hash. CSV/CLTV
> > can be used to recover your funds if the other party is not cooperative.
> > These
> > 
> > scripts take the following general form:
> >     [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
> passes.

OP_SIZE
OP_IF
  [HASHOP] <digest> OP_EQUALVERIFY
  <seller pubkey>
OP_ELSE
  <num> [TIMEOUTOP]
  <buyer pubkey>
OP_ENDIF
OP_CHECKSIG



  reply	other threads:[~2016-07-20  6:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20  4:35 [bitcoin-dev] BIP draft: HTLC transactions Sean Bowe
2016-07-20  5:46 ` Peter Todd
2016-07-20  6:17   ` Luke Dashjr [this message]
2016-08-09  0:46     ` Peter Todd
2016-08-17 10:00     ` Johnson Lau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201607200617.40917.luke@dashjr.org \
    --to=luke@dashjr.org \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=pete@petertodd.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox