Cryptography Explorer
Explore classic and modern encryption algorithms interactively. Encrypt messages, visualize the step-by-step process, analyze letter frequencies, and see how brute force attacks work against weak ciphers.
Controls
Shifts each letter by a fixed number of positions in the alphabet
Ciphertext
Step-by-Step Process
| # | Input | Operation | Output |
|---|---|---|---|
| 1 | H | H(7) + 3 = K(10) | K |
| 2 | e | E(4) + 3 = H(7) | h |
| 3 | l | L(11) + 3 = O(14) | o |
| 4 | l | L(11) + 3 = O(14) | o |
| 5 | o | O(14) + 3 = R(17) | r |
| 6 | not a letter, keep as is | ||
| 7 | W | W(22) + 3 = Z(25) | Z |
| 8 | o | O(14) + 3 = R(17) | r |
| 9 | r | R(17) + 3 = U(20) | u |
| 10 | l | L(11) + 3 = O(14) | o |
| 11 | d | D(3) + 3 = G(6) | g |
Reference Guide
Caesar Cipher
One of the oldest known ciphers, used by Julius Caesar. Each letter is shifted by a fixed number of positions in the alphabet.
With only 26 possible keys, Caesar cipher is trivially broken by brute force. It serves as an introduction to the concept of encryption.
Vigenère Cipher
A polyalphabetic cipher that uses a repeating keyword. Each letter of the key shifts the corresponding plaintext letter by a different amount.
The Vigenère cipher resisted cryptanalysis for centuries and was once called "le chiffre indéchiffrable." It is vulnerable to Kasiski examination and frequency analysis when the key length is known.
Public-Key Cryptography (RSA)
RSA uses the mathematical difficulty of factoring large numbers. A public key encrypts, and only the matching private key can decrypt.
The security relies on choosing large primes p and q. This demo uses small primes so you can see the math, but real RSA uses 2048-bit or larger keys.
Frequency Analysis
In English, letters appear at predictable rates. The letter E appears about 12.7% of the time, while Z appears only 0.07%.
Substitution and Caesar ciphers preserve these frequency patterns in the ciphertext. By comparing ciphertext frequencies to known English frequencies, attackers can deduce the key without brute force.
Modern ciphers like AES produce ciphertext with uniform frequency distributions, defeating this attack.