Question: Implement the RC4 stream cipher in JAVA. User should be able to enter any key that is 5 bytes to 32 bytes long. Be sure
Implement the RC4 stream cipher in JAVA. User should be able to enter any key that is 5 bytes to 32 bytes long. Be sure to discard the first 3072 bytes of the pseudo random numbers. THE KEY MUST NOT BE HARD CODED IN THE PROGRAM.
Test your program with the following plain text:
In cryptography, RC4 (Rivest Cipher 4 also known as ARC4 or ARCFOUR meaning Alleged RC4) is a stream cipher. While remarkable for its simplicity and speed in software, multiple vulnerabilities have been discovered in RC4, rendering it insecure. It is especially vulnerable when the beginning of the output keystream is not discarded, or when nonrandom or related keys are used. Particularly problematic uses of RC4 have led to very insecure protocols such as WEP.
Your program must be able to do both encryption and decryption. Submit the following:
1. Source code
2. A screen shot showing the encryption then decryption with a 5 byte key
3. The ciphertext from the encryption, saved in hexdecimal (you may want to use the hex output manipulator)
4. The plaintext from the decryption of the cipher text (you need to convert hex text to number)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
