Cipher methods Transposition
Caesar square
A simple geometric transposition: write the cleartext into a square grid by rows, read it back by columns. No substitution — only the order of letters changes.
- Family :
- Transposition
- Difficulty :
- Beginner
- Era :
- Structural variant of the Caesar cipher, era unknown
Also known as : Caesar square · Caesar box · square transposition
The Caesar square is one of the simplest geometric transpositions. There is no substitution: every cipher letter exists unchanged in the cleartext — only order changes. Tradition (without solid historical support) attributes the trick to Julius Caesar as a structural cousin to his shift cipher. The method is mostly pedagogical: it isolates the notion of transposition without mixing it with substitution.
Principle
Three steps:
- Pick a dimension
nsuch thatn × n ≥ length(message). That’s the key. - Write the cleartext row by row, left to right, into the
n × ngrid. Pad with a filler character (space,X, or·) if needed. - Read back column by column, top to bottom, columns in alphabetical order.
To decipher, knowing the dimension is enough: rewrite the ciphertext row by row into a grid of the right shape — n columns and ⌈length / n⌉ rows — then read row by row.
Example
Cleartext CIPHER CHRON ICLE (15 letters). With n = 4:
C I P H
E R C H
R O N I
C L E ·
(the dot stands in for padding). Column-wise read: CERC IROL PCNE HHI· → ciphertext CERC IROL PCNE HHI (trailing padding removed).
With n = 5 (a 5×3 block), the grid is:
C I P H E
R C H R O
N I C L E
and the column read yields CRN ICI PHC HRL EOE.
Strengths and weaknesses
Strengths
- Trivial to apply — no alphabet, no keyword, no table.
- Lossless — perfect deciphering, no ambiguity, given the dimension.
- Preserves the literal material — useful in steganography to hide a message while keeping the apparent statistics intact.
Weaknesses
- No security against a dimension-search attack: at most
n ≈ √lengthvalues to try, fewer than 10 for typical messages. Brute force is instant. - Frequency unchanged — encryption hides nothing about the source language; the attacker knows immediately that they’re looking at a permuted English/French text.
- Padding leak — the last column is shorter than the rest, betraying the dimension.
How to attack it by hand
- Count the ciphertext letters. Call that length
L. - List the candidate divisors of
L(or values close to√L). - For each candidate
n, write the ciphertext column by column into a grid ofncolumns and read row by row. - The single
nyielding intelligible text is the key.
For a 100-letter message, the manual attack takes under a minute.
Variants
- Columnar transposition — generalization where the read order of the columns is permuted by a keyword. The “secured” version of the Caesar square.
- Rail Fence — zigzag rather than grid transposition.
- Scytale — cylindrical sibling: wrap around a rod, read along the rod.
In CipherChronicle
The Caesar square is the perfect on-ramp to transposition. It teaches that a cipher’s strength comes not only from what you write (substitution) but also from where you write it (order). The earliest puzzles in the “transposition” family will use this square before stepping up to keyword-driven columnar transposition.
Grid
- 1
Ciphertext
Fifteen letters whose distribution matches the cleartext — no substitution, so frequency analysis adds nothing.
- 2
Transposition detected
Familiar letters (C, H, R, E) are all present in expected proportions — a clear sign of pure transposition.
- 3
Hypothesis: 4×4 grid
15 letters fit a 4×4 grid (16 cells, one padding). Cleartext is written row by row.
- 4
Read back column by column
To decipher, refill the grid row by row with the ciphertext, then read column by column.
- 5
Message revealed
The cleartext reorders without any substitution.