We first start with basic facts about matrices.

  • For if .
  • is invertible
  • The inverse of is its regular inverse . Indeed:

Example 1

Which of the following matrices are invertible ?

The determinants in order are . Then, using Definition (Decipher Function) we see the only invertible number is .

Method (Hill Cipher)

Our key is an invertible matrix.

  1. Break plaintext into pairs of letters
  2. Encode the pair of letters as a column vector
  3. Encrypt by multiplying the Key on the left
  4. Use alphabet-number correspondence to get ciphertext.
  5. Decrypt is the same but with the inverse matrix.

Example 2

Use a Hill Cipher with key

to encrypt the word AREA. So, AREA -> AR EA, which becomes

and so on.

Example 3

Decryption is done by multiplying by . Using the same , decrypt CRZX.

So, . Then the inverse modulo is . Then the inverse is

and so

and so on. This is BI + RD

Lemma (Valid Hill Cipher)

A Hill Cipher key is valid iff its determinant is invertible modulo , where is the size of the alphabet.

Otherwise, it would not be decryptable.