EXAMPLE 19 Vigenère Cipher

We use the Vigenère cipher to encrypt the message ATTACK AT DAWN. Choosing the keyword MATH, we shift the first letter of the message by 12 because is in position 12; the second letter of the message is shifted by 0 (unchanged) because is in position 0; the third letter of the message is shifted by 19 because is in position 19, and so on. A shift of means that the letter in position is replaced by the letter in position . When we have used all the letters of the keyword, we start over at the beginning. To encrypt ATTACK AT DAWN using the keyword MATH, we first note that the letters in the keyword MATH are in positions 12, 0, 19, and 7, respectively. So the in ATTACK is converted to , the first in ATTACK is converted to , the second in ATTACK is converted to , and so on. The first two lines of Table 17.5 show the position numbers for the letters of the message and the keyword. The third line of the table is obtained from the first two by adding the values in the columns using and converting the results back to letters.

723

Table 17.13: TABLE 17.5 Encryption Using a Vigenère Cipher
ATTACK AT DAWN 0 19 19 0 2 10 0 19 3 0 22 13
MATHMA TH MATH 12 0 19 7 12 0 19 7 12 0 19 7
MTMHOK TA PAPU 12 19 12 7 14 10 19 0 15 0 15 20