- 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
| Message | Key | Sum (Mod 26) | Cipher Text |
|---|---|---|---|
| H (7) | T (19) | 26 → 0 (A) | A |
| E (4) | H (7) | 11 | L |
| L (11) | F (5) | 16 | R |
| L (11) | L (11) | 22 | W |
| O (14) | Q (16) | 30 mod 26 → 4 (E) | E |
| A (0) | R (17) | 17 | R |
| L (11) | Z (25) | 36 mod 26 → 10 (K) | K |
| I (8) | F (5) | 13 | N |
| C (2) | J (9) | 11 | L |
| E (4) | K (10) | 14 | O |
| 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) = 4 → E
- R (17) - F (5) = 12 → L
- W (22) - L (11) = 11 → L
- E (4) - Q (16) = -12 → (-12 + 26) mod 26 = 14 → O
- R (17) - R (17) = 0 → A
- K (10) - Z (25) = -15 → (-15 + 26) mod 26 = 11 → L
- N (13) - F (5) = 8 → I
- L (11) - J (9) = 2 → C
- O (14) - K (10) = 4 → E Message: HELLOALICE
Message: HELLOALICE