Simplified DES (section 7.2 in textbook)
This document summarizes the operations carried out by the simplified DES presented in section 7.2 of our textbook. Recall that the plaintext and the ciphertext each consist of 12 bits and that the key is 9 bits long. The plaintext is put through four rounds. Both an encryption round and a decryption round are described below.
Key schedule
There are four sub-keys 𝑘1 to 𝑘4. Sub-key 𝑘𝑖 is the leftmost 8 bits of the key after a left circular rotation of 𝑖 − 1 bits. For example, if the key in binary
is 1 1101 0110, the sub-keys in binary, in order, are:
1. 1110 1011 2. 1101 0110 3. 1010 1101 4. 0101 1011
Encryption
Encryption round 𝑖 takes as input 𝐿𝑖−1, 𝑅𝑖−1 and produces as output 𝐿𝑖 , 𝑅𝑖 . These are the steps for encryption in round 𝑖 = 1. .4:
1.𝐿𝑖 =𝑅𝑖−1
2. Let 𝑣 = 𝐸(𝑅𝑖−1) ⊕ 𝑘𝑖
3. Let 𝑙𝑒𝑓𝑡3 = 𝑆 ((𝑣&0𝑥𝑓0) ≫ 4) 1
4. Let 𝑟𝑖𝑔h𝑡3 = 𝑆2(𝑣&0𝑥0𝑓)
5. 𝑅𝑖 = ((𝑙𝑒𝑓𝑡3 ≪ 3) + 𝑟𝑖𝑔h𝑡3) ⊕ 𝐿𝑖−1
Decryption
Decryption round 𝑖 takes as input 𝐿𝑖 , 𝑅𝑖 and produces as output 𝐿𝑖−1, 𝑅𝑖−1. These are the steps for decryption in round 𝑖 = 4. .1:
1.𝑅𝑖−1 =𝐿𝑖
2. Let 𝑣 = 𝐸(𝑅𝑖−1) ⊕ 𝑘𝑖
3. Let 𝑙𝑒𝑓𝑡3 = 𝑆 ((𝑣&0𝑥𝑓0) ≫ 4) 1
4. Let 𝑟𝑖𝑔h𝑡3 = 𝑆2(𝑣&0𝑥0𝑓)
5. 𝐿𝑖−1 = 𝑅𝑖 ⊕ ((𝑙𝑒𝑓𝑡3 ≪ 3) + 𝑟𝑖𝑔h𝑡3)
In the above, 𝐸 is the expander function described in figure 7.2; 𝑆 , 𝑆 are the S-boxes described just below
12
that figure. The operator ⊕ is bit-wise exclusive-or. All
other operators are as defined in Java and Python.