<p>TL;DR: No, but if the hashes were collected, one might be able to better tell as to whether or not the SHA256^2 algorithm is broken.</p>

<p>If one can find a way to produce desired outputs from specific inputs, then a hashing algorithm is considered "broken". Both MD5 and SHA1 are know to be broken in this way. Theoretically, running an algorithm over and over again over a set of random inputs (exactly what mining is), could provide insight into patterns produced by the algorithm, thereby allowing one to prove whether or not it's broken. However, this insight would only come through statistical analysis of data gathered, and since most of the data is thrown out -- of the trillions of hashes per second only the ones corresponding to minded blocks are recorded -- this isn't feasible.</p>

<p>Another subtlety: because the algorithm in question is specifically SHA256 applied twice and not simply SHA256, even if the data were collected and analyzed, it may not tell us anything directly about SHA256.</p>

CC BY-SA 3.0
2017-09-29T20:11:31.297Z
That is a great point...it would take a lot of storage to keep all the results that miners produce for later analysis.
Paul Omans
CC BY-SA 3.0
2015-12-18T17:06:46.997Z
2015-12-18T17:06:46.997Z
John Henry
<p>I understand. 2^255 is indeed an incredibly large number.  Not only is SHA-256 not an encryption algorithm, it is a cryptographic hash function, so my question was a little flawed to begin with, but the amount of time it would take to brute-force a single SHA256 hash is (currently) much too long even with the most advanced ASIC miners available today.  To brute-force a single SHA256 hash, we would need ASIC miners that are a trillion trillion trillion times faster than the hash rate of the entire bitcoin network.</p>

CC BY-SA 3.0
2015-12-14T16:25:02.220Z
If you work through the exercise I proposed above, even if you had miners a trillion trillion trillion times faster than the current network, brute-forcing SHA256 would still take you 71430540814238958387154 years.  The Sun is expected to go out in about 5000000000 years.
Nate Eldredge
CC BY-SA 3.0
2015-12-14T20:34:32.913Z
Nate - I absolutely get your point, although bitcoin mining technology is getting better all the time, we probably won't have anything that is powerful enough to brute force SHA256 for a long, long time.
Paul Omans
CC BY-SA 3.0
2015-12-14T13:12:35.690Z
2015-12-14T13:12:35.690Z
Paul Omans
<p>The odds you calculate should be those of stealing the private key, not calculating it. The latter is the fools’ method, while the former happens every day with key loggers. </p>

CC BY-SA 4.0
2019-01-05T15:49:09.590Z
Like the OP said, sha256 is a cryptographic hash function. So, there's nothing in there about requiring a private key in order to generate an sha256. Try generating an sha256 yourself and notice that nothing but the input string is needed: https://passwordsgenerator.net/sha256-hash-generator/ .
user3773048
CC BY-SA 3.0
2017-12-26T20:08:40.783Z
2017-12-26T20:08:40.783Z
Kevin
<p>Another way to look at it is to take a look at a recent block that was mined, for example, block 388368.  Looking at this block on <a href="https://blockchain.info/block/0000000000000000021ff110a589e44f56979254a204557311204f803910fdfa" rel="noreferrer">blockchain.info</a>, you can see that the hash for this block is:</p>

<pre><code>0000000000000000021ff110a589e44f56979254a204557311204f803910fdfa
</code></pre>

<p>It took roughly 10 minutes for all of the miners (doing a combined 700,000,000 giga-hashes per second) to find the above hash which has enough leading zeroes (17) to meet the difficulty requirement of the network at that time.  Since the remaining digits after the first 17 leading zeroes could have been anything, there are 16^47 (i.e.16^(64-17)) possible hashes that could have been found which would have satisfied the difficulty requirement (which is 3.92 * 10^56), yet it took <code>all</code> of the mining power of the entire bitcoin network ~10 minutes to find just one hash that met the requirement.  </p>

<p>To crack a hash, you need not just the first 17 digits to match the given hash, but all 64 of the digits to match.  So, extrapolating from the above, it would take 10 * 3.92 * 10^56 minutes to crack a SHA256 hash using all of the mining power of the entire bitcoin network.  That's a long time.</p>

