2. • TheVigenère Cipher operates by using a keyword, typically a word or
phrase, as the basis for encryption.
• Somtimes the keyword length maybe shorter than the plaintext lenght, in
that case , the given keyword is repeated in a circular manner until it
matches the length of the plain text.
• Each letter in the keyword is then used to determine the shift value for the
corresponding letter in the plaintext.
• This is done using theVigenère table: consists of the alphabets written out
26 times in different rows, each alphabet shifted cyclically to the left
compared to the previous alphabet, corresponding to the 26 possible Caesar
Ciphers.
3. • The letters in the top row of the table
represent the letters in a message.
• To encrypt the message, find the
column headed by the letter to
encrypt, find where it intersects with
the row of the keyword letter that
maps to the letter in the message.
• The letter at the intersection point will
be the letter that the message letter is
encrypted as.
4. • Suppose we wish to encrypt the plaintext message: KENNEDY SITHOLE
,using the keyword DEVELOPER.
• Plaintext : KENNEDY SITHOLE
• G Keyword: DEVELOP ERDEVEL
• Ciphertext: NIIRPRN WZWLJPP
• To decrypt the text, find the cipher alphabet in the row of the keyword
letter, then see the column of the cipher alphabet.
• G Keyword: DEVELOP ERDEVEL
• Ciphertext: NIIRPRN WZWLJPP
• Plaintext : KENNEDY SITHOLE
5. Alternative method
• When the vigenere table is not given, the encryption and decryption are
done byVigenar algebraically formula
• Encryption ,
Ei = (Pi + Ki) mod 26
• Decryption is,
Di = (Ei - Ki) mod 26,
where E denotes the encryption, D denotes the decryption, P denotes the
plaintext and K denotes the key.
NB: "i" denotes the offset of the ith number of the letters, as shown in
the table below
6. • Example:The plaintext is "ARREST ATTACKERS", and the key is
"SOLUTION".
• Convert the letters (A-Z) into the numbers (0-25).
Plaintext A R R E S T A T T A C K E R S
Plaintext value (P) 0 17 17 4 18 19 0 19 19 0 2 10 4 17 18
Key S O L U T I O N S O L U T I O
KeyValue (K) 18 14 11 20 19 8 14 13 18 14 11 20 19 8 14
Ciphertext value (E) 18 5 2 24 11 1 14 6 11 14 13 4 23 25 6
Ciphertext S F C Y L B O G L O N E X Z G
8. Decryption
Ciphertext S F C Y L B O G L O N E X Z G
Ciphertext value
(E)
18 5 2 24 11 1 14 6 11 14 13 4 23 25 6
Key S O L U T I O N S O L U T I O
KeyValue (K) 18 14 11 20 19 8 14 13 18 14 11 20 19 8 14
Plaintext value (P) 0 17 17 4 18 19 0 19 19 0 2 10 4 17 18
Plaintext A R R E S T A T T A C K E R S
9. • Decryption: Di = (Ei - Ki) mod 26
• NB: If any case (Di) value becomes negative (-ve), we will add 26 in the
negative value. Like, the second letter of the ciphertext;
• F = 5 and O = 14
• Di = (Ei - Ki) mod 26
• Di = (5 - 14) mod 26
• Di = -9 mod 26
• Di = (-9 + 26) mod 26
• Di = 17