NAME

CSCI162_RC4 - Perl implementation of ARCFOUR


DESCRIPTION

This is an implementation of the ARCFOUR stream cipher (unofficial RC4).


EXPORTS

rc4_encrypt $key, $message
Returns a hexadecimal string of the encrypted form of $message.

rc4_decrypt $key, $cipher
Returns the decryption of $cipher (which must be passed as hexadecimal).

rc4_encrypt_base64 $key, $plain
Returns a Base64 string of the encrypted form of $message.

rc4_decrypt_base64 $key, $cipher
Returns the decryption of $cipher (which must be passed as Base64).

rc4_translate $key, $rawstring
This function actually does all the work of encryption and decryption, which are for all practical purposes identical. The only difference is the input and output format; the encrypt wrappers transcode the output of this function, while the decrypt wrappers transcode the message parameter to this function.

This function takes raw data and outputs raw data; it can be used to implement other encodings.


AUTHORS

Written for CSCI 162 Cryptography Spring 2005 at The George Washington University by Anasse Bari and Peter S. May under Dr. Poorvi Vora.


NOTICE

This program alleges no compatibility or relationship with the official RC4 stream cipher or with RSA Data Security.