Shafi Goldwasser†, Silvio Micali†, and Charles Rackoff‡
Abstract. Usually, a proof of a theorem contains more knowledge than the mere fact that the theorem is true. For instance, to prove that a graph is Hamiltonian it suffices to exhibit a Hamiltonian tour in it; however, this seems to contain more knowledge than the single bit Hamiltonian/non-Hamiltonian.
In this paper a computational complexity theory of the "knowledge" contained in a proof is developed. Zero-knowledge proofs are defined as those proofs that convey no additional knowledge other than the correctness of the proposition in question. Examples of zero-knowledge proof systems are given for the languages of quadratic residuosity and quadratic nonresiduosity. These are the first examples of zero-knowledge proofs for languages not known to be efficiently recognizable.
Key words. cryptography, zero knowledge, interactive proofs, quadratic residues
AMS(MOS) subject classifications. 68Q15, 94A60
- Introduction. It is often regarded that saying a language is in NP (that is, acceptable in nondeterministic polynomial time) is equivalent to saying that there is a polynomial time "proof system" for . The proof system we have in mind is one where on input , a "prover" creates a string , and the "verifier" then computes on and in time polynomial in the length of the binary representation of to check that is indeed in . It is reasonable to ask if there is a more general, and perhaps more natural, notion of a polynomial time proof system. This paper proposes one such notion.
We will still allow the verifier only polynomial time and the prover arbitrary computing power, but will now allow both parties to flip unbiased coins. The result is a probabilistic version of NP, where a small probability of error is allowed. However, to obtain what appears to be the full generality of this idea, we must also allow the prover and verifier to interact (i.e., to talk back and forth) and to keep secret their coin tosses. We call these proof systems "interactive proof systems." This notion is formally defined in § 2, where we also define what it means for a language to have an interactive proof system.
It is far from clear how to use this power of interaction. Languages with nondeterministic polynomial time algorithms or with probabilistic polynomial time algorithms have proof systems with little or no interaction. We would therefore like examples of languages that appear to have neither nondeterministic nor probabilistic polynomial time algorithms, and yet have interactive proof systems. Although we do not present any such examples here, there are now examples in the literature. Using ideas from an initial version of this paper [GMR] Goldreich, Micali, and Wigderson [GMW] have shown that the "graph nonisomorphism" language has an interactive
* Received by the editors August 26, 1985; accepted for publication (in revised form) April 18, 1988. A preliminary version of this paper appeared in the Proceedings of the 27th Annual IEEE Symposium on Foundations of Computer Science, 1986, pp. 174-187. Editor's Note. This paper was originally scheduled to appear in the February 1988 Special Issue on Cryptography (SIAM J. Comput., 17 (1988)). † Laboratory for Computer Science, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139. The work of these authors was supported by National Science Foundation grants DCR-84-13577 and DCR-85-09905. ‡ Computer Science Department, University of Toronto, Toronto, QNT M5S 1A4 Canada. The work of this author was supported by the Natural Sciences and Engineering Research Council of Canada under grant A3611.
proof system. Independently of this paper, Babai and Szemeredi [BS] show that certain matrix group problems have what they call “Arthur–Merlin” proof systems, which immediately implies that they have interactive proof systems. In fact, the notion of an Arthur–Merlin proof system consists of a restricted interactive proof system in which the prover sees the coin flips of the verifier. Nevertheless, Goldwasser and Sipser [GS] have shown that a language has an interactive proof system if and only if it has an Arthur–Merlin proof system.
It appears, however, that our notion of interactive proof systems generalizes in the right way to attack a novel problem. The main purpose of this current paper, in fact, is to use interactive proof systems to investigate a natural question; how much knowledge is transmitted to the verifier in an interactive proof system for ? For example, consider SAT, the NP-complete language of satisfiable sentences of the propositional calculus. In the obvious proof system, to prove , the prover gives a satisfying assignment for the formula , which the verifier then checks in polynomial time. This assignment gives the verifier much more knowledge than merely the fact that ; it also gives a satisfying assignment. At the other extreme, every language that can be accepted in probabilistic polynomial time has a proof system in which the prover does nothing, and hence gives no knowledge to the verifier.
We say an interactive proof system for is zero-knowledge if for each , the prover tells the verifier essentially nothing, other than that ; this should be the case even if the verifier chooses not to follow the proof system but instead tries (in polynomial time) to trick the prover into revealing something. The notion of zero-knowledge is formally defined in § 3. This definition is an important contribution of this paper.
The main technical contributions of this paper are the proofs in §§ 5 and 6 that the languages QR and QNR (defined below) both have zero-knowledge interactive proof systems. These are the first zero-knowledge protocols demonstrated for languages not known to be recognizable in probabilistic polynomial time. To understand the languages QR and QNR, it helps to read the (brief) number theory background given in § 4. However, for now, let be integers, , such that ; we say that is a quadratic residue mod if for some ; if not, we say that is a quadratic nonresidue mod . We define
(Actually, QNR will be defined slightly differently in § 4.) Both QR and QNR are in NP, and thus possess an elementary proof system. For instance, to prove membership in QNR, the prover just sends 's factorization. But looking ahead to zero-knowledge proof systems, let us discuss a more interesting example of a proof system for QNR.
Example 1. Let us call the prover and the verifier . Say that the input is . Let , where is the length of the binary representation of . We will now describe (omitting some details) an interactive proof system for QNR. begins by flipping coins to obtain random bits . then flips additional coins to obtain a string , from which computes such that each is a random . then computes as follows: for each , if then ; if then . then sends to . For each , computes (somehow) whether or not is a quadratic residue mod , and sends a sequence of bits , where if and only if is a quadratic residue mod . checks if for every , and if so is “convinced” that .
It is not hard to see that if and both parties follow the protocol, then will become "convinced." On the other hand, if is a quadratic residue mod , then so is each , and every value for is equally likely; since does not see the sequence , the probability that every (and hence that will be convinced) is . So this is an interactive proof system for QNR. Let us now address the question of how much knowledge may release.
It is an interesting question how zero-knowledge should be defined. If the prover is trying to prove to the verifier that is a quadratic residue mod , then certainly the verifier should not be able to trick the prover into revealing a square root of mod , or the factorization of , or any information which would help the verifier to compute these things much faster than before. In fact, the prover should not reveal anything which would help the verifier compute anything much faster than before. The way to state this formally seems to be that what the verifier sees in the protocol (even if he cheats) should be something which the verifier could have computed for himself, merely from the fact that . Of course, what the verifier sees in the protocol is really a probability distribution. Thus, zero-knowledge means that one can compute in polynomial time, from , without a prover, the same (or almost the same) probability distribution that the verifier would see with the prover. This is defined formally in § 3. Here, let us informally discuss whether the above interactive proof system for QNR is zero-knowledge.
Consider a pair , and say that follows the protocol. Can obtain any additional knowledge? For the moment, assume that follows the protocol. "sees" distributed according to a particular distribution. Without any help from a prover, we can quickly generate a random string according to this distribution: just choose and randomly, and then compute from them; then compute for each .
Now what if were to cheat? could begin by setting , and then behave correctly. Consider now the induced distribution on ; in order to compute a random member of it (without help from a prover), we must compute whether or not 42 is a quadratic residue , given and a quadratic nonresidue . At this time it is not known how to compute this in polynomial time, so this proof system may not be zero-knowledge.
A zero-knowledge proof system for QNR is given in § 6. The ideas of this proof system partially come from the secret exchanging protocol of Luby, Micali, and Rackoff [LMR] and are useful there as well. They have also proved useful in the oblivious transfer protocol of Fischer, Micali, Rackoff, and Witenberg [FMRW] and for the identification scheme of Feige, Fiat, and Shamir [FFS]. These ideas have also helped Goldreich, Micali, and Wigderson [GMW] to show that the languages of "graph isomorphism" and "graph nonisomorphism" have zero-knowledge interactive proof systems.
Although we find the idea of a zero-knowledge interactive proof system fascinating in itself, the main motivation for it and the main applications of it are in the area of cryptographic protocols. For example, in the secret exchanging protocol in [LMR], one person wishes to exchange a secret with another without giving away any additional knowledge. Ideas similar to those here must be used to even define this concept.
More generally, however, it often arises at some point in a protocol that wishes to convince of some fact. Say that we know that the protocol would be secure if at this point an angel or someone trusted were to tell (truthfully) if is telling the truth. We want the notion of zero-knowledge to be such that an appropriate zero-knowledge interactive proof system could be inserted at this point instead of the trusted party, and the whole protocol would remain secure. (Of course, would have to possess some additional information enabling her to implement the part of the prover efficiently.) In particular instances, we can prove that such substitution works, but a general framework for discussing protocols must exist before the general theorem can even be stated. However, based on intuition and experience, the authors (and many others who have studied these ideas since their initial appearance) believe that the definition of zero-knowledge proposed here has the required properties.
The most important development since these results first appeared is the proof by Goldreich, Micali, and Wigderson [GMW] that, subject to a common complexity theory assumption, every language in NP has a zero-knowledge interactive proof system. These proof systems for NP languages appear to have applications in just about every protocol problem. It is almost certain that these results will vastly simplify distributed cryptographic protocol design in the future, as demonstrated by the powerful results of [GMW2].
2. Interactive proof systems. Intuitively, what should we require from an efficient theorem-proving procedure? (1) That it should be possible to "prove" a true theorem. (2) That it should not be possible to "prove" a false theorem. (3) That communicating the "proof" should be efficient. Namely, regardless of how much time it takes to come up with the proof, its correctness should be efficiently verified.
The NP formalization of the concept of an efficient proof system captures one way of communicating a proof. In this section, we will generalize the NP proof system to capture a more general way of communicating a proof. The verifier will be a probabilistic polynomial time (in the length of the common input) machine that is able to exchange messages (strings) with the prover.
At the same time that we introduce probability into the proof system, we relax the classical notion of a "proof." Our verifier may erroneously be convinced of the truth of a proposition with a very small probability of error (less than for each positive constant and all sufficiently large input-sizes ).
We proceed to formally define the new system.
2.1. Interactive Turing machines and protocols.
Definition. An interactive Turing machine (ITM) is a Turing machine equipped with a read-only input tape, a work tape, a random tape, one read-only communication tape, and one write-only communication tape. The random tape contains an infinite sequence of random bits, and can be scanned only from left to right. We say that an interactive machine flips a coin, meaning that it reads the next bit in its own random tape.
Figure.
Fig. 1. An interactive protocol. — denotes a read/write head, a read-only head, a write-only head.
Definition. An interactive protocol is an ordered pair of ITM's and such that and share the same input tape, 's write-only communication tape is 's read-only communication tape and vice versa. Machine is not computationally bounded, while machine 's computation time is bounded by a polynomial in the length of the common input. The two machines take turns in being active, with being active first. During an active stage machine first performs some internal computation using its input tape, work tapes, communication tape and random tape; and, second, it writes a string (for ) on its write-only communication tape. The th message of is the entire string that writes on its communication tape during its th active stage. As soon as machine writes its message, it is deactivated and machine becomes active, unless the protocol has been terminated. Either machine can terminate the computation of the protocol by not sending any message in an active stage. Machine accepts (or rejects) the input by outputting accept (or reject) and terminating the protocol. The computation time of machine is the sum of the 's computation time during its active stages, and it is this time that is bounded by a polynomial in the length of the input, denoted .
2.2. Interactive proof systems.
Definition. Let be a language over . Let be an interactive protocol. We say that is an interactive proof system for if we have the following:
(1) For each , for sufficiently large in given as input to , halts and accepts with probability at least . (The probabilities here are taken over the coin tosses of and .)
(2) For each , for sufficiently large not in , for any ITM , on input to , accepts with probability at most . (The probabilities here are taken over the coin tosses of and .)
Remark 1. The above probability of error can be decreased, say to smaller than , by the standard technique of repeating the protocol many times and choosing to accept by majority vote.
We now argue that this definition captures what we intuitively want from an efficient proof system. Condition (1) essentially says that, if , will accept with overwhelming probability. Condition (2) says that, if is not in , there exists no strategy that succeeds with nonnegligible probability for convincing to accept. In fact, needs not to trust (or know the program of) the machine with which it is interacting. It is enough for to trust the randomness of its own coin tosses.
Similar to the NP proof system, note that the definition of an interactive proof system for a language emphasizes the "yes-instances": when a string is in the language, must be led to acceptance with high probability, but when a string is not in the language is not required to convince of the contrary.
A more general version of the above definition is where is not a Turing machine, but an infinite state machine. However it has been shown by Feldman in [F] that this adds no extra power to the model. In fact, he shows that with respect to language recognition it is sufficient for to be a deterministic PSPACE machine. The fact that is probabilistic is of importance to the more subtle definition of zero-knowledge, which is given in the next section.
We define IP, Interactive Polynomial time, to be the class of languages for which there exists interactive proof systems.
The first examples of a language in IP but not known to be in NP have been exhibited by Babai and Szemeredi [BS]. Their examples are "matrix group nonmembership" and "matrix group order," where the matrix groups over finite fields are represented by a list of generator matrices. The other, more well-known example of “graph nonisomorphism” is due to Goldreich, Micali, and Wigderson [GMW]. They have shown that the language of pairs of graphs that are nonisomorphic to each other is in IP.
2.3. Arthur–Merlin games. Babai independently conceived the notion of an “Arthur–Merlin Game,” an interactive proof system in which Merlin plays the role of and Arthur that of . The interaction, though, is less “liberal” than in our model since Merlin sees all the coin tosses of Arthur. A message from Arthur to Merlin can only consist of a randomly selected string. In an interactive proof system, instead, the verifier is allowed, given a polynomial time computable function , to secretly select a random string and transmit only to the prover (as in the interactive proof system for QNR of Example 1).
This restriction immediately implies that the languages recognized by an Arthur–Merlin game are a subset of those having an interactive proof system. Interestingly, Goldwasser and Sipser [GS] show that they are not a proper subset. However, there is value in having both definitions around. It is easier to design protocols using the interactive proof systems definition, and it is easier to prove complexity results using the Arthur–Merlin definition.
Though the ability to make secret random choices does not help us to recognize more languages, we believe that it is crucial for recognizing languages in zero-knowledge. We make precise this belief in the conjecture of § 3.7.
An Arthur–Merlin type of interactive proof system was already implicitly used in a paper by Blum [B1]. He showed an interactive protocol for recognizing the language of the Blum integers:
The prover’s goal was to demonstrate membership in BL without having to send 's prime factorization. In this proof system, the verifier talks only once and his message consists of sending the sequence of his coin tosses. Protocols of this type were also found by Goldwasser and Micali [GM1] to prove, without releasing the prime factorization membership in the languages:
- Zero-knowledge. Rather than giving the definition of zero-knowledge only for interactive proof systems, we will give a more general definition. We will define what it means for any interactive protocol to be zero-knowledge for a language , whether or not is a proof system for . Actually the definition will not depend on at all; as we shall see, it says that for every polynomial time , the distribution that “sees” on all its tapes, when interacting with on input , is “indistinguishable” from a distribution that can be computed from in polynomial time. We thus first focus on the notion of indistinguishability for random variables.
3.1. Indistinguishability of random variables. Throughout this paper, we will only consider families of random variables where the parameter is from a language , a particular subset of , and all random variables take values in . Let and be two families of random variables. We want to express the fact that, when the length of increases, essentially becomes “replaceable” by . To do this, we consider the following framework.
A random sample is selected either from or from and it is handed to a “judge.” After studying the sample, the judge will proclaim his verdict: 0 or 1. (We may interpret 0 as the judge’s decision that the sample came from ; 1 as the decision that the sample came from .) It is then natural to say that becomes “replaceable” by for long enough if, when increases, the verdict of any judge becomes “meaningless,” that is, essentially uncorrelated to the distribution from which the sample came.
There are two relevant parameters in this framework: the size of the sample and the amount of time the judge is given to produce his verdict. By bounding these two parameters in different ways we obtain different notions of indistinguishability for random variables. We focus on the three notions we believe to be the most important: equality, statistical indistinguishability, and computational indistinguishability. Roughly speaking, these notions correspond to the following restrictions on the relevant parameters. If the two families of random variables and are equal, then the judge’s verdict will be meaningless even if he is given samples of arbitrary size and he can study them for an arbitrary amount of time. We will define the two families to be statistically indistinguishable if the judge’s verdict becomes meaningless when he is given an infinite amount of time but only random, polynomial (in ) size samples to work on. We will define the two families to be computationally indistinguishable if the judge’s verdict becomes meaningless when he is only given polynomial ()-size samples and polynomial () time. Let us now proceed to formalize these notions.
Definition (Statistical indistinguishability). Let be a language. Two families of random variables and are statistically indistinguishable on if
for all constants and all sufficiently long .
Notice that, for and as above, if a “judge” is handed a polynomial (in ) size sample, having infinite computing power will not help him to decide whether it came from or . His answer will be essentially useless, as he will say “1” with essentially the same probability in both cases.
Example 2. Let assign equal probability to all strings of length , and let assign probability to all strings of length , except for , which is given probability 0 and for , which is given probability . Then and are two families of random variables statistically indistinguishable on .
To formalize the notion of computational indistinguishability we make use of nonuniformity (the reasons for this choice can be found in § 3.4). Thus, our “judge,” rather than being a polynomial time Turing machine, will be a poly-size family of circuits. That is a family of Boolean circuits with one Boolean output such that, for some constant , all have at most gates. In order to feed samples from our probability distributions to such circuits, we will consider only poly-bounded families of random variables, that is, families such that, for some constant , all random variable assigns positive probability only to strings whose lengths are exactly . If is a poly-bounded family of random variables and a poly-size family of circuits, we denote by the probability that outputs 1 on input a random string distributed according to . (Here we assume that strings assigned positive probability by have lengths equal to the number of Boolean inputs of .)
Definition (Computational indistinguishability). Let be a language. Two poly-bounded families of random variables and are computationally indistinguishable on if for all poly-size family of circuits , for all constants and all sufficiently long strings ,
This notion of computational indistinguishability was already used by Goldwasser and Micali [GM] in the context of encryption and by Yao [Y] in the context of pseudorandom generation. It is trivial that if and are identical, then they are statistically indistinguishable. It is also not hard to see that if and are statistically indistinguishable, then they are computationally indistinguishable, as follows. Let be a circuit and let be the set of inputs on which outputs 1. Since and are statistically indistinguishable, the value of will be in with almost exactly the same probability that the value of will be. Hence will be very close to .
Example 3. Consider a probabilistic encryption algorithm that is secure in the sense of Goldwasser and Micali [GM]; for integer, let and be the random variables taking as values the possible encryptions of 0 and 1, respectively, on security parameter . Then and are computationally indistinguishable on .
We believe that the notion of computational indistinguishability for random variables achieves the right level of generality. Thus we will call indistinguishable any two families of random variables that are computationally indistinguishable.
Remark 2. Let us point out the robustness of the last definition. In this definition, we are handing our computationally bounded "judge" only samples of size 1. This, however, is not restrictive. We note that two families of random variables and are computationally indistinguishable (with respect to samples of size 1) if and only if when is given a polynomial in number of input strings, each independently generated according to the distribution , then the probability of accepting is close to the probability of accepting when is used.
3.2. Approximability of random variables. We now formalize the notion that a random variable is essentially easy to generate. That is, there exists an efficient algorithm that randomly outputs strings in a way that is indistinguishable from .
Definition. Let be a probabilistic Turing machine that on input halts with probability 1. We denote by the random variable that, for each string , takes on with exactly the same probability that on input outputs .
Definition. Let be a language and a family of random variables. We say that is perfectly approximable on if there exists a probabilistic Turing machine , running in expected polynomial time, such that for all , is equal to . We say that is statistically (computationally) approximable on if there exists a probabilistic Turing machine , running in expected polynomial time, such that the families of random variables and are statistically (computationally) indistinguishable on .
In what follows, we will use approximability to mean computational approximability. We are now ready to define the notion of zero-knowledge.
3.3. Zero-knowledge protocols and proof systems. We first address the issue of a "cheating verifier," , who is allowed not to follow the protocol.
Definition. Let be an interactive protocol. Let be an interactive Turing machine that has as input and on an extra input tape , where the length of is bounded above by a polynomial in the length of . (Figure 1 must be emended to allow this extra tape.) When interacts with , sees only on its input tape, whereas sees . A good way to think of is as some knowledge about that the cheating already possesses. Alternatively, can be considered as the history of previous interactions that the cheating is trying to use to get knowledge from ; this is discussed in more detail in the next section. We assume that the total computation time of when interacting with will be bounded above by a polynomial in the length of .
For a run of the protocol on common input and extra input , we define the view of to be everything that sees. Namely, let (and ) be the strings contained in the random tapes of (and ). Say the computation of and , with these random choices, consist of turns with going first, where (and ) are the th messages of (and ), respectively. Then, we say that is the view of on inputs and , and let be the random variable whose value is this view. (Note that it would make no difference if we included in the view the material written by on its private tape, or excluded the strings that sends to , since these bits can be efficiently computed from the other bits of the view.) For convenience, we consider each view to be a string from of length exactly for some fixed .
Definition. Let be a language and a protocol. Let be as above. We say that is perfectly (statistically) (computationally) zero-knowledge on for if the family of random variables is perfectly (statistically) (computationally) approximable on
We say that is perfectly (statistically) (computationally) zero-knowledge on if it is perfectly (statistically) (computationally) zero-knowledge on for all probabilistic polynomial time ITM .
Note that the definition of being zero-knowledge (in some manner) for only depends on and not at all on . It might be less misleading to think of as being zero-knowledge for . A similar issue arises in the definition of an interactive proof system in § 2.2. Part (2) of this definition depends only on , and not at all on .
Computational zero-knowledge is certainly the most general of the above notions, and we will refer to it simply as zero-knowledge. Zero-knowledge really captures any information, which could not have been obtained efficiently in polynomial time, about members of . That is, if is zero-knowledge, it is not possible, in probabilistic polynomial time, to extract any information about members of by interacting with , not even by "cheating."
Definition. Let be a language. We say that is a perfectly (statistically) (computationally) zero-knowledge proof system for if it is an interactive proof system for and a perfectly (statistically) (computationally) zero-knowledge protocol on .
We will refer to computationally zero-knowledge proof systems (the most general notion of the three) simply as zero-knowledge proof systems. This notion is totally adequate in the real world. That is, if is a zero-knowledge proof system for , it is not possible in polynomial time (not even for a "cheating" ) to interact with and extract anything else besides proofs of membership in .
3.4. Some remarks about the above definitions. First, let us stress that the coin tosses of are an essential part of the notion of a view in the definition of zero-knowledge for . Consider the language of all composite integers and the following protocol . On input an integer , randomly selects an integer between 1 and and relatively prime with . It then sends the number . responds by sending , a randomly chosen square root of . Should the view consist only of the text of the interaction between and , then the above-mentioned protocol would be perfectly zero-knowledge on . However, we define the view so as to contain also the coin tosses of . Thus, if is randomly selected in View, then is not 1 or with probability at least . Thus, if factoring is not in probabilistic polynomial time, the above protocol is not zero-knowledge for . (It should be noted, however, that in the definition of zero-knowledge (for all ), it is not necessary to include the random bits of in the view; this is because we have included in the view the messages sent by , and for every there is a , which is like except that it sends its random bits as part of its last message.)
Second, it should be explained why sees an additional string . (The need for this was independently discovered by the authors of this paper, by Oren [O], and by Tompa and Woll [TW].) may be thought about in a number of different ways; may be some extra information that the verifier (cheating or not) happens to know. For example, a zero-knowledge protocol for graph isomorphism should remain zero-knowledge even if the verifier happens to know colorings for the graphs. It is also possible that the protocol will be inserted in the middle of another protocol, where the verifier has seen some history . There is the fear that this was generated perhaps by interacting with a machine of unlimited power; we want to rule out the possibility of the verifier then obtaining knowledge by using when interacting with . It is for a similar reason that the distinguishing circuits in the definition of computational indistinguishability are allowed to be nonuniform. We want to say that two families of random variables can be computationally distinguished if there are circuits that tell them apart, where the circuits may have wired in some information about or some information obtained from the history of some protocol in which the protocol of interest is immersed. In other words, the view obtains on inputs should look like the simulated distribution .
One test of a definition is that we should be able to prove those facts that intuition dictates must be true. One such fact is that the repetition of a zero-knowledge protocol a polynomial number of times is still zero-knowledge. We can prove this with our current definitions, but we cannot prove it if, for example, we do not give the extra string . We can also prove that if wants to decide a special predicate for , it does not help to engage in a zero-knowledge proof system for . We can prove all the intuitively obvious "facts" we have tried to prove, but only time will tell if these definitions are the right ones, or if they need some further modifications. We feel (and hope) that these definitions capture exactly the intuitive ideas we have tried to capture.
Last, there is the peculiar fact that the machine simulating the view is allowed to operate in expected polynomial time. This appears to be necessary for the zero-knowledge proof system for QNR given in §6. To see why this is necessary in general, consider a pair , where (on input of length ) sends random bits to ; if the predicate holds, then sends a random of length such that holds. Imagine that the predicate is easily computable, but the number of strings of length for which holds is small—maybe a fraction or maybe —but we do not know exactly which; imagine that the only way we know to find a string for which holds is to select random strings until one satisfying is found. The only way we know how to simulate the view of statistically closely (or even computationally indistinguishably) is to choose a random ; if holds, look through random -bit strings until a is found such that holds. This process is only expected polynomial time.
3.5. Examples of zero-knowledge languages. Trivially, all languages in BPP have perfect zero-knowledge proof systems. (A language is in BPP if there is a probabilistic, polynomial time machine which on each input computes membership in the language with small probability of error.)
The first nontrivial zero-knowledge proof systems (i.e., for recognizing languages not known to be in BPP) are the perfect zero-knowledge proof systems for the quadratic residuosity language QR given in § 5, and the statistically zero-knowledge proof system for QNR given in § 6.
Recently, Goldreich, Micali, and Wigderson have shown in [GMW] that the graph isomorphism language has a perfect zero-knowledge proof system, that the graph nonisomorphism language (though not known to belong to NP) has a statistically zero-knowledge proof system, and that all languages in NP possess computationally zero-knowledge proof systems if secure encryption schemes exist. In [BGGHKMR] it is proved that all languages in IP possess zero-knowledge proof systems.
Results by Boppana, Hastad, and Zachos [BHZ] and Fortnow [Fo] show that if an NP-complete language had a perfect or statistically zero-knowledge proof system, the polynomial time hierarchy would collapse. Thus it may not be surprising that the interactive proof systems in [GMW] for graph coloring were zero-knowledge only in a computational sense. A more immediate reason for their being computationally zero-knowledge is that they make use of probabilistic encryption [GM] (see Example 3). This may tempt us to interpret Fortnow’s result as saying that encryption is crucial in any zero-knowledge proof system for NP-complete languages. (Further discussion on Fortnow’s result can be found in § 7.)
3.6. A study of earlier proposals. Having reached the notion of a zero-knowledge proof system, let us now have a second look at the earlier, Arthur–Merlin type, proof systems of Blum [Bl] and Goldwasser and Micali [GM1] that we have already mentioned in § 2.3.
The Proof System for BL (defined in § 2.3). In his beautiful paper, assuming that integer factorization is computationally hard, Blum proposes a protocol for flipping a coin over the telephone. For “fairly” flipping a coin, Alice and Bob need an integer whose prime factorization is known to Alice but not to Bob, and has a special property, namely, . Alice is sure that the coin flip is fair because she computes by multiplying two randomly selected primes both congruent to 3 mod 4, and because she trusts that factoring is hard. Bob, after the coin has come up Head or Tail, checks that the flipping was fair by requesting ’s factorization from Alice. Thus a different should be selected for each coin flip. To make coin flipping more efficient, Blum proposed to test that , by means of a protocol that does not give away ’s factorization in any obvious way. After slightly modifying it, Blum’s protocol can be proved to be perfect zero-knowledge on BL. However, without this modification, it is not clear how much knowledge about ’s factorization it releases.
The Proof Systems for GM1 and GM2 (defined in § 2.3). The cryptographic protocols of Goldwasser and Micali use the inefficient version of Blum’s coin-flipping protocols, and thus assume that factoring integers is computationally difficult. Based on this assumption, they showed that their proof systems do not give away the prime factorization of an input . That is, no cheating polynomial time verifier can, after participating in the protocol, compute ’s factorization much faster than it could before.
More generally, their same protocols can actually be proved to be computationally zero-knowledge on, respectively, the languages GM1 and GM2. Thus, in particular, their protocols do not even give away whether or not, say, 3 is a quadratic residue mod n.
3.7. Interactive proof systems versus Arthur–Merlin games for zero-knowledge. We are now ready to formally express our belief that interactive proof systems are more appropriate than Arthur–Merlin games for recognizing languages in zero-knowledge.
Conjecture. There exist languages L that have perfect or statistical zero-knowledge proof systems, but do not have any Arthur–Merlin proof system that is perfect or zero-knowledge on L.
- The quadratic residuosity problem. In this section we describe the necessary number-theoretic background and notation needed for the proofs in §§ 5 and 6.
Let N denote the natural numbers, and . We can determine in time polynomial in and whether or not .
We say that in is a quadratic residue mod if there exists a in such that . Otherwise, we call in a quadratic nonresidue mod .
Fact 1. Let and . Then, is a quadratic residue mod if and only if it is a quadratic residue mod all of the prime factors of .
Define the quadratic residuosity predicate to be
Then we have the following fact.
Fact 2. Let and . Given and the prime factorization of , can be computed in time polynomial in .
Let and the prime factorization of be . Then, the Jacobi symbol of is defined as
where if is a quadratic residue mod , and otherwise.
Fact 3. Given and , can be computed in time polynomial in .
The Jacobi symbol of gives some information about whether is quadratic residue mod or not. If , then is a quadratic nonresidue mod and . However, when , no efficient (probabilistic or deterministic polynomial time) solution is known for computing correctly with probability significantly better than . This leads to the formulation of the quadratic residuosity problem.
Definition. We define the quadratic residuosity problem as that of computing on inputs and , where in and ,
The current best algorithm for computing , is to first factor and then compute . In fact, factoring integers and computing have been conjectured to be of the same time complexity. The difficulty of the quadratic residuosity problem has been used as a basis for the design of several cryptographic protocols [GM], [LMR], [Bl].
Define the following two languages:
where and are presented in binary.
Clearly, by Facts 1 and 2, both QR and QNR are in the intersection of CO-NP and NP. However, no probabilistic polynomial time algorithm is known that accepts these languages, and thus they are not trivially zero-knowledge. In §5 we show a perfectly zero-knowledge proof system for QR, and in §6 we show a statistically zero-knowledge proof system for QNR. The following facts will be useful in the zero-knowledge proofs of §§ 5 and 6.
Fact 4. Let . Then, for all such that , the number of solutions to is the same (independent of ).
Fact 5. Let , . Then we have the following: {#goldwasser-1985-zk-fact-5 .statement tag=0528} (a) If , then . (b) If , then .
Fact 6. Given , the Euclidean gcd algorithm allows us to compute in polynomial time whether or not .
- Zero-knowledge proofs of quadratic residuosity. Recall that , where and are presented in binary.
We will first informally describe our zero-knowledge interactive proof system for QR, and then describe it with more rigor. Say that and are given ; then the following is done times:
• sends a random quadratic residue mod . • sends a random bit, . • If then sends a random square root of ; if then sends a random square root of . • checks that either [bit = 0 and ] or [bit = 1 and ].
More formally, we assume, for convenience, that starts the protocol.
A’s PROTOCOL ON INPUT . FOR to Use random bits to generate , a random quadratic residue mod . SEND to GET a string from ; let the first bit of (or 0 if is empty). If , use random bits and generate , a random square root of ; if , use random bits and generate , a random square root of . SEND to GET a string from (this will merely indicate that wishes to continue the protocol). END FOR SEND “terminate” (just a string to finish off the protocol) to .
B’s PROTOCOL ON INPUT . See if and ; if not, halt. FOR to GET from . See if ; if not, halt. Generate a random . SEND to . GET from . See if and either [ and ] or [ and ]; if not, halt. SEND “okay” (just a string to continue the protocol) to . END FOR GET any string from , and halt accepting.
This is clearly an interactive protocol.
CLAIM 1. The above protocol is an interactive proof system for QR.
Proof. Say that is interacting with an arbitrary . Say that , , and is not a quadratic residue mod . For each that receives from it cannot be the case that both and have square roots mod . Since does not see any bit in advance, there is at most a probability that will "okay" the th pass. Hence, the probability that will say "convinced" is at most .
We will now show that the protocol is zero-knowledge for QR.
THEOREM 1. The above protocol is a perfectly zero-knowledge proof system for QR.
Proof. Let be an arbitrary polynomial time ITM that interacts with . Let be the common input to the pair , , and let be the extra input to . For convenience we consider the view to consist of the random variables
where is the string of random bits generated by , takes on the value , takes on the th message of , etc.
One way to describe the distribution of the view is as follows: is assigned a random bit string (of the appropriate length). Say that is the random variable . Assume that for some , has been given the value ; we will describe the experiment for giving values to .
Experiment
Choose for a random quadratic residue mod , . If were , we would choose to be the st bit of . However, all we can say is that is assigned the value , where is some -valued function computable in deterministic, polynomial time. If , then gets the value , a random square root of ; if , then gets the value , a random square root mod of .
Having characterized the view with the above experiment, we will now describe a probabilistic Turing machine that, given and a string , runs in expected polynomial time, and such that its output distribution is exactly the same as above; that is, is the same as . begins by choosing equals a random bit string (of the appropriate length). Assume that has been chosen for some ; outputs according to the following program:
DO FOREVER
bitᵢ₊₁ := a random member of {0, 1}
wᵢ₊₁ := a random member of Zₓ*
IF bitᵢ₊₁ = 0 THEN
uᵢ₊₁ := wᵢ₊₁² mod x
ELSE
uᵢ₊₁ := (wᵢ₊₁² y⁻¹) mod x
IF bitᵢ₊₁ = f(x, y, H, vᵢ, uᵢ₊₁) THEN
OUTPUT uᵢ₊₁, bitᵢ₊₁, wᵢ₊₁ and HALT
END DO
Two things about 's program must be clarified. First, the way chooses a random member of is by choosing random -bit strings until one is found that is in ; this halts in expected polynomial time. Secondly, by "" we mean that unique member of which when multiplied by yields 1.
We now show that halts in expected time polynomial in , with exactly the right output distribution.
Let be the random variables corresponding to the output of , and let be defined similarly to . Certainly has exactly the same distribution as . Let and assume that has exactly the same distribution as , and assume that gives a value to in expected time polynomial in . Say that both and have been given the value ; we wish to show that the above piece of program code halts in expected time polynomial in , with the same output distribution as the above experiment, given that .
Consider the body of the DO loop up to but not including the last test. If at this point, then since every quadratic residue in has the same number of square roots (), is equally likely to be any quadratic residue, and will be a random square root of ; if at this point, then will also be a random quadratic residue in this case (since is a quadratic residue), and will be a random square root of . Therefore, the body of the DO loop has the following effect (even though the following code may not be efficiently executable):
Equivalent Do Body
It is clear that the equivalent body halts (and outputs) with probability , and therefore that the actual DO loop halts in expected polynomial time. Since for each value of the equivalent body is equally likely to halt, gets assigned (by the DO loop) a random quadratic residue. BIT'_{i+1} will be assigned . Lastly, we can see from the equivalent body that in the case where the DO loop halts, gets assigned a random square root of or of , depending on , as required.
- Zero-knowledge proofs of quadratic nonresiduousity. We define QNR = , where and are presented in binary.
Let be an interactive protocol given as input such that .
The basic idea of the protocol is that generates at random elements of two types: (type 1) and (type 2), and sends these elements to . If then can tell of which type is by computing whether is a quadratic residue (type 1) or not (type 2). If is not a member of QNR, is always a quadratic residue mod and cannot guess its type better than guessing at random. Thus, will not be able to tell the types of the 's and will not be convinced that .
This idea is sufficient as a proof system but not as a zero-knowledge proof system. The danger is that may not have followed the protocol and generated elements in a manner differently than specified in the protocol. We get over this difficulty by complicating the protocol to force to convince that indeed knows whether is of type 1 or type 2. He does this by convincing that he knows either a square root of or a square root of , without giving any information (in the information-theoretic sense) of which one he really knows.
Our original protocol, which appeared in [GMR], was more complex to prove than the one presented here. The simplified protocol presented here was suggested by Cohen [Co].
As was done for the QR language, we will first informally describe an interactive protocol, which we claim is a statistical zero-knowledge interactive proof system for QNR, and then describe it with more rigor.
The following protocol on input should be repeated times.
• picks at random and . If , sets ; otherwise sets . sends to . For , picks random and a random . sets , and . If , sends the ordered pair, ; else if , sends to pair. • sends an -long random bit vector . • sends the sequence ; if then ; if then (a square root of ) if , and (a square root of ) if . (The intuition behind this step is as follows: if , then is convincing that pair was chosen correctly; if , then is convincing that if pair was chosen correctly, then was chosen correctly.) • verifies that the sequence was properly constructed. If not, sends terminate to and halts. Otherwise, sets if is a quadratic residue mod and 1 otherwise. sends to . • checks whether . If so continues the protocol, otherwise rejects and halts.
After repetitions of this protocol, if did not reject thus far, accepts and halts.
More formally, we proceed to describe first the protocol for and then the protocol for . The protocol consists of going through its first stage, followed by 's first stage, followed by 's second stage, followed by 's second stage, etc., until either or chooses to terminate the protocol.
Denote by the result of extending sequence with element .
B's PROTOCOL ON INPUT . Check that and that and that . Set . Repeat Stages 1–3 times. Stage 1.¹ use random bits to pick and . IF set , else set FI FOR choose random and random . set and .
¹ The careful reader may observe that picking "exactly at random" can be done in expected polynomial time, while our must by definition run in a fixed polynomial number of steps. Fortunately, can pick "almost at random" in a fixed polynomial time. This will have a negligible effect on the result and we omit any further details on this point.
IF set else set FI END FOR SEND ( for ) to . Stage 2. GET from and -long bit vector , where . Initialize the sequence to the empty sequence. FOR IF then set and set FI IF do one of the following: IF then set and set otherwise set and set FI FI END FOR SEND to . Stage 3. GET from . IF then reject and halt otherwise go to stage 1 FI. After iterations of Stages 1–3, if the protocol has not halted by now, accept and halt.
A’s PROTOCOL ON INPUT .
Stage 1. GET ( for ) from . Pick at random where . SEND to . Stage 2. GET sequence from for every check that, if , then is a pair such that equals , possibly with the elements interchanged; and if , then is a member of . If not, SEND terminate to and halt. (Assume that the above checks have succeeded.) If is a quadratic residue mod , set and if is a quadratic nonresidue mod , set . SEND to . Go to Stage 1.
We first prove that is an interactive proof system for QNR.
CLAIM 2. is an interactive proof system for QNR.
Proof. Clearly is an interactive protocol. If and and follow the specification of the protocol, then for every execution of Stages 1–2 by , is a quadratic nonresidue mod if and only if . Thus, in 's Stage 2, can always decide whether is a quadratic residue mod or not and send to such that and will always accept.
Suppose that not in QNR (i.e., is a quadratic residue mod ) and that is interacting with an arbitrary prover , in the th iteration of Stages 1–3. Then we claim that even an with infinite computation power cannot distinguish an interaction with where from an interaction with where . This is argued as follows. At Stage 1, gets the list for , where is a random quadratic residue, and where simply consists of a pair of random quadratic residues. This gives absolutely no information about the value of .
Now consider Stage 2, where . gets . Note that is just a random square root of and is a random square root of . So all that sees is the result of randomly choosing (or not) to reorder pair, and then taking a random square root of the first element and a random square root of the result of dividing the second element by (all mod , of course). This gives no information about bit.
Now consider the case where . If then gets , which is a random square root of . If then gets , which is a random square root of . Since pair is a random reordering of , is equally likely to be a random square root of times the first element of pair as it is to be a random square root of times the second element of pair, no matter what bit is.
Thus, from the information that receives in Stages 1 and 2, the value of bit is as likely to be 0 as it is to be 1 and the chance that predicts bit correctly is no greater than . In iterations through Stages 1–3, the probability that computed answer such that answer = bit is at most .
Proving that the proof system is statistically zero-knowledge for QNR is much more complex.
Theorem 2. The above protocol is a statistically zero-knowledge proof system for QNR.
Proof. Let be an arbitrary probabilistic polynomial time interactive Turing machine interacting with . Let be input to , let , and let be the extra input to .
For convenience, consider the random variable ('s view of an iteration of the protocol) to consist of the random variables:
is the string of random bits generated by ; takes on the value of in the th iteration of the protocol; takes on the value of pair in the th iteration of the protocol; takes on the value of in the th iteration of the protocol; takes on the value of the sequence in the th iteration of the protocol; and takes on the value of answer in the th iteration of the protocol.
For simplicity (notational and otherwise) we concentrate on showing that a single iteration of the protocol is zero-knowledge. Doing the general case implies carrying along the view of the protocol so far as was done in the proof of Theorem 1. Thus, from here on we drop all superscripts and work with the random variables: RAN, , , , , and ANSWER.
Note that in a good execution of the protocol (namely, if 's protocol is followed), we expect that or , where is a substring of RAN; and that or , where and are substrings of RAN; and that for all , if then will equal ; and if then or .
However, since may not follow the protocol, all we can say about these random variables is that RAN is a random binary string; (and ) are assigned values (and pair) computed by on inputs and RAN; is a random binary string of length ; and is a value computed by on inputs .
We will now describe a probabilistic Turing machine that, given and , runs in expected polynomial time, and whose output distribution is statistically indistinguishable from .
M starts by outputting a random string ran of the appropriate length and running B' on inputs (x, y, H), and random tape ran on it. B' goes through Stage 1 outputting w, pair_j, for . Next, M chooses at random in {0, 1}, sets , and writes i on B's communication tape, activating B's Stage 2. B' goes into Stage 2, writing on its communication tapes a sequence . M outputs . Next M does the checking that A does in Stage 2. If the check fails M outputs "terminate" and halts.
Let us assume that the check succeeds. Think of x, y, H, ran as being fixed, so that w and {pair_j} are also fixed. The fact that the check succeeds means that A sending i to B' causes B' to send a v to A, which causes A to send a one-bit answer to B' (rather than terminate); let us call any such i' special. M has just computed that i is special, and now wants to compute the value of answer that A would send. This value is 0 if w is a quadratic residue mod x, and 1 otherwise. Since B' may not have computed w the way B would have, it is not obvious how to compute the quadratic residuosity of w, i.e., answer.
It turns out that finding one other special string will allow M to determine if w is a quadratic residue, as follows:
Say that and and i, i' are special. Let be the sequences sent by B' after receiving i or i' (respectively); these can be computed in polynomial time by running B'. Since , , where equals pair_j, possibly with the elements reversed. Since , . If , then w is a quadratic residue mod x; if then w is a quadratic nonresidue mod x.
It therefore remains to find a special . M uses the following algorithm.
ALGORITHM TO FIND A SPECIAL .
Test random of length m (with replacement), halting when either a special is found, or when strings have been tried. If no special has been found, then test all m-bit strings (in order), looking for a special .
If a special is found, then M calculates answer as explained above and outputs answer. If no such exists, then M outputs "?"; note that this will happen when i is the only special string.
In order to show that M operates in expected polynomial time, it is sufficient to show that M operates in expected polynomial time for each fixed value of (x, y, H, ran). Say that x, y, H, ran are fixed, and so w, pair are also fixed. Let k be the number of strings i that are special. If , then the ALGORITHM TO FIND A SPECIAL will not be invoked, and the running time is clearly polynomial in m. If , then with probability M will choose a special i; in that case the ALGORITHM will run for time (for some c), so the expected running time is a polynomial in m.
Assume that . M will choose a special i with probability . To calculate an upper bound on the expected running time of the ALGORITHM, imagine that it was changed so that it tested random , including i and with replacement, halting if and when a special is found; the expected running time would be at least half that of the ALGORITHM. In effect, a coin is being tossed until "heads" comes up, where the probability of "heads" is exactly . It is well known that the expected number of coin tosses is exactly . Hence the expected time for the
ALGORITHM is (for some ). The total expected time is a polynomial in , which is polynomial in .
Recall that is the random variable denoting the distribution of 's output given . It remains to show that is statistically close to . Fix . If is such that the number of special strings is not exactly 1, then any output string beginning with is taken on by with exactly the same probability as by . Let be the set of where is the unique special string determined by . The probability that takes on a value in is , since for each there is at most one , which will be the unique special string. Similarly, the probability that takes on a value in is . Thus,
And for iterations of the protocol, the difference is
This completes our proof. □
Remarks. In fact, the above protocol can be shown to be perfect zero-knowledge. We just have to change so that when it discovers that is the unique special string it factors in time roughly , and then determines if is a quadratic residue mod in polynomial time. This does not change the expected running time by more than a polynomial factor, since when decides to do this extra work, it has already spent time .
7. Related work.
7.1. Work related to interactive proof systems. In studying his Arthur-Merlin games, Babai [Ba] has focused on the number of rounds, i.e., the number of times the prover and the verifier alternate in sending messages. Babai denotes the set of all languages accepted by rounds in an Arthur-Merlin proof system by , and denotes the set of languages accepted by an Arthur-Merlin proof system with rounds. Here is a nondecreasing function from natural numbers to natural numbers, and the length of the input.
The elegant simplicity of Babai's definition allowed him to show that for every constant , collapses to . This in turn is a subset of both and nonuniform NP.
We define as the class of languages having an interactive proof system with rounds.
Goldwasser and Sipser [GS] show that, for all , .
On the other hand, Aiello, Goldwasser, and Hastad [AGH] have shown that for any two nonconstant functions and such that , there exists an oracle such that (if we modify the definitions so that one is computing using the oracle ) is strictly contained in . This result is tight as Babai and Moran [BM] have shown that for all constants , . Namely, is well defined.
An interesting question is the following. Where does IP stand with respect to the polynomial time heirarchy? Boppana, Hastad, and Zachos [BHZ] have shown that if CO-NP has a constant-round interactive proof system, then the polynomial time hierarchy collapses. Thus, from the results of [GMW], [GS], and [BHZ], it follows that graph isomorphism is not NP-complete unless the polynomial time hierarchy collapses.
Other works related to the study of randomized and nondeterministic complexity classes appear in [P] and [ZF]. In Papadimitriou’s Games Against Nature, the verifier is also a probabilistic polynomial time machine that flips coins and presents them to a prover capable of optimal moves. This is different from our model in that is said to be accepted by a game against nature if implies that the probability of the prover to win the game is greater than a rather than bounded away from a .
Zachos and Furer [ZF], in a work investigating the robustness of probabilistic complexity classes, introduce a framework of probabilistic existential and universal quantifiers and prove several combinatorial lemmas about them. The AM and thus IP complexity classes can be formulated in terms of these special quantifiers.
7.2. Work related to knowledge complexity. Prior to our work, the theory of knowledge had received much attention in a model-theoretic framework (see [FHV] and [HM] for discussion). There are several essential differences between this framework and ours. In the latter, knowledge is defined with respect to a specific computational model with specific computational resources. In the former framework, there are no limitations on the computational power of the participants, i.e., they “know” all logical consequences of the information they possess. (For discussion of this aspect see, Belief, Awareness, and Limited Reasoning [FH].) As for another difference, in our model knowledge is defined with respect to an available public input and is gained by computing on this input. In their model-theoretic framework knowledge is gained by being told (or witnessing) that a certain event is true (e.g., the outcome of a coin flip is heads), rather than by computing.
Galil, Haber, and Yung [GHY] proposed the following extension of the concept of a zero-knowledge interactive proof systems. A language is said to have a result-indistinguishable zero-knowledge proof system if there exists an interactive protocol such that for every string , can convince that or is not in (whichever is the case) with high probability, such that no passive observer can get any information of which is the case. They give a result-indistinguishable proof system for QR.
As previously mentioned, Goldreich, Micali, and Wigderson [GMW] have shown, subject to the existence of secure encryption schemes, that all languages in NP have computationally zero-knowledge proof systems. Subsequently, related notions of proof systems and zero knowledge were given by Brassard and Crepeau [BC] and Chaum [Ch]. They found that for any language in NP, there is an interactive protocol that
(1) is zero-knowledge, and (2) proves membership in correctly (i.e., with probability approaching 1) only if factoring is computationally difficult and the prover is polynomial time.
Let us explicitly contrast their protocols with the ones in [GMW]. The latter ones
(1) correctly prove membership in , and (2) are zero-knowledge only if secure encryption schemes exist (which is true if factoring is difficult).
Finally, let us mention the recent result of Fortnow.
THEOREM [Fo]. Assume a language L has an interactive proof system (A, B) that is statistically zero-knowledge with respect to B. Then L's complement has a constant-round interactive proof system.
As a corollary, if SAT had statistically zero-knowledge proof systems, the polynomial time hierarchy would collapse.
Note that the hypothesis of Fortnow's theorem is much weaker than saying that (A, B) is a statistically zero-knowledge proof system on L, which would mean that, for all verifiers B', A is zero-knowledge on L for B'. Usually, it is defeating this latter quantifier "for all" that makes it hard to find a perfect or statistically zero-knowledge proof system. Thus Fortnow's result has the potential to be widely applicable.
Acknowledgments. We thank Mike Sipser, Steve Cook, and Mike Fischer who helped us focus on this research from its beginning. Without their enthusiastic encouragement we might not have completed this work.
Oded Goldreich and Ron Rivest, as usual, have been generous with comments and ideas. Thanks also go to Leonid Levin, Zvi Galil, and Dan Simon for having helped us in various ways.
Special thanks to Josh Cohen for simplifying our original zero-knowledge protocol for proving quadratic nonresiduosity. Thanks are also due to Manuel Blum for sharing with us so many beautiful ideas about cryptographic protocols.
Finally, we thank the anonymous referees, whose comments greatly improved this paper.