Secret codes

The Hill cipher

Date: 1929Place: New York (United States)Who?: Lester S. Hill

When mathematics entered the code factory

Substitution ciphers
Hill and Weisner’s cipher machine
Hill and Weisner’s cipher machine — patent drawing
patents.google.com — Public domain — Wikimedia Commons

In brief

In 1929, the American mathematician Lester Hill suggested encrypting blocks of letters by turning them into numbers and multiplying them by a grid of numbers, a matrix. It was the first cipher based on algebra, ancestor of the computational methods of modern ciphers.

The story

Lester S. Hill taught mathematics at Hunter College in New York. He replaced each letter with a number (A = 0, B = 1…), grouped the letters into blocks, then calculated new numbers with a matrix, keeping only the remainder after dividing by 26. To decrypt, you need the “inverse” matrix, which undoes the calculation.

Hill patented, with Louis Weisner, a geared machine that encrypted blocks of six letters, but it was little used. The cipher has a weak point: if the enemy knows a few pieces of plain text, the key can be worked out by calculation. Its importance lies elsewhere: it showed that encryption could become a branch of mathematics.

Example

Each block of letters becomes numbers (A = 0, B = 1…), mixed by a grid of numbers, the key.

Did you know?

Modern ciphers such as AES also work by calculating on blocks, with far more complex rules.

Sources: D. Kahn, The Codebreakers, 1967 (rev. ed. 1996); S. Singh, The Code Book, 1999; F. L. Bauer, Decrypted Secrets, 4th ed., 2007; C. P. Bauer, Secret History: The Story of Cryptology, 2nd ed., 2021; texts written for this site.

In the same family: Substitution ciphers