Caesar & Vigenère Ciphers 2D: Frequency Analysis & Kasiski Attack
A flat 2D canvas cipher lab: real Caesar shift and Vigenère key-repetition encryption/decryption plus a genuine frequency-analysis attack panel — a letter histogram compared against English statistics, an Index of Coincidence readout, and a Kasiski repeated-sequence distance analysis that estimates the Vigenère key length from the ciphertext alone.
This 2D companion to the 3D Caesar & Vigenère simulator runs the exact same cipher mathematics — modular letter-shift arithmetic for Caesar, and repeating-keyword shift-by-keyletter for Vigenère — but adds a genuine cryptanalysis workbench instead of a decorative chart. Encrypt or decrypt any message, then run the frequency attack: for Caesar it brute-forces all 25 shifts and scores each candidate against real English letter-frequency statistics with a chi-squared test; for Vigenère it performs a real Kasiski examination, finding repeated letter sequences in the ciphertext, measuring the distances between their repeats, and taking their greatest common divisor to estimate the key length before splitting the ciphertext into per-key-letter columns and solving each one as its own Caesar cipher. The canvas renders a live letter-frequency histogram against the English reference curve, the live Index of Coincidence, and a distance histogram for the Kasiski analysis — every number on screen is computed from the actual ciphertext, not staged.
A flat 2D canvas cipher lab: real Caesar shift and Vigenère key-repetition encryption/decryption with genuine modular arithmetic, plus a working cryptanalysis panel — a live letter-frequency histogram scored against English statistics with chi-squared, an Index of Coincidence readout, and a real Kasiski repeated-sequence distance analysis that estimates the Vigenère key length and recovers the key from the ciphertext alone.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install