Lecture 5 Hill Cipher
Lecture 5 Hill Cipher
Faculty of science
Computer science department
Hill Cipher
Lecture 5
Hill Cipher
• Block cipher
• Choose an integer N and generate a key
which is an N×N matrix whose entries are
integers modulo 26
• Write the message as series of row vectors of
size N
• To encrypt multiple each vector with the key
and reduce mod 26
• To decrypt find inverse of key (matrix) mod
26 and multiply the ciphertext from left with
it
c1
c2 This can be expressed in term of column vectors and matrices:
c3
OR
C = KP mod 26
K-1= (3*12-5*7) -1 ×
Second : 1 × mod 26
1*12 mod 26=12 : 1* -7 mod 26=19 : 1* -5 mod 26=21 : 1*3 mod 26=3
Hill Cipher Decryption:
03 07
K =
-1
K
05 12