Friday, 18 March 2016

Hill Cipher Encryption/Decryption

Hill Cipher belongs to a category of  Block Ciphers and Ployalphabetic ciphers.

  • In a Hill Cipher , the key is a Square matrix of size m x m in which m is the size of block.
Encryption:

C.T = (P.T Key   ) mod 26 

Decryption:

P.T = (C.T Key-1  ) mod 26

The Key matrix in the hill Cipher needs to have a multiplicative Inverse.

Example:

Perform Encryption/Decryption on Given Plain Text "Attack is Tonight" . 









































P.T = (C.T Key-1  ) mod 26























Ref: