Cifrado Vigenère
Cifre y descifre texto con el cifrado Vigenère y explore los cifrados clásicos.
Acerca de esta herramienta
Un conjunto completo de herramientas de cifrado clásico que incluye el cifrado Vigenère con tableau interactivo, cifrado César (desplazamiento 1–25), ROT13 y Atbash. El modo Vigenère visualiza el cuadrado 26×26, resalta las letras clave activas y muestra una tabla de codificación paso a paso. Una herramienta de análisis de frecuencia integrada 'Descifrar' ofrece pistas para romper claves Vigenère desconocidas.
Cómo usar
- 1 Paso 1: Seleccione una pestaña de modo de cifrado: Vigenère, César, ROT13 o Atbash.
- 2 Paso 2: Ingrese su texto plano (o texto cifrado) y, para Vigenère/César, proporcione la palabra clave o el valor de desplazamiento.
- 3 Paso 3: Haga clic en Cifrar o Descifrar. El resultado aparece de inmediato junto con una tabla de caracteres paso a paso.
- 4 Paso 4: Para Vigenère, utilice la pestaña 'Descifrar' para ejecutar el análisis de frecuencia y comparar la distribución de letras con las frecuencias esperadas del inglés.
The idea that makes Vigenère stronger than Caesar
A Caesar cipher shifts every letter by the same fixed amount, so the letter E always becomes the same ciphertext letter. That single, constant shift is its fatal weakness: count the letters and the most common one is almost certainly E in disguise. The Vigenère cipher defeats this by using a repeating keyword so that each position is shifted by a different amount. It is a polyalphabetic cipher — it uses many shift alphabets instead of one — which is why the same plaintext letter can encrypt to several different ciphertext letters depending on where it sits.
How the keyword drives the shifts
Write your keyword repeatedly above the message, one key letter per plaintext letter. Each key letter selects a shift: A shifts by 0, B by 1, C by 2, and so on up to Z by 25. To encrypt, add the key letter's shift to the plaintext letter (wrapping around past Z back to A). To decrypt, subtract it. Crucially, the key index advances only on alphabetic characters — spaces, digits, and punctuation pass through untouched and do not consume a key letter, and letter case is preserved. This tool visualizes the whole process with the classic 26×26 tableau (the Vigenère square), highlighting the columns that belong to your key, and prints a step-by-step table of the first 40 letters showing plaintext, key letter, shift, and result.
A worked example
Encrypt HELLO with the keyword KEY. The repeating key is K E Y K E, giving shifts 10, 4, 24, 10, 4:
H(7) + 10 = 17 → RE(4) + 4 = 8 → IL(11) + 24 = 35 mod 26 = 9 → JL(11) + 10 = 21 → VO(14) + 4 = 18 → S
So HELLO becomes RIJVS. Notice the two Ls encrypted to different letters (J and V) because they fell under different key letters — exactly the property that hides the frequency fingerprint a Caesar cipher leaves behind.
The three companion ciphers
- Caesar: a single fixed shift from 1 to 25. Simple, and its own family of 25 possible keys makes it trivially breakable by trying them all.
- ROT13: a Caesar cipher locked to a shift of 13. Because 13 is exactly half of 26, applying it twice returns the original — it is its own inverse, which is why it is used to lightly hide spoilers, not to secure anything.
- Atbash: mirrors the alphabet so
A↔Z,B↔Y, and so on. It needs no key and is also self-inverse.
How the "Crack It" analysis works
For centuries Vigenère was called le chiffre indéchiffrable ("the undecipherable cipher") until cryptanalysts learned to attack the key length. The Crack It tab gives you the two classic tools. First, a letter-frequency chart overlays your ciphertext's observed letter distribution against expected English frequencies; when a guessed key length is correct, slicing the text into columns makes each column's distribution start to resemble English. Second, it computes the Index of Coincidence (IC) — the probability that two randomly chosen letters match. English text has an IC near 0.065; uniformly random text sits near 0.038. A high IC points to a monoalphabetic cipher (Caesar or a very short key); a low IC signals a longer polyalphabetic key. The tool reports the value and a plain-language hint to steer your next guess.
Practical tips and honest limits
- Longer, word-free keys are stronger. A key as long as the message, never reused, is the unbreakable one-time pad. A short dictionary word is the easiest to crack.
- Mind what survives. Spaces and punctuation are preserved and can leak word lengths. For tougher puzzles, strip spaces and group the output into fixed blocks of five.
- It is a learning toy, not security. Vigenère has been breakable since the 19th century. Use it for puzzles, escape rooms, classroom demonstrations, and CTF challenges — never to protect real secrets, for which you should use modern encryption.