Assignment No 2 Complete
Assignment No 2 Complete
Assignment No 2 Complete
2
Advance Cryptography
QASIM ALI, PhD(IS)
The goal of this assignment is to prove that in DES Encryption if double encryption is applied on a text using
weak key pairs the resulting cipher text is the original plain text i.e. EK2(EK1(x) )= x.
There are six weak key pairs which are as under:-
I have solved the assignment by developing a DES encryption program encrypting the plain text twice with weak
key pairs.
The output at all the steps is displayed from page 4. The program output is shown with
Plain text:
Key 1:
Key 2:
123456ABCD132536
01E0 01E0 01F1 01F1
E001 E001 F101 F101
But the program can generate results with any weak key pair and plain text. The results are stored in a file.
KEY GENERATION
**************
KEY REDUCED FROM 64 bits to 56 bits: 10101010101010101010101010100000000000000000000000000000(AAAAAAA0000000)
ROUND 1 KEY
ROUND 2 KEY
ROUND 3 KEY
ROUND 4 KEY
ROUND 5 KEY
ROUND 6 KEY
ROUND 7 KEY
ROUND 8 KEY
ROUND 9 KEY
ROUND 10 KEY
ROUND 11 KEY
ROUND 12 KEY
ROUND 13 KEY
ROUND 14 KEY
ROUND 15 KEY
ROUND 16 KEY
FIESTEL ROUND NO 1
******************
FIESTEL ROUND NO 2
******************
FIESTEL ROUND NO 3
******************
FIESTEL ROUND NO 4
******************
FIESTEL ROUND NO 5
******************
FIESTEL ROUND NO 6
******************
FIESTEL ROUND NO 7
******************
FIESTEL ROUND NO 8
******************
FIESTEL ROUND NO 9
******************
FIESTEL ROUND NO 10
******************
FIESTEL ROUND NO 11
******************
FIESTEL ROUND NO 12
******************
FIESTEL ROUND NO 13
******************
FIESTEL ROUND NO 14
******************
FIESTEL ROUND NO 15
******************
FIESTEL ROUND NO 16
******************
KEY GENERATION
**************
ROUND 1 KEY
ROUND 2 KEY
ROUND 3 KEY
ROUND 4 KEY
ROUND 5 KEY
ROUND 6 KEY
ROUND 7 KEY
ROUND 8 KEY
ROUND 9 KEY
ROUND 10 KEY
ROUND 11 KEY
ROUND 12 KEY
ROUND 13 KEY
ROUND 14 KEY
ROUND 15 KEY
ROUND 16 KEY
FIESTEL ROUND NO 1
******************
FIESTEL ROUND NO 2
******************
FIESTEL ROUND NO 3
******************
FIESTEL ROUND NO 4
******************
FIESTEL ROUND NO 5
******************
FIESTEL ROUND NO 6
******************
FIESTEL ROUND NO 7
******************
FIESTEL ROUND NO 8
******************
FIESTEL ROUND NO 9
******************
FIESTEL ROUND NO 10
******************
FIESTEL ROUND NO 11
******************
FIESTEL ROUND NO 12
******************
FIESTEL ROUND NO 13
******************
FIESTEL ROUND NO 14
******************
FIESTEL ROUND NO 15
******************
FIESTEL ROUND NO 16
******************
The text highlighted at the preceding line is equivalent to the text input at the start.
Hence proved that EK2(EK1(x) )= x using weak key pairs