Posted
by
Unknown Lamer
on Monday February 10, 2014 @07:39PM
from the third-normal-form-isn't-that-hard-people dept.

An anonymous reader writes "Bitcoin values dropped sharply over the weekend after the largest trading exchange, MtGox, revealed that an investigation into unusual trading activity turned up a flaw in the underlying Bitcoin software that allowed an attacker to double withdrawal a transaction"
Not so fast according to database experts: the real problem is that Mt Gox (and other exchanges) are using a surrogate transaction id rather than a natural key in their databases: "The flaw isn't so much in Bitcoin as it is in exchange-systems. Many exchanges use the tx-id to uniquely identify transactions, but as it turns out, an attacker can change the tx-id without changing the actual transaction, rebroadcast the changed transaction (effectively creating a double-spend) and if his altered transaction gets accepted into a block instead of the legit transaction, the attacker receives his coins and can complain with the exchange that he didn't. The exchange will then check their db, fetch the tx-id from it, look it up in the blockchain and not find it. So they could conclude that the transaction indeed failed and credit the account with the coins. ... A simple workaround is to not use the tx-id to identify transactions on the exchange side, but the (amount, address, timestamp) instead."

Indeed. MtGox has been tainted with (at best) incompetence or (at worst) fraud for quite some time now. It could potentially be both.

In any case, bitcoin owners/miners have voted with their feet to the extent possible and MtGox has gone from the largest to one of the smaller players in the bitcoin exchange arena. There are still quite a few unfortunate folks with their funds trapped within MtGox. We'll see if those funds are eventually released or become part of an eventual bankruptcy proceeding. That might be great in the longer term since the courts will eventually sort out the role of BTC in the world of finance, but it might be bad for people who put their trust in one of the early exchanges.

Yep, when you ask to withdraw large funds in $USD they just claim there is problems with the system, leave you hanging for months, but it is very easy to deposit money if one wishes. Mt Gox is a scam, i found that out first hand. However, bitcoin itself might be ok.. as long as bitcoins can be transferred and funds can easily be withdrawn from another exchange otherwise I feel the currency is largely valueless if one wants anything other than tech goods online.

You're posting this comment on a site that was once called "Chips and Dips".

It's still called Chips and Dips for me. I hated the change, so I resisted it as part of the FuckSlashdot campaign. I set up a personal proxy to automatically rebrand each page load back to Chips and Dips and it's been like that ever since!

Many pro bitcoin will hate me for saying that, but the transaction ID should not be change and once published it's value should be considered safe to check if a transaction is part of the blockchain or not. All the crap related to 3rd party modifying Sign script is pretty idiot compare the power for having a single ID to track a transaction. That said, this give no excuse for Mt Gox to not release the funds, the problem is not new, not even to them, and probably hide a much bigger financial problem.

The tx-id does, in fact, uniquely identify a particular transaction. It's basically just the hash of the completed transaction record. The problem is that it isn't the entire transaction record that you're signing when you send bitcoins, just the input you provided and the set of outputs. This is done so that multiple independent parties can all contribute to the same transaction, but it also means that someone can modify other fields to create a new, equally valid transaction with the same inputs and outpu

Can someone explain to me why a third part can channge an id? Is this a feature (if so what use would it have), or an exploit that wasn't found out about until recently and it is part of the core and too difficult to fix?I skimmed over the article and it said something abotu it being known since 2011.. which if that is the case then why not fixed and or publiciced better? as it seems like a major issue.I would always think using something like a transaction id to be safe to use to you know, IDENTIFY the tra

Slashdot is broken. It won't let me post because it thinks I just posted, and it won't tell me how long to wait. For the past 5 minutes it has said it's been 3 minutes since my last post. Maybe it's some kind of space-time warp.

The transaction ID is generated as the cryptographic hash of the transaction data and signature.

The problem comes with how ECDSA signatures are formatted. A signature is essentially a large integer of undefined length. Industry standards are that the signature should be written with no zero padding - i.e. the first byte should be non-zero. In practice, many software implementations would define a fixed length field and zero-pad signature.

