Docsity

Adaptively-Secure Non-Interactive Zero Knowledge - Lecture Notes | CMSC 858K, Study notes of Computer Science

Toggle sidebar
bg1
CMSC 858K — Advanced Topics in Cryptography February 12, 2004
Lecture 6
Lecturer: Jonathan Katz Scribe(s): Omer Horvitz Zhongchao Yu
John Trafton Akhil Gupta
1 Introduction
In this lecture, we show how to construct a public-key encryption scheme secure against
non-adaptive chosen-ciphertext attacks, given a semantically-secure public-key encryption
scheme and an adaptively-secure non-interactive zero-knowledge proof system (in the com-
mon random string model).
2 Adaptively-Secure Non-Interactive Zero-Knowledge
We begin with a definition of a basic case of non-interactive zero-knowledge.
Definition 1 A pair of ppt algorithms (P,V) is a non-interactive zero-knowledge (NIZK )
proof system for a language L∈NP if there exists some polynomial poly such that:
1. Completeness (for x∈L,Pgenerates proofs that Vaccepts): For all x∈L∩ {0,1}k
and all witnesses wfor x,
Pr[r← {0,1}poly(k); Π ← P(r, x, w) : V(r, x, Π) = 1] = 1.
2. Soundness (for x6∈ L, no prover can generate proofs that Vaccepts with better than
negligible probability): For all x∈ {0,1}k\Land all (possibly unbounded) algorithms
P∗, the following is negligible in k:
Pr[r← {0,1}poly(k); Π ← P∗(r, x) : V(r, x, Π) = 1].
3. Zero-knowledge (for x∈L, the view of any verifier can be efficiently simulated without
knowledge of a witness): There exists a ppt algorithm Sim such that for any x∈
L∩ {0,1}kand any witness wfor x, the following ensembles are computationally
indistinguishable:
(1) nr← {0,1}poly(k); Π ← P(r, x, w) : (r, x, Π)ok
(2) {(r, Π) ←Sim(x) : (r,x, Π)}k.
♦
For our purposes, we need to strengthen the definition in two ways. In the soundness
requirement, we would like to also protect against a prover who chooses x6∈ Lafter seeing
the common random string r. In the zero-knowledge requirement, we would like to make
the simulator’s job a little harder by making it output a simulated common random string
6-1
pf3
pf4
pf5

Partial preview of the text

Download Adaptively-Secure Non-Interactive Zero Knowledge - Lecture Notes | CMSC 858K and more Study notes Computer Science in PDF only on Docsity!

CMSC 858K — Advanced Topics in Cryptography February 12, 2004

Lecture 6

Lecturer: Jonathan Katz Scribe(s): Omer Horvitz Zhongchao Yu John Trafton Akhil Gupta

1 Introduction

In this lecture, we show how to construct a public-key encryption scheme secure against non-adaptive chosen-ciphertext attacks, given a semantically-secure public-key encryption scheme and an adaptively-secure non-interactive zero-knowledge proof system (in the com- mon random string model).

2 Adaptively-Secure Non-Interactive Zero-Knowledge

We begin with a definition of a basic case of non-interactive zero-knowledge.

Definition 1 A pair of ppt algorithms (P, V) is a non-interactive zero-knowledge (NIZK ) proof system for a language L ∈ NP if there exists some polynomial poly such that:

  1. Completeness (for x ∈ L, P generates proofs that V accepts): For all x ∈ L ∩ { 0 , 1 }k and all witnesses w for x,

Pr[r ← { 0 , 1 }poly(k)^ ; Π ← P(r, x, w) : V(r, x, Π) = 1] = 1.

  1. Soundness (for x 6 ∈ L, no prover can generate proofs that V accepts with better than negligible probability): For all x ∈ { 0 , 1 }k^ \L and all (possibly unbounded) algorithms P∗, the following is negligible in k:

Pr[r ← { 0 , 1 }poly(k)^ ; Π ← P∗(r, x) : V(r, x, Π) = 1].

  1. Zero-knowledge (for x ∈ L, the view of any verifier can be efficiently simulated without knowledge of a witness): There exists a ppt algorithm Sim such that for any x ∈ L ∩ { 0 , 1 }k^ and any witness w for x, the following ensembles are computationally indistinguishable:

