Classical ciphers and frequency analysis
Break Caesar, Vigenere, and arbitrary substitution using letter statistics - and learn why statistics beat guessing.
By the end you can
- Break a Caesar shift with chi-squared scoring rather than by reading 26 candidates
- Recover a Vigenere key length using the index of coincidence, then the key itself per column
- Distinguish a transposition from a substitution by looking at letter frequencies
- Explain why short ciphertexts defeat statistical attacks
1. Read
2. Use the tools
In the order they come up while solving. Each opens the workspace tab that runs it.
Caesar cipher decoder with automatic shift detection
Break a Caesar shift without guessing. ctfpal scores all 26 rotations by chi-squared letter frequency and puts the English one first.
Vigenere cipher solver with automatic key recovery
Decrypt Vigenere with a known key, or recover the key from ciphertext alone using index-of-coincidence period detection and per-column chi-squared.
Monoalphabetic substitution cipher solver
Break an arbitrary substitution cipher automatically by hill-climbing on quadgram statistics - no key, no guessing.
Rail fence cipher solver
Brute-force rail fence transposition across 2-8 rails and every starting offset, ranked by English-likeness.
3. Try one now
Generated in your browser and checked in your browser. No account, nothing to download, and a fresh one whenever you want another.
Practice
generated here, checked here, no account and nothing to download
4. Practise on the real thing
Real picoCTF challenges that use these techniques, easiest first. 23 match in total - see the full index.
Checkpoint
Recover a Vigenere key from ciphertext alone and report the index of coincidence at each candidate period.
Teaching note
This is the first module where the tool’s output is a ranked list rather than an answer. Students need to be told explicitly that reading the ranking - and noticing when the top two candidates score similarly - is the skill being taught.