Question: Implement the RC4 stream cipher in C++. User should be able to enter any key that is 5 bytes to 32 bytes long. Be sure
Implement the RC4 stream cipher in C++. 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 pseudo random numbers. THE KEY OR THE INPUT TEXT MUST NOT BE HARD CODED IN THE PROGRAM.
You should write TWO separate programs: Encryption and decryption. The encryption program should input the plaintext file and output a cipher text in hex. They decryption program should input the cipher text file in hex and output the plaintext.
Test your 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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
