Cipher Ladder

Every cipher exists because the one below it broke in a specific way. Type a message and climb the ladder — from Caesar to RSA, each one a fix for the last.
RUNG 01 Caesar Cipher
Shift every letter by a fixed amount. The key IS the shift. The weakness: only 25 possible keys — try them all.
13
RAPELC RIRELGUVA
Key space: 25 — trivially brute-forceable
RUNG 02 Vigenère Cipher
A keyword shifts each letter differently — A=0, B=1, etc. The key space explodes to 26keylen. But the key repeats, and repetition is a pattern, and patterns can be found.
RIGYPT FOZPKXR
Key space: 265 = 11,881,376 for a 5-letter key — but repetition is the vulnerability
RUNG 03 XOR Cipher
The same operation on bytes. a ⊕ key ⊕ key = a — encrypt and decrypt are the same function. Elegant, but a repeating key on binary data is just a Vigenère with 256 possible values per position.
Self-inverse: encrypt = decrypt. But repeating key = same pattern problem
RUNG 04 One-Time Pad
A truly random key, as long as the message, used once. Mathematically proven unbreakable — every plaintext is equally likely. The catch: how do you share a key as long as the message without anyone intercepting it?
Unbreakable IF: key is random, used once, kept secret. The key distribution problem.
RUNG 05 Diffie-Hellman Key Exchange
Two people who've never met agree on a shared secret over a public channel. The trick: modular exponentiation is easy, but reversing it (the discrete log problem) is hard. An eavesdropper sees everything and learns nothing.
Alice
secret: 4
public: 4
18
⇄
Bob
secret: 14
public: 13
18
Eavesdropper sees p=23, g=5, A=4, B=13 — but cannot compute the shared secret without solving the discrete log.
RUNG 06 RSA
The solution that runs the internet. Multiply two large primes — easy. Factor the result back — hard. That asymmetry is a trap door: you can tell everyone how to lock the door, but only you know how to unlock it.
Primes: p=173, q=283
Modulus: n = p × q = 48959
Public key: (n=48959, e=65537)
Private key: (n=48959, d=...computing...)
Message: "HI" → [...]
Encrypted: [...]
Decrypted: "HI"

The Ladder

Caesar25 keys — trivially brute-forced
Vigenèrelonger key, but it repeats — pattern-detectable
XORsame on bytes, but repeating key = same problem
OTPperfect secrecy, but key is as long as the message
DHsolve key sharing, but need hard-to-reverse math
RSAtrap door: easy to multiply, hard to factor
∴ The asymmetry — easy one way, hard the other — IS encryption.