(1)

r ← { 0 , 1 }poly(k)^ ; Π ← P(r, x, w) : (r, x, Π)

k (2) {(r, Π) ← Sim(x) : (r, x, Π)}k.

♦ For our purposes, we need to strengthen the definition in two ways. In the soundness requirement, we would like to also protect against a prover who chooses x 6 ∈ L after seeing the common random string r. In the zero-knowledge requirement, we would like to make the simulator’s job a little harder by making it output a simulated common random string

r first, and only then supplying it with an x ∈ L for which it needs to generate a simulated proof. In particular, such an x may be chosen adaptively (by an adversary, say) based on r. In the following, we use PrE[A] to denote the probability that event A occurs in the probabilistic experiment E.

Definition 2 A pair of ppt algorithms (P, V) is an adaptive, non-interactive zero-knowledge (aNIZK 1 ) proof system for a language L ∈ NP if there exists a polynomial poly such that:

  1. Completeness: Same as above.
  2. Soundness (now, the cheating prover may choose x 6 ∈ L after seeing r): For all (possibly unbounded) algorithms P ∗, the following is negligible in k:

Pr

[

r ← { 0 , 1 }poly(k)^ ; (x, Π) ← P∗(r) : V(r, x, Π) = 1 ∧ x ∈ { 0 , 1 }k^ \ L

]

  1. Zero-knowledge (simulator must output r first, is then given x, and asked to produce a simulated proof): Let (Sim 1 , Sim 2 ), (A 1 , A 2 ) be a pair of two-staged algorithms (we may assume that the first stage outputs some state information which is passed as input to the second stage; this will be implicit). Consider the following experiments:

Game ZKreal Game ZKsim r ← { 0 , 1 }poly(k) (x, w) ← A 1 (r) (x ∈ L ∩ { 0 , 1 }k) Π ← P(r, x, w) b ← A 2 (r, x, Π)

r ← Sim 1 (1k^ ) (x, w) ← A 1 (r) (x ∈ L ∩ { 0 , 1 }k) Π ← Sim 2 (x) b ← A 2 (r, x, Π)

We require that there exist a ppt simulator (Sim 1 , Sim 2 ) such that for any ppt algo- rithm (A 1 , A 2 ) the following is negligible in k:

|PrZKreal [A 2 outputs 0] − PrZKsim [A 2 outputs 0]|.

Equivalently, the “real” game ZKreal is computationally indistinguishable from the “simulated” game ZKsim. (In other words, the adversary cannot tell whether it is participating in the first or the second experiment (except with negligible probability). A 2 ’s output can be thought of as its guess towards which experiment it is in. This means that the simulator is able to simulate the adversary’s view in the real execution.) ♦ To simplify the notation a little, we will usually drop the stage identifier for A; when we refer to A’s output in the experiment, we will mean A 2 ’s output.

3 A Public-Key Encryption Scheme Secure Against Non-

Adaptive Chosen-Ciphertext Attacks

Let (Gen, E, D) be a public-key encryption scheme and (P, V) be an adaptively-secure NIZK proof system for languages in NP. The following construction is due to Naor and Yung [1]. (^1) This notation is non-standard.

To that effect, we introduce a sequence of intermediate games, and show that A cannot distinguish each game from its subsequent one; the theorem will then follow. Let Sim = (Sim 1 , Sim 2 ) be the simulator for our proof system. In the first game, we replace the random string and legitimate proof of game CCA1 0 with a simulated random string and simulated proof. Once again, the differences between the new game and game CCA1 0 are highlighted.

Game 1 (pk 1 , sk 1 ), (pk 2 , sk 2 ) ← Gen(1k^ ) r ← Sim 1 (

) pk∗^ = (pk 1 , pk 2 , r), sk∗^ = sk 1 (m 0 , m 1 ) ← AD ∗ sk∗ (·) (pk∗) w 1 , w 2 ← { 0 , 1 }∗ c 1 = Epk 1 (m 0 ; w 1 ), c 2 = Epk 2 (m 0 ; w 2 ) Π ← Sim 2 ((c 1 , c 2 )) b ← A(pk∗, c 1 , c 2 , Π)

Claim 2 |PrCCA1 0 [A outputs 0] − Pr 1 [A outputs 0]| is negligible.

