Bitcoin Forum
May 07, 2024, 08:06:45 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: The malleability attack is creating a lot of trouble, we need a quick fix  (Read 5665 times)
jl2012 (OP)
Legendary
*
Offline Offline

Activity: 1792
Merit: 1093


View Profile
February 11, 2014, 05:31:42 PM
 #1

The malleability attack becomes a DOS attack. We need a quick fix. Before there is a better solution, the bitcoind should not report unconfirmed transactions. Account balance should be solely based on confirmed transactions. Before malleability is fixed (if ever), unconfirmed outputs should not be spent.

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
1715069205
Hero Member
*
Offline Offline

Posts: 1715069205

View Profile Personal Message (Offline)

Ignore
1715069205
Reply with quote  #2

1715069205
Report to moderator
In order to achieve higher forum ranks, you need both activity points and merit points.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715069205
Hero Member
*
Offline Offline

Posts: 1715069205

View Profile Personal Message (Offline)

Ignore
1715069205
Reply with quote  #2

1715069205
Report to moderator
thenoblebot
Sr. Member
****
Offline Offline

Activity: 364
Merit: 252


View Profile
February 11, 2014, 05:39:43 PM
 #2

I already have highlighted an attack scheme here (https://bitcointalk.org/index.php?topic=458608.0) for those entities using the txid to track payments.

People have been proposing using other means to track payments and rightly so. But my suggestion even in the above thread has been to at least issue an advisory for entities using txid to stop.

However, I do realise the consequences of such a step : 1) It has already been highlighted before that its not the correct way to do it. 2) Issuing an advisory at such a point might only give more legitimacy to claims by Gox (which is obviously a silly thing to do).
buffett
Newbie
*
Offline Offline

Activity: 59
Merit: 0


View Profile
February 11, 2014, 06:51:00 PM
 #3

oh gosh this issue need to be fixed asap. it might be not a big issue for bitcoin enthusiast who understand how it works. but for common people, it is a very big concern! it's not common a tx id can be changed in any payment systems. if we transfer money with our bank, or paypal, the tx id wont change, forever. developers used to rely on tx id for any payment systems in the past.
nmersulypnem
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
February 11, 2014, 07:01:23 PM
 #4

The devs are notoriously slow...  They aren't even talking about it on the development mailing list today.

I guess that's what happens when you become rich...  well, they'll soon know what it's like to be poor again...
bitbouillion
Sr. Member
****
Offline Offline

Activity: 868
Merit: 250



View Profile
February 11, 2014, 07:02:00 PM
 #5

So why not create own txids from the blockchain and compare them to the transmit log, to see if a tx went through?

NanoAkron
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
February 11, 2014, 08:04:52 PM
 #6

We need a quick fix.

Quick fixes are never the right answer. I'd rather they took their time and produced a good fix.
NanoAkron
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
February 11, 2014, 08:06:06 PM
 #7

The devs are notoriously slow...  They aren't even talking about it on the development mailing list today.

I guess that's what happens when you become rich...  well, they'll soon know what it's like to be poor again...

Are you kidding? They've been discussing it on github:

https://github.com/bitcoin/bitcoin/pull/3651

nmersulypnem
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
February 11, 2014, 08:13:46 PM
 #8

The devs are notoriously slow...  They aren't even talking about it on the development mailing list today.

I guess that's what happens when you become rich...  well, they'll soon know what it's like to be poor again...

Are you kidding? They've been discussing it on github:

https://github.com/bitcoin/bitcoin/pull/3651


ah, thanks. I'll retract my comment.  I was looking in the wrong place.

EDIT: sorry, looking at that pull request - it doesn't seem like it's going to fix the problem.  It'll just patch the wallet to not recognize the unconfirmed trandsactions.  Malleable transactions will still happen, we'll still be subject to the DDOS, and the exchanges will still need to make significant changes to their accounting software before re-opening withdrawals.

Let me know if I got anything wrong there.
Peter Todd
Legendary
*
expert
Offline Offline

Activity: 1120
Merit: 1150


View Profile
February 11, 2014, 08:42:52 PM
 #9

The devs are notoriously slow...  They aren't even talking about it on the development mailing list today.

I guess that's what happens when you become rich...  well, they'll soon know what it's like to be poor again...

Are you kidding? They've been discussing it on github:

https://github.com/bitcoin/bitcoin/pull/3651


ah, thanks. I'll retract my comment.  I was looking in the wrong place.

EDIT: sorry, looking at that pull request - it doesn't seem like it's going to fix the problem.  It'll just patch the wallet to not recognize the unconfirmed trandsactions.  Malleable transactions will still happen, we'll still be subject to the DDOS, and the exchanges will still need to make significant changes to their accounting software before re-opening withdrawals.

Let me know if I got anything wrong there.

