The Vigenère Cipher

From the Buttcrack Cipher Wiki — the free field guide to classical ciphers

Try this cipher → Load its worked example and preselect its method.

Reading tools:
Vigenère cipher tableau
Vigenère cipher tableau. Publicly available through Wikimedia Commons; see the source page for the author and license.

A Caesar shift that changes every letter§

Vigenère assigns each keyword letter a shift. With the key LEMON, the shifts 11, 4, 12, 14 and 13 repeat across the message. The same plaintext letter may therefore encrypt to different ciphertext letters. This defeats the simple “most common letter is E” reasoning that breaks Caesar immediately.

Find the period before the key§

If the key has five letters, take every fifth ciphertext character. Each resulting column was encrypted by one fixed Caesar shift. The attack is therefore: propose a key length, split into columns, and measure whether each column behaves like English. The average index of coincidence rises when the proposed period is a multiple of the real period.

Recover and refine§

Once the period is known, compare each column's letter frequencies with expected English frequencies to choose a shift. That produces a first key. On short texts, refine it by changing one key letter at a time and rescoring the whole plaintext: language model context resolves columns too sparse for frequency analysis alone.

Limits of the method§

Short messages and long keys leave too few letters in each column. A period that is a multiple of the true key can also look convincing; prefer the shortest key that explains the text. Variants such as Beaufort use a different algebraic direction but retain the same repeating-period weakness.

For a cipher that uses one fixed alphabet instead, see the substitution cipher guide.

Frequently asked questions§

Why was Vigenère called unbreakable?

It hides ordinary letter frequencies better than a single substitution. Before the period was understood, analysts could not tell which of several shifts had enciphered each E. The repeated keyword is the weakness that eventually made systematic attacks possible.

What is Kasiski examination?

Repeated ciphertext fragments can result from repeated plaintext fragments aligned under the same part of the keyword. Distances between them often share factors with the key length. It suggests periods to test; it does not recover the key on its own.

What makes a Vigenère cipher genuinely secure?

If the key is truly random, as long as the message, used once and kept secret, the construction is a one-time pad. A repeating dictionary word is the critical flaw in ordinary Vigenère.

The facts in this article are generated from buttcrack's cipher registry when the site is built, so they describe the implementation you can run on this page. Registry-generated content is checked against the code; the history is editorial.

Try it live — break a real puzzle

Private by design

Paste a puzzle. Explore a reading.

Runs on this device

Paste text and press Solve. Ctrl / ⌘ + Enter works too.

Advanced settings & examples

Auto-detect ranks English-looking candidates, not probabilities. A selected method never silently falls back to a different cipher.

Limits & verification boundaries

The browser tries selected classical methods, English statistical scoring and encoding layers. It also recognizes PK1–PK10 by exact normalized corpus equality. It cannot break properly implemented AES/RSA or prove an intended plaintext by a high score. Many wiki methods are only reference demonstrations here; their key-recovery attacks require the full version.

A supplied-key reading is arithmetic under your assumption, not independent confirmation. A worked-example reference is labelled as a build-time lookup, never a newly recovered answer. Rankings show actual returned candidates from a bounded search, which may contain fewer than five.

No analysis upload or account. Nothing is saved unless you choose Save below. This hosted page includes third-party advertising; use a locally served/offline copy for sensitive work.

Solver interface improvements

  • Mobile-first input and solve action, with compact navigation.
  • Simple by default; settings, candidate rankings, statistics and manual controls expand on demand.
  • Every cipher article has a Try this cipher action with its real method and full worked example.
  • Optional named investigations let you save, compare and restore attempts on your own device.
  • Explicit live-operation/reference labels, snapshot boundaries and no automatic text saving.
Optional local investigations — save, compare & restore

Explicit device-only storage, no account or cloud sync. Saved snapshots contain ciphertext, plaintext and keys; browser storage is not encrypted. Deleting browser data removes them. Restore does not run a new search or independently verify an old result.

No automatic text or result saving.

This tool is free and has no account, no upload, no tracking of your text

Everything runs in your browser. If it saved you time, keeping it alive costs nothing but a click.