History:
The DES algorithm was developed in 1975 and was considered fairly strong and superior for that time and computation power at that time but with newer developments in computer systems and increasing computational power it became breakable faster and the process became relatively easy. It was cracked for the first time in 1997, so a more robust algorithm had to be developed. Triple DES was created to fix the problem but was relatively slower so was not adapted by most. Hence, the AES was developed, also known as the Rijnadael algorithm, is a symmetric block cipher algorithm with block size of 128-bits. Keys of 128, 192 and 256 bits are used to convert these individual blocks, once encrypted the blocks are joined together to form the ciphertext.
Following are the steps to perform AES algorithm:
Steps for key expansion:
t = SubWord (RotWord (wi-1)) ⊕ RConi/4
RotWord is similar to ShiftRows transformation, but is applied to only one row i.e., it takes a word (4 bytes) and shifts each byte to left with wrapping.
SubWord is similar to SubBytes transformation, but is applied only to four bytes i.e., it takes each byte in the word and substitutes another byte for it from a predefined 16 x 16 (0 to F x 0 to F) matrix.
Round Constants or RCon, is a 4-byte value with three rightmost bytes as zero. The table below shows values for AES-128 with 10 rounds.
Round |
RCon |
Round |
RCon |
1 |
(01 00 00 00)16 |
6 |
(20 00 00 00)16 |
2 |
(02 00 00 00)16 |
7 |
(40 00 00 00)16 |
3 |
(04 00 00 00)16 |
8 |
(80 00 00 00)16 |
4 |
(08 00 00 00)16 |
9 |
(1B 00 00 00)16 |
5 |
(10 00 00 00)16 |
10 |
(36 00 00 00)16 |
Encryption:
1. Shift Byte Transformation
2. Shift Row Transform
3. Mixed Column Transform
4. Add Round Key Transform