The Hill cipher is a polyalphabetic substitution based on the matrix calculation of linear algebra. It was invented in 1929 by Lester S. Hill, a professor at Hunter College in New York City.
The plain text is divided into blocks of n consecutive characters, and each block is substituted as a whole by multiplication with an n×n matrix. The matrix is calculated from a keyword of length n×n. To do this, the letters are replaced by their letter values – usually A=0, B=1, … Z=25 – and the matrix is filled row by row. This means that each letter is represented by a number modulo 26.
Because each ciphertext letter is calculated from all plaintext letters in the block due to the matrix multiplication, the structure and thus the frequency distribution of the plaintext is changed.