Difference Between DES and AES
Difference Between DES and AES
Comparison Chart
Basic In DES the data block is divided into In AES the entire data block is
Principle DES work on Feistel Cipher structure. AES works on Substitution and
Permutation Principle.
Key size DES in comparison to AES has AES has larger key size as compared to
Rounds Names Expansion Permutation, Xor, S-box, Subbytes, Shiftrows, Mix columns,
Security DES has a smaller key which is less AES has large secret key
Data Encryption Standard (DES) is a symmetric key block cipher that was adopted by National
Institute of Standard and Technology in the year 1977. DES is based on the Feistel
structure where the plaintext is divided into two halves. DES takes input as 64-bit plain text and
56-bit key to produce 64-bit Ciphertext.
In the figure below you can see the encryption of plaintext using DES. Initially, the 64-bit
plaintext undergoes initial permutation which rearranges the bits to get 64-bit permuted input.
Now this 64 bit permuted input is divided into two halves i.e. 32-bit left portion and 32-bit right
portion. Both this portion undergoes sixteen rounds where each round follows the same
functions. After completion of sixteen rounds, final permutation is done, and the 64-bit
ciphertext is obtained.
Each round contains following functions:
Expansion Permutation: Here the 32-bit right portion is expanded to form 48-bit right
portion.
Xor: The 48-bit right portion is Xor with 48-bit subkey obtained from the 56-bit key,
which results in the 48-bit output.
S-box: The 48-bit output obtained by Xor step is reduced to 32 bit again.
P-box: Here the 32-bit result obtained from S-box is again permuted, which result in 32-
bit permuted output.
Definition of AES (Advanced Encryption Standard)
Advanced Encryption Standard (AES) is also a symmetric key block cipher. AES was
published in 2001 by the National Institute of Standards and Technology. AES was
introduced to replace DES as DES uses very small cipher key and the algorithm was quite
slower.
AES algorithm takes 128-bit plaintext and 128-bit secret key which together forms a 128-bit
block which is depicted as 4 X 4 square matrix. This 4 X 4 square matrix undergoes an initial
transformation. This step is followed by the 10 rounds. Among which 9 round contain following
stages:
Subbytes: It uses S-box by which it performs byte by byte substitution of the entire block
(matrix).
Shift Rows: Rows of the matrix are shifted.
Mix Columns: Columns are of the matrix are shuffled from right to left.
Add round keys: Here, the Xor of the current block and the expanded key is performed.
And the last 10th round involves Subbytes, Shift Rows, and Add round keys stages only and
provides 16 bytes (128-bit) ciphertext.
Key Differences Between DES and AES
1. The basic difference between DES and AES is that the block in DES is divided into two
halves before further processing whereas, in AES entire block is processed to obtain
ciphertext.
2. The DES algorithm works on the Feistel Cipher principle, and the AES algorithm works
on substitution and permutation principle.
3. The key size of DES is 56 bit which is comparatively smaller than AES which has
128,192, or 256-bit secret key.
4. The rounds in DES include Expansion Permutation, Xor, S-box, P-box, Xor and Swap.
On the other hands, rounds in AES include Subbytes, Shiftrows, Mix columns,
Addroundkeys.
5. DES is less secure than AES because of the small key size.
6. AES is comparatively faster than DES.