Aes Algorithm - Module-4
Aes Algorithm - Module-4
When the Data Encryption Standard algorithm, also known as the DES
algorithm, was formed and standardized, it made sense for that
generation of computers.
Going by today’s computational standards, breaking into the
DES algorithm became easier and faster with every year, as seen in the
image below.
In Real time
Why Was the AES Encryption Algorithm necessary?
A more robust algorithm was the need of the hour, with longer key sizes
and stronger ciphers to break into.
They created the triple DES to fix this problem, but it never became
mainstream because of its relatively slower pace.
Add Round Key: You pass the block data stored in the state array
through an XOR function with the first key generated (K0). It passes the
resultant state array on as input to the next step.
Add Round Key:
Sub-Bytes:
In this step, it converts each byte of the state array into hexadecimal,
divided into two equal parts. These parts are the rows and columns,
mapped with a substitution box (S-Box) to generate new values for the
final state array.
Shift Rows:
• It swaps the row elements among each other. It skips the first row. It
shifts the elements in the second row, one position to the left. It also
shifts the elements from the third row two consecutive positions to the
left, and it shifts the last row three positions to the left.
Mix Columns:
• It multiplies a constant matrix with each column in the state array to
get a new column for the subsequent state array. Once all the columns
are multiplied with the same constant matrix, you get your state array
for the next step. This particular step is not to be done in the last
round.
Add Round Key:
• The respective key for the round is XOR’d with the state array is
obtained in the previous step. If this is the last round, the resultant
state array becomes the ciphertext for the specific block; else, it passes
as the new state array input for the next round.
Example
Now that you understand the basic steps needed to go through the
encryption procedure, understand this example to follow along.
Example
• As you can see in the image above, the plaintext and encryption
convert keys to hex format before the operations begin. Accordingly,
you can generate the keys for the next ten rounds, as you can see
below.
Key Generated For Every Round