## INSTRUCTIONS FOR  USING  SIMPLIFIED  DES*

SUBKEY GENERATION

Operations

(A)   Apply permutation P10:
 3 5 2 7 4 10 1 9 8 6

(B)   Apply LS-1 (left shift 1) to each 5-bit group.

(C)   Apply permutation P8:

 6 3 7 4 8 5 10 9

(D)   Apply LS-2 (left shift 2) to each 5-bit group.

Steps used in generation of each key

To generate KEY1:  (A)  (B)  (C)

To generate KEY2:  (A)  (B)  (D)  (C)

ENCRYPTION

The f function:   f: (4-bits, 8-bit key)  ---------->   (4-bits)

(A)   Apply expansion/permutation E/P to input 4 bits

 4 1 2 3 2 3 4 1
(B)   Add the 8-bit key (use XOR)

(C)   Pass the left 4 bits through S-box S0 and the right 4 bits through S-box S1

S0:

 0 1 2 3 0 1 0 3 2 1 3 2 1 0 2 0 2 1 3 3 3 1 0 3

S1:

 0 1 2 3 0 0 1 2 3 1 2 0 1 3 2 3 0 1 0 3 2 1 0 3
(D)   Apply permutation P4:

 2 4 3 1

S-box Operation

(1)   First and fourth bits give row number
(2)   Second and third bits give column number
(3)   Look up number in specified row and column
(4)   Convert to binary

The function FK( 8-bits ) ---------> ( 8-bits )

Let  L, R  be the left 4 bits and right 4 bits of the input. Then

FKey( L , R ) = (L  XOR  f(R, Key),  R)

The permutation IP

 2 6 3 1 4 8 5 7

The permutation IP-1

 4 1 3 5 7 2 8 6

SW
Switch the left and right 4 bits

Encryption steps

(1)   Apply  IP

(2)   Apply  FKey1

(3)   Apply  SW

(4)   Apply FKey2

(5)   Apply IP-1

*Instructions by Laura Sanchis, Colgate University.