Skip to main content
CipherChronicle

Cipher methods Polyalphabetic

Autokey cipher

A Vigenère whose key is extended by the plaintext itself. Removes periodicity — and with it, Kasiski's attack.

Family :
Polyalphabetic
Difficulty :
Intermediate
Era :
1586, Blaise de Vigenère
Inventor :
Blaise de Vigenère

Also known as : autoclave · Vigenère autokey

The Autokey cipher is a direct upgrade of Vigenère proposed by Blaise de Vigenère in 1586 — the real innovation we owe him, beyond the cipher that bears his name. The idea is simple but powerful: use the plaintext itself as key extension, killing the periodicity that dooms Vigenère.

Principle

The key has two parts:

  1. A short primer key (for instance KEY), shared between the correspondents.
  2. The plaintext that follows, used letter-by-letter to extend the key.

So, to encrypt CIPHERCHRONICLE with the primer KEY, the full key becomes:

Plain : C I P H E R C H R O N I C L E
Key   : K E Y C I P H E R C H R O N I

The formula stays Vigenère’s: C_i = (P_i + K_i) mod 26. But each plaintext letter immediately becomes the key for the next one, on a lag equal to the primer length.

Example

With primer KEY and plaintext CIPHERCHRONICLE:

C+K=M  I+E=M  P+Y=N  H+C=J  E+I=M
R+P=G  C+H=J  H+E=L  R+R=I  O+C=Q
N+H=U  I+R=Z  C+O=Q  L+N=Y  E+I=M

Result: MMNJMGJLIQUZQYM. No repetition is visible: the key keeps shifting with the message’s content.

Variants

  • Ciphertext autokey — same idea, but the key is extended by the ciphertext rather than the plaintext. Weaker (the attacker sees future key material as soon as he has the ciphertext).
  • Self-shifting stream ciphers — modern numeric variants apply the idea to stream encryption.

Weaknesses

Periodicity is gone, so Kasiski and the index of coincidence fail. But:

  • The primer stays short. An attacker who guesses or brute-forces the primer (say 3 letters = 17 576 tries) decodes the rest for free.
  • Probable-word attacks: if the text likely contains a common word (THE, AND, OF), try its placement and derive portions of key material.
  • Back-propagation: once a few plaintext letters at the start are known, the rest falls in cascade.

Autokey therefore shifts the attack: no longer about breaking statistics, but about guessing the primer.

In CipherChronicle

Autokey rewards linguistic intuition: cold statistics alone won’t do. Grids built on it can play with short primers where recovering the first three or four letters triggers the whole cascade.

Grid

M
M
N
J
M
G
J
L
I
Q
U
Z
Q
Y
M
Q
R
S
T
U
V
W
X
Y
Z
KeyK = KEY (then extended with the plaintext)
  1. 1

    Ciphertext

    Flat distribution with no periodic repetition — Kasiski yields nothing.

  2. 2

    Short-key guess

    The attacker must guess the initial primer, not derive it statistically.

  3. 3

    Primer « KEY » + plaintext

    The key becomes KEY + C + I + P + H + E + R + C + H + R + O + N + I = KEYCIPHERCHRONI.

  4. 4

    Cascade decryption

    Each recovered letter immediately extends the key for the next one.

  5. 5

    Message revealed

    The plaintext self-builds as the key self-extends.