Vigenere Cipher Examples & Tutorials
Learn Vigenere encryption and decryption with short examples, letter-by-letter alignment, a decrypt example, and practice exercises.
Vigenere Cipher Examples & Tutorials
Learn through historical cases and guided practice
Historical Examples
Civil War Telegram (1863)
BeginnerUnion Army communications
Union and Confederate forces both relied on repeating-key ciphers for sensitive wartime messages.
ATTACK AT DAWN STOP
UNION
UGBOUS UG PIQR FGCF
Renaissance Diplomatic Code
IntermediateMedici family communications
Italian courts and merchant networks used polyalphabetic techniques to hide trade and political information.
THE GOLD IS HIDDEN IN THE TOWER
MEDICIS
FVS SMZP WE VCQPIQ VZ FVS ESMSG
French Diplomatic Cipher
AdvancedCourt of Louis XIV
French diplomats used structured codebooks and ciphers to protect negotiations and court correspondence.
TREATY NEGOTIATIONS PROCEED AS PLANNED
VERSAILLES
OPIGTS ZQKEFYYFYEE PHMOQSR YE DLEZZQR
Confederate Secret Message
IntermediateSouthern intelligence network
Repeating-key ciphers were practical for field agents coordinating supplies and movements.
SUPPLIES NEEDED WINTER QUARTERS
RICHMOND
JYTRLCQJ FQQPQP KCZFQD IYEDTSDJ
Practice Exercises
Basic Encryption
BeginnerChallenge:
Use the key "KEY" to encrypt "HELLO". Repeat the key until every letter is covered.
Short Message
BeginnerChallenge:
The key "LEMON" repeats as LEMONL for "MEET ME".
Longer Text
IntermediateChallenge:
Apply the key "CIPHER" repeatedly across the entire phrase.
Historical Quote
IntermediateChallenge:
This quote is often linked to Francis Bacon. Use "BACON" as the key.
Complex Message
AdvancedChallenge:
A longer key makes the cipher harder to analyze. Use "RENAISSANCE".
What is a simple example of a Vigenere cipher?
A classic example is encrypting HELLO with the key KEY to produce RIJVS.
How do you use the Vigenere cipher step by step?
Choose a keyword, repeat it across the plaintext, and combine each plaintext letter with the matching key letter using the Vigenere table.
Why are examples useful for learning Vigenere?
Examples make the repeated-key pattern visible and help you connect the table lookup with the resulting ciphertext.
What is a good Vigenere decrypt example?
RIJVS with the key KEY decrypts to HELLO. This short example shows that decryption subtracts the same shifts that encryption added.
Vigenere Cipher Examples
Short examples are the fastest way to see how Vigenere differs from Caesar. The key repeats over the letters, and each plaintext/key pair chooses a different shift.
Example 1: Encrypt HELLO With KEY
Plaintext: H E L L O
Key: K E Y K E
Shift: 10 4 24 10 4
Cipher: R I J V S
Result: HELLO encrypted with KEY is RIJVS.
Letter-by-letter:
| Plain | Key | Shift | Cipher |
|---|---|---|---|
| H | K | 10 | R |
| E | E | 4 | I |
| L | Y | 24 | J |
| L | K | 10 | V |
| O | E | 4 | S |
The two L letters become J and V because they use different key letters.
Example 2: Encrypt ATTACKATDAWN With LEMON
This is the classic classroom example:
Plaintext: A T T A C K A T D A W N
Key: L E M O N L E M O N L E
Cipher: L X F O P V E F R N H R
Result: ATTACKATDAWN -> LXFOPVEFRNHR
With spaces preserved for readability:
ATTACK AT DAWN -> LXFOPV EF RNHR
Example 3: Decrypt RIJVS With KEY
Decryption subtracts the same shifts:
Cipher: R I J V S
Key: K E Y K E
Shift: 10 4 24 10 4
Plaintext: H E L L O
Result: RIJVS decrypted with KEY is HELLO.
| Cipher | Key | Shift | Plain |
|---|---|---|---|
| R | K | 10 | H |
| I | E | 4 | E |
| J | Y | 24 | L |
| V | K | 10 | L |
| S | E | 4 | O |
Example 4: A Phrase With Spaces
Most Vigenere tools leave spaces and punctuation in place. The key advances only on letters:
Plaintext: MEET ME
Key: LEMO NL
Cipher: XIQH ZP
Result: MEET ME encrypted with LEMON is XIQH ZP.
How to Work Examples by Hand
- Write the plaintext.
- Repeat the keyword under the letters.
- Ignore spaces and punctuation when advancing the key.
- Add shifts for encryption or subtract shifts for decryption.
- Check repeated plaintext letters; they should often become different ciphertext letters.
Historical and Classroom Use
Vigenere examples are common in:
- cryptography courses, where they introduce modular arithmetic and polyalphabetic substitution
- CTF challenges, where solvers must identify the cipher and recover the key
- escape-room puzzles, where the keyword can be hidden as a separate clue
- historical cryptography lessons, where students compare Vigenere with Caesar and later machine ciphers
Practice Examples
Try these by hand or in the encoder:
| Task | Text | Key | Expected result |
|---|---|---|---|
| Encrypt | CAT | DOG | FON |
| Encrypt | HELLO | KEY | RIJVS |
| Decrypt | RIJVS | KEY | HELLO |
| Encrypt | MEET ME | LEMON | XIQH ZP |
Frequently Asked Questions
What is the simplest Vigenere example?
Encrypting HELLO with KEY is a good first example because the key repeats as KEYKE and produces the well-known result RIJVS.
Why do repeated letters encrypt differently?
The key letter changes the shift at each position. A repeated plaintext letter can align with different key letters, so it can produce different ciphertext letters.
Do spaces count when repeating the key?
In most educational implementations, no. Spaces and punctuation are preserved, and the key advances only when a letter is encrypted or decrypted.
What is a good decrypt example?
RIJVS with key KEY decrypts to HELLO. It is short enough to check by hand and shows that decryption subtracts the same shifts used for encryption.
Related Tools
- Encrypt your own text with the Vigenere cipher encoder
- Analyze unknown-key ciphertext with the Vigenere decoder
- Follow row and column lookup on the Vigenere table
Conclusion
Good Vigenere examples make three ideas visible: the repeating key, the per-letter shift, and the way decryption reverses encryption. Once those are clear, longer ciphertext and key-recovery methods are easier to understand.