Autokey cipher

Vigenère's autokey: a short primer followed by the plaintext itself as the key, so the key never repeats.

How it works

Vigenère himself proposed this stronger form in 1586. The key starts with a short primer and then continues with the message: with primer QUEENLY, the key for ATTACKATDAWN is QUEENLYATTAC, and adding the letters modulo 26 gives QNXEPVYTWTWP.

To decrypt, the receiver uses the primer for the first letters; every plain letter found becomes a key letter a little later. Since the key never repeats, the Kasiski method and the index of coincidence have no period to find.

It is still weak: the key is the plaintext itself, so it has the statistics of English. Guessing a probable word somewhere in the message reveals plain letters a primer length further on, and the whole text unravels from there.

Everything is calculated in your browser. Nothing you type leaves your device.