DES (Data Encryption Standard) and AES (Advanced Encryption Standard) are the two symmetric block ciphers. AES was introduced to overcome the inconvenience of DES. Since DES has a smaller key size, which makes it less safe to overcome this triple DES was introduced, but it turns out to be slower. Therefore, later AES was introduced by the National Institute of Standards and Technology. The basic difference between DES and AES is that in DES el Flat text block is divided into two halves before the main algorithm begins, while in AES, The entire block is processed to get the encrypted text.
Let's discuss some more differences between DES and AES with the help of the comparison chart shown below.
|BASIC||In DES the data block is divided into two halves.||In AES, the entire data block is processed as a single matrix.|
|Beginning||DES work in the Feistel encryption structure.||AES works on the principle of substitution and exchange.|
|Plain text||Plain text is 64 bits.||Plain text can be 128, 192, or 256 bits.|
|Key size||DES compared to AES has a smaller key size.||AES has a larger key size compared to DES.|
|Rounds||16 rounds||10 rounds for something of 128 bits 12 rounds for something of 192 bits 14 rounds for something of 256 bits|
|Name Rounds||Permutacin of expansion, Xor, S-box, P-box, Xor and Swap.||Subbytes, Shiftrows, Mix columns, Addroundkeys.|
|Security||DES has a smaller key that is less secure.||AES has a great secret key comparatively therefore, more secure.|
|Speed||DES is comparatively slower.||AES is faster.|
DES definition (Data encryption standard)
The Data Encryption Standard (DES) is a symmetric key block encryption which was adopted by the National Institute of Standards and Technology in the year 1977 . DES is based on the Feistel structure where the plain text is divided into two halves. DES takes the input as 64-bit plain text and 56-bit key to produce 64-bit encrypted text.
In the following figure you can see plain text encryption using DES. Initially, 64-bit plain text undergoes an initial permutation that rearranges the bits to obtain a 64-bit permuted entry. Now, this 64-bit permuted entry is divided into two halves, that is, the 32-bit left part and the 32-bit right part. Both this part undergoes sixteen rounds where each round follows the same functions. After completing sixteen rounds, the final permutation is performed and the 64-bit encrypted text is obtained.
Each round contains the following functions:
- Permutacin of the expansion : Here the right portion of 32 bits is expanded to form the right portion of 48 bits.
- Xor : The right part of 48 bits is Xor with a 48-bit subkey obtained from the 56-bit key, which results in the 48-bit output.
- S-box : The 48-bit output obtained by the Xor step is reduced back to 32 bits.
- P-box : Here the 32-bit result obtained from S-box is exchanged again, which results in a 32-bit permuted output.
Definition of AES (Advanced Encryption Standard)
The Advanced Encryption Standard (AES) is also a symmetric key block encryption . AES was published in 2001 for him National Institute of Standards and Technology . AES was introduced to replace DES, since DES used a very small encryption key and the algorithm was much slower.
The AES algorithm takes a simple 128-bit text and a 128-bit secret key that together form a 128-bit block that is represented as a 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 rounds contain the following stages:
- Subbytes: It uses the S box by which it replaces the entire block (byte) byte by byte.
- Move rows: the matrix rows move.
- Mix columns: columns are from the matrix and are shuffled from right to left.
- Add round keys: Here the Xor of the current block and the expanded key are executed.
And the last tenth round involves Subbytes, Shift Rows and Add round keys only the stages and provides encrypted text of 16 bytes (128 bits).
Key differences between DES and AES
- The basic difference between DES and AES is that the block in DES is divided into two halves before further processing, while, in AES, the entire block is processed to obtain the encrypted text.
- The DES algorithm works according to the Feistel encryption principle, and the AES algorithm works on the substitution and permutation principle.
- The size of the DES key is 56 bits, which is comparatively smaller than that of AES that has 128, 192, or 256-bit secret key.
- Rounds in DES include Permutacin de Expansin, Xor, S-box, P-box, Xor and Swap. On the other hand, rounds in AES include Subbytes, Shiftrows, Mix columns, Addroundkeys.
- DES is less secure than AES due to the small size of the key.
- AES is comparatively faster than DES.
DES is the oldest algorithm and AES is the advanced algorithm that is faster and safer than DES.