You are. We're talking to those pools about how they can make use of that patch and others to make their accounting software work.

thenoblebot
Sr. Member
****
Offline Offline

Activity: 364
Merit: 252


View Profile
February 11, 2014, 08:47:51 PM
 #10

You are. We're talking to those pools about how they can make use of that patch and others to make their accounting software work.

Hi Peter,

I believe to an extent there is some truth (about the delay). Check the mailing list, I believe you replied to me yesterday about the issue. I won't say any further about the concerned topic on the forums here. But yea it kind of a sad situation when the process could have been expedited. Ah nvm - lips sealed .

Cheers
nmersulypnem
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
February 11, 2014, 11:08:09 PM
 #11


You are. We're talking to those pools about how they can make use of that patch and others to make their accounting software work.

I see that now in some of the other github threads.  Just a question thoguh:  Does the Bitcoin Foundatoin have any type of PR person?  I mean, there are real merchant & consumers out there that are seeing their BTC jump up and down 20% every day.

Some sort of press release saying that the issue is known and is being worked on, would help a lot.  I mean, it was mentioned on the front page of the Wall Street journal this morning for Christ sake.
tacotime
Legendary
*
Offline Offline

Activity: 1484
Merit: 1005



View Profile
February 12, 2014, 06:09:49 AM
 #12

This is what I would do; ignore txid itself, but instead use the output from 4.):
1.) For any incoming transaction generate a list of inputs and values from inputs, concatenate into a string; sort addresses alphanumerically before doing so
2.) Generate output hashes and values and concatenate into above string; sort addresses alphanumerically before doing so
3.) Concatenate the pubkeys from the inputs that are regenerated from the signatures (NOT the signatures themselves) into the above string; sort pubkeys alphanumerically before doing so
4.) Hash this big string and use it as the txid

Even if someone regenerates signatures at random for any tx, the above will never change.  Any duplicate tx that are mutated will come up the same using the above scheme.

Probably even more simply you can just skip step 1.) and put the values of the inputs after their respective pubkeys and then stick it into a string along with the outputs

This can be implemented quickly, probably in 30 min - 1 h.  Exchanges verifying that a tx went through need only look for the above alternative txid hash in the next block and then can verify its incorporation into the blockchain.

I'm tired and going to bed so I hope this is coherent, but verifying blockchain incorporation using this scheme should enable protection from tx malleability

Comments welcome

Code:
XMR: 44GBHzv6ZyQdJkjqZje6KLZ3xSyN1hBSFAnLP6EAqJtCRVzMzZmeXTC2AHKDS9aEDTRKmo6a6o9r9j86pYfhCWDkKjbtcns
thenoblebot
Sr. Member
****
Offline Offline

Activity: 364
Merit: 252


View Profile
February 12, 2014, 07:03:45 AM
 #13

This is what I would do; ignore txid itself, but instead use the output from 4.):
1.) For any incoming transaction generate a list of inputs and values from inputs, concatenate into a string; sort addresses alphanumerically before doing so
2.) Generate output hashes and values and concatenate into above string; sort addresses alphanumerically before doing so
3.) Concatenate the pubkeys from the inputs that are regenerated from the signatures (NOT the signatures themselves) into the above string; sort pubkeys alphanumerically before doing so
4.) Hash this big string and use it as the txid

Even if someone regenerates signatures at random for any tx, the above will never change.  Any duplicate tx that are mutated will come up the same using the above scheme.

Probably even more simply you can just skip step 1.) and put the values of the inputs after their respective pubkeys and then stick it into a string along with the outputs

This can be implemented quickly, probably in 30 min - 1 h.  Exchanges verifying that a tx went through need only look for the above alternative txid hash in the next block and then can verify its incorporation into the blockchain.

I'm tired and going to bed so I hope this is coherent, but verifying blockchain incorporation using this scheme should enable protection from tx malleability

Comments welcome

Hi tacotime,

Easier fix would be to track transactions using (add,amt,time) .... no ?

Btw your quite an inspiring character, read some of your posts when trying to mine initially. Thanks for all the work you have put it. Appreciate it a lot Cheesy

Regards
Lethn
Legendary
*
Offline Offline

Activity: 1540
Merit: 1000



View Profile WWW
February 12, 2014, 07:50:35 AM
 #14

Quick fixes would be disastrous for Bitcoin, it's a very simple example but take Battlefield 4 as a perfect example of how not to fix code, if you rush out large patches very quickly that fix very little you'll not only piss off the people using the software you'll also create more problems in the process because you haven't checked the code and made sure the changes you've made haven't fucked something else up which is exactly what happened when DICE were rushing out patches when the game first came out.

