Types of Ciphers with Examples
April 12, 2025•376 words
Types of Ciphers with Examples
1. Monoalphabetic Substitution Cipher
Each letter maps to another single fixed letter.
- Plaintext:
HELLO
- Cipher Key: A→M, B→N, C→O, ..., H→T, E→Q, L→X, O→Z
- Ciphertext:
TQXXZ
2. Caesar Cipher (Shift Cipher)
Each letter is shifted by a fixed number.
- Shift: +3
- Plaintext:
ATTACK
- Ciphertext:
DWWDFN
3. Atbash Cipher
Reverses the alphabet.
- A ↔ Z, B ↔ Y, ..., M ↔ N
- Plaintext:
HELLO
- Ciphertext:
SVOOL
4. Keyword Cipher
Uses a keyword to reorder the alphabet.
- Keyword:
FIRE
- Alphabet:
FIREABC…
(no repeats, then rest of unused letters) - Mapping: A → F, B → I, C → R, D → E, E → A, F → B…
- Plaintext:
CAB
- Ciphertext:
RFI
5. Numerical Cipher
Substitute each letter with a number.
- A = 1, B = 2, ..., Z = 26
- Plaintext:
DOG
- Ciphertext:
4 15 7
Or scrambled key: A = 13, B = 22, etc. (for harder puzzles)
6. Pigpen Cipher (Symbol Cipher)
Letters are encoded using grid-based symbols.
- Plaintext:
HELLO
- Ciphertext: Symbols from pigpen grid.
(Visual cipher – ideal for themed or kids’ puzzle books)
7. Transposition Cipher
Letters are rearranged, not replaced.
- Plaintext:
HELLO
- Rearranged as:
LEHLO
,LOHEL
, etc.
Requires a rule (e.g., reverse, columnar, zigzag).
8. Homophonic Cipher
Each letter may map to multiple cipher characters, often numbers or symbols.
- E → 12 or 88 or 5
- Plaintext:
SEE
- Ciphertext:
51 88 12
Harder to decode due to frequency masking.
9. Vigenère Cipher (Polyalphabetic)
Uses a keyword to apply different Caesar shifts for each letter.
- Keyword:
KEY
- Plaintext:
HELLO
- Apply:
- H (shift K = +10) → R
- E (E = +4) → I
- L (Y = +24) → J
- L (K = +10) → V
- O (E = +4) → S
- H (shift K = +10) → R
- Ciphertext:
RIJVS
Harder to solve without the keyword.
10. Book Cipher
Uses positions in a book:
- “3:14:5” → page 3, line 14, word 5.
Used for secret codes. Not for casual puzzle books.