Vigenère cipher worksheet

Keywords, the Vigenère table and why the same letter turns into different cipher letters. Level 3: a known-plaintext attack.

Level
Variant
encode-decode.com · ClassroomLevel 2 · Standard (ages 12–15) · Variant 1

The Vigenère cipher

NameClassDate

Blaise de Vigenère's cipher uses a keyword. Write the keyword again and again under the message. Each key letter tells you the shift for the letter above it: A = 0, B = 1, C = 2 … With the keyword STAR, the shifts are 18, 19, 0, 17.

In the Vigenère table: find the plain letter at the top and the key letter on the left. The cipher letter is where row and column meet.

Task 1 Encrypt with the keyword STAR. Fill in the key row first.

Top row: plain letters · middle row: key · bottom row: cipher letters

NEVERSHAREYOURPASSWORD

Task 2 Decrypt with the keyword STAR. Shift every letter back by the value of its key letter.

Top row: cipher letters · middle row: key · bottom row: plain letters

UTEJSKUJWWAJZBFKGYTYJXE

Task 3 The letter E appears 4 times in the message from task 2. Which cipher letters did it become? Why does this make counting letters much less useful than with Caesar?

Task 4 Math corner

Write the shift for each letter of the keyword STAR.

STAR

Calculate the first three cipher letters of task 1 with c = (p + k) mod 26.

encode-decode.com/classroom/ · Variant 1 · Free to copy for use in class
encode-decode.com · Classroom

Vigenère table

Plain letter on top, key letter on the left, cipher letter where they meet.

ABCDEFGHIJKLMNOPQRSTUVWXYZ
AABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZA
CCDEFGHIJKLMNOPQRSTUVWXYZAB
DDEFGHIJKLMNOPQRSTUVWXYZABC
EEFGHIJKLMNOPQRSTUVWXYZABCD
FFGHIJKLMNOPQRSTUVWXYZABCDE
GGHIJKLMNOPQRSTUVWXYZABCDEF
HHIJKLMNOPQRSTUVWXYZABCDEFG
IIJKLMNOPQRSTUVWXYZABCDEFGH
JJKLMNOPQRSTUVWXYZABCDEFGHI
KKLMNOPQRSTUVWXYZABCDEFGHIJ
LLMNOPQRSTUVWXYZABCDEFGHIJK
MMNOPQRSTUVWXYZABCDEFGHIJKL
NNOPQRSTUVWXYZABCDEFGHIJKLM
OOPQRSTUVWXYZABCDEFGHIJKLMN
PPQRSTUVWXYZABCDEFGHIJKLMNO
QQRSTUVWXYZABCDEFGHIJKLMNOP
RRSTUVWXYZABCDEFGHIJKLMNOPQ
SSTUVWXYZABCDEFGHIJKLMNOPQR
TTUVWXYZABCDEFGHIJKLMNOPQRS
UUVWXYZABCDEFGHIJKLMNOPQRST
VVWXYZABCDEFGHIJKLMNOPQRSTU
WWXYZABCDEFGHIJKLMNOPQRSTUV
XXYZABCDEFGHIJKLMNOPQRSTUVW
YYZABCDEFGHIJKLMNOPQRSTUVWX
ZZABCDEFGHIJKLMNOPQRSTUVWXY
encode-decode.com/classroom/ · Variant 1 · Free to copy for use in class
encode-decode.com · ClassroomLevel 2 · Standard (ages 12–15) · Variant 1

Answer key: The Vigenère cipher

For teachers. Same variant number, same answers.

Task 1
FXVVJ LHRJX YFMK PRKLWFJW
Task 2
CAESAR USED A SHIFT OF THREE
Task 3
E → E, W, X, E. The same letter becomes different cipher letters, so its frequency is spread out.
Task 4
S = 18, T = 19, A = 0, R = 17
N: (13 + 18) mod 26 = 5 → F · E: (4 + 19) mod 26 = 23 → X · V: (21 + 0) mod 26 = 21 → V
encode-decode.com/classroom/ · Variant 1 · Free to copy for use in class

What students learn

  • Use a keyword and the Vigenère table
  • See why one letter can become many cipher letters
  • Find a key from known plaintext (level 3)
  • Count keys: 26ⁿ, and the idea of the one-time pad

Tip: show the method in the projector mode first. Students who finish early can go on with a class challenge.

Searches the list of pages on this site. What you type stays in your browser.