* [Bitcoin-development] Possible attack: Keeping unconfirmed transactions
@ 2014-06-06 22:02 Raúl Martínez
2014-06-06 22:11 ` Toshi Morita
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Raúl Martínez @ 2014-06-06 22:02 UTC (permalink / raw)
To: Bitcoin Dev
[-- Attachment #1: Type: text/plain, Size: 1760 bytes --]
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 by
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 because it
has no fee or due to other reason), Bob might resend the payment or might
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 network (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 Bob
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 another
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 execute
this kind of attack.
Thanks for your time.
[-- Attachment #2: Type: text/html, Size: 2226 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bitcoin-development] Possible attack: Keeping unconfirmed transactions
2014-06-06 22:02 [Bitcoin-development] Possible attack: Keeping unconfirmed transactions Raúl Martínez
@ 2014-06-06 22:11 ` Toshi Morita
2014-06-06 22:21 ` Raúl Martínez
2014-06-06 22:53 ` Andrew Poelstra
[not found] ` <CAC0TF=nNJ9qN+VCf8opwL822HA3L7sHpjV0v3=mCG51=y7V56w@mail.gmail.com>
2 siblings, 1 reply; 7+ messages in thread
From: Toshi Morita @ 2014-06-06 22:11 UTC (permalink / raw)
To: Raúl Martínez; +Cc: Bitcoin Dev
[-- Attachment #1: Type: text/plain, Size: 2775 bytes --]
From what I know, Alice does not know to which node Bob will broadcast the
transaction. Therefore, Alice cannot intercept the transaction and prevent
the rest of the network from seeing it.
Toshi
On Fri, Jun 6, 2014 at 3:02 PM, Raúl Martínez <rme@i-rme.es> 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 by
> 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 because it
> has no fee or due to other reason), Bob might resend the payment or might
> 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 network (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 Bob
> 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 another
> 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 execute
> 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
>
>
[-- Attachment #2: Type: text/html, Size: 3682 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bitcoin-development] Possible attack: Keeping unconfirmed transactions
2014-06-06 22:11 ` Toshi Morita
@ 2014-06-06 22:21 ` Raúl Martínez
2014-06-06 22:27 ` Pieter Wuille
0 siblings, 1 reply; 7+ messages in thread
From: Raúl Martínez @ 2014-06-06 22:21 UTC (permalink / raw)
To: Toshi Morita; +Cc: Bitcoin Dev
[-- Attachment #1: Type: text/plain, Size: 3492 bytes --]
Alice does not intercept the transaction, she only saves it and expect that
it will not be confirmed (because has 0 fee for example).
Also using the Payment Protocol I believe that Alice is the only person
that 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 determine
> whether or not the transactions satisfy conditions of payment. If and only
> if they do, if should broadcast the transaction(s) on the Bitcoin p2p
> network.*
>
2014-06-07 0:11 GMT+02:00 Toshi Morita <toshi@peernova.com>:
> From what I know, Alice does not know to which node Bob will broadcast the
> transaction. Therefore, Alice cannot intercept the transaction and prevent
> the rest of the network from seeing it.
>
> Toshi
>
>
>
> On Fri, Jun 6, 2014 at 3:02 PM, Raúl Martínez <rme@i-rme.es> 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 by
>> 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 because it
>> has no fee or due to other reason), Bob might resend the payment or might
>> 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 network
>> (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 Bob
>> 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 another
>> 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 execute
>> 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
>>
>>
>
[-- Attachment #2: Type: text/html, Size: 5182 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bitcoin-development] Possible attack: Keeping unconfirmed transactions
2014-06-06 22:21 ` Raúl Martínez
@ 2014-06-06 22:27 ` Pieter Wuille
0 siblings, 0 replies; 7+ messages in thread
From: Pieter Wuille @ 2014-06-06 22:27 UTC (permalink / raw)
To: Raúl Martínez; +Cc: Bitcoin Dev
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úl Martínez <rme@i-rme.es> wrote:
> Alice does not intercept the transaction, she only saves it and expect that
> it will not be confirmed (because has 0 fee for example).
>
> Also using the Payment Protocol I believe that Alice is the only person that
> 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 determine
>> whether or not the transactions satisfy conditions of payment. If and only
>> if they do, if should broadcast the transaction(s) on the Bitcoin p2p
>> network.
>
>
>
> 2014-06-07 0:11 GMT+02:00 Toshi Morita <toshi@peernova.com>:
>
>> From what I know, Alice does not know to which node Bob will broadcast the
>> transaction. Therefore, Alice cannot intercept the transaction and prevent
>> the rest of the network from seeing it.
>>
>> Toshi
>>
>>
>>
>> On Fri, Jun 6, 2014 at 3:02 PM, Raúl Martínez <rme@i-rme.es> 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 by
>>> 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 because it
>>> has no fee or due to other reason), Bob might resend the payment or might
>>> 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 network
>>> (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 Bob
>>> 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 another
>>> 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 execute
>>> 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 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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bitcoin-development] Possible attack: Keeping unconfirmed transactions
2014-06-06 22:02 [Bitcoin-development] Possible attack: Keeping unconfirmed transactions Raúl Martínez
2014-06-06 22:11 ` Toshi Morita
@ 2014-06-06 22:53 ` Andrew Poelstra
[not found] ` <CAC0TF=nNJ9qN+VCf8opwL822HA3L7sHpjV0v3=mCG51=y7V56w@mail.gmail.com>
2 siblings, 0 replies; 7+ messages in thread
From: Andrew Poelstra @ 2014-06-06 22:53 UTC (permalink / raw)
To: Raúl Martínez; +Cc: Bitcoin Dev
[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]
On Sat, Jun 07, 2014 at 12:02:36AM +0200, Raúl Martínez 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 by
> Bitcoin nodes, mostly due to the lack of fees.
>
It's definitely possible. As Pieter says it is important to always reuse
inputs if you are "resending" a transaction. If you don't reuse inputs,
you are creating a new transaction and you should think of it as
spending twice as much money.
Like any information on the Internet, once a signed transaction leaves
your system there is no way to undo this. (Though of course, you can
respend the inputs to ensure that if ever your transaction resurfaces it
will not confirm.) This is true even if the transaction has low fees, is
nonstandard, or is otherwise inhibited from relaying.
I would go so far as to say that any UI which suggests otherwise (e.g.
offering a "cancel" feature which does not involve respending inputs or
that makes any guarantees about being effective) is dangerously broken.
--
Andrew Poelstra
Mathematics Department, University of Texas at Austin
Email: apoelstra at wpsoftware.net
Web: http://www.wpsoftware.net/andrew
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bitcoin-development] Possible attack: Keeping unconfirmed transactions
[not found] ` <CAC0TF=nNJ9qN+VCf8opwL822HA3L7sHpjV0v3=mCG51=y7V56w@mail.gmail.com>
@ 2014-06-10 11:25 ` Raúl Martínez
0 siblings, 0 replies; 7+ messages in thread
From: Raúl Martínez @ 2014-06-10 11:25 UTC (permalink / raw)
To: Chris D'Costa; +Cc: Bitcoin Dev
[-- Attachment #1: Type: text/plain, Size: 3422 bytes --]
I believe that the Payment Protocol works that way, the merchant broadcast
the Tx.
El 10/06/2014 13:23, "Chris D'Costa" <chrisjdcosta@gmail.com> escribió:
> I wonder if Raul is mistakenly under the impression that the transaction
> only reaches the Bitcoin network via Alice? In which case the premise of
> this "attack" is incorrect.
>
> *Chris D'Costa*
>
>
> Follow on Twitter: *@cjdcosta*
>
> *---------------------------------------------------------------------------------------*
> chris.dcosta@meek.io (Meek)
> chris.dcosta@sossee.com (Blog)
> chrisjdcosta@gmail.com <chris_dcosta@me.com> (Personal)
> chris.dcosta@bitcoinassociation.be (Belgian Bitcoin Association)
>
> ---------------------------------------------------------------------------------------
>
>
> On 7 June 2014 00:02, Raúl Martínez <rme@i-rme.es> 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 by
>> 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 because it
>> has no fee or due to other reason), Bob might resend the payment or might
>> 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 network
>> (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 Bob
>> 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 another
>> 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 execute
>> 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
>>
>>
>
[-- Attachment #2: Type: text/html, Size: 5120 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bitcoin-development] Possible attack: Keeping unconfirmed transactions
@ 2014-06-06 22:03 Raúl Martínez
0 siblings, 0 replies; 7+ messages in thread
From: Raúl Martínez @ 2014-06-06 22:03 UTC (permalink / raw)
Cc: Bitcoin Dev
[-- Attachment #1: Type: text/plain, Size: 1760 bytes --]
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 by
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 because it
has no fee or due to other reason), Bob might resend the payment or might
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 network (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 Bob
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 another
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 execute
this kind of attack.
Thanks for your time.
[-- Attachment #2: Type: text/html, Size: 2232 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-06-10 11:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-06 22:02 [Bitcoin-development] Possible attack: Keeping unconfirmed transactions Raúl Martínez
2014-06-06 22:11 ` Toshi Morita
2014-06-06 22:21 ` Raúl Martínez
2014-06-06 22:27 ` Pieter Wuille
2014-06-06 22:53 ` Andrew Poelstra
[not found] ` <CAC0TF=nNJ9qN+VCf8opwL822HA3L7sHpjV0v3=mCG51=y7V56w@mail.gmail.com>
2014-06-10 11:25 ` Raúl Martínez
2014-06-06 22:03 Raúl Martínez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox