Polygraphic Substitution Cipher - Part 2

sschaturvedi2015 110 views 11 slides Mar 10, 2021
Slide 1
Slide 1 of 11
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

About This Presentation

Polygraphic Substitution Cipher - Part 2


Slide Content

POLYGRAPHIC SUBSTITUTION CIPHER Prof. Neeraj Bhargava Mrs. Shubha Chaturvedi Department of Computer Science, School of Engineering & System Sciences MDS University Ajmer, Rajasthan

It is also known as Multiple groups substitution. It involves replacing a one group of character in the plaintext message with another groups of character in cipher text. In a Polygraphic Substitution cipher, plaintext letters are substituted in larger groups, instead of substituting letters individually. Here the plaintext is divided into groups of adjacent letters of the same fixed length and than each such group is transformed into a different group of same length letters in cipher text. n playfair cipher unlike traditional cipher we encrypt a pair of alphabets(digraphs) instead of a single alphabet. Polygraphic Substitution Cipher

Playfair cipher Hill cipher There are two major types of Polygraphic Substitution Cipher

Hill cipher is a polygraphic substitution cipher based on linear algebra . Each letter is represented by a number modulo 26. Often the simple scheme A = 0, B = 1, …, Z = 25 is used, but this is not an essential feature of the cipher. 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 . To decrypt the message, each block is multiplied by the inverse of the matrix used for encryption. The matrix used for encryption is the cipher key, and it should be chosen randomly from the set of invertible n × n matrices (modulo 26). Hill Cipher

The hill cipher formula can be expressed in terms of columns ,vectors and matrics . Encryption =c=(k*p) mod 26 Decryption=p =(k*c)mod 26 Hill Cipher formula

Example 1:

We have to encrypt the message ‘ACT’ (n=3).The key is ‘GYBNQKURP’ which can be written as the nxn matrix : Encryption

To decrypt the message, we turn the ciphertext back into a vector, then simply multiply by the inverse matrix of the key matrix (IFKVIVVMI in letters).The inverse of the matrix used in the previous example is : Decryption

Given Plaintext is = “DOG” Step1-Put DOG in a matrix from according to numbers. D= 3 O= 14 G= 6 Choose a random key according to the size of plain text. Random key is 3*3 3 6 24 1 14 13 16 10 6 20 17 5 Example 2.

Step3-multiple the 2 matrices 3 6 24 1 14 13 16 10 6 20 17 5 3*6 18 + 14*24 336 + 6*1 6 = 360/26 = 22 3*13 39 + 14*16 224 + 6*10 60 = 323/26 = 11 3*20 60 + 14*17 238 + 6*15 90 = 388/26 = 24 Note-key should be such that o determinant shoudn’t be 0.

Now we get a cipher text which is = 22 11 24 Step4- we will convert this cipher text into the plain text: 22 = W 11 = L 24 = Y
Tags