4.4 Perfect Secrecy of the One-Time Pad

Everyone knows that the one-time pad provides perfect secrecy. But what does this mean? In this section, we make this concept precise. Also, we know that it is very difficult in practice to produce a truly random key for a one-time pad. In the next section, we show quantitatively how biases in producing the key affect the security of the encryption.

In Section 20.4, we repeat some of the arguments of the present section and phrase them in terms of entropy and information theory.

The topics of this section and the next are part of the subject known as Provable Security. Rather than relying on intuition that a cryptosystem is secure, the goal is to isolate exactly what fundamental problems are the basis for its security. The result of the next section shows that the security of a one-time pad is based on the quality of the random number generator. In Section 10.5, we will show that the security of the ElGamal public key cryptosystem reduces to the difficulty of the Computational Diffie-Hellman problem, one of the fundamental problems related to discrete logarithms. In Section 12.3, we will use the Random Oracle Model to relate the security of a simple cryptosystem to the noninvertibility of a one-way function. Since these fundamental problems have been well studied, it is easier to gauge the security levels of the cryptosystems.

First, we need to define conditional probability. Let’s consider an example. We know that if it rains Saturday, then there is a reasonable chance that it will rain on Sunday. To make this more precise, we want to compute the probability that it rains on Sunday, given that it rains on Saturday. So we restrict our attention to only those situations where it rains on Saturday and count how often this happens over several years. Then we count how often it rains on both Saturday and Sunday. The ratio gives an estimate of the desired probability. If we call A the event that it rains on Saturday and B the event that it rains on Sunday, then the conditional probability of B given A is

P(BA)=P(AB)P(A), 
(4.1)

where P(A) denotes the probability of the event A. This formula can be used to define the conditional probability of one event given another for any two events A and B that have probabilities (we implicitly assume throughout this discussion that any probability that occurs in a denominator is nonzero).

Events A and B are independent if P(AB)=P(A)P(B). For example, if Alice flips a fair coin, let A be the event that the coin ends up Heads. If Bob rolls a fair six-sided die, let B be the event that he rolls a 3. Then P(A)=1/2 and P(B)=1/6. Since all 12 combinations of {Head, Tail} and {1, 2, 3, 4, 5, 6} are equally likely, P(AB)=1/12, which equals P(A)P(B). Therefore, A and B are independent.

If A and B are independent, then

P(BA)=P(AB)P(A)=P(A)P(B)P(A)=P(B), 

which means that knowing that A happens does not change the probability that B happens. By reversing the steps in the above equation, we see that

A and B are independentP(BA)=P(B).

An example of events that are not independent is the original example, where A is the event that it rains on Saturday and B is the event that it rains on Sunday, since P(BA)>P(B). (Unfortunately, a widely used high school algebra text published around 2005 gave exactly one example of independent events: A and B.)

How does this relate to cryptography? In a cryptosystem, there is a set of possible keys. Let’s say we have N keys. If we have a perfect random number generator to choose the keys, then the probability that the key is k is P(K=k)=1/N. In this case we say that the key is chosen uniformly randomly. In any case, we assume that each key has a certain probability of being chosen. We also have various possible plaintexts m and each one has a certain probability P(M=m). These probably do not all have the same probability. For example, the message attack at noon is usually more probable than two plus two equals seven. Finally, each possible ciphertext c has a probability P(C=c).

We say that a cryptosystem has perfect secrecy if

P(M=mC=c)=P(M=m)

for all possible plaintexts m and all possible ciphertexts c. In other words, knowledge of the ciphertext never changes the probability that a given plaintext occurs. This means that eavesdropping gives no advantage to Eve if she wants to guess the message.

We can now formalize what we claimed about the one-time pad.

Theorem

If the key is chosen uniformly randomly, then the one-time pad has perfect secrecy.

Proof. We need to show that P(M=mC=c)=P(M=m) for each pair m, c.

Let’s say that there are N keys, each of which has probability 1/N. We start by showing that each possible ciphertext c also has probability 1/N. Start with any plaintext m. If c is the ciphertext, then the key is k=mc. Therefore, the probability that c is the ciphertext is the probability that mc is the key, namely 1/N, since all keys have this probability. Therefore, we have proved that

P(C=cM=m)=1/N

for each c and m.

We now combine the contributions from the various possibilities for m. Note that if we sum P(M=m) over all possible m, then

mP(M=m)=1
(4.2)

since this is the probability of the plaintext existing. Similarly, the event C=c can be split into the disjoint sets (C=cM=m), which yields

P(C=c)=mP(C=cM=m)=mP(C=c|M=m)P(M=m)(by(4.1))=m1NP(M=m)=1N(by(4.2)).

Applying Equation (4.1) twice yields

P(M=mC=c)P(C=c)=P(C=cM=m)=P(C=cM=m)P(M=m).

Since we have already proved that P(C=c)=1/N=P(C=cM=m), we can multiply by N to obtain

P(M=mC=c)=P(M=m), 

which says that the one-time pad has perfect secrecy.

One of the difficulties with using the one-time pad is that the number of possible keys is as least as large the number of possible messages. Unfortunately, this is required for perfect secrecy:

Proposition

If a cryptosystem has perfect secrecy, then the number of possible keys is greater than or equal to the number of possible plaintexts.

Proof. Let M be the number of possible plaintexts and let N be the number of possible keys. Suppose M>N. Let c be a ciphertext. For each key k, decrypt c using the key k. This gives N possible plaintexts, and these are the only plaintexts that can encrypt to c. Since M>N, there is some plaintext m that is not a decryption of c. Therefore,

P(M=mC=c)=0P(M=m).

This contradicts the assumption that the system has perfect secrecy. Therefore, MN.

Example

Suppose a parent goes to the pet store to buy a pet for a child’s birthday. The store sells 30 different pets with 3-letter names (ant, bat, cat, dog, eel, elk, ...). The parent chooses a pet at random, encrypts its name with a shift cipher, and sends the ciphertext to let the other parent know what has been bought. The child intercepts the message, which is ZBL. The child hopes the present is a dog. Since DOG is not a shift of ZBL, the child realizes that the conditional probability

P(M=dogC=ZBL)=0

and is disappointed. Since P(M=dog)=1/30 (because there are 30 equally likely possibilities), we have P(M=dogC=ZBL)P(M=dog), so there is not perfect secrecy. This is because a given ciphertext has at most 26 possible corresponding plaintexts, so knowledge of the ciphertext restricts the possibilities for the decryption. Then the child realizes that YAK is the only possible shift of ZBL, so P(M=yakC=ZBL)=1. This does not equal P(M=yak), so again we see that we don’t have perfect secrecy. But now the child is happy, being the only one in the neighborhood who will have a yak as a pet.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.113.188