Hill Cipher
Matrix-based polygraphic cipher
The Hill cipher is a polygraphic substitution cipher based on linear algebra. It encrypts blocks of letters by treating them as vectors and multiplying by a key matrix. For a 2×2 matrix, it encrypts pairs of letters at a time.
Invented by mathematician Lester S. Hill in 1929. It was the first polygraphic cipher that was practical for more than three symbols at once. Used for military communications and influenced the development of modern block ciphers.
While not used for secure encryption today, the Hill cipher demonstrates important cryptographic concepts. Its mathematical foundation influenced modern ciphers like AES. Used in educational settings to teach linear algebra applications in cryptography.
Vulnerable to known-plaintext attacks - with enough plaintext-ciphertext pairs, the key matrix can be solved. The key matrix must be invertible (determinant must be coprime with 26). Linear nature means it doesn't diffuse patterns well.
Watch how each pair of letters is transformed by matrix multiplication
Key Matrix (det = 20)