The Running Key Cipher is a method of encryption that uses a keyword or phrase as a key for the encryption process. This cipher is essentially a variant of the Vigenère cipher but relies on a continuous key rather than a repeating one. The technique was developed during the 19th century, with roots traced back to various classical encryption methods, though its precise origins are less documented than other ciphers. It was used primarily for securing messages where a one-time pad or a similar technique was impractical.
The Running Key Cipher works by taking a plaintext message and aligning it with a long, non-repeating key. The key is extended as needed to match the length of the plaintext. Each letter of the plaintext is then shifted according to the corresponding letter of the key. This method offers a significant improvement in security over simple substitution ciphers, as the shifting is based on a variable key rather than a fixed substitution.
Example:
Consider the plaintext message "MEET ME AT DAWN" and the key "LIMESTONE".
Align the key:
Plaintext: M E E T M E A T D A W N Key: L I M E S T O N E I I I
- Encrypt each letter:
- M (12) + L (12) = X (24)
- E (5) + I (9) = N (14)
- E (5) + M (13) = R (18)
- T (20) + E (5) = Y (25)
- M (12) + S (19) = F (6)
- E (5) + T (20) = Y (25)
- A (1) + O (15) = P (16)
- T (20) + N (14) = H (8)
- D (4) + E (5) = I (9)
- A (1) + I (9) = J (10)
- W (23) + I (9) = F (6)
- N (14) + I (9) = V (22)
Resulting Ciphertext:
The plaintext "MEET ME AT DAWN" can be encrypted to "XNR YFY PHIJ FV".
Mapping Table:
Here’s how the Running Key Cipher encryption works for the letters involved:
Plaintext Pair | Key Pair | Shift (Plaintext + Key) | Ciphertext |
---|---|---|---|
M | L | (12 + 12) mod 26 = 24 | X |
E | I | (5 + 9) mod 26 = 14 | N |
E | M | (5 + 13) mod 26 = 18 | R |
T | E | (20 + 5) mod 26 = 25 | Y |
M | S | (12 + 19) mod 26 = 6 | F |
E | T | (5 + 20) mod 26 = 25 | Y |
A | O | (1 + 15) mod 26 = 16 | P |
T | N | (20 + 14) mod 26 = 8 | H |
D | E | (4 + 5) mod 26 = 9 | I |
A | I | (1 + 9) mod 26 = 10 | J |
W | I | (23 + 9) mod 26 = 6 | F |
N | I | (14 + 9) mod 26 = 22 | V |
This table shows how each letter in the plaintext message interacts with the corresponding letter in the key to produce the final ciphertext. The Running Key Cipher emphasizes the importance of the key in encryption, highlighting how a longer, non-repeating key significantly increases security compared to traditional methods.