🔐 The Transposition Cipher
Unlike substitution ciphers that replace letters, transposition
ciphers rearrange the order of letters. The letters stay the same, but
their positions change!
Rail Fence Cipher
Write the message in a zigzag pattern across multiple "rails", then
read off each rail.
Plaintext: WE ARE DISCOVERED FLEE AT ONCE
Rails: 3
W . . . E . . . C . . . R . . . L . . . T . . . E . E . R . D . S . O
. E . E . F . E . A . O . C . . . A . . . I . . . V . . . D . . . E .
. . N . . Read off: WECRL TEERD SOEEF EAOCA IVDEN
Columnar Transposition
Write the message in rows under a keyword, then read off columns in
alphabetical order of the keyword.
Plaintext: ATTACK AT DAWN
Keyword: ZEBRA
| Z(5) |
E(2) |
B(1) |
R(4) |
A(0) |
| A |
T |
T |
A |
C |
| K |
A |
T |
D |
A |
| W |
N |
X |
X |
X |
Read columns in order (A=0, B=1, E=2, R=4, Z=5): Column A: CAX Column
B: TTX Column E: TAN Column R: ADX Column Z: AKW
Ciphertext: CAXTTXTANADXAKW
How to Crack It
-
Letter frequency: Since letters aren't changed, the
frequency should match normal English
-
Find the key length: Try different column widths
until patterns emerge
-
Look for common digraphs: TH, HE, IN should appear
when columns are correctly ordered
-
Anagram solving: Once you have the columns, try
rearranging them
Types of Transposition
- Rail Fence: Zigzag pattern
- Columnar: Read columns in key order
-
Route Cipher: Fill a grid, read in a specific
pattern (spiral, diagonal, etc.)
-
Scytale: Ancient Greek - wrap paper around a rod
Tips
-
Check if letter frequencies match normal English (means substitution
wasn't used)
-
The message length divided by possible key lengths gives grid
dimensions
- Padding characters (X, Z) often appear at the end
- Try common key lengths: 3, 4, 5, 6, 7
- Double transposition (doing it twice) was used in WWII