• Needs a key as long as the message.
  • XOR/add the key and the message

Theorem

Given any ciphertext of a certain length, without knowing the key the probability of the ciphertext being the encryption of a plaintext of the same length is the same for all plaintexts of the same length as the ciphertext.

Problem

  • The key needs to be as long as the message
  • Must use key only once.

Example

Message: HELLOALICE
Key: THFLQRZFJK

MessageKeySum (Mod 26)Cipher Text
H (7)T (19)26 → 0 (A)A
E (4)H (7)11L
L (11)F (5)16R
L (11)L (11)22W
O (14)Q (16)30 mod 26 → 4 (E)E
A (0)R (17)17R
L (11)Z (25)36 mod 26 → 10 (K)K
I (8)F (5)13N
C (2)J (9)11L
E (4)K (10)14O
Cipher text would be ALRWERKNLO

Example

Cipher text : ALRWERKNLO
Key: THFLQRZFJK

Decryption of each letter

  • A (0) - T (19) = -19 → (-19 + 26) mod 26 = 7 → H
  • L (11) - H (7) = 4E
  • R (17) - F (5) = 12L
  • W (22) - L (11) = 11L
  • E (4) - Q (16) = -12 → (-12 + 26) mod 26 = 14 → O
  • R (17) - R (17) = 0A
  • K (10) - Z (25) = -15 → (-15 + 26) mod 26 = 11 → L
  • N (13) - F (5) = 8I
  • L (11) - J (9) = 2C
  • O (14) - K (10) = 4E Message: HELLOALICE