STEP 1:
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:
Left - 32 Bits Right – 32 bits
1 0 0 1 0 0 1 1 1 0 1 0 1 0 1 0
1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1
1 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0
0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0
STEP 03: (On Right Side 32 bits)
Right – 32 bits (8 * 4 columns)
8
1 0 1 0 1 0 1 0
0 1 0 1 1 0 1 1 16
0 1 0 0 1 0 1 0 24
0 0 1 0 1 0 1 0 32
Formula: Ri-1 XOR K
Expansion D box Round Key After R XOR K
0 1 0 1 0 1 0 0 0 1 1 1 0 1 0 0 1 0
1 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 0 1
1 0 1 0 1 1 0 0 0 1 0 1 1 0 1 1 1 0
0 0 0 1 1 1 0 1 1 0 0 0
0 1 0 1 1 0
1 1 0 0 1 1 0 0 0 1 0 1
0 0 1 0 0 1 0 1 0 1 0 1
0 1 0 1 0 0 0 0 1 1 1 0 1 0 1 0 1 1
0 0 0 1 0 1 1 0 1 1 1 0
1 0 1 1 0 0
0 1 0 1 0 1 1 0 0 0 1 1
48bit (8 * 6 columns)
STEP 04 (Final Permutation of 1st round):
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
After Straight Permutation
(using S box values)
1 1 0 1 1 0 0 0
1 1 0 1 0 0 1 0
0 0 1 0 0 0 1 0
1 1 1 1 1 0 0 0
XOR of (S- Boxes & Left side of plain text)
XOR Mixer’s output used as Left Side Now
0 1 0 0 1 0 1 1
0 1 0 0 1 0 1 1
0 1 1 1 0 1 1 1
1 1 0 1 0 0 1 0
Now Swap L (Mixer’s Output) with Right – 32 bits
Mixer’s output from the last step Right – 32 bits
Now used as Left Side Now (R from the start)
0 1 0 0 1 0 1 1 1 0 1 0 1 0 1 0
0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1
0 1 1 1 0 1 1 1 0 1 0 0 1 0 1 0
1 1 0 1 0 0 1 0 0 0 1 0 1 0 1 0
Swapper Function
SAME STEPS FOR ROUND 02
Left 02 – 32 bits Right 02 – 32 bits
1 0 1 0 1 0 1 0 0 1 0 0 1 0 1 1
0 1 0 1 1 0 1 1 0 1 0 0 1 0 1 1
0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1
0 0 1 0 1 0 1 0 1 1 0 1 0 0 1 0
After all 16 rounds
IMPORTANT:
No swapper function in Round 16
ROUND 16
Left 02 – 32 bits Right 02 – 32 bits
Merged l16 left and R 16bits
Rearrange using the final
permuatation Table