Modern Cryptography: Theory and Practice
| | Cryptography: Theory and Practice by Douglas Stinson CRC Press, CRC Press LLC ISBN: 0849385210 Pub Date: 03/17/95 |
| Previous | Table of Contents | Next |
Chapter 1Classical Cryptography
1.1 Introduction: Some Simple Cryptosystems
The fundamental objective of cryptography is to enable two people, usually referred to as Alice and Bob, to communicate over an insecure channel in such a way that an opponent, Oscar, cannot understand what is being said. This channel could be a telephone line or computer network, for example. The information that Alice wants to send to Bob, which we call plaintext, can be English text, numerical data, or anything at all its structure is completely arbitrary. Alice encrypts the plaintext, using a predetermined key, and sends the resulting ciphertext over the channel. Oscar, upon seeing the ciphertext in the channel by eavesdropping, cannot determine what the plaintext was; but Bob, who knows the encryption key, can decrypt the ciphertext and reconstruct the plaintext.
This concept is described more formally using the following mathematical notation.
DEFINITION 1.1 A cryptosystem is a five-tuple
- 1.
is a finite set of possible plaintexts - 2.
is a finite set of possible ciphertexts - 3.
, the keyspace, is a finite set of possible keys - 4. For each
, there is an encryption rule eK and a corresponding decryption rule . Each and are functions such that dK(eK(x)) = x for every plaintext - 2.
The main property is property 4. It says that if a plaintext x is encrypted using eK, and the resulting ciphertext is subsequently decrypted using dK, then the original plaintext x results.
Alice and Bob will employ the following protocol to use a specific cryptosystem. First, they choose a random key
for some integer n ≥ 1, where each plaintext symbol
is sent over the channel. When Bob receives y1y2 . . . yn, he decrypts it using the decryption function dK, obtaining the original plaintext string, x1x2. . .xn. See Figure 1.1 for an illustration of the communication channel.
Clearly, it must be the case that each encryption function eK is an injective function (i.e., one-to-one), otherwise, decryption could not be accomplished in an unambiguous manner. For example, if
where x1 ≠ x2, then Bob has no way of knowing whether y should decrypt to x1 or x2. Note that if
1.1.1 The Shift Cipher
In this section, we will describe the Shift Cipher, which is based on modular arithmetic. But first we review some basic definitions of modular arithmetic.
DEFINITION 1.2 Suppose a and b are integers, and m is a positive integer. Then we write a ≡ b (mod m) if m divides b - a. The phrase a ≡ b (mod m) is read as a is congruent to b modulo m. The integer m is called the modulus.
Suppose we divide a and b by m, obtaining integer quotients and remainders, where the remainders are between 0 and m - 1. That is, a = q1m + r1 and b = q2m + r2, where 0 ≤ r1 ≤ m - 1 and 0 ≤ r2 ≤ m - 1. Then it is not difficult to see that a ≡ b (mod m) if and only if r1 = r2. We will use the notation a mod m (without parentheses) to denote the remainder when a is divided by m, i.e., the value r1 above. Thus a ≡ b (mod m) if and only if a mod m = b mod m. If we replace a by a mod m, we say that a is reduced modulo m.
REMARK Many computer programming languages define a mod m to be the remainder in the range -m + 1, . . . , m - 1 having the same sign as a. For example, -18 mod 7 would be -4, rather than 3 as we defined it above. But for our purposes, it is much more convenient to define a mod m always to be nonnegative.
We can now define arithmetic modulo m:
For example, suppose we want to compute 11 × 13 in
| Previous | Table of Contents | Next |
Copyright © CRC Press LLC