



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




U.C. Berkeley — CS276: Cryptography Handout N Luca Trevisan March 17, 2009
Scribed by Matt Finifter, posted April 8, 2009
Today we begin to talk about public-key cryptography, starting from public-key en- cryption.
We define the public-key analog of the weakest form of security we studied in the private-key setting: message-indistinguishability for one encryption. Because of the public-key setting, in which everybody, including the adversary, has the ability to encrypt messages, this is already equivalent to CPA security.
We then describe the El Gamal cryptosystem, which is message-indistinguishable (and hence CPA-secure) under the plausible Decision Diffie-Hellman assumption.
So far, we have studied the setting in which two parties, Alice and Bob, share a secret key K and use it to communicate securely over an unreliable channel. In many cases, it is not difficult for the two parties to create and share the secret key; for example, when we connect a laptop to a wireless router, we can enter the same password both into the router and into the laptop, and, before we begin to do online banking, our bank can send us a password in the physical mail, and so on.
In many other situations, however, the insecure channel is the only communication device available to the parties, so it is not possible to share a secret key in advance. A general problem of private-key cryptography is also that, in a large network, the number of required secret keys grows with the square of the size of the network.
In public-key cryptography, every party generates two keys: a secret key SK and a public key P K. The secret key is known only to the party who generated it, while the public key is known to everybody.
(For public-key cryptosystems to work, it is important that everybody is aware of, or has secure access to, everybody else’s public key. A mechanism for the secure exchange of public keys is called a Public Key Infrastructure (PKI). In a network model in which adversaries are passive, meaning that they only eavesdrop on communication, the parties can just send each other’s public keys over the network. In a network
that has active adversaries, who can inject their own packets and drop other users’ packets, creating a public-key infrastructure is a very difficult problem, to which we may return when we talk about network protocols. For now we assume that either the adversary is passive or that a PKI is in place.)
As in the private-key setting, we will be concerned with two problems: privacy, that is the communication of data so that an eavesdropper can gain no information about it, and authentication, which guarantees to the recipient the identity of the sender. The first task is solved by public-key encryption and the second task is solved by signature schemes.
A public-key encryption scheme is defined by three efficient algorithms (G, E, D) such that
randomness of E
[D(SK, E(P K, m)) = m] = 1
A basic definition of security is message-indistinguishability for one encryption.
Definition 1 We say that a public-key encryption scheme (G, E, D) is (t, ) message- indistinguishable if for every algorithm A of complexity ≤ t and for every two messages m 1 , m 2 ,
∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣
randomness of E
[A(P K, E(P K, m 1 )) = 1]
Definition 2 (Decision Diffie-Hellman Assumption) A distribution D over triples (G, g, q), where G is a cyclic group of q elements and g is a generator, satisfies the (t, ) Decision Diffie-Hellman Assumption if for every algorithm A of complexity ≤ t we have
∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣
(G, g, q) ∼ D x, y, z ∼ { 0 ,... , q − 1 }
[A(G, g, q, gx, gy, gz^ ) = 1]
(G, g, q) ∼ D x, y ∼ { 0 ,... , q − 1 }
[A(G, g, q, gx, gy, gxy) = 1]
Note that the El Gamal assumption may be plausibly satisfied even by a fixed group G and a fixed generator g.
The El Gamal encryption scheme works as follows. Let D be a distribution over (G, g, q) that satisfies the Decision Diffie-Hellman assumption:
The decryption algorithm works as follows. c 1 is gr^ (as returned by E), so b = grx. c 2 , as returned by E, is ar^ · m, where a is gx. This means that c 2 = grx^ · m. We see that c 2 = b · m, which is why multiplying c 2 by b−^1 correctly yields m.
Theorem 3 Suppose D is a distribution that satisfies the (t, ) Decision Diffie-Hellman assumption and that it is possible to perform multiplication in time ≤ r in the groups G occurring in D.
Then the El Gamal cryptosystem is (t − r, 2 ) message-indistinguishable.
Proof: Let A be an algorithm of complexity ≤ t − r and fix any two messages m 1 , m 2. We want to prove
| (^) P[A(G, g, q, gx, gr, gxr^ · m 1 ) = 1] − (^) P[A(G, g, q, gx, gr, gxr^ · m 2 ) = 1]| ≤ 2
(From now, we shall not write the dependency on G, g, q.)
We utilize a variant of the encryption algorithm that uses a random group element gy^ (instead of gxr) as the multiplier for m.^1
| (^) P[A(gx, gr, gxr^ · m 1 ) = 1] − (^) P[A(gx, gr, gxr^ · m 2 ) = 1]| (1)
≤ | (^) P[A(G, g, q, gx, gr, gxr^ · m 1 ) = 1] − (^) P[A(gx, gr, gy^ · m 1 ) = 1]| (2)
+| (^) P[A(gx, gr, gy^ · m 1 ) = 1] − (^) P[A(gx, gr, gy^ · m 2 ) = 1]| (3)
+| (^) P[A(gx, gr, gxr^ · m 2 ) = 1] − (^) P[A(gx, gr, gy^ · m 2 ) = 1]| (4)
Each of the expressions in (2) and (4) is ≤ due to the (t, ) Decision Diffie-Hellman Assumption. There is an extra factor of m 1 or m 2 , respectively, but the D.D.H. still holds in this case. Informally, multiplying a group element that looks random by a fixed element yields another random-looking element. We can formalize this as follows:
We claim that if G, g, q satisfies the (t, ) Decision Diffie-Hellman Assumption, and r is an upper bound to the time it takes to compute products in G, then for all group elements m and for all algorithms A of complexity ≤ t − r
| (^) P[A(gx, gy, gxy^ · m) = 1] − (^) P[A(gx, gy, gz^ · m) = 1]| ≤ (^1) This would not actually function as an encryption algorithm, but we can still consider it, as the construction is well-defined.