0% found this document useful (0 votes)
2 views7 pages

UBOCHI Correction

The lecturer commends students on their Assignment_3 focused on the Data Encryption Standard (DES) and provides structural corrections to enhance understanding. Detailed steps for deriving the first-round sub-key (K1) and processing the plaintext through various cryptographic functions are outlined. The lecturer expresses belief in the students' potential and encourages them to persist in their studies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views7 pages

UBOCHI Correction

The lecturer commends students on their Assignment_3 focused on the Data Encryption Standard (DES) and provides structural corrections to enhance understanding. Detailed steps for deriving the first-round sub-key (K1) and processing the plaintext through various cryptographic functions are outlined. The lecturer expresses belief in the students' potential and encourages them to persist in their studies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

My Dear Students,

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

a. Change the characters to binary notation


Note: Plaintext = Key

Binary Notation:
0100001101001111010101100100010101001110010000010100111001010100
b. Derive 𝑲𝟏, the first-round sub-key
64-bit Key = 0100001101001111010101100100010101001110010000010100111001010100

The key and their respective positions are shown below:


Bit Position 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
Binary Key 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0 1

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

Step 1: Passing through PC1. This gives a 56 bits result:

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

Step 2: Splitting the 56 bits into 2 halves:

C0 = 0000000011111111000000001000

D0 = 01 01011111011110010100100100

Performing left circular shift by 1 bit:

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

c. Derive 𝑳𝟎, 𝑹𝟎.


Step 1: Pass the 64-bit plaintext through the Initial Permutation (IP) table
64 bits Plaintext =
0100001101001111010101100100010101001110010000010100111001010100
The Plaintext and their respective positions are shown below
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 1 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0 1

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

Passing through the IP table


1 1 1 1 1 1 1 1
1 0 0 0 0 1 0 0
1 1 0 1 1 1 1 0
0 0 1 0 1 0 1 1
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
Splitting 64 bits into two halves:

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

Passing R0 through the Expansion Permutation (E) table to increase to 48 bits


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

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

A = 001100 001001 001001 000010 100100 110010 000001 110000


S1: 001100

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

g. Concatenate the result of (f) to get a 32-bit result, B.


Concatenating the 32 bits output:

B = 10111111001111010001000011010000

h. Apply the permutation to get 𝑷(𝑩)


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
1 0 1 1 1 1 1 1 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 0 1 1 0 1 0 0 0 0

Passing B through the Permutation (P) Table to get 𝑷(𝑩)


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

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

Ciphertext in Hexadecimal = 00005257191C8C7C

You might also like