CYRUNE

Autokey cipher

The autokey cipher shifts each letter like the Vigenère cipher, but instead of repeating a short keyword, the message itself becomes the key after a short starter, the primer.

Difficulty in Cyrune: ★★★☆☆

A little history

This is the cipher Blaise de Vigenère actually described in his 1586 book on ciphers. The Italian scholar Girolamo Cardano had suggested using the message as its own key a few decades earlier, but his version was flawed. Vigenère fixed it with a primer: a short secret start to the key. Ironically, the cipher that now carries Vigenère's name, with its repeating keyword, was described earlier by Giovan Battista Bellaso.

How it works

  1. Choose a primer, for example KO.
  2. Build the key: the primer followed by the message itself, as long as the message.
  3. Shift each message letter by its key letter (A = 0, B = 1 … Z = 25).
MessageSPIES
KeyKOSPI
CipherCDATA
Worked example: primer KO
MessageSPIES
Key (primer + message)KOSPI
CipherCDATA

S + K = C, P + O = D, then the message takes over: I + S = A, E + P = T, S + I = A.

To decrypt, you start with the primer: it reveals the first letters, which then serve as the key for the next ones, and so on down the chain.

How to crack it

Autokey avoids the Vigenère cipher's biggest weakness: there's no repeating keyword, so the patterns Kasiski and Babbage used don't appear. But the key is made of ordinary English text, and that is its undoing. A codebreaker guesses a common word somewhere in the message, works out what part of the key that implies, and checks whether that key also reads as English. Short primers can simply be tried one by one.

Autokey in Cyrune

Cyrune uses a two-letter primer. The first primer letter unlocks letters 1, 3 and 5 in a chain; the second unlocks 2 and 4. A wrong primer letter garbles everything after it in its chain, so a decode that starts well and then falls apart means you're close. A green tile confirms a chain.

Related ciphers