If not for a computer scientist’s hobby of collecting old telegraph codebooks, a crucial chapter in modern cryptography might have been lost to history.

The collector is Steven M. Bellovin, a professor of computer science at the Columbia University School of Engineering and a former computer security researcher at AT&T Bell Laboratories. On a recent trip to Washington he found himself with a free afternoon and decided to spend it at the Library of Congress, looking for codebooks that weren’t in his collection.

In the 19th century codebooks were used not so much for secrecy as for compression, to bring down the prohibitive cost of telegraph communication. (The first trans-Atlantic cables cost $5 a word.) Designers devised lists of words to replace phrases and even sentences.

But when Dr. Bellovin hunted though the card catalog, his interest was piqued by an 1882 codebook whose title included the word “secrecy.”