Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

Students also viewed these Databases questions

Question

=+a. Use of a public space such as a park

Answered: 1 week ago