Overview: Advanced Encryption Standard (AES, 2001)
20 Nov 2018
- Overview : Advanced Encryption Standard (AES, 2001)
- AES (1/3): An Introduction to Galois Fields
- AES (2/3): A Description of AES Lookup Tables
- AES (3/3): Encryption and Decryption
↪ We choose to go to the Moon
As a self-imposed programming challenge I started to have a closer look into the topic of Cryptography. I wanted to know much more about the (probably) most important cipher in the world: The Advanced Encryption Standard. At the beginning of this year, while doing some research on the web, I stumbled accross the brilliant youtube channel “Introduction to Cryptography by Christof Paar”. This channel and the associated script “Understanding Cryptography” helped me a lot to get an insight into the algorithm and the basics of cryptography (confusion and diffusion, yay!)
It may sound a bit awkward: AES is full of mathematical elegance and beauty.
The following articles will describe some of the history and mathematical background but mostly they will cover the adventure of writing my own implementation of an AES library in C, which can be found here: https://gogs.gfuzz.de/oliver.peter/AES/releases
“We choose to go to the Moon in this decade and do the other things, not because they are easy, but because they are hard.” – John F. Kennedy, September 12, 1962
↪ From DES to 3DES
During the 1990s, when DES was still the de facto encryption standard, cryptoanalysts found a way to reconstruct enciphered plain texts within a reasonable time frame. (Recall: DES is a 56bit cipher, based on the ‘Feistel network’ which has been around since 1977). As a quick countermeasure, cryptographers came up with a more secure version of the algorihtm: 3DES. The number three stands for the fact that you run the algorithm three times using three 56bit keys. One of the disadvantages of 3DES is that it is not a 168bit (3x56bit) cipher: The same keys are used for the first and the third cipher round, this makes 3DES only a 112bit cipher. Furthermore, there is a major drawback: 3DES is very slow in software. Initially, DES was designed to be very effective when running on a plain hardware implementation, running DES three times in a row on software makes things just worse.
↪ Rijndael = Rijmen ^ Daemen
While DES was secretely developed by IBM for the US Government, AES is the result of a public call for proposals by the NIST in 1997. The proposal submitted by the two Belgian cryptographers Vincent Rijmen and Joan Daemen, called Rijndael, won the final round in October 2000 and became the Advanced Encryption Standard (AES) and succeeded the DES. The original AES paper can be found here.
↪ Cipher details
Rijndael is an enciphering algorihtm with variable key length and input block size of 128, 192 and 256 bits. The AES however does only allow an input of 128bit blocks. It’s core is based on substitution-permutation layers which make heavy use of Finite field arithmetic. AES convinces with it’s mathematical elegance, high security and good performance in software implementation. The actual implementation details can be found in the next articles.