___ ___
/ / ____ ____ \ \
/ / / _ \ / _ \ \ \
( ( ( <_> | <_> ) ) )
\ \ \____/ \____/ / /
\__\ /__/

How to crack AES-256....

AES-256 is the standardized encryption specification. It's used worldwide by everyone from corporations to the US government. It's largest key size is 256 bits. This means that the **key**, the thing that turns encrypted data into unencrypted data, is string of 256 1s or 0s.

With each character having two possibilities (1 or 0), there are 2^{256} possible combinations. Typically, only 50% of these need to be exhausted to yield the correct key, so only 2^{255} need to be guessed. How long would it take to flip through each of the possible keys?

When doing mundane, repetitive calculations (such as brute-forcing or bitcoin mining), the GPU is better suited than the CPU. A high-end GPU can typically do about 2 billion calculations per second (2 gigaflops).
So, we'll use GPUs. Say you had a billion of these, all hooked together in a massively parallel computer system. Together, they could perform at 2e18 flops, or

**2 000 000 000 000 000 000 keys per second (2 quintillion) **

1 billion gpus @ 2 gigaflops each (2 billion flops)

Since there are 31 556 952 seconds in a year, we can multiply by that to get the keys per year.

```
*31 556 952
```

=6.3113904e25 keys per year (~10 septillion, 10 yottaflops)

Now we divide 2^{255} combinations by 6.3113904e25 keys per year:

```
2^255 / 6.3113904e25
```

=9.1732631e50 years

The universe itself only existed for 14 billion (1.4e10) years. It would take ~6.7e40 times longer than the age of the universe to exhaust half of the keyspace of a AES-256 key.

On top of this, there is an energy limitation. The The Landauer limit is a theoretical limit of energy consumption of a computation. It holds that on a system that is logically irreversible (bits do not reset themselves back to 0 from 1), a change in the value of a bit requires an entropy increase according to kTln2, where k is the Boltzmann constant, T is the temperature of the circuit in kelvins and ln2 is the natural log(2).

Lets try our experiment while considering power.

most high-end GPUs take around 150 watts of energy to power themselves at full load. This doesn't include cooling systems.

150 000 000 000 watts (150 gigawatts)

1 billion gpus @ 150 watts

` 1.5e11 watts`

This is enough power to power 50 million american households.

The largest nuclear power reactors (Kashiwazaki-Kariwa) generate about 1 gigawatt of energy.

` 1.5e11 watts / 1 gigawatt = 150`

Therefore, 1 billion GPUs would require 150 nuclear power plant reactors to constantly power them, and it would still take longer than the age of the universe to exhaust half of a AES-256 keyspace.

1 billion GPUs is kind of unrealistic. How about a supercomputer?

The Tianhe-2 Supercomputer is the world's fastest supercomputer located at Sun Yat-sen University, Guangzhou, China. It clocks in at around 34 petaflops.

**Tianhe-2 Supercomputer @ 33.86 petaflops (quadrillion flops)**

` =33 860 000 000 000 000 keys per second (33.86 quadrilion)`

3.386e16 * 31556952 seconds in a year

2^{255} possible keys

` 2^255 / 1.0685184e24`

=1.0685184e24 keys per year (~1 septillion, 1 yottaflop)

=5.4183479e52 years

That's just for 1 machine. Reducing the time by just one power would require 10 more basketball court-sized supercomputers. To reduce the time by x power, we would require 10x basketball court-sized supercomputers.

**It would take 1038 Tianhe-2 Supercomputers running for the entirety of the existence of everything to exhaust half of the keyspace of a AES-256 key.
**

UPDATE:

**
GeForce GTX 1080 Ti - 11,3 TFLOPS (250W)**

GeForce RTX 2080 Ti - 13,4 TFLOPS (250W)