1001Ferramentas
🔐Security

Vigenère Autokey Cipher Encoder and Decoder

Enciphers or deciphers text with the classic autokey variant, where the plaintext extends the keyword instead of repeating it. Letters A to Z only.

Result

Vigenère autokey: the message becomes its own key

Ordinary Vigenère repeats the keyword until it covers the text, and that repetition is what Kasiski's method exploits. The autokey variant, proposed by Vigenère himself in the sixteenth century, removes the problem at the root: the key starts with the agreed word and continues with the plaintext itself. Since the message does not repeat, the periodic pattern disappears.

Enter the key and the text and choose the direction. When enciphering, the effective key is the word followed by the plaintext, truncated to the message length. Deciphering does something elegant: each recovered letter immediately joins the key to decipher the next, so the process feeds on what has already been solved — which is why deciphering must start at the beginning and run in order.

Resistance is greater than periodic Vigenère's, but it is not immune. The key becomes natural-language text, with all the statistical structure that carries, and attacks exist that exploit exactly that, testing probable stretches. Note too that a transmission error mid-message contaminates everything after it, since the key depends on the recovered text.

Frequently asked questions

Why does Kasiski fail here?
Because the method hunts for repetitions arising from periodic key reuse. Without key repetition, an identical plaintext stretch at different positions is enciphered by different parts of the key and produces different output. There is no multiple distance to measure.
Is there a variant using the ciphertext as key?
There is, the ciphertext autokey. It is considered weaker: the key becomes material the adversary already holds, which opens direct attacks. The plaintext version, the one on this page, is the preferred one.
What happens if I get a letter wrong?
When enciphering, only that letter comes out wrong. When deciphering it is far worse: since the recovered letter joins the key, an error propagates from that point onwards and everything after it is unreadable. That is a serious practical weakness over a noisy channel.

Related Tools