Encryption names sound like alphabet soup, and AES-GCM is one of the worst offenders. Yet the idea underneath is simple: one part of the system makes your text unreadable, and the other part notices instantly if anyone tries to open it in a way that does not check out.
This guide explains both halves in plain words, then shows them working in the free Encryption Playground on Ovatly, where a short note becomes a single string you can inspect piece by piece.
Contents
- Quick answer
- The two jobs: scrambling and checking
- Why a wrong passphrase fails cleanly
- The salt and the IV: why every output is different
- How to try it, step by step
- Worked example: one note, one string
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
AES-GCM is an encryption method that does two jobs at once. AES scrambles the text so it cannot be read without the key. GCM attaches an authentication tag, a kind of tamper seal, that is checked before decryption is allowed to finish. If the passphrase is wrong or a single character of the encrypted string was changed, the tag check fails and you get a clean error instead of garbage. In the Encryption Playground, your passphrase is stretched into a key with PBKDF2, the note is encrypted with AES-GCM, and the salt, IV and ciphertext are packed into one OVAT1 string you can copy and later decrypt on the same page.
The two jobs: scrambling and checking
Plain encryption on its own has a quiet weakness: it hides the content, but it cannot tell you whether the encrypted data was altered on its way to you. Flip a character in the ciphertext and a naive decryptor might hand back a damaged message with no warning that anything went wrong.
AES-GCM closes that gap by pairing the scrambling with a check. While encrypting, it computes an authentication tag from the key, the IV and the ciphertext. While decrypting, it recomputes the check before releasing any plaintext. If the recomputed tag does not match the stored one, decryption refuses to continue. That is why the failure mode is a flat refusal, not a half-readable message: the design would rather tell you nothing than hand you text it cannot vouch for.
That pairing, encryption plus authentication in a single operation, is why AES-GCM became the default in so much modern software. You do not bolt on a separate integrity check and hope the halves were combined correctly. They arrive together.
Why a wrong passphrase fails cleanly
In the playground, there is no stored password to compare against. Your passphrase is run through PBKDF2-HMAC-SHA-256 with 210,000 iterations, following current OWASP guidance, to derive the actual encryption key. The salt, a random 16-byte value created fresh for every encryption, is mixed into that derivation so the same passphrase produces a different key each time.
Follow a wrong passphrase through the system: it derives a wrong key, and the wrong key fails the GCM tag check. Because the check fails before any plaintext is released, the tool can only tell you it could not decrypt. That is not the tool being coy; there is genuinely nothing valid to show you. The same clean failure protects you against tampering: change one character of an OVAT1 string and the altered string fails in exactly the same way.
The salt and the IV: why every output is different
Encrypt the same note twice with the same passphrase and you get two different strings. Two fresh random values cause that. The salt, described above, changes the derived key. The IV, a 12-byte value in this tool, is the starting point the encryption itself uses, and reusing one with the same key would weaken the result, so it is generated fresh every time too.
Because both values are needed again at decryption time, they travel with the message. The OVAT1 format is simply a documented packing order: a version byte, then the 16-byte salt, then the 12-byte IV, then the ciphertext, all encoded in Base64 so the whole thing is one copyable line of text. Nothing about the salt or IV needs to be secret. The passphrase is the only secret in the system.
How to try it, step by step
- Open the Encryption Playground and stay on the Encrypt tab.
- Type a short piece of text. A sentence is plenty; this tool is built for short notes, not documents.
- Enter a passphrase. Remember it exactly, because there is no recovery if you forget it.
- Click Encrypt and copy the OVAT1 string that appears.
- Switch to the Decrypt tab, paste the string, type the same passphrase and click Decrypt. Your original text comes back.
- Now change one character in the pasted string, or mistype the passphrase, and decrypt again. You get the could-not-decrypt failure, which is the GCM tag doing its job.
Worked example: one note, one string
The tool's own example starts with the note "Meet at the old depot at 9" and the passphrase "library card". Encrypting it produced this string:
OVAT1.AY2T35LSmwcqthg/FH3lhifhB29/Ni7STzQzPHDt3yhv5oZBPZGgi2TiokVf9rEH8Xv7qb3j7jgB40e+fhDRKa6qfyllxLc=
Everything the decryptor needs is inside that one line: the OVAT1 label, then the salt, IV and ciphertext in the documented order, Base64 encoded. Paste it into the Decrypt tab with the passphrase "library card" and the note reappears. Any other passphrase gives could-not-decrypt, because the derived key is wrong and the tag check fails. Encrypt the same note a second time and the string will be completely different, thanks to the fresh salt and IV, yet it still decrypts to the same nine words.
Limitations and honest tradeoffs
The OVAT1 format belongs to this tool alone. It is not PGP, it is not age, and no other app can open it directly. If you encrypt something here, this page is the only way back in.
A weak passphrase is still weak. PBKDF2 slows down guessing with its 210,000 iterations, but an attacker who has your OVAT1 string can guess passphrases offline, at their leisure, and a short or obvious passphrase will fall. The cryptography cannot rescue a bad secret.
There is no recovery, by design. Forget the passphrase and the text is permanently unreadable; Ovatly never sees your passphrase or your text, so there is nobody to ask. And to be direct: this is a learning tool, not safe for banking passwords or genuine secrets. Real secrets belong in an audited password manager or dedicated encryption software.
Common mistakes
- Assuming a failed decryption means the text is lost. A could-not-decrypt result usually means a mistyped passphrase or a string that was trimmed while copying. Check both before panicking.
- Editing the encrypted string. Even one changed character breaks the tag check. Copy the whole OVAT1 string, including the prefix, every time.
- Using a passphrase you use elsewhere. The string can be guessed against offline. Give it a passphrase of its own, and a strong one.
- Encrypting something important and forgetting where the tool lives. OVAT1 strings open only here. Do not store anything in this format that you cannot afford to lose.
- Mistaking the Base64 for the encryption. The Base64 is just packaging so the bytes survive copy and paste. The AES-GCM work happens underneath it, as our comparison of encryption vs encoding vs hashing explains.
FAQs
What does the GCM part of AES-GCM actually do? GCM adds an authentication tag to the encrypted text. When you decrypt, the tag is checked first. If the text was changed, or the passphrase is wrong, the check fails and decryption stops instead of returning scrambled nonsense.
Why does a wrong passphrase give an error instead of garbage text? Because the passphrase feeds the key derivation, a wrong passphrase produces the wrong key, and the wrong key fails the GCM tag check. The tool reports could-not-decrypt rather than showing you a corrupted version of the note.
Why does the same text encrypt differently every time? Each encryption uses a fresh random salt and a fresh random IV, so the derived key and the starting point change on every run. Two encryptions of the same note with the same passphrase produce two different OVAT1 strings, and both decrypt correctly.
Can I open an OVAT1 string in another encryption app? No. OVAT1 is the Encryption Playground's own documented layout, not a standard like PGP or age. Only this tool knows how its version byte, salt, IV and ciphertext are arranged, so only this tool can decrypt it.
Is the Encryption Playground safe for real secrets? No. It is a learning tool, and the page says so plainly. It is not safe for banking passwords or anything that would hurt you if it leaked. For real secrets, use an audited password manager or dedicated encryption software.
Conclusion
AES-GCM earns its popularity honestly: AES hides the text, the GCM tag vouches for it, and the two fail together, cleanly, the moment anything is off. The Encryption Playground lets you watch that happen with your own sentence and your own passphrase. For the neighbouring ideas it is so often confused with, read Encryption vs Encoding vs Hashing: The Difference That Matters. More guides in this series live in our Security and Privacy Utilities guides.
References
- NIST SP 800-38D, the specification of Galois/Counter Mode (GCM) and its authentication tag: https://csrc.nist.gov/pubs/sp/800/38/d/final
- OWASP Password Storage Cheat Sheet, on PBKDF2 iteration counts for key derivation: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html