CC BY-SA 3.0
2017-09-29T12:15:10.617Z
Look at it another way. The probability of winning the 6-49 lottery is 1 in (49 x 48 x 47 x 46 x 45 x 44) which is about 1 in 10 000 000 000. If 20 million players play twice a week and each player plays on average 10 numbers each draw, then there should be only 2 winners each year.
Luke
CC BY-SA 3.0
2017-10-05T17:57:32.697Z
@mti2935, If i'm not mistaken, what you're saying is this:
Given a specific hash and the current networking hashrate, it would take an unreasonably long time -- 10 * 3.92 * 10^56 minutes -- to find a block that would satisfy that hash. Thus, "no".
?
John Henry
CC BY-SA 3.0
2018-02-09T14:33:07.247Z
keep in mind that the age of the universe is only about 7.2 * 10^15 minutes
Andre Holzner
CC BY-SA 4.0
2015-12-14T15:32:21.737Z
2018-05-28T21:26:00.493Z
2018-05-28T21:26:00.493Z
mti2935
<p>I might be confused as to how Bitcoin works, but as far as I can tell, ASIC miners are getting better every year and faster at cracking SHA-256 encryption.  Won't this cause the eventual complete obsolescence of SHA-256 encryption entirely, much faster than previously estimated?</p>

CC BY-SA 3.0
2015-12-14T03:20:07.450Z
Why would they? They're only a billion times faster than doing it via CPU.
Nick ODell
CC BY-SA 3.0
2015-12-14T03:35:52.980Z
Short answer: No. 2^256 is a **much** larger number than you think it is.
Nate Eldredge
CC BY-SA 3.0
2015-12-14T05:57:45.820Z
As a fun exercise in arithmetic: look up the current hash rate of the entire Bitcoin network.  Multiply it by a trillion trillion trillion.  Work out, at that rate, how long it would take to perform 2^255 hashes, which is what you would need to brute-force a single SHA256 hash.  Look up the life expectancy of the universe and compare.
Nate Eldredge
CC BY-SA 3.0
2015-12-14T06:00:22.190Z
(Note that SHA-256 is not an encryption algorithm, it's a [cryptographic hash function](https://en.wikipedia.org/wiki/Cryptographic_hash_function).  It's important not to confuse the two.)
Nate Eldredge
CC BY-SA 3.0
2015-12-15T17:16:11.870Z
Question is flawed the premise of breaking encryption is not what this question is about. It should be about creating a hash collision.
Mark S.
<encryption><sha256>
Won't ASIC miners eventually break SHA-256 encryption?
Paul Omans
# Won't ASIC miners eventually break SHA-256 encryption?

(Asked by: username_0 on 2015-12-14)

I might be confused as to how Bitcoin works, but as far as I can tell, ASIC miners are getting better every year and faster at cracking SHA-256 encryption. Won't this cause the eventual complete obsolescence of SHA-256 encryption entirely, much faster than previously estimated?

**Tags:** encryption, sha256

> **Comments:**
> **username_1**: Why would they? They're only a billion times faster than doing it via CPU.  
> **username_2**: Short answer: No. 2^256 is a **much** larger number than you think it is.  
> **username_2**: As a fun exercise in arithmetic: look up the current hash rate of the entire Bitcoin network.  Multiply it by a trillion trillion trillion.  Work out, at that rate, how long it would take to perform 2^255 hashes, which is what you would need to brute-force a single SHA256 hash.  Look up the life expectancy of the universe and compare.  
> **username_2**: (Note that SHA-256 is not an encryption algorithm, it's a [cryptographic hash function](https://en.wikipedia.org/wiki/Cryptographic_hash_function).  It's important not to confuse the two.)  
> **username_3**: Question is flawed the premise of breaking encryption is not what this question is about. It should be about creating a hash collision.  

---

## 4 answers

### Answer by username_7 on 2015-12-14. Score: 23 | Accepted answer

