S-DES_2
S-DES_2
Tutorial
Using Simplified DES
Chen Fuh-Gwo
2004/03/01
Why S-DES?
• DES is a complex algorithm for conventional
encryption, it encode the plaintext to ciphertext
with a secret key.
• It is used as realistic, and too difficult to educate
the student well know the DES basics. A lot data
to be fed into the algorithm, hand writing is
impossible!
• Thus, simplified DES is developed with Edward
Schaefer, professor at Santa Clara University.
It’s a good teaching tool for student to realize the
operations of DES.
Conventional Cryptography
Algorithm
• Five ingredients,
– Plaintext
– Secret Key
– Encryption algorithm
– Ciphertext
– decryption algorithm
• All operations of encryption and decryption are
based on two basic kinds of manipulations on
the data.
– Permutation
– Substitution
Permutation This animation shows how
the bits will be arranged from
the permutation pattern.
Bit Number #
1 2 3 4 5 6 7 8
Data bit 1 0 1 1 1 0 1 1
Permutation IP
2 6 3 1 4 8 5 7
Pattern
Permutation
1 0 1 1 1 0 1 1
This animation shows how the
Substitution substitution process will be done.
0 0 0 0 0 1
0 1 0 0 0 0 0 1 1 1
0 0 1 0 0 0
0 0 1 1 1 0
0 1 0 0 1 1
0 1 0 1 0 1
0 1 1 0 1 0
0 1 1 1 0 0
Substitution Box 1 0 0 0 0 0
(Known as S-Box)
1 0 0 1 1 1
1 0 1 0 1 0
1 0 1 1 0 1
1 1 0 0 0 1
After the operation,
the data “0100” is 1 1 0 1 1 1
substituted with 1 1 1 0 1 1
“11”. 1 1 1 1 1 0
S-DES Flow Diagram
Encryption 10 bits Key Decryption
LS-1
IP IP-1
P8
K1 K1
fk fk
LS-2
SW SW
P8
K2 K2
fk fk
IP-1 IP
Ciphertext Ciphertext
Encryption Phase IP of S-DES
Encryption
1 2 3 4 5 6 7 8
00101011 0 0 1 0 1 0 1 1
IP IP
2 6 3 1 4 8 5 7
Subkey 1:
00101111
fk
SW
Subkey 2:
11101010
fk
IP-1
Ciphertext
Encryption Phase fk of S-DES
Encryption
E/P
4 1 2 3 2 3 4 1
0 0 1 0 0 1 1 1
Subkey 1:
00101111
fk XOR
S0 S1
SW
Subkey 2:
11101010 P4
fk 2 4 3 1
XOR
IP -1
Ciphertext
Encryption Phase fk of S-DES
0 0 1 0 0 1 1 1
Encryption
E/P
4 1 2 3 2 3 4 1
Subkey 1:
00101111
fk XOR
S0 S1
SW
Subkey 2:
11101010 P4
fk 2 4 3 1
XOR
IP -1
Ciphertext
Encryption Phase fk of S-DES
0 0 1 0 0 1 1 1
Encryption
0 1 1 1
E/P
4 1 2 3 2 3 4 1
Subkey 1:
00101111
fk XOR
S0 S1
SW
Subkey 2:
11101010 P4
fk 2 4 3 1
XOR
IP -1
Ciphertext
Encryption Phase fk of S-DES
0 0 1 0 0 1 1 1
Encryption
0 1 1 1
E/P
4 1 2 3 2 3 4 1
1 0 1 1
Subkey 1:
00101111 0 0 1 0 1 1 1 1
fk XOR
1 0 0 1 0 0 0 1
S0 S1
SW
1 1 1 0
Subkey 2:
11101010 P4
fk 2 4 3 1
IP-1 XOR
1 0 0 1
Ciphertext
Encryption Round 2 of S-DES
Encryption
1 0 0 1 0 1 1 1
5 6 7 8 1 2 3 4
SW
fk
IP-1
Ciphertext
Encryption Round 2 of S-DES
Encryption
1 0 0 1 0 1 1 1
1 0 0 1 0 1 1 1
5 6 7 8 1 2 3 4
SW
fk
IP-1
Ciphertext
Encryption Round 2 of S-DES
^_^