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)

Beginner

Union Army communications

Union and Confederate forces both relied on repeating-key ciphers for sensitive wartime messages.

Plain

ATTACK AT DAWN STOP

Key:

UNION

Cipher

UGBOUS UG PIQR FGCF

Renaissance Diplomatic Code

Intermediate

Medici family communications

Italian courts and merchant networks used polyalphabetic techniques to hide trade and political information.

Plain

THE GOLD IS HIDDEN IN THE TOWER

Key:

MEDICIS

Cipher

FVS SMZP WE VCQPIQ VZ FVS ESMSG

French Diplomatic Cipher

Advanced

Court of Louis XIV

French diplomats used structured codebooks and ciphers to protect negotiations and court correspondence.

Plain

TREATY NEGOTIATIONS PROCEED AS PLANNED

Key:

VERSAILLES

Cipher

OPIGTS ZQKEFYYFYEE PHMOQSR YE DLEZZQR

Confederate Secret Message

Intermediate

Southern intelligence network

Repeating-key ciphers were practical for field agents coordinating supplies and movements.

Plain

SUPPLIES NEEDED WINTER QUARTERS

Key:

RICHMOND

Cipher

JYTRLCQJ FQQPQP KCZFQD IYEDTSDJ

Practice Exercises

Basic Encryption

Beginner

Challenge:

Use the key "KEY" to encrypt "HELLO". Repeat the key until every letter is covered.

Short Message

Beginner

Challenge:

The key "LEMON" repeats as LEMONL for "MEET ME".

Longer Text

Intermediate

Challenge:

Apply the key "CIPHER" repeatedly across the entire phrase.

Historical Quote

Intermediate

Challenge:

This quote is often linked to Francis Bacon. Use "BACON" as the key.

Complex Message

Advanced

Challenge:

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:

PlainKeyShiftCipher
HK10R
EE4I
LY24J
LK10V
OE4S

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.

CipherKeyShiftPlain
RK10H
IE4E
JY24L
VK10L
SE4O

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

  1. Write the plaintext.
  2. Repeat the keyword under the letters.
  3. Ignore spaces and punctuation when advancing the key.
  4. Add shifts for encryption or subtract shifts for decryption.
  5. 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:

TaskTextKeyExpected result
EncryptCATDOGFON
EncryptHELLOKEYRIJVS
DecryptRIJVSKEYHELLO
EncryptMEET MELEMONXIQH 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.

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.