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 1Wt2c3-000141-7g for bitcoin-development@lists.sourceforge.net; Fri, 06 Jun 2014 22:27:51 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.223.175 as permitted sender) client-ip=209.85.223.175; envelope-from=pieter.wuille@gmail.com; helo=mail-ie0-f175.google.com; Received: from mail-ie0-f175.google.com ([209.85.223.175]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Wt2c2-0006La-1J for bitcoin-development@lists.sourceforge.net; Fri, 06 Jun 2014 22:27:51 +0000 Received: by mail-ie0-f175.google.com with SMTP id tp5so1501843ieb.34 for ; Fri, 06 Jun 2014 15:27:44 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.61.166 with SMTP id q6mr13409112igr.19.1402093664086; Fri, 06 Jun 2014 15:27:44 -0700 (PDT) Received: by 10.50.184.195 with HTTP; Fri, 6 Jun 2014 15:27:44 -0700 (PDT) In-Reply-To: References: Date: Sat, 7 Jun 2014 00:27:44 +0200 Message-ID: From: Pieter Wuille To: =?ISO-8859-1?Q?Ra=FAl_Mart=EDnez?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.6 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (pieter.wuille[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1Wt2c2-0006La-1J Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] Possible attack: Keeping unconfirmed transactions 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: Fri, 06 Jun 2014 22:27:51 -0000 Whenever you do a reissuing of a transaction that didn't go through earlier, you should make sure to reuse one of the inputs for it. That guarantees that both cannot confirm simultaneously. On Sat, Jun 7, 2014 at 12:21 AM, Ra=FAl Mart=EDnez wrote: > Alice does not intercept the transaction, she only saves it and expect th= at > it will not be confirmed (because has 0 fee for example). > > Also using the Payment Protocol I believe that Alice is the only person t= hat > can relay Bob's transaction. > > Source: https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki > >> When the merchant's server receives the Payment message, it must determi= ne >> whether or not the transactions satisfy conditions of payment. If and on= ly >> if they do, if should broadcast the transaction(s) on the Bitcoin p2p >> network. > > > > 2014-06-07 0:11 GMT+02:00 Toshi Morita : > >> From what I know, Alice does not know to which node Bob will broadcast t= he >> transaction. Therefore, Alice cannot intercept the transaction and preve= nt >> the rest of the network from seeing it. >> >> Toshi >> >> >> >> On Fri, Jun 6, 2014 at 3:02 PM, Ra=FAl Mart=EDnez wrote: >>> >>> I dont know if this attack is even possible, it came to my mind and I >>> will try to explain it as good as possible. >>> >>> Some transacions keep unconfirmed forever and finally they are purged b= y >>> Bitcoin nodes, mostly due to the lack of fees. >>> >>> >>> Example: >>> --------- >>> >>> Alice is selling a pizza to Bob, Bob is now making the payment with >>> Bitcoin. >>> The main goal of this attack is to store a unconfirmed transaction send >>> by Bob for a few days (it will not be included in the blockchain becaus= e it >>> has no fee or due to other reason), Bob might resend the payment or mig= ht >>> just cancel the deal with Alice. >>> >>> Bob forgets about that failed trade but a couple of days later, Alice, >>> who has stored the signed transacion, relays the transaction to the net= work >>> (or mines it directly with his own hashpower). >>> Bob does not know what is happening, he believed that that transaction >>> was "canceled forever", he even does not remember the failed pizza deal= . >>> >>> Alice has now the bitcoins and Bob does not know what happened with his >>> money. >>> >>> --------- >>> >>> This might also work with the Payment Protocol because when using it Bo= b >>> does not relay the transaction to the network, its Alices job to do it, >>> Alice stores it and tells Bob to resend the payment, Bob creates anothe= r >>> transaction (If has the same inputs as the first TX this does not work) >>> (this one is relayed by Alice to the network). >>> >>> Alice comes back a couple of days later and mines with his hashrate the >>> first transaction (the one she didnt relayed to the network). >>> >>> Alice now has two payments, Bob does not know what happened. >>> >>> >>> ----------- >>> >>> I hope that I explained well this possible attack, I dont know if there >>> is already a fix for this problem or if it is simply impossible to exec= ute >>> this kind of attack. >>> >>> Thanks for your time. >>> >>> >>> >>> >>> >>> >>> -----------------------------------------------------------------------= ------- >>> Learn Graph Databases - Download FREE O'Reilly Book >>> "Graph Databases" is the definitive new guide to graph databases and >>> their >>> applications. Written by three acclaimed leaders in the field, >>> this first edition is now available. Download your free book today! >>> http://p.sf.net/sfu/NeoTech >>> _______________________________________________ >>> Bitcoin-development mailing list >>> Bitcoin-development@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >>> >> > > > -------------------------------------------------------------------------= ----- > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and thei= r > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development >