Another way to look at it is to take a look at a recent block that was mined, for example, block 388368. Looking at this block on [blockchain.info](https://blockchain.info/block/0000000000000000021ff110a589e44f56979254a204557311204f803910fdfa), you can see that the hash for this block is:

```
0000000000000000021ff110a589e44f56979254a204557311204f803910fdfa

```

It took roughly 10 minutes for all of the miners (doing a combined 700,000,000 giga-hashes per second) to find the above hash which has enough leading zeroes (17) to meet the difficulty requirement of the network at that time. Since the remaining digits after the first 17 leading zeroes could have been anything, there are 16^47 (i.e.16^(64-17)) possible hashes that could have been found which would have satisfied the difficulty requirement (which is 3.92 \* 10^56), yet it took `all` of the mining power of the entire bitcoin network ~10 minutes to find just one hash that met the requirement.

To crack a hash, you need not just the first 17 digits to match the given hash, but all 64 of the digits to match. So, extrapolating from the above, it would take 10 \* 3.92 \* 10^56 minutes to crack a SHA256 hash using all of the mining power of the entire bitcoin network. That's a long time.

> **Comments:**
> **username_8**: Look at it another way. The probability of winning the 6-49 lottery is 1 in (49 x 48 x 47 x 46 x 45 x 44) which is about 1 in 10 000 000 000. If 20 million players play twice a week and each player plays on average 10 numbers each draw, then there should be only 2 winners each year.  
> **username_4**: @username_7, If i'm not mistaken, what you're saying is this: Given a specific hash and the current networking hashrate, it would take an unreasonably long time -- 10 * 3.92 * 10^56 minutes -- to find a block that would satisfy that hash. Thus, "no". ?  
> **username_9**: keep in mind that the age of the universe is only about 7.2 * 10^15 minutes  

---

### Answer by username_4 on 2015-12-18. Score: 3

TL;DR: No, but if the hashes were collected, one might be able to better tell as to whether or not the SHA256^2 algorithm is broken.

If one can find a way to produce desired outputs from specific inputs, then a hashing algorithm is considered "broken". Both MD5 and SHA1 are know to be broken in this way. Theoretically, running an algorithm over and over again over a set of random inputs (exactly what mining is), could provide insight into patterns produced by the algorithm, thereby allowing one to prove whether or not it's broken. However, this insight would only come through statistical analysis of data gathered, and since most of the data is thrown out -- of the trillions of hashes per second only the ones corresponding to minded blocks are recorded -- this isn't feasible.

Another subtlety: because the algorithm in question is specifically SHA256 applied twice and not simply SHA256, even if the data were collected and analyzed, it may not tell us anything directly about SHA256.

> **Comments:**
> **username_0**: That is a great point...it would take a lot of storage to keep all the results that miners produce for later analysis.  

---

### Answer by username_0 on 2015-12-14. Score: 0

I understand. 2^255 is indeed an incredibly large number. Not only is SHA-256 not an encryption algorithm, it is a cryptographic hash function, so my question was a little flawed to begin with, but the amount of time it would take to brute-force a single SHA256 hash is (currently) much too long even with the most advanced ASIC miners available today. To brute-force a single SHA256 hash, we would need ASIC miners that are a trillion trillion trillion times faster than the hash rate of the entire bitcoin network.

> **Comments:**
> **username_2**: If you work through the exercise I proposed above, even if you had miners a trillion trillion trillion times faster than the current network, brute-forcing SHA256 would still take you 71430540814238958387154 years.  The Sun is expected to go out in about 5000000000 years.  
> **username_0**: username_2 - I absolutely get your point, although bitcoin mining technology is getting better all the time, we probably won't have anything that is powerful enough to brute force SHA256 for a long, long time.  

---

### Answer by username_5 on 2017-12-26. Score: -2

The odds you calculate should be those of stealing the private key, not calculating it. The latter is the fools’ method, while the former happens every day with key loggers.

> **Comments:**
> **username_6**: Like the OP said, sha256 is a cryptographic hash function. So, there's nothing in there about requiring a private key in order to generate an sha256. Try generating an sha256 yourself and notice that nothing but the input string is needed: https://passwordsgenerator.net/sha256-hash-generator/ .  

---

