simplified des - binghamtonsteflik/cs431/notes/simplified_des.pdf · what is simplified des ... k1...

13
Simplified DES CS-480b Network Security Dick Steflik

Upload: others

Post on 24-Dec-2019

27 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

Simplified DES

CS-480b

Network Security

Dick Steflik

Page 2: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

What is Simplified DES

• Developed 1996 as a teaching tool• Santa Clara University\

• Prof. Edward Schaefer

• Takes an 8-bit block plaintext, a 10 –bit key and produces an 8-bit block of ciphertext

• Decryption takes the 8-bit block of ciphertext, the same 10-bit key and produces the original 8-bit block of plaintext

Page 3: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

S-DES Scheme

IP

fk

SW

fk

IP - 1

P10

P8

IP

fk

SW

fk

IP - 1

SHIFT

SHIFT

P8

EncryptionDecryption

8-bit plaintext 8-bit plaintext

8-bit ciphertext 8-bit ciphertext

K1 K1

K2 K2

Page 4: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

Five Functions to Encrypt

• IP – an initial permutation

• fk - a complex, 2-input function

• SW – a simple permutation that swaps the two nybles

• fk - a complex, 2-input function; again

• IP – inverse permutation of the initial permutation

Page 5: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

Encryption DetailI P

E/P

S0 S1

P4

E/P

S0 S1

P4

SW

I P -1

K 1

K 2

4

4

8

4 4

2 2

4

Page 6: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

Initial Permutation (IP)

Move the bits of the original character around a little…

k1 k2 k3 k4 k5 k6 k7 k8

k2 k6 k3 k1 k4 k8 k5 k7

Page 7: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

Expansion/Permutation (E/P)

k4 k1 k2 k3 k2 k3 k4 k1

k1 k2 k3 k4

Expand 4 bits into 8 and permutate them…

Page 8: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

Key Generation

P10

P8

P8

LS-1 LS-1

LS-2 LS-2

8

8

5 5

5 5

5 5

K1

K2

10

Page 9: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

P10 Permutation

k1 k2 k3 k4 k5 k6 k7 k8 k9 k10

k3 k5 k2 k7 k4 k10 k1 k9 k8 k6

Page 10: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

P8 Permutation

k1 k2 k3 k4 k5 k6 k7 k8 k9 k10

k6 k3 k7 k4 k8 k5 k10 k9

Permutate 10 into 8

Page 11: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

LS-1

k3 k 5 k 2 k 7 k 4

k5 k 2 k 7 k 4 k 3

k10 k1 k9 k8 k6

k1 k9 k8 k6 k10

Left circular shift 1 each 5 bit group

Page 12: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

LS-2

k3 k 5 k 2 k 7 k 4

k2 k7 k4 k3 k5

k10 k1 k9 k8 k6

k9 k8 k6 k10 k1

Left circular shift 2 each 5 bit group

Page 13: Simplified DES - Binghamtonsteflik/cs431/notes/Simplified_DES.pdf · What is Simplified DES ... k1 k2 k3 k4 k5 k6 k7 k8 k2 k6 k3 k1 k4 k8 k5 k7. Expansion/Permutation (E/P) k4 k1

Substitution Boxes

1 0 3 2

3 2 1 0

0 2 1 3

3 1 3 2

0 1 2 3

2 0 1 3

3 0 1 0

2 1 0 3

S0 S1