How big is 128 bit ?! 🤔

Adeojo Emmanuel
2 min readMay 27, 2020

--

Recently, I started working on a modified AES algorithm for low latent devices, which took me communicating with people about security and cryptography, but I realized that most people don't know how large a 128-bit key could be.

Most people know that 128 is a BIG NUMBER but don’t comprehend exactly how big it is. Outside of a few disciplines such as cryptography and physics, most people will never come across a number that large. Most cryptographic algorithms deal with numbers that are 128 bits or larger. A 128-bit number has ²¹²⁸ possible values, but how big is ²¹²⁸ ?! A 128-bit number has 2 ¹²⁸ possible values. That means 2 x 2 x 2x …128 times 🤭.

We can also write it as: 2 ⁶⁴ x 2 ⁶⁴ or as, 2 ³² x 2 ³² x 2 ³² x 2 ³².

It’s important to understand that 2 ¹²⁸ is not twice as big as 2 ⁶⁴; it is 2 ⁶⁴ times as big. If you take 2 ⁶⁴ and double it, you only get 2 ⁶⁵. Let’s see what these numbers look like when we write them out as numbers:

2 ³² = 4,294,967,296.
2 ⁶⁴ = 18,446,744,073,709,551,616.
2 ¹²⁸ = 340,282,366,920,938,463,463,374,607,431,768,211,456

2 ³² is only about 4.3 billion which is a little less than the number of people alive today.

2 ⁶⁴ is about 18.4 quintillion which is completely outside normal human experience.

2 ¹²⁸ is 340 undecillion and I had to look that up because I had no idea what the number is called.

How long would it take to brute-force a 128-bit key ?! If your PC can try 240 keys per day, it would take you about 847,904,136,496,835,804,725,427 (848 sextillions) years in the worst case. Does this mean we won’t ever break a 128-bit cipher like AES? The answer is No, there is still a chance that Advances cryptanalysis may eventually allow us to break AES (or any other cipher) with far less effort than brute force. With quantum computers, we’ll be able to break AES and other 128-bit symmetric algorithms with about 2 ⁶⁴ effort. Right now, it’s possible to break specific implementations due to side-channel attacks, bad RNG, and other problems.

--

--