Substitution ciphers · Cryptography 101
Secret Encoder
Apply a substitution cipher. Encrypt, decrypt, and see why this scheme broke.
A substitution cipher swaps each letter for another according to a fixed rule. It's the simplest form of encryption — and the first one ever broken systematically, by Arab cryptographers in the 9th century, using letter-frequency analysis. Modern cryptography is built on the lessons of why this scheme fails.
Explore the activity to earn its passport stamp. Stamps record exploration, not mastery.
What’s happening under the hood
- ›Key: a permutation of the 26-letter alphabet. Encrypt = lookup table. Decrypt = reverse lookup. Trivial to implement, trivial to attack.
- ›Vulnerable to frequency analysis: in English, E appears ~12% of the time, T ~9%, A ~8%. The most common letter in the ciphertext is almost certainly E.
- ›Modern encryption does not preserve single-letter substitution patterns. AES is a block cipher used with an appropriate mode; ChaCha20 produces a keystream from a key, nonce, and counter. Neither requires a new secret key for every block. Correct nonce use and authentication are essential.
Dig deeper
Phase 8 · Security PracticeThe concept you just explored is taught with full depth in the formal DURA curriculum.