AES Encrypt / Decrypt
About AES Encrypt / Decrypt
Type text and a passphrase, press encrypt, get a Base64 string. Decrypt reverses it with the same passphrase.
Under the hood this is CryptoJS's passphrase mode: AES-256 in CBC mode, PKCS7 padding, and a key derived from the passphrase with the OpenSSL-compatible EVP_BytesToKey. A random salt is generated per message and prepended to the output, which is why the same text and passphrase produce a different ciphertext every time.
That compatibility is the useful part. The result can be decrypted by openssl, by PHP, by Java helpers that follow OpenSSL's convention, as long as they use the same derivation.
What this is good for
Encrypting a note you are handing to someone, or checking whether a value your backend produced decrypts at all. It is a debugging tool more than a vault.
What it is not
Not a replacement for a real crypto implementation, and the passphrase is not stretched. Four ordinary words typed here give you a key that a serious attacker can brute-force offline. There is no authentication either: AES-CBC without a MAC can be altered quietly, and decryption will return garbage rather than complain.
If you are protecting something that matters, use a tool built for it — age, gpg, or your language's libsodium binding.
Frequently asked questions
Is this AES-256?
Yes, AES-256-CBC. Note that the key is not your passphrase — it goes through EVP_BytesToKey first, using MD5 with a single iteration.
Why is the ciphertext different every time?
A random salt is generated for each encryption and stored at the front of the output. Same input, different output, and both decrypt correctly.
Can I decrypt it with openssl?
Usually yes: openssl enc -d -aes-256-cbc -a -pass pass:yourpass. The format and key derivation follow OpenSSL's convention, which is exactly why that works.
How strong does my passphrase need to be?
Stronger than you would guess, since there is no stretching. Sixteen random characters is comfortable; a dictionary word is not.