Recently for a challenge site I cracked a classical Nihilist cipher. These ciphers use an alphabet written into a 5 x 5 block. Addresses of each letter are used for the cipher, such as 11
, 45
, etc. Any order can be used, with no repetition. The alphabet usually starts with a keyword.
1 2 3 4 5
1 E X A M P
2 L B C D F
3 G H I J K
4 N O Q R S
5 T U V W Y
A key is chosen, say obfuscate
, which is coded using the addresses: 42 22 25 52 45 23 13 51 11
. Then, the plain text is coded: LEAVE AT SUNDOWN
becomes 21 11 13 53 11 13 51 45 52 41 24 42 54 41
(no spaces).
To generate the cipher text, the code of the key is added to the corresponding position in the text. The key is repeated as necessary. So, the cipher text for the above example is 63 33 38 105 56 36 64 96 63 83 46 67 106 86
.
To crack the cipher text turned out to be a lot of fun. I was provided the plain text for the first 15 characters or so, which made it a bit easier to generate the alphabet block. Some of the things I noticed on the way:
89
, there are only a limited combination of two digit numbers from 1, 2, 3, 4, 5
that will make that number. This narrows down choices significantly: 89
can be made only from 45 + 44
22
and 110
are especially critical since they're undoubtedly the corners of the alphabet block. They indicate that the letter of the key is the same as the letter of the plaintext in those locations.
76
, for example, the minimum is 21
, and the maximum is 55
, a (large) range of 20 choices. Some numbers have smaller ranges and \"hint\" at solutions.
2
or 0
as the second digit is interesting because they are limited to the first or last columns, respectively.
Surprisingly, I didn't program a solver, but went with the pen and paper approach. The solution had a nine-letter key. I suppose longer keys would make for easier cracking, but I'm not sure.
The Nihilist cipher, by the way, is a close relative of the Vigenere cipher, which does very much the same thing only using letters and a larger alphabet block.
Happy solving!