Introduction to the Hill Cipher
< change language
The Hill cipher is a very simple cipher that works by using modular arithmetic and matrices.
In a nutshell, your key is a matrix in some $\mathbb{Z}_m$ and you encrypt messages by breaking them up into pieces and then multiplying the pieces by the key matrix. That's it.
I will be giving a workshop on this subject in a near future, and so I decided to write a Python notebook with a brief explanation of how the Hill cipher works, as well as providing an implementation of said cipher. The notebook can be downloaded and read here. I will be glad if you leave any suggestions/comments in the section below!
In a nutshell, your key is a matrix in some $\mathbb{Z}_m$ and you encrypt messages by breaking them up into pieces and then multiplying the pieces by the key matrix. That's it.
I will be giving a workshop on this subject in a near future, and so I decided to write a Python notebook with a brief explanation of how the Hill cipher works, as well as providing an implementation of said cipher. The notebook can be downloaded and read here. I will be glad if you leave any suggestions/comments in the section below!
- RGS