Complete Columnar Cipher
Reconstruct a complete rectangle, understand the column-number key, and use a crib to attack unknown ordering.
What is the Complete Columnar Cipher?
A complete columnar transposition writes plaintext across rows of a rectangle and reads the columns in a key-defined order. “Complete” means the rectangle is filled so every column has the same number of letters, often by padding.
The letters themselves never change, which distinguishes this from substitution ciphers.
The cipher mechanics on this page are self-contained. Science Olympiad event formats, allowed variants, and tournament constraints can change by season; the current official Rules Manual and official clarifications take precedence.
No outside reference is assumed. Work through Foundations → Complete Reference → Encryption → Decryption in order, then use the competition and cryptanalysis sections.
What you need to know
- A key such as 4-2-3-1 labels the columns.
- Encryption reads the column labeled 1 first, then 2, then 3, etc.
- If padding is used, it completes the final row.
- For cryptanalysis, the number of columns and a crib can constrain the column order.
Beginner glossary
| Term | Meaning |
|---|---|
| Column key | A permutation such as 4-2-3-1 labeling the physical columns. |
| Complete rectangle | A grid where every column has the same number of letters, using padding if necessary. |
| Padding | Extra filler letters added so the rectangle is full. |
| Read order | The order of column labels 1, 2, 3, …, not necessarily the left-to-right physical order. |
| Crib | Known plaintext that can constrain column adjacency/order in cryptanalysis. |
Keep this beside you while solving
How to interpret a key
How encryption works
Choose the column count/key
Example: four columns labeled 4-2-3-1.
Write plaintext by rows
Fill left-to-right.
Pad to a complete rectangle
Add agreed filler letters if needed.
Read in key order
Collect the entire column labeled 1, then 2, etc.
How decryption works
Find rectangle dimensions
Cipher length ÷ number of columns gives the number of rows for a complete rectangle.
Split ciphertext into column chunks
Each chunk has the same number of letters.
Place chunks by key label
First chunk goes under label 1, second under label 2, etc.
Read rows left-to-right
Remove obvious padding at the end when appropriate.
How to approach it in Codebusters practice
- If the number of columns is constrained, test only allowed column counts.
- A crib can reveal which column pieces must sit next to one another in reconstructed rows.
- Do not use irregular-column logic for a complete columnar problem.
What the problem gives you vs. what you produce
| Part | What to expect |
|---|---|
| You may be given | Ciphertext, a column count/key, or a cryptanalysis problem with a crib and limited columns. |
| You must find | The plaintext by placing whole column chunks into the correct physical columns. |
| Fastest first move | Compute the number of rows and split the ciphertext into equal chunks immediately. |
How to attack an unknown or partially known key
- Because letters are unchanged, frequency statistics match the plaintext overall.
- Crib fragments that span column boundaries are especially informative for ordering columns.
- For a known column count, divide ciphertext into equal column segments before testing permutations.
Follow one example from start to finish
4-2-3-1
SECRETMESSAGE
SECRETMESSAGEXXX
label 1 → REGX; 2 → ETSX; 3 → CMAX; 4 → SESE
REGXETSXCMAXSESE
Before moving on, make sure you can answer these without another site:
- For key 4-2-3-1, which physical column is read first?
- Can you explain why all ciphertext chunks have equal length in a complete rectangle?
- Can you reconstruct rows after placing column chunks?
Common mistakes
Reading physical columns left-to-right instead of numeric key order.
Using unequal column lengths in a complete rectangle.
Forgetting padding.
Confusing the key labels with the order the plaintext is written.
Competition speed strategies
Write key labels above the grid in large digits.
Compute rows immediately from ciphertext length and column count.
For cryptanalysis, work with whole column chunks rather than moving individual letters repeatedly.
What to remember under time pressure
See every transformation
Use the lab to change inputs and keys, keep the relevant reference material visible, inspect each intermediate transformation, and then read the “How to reverse it” panel so encryption and decryption connect.