UBOCHI Correction
UBOCHI Correction
I have keenly and thoroughly reviewed your Assignment_3, both in soft and hard copy formats,
and I must sincerely commend each one of you. Cryptography is a vital component of the
broader field of Cybersecurity, and the Data Encryption Standard (DES) remains a foundational
pillar among symmetric ciphers. I am genuinely proud of the interest, focus, and seriousness
you have all demonstrated.
I have taught this course with the highest level of passion, and truly, I have witnessed God
unveil deep revelations during our lectures. So my students I trust you—any day, any time,
anywhere—to strongly and passionately chew DES as though you're chewing pizza (yes, that
intensely!).
To complement your efforts, I have also made structural corrections on your submitted
Assignment_3. These corrections are meant to systematically guide your understanding and
responses concerning DES.
Remember, you are all the best… and I believe in every one of you! Yes, YOU!
And to YOU reading this—I BELIEVE IN YOU. For YOU are GREATER than you can ever
imagine. Don’t give up!
Your Lecturer,
Chibueze Ubochi Nwamouh
CORRECTION TO ASSIGNMENT_3
Binary Notation:
0100001101001111010101100100010101001110010000010100111001010100
b. Derive 𝑲𝟏, the first-round sub-key
64-bit Key = 0100001101001111010101100100010101001110010000010100111001010100
3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6
3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
0 1 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 0
0 0 0 0 0 0 0
0 1 1 1 1 1 1
1 1 0 0 0 0 0
0 0 0 1 0 0 0
0 1 0 1 0 1 1
1 1 1 0 1 1 1
1 0 0 1 0 1 0
0 1 0 0 1 0 0
C0 = 0000000011111111000000001000
D0 = 01 01011111011110010100100100
C1 = 0000000111111110000000010000
D1 = 1010111110111100101001001000
Indexing C1 + D1 = 00000001111111100000000100001010111110111100101001001000
Step 3: Pass the left shifted result through PC2. This gives 48-bit result
1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8
0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0
2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5
9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6
1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0
Passing through the PC2 table
1 0 1 1 0 0 0 0
1 0 0 1 0 0 1 0
0 1 0 0 0 0 1 0
1 0 1 1 1 0 0 1
0 1 1 0 0 0 1 0
1 1 0 1 1 1 1 0
Therefore,
K1 = 1 0 1 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 0 1 0 1 1 0 1 1 1 1 0
3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6
3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
0 1 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 0
L0 = 11111111100001001101111000101011
R0 = 00000000000000 000101001001010111
d. Expand 𝑹𝟎 to get 𝑬[𝑹𝟎 ], where 𝑬[⋅] is the expansion function.
R0 = 00000000000000 000101001001010111
1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 1 1 1
Therefore,
E[R0] = 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 0 1 1 1
0
e. Calculate 𝑨 = 𝑬[𝑹𝟎 ] ⊕ 𝑲𝟏
A = E[R0] XOR K1
E[R0] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
K1 1 0 1 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0
A 0 0 1 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0
E[R0] 0 0 1 0 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 0 1 1 1 0
K1 1 0 1 1 1 0 0 1 0 1 1 0 0 0 1 0 1 1 0 1 1 1 1 0
A 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0
Therefore;
A = 00110000100100100100001010010011001000 0001110000
f. Group the 48-bit result of (e) into sets of 6 bits and evaluate the
corresponding S-box substitutions
Dividing A into 6 bits and passing through S table/block
00 - 0
0110 - 6
R0C6 = 11 → 1011
S2: 001001
01 – 1
0100 – 4
R1C4 = 15 → 1111
S3: 001001
01 – 1
0100 – 4
R1C4 = 3 → 0011
S4: 000010
00 – 0
0001 -1
R0C1 = 13 → 1101
S5: 100100
10 – 2
0010 – 2
R2C2 = 1 → 0001
S6: 110010
10 – 2
1001 – 9
R2C9 = 0 → 0000
S7: 000001
01 – 1
0000 –0
R1C0 = 13 → 1101
S8: 110000
10 – 2
1000 – 8
R2C8 = 0 → 0000
B = 10111111001111010001000011010000
Therefore,
𝑷(𝑩) = 1 1 1 0 0 1 1 0 1 0 0 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 1 1 1
i. Calculate 𝑹𝟏 = 𝑷(𝑩) ⊕ 𝑳𝟎
P(B) 1 1 1 0 0 1 1 0 1 0 0 1 1 0 0 0
L0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0
XOR 0 0 0 1 1 0 0 1 0 0 0 1 1 1 0 0
P(B) 0 1 0 1 0 0 1 0 0 1 0 1 0 1 1 1
L0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1
XOR 1 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0
Therefore,
R1 = 00011001000111001000110001111100
j. Write down the ciphertext.
Ciphertext = L1 + R1
Where, L1 = R0
L1 = R0 = 00000000000000000101001001010111
R1 = 00011001000111001000110001111100
Therefore,
Ciphertext =
0000000000000000010100100101011100011001000111001000110001111100