This document discusses the Vigenere cipher encryption and decryption process. It provides an example of encrypting the plaintext "JAVATPOINT" with the key "BEST" using the Vigenere square. The ciphertext produced is "KENTUTGBOX". It then describes decrypting this ciphertext back to the original plaintext using the same key and process, but in reverse. Formulas for the Vigenere cipher encryption and decryption algorithms are also provided.
1. Prof. Neeraj Bhargava
Mrs. Shubha Chaturvedi
Department of Computer Science, School of Engineering &
System Sciences
MDS University Ajmer, Rajasthan
2. A polyalphabetic cipher is any cipher based on
substitution, using multiple substitution alphabets .
A letter in the plain text is not always replaced by the
same letter in the cipher text.
We can use more then 1 substitution for the same
letter.
The selection of the next alphabetic cloud be
selected in any of the three ways :-
(i) Sequential
(ii)Key word coded
(iii) Auto encoded
3. The vigenere cipher is an algorithm that is used to
encrypting and decrypting the text.
The vigenere cipher is an algorithm of encrypting an
alphabetic text that uses a series of interwoven caesar
ciphers.
It is based on a keyword's letters. It is an example of a
polyalphabetic substitution cipher.
This algorithm is easy to understand and implement.
This algorithm was first described in 1553 by Giovan
Battista Bellaso.
It uses a Vigenere table or Vigenere square for
encryption and decryption of the text. The vigenere
table is also called the tabula recta.
4.
5. 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
6. 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
7. Method -2
When the vigenere table is not given,
the encryption and decryption are done
by Vigenar algebraically formula in this
method (convert the letters (A-Z) into
the numbers (0-25)).
Formula of encryption is,
Ei = (Pi + Ki) mod 26
Formula of decryption is,
Di = (Ei - Ki) mod 26
8. 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
9. Decryption:
Di = (Ei - Ki) mod 26
If any case (Di) value becomes negative (-ve), in this case, we
will add 26 in the negative value. Like, the third letter of the
ciphertext;
N = 13 and S = 18
Di = (Ei - Ki) mod 26
Di = (13 - 18) mod 26
Di = -5 mod 26
Di = (-5 + 26) mod 26
Di = 21
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
10. The Homophonic Substitution cipher is a
substitution cipher in which single plaintext letters
can be replaced by any of several different
ciphertext letters. They are generally much more
difficult to break than standard substitution
ciphers.
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.
11. 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.
12. 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
13. 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
14. Q. Find out the Vigenere Cipher for the plain
text message ”MaharashiUniversity” by using
the Keyword “Orange”.