DES Complete Example
DES Complete Example
Plain Text
0 1 1 1 0 1 0 0 Initial Permutation
1 1 1 0 1 1 1 1 1 0 0 1 0 0 1 1
0 0 0 1 0 0 0 0
1 0 1 0 1 1 1 1
1 0 1 0 0 1 0 1
0 1 1 0 0 0 0 0 1 0 0 0 1 0 1 1
1 0 0 1 0 0 1 1 0 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0
1 1 0 1 0 1 0 0 0 1 0 1 1 0 1 1
0 1 0 0 1 0 1 0
0 0 1 0 1 0 1 0
STEP 2:
Initial Permutation
1 0 0 1 0 0 1 1
1 0 1 0 0 1 0 1
1 0 0 0 1 0 1 1
0 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0
0 1 0 1 1 0 1 1
0 1 0 0 1 0 1 0
0 0 1 0 1 0 1 0
Round1:
0 1 0 0 1 0 1 0 24
0 0 1 0 1 0 1 0 32
After R XOR K
00 for ROW in S - box
0 1 0 0 1 0 1001 for COLUMN in S – Box
0 1 1 0 0 1
1 0 1 1 1 0 1001 = 8 + 0 + 0 + 1 = 9
0 1 1 0 0 0 (convert 9 into binary)
0 0 0 1 0 1
0 1 0 1 0 1 After S – Boxes
1 0 1 0 1 1 S Box 1
1 0 1 1 0 0 S Box 2
S Box 3 0 0 0 0
S Box 4 1 0 1 1
S Box 5 0 0 1 0
S Box 6 1 1 0 1
S Box 7 0 1 0 0
S Box 8 1 1 1 0
STEP 05:
(Making Straight Permutation Table from S-Boxes)
After S – Boxes
4 S Box 1 1 0 1 0
8 S Box 2 0 1 1 0 After Straight Permutation
12 S Box 3 0 0 0 0 (using S box values)
16 S Box 4 1 0 1 1 1 1 0 1 1 0 0 0
20 S Box 5 0 0 1 0 1 1 0 1 0 0 1 0
24
S Box 6 1 1 0 1 0 0 1 0 0 0 1 0
28
S Box 7 0 1 0 0 1 1 1 1 1 0 0 0
32
S Box 8 1 1 1 0
STEP 06: (On LEFT Side 32 bits)
Left - 32 Bits
1 0 0 1 0 0 1 1
1 0 1 0 0 1 0 1
1 0 0 0 1 0 1 1
0 0 1 0 1 0 1 0
Swapper Function