Details: Single Round | DES Encryption
The figure shows the internal structure of Single Round.
- The left and right halves are treted as separate 32-bit quantities, labeled L (left) and R (right).
- The overall processing at each round can be summarized as:
Li = Ri – 1
Ri= Li-1 ⊕ F(Ri-1, Ki)
- The 32-bit input first expanded to 48 bits. o Bits of input split into groups of 4 bits.
- Each group wrote as groups of 6 bits by taking the outer bits from the two adjacent groups.
- For example:
… efgh ijkl mnop … is expanded to … defghi hijklm lmnopq …
The resulting 48 bits are XOR with Ki.
This 48-bit result input to S-Boxes that perform a substitution on input and produces a 32-bit output.
It is easy to understand S-Box by the following figure:
- DES consists of a set of eight S-Boxes.
- Each S-Box takes 6 bits as input and produces 4 bits as output.
- The first and last bits of the input to box form a 2-bit binary number which gives the binary value of row number.
- The middle four bits select one of the sixteen columns.
- The decimal value in the cell selected by the row and column then converted to its 4-bit binary number to produce the output.
- For example, in S1, for input 101110, the row is 10 (row 2) and the column is 0111 (column 7).The value in row 2, column 7 is 11, so the output is 1011.
- The result permuted using a permutation table.
- A 64-bit key used as input to the algorithm while only 56 bits actually used. Every eighth bit ignored. Sub-keys at each round generated as given below:
- The key first permuted using a table named Permuted Choice One.
- The resulting 56-bit key divided into two 28-bit quantities, C0 and D0. At each round, Ci-1 and Di-1 separately subjected to a circular left shift of 1 or 2 bits, as governed by a table.
- Moreover, These shifted values forwarded to the next round. They are also inputting to a permutation tablePermuted Choice Two.
- The table produces a 48-bit output that serves as the round key ki.