20.4 Perfect Secrecy

Intuitively, the one-time pad provides perfect secrecy. In Section 4.4, we gave a mathematical meaning to this statement. In the present section, we repeat some of the arguments of that section and phrase some of the ideas in terms of entropy.

Suppose we have a cipher system with possible plaintexts P, ciphertexts C, and keys K. Each plaintext in P has a certain probability of occurring; some are more likely than others. The choice of a key in K is always assumed to be independent of the choice of plaintext. The possible ciphertexts in C have various probabilities, depending on the probabilities for P and K.

If Eve intercepts a ciphertext, how much information does she obtain for the key? In other words, what is H(K|C)? Initially, the uncertainty in the key was H(K). Has the knowledge of the ciphertext decreased the uncertainty?

Example

Suppose we have three possible plaintexts: a, b, c with probabilities .5, .3, .2 and two keys k1, k2 with probabilities .5 and .5. Suppose the possible ciphertexts are U, V, W. Let ek be the encryption function for the key k. Suppose

ek1(a)=U, ek1(b)=V, ek1(c)=Wek2(a)=U, ek2(b)=W, ek2(c)=V.

Let pP(a) denote the probability that the plaintext is a, etc. The probability that the ciphertext is U is

pC(U)=pK(k1)pP(a)+pK(k2)pP(a)=(.5)(.5)+(.5)(.5)=.50.

Similarly, we calculate pC(V)=.25 and pC(W)=.25.

Suppose someone intercepts a ciphertext. This gives some information on the plaintext. For example, if the ciphertext is U, then it can be deduced immediately that the plaintext was a. If the ciphertext is V, the plaintext was either b or c.

We can even say more: The probability that a ciphertext is V is .25, so the conditional probability that the plaintext was b, given that the ciphertext is V is

p(b|V)=p(P, C)(b, V)pC(V)=p(P, K)(b, k1)pC(V)=(.3)(.5).25=.6.

Similarly, p(c|V)=.4 and p(a|V)=0. We can also calculate

p(a|W)=0, p(b|W)=.6, p(c|W)=.4.

Note that the original probabilities of the plaintexts were .5, .3, and .2; knowledge of the ciphertext allows us to revise the probabilities. Therefore, the ciphertext gives us information about the plaintext. We can quantify this via the concept of conditional entropy. First, the entropy of the plaintext is

H(P)=(.5log2(.5)+.3log2(.3)+.2log2(.2))=1.485.

The conditional entropy of P given C is

H(P|C)=x{a, b, c}Y{U, V, W}p(Y)p(x|Y)log2(p(x|Y))=.485.

Therefore, in the present example, the uncertainty for the plaintext decreases when the ciphertext is known.

On the other hand, we suspect that for the one-time pad the ciphertext yields no information about the plaintext that was not known before. In other words, the uncertainty for the plaintext should equal the uncertainty for the plaintext given the ciphertext. This leads us to the following definition and theorem.

Definition

A cryptosystem has perfect secrecy if H(P|C)=H(P).

Theorem

The one-time pad has perfect secrecy.

Proof. Recall that the basic setup is the following: There is an alphabet with Z letters (for example, Z could be 2 or 26). The possible plaintexts consist of strings of characters of length L. The ciphertexts are strings of characters of length L. There are ZL keys, each consisting of a sequence of length L denoting the various shifts to be used. The keys are chosen randomly, so each occurs with probability 1/ZL.

Let cC be a possible ciphertext. As before, we calculate the probability that c occurs:

pC(c)=xP, kKek(x)=cpP(x)pK(k).

Here ek(x) denotes the ciphertext obtained by encrypting x using the key k. The sum is over those pairs x, k such that k encrypts x to c. Note that we have used the independence of P and K to write joint probability p(P, K)(x, k) as the product of the individual probabilities.

In the one-time pad, every key has equal probability 1/ZL, so we can replace pK(k) in the above sum by 1/ZL. We obtain

pC(c)=1ZLxP, kKek(x)=cpP(x).

We now use another important feature of the one-time pad: For each plaintext x and each ciphertext c, there is exactly one key k such that ek(x)=c. Therefore, every xP occurs exactly once in the preceding sum, so we have ZLxPpP(x). But the sum of the probabilities of all possible plaintexts is 1, so we obtain

pC(c)=1ZL.

This confirms what we already suspected: Every ciphertext occurs with equal probability.

Now let’s calculate some entropies. Since K and C each have equal probabilities for all ZL possibilities, we have

H(K)=H(C)=log2(ZL).

We now calculate H(P, K, C) in two different ways. Since knowing (P, K, C) is the same as knowing (P, K), we have

H(P, K, C)=H(P, K)=H(P)+H(K).

The last equality is because P and K are independent. Also, knowing (P, K, C) is the same as knowing (P, C) since C and P determine K for the one-time pad. Therefore,

H(P, K, C)=H(P, C)=H(P|C)+H(C).

The last equality is the chain rule. Equating the two expressions, and using the fact that H(K)=H(C), we obtain H(P|C)=H(P). This proves that the one-time pad has perfect secrecy.

The preceding proof yields the following more general result. Let #K denote the number of possible keys, etc.

Theorem

Consider a cryptosystem such that

  1. Every key has probability 1/#K.

  2. For each xP and cC there is exactly one kK such that ek(x)=c.

Then this cryptosystem has perfect secrecy.

It is easy to deduce from condition (2) that #C=#K. Conversely, it can be shown that if #P=#C=#K and the system has perfect secrecy, then (1) and (2) hold (see [Stinson, Theorem 2.4]).

It is natural to ask how the preceding concepts apply to RSA. The possibly surprising answer is that H(P|C)=0; namely, the ciphertext determines the plaintext. The reason is that entropy does not take into account computation time. The fact that it might take billions of years to factor n is irrelevant. What counts is that all the information needed to recover the plaintext is contained in the knowledge of n, e, and c.

The more relevant concept for RSA is the computational complexity of breaking the system.

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

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