Question
For Crypto system Reduced DES ( R-DES ) Protocol, write code in python, C#, C, C++, or Java to develop the following functions: - Key
For Crypto system Reduced DES (R-DES) Protocol, write code in python, C#, C, C++, or Java to develop the following functions:
- Key Scheduler - input is 12-bit string, output are three 4-bit round keys
- R-DES - input x = stream of bytes, k = 12-bit key string, flag = 0 for encryption and 1 for decryption.
Outline:
Plaintext and Ciphertext block size = 8-bit strings
Keyspace: key = {12-bit strings b1,b2,b3,..b10,b11,b12}.
Key Scheduling algorithm will generate the following 4-bit strings for the three rounds of the system:
K1= (b1,b2,b3,b4) XOR (b5,b6,b7,b8)
K2=(b5,b6,b7,b8) XOR (b9,b10,b11,b12)
K3=(b9,b10,b11,b12) XOR (b1,b2,b3,b4)
Encryption Algorithm
Input: L0R0 where L0 and R0 are the two nibbles of the plain byte.
For round 1=1:3 {Li = Ri-1; Ri=Ki XOR Ri-1 XOR Li-1}
Output: R3L3
Decryption Algorithm is the same as Encryption Algorithm but with reverse key rounds.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started