*Scribed by Bharath Ramsundar*

**Summary**

Last time we introduced the setting of *one-time symmetric key encryption*, defined the notion of *semantic security*, and proved its equivalence to *message indistinguishability*.

Today we complete the proof of equivalence (found in the notes for last class), discuss the notion of *pseudorandom generator*, and see that it is precisely the primitive that is needed in order to have message-indistinguishable (and hence semantically secure) one-time encryption. Finally, we shall introduce the basic definition of security for protocols which send multiple messages with the same key.

**1. Pseudorandom Generators And One-Time Encryption**

Intuitively, a Pseudorandom Generator is a function that takes a short random string and stretches it to a longer string which is almost random, in the sense that reasonably complex algorithms cannot differentiate the new string from truly random strings with more than negligible probability.

Definition 1[Pseudorandom Generator] A function is a -secure pseudorandom generator if for every boolean function of complexity at most we have

(We use the notation for the uniform distribution over .)

The definition is interesting when (otherwise the generator can simply output the first m bits of the input, and satisfy the definition with and arbitrarily large ). Typical parameters we may be interested in are , , and , that is we want to be very small, to be large, to be huge, and to be tiny. There are some unavoidable trade-offs between these parameters.

Lemma 2If is pseudorandom with , then .

*Proof:* Pick an arbitrary . Define

It is clear that we may implement with an algorithm of complexity : all this algorithm has to do is store the value of (which takes space ) and compare its input to the stored value (which takes time ) for total complexity of . Now, note that

since at least when . Similarly, note that since only when . Now, by the pseudorandomness of , we have that . With some rearranging, this expression implies that

which then implies and consequently ◻

Exercise 1Prove that if is pseudorandom, and , then

Suppose we have a pseudorandom generator as above. Consider the following encryption scheme:

- Given a key and a message ,
- Given a ciphertext and a key ,

(The XOR operation is applied bit-wise.)

It’s clear by construction that the encryption scheme is correct. Regarding the security, we have

Lemma 3If is -pseudorandom, then as defined above is -message indistinguishable for one-time encryption.

*Proof:* Suppose that is not -message indistinguishable for one-time encryption. Then messages and algorithm of complexity at most such that

By using the definition of we obtain

Now, we can add and subtract the term and use the triangle inequality to obtain that added to is greater than . At least one of the two terms in the previous expression must be greater that . Suppose without loss of generality that the first term is greater than

Now define . Then since is a bijection, . Consequently,

Thus, since the complexity of is at most and is plus an xor operation (which takes time ), is of complexity at most . Thus, is not -pseudorandom since there exists an algorithm of complexity at most that can distinguish between ‘s output and random strings with probability greater than . Contradiction. Thus is -message indistinguishable. ◻

**2. Security for Multiple Encryptions: Plain Version**

In the real world, we often need to send more than just one message. Consequently, we have to create new definitions of security for such situations, where we use the same key to send multiple messages. There are in fact multiple possible definitions of security in this scenario. Today we shall only introduce the simplest definition.

Definition 4[Message indistinguishability for multiple encryptions] is -message indistinguishable for encryptions if for every messages , and every of complexity we have

Similarly, we define semantic security, and the asymptotic versions.

Exercise 2Prove that no encryption scheme in which is deterministic (such as the scheme for one-time encryption described above) can be secure even for 2 encryptions.

Encryption in some versions of Microsoft Office is deterministic and thus fails to satisfy this definition. (This is just a symptom of bigger problems; the schemes in those versions of Office are considered completely broken.)

If we allow the encryption algorithm to keep *state* information, then a pseudorandom generator is sufficient to meet this definition. Indeed, usually pseudorandom generators designed for such applications, including RC4, are optimized for this kind of “stateful multiple encryption.”

Next time, we shall consider a stronger model of multiple message security which will be secure against *Chosen Plaintext Attacks*.