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.
- Break plaintext into pairs of letters
- Encode the pair of letters as a column vector
- Encrypt by multiplying the Key on the left
- Use alphabet-number correspondence to get ciphertext.
- 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.