Vigenere Cipher Calculator
Example Data Table
| Example | Mode | Input Text | Key | Expected Output |
|---|---|---|---|---|
| Classic encryption | Encrypt | ATTACKATDAWN | LEMON | LXFOPVEFRNHR |
| Classic decryption | Decrypt | LXFOPVEFRNHR | LEMON | ATTACKATDAWN |
| Sentence with spaces | Encrypt | Meet me at noon | KEY | Wicd qc er xsmx |
| Case preserved | Encrypt | Hello World | Math | Teeav Iokew |
Formula Used
The Vigenere cipher shifts each plaintext letter using a repeating keyword. Letters are converted to numbers with A = 0, B = 1, through Z = 25.
Ci = (Pi + Ki) mod 26
Pi = (Ci - Ki + 26) mod 26
Here, P is the plaintext value, C is the ciphertext value, and K is the keyword letter value. The keyword repeats until all alphabetic characters are processed.
How to Use This Calculator
- Select whether you want to encrypt or decrypt.
- Enter a keyword made from letters only.
- Paste or type the text you want to process.
- Choose whether to preserve case and keep symbols.
- Enable grouping if you want block-style output.
- Press Submit to view the result above the form.
- Review the detailed step table and graph.
- Download the output as CSV or PDF if needed.
Frequently Asked Questions
1. What does the Vigenere cipher do?
It encrypts text by shifting each letter using a repeating keyword. Unlike a Caesar cipher, the shift changes across positions, making patterns less obvious.
2. Why is a keyword required?
The keyword controls the sequence of letter shifts. Each keyword letter maps to a numeric shift from 0 to 25 and repeats across the message.
3. Can this tool decrypt ciphertext too?
Yes. Switch the mode to decrypt, enter the same keyword, and the tool reverses each shift to recover the original plaintext.
4. What happens to spaces and punctuation?
If the preserve symbols option is enabled, spaces, digits, and punctuation stay unchanged. Only letters participate in the cipher operation.
5. Is the Vigenere cipher secure today?
It is useful for learning classical cryptography, but it is not secure for modern protection. Frequency analysis and known attacks can break weak implementations.
6. Why does grouped output remove spaces?
Grouping creates fixed-size letter blocks commonly used in classical cipher presentation. It formats only letters into clusters for easier reading and comparison.
7. What does the graph show?
The graph compares letter frequencies before and after processing. It helps visualize how the keyword changes alphabet distribution in the message.
8. Can I use lowercase input?
Yes. The tool accepts uppercase and lowercase letters. When case preservation is enabled, the output keeps the original letter case style.