Cryptography_Hill Cipher for graduate student.pptx
geetadma
162 views
18 slides
Oct 20, 2024
Slide 1 of 18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
About This Presentation
Hill cipher for graduate students in cryptography course
Size: 946.17 KB
Language: en
Added: Oct 20, 2024
Slides: 18 pages
Slide Content
Hill Cipher A substitution cipher
Hill Cipher Multi letter cipher based on linear algebra. Developed by the mathematician Lester S. Hill in 1929.
Concepts to be known Matrix arithmetic modulo 26 Square matrix Determinant Multiplicative Inverse
Hill Cipher: Encryption To encrypt a message, each block of n letters (considered as an n-component vector) is multiplied by an Invertible n×n matrix, against modulus 26. Thus needed a 2 ×2 matrix for working with digraphs, a 3 ×3 matrix for working with trigraphs. Following is the rule to produce the cipher text: C = P K mod 26 Here C is cipher text produced from Plain text P and Key as K
Hill Cipher: Encryption There are two approaches of the hill cipher: A row approach with C = P K mod 26 Here , Plain text P is given as a row vector and Key as a square matrix Another is a column approach with C = K P mod 26 Here, Plain text P is given as a column vector and Key as a square matrix
For three letters word: Row approach
Example Encrypt, “pay more money” using the Hill cipher with Key as
Example Encrypt, “pay more money” using the Hill cipher with Key as
Sol
Choosing a key The key matrix must be a square matrix. For example: Key = VIEW Key = QUICKNESS V I E W 21 8 4 22 Q U I C K N E S S 16 20 8 2 10 13 4 18 18
Example Encrypt the plaintext “safe messages”, using Hill cipher for the given key: “ciphering” using column approach. Ciphertext: “ HDSIOEYQOCAA ”. c i p h e r i n g 2 8 15 7 4 17 8 13 6
Choosing a key The key matrix must be a square matrix. For example: Key = VIEW Key = QUICKNESS V I E W 21 8 4 22 Q U I C K N E S S 16 20 8 2 10 13 4 18 18
Decrypting hill cipher For row approach For column approach
Example Decrypt the cipher text “FKMFIO”, using Hill cipher for the given key With column approach and rule as Plain Text: ATTACK 2 3 3 6
Example Decrypt the cipher text “RRL”, using Hill cipher for the given key With row approach and rule as Plain Text: PAY 17 17 5 21 28 21 2 2 19
Example Encrypt the message HELP using key as pear using row approach Cipher text: BSJN p e a r 15 4 17