The Hill cipher
Encryption by blocks of two letters with a 2 × 2 matrix modulo 26: encrypting, the condition for a matrix to be a key, the decryption matrix and the known-plaintext attack.
- 23 cards
- 4 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- The numbers
A few cards from the deck
Hill cipher: what is it?
Show the answer
A cipher that cuts the message into blocks of n letters, seen as vectors, and multiplies each by a square key matrix, modulo 26.
With key (3 3 / 2 5), the block HE = (7, 4) gives (3×7 + 3×4, 2×7 + 5×4) = (33, 34) ≡ (7, 8), that is HI.
With key (3 3 / 2 5), what does the block NO = (13, 14) become?
DSDFSDIH
Show the answer
DS3×13 + 3×14 = 81 ≡ 3 (D) and 2×13 + 5×14 = 96 ≡ 18 (S). SD swaps the two letters; DF is the ciphertext of AB.
A matrix can serve as a Hill key if its determinant is ….
Show the answer
A matrix can serve as a Hill key if its determinant is coprime with 26.
That is the condition for the determinant to have an inverse modulo 26, hence for the matrix to be invertible. An even determinant or a multiple of 13 is ruled out.
Block cipher: what is it?
Show the answer
Encryption that processes the message in fixed-size groups, each group being transformed as a whole by the key.
In Hill, each ciphertext letter depends on both letters of the block: single-letter frequencies are blurred, unlike Caesar.