03
03
03
Shift
IP IP-1
K1 P8 K1
fk fk
Shift
SW SW
K2 P8 K2
fk fk
IP-1 IP
➢ One switch function SW that interchanges the left and right 4 bits
so the second instance of f k operates on a different set of bits.
Simplified DES - Initial & Final Permutation
IP
IP
2 6 3 1 4 8 5 7
Input = 01001101
Output = 11000110
IP-1
IP-1
4 1 3 5 7 2 8 6
Input = 11000110
Output = 01001101
Result is IP-1(IP(X)) = X
Simplified DES - Function f k
Now assume F(R, SK) = F(1101, SK) for some sub-key = 1110 (this
value will change depending on the sub-key).
Expand/Permute
8 bits
K1
4 bits 4 bits
S0 S1
4 bits F(R,SK)
2 bits 2 bits
4 bits
P4
4 bits
4 bits
SW
Simplified DES - Function Parts of F(R,SK)
Expansion/Permutation (4 bits n1, n2, n3, n4) to 8 bits
E/P
4 1 2 3 2 3 4 1
The first 4 bits, row 1 are input to the s-box S0, 2nd row to S-box S1
to produce a 2-bit output for each input bit as follows;
0 1 2 3 0 1 2 3
0 1 0 3 2 0 0 1 2 3
1 3 2 1 0 1 2 0 1 3
S0 2 0 2 1 3 S1 2 3 0 1 0
3 3 1 3 2 3 2 1 0 3
P4
2 4 3 1
P4 output = output of fk
Switch function: interchanges the left and right halves so the second
instance of fk using the second key operates on different data.
P8 Permutation - K1 output
K1
8 bits
Split Key, Circular Shift
LS-2 LS-2
5 bits 5 bits
Permutation, K2 output
P8
K2
8 bits
S-DES Key Generation
S-DES depends on the use of a 10-bit key shared
between sender and receiver.
Two 8-bit subkeys are produced for use in particular
stages of the encryption and decryption algorithm.
Simplified DES - Key Generation
P10 Permutation:
Split the permuted key into 2 five-bit halves and circular left shift 1
Input = 10000 01100 Output = 00001 11000
P8
6 3 7 4 8 5 10 9
35274101986 P10
5 5 10000 | 01100 P10 5 5
5 5 5 5
637485109 P8
K1 8 K1 8
10100100
00100 00011 LS-2 LS-2
5 5 5 5
637485109 P8
8 8
K2 01000011 K2
Simplified DES
8 Plaintext
4 4 IP
4
4
E/P E/P
8 8
8 K2 8 K1
4 4 4 4
S0 S1 S0 S1
2 2 2 2
P4 P4
4 4
4 4
IP-1 SW
8 Ciphertext
Simplified
0123
DES
0 1032 8 Plaintext
12345678
1 3210 26314857 IP
S0= 11110011 PT 4
2 0213 4
1011 | 1101 IP 41232341 E/P
3 3132 8
11101011 E/P
8 K1
0123 10100100 K1 4 4
0 0123
01001111 Xor S0 S1
1 2013 2 2
S1= 11 S0 11 S1
2 3010 2431 P4
1111 P4 4
3 2103
1011 L
0100 Xor 4
SW
1101 0100
Simplified
0123
DES 1101 0100
0 1032
1 3210 4 4
S0=
2 0213
00101000 E/P 41232341 E/P
3 3132 8
01000011 K2 8 K2
0123
01101011 Xor 4 4
0 0123
10 S0 01 S1 S0 S1
1 2013 2 2
S1= 0101 P4
2 3010 2431 P4
1101 L 4
3 2103
1000 Xor
10000100 +RS 4
IP-1 41357286
8 Ciphertext
01000001