Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

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

Khoor Zruog

Step-by-Step Process

A→D
B→E
C→F
D→G
E→H
F→I
G→J
H→K
I→L
J→M
K→N
L→O
M→P
N→Q
O→R
P→S
Q→T
R→U
S→V
T→W
U→X
V→Y
W→Z
X→A
Y→B
Z→C
#InputOperationOutput
1HH(7) + 3 = K(10)K
2eE(4) + 3 = H(7)h
3lL(11) + 3 = O(14)o
4lL(11) + 3 = O(14)o
5oO(14) + 3 = R(17)r
6 not a letter, keep as is
7WW(22) + 3 = Z(25)Z
8oO(14) + 3 = R(17)r
9rR(17) + 3 = U(20)u
10lL(11) + 3 = O(14)o
11dD(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.

E(x)=(x+k) mod 26E(x) = (x + k) \bmod 26

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.

Ei=(Pi+Ki mod m) mod 26E_i = (P_i + K_{i \bmod m}) \bmod 26

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.

c=me mod nm=cd mod nc = m^e \bmod n \quad m = c^d \bmod n

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.

Related Content