The signature would still be valid even if zero padded. However, the transaction ID which is a hash of the transaction data and signature would change.

Early versions of the bitcoin daemon would accept padded signatures, but this bug was fixed a couple of years ago, and transactions submitted to the network with excessive signature padding would be rejected as invalid.

Mt Gox used in-house bitcoin client software which for a long time continued to pad their transaction signatures, even after the bitcoin developers issued an alert to users, resulting in failed or delayed (if the first node to receive the transaction broadcast was running on old daemon which would accept the transaction, the transaction would be validated and accepted; therefore a semi-invalid transaction may succeed after a number of retries) withdrawal transactions.

Finally, the thing that really screwed things up was that 3rd parties (possibly early adopters with large amounts of bitcoin at Mt Gox) recognised the bug, and provided a workaround for Gox's broken software. Their software acted as transaction relay nodes, and when it received a broken transaction from Gox would rewrite the signature in the correct form, and compute a new transaction ID, before re-broadcasting the transaction.

The result was that Gox's withdrawral problems disappeared for a number of months - until Gox's client went out of sync with the bitcoin network, as it was trying to spend coins that had previously been spent by transactions that it thought had failed.

From what I understand, it goes like this: The concept of a double spend is to try and spend the same money in two transactions. The bitcoin protocol has its way of dealing with it, pretty much by only one of those transactions succeeding. In this case, some nefarious entity submits the same transaction with all of the same details, but a different transaction ID. IF luck is in their favor, the protocol will chose their block instead of the one from the exchange. The nefarious entity then says "My money nev

If they are sending out more funds for withdraws than bringing in for total sales and commission then yes they are now running a Ponzi scheme. They now have less funds to give back out than what was given to them, people at the top of the scheme cash out, people at the bottom are left holding the digital poo of bitcoin. To try and prevent a mass exodus or lawsuits, they delay all withdraws until they have enough to satisfy the loudest complainers first that had the most to lose. Everyone else with a small a

The value of the US dollar doesn't crash in the space of hours to a fraction of its previous values because of extreme volatility caused by borderline legality, broken exchanges, mass thefts, and flighty investors who panic as every blow lands. So I expect people who use US dollars or other currencies sleep pretty well at night all things considered.

The U.S. Dollar is on no standard. They are printing it like mad right now and the smart people are watching this and just making bets on when the fraud that is the current US dollar will be found out and it will get dumped and inflation will turn it into a fucking peso.

The reason behind it doesn't matter anywhere near as much as that it happened and is high profile. It is like being arrested for a sex crime, especially child molestation. Even if one is proven innocent beyond a shadow of a doubt, one's life will be changed beyond recovery. Every time someone searches one's name online, that arrest will pop up and inject doubt.

As the events happen, they eat away at the credibility of not just the individual people and companies involved but also BitCoin. It shows how easy

Funny how the currency is only as good as the institutions supporting it. (In this case the exchanges)

Lets not kid around. Bitcoin was created with the intention of getting around existing laws and regulations regarding currency. The philosophy behind this idea suggests that these things are unnecessary and represent others stealing your money.

Not saying the banks and money regulations are completely without flaws, but they do have some damn good reasons for being there.

How does bank control over money supply translate into me being a slave? Can you elaborate?

They (the private banks that control the so-called "US" dollar) "print" money any time they or their powerful friends need it. They spend that money and get whatever they want to buy. You lose the value of any savings you had plus you lose some buying power. The slaves like you and me soak up the losses in the form of inflation. The masters have whatever money can buy.

Agree, nearly everyone is a debt serf. If you have family, work for salary own a house, went to university and do most of the 'ordinary' things that people do in developed countries, you probably have substantial debt. People don't 'choose' to be unfree, the current arrangements compel them in the course of living their lives.

I personally have very little debt and, as a result [apart from being quite old] don't work all year, every year. Now just IMAGINE if people started doing that [actually, apparently

