14 One-time pad
This chapter covers
- One-Time Pad ciphers
- The Vernam cipher, which approximates a one-time pad
- Diffie-Hellman key exchange
- How to construct the large primes needed for Diffie-Hellman and Public Key cryptography
The best-known stream cipher is the One-Time Pad. Many writers restrict this term to mean only a cipher where the plaintext and the key stream are exclusive-ORed byte-by-byte. This is historically inaccurate. The first one-time pad cipher was published in 1882 by Frank Miller, a Sacramento CA banker, for the purpose of saving money by shortening telegraph messages. Miller’s telegraph code used 5-digit code groups to represent words and phrases that were common in commercial telegrams. To obtain secrecy, Miller proposed a cipher which consisted of adding a 3-digit number to each 5-digit group. His code values were small enough so that the sum could never exceed 99999. That is, the codes were all less than 99000. So the one-time pad was originally a decimal system, not a binary system.