Experiment 2 - DES Encryption
Theory
DES encryption transforms plaintext into ciphertext through a series of highly structured steps. It starts with an initial permutation (IP) of the 64-bit plaintext block, rearranging the bits to break up patterns and distribute the characteristics of the plaintext over the entire block. Following the IP, the block is divided into two 32-bit halves. In each of the sixteen rounds of encryption, the right half undergoes an expansion function, increasing its size from 32 to 48 bits, and is then XORed with a round key. The result passes through the S-boxes, which perform a complex substitution operation, followed by a permutation function (P-box), which rearranges the bits to provide diffusion. The left half of the block is then XORed with the output of this function, and the halves are swapped. After sixteen rounds, the halves are not swapped; instead, they undergo a final permutation (FP), which is the inverse of the initial permutation, to produce the final 64-bit ciphertext.