public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: jl2012 <jl2012@xbt•hk>
To: Rusty Russell <rusty@rustcorp•com.au>
Cc: Bitcoin Dev <bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] On the security of softforks
Date: Sun, 20 Dec 2015 14:16:29 -0500	[thread overview]
Message-ID: <e7e3e0901347a1019db624581520e368@xbt.hk> (raw)
In-Reply-To: <878u4poixq.fsf@rustcorp.com.au>

Rusty Russell via bitcoin-dev 於 2015-12-19 23:14 寫到:
> Jonathan Toomim via bitcoin-dev <bitcoin-dev@lists•linuxfoundation.org>
> writes:
>> On Dec 18, 2015, at 10:30 AM, Pieter Wuille via bitcoin-dev 
>> <bitcoin-dev@lists•linuxfoundation.org> wrote:
>> 
>>> 1) The risk of an old full node wallet accepting a transaction that 
>>> is
>>> invalid to the new rules.
>>> 
>>> The receiver wallet chooses what address/script to accept coins on.
>>> They'll upgrade to the new softfork rules before creating an address
>>> that depends on the softfork's features.
>>> 
>>> So, not a problem.
>> 
>> 
>> Mallory wants to defraud Bob with a 1 BTC payment for some beer. Bob
>> runs the old rules. Bob creates a p2pkh address for Mallory to
>> use. Mallory takes 1 BTC, and creates an invalid SegWit transaction
>> that Bob cannot properly validate and that pays into one of Mallory's
>> wallets. Mallory then immediately spends the unconfirmed transaction
>> into Bob's address. Bob sees what appears to be a valid transaction
>> chain which is not actually valid.
> 
> Pretty sure Bob's wallet will be looking for "OP_DUP OP_HASH160
> <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG" scriptSig.  The SegWit-usable
> outputs will (have to) look different, won't they?
> 
> Cheers,
> Rusty.

I think he means Mallory is paying with an invalid Segwit input, not 
output (there is no "invalid output" anyway). However, this is not a 
issue if Bob waits for a few confirmations.


      reply	other threads:[~2015-12-20 19:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18  2:30 Pieter Wuille
2015-12-18  2:47 ` Jonathan Toomim
2015-12-18  3:02   ` Eric Lombrozo
2015-12-18 12:18     ` Peter Todd
2015-12-19 15:48       ` Bryan Bishop
2015-12-18  3:10   ` jl2012
2015-12-18  5:32     ` Jorge Timón
2015-12-18  6:12   ` Anthony Towns
2015-12-19  1:36   ` Chris
2015-12-19 17:46   ` Andrew
2015-12-20  4:14   ` Rusty Russell
2015-12-20 19:16     ` jl2012 [this message]

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=e7e3e0901347a1019db624581520e368@xbt.hk \
    --to=jl2012@xbt$(echo .)hk \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=rusty@rustcorp$(echo .)com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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