JavaScrypt Encryption and Decryption


This page allows you to encrypt text with a specified key, yielding an encoded message, and decode encrypted messages, recovering the original text. All encryption is performed entirely within your Web browser using the JavaScript language (which, obviously, must be enabled in order to use this page). Nothing is sent to any Web site when you encrypt or decrypt a message! You can, if you wish, download a copy of this page and the JavaScript programs it includes to your own computer and use it even when you're not connected to the Internet. (For this purpose, you may prefer the monolithic "lean" version with documentation removed and all JavaScript programs embedded into a single Web page.)

Key

Enter the key to be used to encrypt or decrypt the data in the field below. If Text is checked, the key may consist of any sequence of up to 1024 characters; for maximum security, if the key consists of a sequence of words (many people find it easier to remember a phrase instead of a random sequence of characters), it should be at least 60 characters in length. If Hexadecimal is checked, the key is given as a sequence of hexadecimal digits: 0-9, a-f (or A-F), which should be 32 bytes (64 hexadecimal digits) in length for maximum security. The Generate button may be used to create a key in either text or hexadecimal format (depending on which button is checked) sufficiently long to provide maximum security using a high quality pseudorandom number generator seeded from the time the page was loaded, the time you pressed the Generate button, and the time of keystrokes and various other events since the page was loaded. You can generate lists of keys suitable for exchanging with correspondents using our companion Pass Phrase Generator page.


 Text    Hexadecimal      

Plain Text

Enter or paste the text to be encrypted into the following box. If you wish to encrypt a binary file (for example, an image or an audio file), use a utility like Base64 to encode it as text before encryption. Press the Encrypt button to encrypt the text with the above key; the encrypted text will be placed in the Cipher Text box, encoded as text with the Encoding you've selected. If you prefer to camouflage your message as (nonsense) English text, first encrypt it in any of the encodings, then select, copy, and paste the text into our Steganography (hidden writing) page.


   
Encoding:   Codegroup    Hexadecimal    Base 64

Cipher Text

To decrypt an enciphered message, paste it in the box below, enter the key with which it was encrypted in the Key box at the top, and press the Decrypt button. The decrypted text will be placed in the Plain Text box above. Text before and after the encrypted message is ignored, and the encoding used by the message is determined automatically. You can decrypt only one message at a time; if more than one encrypted message is pasted into the box below, only the first will be decrypted.


   

JavaScrypt


Valid XHTML 1.0
by John Walker
December, 2005
This document is in the public domain.