Experiment 1 - DES Key Generation
Theory
The Data Encryption Standard (DES) is a widely recognized symmetric encryption algorithm that was once a federal standard for encrypting sensitive data. DES employs a block cipher technique, which means it encrypts data in fixed-size blocks. Key generation in DES is a crucial component that involves creating sixteen 48-bit subkeys from a single 64-bit key. This 64-bit key initially undergoes a permutation process, known as Permuted Choice 1 (PC-1), which discards every eighth bit, leaving a 56-bit key. The key is then split into two 28-bit halves. Each half is separately left-shifted by a predetermined number of positions—a process that varies from one to two shifts per round over sixteen rounds. After each shift, the halves are combined and Permuted Choice 2 (PC-2) is applied to select 48 bits out of the 56-bit combined key to form the round key. The subkeys are then used in each round of the DES encryption process, which incorporates a series of complex transformations and permutations to secure the data.