The Autokey Vigenère Cipher is an advanced polyalphabetic cipher that builds upon the classic Vigenère Cipher by incorporating an autokey mechanism. Instead of repeating a short keyword cyclically, the key is extended by appending the plaintext itself after the initial keyword. This produces a variable-length key, reducing repeating patterns in ciphertext and making frequency analysis considerably more difficult than in the standard Vigenère system.

Conceptually, the Autokey Vigenère Cipher combines the letter-shifting principles of the Vigenère Cipher with the dynamic key extension of the Autokey Cipher. Each plaintext letter is shifted according to the corresponding key letter, and as letters of the plaintext are appended to the key, the encryption sequence becomes unique for every message.

Autokey Vigenère Cipher: Encoding

To encode a message, select a keyword and append the plaintext to it to form the full key. Then shift each plaintext letter according to the key letter:

Plaintext: H  E  L  L  O
Keyword:   K  E  Y  H  E
Numeric:   H=7, E=4, L=11, L=11, O=14
           K=10, E=4, Y=24, H=7, E=4
Shift:     (H+K) mod 26 = 17 → R
           (E+E) mod 26 = 8  → I
           (L+Y) mod 26 = 9  → J
           (L+H) mod 26 = 18 → S
           (O+E) mod 26 = 18 → S

Ciphertext: RIJSS

After the initial keyword, the plaintext itself extends the key, creating a non-repeating polyalphabetic sequence.

Autokey Vigenère Cipher: Decoding

Decoding requires the initial keyword. Each ciphertext letter is reversed by subtracting the key letter’s numeric value. Recovered plaintext letters are appended to the key to continue decryption:

Ciphertext: R  I  J  S  S
Keyword:    K  ?  ?  ?  ?
Decoding:
R-K = 17-10 = 7 → H
I-E = 8-4  = 4 → E
J-Y = 9-24 = 11 → L
S-H = 18-7 = 11 → L
S-E = 18-4 = 14 → O

Plaintext: HELLO

Autokey Vigenère Cipher: Notes

The Autokey Vigenère Cipher improves on the standard Vigenère Cipher by avoiding keyword repetition, making cryptanalysis more difficult. It is historically significant as an early demonstration of key extension for polyalphabetic ciphers. For enhanced context, it can be compared to the Running Key Cipher, which also uses long, message-dependent keys, but from an external source rather than the plaintext itself.

Autokey Vigenère Cipher