Home Shift Cipher Substitution Cipher Affine Cipher Hill Cipher Permutation Cipher Vernam Cipher

Hill Cipher

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.

Encryption and Decryption
Let 𝑚 ≥ 2 be an integer. Let P=C=K=(ℤ26)𝑚 and let K = { 𝑚 × 𝑚 𝑖𝑛𝑣𝑒𝑟𝑡𝑖𝑏𝑙𝑒 𝑚𝑎𝑡𝑟𝑖𝑐𝑒𝑠 𝑜𝑣𝑒𝑟 ℤ26 } .
For a key k, we define
𝑒𝑘(𝑥) = 𝑥𝑘 and
𝑑𝑘(𝑦) = 𝑦𝑘−1
where all operations are performed in ℤ26

Hill Cipher Implementation