Cryptography Reference
In-Depth Information
FITTING THE CAESAR CIPHER TO THE BASIC MODEL
The Caesar Cipher can be fitted to the basic model of a cryptosystem that we
introduced in Section 1.4.3. The various components of this model are:
Plaintext/Ciphertext : these are both represented by strings of letters from the
alphabet A to Z.
Encryption key : this is the number representing the secret shift.
Decryption key : this is also the number representing the secret shift, so this is a
symmetric cryptosystem.
Keyspace : there are 26 possible different shifts, each of which corresponds to a
possible key, so the keyspace has size 26.
Encryption algorithm : this can be represented by the algorithm -
1. slide the ruler to the right by the secret shift length;
2. replace the plaintext letter by the ciphertext letter beneath it.
Decryption algorithm : this can be represented by the algorithm -
1. slide the ruler to the right by the secret shift length;
2. replace the ciphertext letter by the plaintext letter above it.
MATHEMATICAL DESCRIPTION OF THE CAESAR CIPHER
Strictly as an aside (which can comfortably be skipped at this stage), the Caesar
Cipher can more efficiently be described using simple mathematical notation. To
do so, we represent the letters A to Z by the numbers 0 to 25 (in other words, we
identify A with 0, B with 1, C with 2, and so on). The Caesar Cipher key is already
a number between 0 and 25.
The advantage of doing this is that the process 'slide the ruler to the right' can
now be more elegantly described as a simple modular addition (see Section 5.1.3
and the Mathematics Appendix for an explanation of modular arithmetic). If we
want to encrypt the plaintext letter H using the key 3 then, since H is represented
by the number 7, we can use modular arithmetic to describe the encryption
process as:
7 + 3 = 10mod 26 .
Thus the ciphertext is K, which is the letter represented by 10. Similarly, the
encryption of plaintext letter Y, which is represented by 24, can be written as:
24
+
3
=
1mod 26
,
and hence the ciphertext is B. More generally, let P denote the numerical
representation of a plaintext letter (where P does not necessarily correspond
to the letter P, but can represent any plaintext letter) and K be any key. Then
encrypting plaintext P using key K produces the ciphertext letter C represented
by the number:
C = P + K mod 26 .
Search WWH ::




Custom Search