Nihilist Cipher Tool
NewEncrypt and decrypt text with the 19th-century Nihilist cipher, which converts letters to Polybius-square coordinates and adds a repeating keyword before producing a numeric ciphertext.
The Nihilist cipher first builds a 5x5 Polybius square from the grid keyword (I/J share a cell), converting each plaintext letter to a two-digit row+column coordinate. It then adds the coordinates of a repeating additive keyword to each pair, producing a stream of numbers that hides letter frequencies better than a plain Polybius square alone.
Frequently Asked Questions
How is the Nihilist cipher different from a plain Polybius square?
A plain Polybius square just converts letters to row/column coordinates, which is easy to break by frequency analysis. The Nihilist cipher adds a second, independent keyword's coordinates to each pair before output, which flattens the letter-frequency pattern and requires knowing both keywords to decrypt.
Why are there two separate keyword fields?
The grid keyword scrambles the 5x5 Polybius square layout (so an attacker can't assume standard A-Z ordering), while the additive keyword provides the repeating numeric offset added during encryption. Using two independent keywords makes the cipher considerably stronger than using just one.
What happens to the letters I and J?
Like most Polybius-square ciphers, I and J share a single cell in the 5x5 grid since 26 letters can't fit into 25 cells. J is automatically converted to I before encoding, so decoded text will show I even if the original had J.
Why are the ciphertext numbers sometimes two digits and sometimes three?
Each letter's coordinate pair (row, column, both 1-5) is combined into a two-digit number like 34, then added arithmetically to the keyword's coordinate number — so the sum can range from 22 up to 110, giving a variable-length number for each letter.
Is this cipher secure by modern standards?
No — it was designed for manual paper-and-pencil use by 19th-century Russian revolutionaries and is easily broken with modern computing. It's included here as a historical/educational cipher, not for protecting real secrets.