Jump to content
wdw

[studiu interesant] Time and energy required to brute-force a AES-256 encryption key

Recommended Posts

I did a report on encryption a while ago, and I thought I'd post a bit of it here as it's quite mind-boggling.

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 2256 possible combinations. Typically, only 50% of these need to be exhausted to yield the correct key, so only 2255 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 2255 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

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

 

SURSA

  • Upvote 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...