3.6 DES (Data Encryption Standard)
3.6 DES (Data Encryption Standard)
The function fk takes as input not only the data passing through the encryption algorithm, but also an 8-
bit key. Here a 10-bit key is used from which two 8-bit subkeys are generated. The key is first subjected
to a permutation (P10). Then a shift operation is performed. The output of the shift operation then
passes through a permutation function that produces an 8-bit output (P8) for the first subkey (K1). The
output of the shift operation also feeds into another shift and another instance of P8 to produce the
second subkey (K2).
S-DES key generation: In the key generation algorithm, we accept the 10-bit key and convert it
into two 8 bit keys. This key is shared between both sender and receiver.
2. Permutation P8
3. Left Shift
Step 1: We accepted a 10-bit key and permuted the bits by putting them in the P10 table.
Key = 1 0 1 0 0 0 0 0 1 0
(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10) = (1, 0, 1, 0, 0, 0, 0, 0, 1, 0)
P10 Permutation is: P10(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10) = (k3, k5, k2, k7, k4, k10, k1, k9, k8, k6)
Step 2: We divide the key into 2 halves of 5-bit each. l=1 0 0 0 0, r=0 1 1 0 0
Step 4: Combine both keys after step 3 and permute the bits by putting them in the P8 table. The output
of the given table is the first key K1.
After LS-1 combined, we get 0 0 0 0 1 1 1 0 0 0
P8 permutation is: P8(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10) = (k6, k3, k7, k4, k8, k5, k10, k9)
After P8, we get Key-1 : 1 0 1 0 0 1 0 0
Step 5: The output obtained from step 3 i.e. 2 halves after one bit left shift should again undergo the
process of two-bit left shift.
Final Output:
Key-1 is: 1 0 1 0 0 1 0 0
Key-2 is: 0 1 0 0 0 0 1 1