The Caesar Cipher is a simple encryption method where each letter in the plaintext is shifted a fixed number of places in the alphabet.
Plaintext Letter | Shifted 3 Places | Ciphertext Letter |
---|---|---|
H | K | K |
E | H | H |
L | O | O |
L | O | O |
O | R | R |
For a given letter X
, shift S
, and the 26-letter English alphabet:
C = (X + S) mod 26
X = (C - S) mod 26
The Caesar Cipher is not secure for modern encryption because there are only 25 possible shifts, making it easy to brute-force decrypt.