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

15

4

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?

4Why would they? They're only a billion times faster than doing it via CPU. – Nick ODell – 2015-12-14T03:20:07.450

9Short answer: No. 2^256 is a much larger number than you think it is. – Nate Eldredge – 2015-12-14T03:35:52.980

3As 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 – 2015-12-14T05:57:45.820

13

(Note that SHA-256 is not an encryption algorithm, it's a cryptographic hash function. It's important not to confuse the two.)

– Nate Eldredge – 2015-12-14T06:00:22.190

5Question is flawed the premise of breaking encryption is not what this question is about. It should be about creating a hash collision. – Mark S. – 2015-12-15T17:16:11.870

21

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.

2Look 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 – 2017-09-29T12:15:10.617

1@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 – 2017-10-05T17:57:32.697

7keep in mind that the age of the universe is only about 7.2 * 10^15 minutes – Andre Holzner – 2018-02-09T14:33:07.247

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.

1That is a great point...it would take a lot of storage to keep all the results that miners produce for later analysis. – Paul Omans – 2017-09-29T20:11:31.297

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.

4If 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 – 2015-12-14T16:25:02.220

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 – 2015-12-14T20:34:32.913

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

2

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 – 2019-01-05T15:49:09.590