# Won't ASIC miners eventually break SHA-256 encryption?

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?

• Why would they? They're only a billion times faster than doing it via CPU. Commented Dec 14, 2015 at 3:20
• Short answer: No. 2^256 is a much larger number than you think it is. Commented Dec 14, 2015 at 3:35
• 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. Commented Dec 14, 2015 at 5:57
• (Note that SHA-256 is not an encryption algorithm, it's a cryptographic hash function. It's important not to confuse the two.) Commented Dec 14, 2015 at 6:00
• Question is flawed the premise of breaking encryption is not what this question is about. It should be about creating a hash collision. Commented Dec 15, 2015 at 17:16

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, 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.

• 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
Commented Sep 29, 2017 at 12:15
• @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". ? Commented Oct 5, 2017 at 17:57
• keep in mind that the age of the universe is only about 7.2 * 10^15 minutes Commented Feb 9, 2018 at 14:33

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.

• That is a great point...it would take a lot of storage to keep all the results that miners produce for later analysis. Commented Sep 29, 2017 at 20:11

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.

• 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. Commented Dec 14, 2015 at 16:25
• 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. Commented Dec 14, 2015 at 20:34

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.

• 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: passwordsgenerator.net/sha256-hash-generator . Commented Jan 5, 2019 at 15:49