AES algorithm is a symmetrical block cipher algorithm that takes in input the plain text in blocks of 128 bits and converts them using keys of 128, 192, and 256 bits in the Ciphertext. It is used by the US government to protect classified information. AES is implemented in software and hardware throughout the world to encrypt sensitive data. It is essential for government computer security, cybersecurity, and electronic data protection. The National Institute of Standards and Technology (NIST) started the development of AES in 1997.
AES is an iterative rather than Feistel cipher. It is based on ‘substitution–permutation network’. It comprises of a series of linked operations, some of which involve replacing inputs by specific outputs (substitutions) and others involve shuffling bits around (permutations). The features of AES are as follows −
1. Symmetric key symmetric block cipher.
2. 128-bit data, 128/192/256-bit keys.
3. Stronger and faster than Triple-DES.
4. Provide full specification and design details.
5. Software implementable in C and Java
Working of AES Algorithm
The AES algorithm uses a substitution-permutation, or SP network, with multiple rounds to produce ciphertext. The number of rounds depends on the key size being used. A 128-bit key size dictates ten rounds, a 192-bit key size dictates 12 rounds, and a 258-bit key size has 14 rounds. Each of these rounds requires around key, but since only one key is inputted into the algorithm, this key needs to be expanded to get keys for each round, including round 0. Each round in the algorithm consists of four steps.
(SubBytes) The 16 input bytes are substituted by looking up a fixed table (S-box) given in design. The result is in a matrix of four rows and four columns.
Shifting of Rows
Each of the four rows of the matrix is shifted to the left. Any entries that ‘fall off’ are re-inserted on the right side of the row. A shift is carried out as follows −
1. The first row is not shifted.
2. The second row is shifted one (byte) position to the left.
3. The third row is shifted two positions to the left.
4. The fourth row is shifted three positions to the left.
5. The result is a new matrix consisting of the same 16 bytes but shifted with respect to each other.
Mixing of Columns
Each column of four bytes is now transformed using a special mathematical function. This function takes as input the four bytes of one column and outputs four completely new bytes, which replace the original column. The result is another new matrix consisting of 16 new bytes. It should be noted that this step is not performed in the last round.
Adding the Round Key
The 16 bytes of the matrix are now considered as 128 bits and are XORed to the 128 bits of the round key. If this is the last round then the output is the Ciphertext. Otherwise, the resulting 128 bits are interpreted as 16 bytes and we begin another similar round.
The process of decryption of an AES ciphertext is similar to the encryption process in the reverse order. Each round consists of the four processes conducted in the reverse order −
- Add round key
- Mix columns
- Shift rows
- Byte substitution
Since sub-processes in each round are in a reverse manner, unlike for a Feistel Cipher, the encryption and decryption algorithms need to be separately implemented, although they are very closely related.
NIST specified the new AES algorithm must be a block cipher capable of handling 128-bit blocks, using keys sized at 128, 192, and 256 bits. Other criteria for being chosen as the next AES algorithm included the following:
Competing algorithms were to be judged on their ability to resist attack -- as compared to other submitted ciphers. Security strength was to be considered the most important factor in the competition.
Intended to be released on a global, nonexclusive, and royalty-free basis, the candidate algorithms were to be evaluated on computational and memory efficiency.
Factors to be considered included the algorithm's flexibility, suitability for hardware or software implementation, and overall simplicity.
Advantages of the AES algorithm
1. AES is a very strong algorithm.
2. Can be designed for maximum of 256 bits.
3. It required less memory space.
4. This required minimum sample preparation.
5. It gives rapid results.
6. No preliminary treatment of the sample is required.
Disadvantages of the AES algorithm
1. Theoretical attacks more effective than brute force are known
2. 32-bit oriented does not take all advantages of the 64-bit platform.