0% found this document useful (0 votes)
20 views4 pages

Advanced Encryption Standard

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views4 pages

Advanced Encryption Standard

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Advanced Encryption Standard (AES)

Advanced Encryption Standard (AES) is widely established encryption


algorithm established by the U.S National Institute of Standards and
Technology (NIST) in 2001. It is a much stronger than DES and triple DES
despite being harder to implement.

 AES is a block cipher.


 The key size can be 128/192/256 bits.
 Encrypts data in blocks of 128 bits each.
That means it takes 128 bits as input and outputs 128 bits of encrypted
cipher text as output. AES relies on substitution-permutation network
principle which means it is performed using a series of linked operations
which involves replacing and shuffling of the input data.

Working of the Cipher :


AES performs operations on bytes of data rather than in bits. Since the block
size is 128 bits, the cipher processes 128 bits (or 16 bytes) of the input data
at a time.
The number of rounds depends on the key length as follows :
 128 bit key – 10 rounds
 192 bit key – 12 rounds
 256 bit key – 14 rounds
Creation of Round keys :
A Key Schedule algorithm is used to calculate all the round keys from the
key. So the initial key is used to create many different round keys which will
be used in the corresponding round of the encryption.
Encryption :
AES considers each block as a 16 byte (4 byte x 4 byte = 128 ) grid in a
column major arrangement.
[ b0 | b4 | b8 | b12 |
| b1 | b5 | b9 | b13 |
| b2 | b6 | b10| b14 |
| b3 | b7 | b11| b15 ]
Each round comprises of 4 steps :
 SubBytes
 ShiftRows
 MixColumns
 Add Round Key
The last round doesn’t have the MixColumns round.
The SubBytes does the substitution and ShiftRows and MixColumns
performs the permutation in the algorithm.
SubBytes :
This step implements the substitution.
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.
In this step each byte is substituted by another byte. Its performed using a
lookup table also called the S-box. This substitution is done in a way that a
byte is never substituted by itself and also not substituted by another byte
which is a compliment of the current byte. The result of this step is a 16 byte
(4 x 4 ) matrix like before.
The next two steps implement the permutation.
ShiftRows :
This step is just as it sounds. Each row is shifted a particular number of
times.
 First row is not shifted.
 Second row is shifted one (byte) position to the left.
 Third row is shifted two positions to the left.
 Fourth row is shifted three positions to the left.
 The result is a new matrix consisting of the same 16 bytes
but shifted with respect to each other.

(A left circular shift is performed.)


[ b0 | b1 | b2 | b3 ] [ b0 | b1 | b2 | b3 ]
| b4 | b5 | b6 | b7 | -> | b5 | b6 | b7 | b4 |
| b8 | b9 | b10 | b11 | | b10 | b11 | b8 | b9 |
[ b12 | b13 | b14 | b15 ] [ b15 | b12 | b13 | b14 ]
MixColumns :

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.
This step is basically a matrix multiplication. Each column is multiplied with a
specific matrix and thus the position of each byte in the column is changed
as a result.

This step is skipped in the last round.


[ c0 ] [ 2 3 1 1 ] [ b0 ]
| c1 | = | 1 2 3 1 | | b1 |
| c2 | | 1 1 2 3 | | b2 |
[ c3 ] [ 3 1 1 2 ] [ b3 ]
Add Round Keys :
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.
After all these rounds 128 bits of encrypted data is given back as output.
This process is repeated until all the data to be encrypted undergoes this
process

You might also like