Vigenère Autokey Cipher
Use plaintext autokey, where a keyword starts the key stream and message letters continue it. This page starts with ATTACKATDAWN and QUEENLY, producing QNXEPVYTWTWP. The steps show exactly when keyword letters give way to plaintext; swap the result into the box to verify decoding.
- Cipher
- Mode
- Key
- Autokey
Each letter of the key shifts one letter of the message, and the key repeats for as long as the message lasts. Letters A to Z shift; spaces, punctuation, digits, accented letters and emoji pass through untouched, and they do not use up a key letter.
Vigenère calculation steps
A = 0 through Z = 25. Add the key position, then wrap modulo 26. Showing the first 48 letters; spaces and punctuation do not advance the key.
| Letter | Input | Key | Source | Arithmetic | Output |
|---|---|---|---|---|---|
| 1 | A | Q | keyword | 0 + 16 mod 26 = 16 | Q |
| 2 | T | U | keyword | 19 + 20 mod 26 = 13 | N |
| 3 | T | E | keyword | 19 + 4 mod 26 = 23 | X |
| 4 | A | E | keyword | 0 + 4 mod 26 = 4 | E |
| 5 | C | N | keyword | 2 + 13 mod 26 = 15 | P |
| 6 | K | L | keyword | 10 + 11 mod 26 = 21 | V |
| 7 | A | Y | keyword | 0 + 24 mod 26 = 24 | Y |
| 8 | T | A | plaintext | 19 + 0 mod 26 = 19 | T |
| 9 | D | T | plaintext | 3 + 19 mod 26 = 22 | W |
| 10 | A | T | plaintext | 0 + 19 mod 26 = 19 | T |
| 11 | W | A | plaintext | 22 + 0 mod 26 = 22 | W |
| 12 | N | C | plaintext | 13 + 2 mod 26 = 15 | P |
This workflow needs the keyword. Unknown-key Vigenère solving requires separate cryptanalysis; the Caesar ranking applies to a single repeating shift.
The tabula recta
The row is the key letter, the column is the plaintext letter, and the cell where they meet is the ciphertext letter. The keyword begins the key stream and plaintext continues it. Rows used by either part of that stream are highlighted.
| Key letter | 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 |
Common questions
- How is autokey different from repeating-key Vigenère?
- A repeating key restarts the keyword whenever it runs out. Plaintext autokey continues with the message letters instead. With QUEENLY, the first seven letters use the keyword and later letters use the beginning of the plaintext.
- How do I decode plaintext autokey?
- Choose Decode, paste the ciphertext and enter the starting keyword. Each recovered plaintext letter becomes available for a later key position. QNXEPVYTWTWP with QUEENLY decodes to ATTACKATDAWN.
- Do spaces advance the autokey stream?
- No. Only A to Z letters consume key positions. Spaces, punctuation, digits, accented letters and other scripts pass through in place.
- Does this support ciphertext autokey or running-key ciphers?
- The switch implements plaintext autokey. Ciphertext autokey and running-key variants use different key streams and are not implemented here.
- Can this find an unknown starting keyword?
- No. The keyword is supplied by you. The visible steps verify the chosen arithmetic and do not perform keyless cryptanalysis.
Exact for the classical ciphers as defined: letters shift, everything else passes through and, in Vigenère, does not consume a key letter. The Caesar cracker ranks shifts by English letter frequency and is a guess, shown as one.