id-aes192-gcm encrypt & decrypt online

Encrypt or decrypt text with id-aes192-gcm and a secret. Nothing leaves your browser.

This mode needs an authentication tag.
Runs in your browser

PHP's openssl_encrypt needs a tag variable for this mode and returns no result without it. Like on the old site, the result stays empty. For working encryption use aes-256-cbc.

In short

What is id-aes192-gcm?

AES is the block cipher NIST standardised in 2001 (FIPS 197), originally called Rijndael. It is the most widely used cipher today and has no practical attack. AES-192-GCM is authenticated encryption: besides the ciphertext it produces a tag that proves nobody changed it. In PHP it needs a tag variable, so this tool, like the old site, gives no result.

Strong cipherAES (Rijndael): No practical attack on the cipher itself is known.
Where you meet AES
  • HTTPS and TLS
  • Wi-Fi (WPA2, WPA3)
  • Disk encryption: BitLocker, FileVault, LUKS
  • VPNs, ZIP and 7-Zip archives, password managers
Honest answer

Is it safe to use?

The cipher: strong cipher

AES. No practical attack on the cipher itself is known.

This setup: for compatibility

The setup of this tool is made for compatibility with PHP's openssl_encrypt, not for protecting secrets: the IV is always zero, the secret is used as the key without a key derivation function, and nothing detects changes to the ciphertext.

For real secrets use an authenticated mode such as AES-256-GCM or ChaCha20-Poly1305 with a fresh random nonce for every message, and derive the key from a password with Argon2id, scrypt or PBKDF2. What is a key derivation function?

Authenticated encryption (AEAD)

How authenticated modes work

Authenticated modes (GCM, CCM, OCB, Poly1305) encrypt and at the same time compute a tag over the data. Decryption checks the tag first and fails if anything was changed. This is what you want for real encryption.

PHP's openssl_encrypt only returns a result for these modes if you pass a variable for the tag and a nonce. The old site did neither, so the result was always empty, and this tool keeps it that way.

Use it in code

AES-192-GCM done right, in your code

These snippets encrypt with a random key and nonce, keep the tag, and decrypt again. They print hello world. They are run before each release.

PHP
$key = random_bytes(24);   // store it safely
$nonce = random_bytes(12);  // new for every message
$ct = openssl_encrypt("hello world", "aes-192-gcm", $key, OPENSSL_RAW_DATA, $nonce, $tag);
$message = base64_encode($nonce . $tag . $ct); // keep nonce and tag with the ciphertext

$raw = base64_decode($message);
echo openssl_decrypt(substr($raw, 28), "aes-192-gcm", $key, OPENSSL_RAW_DATA, substr($raw, 0, 12), substr($raw, 12, 16));

The $tag argument is what the old site left out. Without it, openssl_encrypt returns false.

Python
# pip install cryptography
import os
from cryptography.hazmat.primitives.ciphers.aead import AESGCM

key = AESGCM.generate_key(bit_length=192)
nonce = os.urandom(12)  # new for every message
ct = AESGCM(key).encrypt(nonce, "hello world".encode(), None)  # tag is appended
print(AESGCM(key).decrypt(nonce, ct, None).decode())
Node.js
import { createCipheriv, createDecipheriv, randomBytes } from 'node:crypto';

const key = randomBytes(24);
const nonce = randomBytes(12); // new for every message
const c = createCipheriv("aes-192-gcm", key, nonce);
const ct = Buffer.concat([c.update("hello world", 'utf8'), c.final()]);
const tag = c.getAuthTag();

const d = createDecipheriv("aes-192-gcm", key, nonce);
d.setAuthTag(tag);
console.log(Buffer.concat([d.update(ct), d.final()]).toString('utf8'));
Common mistakes

Why id-aes192-gcm gives no result

Why the result is empty

Authenticated modes need a nonce and produce a tag. PHP's openssl_encrypt returns false when you don't pass a tag variable, and the old site didn't. See the code example for how to use the mode correctly.

Reusing a nonce

In GCM, the same nonce twice with the same key reveals the XOR of the two texts and lets an attacker forge tags. Use 12 random bytes per message, or a counter that never repeats.

Throwing away the tag

The 16-byte tag is part of the message. Store or send it together with the nonce and the ciphertext; decryption without it is impossible, and skipping the check gives up the protection.

Which cipher was it?

Encrypted something here years ago?

Paste the Base64 result and the secret. Your browser tries all 174 ciphers of this site and shows those that give readable text. Useful if you don't remember the cipher, or to check whether your ciphertext really is id-aes192-gcm.

Nothing is sent anywhere. Wrong secrets give no readable text.
Compare

Every AES-192 variant, same input

The text The quick brown fox jumps over the lazy dog (43 bytes) with the secret my secret in all 16 AES-192 ciphers. The last column lists names that give the same result: aliases, and modes that agree for this input. Highlighted: the same start as id-aes192-gcm. Watch how CBC and ECB share the first block, and CFB, OFB and CTR the first 16 bytes. Type a text and a secret in the tool above to use yours.

CipherResult (Base64)Same as
aes-192-cbc 5N7kuiyZsVjLIJgSkSotTkOmyLqUrw5CPDgZwPHGmeD/HrFwCcCYzl28DvHI126paes192
aes-192-ccm no result
aes-192-cfb rCX4idvhRbbJ2FLFgJQ8Z/pbPYyWkPRnqyA2dFw0nBl71IpTOZRskzVt+w==
aes-192-cfb1 4ax+RGh+oFjenr6RV4qlCvq4XNz9DQThfc0XH7VlPw9qJEI+Hl3Fnk9dig==
aes-192-cfb8 rFSLKFKaOd4jl922/qJTBg+xY9Sos71GYxUrQ54vzVsIER3q3sngCQ6CkQ==
aes-192-ctr rCX4idvhRbbJ2FLFgJQ8Z1ck5Vou2bQ5T8T4sxSti90pMrooA2hRhP4KQQ==
aes-192-ecb Legacy5N7kuiyZsVjLIJgSkSotTsDk3AMrKWsiSPX3N7kIqDlWkPL7kdOPh2Pv+DZIvz7M
aes-192-gcm no result
aes-192-ocb no result
aes-192-ofb rCX4idvhRbbJ2FLFgJQ8Z/p8o8QX5r7cbByC90psZtFJb5i6/be6IZSwEA==
aes192 5N7kuiyZsVjLIJgSkSotTkOmyLqUrw5CPDgZwPHGmeD/HrFwCcCYzl28DvHI126paes-192-cbc
aes192-wrap no result
id-aes192-ccm no result
id-aes192-gcm no result
id-aes192-wrap no result
id-aes192-wrap-pad br8eyQ4kov7TRa9nPT73ld0lUrzE8vwR0W8IVUZkN2/Xq+0H1oWQIsOi0Rw6bU9RxBhVmCKKt5I=
FAQ

Questions about id-aes192-gcm

Why is the id-aes192-gcm result empty?

Because PHP's openssl_encrypt returns false for authenticated modes when no tag variable is passed, and the old site passed none. The tool keeps that behaviour so old results stay comparable. Use the code example to encrypt with a nonce and tag.

Is AES-192-GCM secure?

Yes, when used correctly: AES-192-GCM with a random, never repeated nonce and the tag checked on decryption is a recommended way to encrypt data today.

Good to know

Before you rely on it

Searches the list of pages on this site. What you type stays in your browser.