§ TOOLS / CIPHER LAB / NIHILIST
Nihilist cipher
The Nihilist cipher turns each letter into a two-digit number from a keyed 5 × 5 square, then adds the numbers of a repeating key word to hide the pattern. It is one of the number ciphers on the Science Olympiad Division B Codebusters list, and with both keys in hand it is careful arithmetic rather than guesswork.
What the Nihilist cipher is
The Nihilist cipher is built on the Polybius square, a 5 × 5 grid of letters in which every letter has a row number and a column number. Because the grid has 25 cells, two letters share one, by convention I and J. The square is keyed: a keyword is written into the first cells with its repeated letters dropped, and the rest of the alphabet follows in order. A letter’s number is its row then its column, so the top-left cell is 11 and the bottom-right is 55.
On its own, a Polybius square is a simple substitution, and the commonest number would give E away. The Nihilist adds a second key. The key word is turned into numbers through the same square, written under the message, repeated as often as needed, and added number by number. The result is a row of numbers, most of two digits and a few of three, in which the same letter is written differently depending on which key letter sat over it.
The name is usually traced to Russian revolutionary groups of the nineteenth century, the Nihilists, who are said to have used ciphers of this kind; the story is told more often than it is documented, and the version solved in puzzle circles is a standardised one. The American Cryptogram Association lists it among its pencil-and-paper types, and that is the form Codebusters papers use.
Decoding with both keys is subtraction. Build the square, convert the key, write the key numbers under the ciphertext and subtract. Each difference is a cell. The usual slips are building the square wrong, often by forgetting to drop a repeated keyword letter, which shifts every cell after it, and losing step with the key, so that every number after the slip is wrong in the same way. A difference with a 0 in it, or a digit above 5, is the signal: no cell has that number.
How to solve a Nihilist cipher
Each letter becomes its row-and-column number in a keyed 5 × 5 square, and the number of a repeating key word, taken from the same square, is added to it. The square holds 25 letters, so I and J share a cell. The ciphertext is a row of two- and three-digit numbers.
- Build the square from the Polybius key: the keyword’s letters first, repeats dropped, then the rest of the alphabet in order, five to a row, with I and J in one cell.
- Number each cell row first, then column: the top-left cell is 11, the one to its right 12, the bottom-right 55.
- Turn the additive key into numbers through the same square, and write them under the ciphertext, starting again from the first when the key runs out.
- Subtract each key number from the number above it. Every difference is a cell: the tens digit is the row, the units digit the column.
- A difference with a 0 in it, or a digit over 5, means a slip: a subtraction went wrong or the key fell out of step with the ciphertext.
A worked example
Decode 66 76 65 48 54 85 75 63 54 (keys PLANET and ORBIT)
Square from PLANET: P L A N E / T B C D F / G H I K M / O Q R S U / V W X Y Z The key ORBIT in the same square: O 41 · R 43 · B 22 · I 33 · T 21 66 − 41 = 25 → F 76 − 43 = 33 → I 65 − 22 = 43 → R 48 − 33 = 15 → E 54 − 21 = 33 → I 85 − 41 = 44 → S 75 − 43 = 32 → H 63 − 22 = 41 → O 54 − 33 = 21 → T Plaintext: FIRE IS HOT
Nihilist in Codebusters
Among the Science Olympiad rule sets OlyPrep has read, the Nihilist cipher is on the Division B Codebusters list and not on the elementary lists. At regional level the Division B rules give both keys, which makes it a decoding question; at state and national level the rules OlyPrep has read replace the keys with a crib long enough to recover them, which turns it into a cryptanalysis question. Scoring follows the paper’s usual rule: a decoded message with up to two wrong letters is commonly counted as solved.
Recovering the key from a crib works because subtraction runs both ways. Each crib letter has a known cell number, and the ciphertext number above it minus that cell number is the key’s number at that position. A few positions in a row spell out the key word’s cells; once the key repeats, its length is visible, and the remaining numbers decode.
The lab below draws a science sentence, picks a Polybius keyword and an additive keyword from its own list, and prints both on the key line, as a regional question would. The easy setting uses a short sentence and the hard setting a long one. Check compares letters only and treats I and J as one, as the square does; Reveal shows the plaintext with the square written out, so a student can see where a slip happened.
Practice the Nihilist cipher
The lab below is set to the Nihilist cipher alone. Pick a difficulty, generate a challenge, decode it, then check your answer or reveal the solution. It runs in your browser, needs no account, and is unlimited on every OlyPrep plan.
Scoped to Nihilist · 1 cipher type. Generate a challenge, solve it, and we'll track what you've cracked.
Your first decode is the hardest.
Pick a cipher above and give it a shot — we'll keep track of what you've solved.
Where the Nihilist cipher is tested
The Science Olympiad rule sets OlyPrep has read that name this cipher:
- Science Olympiad Division B — on the Codebusters list; both keys given at regional level, a crib in their place at state and national
Cipher lists change with each season’s rules; a tournament’s own rulebook is the authority on what it tests.
Questions about the Nihilist cipher.
- Q·01Why does the Nihilist cipher treat I and J as one letter?
- Because the Polybius square under it has 25 cells and the alphabet has 26. By convention I and J share a cell, so a J in the message encodes as I. When decoding, read the cell as I and change it to J where the word needs it; the OlyPrep lab accepts either.
- Q·02What if a difference has a zero in it?
- Then something slipped. Every cell in the square is numbered with a row and a column from 1 to 5, so 10, 20 or 36 cannot be a cell. Check the subtraction first, then whether the key has fallen out of step with the ciphertext, then the square itself.
- Q·03Is the Nihilist cipher on elementary Codebusters papers?
- Not on the elementary lists OlyPrep has read. It is on the Division B list, where regional questions give both keys and state and national questions commonly give a crib in their place.
- Q·04Is OlyPrep part of Science Olympiad?
- No. OlyPrep is independent and is not affiliated with Science Olympiad, Inc. or any state or regional Science Olympiad organization. Whether the Nihilist cipher is on a paper, and with which keys, is set by each tournament’s own rules.