Implement the RC4 stream cipher in C++. User should be able to enter any key tha
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 the pseudo random numbers. THE KEY OR THE INPUT TEXT 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. // You should write two programs: encryption and decryption. The encryption program should input the plaintext file and output a cipher text in hex. The decryption program should input the cipher text file in hex and output the plaintext.

Leave a Reply

Your email address will not be published.