Lion Cipher Lab
See how encryption fails: ECB leaks, IV reuse, and why you need authenticated encryption
- Foundations
- Intermediate
- ~45 min
- Free · no account required
Why it matters
"We encrypted it" is one of the most dangerous half-truths in security. Encryption keeps a secret ONLY if you pick the right mode and use it correctly — and the defaults people reach for are full of traps. This lab is specifically about symmetric encryption MODES and how they fail, which is different from the neighbouring basics: encoding (gs-encoding-basics) is reversible-by-anyone and not encryption at all; hashing (gs-password-hashing-basics) is one-way and not reversible; verifying a hash (gs-hash-and-verify) proves integrity but hides nothing. Here you'll watch a supposedly-encrypted…
What you'll learn
- AES block cipher modes (ECB, CBC, GCM)
- why ECB leaks structure
- the role of the IV/nonce and why reuse is catastrophic
- confidentiality vs. integrity (ciphertext malleability)
- authenticated encryption (AEAD) and the InvalidTag check
- choosing a safe crypto default instead of hand-rolling one
Steps in this lab
- What you're about to prove (and why it isn't obvious)
- Set up and generate a test image
- Encrypt with ECB — and watch the picture survive
- Switch to CBC with a random IV — the pattern disappears
- Reuse the IV — and leak that two messages match
- CBC hides the message — but does NOT protect it
- AES-GCM — authenticated encryption that catches the tampering
- The judgment: don't assemble primitives — pick a safe default