Encrypt text with AES-192-CBC
This tool encrypts text with AES, a 192-bit key and CBC mode, then shows the result in Base64. AES-192 is the middle key size and is less common than 128 or 256 bits. You mostly meet it when a specification, a library or a partner requires it. In that case this page gives you a reference ciphertext to validate your implementation against.
The calculation runs on the server with OpenSSL, through PHP's openssl_encrypt function, using PKCS#7 padding.
How to use it
- Type the text to encrypt.
- Enter the key in the Salt field (that is what the interface calls the key): 24 ASCII characters for 24 bytes. The password generator gives you a random 24-character key once you set its length.
- Optionally fill in the IV (optional) field with 16 characters.
- Click Encrypt, then Copy.
The 192-bit key: watch the length
| Variant | Key | Rounds |
|---|---|---|
| AES-128 | 16 bytes | 10 |
| AES-192 | 24 bytes | 12 |
| AES-256 | 32 bytes | 14 |
The tool takes the key as it is, byte for byte. Under 24 bytes it is padded with null bytes, and over 24 bytes it is truncated. This has two practical effects. A 16-character key typed here does not give the same result as on the AES-128 page, because the cipher works with 24 bytes, 8 of them null, and runs 12 rounds. And two keys that only differ after the 24th character produce the same ciphertext.
CBC mode chains the 16-byte blocks together. Each block is mixed with the previous encrypted block before its own encryption, and the first one is mixed with the IV. The same text encrypted with two different IVs therefore gives two results with no visible relation. With no IV and no chaining, encrypt AES 192 ECB always gives the same result instead.
The equivalent PHP call:
openssl_encrypt($text, 'aes-192-cbc', '0123456789abcdef01234567', 0, '1234567890abcdef');
If your program and the tool disagree, check in this order: the exact key length, the IV, then the text encoding (UTF-8).
Frequently asked questions
Does the IV have to be 24 bytes like the key?
No. The IV is the size of an AES block, 16 bytes, whatever the key size. If you leave the field empty, the tool applies a fixed default IV. That is enough for a trial, but real use calls for a random IV, different for every message and sent along with it.
When should I pick 192 bits over 128 or 256?
Almost only for compatibility. AES-128 is enough for most uses, and AES-256 gives the widest margin at a barely higher cost. AES-192 sits in between and is sound, but it is rarely deployed.
Is the result authenticated?
No. AES-CBC does not detect changes made to an encrypted message. You have to add an HMAC, or move to an authenticated mode such as AES-GCM, which this tool does not include.
What happens to the text and the key?
They are sent to the server over HTTPS for the calculation and are not stored. Even so, keep the tool for testing and leave production secrets out of it. For the reverse operation, the site has an decrypt AES 192 CBC page.