<p>i can not calculate gflops  but...</p>

<p>some easy thoughts:</p>

<p>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. </p>

<p>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.</p>

<p>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 <em>many</em> bitcoins. </p>

CC BY-SA 3.0
2018-01-23T05:36:53.247Z
Sha256 is used to calculate bitcoin address from
chytrik
CC BY-SA 3.0
2018-01-22T23:32:17.990Z
2018-01-22T23:32:17.990Z
anion
<p>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. </p>

<p>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. </p>

CC BY-SA 3.0
2018-01-22T23:16:34.530Z
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
CC BY-SA 3.0
2018-01-23T00:30:15.000Z
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
CC BY-SA 3.0
2018-01-23T00:49:01.340Z
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
CC BY-SA 3.0
2018-01-22T21:26:10.320Z
2018-01-22T21:26:10.320Z
chytrik
<p>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...</p>

<p>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?</p>

<p>best regards</p>

<blockchain><hash><sha256>
Attacking Blochcain/Bitcoin by hash
h0ppel
# Attacking Blochcain/Bitcoin by hash

(Asked by: username_0 on 2018-01-22)

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

**Tags:** blockchain, hash, sha256


---

## 2 answers

### Answer by username_1 on 2018-01-22. Score: 0 | Accepted answer

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.

> **Comments:**
> **username_2**: Sha256 is used to calculate bitcoin address from  

---

### Answer by username_2 on 2018-01-22. Score: -1

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.

> **Comments:**
> **username_1**: 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).  
> **username_2**: 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.  
> **username_2**: 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.  

---

