If sha-256 was "broken" in the way md5 is "broken" (possibility to create a collision if certain prerequisites are given), would this imply that it's also easy to find nonce so that md5(nonce+data) < diff ("create a collision with 0000000000*")?
I'm not sure wether or not "easy collision-finding" implies easy mining, but it might be true (maybe depending on the algorithm used).
I can't even judge which might be harder to accomplish: "easy collision-finding" or "easy mining".
Thanks Gavin for reminding me about the same-hash-transaction-construction-attack, I hadn't considered this here up to this point.
In case easy collision finding implies easy mining, that attack is moot, though, because the chain will be dead anyway due to cheap mining.
No, it doesn't imply that at all.
As far as I know, no one has ever actually tried to attack a hashing algorithm in a way that would make mining easier. But all hashing attacks require certain freedoms in the inputs, and the scheme we use for mining doesn't really give an attacker much room to work with. Go look at the
header and think carefully about where each field comes from and how much freedom an attacker has to change it. The Merkle root in particular is a pain in the ass. Even if you could run SHA256 backwards and create valid inputs from desired outputs, you'd still have the problem of creating valid(!) transactions for those hashes.
The most realistic attack would be a statistical test that could estimate the likelihood of finding a valid block if we iterate all 2
32 possible nonces. If this test was 100% accurate, the attacker could just change his generate transactions until he found one that the test said would produce a block, and then iterate the nonces. If a test like that was discovered, and then kept secret, the holder of it could monopolize mining.
Just not being secret is enough to mitigate this attack. If the test is public, everyone will use it, and difficulty will quickly scale up by a factor of 4 billion. No big deal. But in reality, the test won't be perfect, it will be weak, and again, difficulty scaling works off of the
apparent hashing power of the network, and this would just make the network appear to be hashing faster than it really is.