Herramienta de Cifrado Vigenère
Cifre y descifre texto con el cifrado polialfabético de Vigenère utilizando una palabra clave proporcionada por el usuario que desplaza cada letra en una cantidad variable. Flujo de alineación de clave en vivo, visualización de tabula recta, variantes de Autoclave y Beaufort, prueba de ida y vuelta y pista del período de Kasiski.
Tu bloqueador de anuncios impide que mostremos anuncios
MiniWebtool es gratis gracias a los anuncios. Si esta herramienta te ayudó, apóyanos con Premium (sin anuncios + herramientas más rápidas) o añade MiniWebtool.com a la lista de permitidos y recarga la página.
- O pásate a Premium (sin anuncios)
- Permite anuncios para MiniWebtool.com y luego recarga
Herramienta de Cifrado Vigenère
This Vigenère Cipher Tool encrypts and decrypts text using the polyalphabetic cipher that resisted cryptanalysis for nearly 300 years. Type any message and a keyword, and you instantly get the ciphertext along with a vertically-stacked key-alignment stream that shows plaintext, key, and cipher letter together — so you can see why every letter changed. The tool also exposes the original Autokey variant, the reciprocal Beaufort variant used in the WWII Hagelin M-209, a round-trip proof, and a 26×26 tabula recta for hand verification.
The Step-by-Step Idea
Take the plaintext ATTACKATDAWN and the keyword LEMON. Repeat the keyword underneath until it covers the plaintext, then add the two letters position-by-position (A=0, B=1, …, Z=25), reducing modulo 26.
Reading the green row gives the ciphertext LXFOPVEFRNHR. The key letter L shifts A by 11 positions (A→L), E shifts T by 4 (T→X), and so on. The same plaintext letter A appears three times but encrypts to three different letters (L, O, E) — that is the polyalphabetic property and the reason Vigenère defeats single-letter frequency analysis.
The Math in One Line
Number the alphabet A=0 through Z=25. Let \( p_i \) be the i-th plaintext letter and \( k_i \) be the corresponding key letter (the keyword cycles, so \( k_i = K_{i \bmod n} \) where \( n \) is the key length). Then:
Encrypt: \( c_i = (p_i + k_i) \bmod 26 \) · Decrypt: \( p_i = (c_i - k_i) \bmod 26 \)
For the Beaufort variant the same one-line formula \( c_i = (k_i - p_i) \bmod 26 \) handles both directions. For the Autokey variant the key becomes \( k_1, k_2, \dots, k_n, p_1, p_2, \dots \) — the plaintext itself extends the key once the keyword runs out.
Three Variants Explained
The Tabula Recta (Vigenère Square)
The classical way to apply Vigenère is to look up each letter in a 26×26 table where row r is the alphabet rotated by r positions. Find the key letter's row, find the plaintext letter's column — the cell at the intersection is the ciphertext letter. To decrypt, find the key row, scan across to the ciphertext letter, then read the column header.
| · | 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 |
Row label = key letter. Column header = plaintext letter. Cell content = ciphertext letter. Example: row L, column A → L. Row E, column T → X.
How to Use the Vigenère Cipher Tool
- Paste your plaintext (to encrypt) or ciphertext (to decrypt) into the input box. The live key-alignment stream on the right shows plaintext, key letter, and resulting cipher letter stacked vertically, so the per-letter shift is obvious at a glance.
- Type a keyword in the Keyword field. Non-letters are stripped automatically. Watch the orange keyword chip cycle as letters are consumed, and the "latest pair" magnifier expand the most recent plain + key = cipher triple.
- Pick the Mode (Encrypt or Decrypt) and the Variant (Vigenère, Autokey, or Beaufort). Beaufort is self-inverse, so the mode does not change its output.
- Click Apply Vigenère. The full output appears below with a per-letter shift trace, statistics (key length, period, coverage), a round-trip proof, and a side-by-side cipher lab comparing every variant on the same input.
- Use the Copy buttons to grab the ciphertext, the original, or the keyword. To decrypt, paste the ciphertext, switch Mode to Decrypt with the same keyword, and click again.
Vigenère vs Caesar vs Atbash vs ROT13 — Quick Reference
| Cipher | Type | Key | Self-inverse | "HELLO" with key LEMON |
|---|---|---|---|---|
| Vigenère | Polyalphabetic substitution | Keyword (1+ letters) | No (use Decrypt) | SIXZB |
| Caesar (shift 3) | Monoalphabetic rotation | Single shift | No | KHOOR |
| ROT13 | Rotation (fixed 13) | None (fixed) | Yes | URYYB |
| Atbash | Reflection | None (fixed) | Yes | SVOOL |
| Beaufort | Polyalphabetic reciprocal | Keyword | Yes | EABDZ |
Why Vigenère Was Called "Le Chiffre Indéchiffrable"
For nearly three centuries after Bellaso first published it in 1553, Vigenère was considered uncrackable. A single plaintext letter could encrypt to up to 26 different ciphertext letters depending on its position, so the flat-frequency assumption that breaks Caesar (English E is the most common letter) no longer worked. Charles Babbage broke it in the 1850s but did not publish; Friedrich Kasiski independently published the attack in 1863. The key insight: the keyword repeats, so the same plaintext substring at positions that differ by a multiple of the key length produces the same ciphertext. Find the spacing of repeated trigrams, take the greatest common divisor, and you have a strong candidate for the key length. Once the key length is known, Vigenère decomposes into n parallel Caesar ciphers, each of which falls to frequency analysis.
The Kasiski Examination — How Vigenère Falls
- Scan the ciphertext for repeated 3-letter or 4-letter sequences.
- Record the distance between every pair of repeats.
- Take the greatest common divisor of those distances — the key length almost always divides this GCD.
- Split the ciphertext into n columns (every n-th letter). Each column is a Caesar cipher.
- For each column, find the letter shift that maximizes the index of coincidence or matches English letter frequencies. That shift is one key letter.
Try the "Kasiski-vulnerable" quick example to see this: the input repeats "The quick brown fox", and the key is only 3 letters, so the same words encrypt the same way both times — a flashing neon sign for a Kasiski analyst.
The Babbage / Kasiski / Friedman Family of Attacks
- Babbage (1850s, unpublished). Found that repeated patterns betray the key length.
- Kasiski (1863). Published the same idea: distance between repeats is a multiple of the key length.
- Friedman (1922). Introduced the Index of Coincidence — a statistical measure that, for the right column split, peaks at ~0.067 (English) instead of the random ~0.038.
- Modern computers. Run all key lengths from 1 to 30, compute the IC for each column split, pick the length whose split has the highest average IC. Then frequency-attack each column. Total time: milliseconds.
Security Notice
Vigenère is not modern encryption. A 5-letter keyword is broken in milliseconds by Kasiski, and a 20-letter keyword falls to a few seconds of automated analysis. Even Autokey, which removes the periodicity weakness, is vulnerable to known-plaintext attacks and to probable-word attacks on the keyword prefix. Never use Vigenère to protect passwords, personal data, financial information, or anything that should stay confidential. For real protection use AES-256, ChaCha20, RSA, or libsodium. Treat Vigenère as a way to obscure text — for puzzles, CTFs, teaching, and historical demonstrations — not to secure it.
Tips for Best Results
- To decrypt, paste the ciphertext, type the same keyword, and switch Mode to Decrypt. The same tool both encrypts and decrypts.
- For the Beaufort variant, the mode does not matter — applying Beaufort twice with the same key returns the original.
- If you only care about letters (no spaces or punctuation in the output), untick "Preserve original case" — the input is normalized to UPPER before ciphering and the output is uppercase only.
- Spaces and punctuation in the input pass through unchanged. To hide word boundaries from a casual reader, strip them yourself before pasting.
- Use the Cipher lab to see how the same key behaves across all three variants — Autokey usually produces output very different from classic Vigenère after the first n letters, because the key stream changes.
FAQ
What is the Vigenère cipher?
The Vigenère cipher is a polyalphabetic substitution cipher that shifts each plaintext letter by a different amount determined by a repeating keyword. If the key letter is K (the 11th letter), the plaintext letter is shifted forward by 10 positions. The cipher was described by Giovan Battista Bellaso in 1553 and later misattributed to Blaise de Vigenère, whose name stuck.
How is Vigenère different from Caesar or Atbash?
Caesar uses a single fixed shift for every letter — a one-letter Vigenère key is exactly Caesar. Vigenère uses a different shift for every position, taken from a repeating keyword — which is why the same plaintext letter can encrypt to several different ciphertext letters. Atbash is a fixed reflection (A↔Z, B↔Y) with no key. Vigenère is much harder to break by single-letter frequency analysis because the key smooths out the letter frequencies.
Is Vigenère secure for real encryption?
No. Friedrich Kasiski cracked Vigenère in 1863 by exploiting the periodicity of the repeating keyword. Modern computers break Vigenère instantly using the Friedman test (index of coincidence) and Kasiski examination. Use AES-256, ChaCha20, or libsodium for real protection; Vigenère is for puzzles, CTFs, and teaching.
What is the Autokey variant?
Autokey extends the keyword by appending the plaintext itself, so the key stream never repeats. Vigenère proposed this in 1586 to defeat the very weakness Kasiski would later exploit. Autokey is much harder to break than classic Vigenère but is still vulnerable to known-plaintext attacks and to probable-word attacks on the keyword prefix.
What is the Beaufort variant?
The Beaufort cipher uses the operation ciphertext = (key − plaintext) mod 26, which makes it its own inverse — encrypting twice with the same key returns the original. It was named after Sir Francis Beaufort and was the cipher behind the Hagelin M-209, a portable mechanical cipher machine used by the US Army in WWII.
How long should my keyword be?
Longer is much better. A one-letter key reduces Vigenère to a Caesar cipher. A short key (3–5 letters) is broken in seconds by Kasiski. A key the same length as the message and used only once is a one-time pad — provably unbreakable. For puzzles and teaching, a keyword of 6–12 letters is the usual choice.
Cite este contenido, página o herramienta como:
"Herramienta de Cifrado Vigenère" en https://MiniWebtool.com/es// de MiniWebtool, https://MiniWebtool.com/
por el equipo de MiniWebtool. Actualizado: 2026-05-26