We all know that famous picture of the sun and how long it would take to just count to the number 2^256.
I've been thinking, why not put it another way?
What if it
were possible to build and power a computer that could brute force SHA-256?
Let's assume for practical reasons that we want a computer the size of the earth, not much larger.
That's a diameter of 12,742,000 meters.
Let's also assume for practical reasons that we want that computer to be able to brute force SHA-256 within 10 years.
That's 10 * 365 * 24 * 60 * 60 = 3,154e+8 seconds.
The smallest amount of energy that could possibly do any kind of computing is defined by the wavelength of a photon.
I.e. our photon may have a wavelength of 1 diameter of the earth.
The energy of a photon with a wavelength of 12,742,000m is 1.56×10^-32 joules [1]
Let's assume we have a highly efficient algorithm that will be able to compute a number with that least amount of available energy.
To compute all the results in 2^256 (or, as it's sometimes called in a fanciful, scientific way: "count") in ten years would require:
2^256 * 1.56×10^-32 joules / 3,154e+8 seconds =
5.72719275 × 10^33 watts
For comparison, the sun's energy output is
3.846×10^26 W
(according to google)
Now, assuming we are able to build our supercomputer the size of the earth and we'll be able to run it at such extremely low energy requirements, what we'd also be doing would be
releasing the energy output of give or take a million suns within the diameter of the earth.
(why? because thermodynamics is a bitch, and ultimately, that energy will end up as heat)
In other words, if we ever manage to build a supercomputer with the unbelievable power and efficiency to brute force SHA-256 within a human's lifetime, we'd turn that computer into the equivalent of a supernova as soon as we turned it on.
Why am I writing this? I somehow never found that "sun picture" truly satisfying.
The idea of blowing up your home planet, solar system, and maybe even nearby star systems if you were to succeed seems slightly more discouraging.
I've probably made quite a few mistakes in those calculations, so I might be off by a handful of magnitudes, but quite frankly, that doesn't matter much. But please let me know if and where I'm wrong.
[1]
https://www.omnicalculator.com/physics/photon-energy