You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Classical ciphers are the historical encryption techniques that laid the groundwork for modern cryptography. While they are no longer secure by today's standards, understanding them is essential for grasping the principles that underpin modern algorithms.
Substitution ciphers replace each letter in the plaintext with another letter or symbol.
The Caesar cipher is one of the oldest known encryption techniques, used by Julius Caesar around 50 BC:
Plaintext: HELLO WORLD
Shift: 3
Ciphertext: KHOOR ZRUOG
Why it is insecure:
ROT13 is a special case of the Caesar cipher with a shift of 13:
A ↔ N B ↔ O C ↔ P ... M ↔ Z
Applying ROT13 twice returns the original text. It is used for trivial obfuscation (e.g., hiding spoilers) but provides zero security.
A more general substitution cipher where each letter maps to a unique different letter:
Plaintext: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Ciphertext: Q W E R T Y U I O P A S D F G H J K L Z X C V B N M
Key space: 26! (factorial) ≈ 4 × 10^26 possible keys — far too many to brute force.
But still insecure: Vulnerable to frequency analysis.
Frequency analysis is a cryptanalytic technique developed by the Arab polymath Al-Kindi around 800 AD:
| Letter | English Frequency |
|---|---|
| E | ~12.7% |
| T | ~9.1% |
| A | ~8.2% |
| O | ~7.5% |
| I | ~7.0% |
| N | ~6.7% |
| S | ~6.3% |
| H | ~6.1% |
| R | ~6.0% |
Example: If "X" appears most frequently in the ciphertext, it likely maps to "E".
Frequency analysis broke monoalphabetic ciphers and drove the development of more complex encryption methods.
Polyalphabetic ciphers use multiple substitution alphabets to defeat frequency analysis.
Invented in the 16th century and considered "unbreakable" for nearly 300 years:
Plaintext: ATTACKATDAWN
Keyword: LEMONLEMONLE
Shift: L=11, E=4, M=12, O=14, N=13, ...
Ciphertext: LXFOPVEFRNHR
How it works:
Breaking the Vigenère cipher:
Transposition ciphers rearrange the positions of plaintext characters without changing them.
Characters are written in a zigzag pattern across a number of "rails" and then read off row by row:
Plaintext: WE ARE DISCOVERED FLEE AT ONCE
Rails: 3
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.