🏛️

Caesar Cipher

Simple shift cipher used by Julius Caesar

substitution
Definition

The Caesar cipher is one of the simplest and oldest known encryption techniques. It is a type of substitution cipher where each letter in the plaintext is shifted a certain number of places down or up the alphabet.

History

Named after Julius Caesar, who used it in his private correspondence around 58 BC. Caesar used a shift of 3 to protect messages of military significance. The cipher remained effective for centuries due to low literacy rates.

Real-World Usage

While no longer secure for serious encryption, the Caesar cipher is used in modern applications like ROT13 for obscuring text, puzzle games, and as an educational tool for teaching cryptography fundamentals.

Weaknesses

Extremely vulnerable to brute force attacks (only 25 possible keys) and frequency analysis. The small key space means an attacker can try all possible shifts in seconds. Pattern preservation makes it easy to identify common words.

Step-by-Step Visualization

Watch how each character is transformed using the shifted alphabet

Original Alphabet

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z

Shifted Alphabet (shift = 3)

D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
A
B
C

Plaintext

H
E
L
L
O
W
O
R
L
D
Interactive Playground