Encryption is easy to describe and hard to picture. A passphrase goes in, a meaningless string comes out, and the string turns back into your words when the passphrase is right, and refuses when it is wrong. The moving parts stay invisible in most tools, which is exactly why the idea stays fuzzy.
The Encryption Playground on Ovatly exists to make those parts visible. It encrypts short text with AES-GCM, the authenticated encryption built into your browser, using a key derived from your passphrase with PBKDF2, and it shows every parameter as it works. This guide walks through a real encryption, opens a published encrypted note, and names what each piece of the output is doing. One warning belongs at the top: this is a learning tool, and it is not safe for real secrets such as banking passwords, as the limitations section explains.
Contents
- Quick answer
- From passphrase to key: what PBKDF2 does
- Inside the OVAT1 string
- How to encrypt and decrypt a note, step by step
- Worked example: open a real encrypted note
- Why a wrong passphrase fails cleanly
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
To see encryption work end to end: open the Encryption Playground, type a short note and a passphrase on the Encrypt tab, and press Encrypt. You get one string starting with OVAT1. that carries the salt, the IV and the ciphertext together. Paste that string into the Decrypt tab with the same passphrase and your note comes back; use any other passphrase and you get a could-not-decrypt message instead. The worked example below gives you a published string and its passphrase, so you can open a real note first.
From passphrase to key: what PBKDF2 does
AES needs a key of an exact size, and a human passphrase is not one. The bridge between them is key derivation. The playground runs your passphrase through PBKDF2 with HMAC-SHA-256, repeating the process 210,000 times, following current OWASP guidance for that algorithm. Repetition is the point: one check is cheap for you, and expensive for an attacker trying millions of guesses.
The derivation also mixes in a salt, a random value created fresh for every encryption. The salt means the same passphrase produces a different key every time, so an attacker cannot precompute a table of passphrase-to-key results and reuse it against everyone. The salt is not secret; it travels inside the output string so decryption can repeat the derivation.
Honesty matters here: derivation slows guessing down, it does not rescue a weak passphrase. A passphrase attackers can guess will still be guessed, just more slowly, because they can run the same derivation offline against your stored string.
Inside the OVAT1 string
The output looks like one opaque blob, but it is a labelled package. The OVAT1. prefix names the format and its version. After it, a single Base64-encoded block carries, in order:
- A version byte, so the format can evolve without breaking old strings.
- A 16-byte salt, the random value fed to PBKDF2 alongside your passphrase.
- A 12-byte IV, the random starting value AES-GCM needs so the same text never encrypts the same way twice.
- The ciphertext itself, with the authentication tag decryption checks first.
Carrying everything in one string is what makes the playground practical: there is nothing else to keep track of, lose, or mismatch. The tradeoff is that OVAT1. is this tool's own documented layout, not a standard like PGP or age, so only this tool can open it. The format is documented on the page, and a developer could implement it elsewhere, but mainstream tools will not recognise the string.
How to encrypt and decrypt a note, step by step
- Open the Encryption Playground and stay on the Encrypt tab.
- Type the text you want to encrypt and a passphrase, then press Encrypt.
- Copy the whole
OVAT1.text; it carries the salt, IV and ciphertext together, so it is the only thing you need to keep. - Switch to the Decrypt tab, paste the string, and enter the same passphrase.
- Press Decrypt to get your text back. Then try a wrong passphrase once, to see the failure message while the stakes are low.
Worked example: open a real encrypted note
This string was produced by the playground itself. It encrypts a short note with the passphrase library card:
OVAT1.AY2T35LSmwcqthg/FH3lhifhB29/Ni7STzQzPHDt3yhv5oZBPZGgi2TiokVf9rEH8Xv7qb3j7jgB40e+fhDRKa6qfyllxLc=
Paste it into the Decrypt tab, enter library card as the passphrase, and press Decrypt. The note that comes back is:
Meet at the old depot at 9
Now change one thing: type any other passphrase and decrypt again. You will not get a garbled version of the note. You get the could-not-decrypt message, and the next section explains why that clean failure is a feature. Encrypt the same note yourself with the same passphrase, and your string will look different from the one above, because your run draws a fresh random salt and IV. Both strings still open with library card, and neither reveals that they hide the same text.
Why a wrong passphrase fails cleanly
Older encryption modes had an awkward habit: decrypt with the wrong key and you got garbage, with no reliable way to tell garbage from a genuine message. AES-GCM fixes that by attaching an authentication tag to the ciphertext. The tag is computed from the key and the ciphertext together, and decryption checks it before releasing any text.
A wrong passphrase derives the wrong key, the tag check fails, and the tool can honestly report that it could not decrypt instead of handing you nonsense dressed as output. That is also why tampering fails: change a character of the string and the tag no longer matches, so the edit is detected rather than silently decrypted.
Limitations and honest tradeoffs
Start with the biggest one. This is a learning tool on a web page, and it is not safe for your banking passwords or any secret that truly matters. For real secrets, use an audited password manager or dedicated encryption software, however carefully this page is built.
There is no recovery, ever. A forgotten passphrase means the text is permanently unreadable. Ovatly never sees either the passphrase or the text, so nobody can reset, look up, or rescue anything for you. That is the correct design, and it makes the passphrase the single point of failure.
The format is a tradeoff too. The self-contained OVAT1. string is convenient and fully documented, but it is not portable: other apps cannot open it directly. And the strength of the whole construction rests on the passphrase. PBKDF2 with 210,000 iterations makes guessing expensive; it cannot make a guessable passphrase unguessable.
Common mistakes
- Using the playground for real secrets. Banking passwords and recovery codes belong in an audited password manager, not in a teaching tool.
- Forgetting the passphrase and expecting a reset. There is no recovery path, by design.
- Assuming the string opens anywhere. The
OVAT1.format belongs to this tool; other apps will not recognise it. - Trusting a weak passphrase because the algorithm is strong. Attackers guess passphrases offline, against the string itself, and derivation only slows them down.
- Thinking a different output means something broke. Fresh salt and IV make every encryption unique on purpose.
FAQs
Why does a wrong passphrase say could not decrypt instead of showing garbage? AES-GCM attaches an authentication tag to the ciphertext, and decryption checks that tag first. A wrong passphrase derives the wrong key, the check fails, and the tool can honestly report failure instead of returning nonsense.
Why does the same text encrypt differently every time? Each run draws a fresh random salt and IV, so the derived key and the encryption stream differ. Identical outputs would leak that two messages are the same.
Can I decrypt this output in another app? Not directly. The OVAT1 format is this tool's own layout rather than a standard like PGP or age. The format is documented on the page, so a developer could implement it elsewhere, but mainstream tools will not recognise it.
Is this safe for my banking passwords? No. It is a learning tool on a web page. Store banking credentials in a reputable password manager with its own audited encryption and backup story.
What happens if I forget the passphrase? The text is permanently unreadable. There is no recovery, and Ovatly never sees either the passphrase or the text, so nobody can reset it for you.
Conclusion
Encryption stops being abstract once you have watched a sentence become a string and come back. The pieces that matter are the derivation that turns a passphrase into a key, the salt and IV that make every run unique, and the authentication tag that makes wrong answers fail honestly. The Encryption Playground lets you repeat the experiment as often as you like, with nothing leaving your device. Its natural companion is the other half of browser cryptography: our guide to how to create an HMAC signature for an API request shows how a shared key proves a message is genuine instead of hiding it. For more guides in this series, see our Security and Privacy guides, which pair each technique with the free tool that performs it.
References
- MDN Web Docs, SubtleCrypto.encrypt(), on the browser API behind the playground: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/encrypt
- OWASP Cheat Sheet Series, Password Storage Cheat Sheet, on PBKDF2 iteration counts: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html