What it is
Vigenère uses a keyword instead of a single shift. Each keyword letter is a Caesar shift (A = 0, B = 1 … Z = 25), and the keyword repeats along the message. Because the same plain letter is shifted differently each time, counting letters no longer works the way it does for a substitution. It was published by Giovan Battista Bellaso in 1553 and later credited to Blaise de Vigenère, and it earned the name "the indecipherable cipher" until Friedrich Kasiski published a way in. Read the Archive cards The Indecipherable Cipher and Kasiski Finds the Pattern.
The tableau
Each row is the alphabet shifted by one more place. Find the keyword letter's row and the plain letter's column: where they meet is the cipher letter. To decode, go along the keyword letter's row to the cipher letter, and read the column heading.
Show the full tableau
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| B | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A |
| C | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B |
| D | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C |
| E | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D |
| F | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E |
| G | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F |
| H | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G |
| I | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H |
| J | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I |
| K | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J |
| L | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K |
| M | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L |
| N | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M |
| O | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N |
| P | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O |
| Q | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P |
| R | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q |
| S | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R |
| T | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S |
| U | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T |
| V | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U |
| W | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V |
| X | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W |
| Y | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X |
| Z | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y |
How to encode
- Write the keyword under the message, repeating it. Skip spaces and punctuation; they don't use up a keyword letter.
- Shift each letter forward by its keyword letter (A = 0).
How to break it, step by step
- Find repeats. Look for groups of three or more letters that appear twice in the cipher text.
- Measure the gaps. Count the letters from the start of one copy to the next. The keyword length usually divides those gaps.
- Split into columns. With a keyword of length n, every n-th letter was shifted the same way: each column is a plain Caesar shift.
- Solve each column, or guess a likely word (a "crib") such as THE to read keyword letters straight off.
Worked example 1: the keyword given
Keyword MOSS. The first word, BRING, encodes like this:
| Plain | Keyword letter (shift) | Cipher |
|---|---|---|
| B | M (12) | N |
| R | O (14) | F |
| I | S (18) | A |
| N | S (18) | F |
| G | M (12) | S |
The whole message: NFAFS HZW XOFLQFF LA HZW NCSLTCMKQ. To decode, shift each letter back by its keyword letter: BRING THE LANTERN TO THE BOATHOUSE.
Worked example 2: the keyword hidden
KFI KPEZL PVYZVQ EK LSFL EEB XYC XIYME PIKSVEQ EK RIE
Repeats. QEK appears at letters 14 and 38, 24 letters apart. The keyword length divides 24, so it could be 2, 3, 4, 6, 8. Try the short ones first.
A crib. Messages often start with THE. If the first three cipher letters KFI are THE, the shifts are K − T, F − H, I − E = RYE. Three letters, matching the gap.
Decode with RYE: THE TRAIN LEAVES AT NOON AND THE TRAIN RETURNS AT TEN.
Common mistakes
- Letting spaces use up keyword letters. Only letters do.
- Counting A as a shift of 1. A is 0, so a keyword with A leaves that letter unchanged.
- Trusting a single gap. Collect several repeats; the length that divides most of them wins.