62 CHAPTER 3 TRADITIONAL SYMMETRIC-KEY CIPHERS
Additive Cipher
The simplest monoalphabetic cipher is the additive cipher. This cipher is sometimes
called a shift cipher and sometimes a Caesar cipher, but the term additive cipher
better reveals its mathematical nature. Assume that the plaintext consists of lowercase
letters (a to z), and that the ciphertext consists of uppercase letters (A to Z). To be able
to apply mathematical operations on the plaintext and ciphertext, we assign numerical
values to each letter (lower- or uppercase), as shown in Figure 3.8.
Figure 3.8 Representation of plaintext and ciphertext characters in Z26
Plaintext 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
Ciphertext 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
Value 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
In Figure 3.8 each character (lowercase or uppercase) is assigned an integer in
Z26. The secret key between Alice and Bob is also an integer in Z26. The encryption
algorithm adds the key to the plaintext character; the decryption algorithm subtracts
the key from the ciphertext character. All operations are done in Z26. Figure 3.9. shows
the process.
Figure 3.9 Additive cipher
Plaintext Plaintext
Bob
Alice P
P
k k
P = (C − k) mod 26
C = (P + k) mod 26
Encryption C Ciphertext C Decryption
We can easily prove that the encryption and decryption are inverse of each other
because plaintext created by Bob (P1) is the same as the one sent by Alice (P).
P1 = (C − k) mod 26 = (P + k − k) mode 26 = P
When the cipher is additive, the plaintext, ciphertext, and key are integers in Z26.
Example 3.3
Use the additive cipher with key = 15 to encrypt the message “hello”.
Solution
We apply the encryption algorithm to the plaintext, character by character: