Posts

Showing posts from August, 2018

Hill Cipher program in c

Image
   Introduction to 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. The following discussion assumes an elementary knowledge of matrices . This technique encrypt plaintext in matrix form of 2x2 or 3x3.when plaintext in 2x2 then key value also in 2x2 matrix and 3x3 use then 3x3 matrix key.Using matrix we can encrypt 4 or 9 plaintext letters at once. Hill Cipher Theory First of all need key in matrix form of 2x2 or 3x3 depends of requirement. Here, we have formula to find Cipher text  ( Encryption ) CT = K*PT mod 26   Where, CT = CipherText ,               K = Key ,               PT = PlainText. We have also formula to find Plain text from Cipher text ( Decryption ) PT = K -1 *CT mod 26   Where, CT = CipherText ,