Question: Implement RC 4 , the most popular symmetric stream cipher ( using Java ) . THE RC 4 ALGORITHM: ? ? * Initialization * /
Implement RC the most popular symmetric stream cipher using Java
THE RC ALGORITHM:
Initialization
for to do
;
keylen;
Initial Permutation of
;
for to do
;
Swap Si;
Stream Generation
;
while true
;
;
Swap si;
;
;
To encrypt, XOR the value with the next block of plaintext. To decrypt, XOR the value with
the next block of ciphertext.
Program Requirements: The program should prompt the user to enter the key length in
blocks the key key length number of blocks size of input in blocks and the plain text size
number of blocks The program should then display the cipher text as well as the decrypted
cipher text which is the plain text In Java, XOR can be performed using operator.
Sample inputoutput is provided in the next page.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
