DES

Why
The DES is important because it shows a practical use of substitution ciphers and transposition ciphers together to create a secure cipher.

Specification

 * The block sizes are 64 bits
 * The key size is 56 bits
 * The round key size is 48 bits

Weakness
DES has been shown to be vulnerable to brute force attacks because of its small key size of 56 bits

Double DES
Double DES can be used instead of single DES but it does not offer any advantages because we can perform the meet in the middle attack

Suppose we try to encrypt and decrypt using: The attack can be performed by calculating all the values of $$D_{k1}(c)$$ and trying all possible 56 bit keys for k1 and all the values of $$E_{k2}(m)$$ and trying all the possible 56 bit keys for k2 and given we initially use a plaintext ciphertext pair. Then, we only have to brute force $$2^{56} + 2^{56} = 2^{57}$$ which is definitely doable.
 * $$c = E_{k1}(E_{k2}(m))$$
 * $$m = D_{k1}(D_{k2}(c))$$

Triple DES
Because of the weakness of double DES, we must take DES a step further. In this scheme, encryption and decryption are performed like so:
 * $$c = E_{k1}(D_{k2}(E_{k1}(m)))$$
 * $$m = D_{k1}(E_{k2}(D_{k1}(c)))$$

Advantages

 * Achieves easy backwards compatibility with single DES if we assign $$k1 = k2$$

Disadvantages

 * Not efficient to compute

Initial Permutation (IP)
The initial permutation is a fixed function and does not depend on the input key. It is also known, so it does not provide any apparent cryptographic significance



Feistel Cipher (16 Rounds)
Next, we apply the Feistel function 16 times, using a 48-bit substring/round key that is derived from the key schedule

The Feistel Cipher demonstrates the following use of classical ciphers
 * Using the previous right block as the current left block is using transposition cipher
 * Passing the previous left block and the result of the feistel function $$f$$ is the Vernam cipher
 * The feistel function itself is a substitution cipher

Last Swap
The two 32-bit output blocks from round 16 take an additional swap before moving into the final process

Inverse Initial Permutation (IP^-1)
The two blocks from round 16 are combined into the output block by inversing the initial permutation