Take the time to look at it properly, if anything if the situation gets worse it will become a lot more obvious what is wrong with the code because more and more people will be trying to abuse it.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 12, 2014, 07:51:34 AM
 #15

Easier fix would be to track transactions using (add,amt,time) .... no ?

There are no timestamps in bitcoin transactions.
thenoblebot
Sr. Member
****
Offline Offline

Activity: 364
Merit: 252


View Profile
February 12, 2014, 08:00:27 AM
 #16

Easier fix would be to track transactions using (add,amt,time) .... no ?

There are no timestamps in bitcoin transactions.

Try this in the console :

gettransaction 6baf826a0c5dcd22d28640233cae375cf8a3b37cf7251a93475986e3f42fa823-000

Output :
Quote
{
"amount" : 0.00016720,
"confirmations" : 16124,
"blockhash" : "000000000000000a0f90a320fd1adea3bfefee716fa98c9f10625021d8d4f29e",
"blockindex" : 655,
"blocktime" : 1383072371,
"txid" : "6baf826a0c5dcd22d28640233cae375cf8a3b37cf7251a93475986e3f42fa823",
"time" : 1383070892,
"timereceived" : 1383070892,
"details" : [
{
"account" : "Default",
"address" : "1rU2kc24GcRUjXLm3MZ8RQtjL1zpcsnK3",
"category" : "receive",
"amount" : 0.00016720
}
]
}

What are those "time" and "timereceived" ? Although again its kind of circular where we have to depend on txid :-( .. maybe another way to get those perhaps will do the trick.
oakpacific
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000


View Profile
February 12, 2014, 08:08:40 AM
 #17

Easier fix would be to track transactions using (add,amt,time) .... no ?

There are no timestamps in bitcoin transactions.

Try this in the console :

gettransaction 6baf826a0c5dcd22d28640233cae375cf8a3b37cf7251a93475986e3f42fa823-000

Output :
Quote
{
"amount" : 0.00016720,
"confirmations" : 16124,
"blockhash" : "000000000000000a0f90a320fd1adea3bfefee716fa98c9f10625021d8d4f29e",
"blockindex" : 655,
"blocktime" : 1383072371,
"txid" : "6baf826a0c5dcd22d28640233cae375cf8a3b37cf7251a93475986e3f42fa823",
"time" : 1383070892,
"timereceived" : 1383070892,
"details" : [
{
"account" : "Default",
"address" : "1rU2kc24GcRUjXLm3MZ8RQtjL1zpcsnK3",
"category" : "receive",
"amount" : 0.00016720
}
]
}

What are those "time" and "timereceived" ? Although again its kind of circular where we have to depend on txid :-( .. maybe another way to get those perhaps will do the trick.

There is no way you can verify independently whether these time datas are correct.

https://tlsnotary.org/ Fraud proofing decentralized fiat-Bitcoin trading.
thenoblebot
Sr. Member
****
Offline Offline

Activity: 364
Merit: 252


View Profile
February 12, 2014, 08:15:18 AM
 #18

There is no way you can verify independently whether these time datas are correct.

Hmmm. Are you referring to the median time that is used ? Or are you getting a different output ? Its from the blockchain so it should be consistent for all of us as long as there is no reorganisation .. isn't it ? This should work for confirmed transactions with a mutated txid as a check, isnt it ?

Please help me understand more.
oakpacific
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000


View Profile
February 12, 2014, 08:23:36 AM
 #19

There is no way you can verify independently whether these time datas are correct.

Hmmm. Are you referring to the median time that is used ? Or are you getting a different output ? Its from the blockchain so it should be consistent for all of us as long as there is no reorganisation .. isn't it ? This should work for confirmed transactions with a mutated txid as a check, isnt it ?

Please help me understand more.

Well, on second reading you've pointed out yourself that if you don't check the txid then the time datas can actually be tampered with by the relaying nodes before it's mined, I have nothing new to add. Smiley

https://tlsnotary.org/ Fraud proofing decentralized fiat-Bitcoin trading.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 12, 2014, 08:23:42 AM
 #20

There is no way you can verify independently whether these time datas are correct.

Hmmm. Are you referring to the median time that is used ? Or are you getting a different output ? Its from the blockchain so it should be consistent for all of us as long as there is no reorganisation .. isn't it ? This should work for confirmed transactions with a mutated txid as a check, isnt it ?

Please help me understand more.

It isn't from the blockchain it is from the client.   The time is not part of the transaction.  The wallet provides additional data beyond the actual transaction.  In your example does it seem likely that "account" = "Default" is also part of the transaction?


This is a bitcoin transaction.
https://en.bitcoin.it/w/images/en/e/e1/TxBinaryMap.png

There is no timestamp in the transaciton.   Relying on timestmamps is even less secure than relying of tx id.  It doesn't take any clever modification of the transaction to change the timestamp.
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!