Encrypt / decrypt text
Encrypt clear text and decrypt ciphertext using crypto algorithms like AES, TripleDES, Rabbit or RC4.
About Encrypt / decrypt text
A quick way to encrypt a piece of text with a passphrase using AES, TripleDES, Rabbit or RC4, and to decrypt text produced the same way. It is based on the CryptoJS library, whose passphrase mode is compatible with the OpenSSL format.
When you would use it
- Protecting a short note or snippet before sending it through a channel you do not fully trust.
- Decrypting a value that was produced by CryptoJS in a web application, given the passphrase.
- Demonstrating or testing passphrase-based encryption in a tutorial.
How to use it
- Enter the text, the secret key (passphrase) and the algorithm; the encrypted text appears below.
- To decrypt, paste the encrypted text, enter the same secret key and choose the same algorithm.
- Copy the result. A wrong key or algorithm shows an error instead of the text.
Things worth knowing
- The output is a Base64 string starting with U2FsdGVkX1, which is the text Salted__ encoded. A random salt is generated each time, so encrypting the same text twice gives different results, and both decrypt correctly.
- The key and IV are derived from your passphrase with the OpenSSL-style key derivation (a single MD5-based round), which is weak against guessing. Use a long, random passphrase.
- AES is the sensible choice. TripleDES is slow and being retired, RC4 is broken, and Rabbit is rarely used. The others exist for compatibility.
- There is no authentication, so a modified ciphertext may decrypt to garbage instead of failing cleanly. This is not suitable for protecting real secrets or passwords.
Frequently asked questions
- Why does the same input give a different result each time?
- Because of the random salt. This is intended: it stops two identical messages from producing identical ciphertext. Decryption reads the salt back from the beginning of the ciphertext.
- When should I use the AES advanced tool instead?
- When you must match a specific key, IV and mode used by another system. This tool hides those details and cannot reproduce them.