Key:
Hex Key:
Crypt:
Mode of Operation:
IV:
Hex IV:
Plain Text:
Hex Plain Text:
PHP Decrypted Text:
Cipher Text:
Hex Cipher Text:
PHP Encrypted Text:
Check With PHP's Mcrypt:

Java Script Mcrypt

This is a demo page for a javascript class that implements a javascript version of PHP's mcrypt. This class takes blocks ciphers, gives a common interface to them, and extends their encryption capability by enabling modes of operation.

The drop-down list of ciphers contains all of the ciphers that PHP's mcrypt uses. The disabled ones have not been incorporated into this library yet. If you know of a javascript implementation of one or more of the disabled ciphers I would be glad to hear about it on the Google Code page for this project.

The drop-down list of modes of operation is again populated with all of the modes that PHP's mcrypt uses. Similarly, the disabled options have not been implemented in this class. I do not plan on implementing ofb (8-bit) as this is considered insecure by NIST. Stream is the mode used for stream ciphers and as no stream ciphers have yet been incorporated, this mode has not been coded.

Changing any option except the cypher texts will trigger the encryption with the new options. Changing the cypher text will trigger decryption. The php verification will only occur by submitting the form. If you're curious as to how the php is implemented, the source for this page is available on the Google Code page for this project.