EXAMPLE: The plaintext is "JAVATPOINT", and the key is
"BEST”
Encryption
Thefirstletteroftheplaintextiscombinedwiththefirstletterofthekey.
Thecolumnofplaintext"J"androwofkey"B"intersectsthealphabetof"K"
inthevigeneretable,sothefirstletterofciphertextis"K".
Similarly,thesecondletteroftheplaintextiscombinedwiththesecond
letterofthekey.Thecolumnofplaintext"A"androwofkey"E"intersects
thealphabetof"E"inthevigeneretable,sothesecondletterofciphertextis
"E".
Thisprocesscontinuescontinuouslyuntiltheplaintextisfinished.
Ciphertext=KENTUTGBOX
Example: The plaintext is "JAVATPOINT", and the key is "BEST".
Encryption:E
i= (P
i+ K
i) 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:
D
i= (E
i-K
i) 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
D
i= (E
i-K
i) mod 26
D
i= (13 -18) mod 26
D
i= -5 mod 26
D
i= (-5 + 26) mod 26
D
i= 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
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
Q. Find out the Vigenere Cipher for the plain
text message ”MaharashiUniversity” by using
the Keyword “Orange”.