The Nihilist Cipher is a polygraphic substitution cipher that combines the principles of the Polybius Square with a numeric key to produce a series of ciphertext numbers. It was developed in the 19th century by Russian nihilists to securely transmit messages, hence its name. Each letter is first converted into a pair of digits using a Polybius grid, then combined with corresponding digits from a numeric key by addition, resulting in ciphertext that appears as a sequence of numbers.
The cipher relies on a pre-agreed square (typically 5x5 for letters A–Z, merging I/J) and a repeating numeric key. Each plaintext letter’s coordinates are summed with the numeric key’s digits to produce the final numeric ciphertext. Its strength comes from the variable numeric key, which adds a layer of obfuscation beyond simple substitution.
Nihilist Cipher: Encoding
To encode a message, first convert each plaintext letter into its Polybius square numeric coordinates. Then add the corresponding digit(s) from the numeric key (repeating the key as necessary) to each coordinate pair. For example, using the numeric key 314159 to encode “HELLO” with a standard 5x5 square (I/J combined):
Plaintext: H E L L O
Polybius Coordinates (example 5x5 grid):
H → 23
E → 15
L → 31
L → 31
O → 34
Numeric Key (repeated to match letters, each digit paired with one coordinate):
3 1 4 1 5 9 3 1 4 1
Encoding (coordinate + key):
23 + 31 = 54
15 + 41 = 56
31 + 59 = 90
31 + 31 = 62
34 + 41 = 75
Ciphertext: 54 56 90 62 75Each number in the ciphertext represents the sum of the letter’s Polybius coordinates and the numeric key digits, repeated as necessary across the message.
Nihilist Cipher: Decoding
To decode, subtract the numeric key from each ciphertext number to recover the Polybius coordinates, then map these back to letters using the same square. For example:
Ciphertext: 54 56 90 62 75
Numeric Key: 31 41 59 31 41
Decoding (ciphertext - key):
54 - 31 = 23 → H
56 - 41 = 15 → E
90 - 59 = 31 → L
62 - 31 = 31 → L
75 - 41 = 34 → O
Plaintext: HELLONihilist Cipher: Notes
The Nihilist Cipher demonstrates an early attempt to combine numerical substitution with a secret key to increase security. Its reliance on both a Polybius square and a numeric key makes frequency analysis more difficult than standard monoalphabetic ciphers. However, once the key is known, decryption is straightforward. It is historically significant as an example of politically motivated cryptography.