Encrypt and decrypt messages using two classical substitution ciphers. Apply frequency analysis to break them — seeing why simple substitution ciphers are vulnerable to statistical attacks.
The Caesar cipher shifts each letter by a fixed amount; the Vigenère cipher uses a repeating keyword to shift each letter by a different amount. Frequency analysis reveals the key by comparing letter distributions against known language statistics.
Type a message, choose a key, and watch the ciphertext appear. The frequency histogram shows letter distributions. The attack panel tries all possible keys (Caesar) or uses the Index of Coincidence (Vigenère).
The Vigenère cipher was considered unbreakable for 300 years until Charles Babbage and Friedrich Kasiski independently discovered statistical attacks in the 1860s.