AES advanced encrypt / decrypt
Encrypt and decrypt text with AES using an explicit key and IV (hex, base64 or text) in CBC, GCM, CTR or ECB mode, for interoperability with other systems.
About AES advanced encrypt / decrypt
Encrypts and decrypts text with AES using an explicit key and IV that you control, in CBC, GCM, CTR or ECB mode. Unlike a passphrase-based tool, it lets you reproduce exactly what another system or library does, which is what you need for interoperability work.
When you would use it
- Reproducing the ciphertext an API or a legacy system expects, or decrypting a value it sent you, given its key and IV.
- Checking that your own code encrypts a test vector to the same bytes as a reference implementation.
- Learning how modes, IV length and padding change the output.
How to use it
- Choose the mode, then enter the key and pick its encoding (hex, base64 or UTF-8 text).
- Enter the IV or nonce in the same way; ECB needs none. For GCM you can also add optional authenticated data.
- Type the plain text to get the ciphertext in the encoding you chose, or paste ciphertext in the decrypt section to read the plain text.
Things worth knowing
- The key must be exactly 16, 24 or 32 bytes (AES-128, 192 or 256); the tool tells you the length it received. Remember that a hex key of 64 characters is 32 bytes, while the same 64 characters entered as text are 64 bytes and rejected.
- CBC and CTR need a 16-byte IV, GCM works with a 12-byte nonce (recommended), and ECB uses no IV.
- GCM is authenticated encryption: the 16-byte tag is appended to the ciphertext and decryption fails if anything was modified. CBC, CTR and ECB give no integrity protection.
- Never reuse the same IV with the same key in GCM or CTR. Doing so can reveal the plain text. Always generate a fresh random IV for each message.
- ECB encrypts identical blocks identically and leaks patterns. It is offered for compatibility only, not for new designs.
Frequently asked questions
- Why does decryption fail or give garbage?
- Almost always a mismatch: a different key or IV, the wrong mode, the wrong ciphertext encoding (hex versus base64), or in GCM a missing tag or different additional data. Check each setting against the system that produced the data.
- Is this the same as the simple encrypt/decrypt tool?
- No. The simple tool takes a passphrase and derives the key and IV itself using a random salt, so its output differs each time and only matches tools with the same scheme. This one takes the raw key and IV, so you control every byte.