������������POLYALPHABETIC SUBSTITUTION�CIPHER
Prof. Neeraj Bhargava
Mrs. Shubha Chaturvedi
Department of Computer Science, School of Engineering & System Sciences
MDS University Ajmer, Rajasthan
POLYALPHABETIC SUBSTITUTION�CIPHER
(i) Sequential
(ii)Key word coded
(iii) Auto encoded
VIGENERE CIPHER
Two methods perform the vigenere cipher.�When the vigenere table is given, the encryption and decryption are done using the vigenere table (26 * 26 matrix) in this method�METHOD-1�
EXAMPLE: The plaintext is "JAVATPOINT", and the key is� "BEST”
Encryption
The first letter of the plaintext is combined with the first letter of the key. The column of plain text "J" and row of key "B" intersects the alphabet of "K" in the vigenere table, so the first letter of ciphertext is "K".
Similarly, the second letter of the plaintext is combined with the second letter of the key. The column of plain text "A" and row of key "E" intersects the alphabet of "E" in the vigenere table, so the second letter of ciphertext is "E".
This process continues continuously until the plaintext is finished.
Ciphertext = KENTUTGBOX
�
Decryption
Decryption is done by the row of keys in the vigenere table. First, select the row of the key letter, find the ciphertext letter's position in that row, and then select the column label of the corresponding cipher text as the plaintext.
Example :
In the row of the key is "B" and the ciphertext is "K" and this cipher text letter appears in the column "J", that means the first plaintext letter is "J".
Next, in the row of the key is "E" and the ciphertext is "E" and this ciphertext letter appears in the column "A", that means the second plaintext letter is "A".
This process continues continuously until the ciphertext is finished.
Plaintext = JAVATPOINT
Method -2
Example: The plaintext is "JAVATPOINT", and the key is "BEST".
Encryption: Ei = (Pi + Ki) mod 26
Plain text : J A V A T P O I N T
Plaintext value: 09 00 21 00 19 15 14 08 13 19
Key : B E S T B E S T B E
Key value: 01 04 18 19 01 04 18 19 01 04
Ciphertext value (E) :
10 04 13 19 20 19 06 01 14 23
Cipher text: K E N T U T G B O X
Decryption:
Di = (Ei - Ki) mod 26
Ciphertext : K E N T U T G B O X
Ciphertext value (E): 10 04 13 19 20 19 06 01 14 23
Key : B E S T B E S T B E
Key value (K) : 01 04 18 19 01 04 18 19 01 04
Plaintext: J A V A T P O I N T
Plaintext value (P): 09 00 21 00 19 15 14 08 13 19
HOMOPHONIC SUBSTITUTION �CIPHER
The number of characters each letter is replaced by is part of the key, e.g. the letter 'E' might be replaced by any of 5 different symbols, while the letter 'Q' may only be substituted by 1 symbol.
POLYBIUS/POLYBIUS CHECKBOARD �
The Polybius square, also known as the Polybius checkerboard.
It is 5*5 grid that allows to encrypt letters into numbers . is a device invented by the ancient Greeks Cleoxenus and Democleitus, and made famous by the historian and scholar Polybius.
Each letter is then represented by its coordinates in the grid. For example, "BAT" becomes "12 11 44". The 26 letters of the Latin/English alphabet do not fit in a 5 × 5 square, two letters must be combined (usually I and J as above, though C and K is an alternative). Alternatively, a 6 × 6 grid may be used to allow numerals or special characters to be included as well as letters.
EXAMPLE :
Find out the polybius square cipher for the plain text ?
STEP-1
First we will create a matrix 5*5 ,in order to fit 26 letters of the English
Alphabet into the 25 spots letter I and J usually combined.
1 2 3 4 5
1
2
3
4
5
A | B | C | D | E |
F | G | H | I/J | K |
L | M | N | O | P |
Q | R | S | T | U |
V | W | X | Y | Z |
STEP-2
Assign the number to letter in the plain text from the about to get cipher text.
PLAINTEXT :
U N I V E R S I T Y
CIPHER TEXT :
45 33 24 51 15 42 43 24 44 54
Assignment
Q. Find out the Vigenere Cipher for the plain text message ”MaharashiUniversity” by using the Keyword “Orange”.