<p>As Meni mentions, there are ways to change the hashing algorithm used for Bitcoin. For this change to be made, all clients would have to be updated and the blockchain would look very weird as it would still contain all historic data that used SHA256.</p>

<p>However, when some party from one day to the other can manually create collisions, as I think you suggest with "compromised", they will only be able to send bitcoins from all existing addresses if also RIPEMD-160 and <a href="https://en.bitcoin.it/wiki/ECDSA" rel="nofollow noreferrer">ECDSA</a> will be compromised. These three algorithms are used to create the address from a private key.</p>

<p>SHA256 has more significance in mining. But still, I think the ability to manually create SHA256 collisions won't help you much with mining. When mining, you hash a bock that has a certain formatting. This hash must satisfy certain conditions in order to be accepted. So what you would be able to do when you compromised SHA256 is take a valid hash and look for different plaintexts that result in this hash. However, the chance that this plaintext has a valid block format is very low. I'd guess myself it is even smaller than the chance to find a valid block in the regular way of mining.</p>

<p>(Can anyone please verify this conclusion?)</p>

<p>Concerning address generation and generating <a href="https://bitcoin.stackexchange.com/questions/7724/what-happens-if-your-bitcoin-client-generates-an-address-identical-to-another-pe">address collisions</a>, I once read (sorry I forgot where), that it is indeed the plan to change the hashing algorithm if the mining ecosystem evolves to a certain point. Currently searching for hash collisions is far less profitable than mining. But finding a collision can earn you more than one block reward. So what I read was that as soon as collision finding is no longer discouraged enough by being so much less profitable than mining, a change of hashing algorithm will be necessary. This change will probably make address generation harder.</p>

CC BY-SA 3.0
2013-11-07T16:56:22.067Z
2013-11-07T16:56:22.067Z
2017-04-13T12:47:33.583Z
Steven Roose
<p>There are ways to migrate to new hash functions. However, there is no yet a widely-agreed contingency plan.</p>

CC BY-SA 3.0
2013-11-03T23:45:32.343Z
2013-11-03T23:45:32.343Z
Meni Rosenfeld
<p>The cryptanalysis research in the field of hash function is mainly focused into the collision search, i.e. finding two different plaintexts, such that their hashed images are the same. As far as I know this kind of weakness would not immediately impact bitcoin and its use.</p>

CC BY-SA 3.0
2013-11-03T20:37:39.667Z
2013-11-04T08:59:50.653Z
2013-11-04T08:59:50.653Z
ddddavidee
<p>Hashing algorithms have a long history of becoming widespread and then declared insecure - MD5 is a good example. As Bitcoin increases ever more in popularity, and cryptanalysis becomes ever more sophisticated, there's sure to be a lot of interest in finding holes in SHA256.</p>

<p>Should this happen in, say, the next 10 years, will the network be ruined? Or is there a way that the network would be able to adjust, i.e. by slowly phasing in a new type of block and phasing out SHA256?</p>

<blockchain><security><hash><sha256>
If SHA256 were compromised tomorrow, would Bitcoin collapse, or is there some contingency plan to move the network to a new hashing algorithm?
Mike Battaglia
# If SHA256 were compromised tomorrow, would Bitcoin collapse, or is there some contingency plan to move the network to a new hashing algorithm?

(Asked by: username_0 on 2013-11-03)

Hashing algorithms have a long history of becoming widespread and then declared insecure - MD5 is a good example. As Bitcoin increases ever more in popularity, and cryptanalysis becomes ever more sophisticated, there's sure to be a lot of interest in finding holes in SHA256.

Should this happen in, say, the next 10 years, will the network be ruined? Or is there a way that the network would be able to adjust, i.e. by slowly phasing in a new type of block and phasing out SHA256?

**Tags:** blockchain, security, hash, sha256


---

## 3 answers

### Answer by username_1 on 2013-11-07. Score: 3

As username_2 mentions, there are ways to change the hashing algorithm used for Bitcoin. For this change to be made, all clients would have to be updated and the blockchain would look very weird as it would still contain all historic data that used SHA256.

However, when some party from one day to the other can manually create collisions, as I think you suggest with "compromised", they will only be able to send bitcoins from all existing addresses if also RIPEMD-160 and [ECDSA](https://en.bitcoin.it/wiki/ECDSA) will be compromised. These three algorithms are used to create the address from a private key.

SHA256 has more significance in mining. But still, I think the ability to manually create SHA256 collisions won't help you much with mining. When mining, you hash a bock that has a certain formatting. This hash must satisfy certain conditions in order to be accepted. So what you would be able to do when you compromised SHA256 is take a valid hash and look for different plaintexts that result in this hash. However, the chance that this plaintext has a valid block format is very low. I'd guess myself it is even smaller than the chance to find a valid block in the regular way of mining.

(Can anyone please verify this conclusion?)

Concerning address generation and generating [address collisions](https://bitcoin.stackexchange.com/questions/7724/what-happens-if-your-bitcoin-client-generates-an-address-identical-to-another-pe), I once read (sorry I forgot where), that it is indeed the plan to change the hashing algorithm if the mining ecosystem evolves to a certain point. Currently searching for hash collisions is far less profitable than mining. But finding a collision can earn you more than one block reward. So what I read was that as soon as collision finding is no longer discouraged enough by being so much less profitable than mining, a change of hashing algorithm will be necessary. This change will probably make address generation harder.


---

### Answer by username_2 on 2013-11-03. Score: 1

There are ways to migrate to new hash functions. However, there is no yet a widely-agreed contingency plan.


---

### Answer by username_3 on 2013-11-03. Score: 0

The cryptanalysis research in the field of hash function is mainly focused into the collision search, i.e. finding two different plaintexts, such that their hashed images are the same. As far as I know this kind of weakness would not immediately impact bitcoin and its use.


---

