Assuming that SHA-256 is not save anymore. How could the Bitcoin blockchain get attacked? Ok I could get the input value for the hash function but could I now easily add my own blocks to the chain? I'm currently confused why there are theses hashes used...

How long would it take to attack the hash now, with a working SHA-256. Could you provide me a calculation with GFLOPS or something?

best regards

2 Answers 2


i can not calculate gflops but...

some easy thoughts:

if sha2 is not safe anymore you can not easily steal bitcoin from an existing address by calculating the private key from any address because to generate the address ripemd160 is also used. and you did not assume that ripemd160 is also not safe anymore.

if everyone would know sha2 is not safe anymore then bitcoin will be worthless because everybody can mine without doing any work of the proof-of-work-process.

if only the attacker knows how to calculate the input of an sha2 function, an intelligent attacker would not attack the system. he would use the system: the easiest way to make money when you can calculate nearly arbitrary sha2-hashs with nearly arbitrary input: mining. you can mine blocks and so you can earn 12.5btc several times every hour (furthermore you earn the transactionfees) without paying many money for electricity because you don't need to "work" in the sense of proof of work anymore. the advantage: you do not destroying the system because no one can really realize that you can "hack" the system and so you could theoretically earn many bitcoins.

  • Sha256 is used to calculate bitcoin address from
    – chytrik
    Commented Jan 23, 2018 at 5:36

Breaking SHA256 would break many of the cryptographic mechanisms that secure bitcoin, but if such a situation were to arise, the network could fork to use a new, secure algorithm. Bitcoin’s current implementation depends on SHA256’s security, but in general any other algorithm could be used if users so desired.

In a broader sense, cryptography is a field that is constantly evolving, an ongoing race between the cryptographers, and the hackers that are trying to break cryptographic systems. Before SHA256 there were other algorithms used to secure important systems, and some of those algorithms have now been broken and discarded. Did it cause those other systems to become worthless? Not necessarily, it just meant there needed to be a change in their implementation, in order to remain secure.

  • downvote: "the network could fork to use a new, secure algorithm" wrong. because: sha2 is used to calculate the address from a public key. you can not switch this algorithm because all (!) private keys would have another new address. sha2 is also used to generate new blocks. so if the hash-algorithm for mining will be changed the miners can not mine anymore because their hardware can only mine with sha256. bitcoin would lost approx 99.999% of the hashrate (!) and every quickly attacker can easily do a 51% attack until all miner have new mining hardware (if they buy it ever).
    – anion
    Commented Jan 22, 2018 at 23:16
  • Hmm good point about the address system! I’m going to think on that, are there any good existing resources on it? Re: mining: to ensure a sufficient level of security the algorithm would need to be changed to something that could have a sufficient/distributed hashrate available right away. Other types of ASICs exist, they may not add up to as much hashrate as sha256, but if sha256 breaks then they will become ‘the most secure option available’. I don’t agree that a 51% attack will immediately become a huge issue at that point, and network difficulty issues could be dealt with in the fork.
    – chytrik
    Commented Jan 23, 2018 at 0:30
  • Re: address generation: breaking sha256 would be an issue for keeping public keys secure (given a particular address), but the private key would still be secure (ECDSA is used to generate pubkey from private, not sha256). So as long as privkeys are secured, the fork code could be written to check an address generated by the new algo against what would be expected by the old algo. I think it would be more complicated, but technically possible.
    – chytrik
    Commented Jan 23, 2018 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.