I don't quite understand why hiding the public key behind a hash really helps.
If ECDSA is broken, that is if a private key can be found from a public key in limited amount of time, can't we assume that the time taken to find the private key consists of independent trials?
Unknown. That depends on the weakness that is discovered. Since a significant weakness hasn't been discovered yet, it's impossible to know.
And if so, can't any node simply keep attempting at incoming transactions, stealing one every N days? Making every transaction a gamble?
Possibly.
However, lets imagine for a moment that ECDSA is broken in such a way that the time to crack a private key from a public key is reduced to 6 months.
If I always use a new address for every transaction, then all of my bitcoins are protected by SHA256 and RIPEMD160.
If you have an address that you've re-used, then you might have bitcoins sitting out there on the blockchain with their public key exposed. An attacker can spend the next 6 months working out your private key and then steal your bitcoins.
If I send a transaction, the attacker has (on average) 10 minutes to figure out the private key, craft a replacement transaction that pays the bitcoins to him, and then convince a miner to mine his transaction instead of mine.
Which is safer? Your bitcoins sitting on the blockchain with an exposed public key allowing the attacker to continuously try to craft a transaction that takes your bitcoins until you get around to sending them to a new address? Or my bitcoins that have a window of 10 minutes on average to try to both crack the key AND convince a miner to accept a double-spend transaction in place of the existing one?
The increase in security from using a new address for every transaction is quite small, but it is still better than re-using addresses.
Using a new address for every transaction can also increase your privacy a bit.
Hey Danny , very nice explanation and I understand it well until now but a question comes naturally to me because I always use the same addresses from my hardware wallet.
How would the hacker for example know my private key of an existing bitcoin address which stays connected only to my hardware wallet, is it possible for such address to be cracked from the hackers when the ECDSA is supposedly broken ? Normally it shouldn't but I am curious about this.