Cryptography_Hill Cipher for graduate student.pptx

geetadma 162 views 18 slides Oct 20, 2024
Slide 1
Slide 1 of 18
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18

About This Presentation

Hill cipher for graduate students in cryptography course


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