You are on page 1of 3

Hill Cipher

 It is poly alphabetic cipher method developed by Lister Hill in 1929.


 The encryption algorithm takes m successive plaintext letters and substitutes for them
m cipher text letters.
 The substitution is determined by m linear equations in which each character is
assigned a numerical value (a = 0, b = 1 ... z = 25).
 For m = 3, the system can be described as follows:
c1 = (k11P1 + k12P2 + k13P3) mod 26

c2= (k21P1 + k22P2 + k23P3) mod 26


c3=(k31P1 + k32P2 + k33P3) mod 26

 And in general we can write like this

Where C representing cipher text, P representing plaintext and k is


3x3 matrix representing encryption key.
 For example: consider the plaintext “pay more money” and use the
encryption key
17 17 5
K = 21 18 21
2 2 19
- Now to get the cipher text, as per the equation C = KP mod 26.
- Here our first three letters of plaintext are ”pay” which are alphabetically
numeric are: 15 0 and 24. These are then multiplied with key vector. And
we get the cipher text.

𝑝 15 15 17 17 5 15
𝑎 = 0 then K * 0 mod 26 = 21 18 21 * 0 mod 26
𝑦 24 24 2 2 1
11 𝐿
= 13 = 𝑁 = LNS
18 𝑆

The cipher text for the


entire plaintext is
LNSHDLEWMTRW

You might also like