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.
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 algorithms (AES, ChaCha20) defeat frequency analysis by encrypting blocks of bytes with a key that changes every block — defeating any single-letter statistical attack.
Dig deeper
Phase 7 · Security EngineeringThe concept you just explored is taught with full depth in the formal DURA curriculum.