Question: Implement RC 4 , the most popular symmetric stream cipher ( using Java ) . THE RC 4 ALGORITHM: ? ? * Initialization * /

Implement RC4, the most popular symmetric stream cipher (using Java).
THE RC4 ALGORITHM:
??* Initialization */
for i=0 to 255 do
s[i]=i;
keylen];
??** Initial Permutation of S**?
j=0;
for i=0 to 255 do
j=(j+s[i]+T[i])mod256;
Swap (S[i],S[j];
/* Stream Generation */
i,j=0;
while (true)
i=(i+1)mod256;
j=(j+s[i])mod256;
Swap (s[i],s[j]);
t=(S[i]+s[j])mod256;
k=s[t];
To encrypt, XOR the value k with the next block of plaintext. To decrypt, XOR the value k 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 input/output is provided in the next page.
 Implement RC4, the most popular symmetric stream cipher (using Java). THE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!