ArticleslgStudy

science

Hill cipher

Hill cipher is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Hill cipher rather than just read about it. In short: In classical cryptography, the Hill cipher is a polygraphic substitution cipher based on linear algebra. Invented by Lester S.

Hill cipher — main illustration
Hill cipher — illustration

Key takeaways

  • Hill cipher belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Hill cipher to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Hill cipher from memory before moving on to harder problems.

Reference excerpt

In classical cryptography, the Hill cipher is a polygraphic substitution cipher based on linear algebra. Invented by Lester S. Hill in 1929, it was the first polygraphic cipher in which it was practical (though barely) to operate on more than three symbols at once. The following discussion assumes an elementary knowledge of matrices.

Encryption Each letter is represented by a number modulo 26. Though this is not an essential feature of the cipher, this simple scheme is often used:

To encrypt a message, each block of n letters (considered as an n-component vector) is multiplied by an invertible n × n matrix, against modulus 26. To decrypt the message, each block is multiplied by the inverse of the matrix used for encryption. The matrix used for encryption is the cipher key, and it should be chosen randomly from the set of invertible n × n matrices (modulo 26). The cipher can, of course, be adapted to an alphabet with any number of letters; all arithmetic just needs to be done modulo the number of letters instead of modulo 26. Consider the message 'ACT', and the key below (or GYB/NQK/URP in letters):

( 6 24 1 13 16 10 20 17 15 ) {\displaystyle {\begin{pmatrix}6&24&1\\13&16&10\\20&17&15\end{pmatrix}}}

Since 'A' is 0, 'C' is 2 and 'T' is 19, the message is the vector:

( 0 2 19 ) {\displaystyle {\begin{pmatrix}0\\2\\19\end{pmatrix}}}

Thus the enciphered vector is given by:

( 6 24 1 13 16 10 20 17 15 ) ( 0 2 19 ) = ( 67 222 319 ) ≡ ( 15 14 7 ) ( mod 26 ) {\displaystyle {\begin{pmatrix}6&24&1\\13&16&10\\20&17&15\end{pmatrix}}{\begin{pmatrix}0\\2\\19\end{pmatrix}}={\begin{pmatrix}67\\222\\319\end{pmatrix}}\equiv {\begin{pmatrix}15\\14\\7\end{pmatrix}}{\pmod {26}}}

which corresponds to a ciphertext of 'POH'. Now, suppose that our message is instead 'CAT', or:

( 2 0 19 ) {\displaystyle {\begin{pmatrix}2\\0\\19\end{pmatrix}}}

This time, the enciphered vector is given by:

… excerpt ends here. Continue reading the full article.

Illustrations

Hill cipher: Hill's cipher machine, from figure 4 of the patent
Hill's cipher machine, from figure 4 of the patent

Worked examples

Example 1 — a first encounter with Hill cipher

Start with the simplest possible case. Write down what Hill cipher claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Hill cipher before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Hill cipher ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Hill cipher

In research
Hill cipher appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Hill cipher in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Hill cipher is common in secondary-school and first-year university syllabi. It links to neighbouring topics Classical ciphers, so understanding it makes those chapters shorter.
In everyday life
Look for Hill cipher outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Hill cipher in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Hill cipher means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Hill cipher out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Hill cipher in simple terms?

In classical cryptography, the Hill cipher is a polygraphic substitution cipher based on linear algebra. Invented by Lester S.

Why does Hill cipher matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Hill cipher?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Hill cipher.

Tags

  • Classical ciphers

Keep exploring