Vigenère cipher · 03 Worked example

Vigenère cipher: worked example

Step-by-step encryption of the message “meet me at the bridge” with the key CIPHER, letter by letter.

Let us encrypt the message MEET ME AT THE BRIDGE, without spaces, with the key CIPHER.

terminale
Text        M E E T M E A T T H E B R I D G E
Key         C I P H E R C I P H E R C I P H E
Ciphertext  O M T A Q V C B I O I S T Q S N I

Letter by letter

  1. 01
    M + C

    M is letter number 12 (counting A = 0); C is worth 2: 12 + 2 = 14, that is O.

  2. 02
    E + I

    4 + 8 = 12, that is M.

  3. 03
    E + P

    4 + 15 = 19, that is T.

  4. 04
    T + H

    19 + 7 = 26; past 25 you start again from the beginning: 26 − 26 = 0, that is A.

  5. 05
    And so on

    Up to the last letter, E + E = 4 + 4 = 8, that is I.

What stands out

The letter E appears five times in the message and becomes M, T, V and I. It is the fundamental difference from the Caesar cipher: the plaintext’s letter frequencies are no longer directly reflected in the ciphertext.

Continue with
04 The maths

Vigenère cipher: the maths

The formulas of the Vigenère cipher in modular arithmetic, the key space and why the repetition of the key is its weakness.

↑