Well, yes and no. While it is hard to say what the original developer had in mind for sure, the user base has a variety of motivations behind it, some of which match up very well with what you said, others not so much.

For instance, I am in the 'payment method' camp. Since BTC is a push rather then pull protocol where you transfer money to a merchant rather then giving a merchant your special numbers and they transfer it from your account, I believe that could really cut down on many of the problems with

> Lets not kid around. Bitcoin was created with the intention of getting around existing laws and> regulations regarding currency. The philosophy behind this idea suggests that these things are> unnecessary and represent others stealing your money.

Actually I believe it suggests far more distrust in a central authority and the Fed. You don't have to go too far into the anti-Fed conspiracy nutjob side of things to question whether it is too much power or too corrupting. I mean, even if you accept tha

Why not go do something useful with your time, try to make money by creating actual value in the world, rather than surrounding yourself with get-rich-quick schemers, scammers, and thieves in the bitcoin world, hoping to score big?

Understood, and of course people have a right to make money however they see fit.

Won't stop me from trying to plant the seeds of thought though. I'd be happier if there were fewer people operating from greed and more people trying to enrich themselves and their surrounding in more creative ways, so I don't mind trying to make the point and see if it resonates.

Understood, and of course people have a right to make money however they see fit.

Won't stop me from trying to plant the seeds of thought though. I'd be happier if there were fewer people operating from greed and more people trying to enrich themselves and their surrounding in more creative ways, so I don't mind trying to make the point and see if it resonates.

I don't think it's "greed" as much as it's the belief that you're a nobody and a loser if you aren't materialistic, if you don't work so many hours making money that you no longer have the time to enjoy the money you have made, if you don't have the wealth and status to control others. The old vice of greed is really only one component of the problem. A lot of the participants aren't strictly greedy, they just don't know any other way to "be somebody".

Why not go do something useful with your time, try to make money by creating actual value in the world, rather than surrounding yourself with get-rich-quick schemers, scammers, and thieves in the bitcoin world, hoping to score big?

Because you have to eat. If you aren't independently wealthy, the best you can hope is to be treated as a valuable asset in someone else's get-rich schemes. But even that severely limits your options - you'll end up inventing microsecond trading algorithms instead of medical mole

... it raised up again with the same speed, if not more. Less that 24h after the FUD announcement by MtGox, Bitcoin value is already recovered and rising. See: http://bitcoinwisdom.com/markets/bitstamp/btcusd

And? It highlights the real issue with the proposed "value" of this currency. It's not stable, it's not backed by any meaningful entity, and its value is an illusion created by Libertarians and gov't conspiracy nuts who love to circle-jerk each other that somehow currency can just appear out of thin air...like magic. You can argue a fiat currency system, but it means a lot more when a massive nation (or group of nations) back that currency and will use military force to ensure it stays around.

I can't believe whoever wrote the original code didn't catch this. It seems pretty database 101 class to me. Even the non-programmers had to take that class at my college and it always taught that you don't base a primary key in a table (or use as a unique ID in code) a value which isn't necessarily unique or can change. It's almost the same thing as not using as the primary data table key a compound key of last name, first name, and middle initial. First of all, it can change. Secondly, it can be repeated. That's basics, people. This isn't too far from that.

Bitcoins are the collectable of the moment - it's like the comic book bubble. Sure, really old comics (like 1940's) remain valuable as artistic artifacts (issues that only exist in single or double digits in known quantity in the world), but you can pretty much get any comic from 1990 on for cover price at this point with very few exceptions, and even 60's/70's stuff for $20-30 now that all used to go for $100's in the 90's during the boom.

Really? Simple workaround? Using a unique ID is the only real option, and the problem has more to do with the ability of the "attacker" to change the transaction ID. If I write someone a check and the check numbers don't match my records then I know I have to examine the records. How do these Banking Anarchists think our mishmash of Bank databases with a Central Bank work?
Oh that's how "Real" banking works. We can't be seen doing something that "Real" banks have to do. We're against the man, and bank data