Proof By reduction to the zero-knowledge property of the proof system: we use A to construct an algorithm B that attempts to distinguish real from simulated proofs.

B(1k) Receive r as first-stage input; (pk 1 , sk 1 ), (pk 2 , sk 2 ) ← Gen(1k); pk∗^ = (pk 1 , pk 2 , r); sk∗^ = sk 1 ; (m 0 , m 1 ) ← AD ∗ sk∗ (·) (pk∗); // note that B has no trouble // simulating the decryption oracle for A w 1 , w 2 ← { 0 , 1 }∗; c 1 = Epk 1 (m 0 ; w 1 ), c 2 = Epk 2 (m 0 ; w 2 ); Output ((c 1 , c 2 ), (w 1 , w 2 , m 0 )) as first-stage output; Receive Π as second-stage input; b ← A(pk∗, c 1 , c 2 , Π); Output b as second-stage output.

Now, when the inputs to B are a random string r and a real proof Π, then A’s view in the above experiment is precisely its view in game CCA1 0 , and so PrZKreal [B outputs 0] = PrCCA1 0 [A outputs 0]. On the other hand, when the inputs to B are a simulated string and a simulated proof, A’s view in B is precisely its view in game 1, and so PrZKsim [B outputs 0] = Pr 1 [A outputs 0]. Since |PrZKreal [B outputs 0] − PrZKsim [B outputs 0]| is negligible (since the proof system is adaptively-secure NIZK), we have that

|PrCCA1 0 [A outputs 0] − Pr 1 [A outputs 0]|

is negligible as well.

The second game differs from game 1 in that it does not double-encrypt m 0 , but instead encrypts m 0 once and m 1 once.

Game 2 (pk 1 , sk 1 ), (pk 2 , sk 2 ) ← Gen(1k) r ← Sim 1 (1k) pk∗^ = (pk 1 , pk 2 , r), sk∗^ = sk 1 (m 0 , m 1 ) ← AD sk∗∗^ (·) (pk∗) w 1 , w 2 ← { 0 , 1 }∗ c 1 = Epk 1 (m 0 ; w 1 ), c 2 = E 2 (m 1 ; w 2 ) Π ← Sim 2 ((c 1 , c 2 )) b ← A(pk∗, c 1 , c 2 , Π)

Note that in the above, the simulator is given as input encryptions of two different mes- sages. Such an input is not in L, and in general there is not much we can say about the simulator’s output in this case. However, we will see that in this particular case the game is indistinguishable to A because the semantic security of the underlying encryption scheme implies that encryptions of m 0 are indistinguishable from encryptions of m 1. Of course, this will require a formal proof.

Claim 3 |Pr 1 [A outputs 0] − Pr 2 [A outputs 0]| is negligible.

Proof We use A to construct B that attempts to break the semantic security of the underlying scheme. Recall that B is given a public key, outputs two messages (m 0 , m 1 ), is given the encryption of one of these, and has to guess which one. But B does not have access to a decryption oracle.

B(pk) Set pk 2 = pk; (pk 1 , sk 1 ) ← Gen(1k^ ); r ← Sim 1 (1k); pk∗^ = (pk 1 , pk 2 , r), sk∗^ = sk 1 ; (m 0 , m 1 ) ← AD

∗ sk∗ (·) (pk∗); // note that B has no trouble // simulating the decryption oracle for A Output (m 0 , m 1 ); Receive c 2 (an encryption of either m 0 or m 1 using (unknown) random tape w 2 ); w 1 ← { 0 , 1 }∗; c 1 = Epk 1 (m 0 ; w 1 ); Π ← Sim 2 ((c 1 , c 2 )); b ← A(pk∗, c 1 , c 2 , Π); Output b.

Now, when c 2 is an encryption of m 0 , then A’s view above is precisely its view in game 1. On the other hand, when c 2 is an encryption of m 1 , then A’s view above is precisely its view in game 2. Therefore, the probability that A distinguishes game 1 from game 2 is precisely the probability that B distinguishes an encryption of m 0 from an encryption of m 1 , which is negligible by the semantic security of the underlying encryption scheme.

In the same way as above, we would now like to “switch” c 1 from being an encryption of m 0 to being an encryption of m 1. Here, however, a potential problem arises! To prove