# The Nihilist Cipher Explained

The Nihilist cipher, a polyalphabetic substitution cipher used by Russian nihilists in the 19th century, is explained in this blog article. The cipher involves two keywords and a series of steps including the creation of a Polybius square, conversion of a second keyword into numbers, and encryption of plaintext using these numbers. The process for decryption is also outlined, requiring the same keywords and Polybius square. This article not only explains the cipher’s methodology but also provides a visual and practical approach to understanding its encryption process.

Before I wrote this article, I implemented the cipher in CrypTool 2, where you can now use the Nihilist cipher component for encryption and decryption of text using the Nihilist cipher.

In the following, I show the process of encryption using the cipher:

Step 1: Choose a first keyword and generate a Polybius square:
In our example here, we choose “KEYWORD“. We fill the keyword letters into a Polybius square and fill the remaining part of the square with the rest of the alphabet in alphabetical order. Our alphabet has a total of 25 letters, where I=J. Also, if a letter occurs twice or more in the keyword, we remove all other occurences of the corresponding letter:

Step 2: Choose a second keyword and generate a list of numbers:
Using the previously generated Polybius square, we convert a second keyword to a list of numbers. For example, the keyword “SECRET” we convert to:
45 12 25 21 12 51
We do so, by looking up the letters in the square and taking the digits on the left of the square as the first digit of the number and the column digit on top of the letter’s column as the second digit of the number.

Step 3: Encrypt the plaintext using the numerical key:
In the last step, we encrypt our plaintext by writing the key numbers below plaintext numbers, which we also generated using the same Polybius square. We repeat writing the keyword numbers below the plaintext numbers until we reach the end of the plaintext. Then, we add the plaintext numbers and key numbers to obtain the ciphertext:

The receiver of the encrypted message has to perform steps 1 and 2 with the same keywords to also generate the same Polybius square and same key numbers. To decrypt the ciphertext, he has to subtract the key numbers from the ciphertext numbers and then look up the corresponding plaintext letters in the Polybius square.

## A YouTube video about the Nihilist cipher

I also created a YouTube video about the Nihilist cipher, which I uploaded to my YouTube Channel:

## A CrypTool 2 Component and Workspace

I created a CrypTool 2 component and template, which implements the Nihilist cipher. Besides the “original” cipher with a Polybius square of 25 letters, it also allows to encrypt using a square with 26 letters and 10 digits:

You can download CrypTool 2 from here.