Multiparty Computation
Editor's Overview
Introduction
Protocols for Secure Computations is a short 1982 research paper by Andrew Yao that is known for defining the Millionaires' Problem, and for being the first paper to pose the problem of multiparty computation. Its results were mostly foundational: only a few very general theorems were offered, all without proof, and the vast majority of the paper is spent describing (the not-then named) multiparty computation as a whole, as opposed to defining any particular problems, perspectives, or contexts.
The main exception to that indefiniteness is the basic problem and protocol he detailed, now commonly known as the Millionaires' Problem (and Protocol). Perhaps the most common illustration of multiparty computation, its simplicity and brevity make it an excellent case study into secure two-party computation (as can be seen in the tutorial page that focuses on it). While Yao mentioned other application cases, some of which were frankly even better candidates for such popularity, the Millionaires' Problem nonetheless remains the most common example of multiparty computation to date.
The significance of this particular paper to this field is difficult to overstate. Despite its shortcomings (namely, its lack of proof and its limited direct application), its focus on defining a general problem as opposed to being limited to a specific one ultimately vaulted it into the realm of influence, and most research into multiparty computation which followed it can be framed within the definitions Yao presented here.
Goals and Results
Yao's main goal was to lay the groundwork for later research by outlining the framework of a few different basic types of problems, as well as citing a few basic applications. He defined the problem of multiparty computation in terms of:
- The limitations of privacy and security constraints. Yao cited two extreme examples to display the difference. On the extreme privacy side, he gave the Millionaires' Problem as an example, in which it is assumed that no saboteurs are on the line, but in which both parties want the other to learn nothing about their own input. On the extreme security side, he cited any basic encryption/decryption scheme in which a message needs to be sent over an insecure line from one party to the other. Multiparty computation protocols can be private, secure, or both, and all in varying degrees.
- Deterministic vs. probabilistic computation. Yao mentions that both are possible, though the latter is rather obviously more difficult to prove secure, especially if the probability density of the inputs is not constant.
- Number of parties. Yao assumes the two-party case for the majority of the paper, but expands the ideas to any \(m\) parties near his conclusions. The \(m\) party case is generally more difficult to deal with due to collusions that are impossible in the two-party case; however, Yao states that it is possible to create a protocol for any \(m\) parties with any function.
- Trust, cheating, and collusion. Parties may not trust that the other parties are following the protocol correctly, and that must be built into some protocols in order to ensure that the results are still viable. Cheating (as opposed to sabotage, below) may affect correctness, privacy, or both. Collusion is a particular subset of cheating under which multiple cheaters work together. Yao states that any computable function \(f\) can be turned into a protocol with an upper-bounded probability of successful cheating.
- Sabotage and eavesdropping. Parties may not be able to communicate without interference or eavesdropping by outside parties, affecting correctness, security, or both. Yao mentions these as issues to be discussed elsewhere, and in general sabotage and eavesdropping are both dealt with by using cryptographic primitives rather than as a part of the protocol.
Yao specifically mentions, as an aside, that his theorems prove that mental poker can be played with any public-key system, a generalization of previous research.
Assumptions
Some of Yao's results are dependent on the existence of one-way functions. His Millionaires' Problem protocol, for one. Since this extended abstract only briefly explains most of his theorems, we must assume that Theorems 1-5 and 9 depend on the existence of such functions. Theorem 6 determines a lower bound, and 7 and 8 are impossibility results, so we can safely assume that they do not.
Definitions
Definition 1 - \((\epsilon,\delta)\)-Privacy ConstraintLet \(\epsilon,\delta > 0\), and \(f(i,j)\) be a \(0-1\) valued function. Assume that initially all pairs of \((i,j)\) values are equally likely. Suppose Bob and Alice carry out the computation faithfully according to the protocol. At the end, Alice can in principle, from her computed value \(v\) of the function and the strings in her possession, compute a probability distribution of the values of \(j\); call this \(p_i(j)\). A protocol is said to satisfy the \((\epsilon,\delta)\)-privacy constraint if the following conditions are satisfied:
- \(p_i(j)=\frac{1}{|G_i|}(1+\operatorname O(\epsilon))\) for \(j \in G_i\), and \(0\) otherwise, where \(G_i\) is the set of \(j\) for which \(f(i,j)=v\),
- if Alice tries afterwards to perform more calculations with no more than \(O(N^k)\) evaluations of \(E\)'s and \(D\)'s, then with probability at least \(1-\delta\) she will still get the above distribution on \(j\), and
- the above requirement is also true for Bob.
Consider an instance in the execution of a protocol. We will consider it to be a successful cheating by Alice, if Alice does not behave consistently with any value of \(i\) and yet Bob does not detect it. A successful cheating by Bob is defined similarly.
Theorems
Let \(A\) be a protocol, let \(T(A)\) denote the maximum number of bits exchanged between Alice and Bob when \(A\) is used.
Theorem 1For any \(\epsilon,\delta > 0\) and any function \(f\), there exists a protocol for computing \(f\) that satisfies the \((\epsilon,\delta)\)-privacy constraint.
Theorem 2Let \(1 > \epsilon,\delta > 0\) and \(f(i,j)\) be a \(0-1\) function. If \(f\) can be computed by a boolean circuit of size \(C(f)\), then there is a protocol \(A\) computing \(f\) satisfying the \((\epsilon,\delta)\)-privacy constraint such that \(T(A)\)\(\in\operatorname O(C(f)\log{\frac{1}{\epsilon\cdot\delta}})\).
Theorem 3Let \(\frac{1}{5} > \epsilon,\delta > 0\) be fixed. Let \(F_n\) be the family of 0-1 valued function \(f(i,j)\) with \(i\) and \(j\) being \(n\)-bit integers. Let \(f\) be a random element of \(F_n\), then any protocol \(A\) that computes \(f\) with \((\epsilon,\delta)\)-privacy constraint must have \(T(A)\)\(\gt2^\frac{n}{2}\) for all large \(n\).
Theorem 4Let \(1\gt\gamma\gt0\). Under the same assumption of Theorem 2, there exists a protocol \(A\) for computing \(f\) such that
- \(T(A)\)\(\in\operatorname O\left(C(f)\log{\frac{1}{\epsilon\cdot\delta\cdot\gamma}}\log{\frac{1}{\gamma}}\right)\), and
- if one participant behaves according to \(A\), the probability of a successful cheating by the other participant is at most \(\gamma\)
Let \(K'\) be defined such that the set \(\{P_i\;|\;i \in K'\}\) is the set of people who are attempting to collude with each other in order to cheat.
For any \(\epsilon,\delta,\gamma\gt0\), there exists a protocol \(A\) for computing \(f\) which satisfies the \((\epsilon,\delta)\)-private constraint and which has the property that, for any \(K' \neq \{1,…,m\}\), the probability for \(K'\) to have a successful cheating can not be more than \(\gamma\).
Theorem 6There exist functions \(f\) for which any protocol \(A\) satisfying the conditions in Theorem 5 must have \(T(A)\)\(\in \operatorname\Omega\left((|X_1|\cdot |X_2|\cdot\cdots\cdot|X_m|)^\frac{1}{4}\right)\).
Theorem 7No protocol \(A\) with finite \(T(A)\) which generates a bit with a transcendental bias \(\alpha\) can be robust.
Theorem 8Suppose Alice and Bob wish to exchange a pair of solutions \(x, y\) with \(\operatorname E_a(x) = 1\) and \(\operatorname E_b(y) = 1\).
Let \(A\) be any protocol for exchanging [such] secrets. Then either Alice or Bob will be able to doublecross successfully with probability at least ½.
Theorem 9Let \(\epsilon\gt0\) be fixed. There is a protocol \(A\) with polynomial (in \(N\)) running time which exchanges secrets \(\operatorname D_b(w)\) and \(\operatorname D_a(u)\), and under which the probability of anyone double-crossing successfully is bounded by \(\epsilon\).
Protocols
Millionaires' Protocol
- Number of parties: 2
- Function(s): Comparisons between \(x_0\) and \(x_1\) (i.e. \(\lt,\gt,\leq,\geq\)). Two honest parties will get the same output.
- Privacy constraints: Negligible probability that \(P_i\) learns more about \(x_{(1-i)}\) than offered by the computed function.
- Cheating: One malicious adversary in the protocol can change the outcome of the protocol to a value of their choosing.
- Subprotocols: A trapdoor permutation for encryption/decryption. Assumed to run in \(\operatorname O(N)\) time.
- Bits exchanged: \(\operatorname O(Nn)\) where \(N\) is the bit-length of \(i\) and \(j\), and \(n\) is their range.
- Runtime: \(\operatorname O(Nn)\), where \(n\) is the range of \(i\) and \(j\)
- Assumptions: Existence of trapdoor functions.
- Implementations: We have our own version in Java here.
Further Reading
For more about the Millionaires' Problem, see the related tutorial section.
For more about exchanging secrets as in Theorems 8 and 9, or for a deep explanation of Theorem 2, see Yao's follow-up paper How to Generate and Exchange Secrets.
Referencing This Paper
To cite this paper, simply copy and paste the below into your citation:
A.C. Yao. Protocols for Secure Computations (extended abstract). Proceedings of the 23rd Annual IEEE Symposium on the Foundations of Computer Science, pages 160-164. IEEE. 1982.
Annotated Paper (extended abstract)
1. Introduction
Two millionaires wish to know who is richer; however, they do not want to find out inadvertently any additional information about each other's wealth. How can they carry out such a conversation?
This is a special case of the following general problem. Suppose \(m\) people wish to compute the value of a function \(f(x_1, x_2,\dots, x_m)\), which is an integer-valued function of \(m\) integer variables \(x_i\) of bounded range. Assume initially person \(P_i\) knows the value of \(x_i\) and no other \(x\)'s. Is it possible for them to compute the value of \(f\), by communicating among themselves, without unduly giving away any information about the values of their own variables? The millionaire's problem corresponds to the case when \(m = 2\) and \(f(x_1, x_2) = 1\) if \(x_1\lt x_2\), and 0 otherwise. In this paper, we will give precise formulation of this general problem and describe three ways of solving it by use of one-way functions. These results have applications to secret voting, private querying of database, oblivious negotiation, playing mental poker, etc. We will also discuss the complexity question "How many bits need to be exchanged for the computation", and describe methods to prevent participants from cheating. Finally, we study the question "What cannot be accomplished with one-way functions".
Before describing these results, we would like to put this work in perspective by first considering a unified view of secure computation in the next section.
2. A Unified View of Secure Computation
Since one-way functions were first proposed in 1976 [1], they have been used in two kinds of applications. The first kind is concerned with the encryption and transmission of messages to make them unreadable and unalterable for eavesdroppers and saboteurs [1][2][3][4]. The second kind of applications includes "mental poker"[5], in which two players deal cards by communicating over a telephone line, and "coin flipping" [6], in which two mutually suspecting parties are to generate an unbiased bit. It would be desirable to have a unified framework where all these applications can be related, and where common proof techniques can be developed for proving the security of protocols. More fundamentally, such a framework is essential if we are ever to understand the intrinsic power and limitation of one-way functions. For example, without a precise model it would be hard to answer a question such as "Is it possible for three mutually suspecting parties to interactively generate a bit with bias \(\frac{1}{e}\)?"
Yao answers this question in Theorem 7, which states that transcendental biases are not achievable robustly.
In response to this need, we propose to adopt the following view. Two parties Alice and Bob, in possession of private variables \(i\) and \(j\) respectively, wish to communicate so that Alice can evaluate a function \(f(i, j)\), and Bob a function \(g(i, j)\). There may be some eavesdroppers or saboteurs on the communication line. The purpose of a protocol would be to design an algorithm for Alice and Bob to follow, such that certain security constraints (against saboteur) and privacy constraints (Alice may not wish to reveal the exact value of \(i\)) can be satisfied.
In one extreme, when the computation component is trivial, e.g. if \(f\) = constant and \(g(i, j) = i\), then we get the first kind of applications mentioned before, in which the basic concern is eavesdropping and sabotage. In the other extreme, when such external threats can be ignored, but the computation of \(f\) and \(g\) is nontrivial, then we get the problem which is to be studied in this paper. (Mental poker and coin flipping represent a stochastic version of this problem which will also be discussed.) Note that, although we have used Alice and Bob in the above description, all discussions can be extended to the case of \(m\) parties communicating.
The 'unified view of secure computation' as defined in the above two paragraphs is perhaps the most general useful definition that can be applied to the whole of multiparty computation. In the spirit of that unification, and considering this paper is the formative paper for the field, a slightly reworded version of this very definition is the one used in the tutorials and across the site in order to link specific papers and protocols to the more general problem.
It would be natural to discuss these two special cases together. However, due to length consideration, we will report here only the results corresponding to the computation-intense case with no outside saboteurs. Results on the other case will be reported elsewhere.
There is soon to be a tutorial section dealing with adversaries and saboteurs, as it is one of the most varied and well-studied aspects of cryptography.
3. Deterministic Computations
3.1. Solutions to the Millionaires' Problem
In this abstract, we will describe in detail only one of the three solutions we have.
It should be noted that, to our knowledge, no complete version of this paper was ever released. If Yao ever published his other two solutions, it was likely in a different paper.
We have an animation of the below protocol as a demonstration in the tutorial section.
For definiteness, suppose Alice has \(i\) millions and Bob has \(j\) millions, where \(1 \leq i,j \leq 10\). We need a protocol for them to decide whether \(i\lt j\), such that this is also the only thing they know in the end (aside from their own values). Let \(M\) be the set of all \(N\)-bit nonnegative integers, and \(Q_N\) be the set of all 1-1 onto functions from \(M\) to \(M\). Let \(\operatorname E_a\) be the public key of Alice, generated by choosing a random element from \(Q_N\).
Firstly, it should be noted that in the original paper, Yao put that \(1\lt i,j\lt10\); however, the protocol is not in any way affected by allowing \(i\) or \(j\) to be \(1\) or \(10\), and the additional restriction wastes bits.
The protocol proceeds as follows:
- Bob picks a random \(N\)-bit integer \(x\) and computes privately the value of \(\operatorname E_a(x)\); call the result \(k\).
- Bob sends Alice the number \(k−j+1\).
- Alice computes privately the values of \(y_u=\operatorname D_a(k−j+u)\) for \(u = 1,2,\dots,10\).
Alice now has the original value of \(x\), since \(y_j=\operatorname D_a(k-j+j)=\operatorname D_a(k)=x\). However, since \(\operatorname E_a\) was chosen randomly, she views each \(y\) as being \(x\) with equal probability.
- Alice generates a random prime \(p\) of \(N/2\) bits, and computes the values \(z_u = y_u\pmod p\) for all \(u\);
if all \(z_u\) differ by at least 2 in the \(\bmod p\) sense, stop; otherwise generates another random prime and repeat the process until all \(z_u\) differ by at least 2; let \(p, z_u\) denote this final set of numbers.
In this step, Yao originally made a mistake. The restriction that no two \(z_u\) have a difference less than \(2\) allows Bob to learn something about \(i\) in some cases. We will now demonstrate that, for any positive minimum distance, Bob may be able to learn something. Let's say we require some minimal difference of \(\delta\gt0\) between all \(z_u\) in the \(\bmod p\) sense. Since \(\delta\) is the minimum distance, it is valid to select a \(p\) such that \(\exists\;u_1,u_2\) where \(u_1\leq i\lt u_2\) and \(z_{u_1}=z_{u_2}+\delta\). According to the next step of the protocol, Alice will send Bob \(z_{u_1}\) and \(z_{u_2}+1\) (along with a number of other values). From Bob's perspective, there are three possibilities:
- Alice sent him \(z_{u_1}\) and \(z_{u_2}\): however, this is not possible, because the difference between the numbers is \(\delta-1\), while violates the rule.
- Alice sent him \(z_{u_1}+1\) and \(z_{u_2}+1\): we reach an identical problem here.
- Alice sent him \(z_{u_1}\) and \(z_{u_2}+1\): this is the only possible option, as (by our assumptions) it did not originally break the rule.
Since Alice only adds 1 to a \(z_u\) if \(u\gt i\), Bob can infer that \(u_1\leq i\lt u_2\). This breaks our privacy constraints on the protocol, so our requiring a minimal distance must have been in error. We have shown the minimum difference requirement breaks the protocol, but we must also demonstrate that not having a minimum difference requirement does not do so. We analyze that very question below.
- Alice sends the prime \(p\) and the following 10 numbers to Bob: \(z_1,z_2,\dots,z_{i}\) followed by \(z_{i+1}+1,\dots,z_{10}+1\); the above numbers should be interpreted in the \(\bmod{p}\) sense.
There was an error in the original document that had an extra term (\(z_i+1\)) after \(z_i\), but this clearly is not 10 numbers, and clearly does not fit with the remainder of the protocol.
This protocol can be simply altered to calculate \(i\leq j\) instead of \(i\lt j\) by changing \(z_i\) to \(z_i+1\) (and accordingly changing \(\geq\) and < in the next step to > and \(\leq\) respectively). The statements \(i\gt j\) and \(i\geq j\) are the negations of \(i\leq j\) and \(i\lt j\), so can obviously be calculated the same way but negating the answer.
- Bob looks at the \(j\)th number (not counting \(p\)) sent from Alice, and decides that \(i \geq j\) if it is equal to \(x \bmod{p}\), and \(i \lt j\) otherwise.
To reiterate, the \(j\)th number is either \(z_j\pmod{p}=x\pmod{p}\), as discussed above, or \(z_j+1\pmod{p}=x+1\pmod{p}\). It is only the former if she has not added one, which is only true if \(i\geq j\).
- Bob tells Alice what the conclusion is
We have a working implementation of this protocol in the implementation section. You can find it here.
This protocol clearly enables Alice and Bob to decide correctly who is the richer person. To show that it meets the requirement that they cannot get any more information about the wealth of the other party, we need to define a precise model which will be done in Section 3.2. Here we will informally argue why the requirement is met.
Firstly, Alice will not know anything about Bob's wealth \(j\), except for the constraint on \(j\) implied by the final result that Bob told her, because the only other information coming from Bob is that Bob knows the value of \(\operatorname D_a(s)\) for some \(s\) between \(k-j+1\) to \(k-j+10\). As the function \(\operatorname E_a\) is random all the 10 possibilities are equally likely.
What does Bob know? He knows \(y_j\) (which is \(x\)) and hence \(z_j\). However, he has no information about the values of other \(z_u\), and by looking at the numbers Alice sent him, he cannot tell if they are \(z_u\) or \(z_u+1\).
This has not finished the argument yet, as Alice or Bob might try to figure out the other person's value by making more calculations. For example, Bob might try to randomly choose a number \(t\) and check if \(\operatorname E_a(t)=k-j+9\); if he succeeds, he then knows the value \(y_9\) to be \(t\), and knows the value of \(z_9\), which enables him to find out whether \(i \geq 9\). That would be an extra piece of information that Bob is not supposed to find out, if \(i \geq 9\) has been the outcome of the previous conclusion. Thus, one also has to include in the formal definition that not only the participants do not gain information as a result of the exchange specified by the protocol, but also they cannot perform calculation within a reasonable amount of time to gain this information. In the formal definition to be given in Section 3.2, we will define this precisely.
This precise example will be addressed in the annotations, because Yao does not return to it. As a quick summary, neither party could perform enough calculations to learn something extra in polynomial time. Alice, in particular, cannot possibly learn anything, whereas Bob only has an \(\operatorname O\left(\frac{\operatorname{poly}(n)}{2^N}\right)\) 1 probability of learning something, where \(n\) is the range of \(i,j\).
One may have noticed the possibility that some party may cheat in the process, by deviating from the agreed protocol. For example, Bob may lie to Alice in the final step and tell Alice the wrong conclusion. Is there a way of designing a protocol such that the chance of a successful cheating becomes vanishingly small, without revealing the values of \(i\) and \(j\)? We will show that this is possible in Section 3.3. (Note that this is a stronger requirement than the verifiability requirement used in the mental poker protocol in Shamir et. al. [5]).
We have two other solutions to the millionaires' problem based on different principles. The first of them assumes that Alice and Bob each owns a private one-way function, where these functions satisfy the commutativity property, i.e. \(\operatorname E_a\operatorname E_b(x)=\operatorname E_b\operatorname E_a(x)\). The other solution makes use of a probabilistic encryption method invented by Goldwasser and Micali [2].
To our knowledge, neither has been released by Yao.
3.2. Model for the General Problem
As these three solutions base their security on different assumptions, a precise model has to be specified in detail for each solution. In this abstract, we will only give the model that corresponds to the first solution.
For simplicity, we will only give the definitions and results for the case when \(f\) is 0-1 valued and \(m\)=2 (Alice and Bob). Generalization of the results to general \(m\) will be briefly discussed in Section 5. The proofs for the general case involve additional technical complications, and there are extra security considerations such as possible "collusions" that are absent in the 2-person case.
Protocol
Assume Alice has a public one-way function \(\operatorname E_a\), whose inverse function \(\operatorname D_a\) is known only to Alice; similarly Bob has a public \(\operatorname E_b\), and a private inverse \(\operatorname D_b\). Assume that \(\operatorname E_a\) and \(\operatorname E_b\) are independently and randomly drawn from \(Q_N\), the set of all the possible 1-1 onto functions on \(N\)-bit integers. A protocol \(A\) for computing a function \(f(i,j)\) specifies exactly how Alice and Bob should communicate as follows. Alice and Bob send strings to each other alternately. Each time after Bob has finished transmission, Alice examines the information so far in her possession, which consists of some sequence of strings \(\alpha_1,\alpha_2,\dots,\alpha_t\), and some relations among the strings (e.g. \(\operatorname E_b(\alpha_3)=\alpha_9\), \(\alpha_8\) has an odd number of 1's); based on the bits that have so far been transmitted between her and Bob, the protocol specifies how she should compute in private strings \(\alpha_{t+1},\alpha_{t+2},\dots,\alpha_s\) where each new string \(\alpha_u\) is a function of the earlier strings, or of the form \(E_a(y)\), \(E_b(y)\) or \(\operatorname D_a(y)\) where y is a string already obtained. The choice of which function to apply or whether to evaluate \(\operatorname E_b\) or \(\operatorname D_a\) is in general probabilistic, i.e. she will decide to evaluate \(\operatorname E(\alpha_4)\), or to compute \(\alpha_2 + 3\alpha_8\) based on the outcomes of some coin tosses. After she has finished this computation, she will send a string to Bob, and again the string is chosen probabilistically. Now it is Bob's turn to compute strings and send a string according to the protocol. We agree that there is a special symbol whose appearance means the end of the execution of the protocol. By that time, the protocol has an instruction for each participant to compute the function value \(f\) in private. Finally, we require that, in a protocol, the total number of evaluations of \(\operatorname E\)'s and \(\operatorname D\)'s by Bob and Alice be bounded by \(\operatorname O(N^k)\), where \(k\) is an integer chosen in advance.
While not mentioned, it is important to note that random (or pseudorandom) number generation must also be allowed, even just for the above millionaires' protocol.
Privacy Constraint
Definition 1 - \((\epsilon,\delta)\)-privacy ConstraintLet \(\epsilon,\delta\gt0\), and \(f(i,j)\) be a \(0-1\) valued function. Assume that initially all pairs of \((i,j)\) values are equally likely. Suppose Bob and Alice carry out the computation faithfully according to the protocol. At the end, Alice can in principle, from her computed value \(v\) of the function and the strings in her possession, compute a probability distribution of the values of \(j\); call this \(p_i(j)\). A protocol is said to satisfy the \((\epsilon,\delta)\)-privacy constraint if the following conditions are satisfied:
- \(p_i(j)=\frac{1}{|G_i|}(1+\operatorname O(\epsilon))\) for \(j \in G_i\), and 0 otherwise, where \(G_i\) is the set of \(j\) for which \(f(i,j)=v\),
More informally, if Alice iterates through all of the \(j\) that Bob could have had in order to produce \(v\) (here called the set \(G_i\)), she will not find any of them significantly (by a constant factor of \(\epsilon\)) more likely than the other possibilities.
- if Alice tries afterwards to perform more calculations with no more than \(\operatorname O(N^k)\) evaluations of \(\operatorname E\)'s and \(\operatorname D\)'s, then with probability at least \(1-\delta\) she will still get the above distribution on \(j\), and
- the above requirement is also true for Bob.
Let's quickly see what \(\epsilon\) and \(\delta\) we can apply to the millionaires' protocol. For added generality, we will generalize from \(i,j\in\{1,10\}\) to any range of size \(n\) starting at 1. Without loss of generality, assume that Bob has more money (e.g. \(i\lt j\) and therefore \(f(i,j)=1\)). Fixing \(i,j\), we'll first look at what Alice can learn.
Obviously, she knows that \(p_i(x)=0\) for \(x\leq i\). For the remainder of possible \(u=j\)'s, however, she can decrypt \(k-j+u\)'s using her private key, producing \(n-i\) possible \(x\) values. Since \(x\) was chosen randomly, she cannot possibly figure out which one Bob chose. \(G_i=\{i+1,i+2,\dots,n\}\) and, with no way of choosing between them, \(p_i(j)=\frac{1}{|G_i|}=\frac{1}{n-i}\) for \(j\in G_i\). Bob's information is information theoretically secure.
Bob, conversely, knows that \(i\) must be within \(G_j=\{1,2,\dots,j-1\}\). He has slightly more information from Alice, and can try to guess what another value of \(y_u\) was in order to further restrict \(i\)—information that would drastically alter his probability distribution. He knows \(p\), the random prime Alice has used to \(\bmod {y_u}\), and he knows either \(y_i\pmod{p}\) or \(y_i+1\pmod{p}\) for all of \(i\in G_j\). He must correctly guess a value \(g\) such that \(\operatorname E_a(g)\) or \(\operatorname E_a(g+1)\) is \(k+j-u\) for some \(u\lt j\).
This is likely why Yao attempted to specify that no two \(y_u\)'s be within 2 of each other, to force Bob's search space within \((\mathbb{Z}/p\mathbb{Z})^*\) to be of size \(2(j-1)\). This restriction is not necessary, however: assume the very worst case, which is that \(z_u\) is a sequence of only one number repeated (and noting that that would tell Bob nothing about \(i\) by itself), so Bob has a search space of only 2 within \((\mathbb{Z}/p\mathbb{Z})^*\). Since each \(y_u\) could be between 0 and \(2^N-1\), and \(p\) is of maximum size \(2^{\frac{N}{2}}\), this leaves a minimal total search space of \(2*\frac{2^N}{2^{N/2}}=2^{\frac{N}{2}+1}\). Since Bob has no extra information which would allow him to choose from the search space better than randomly, finding a single value which would give him any information has expected runtime \(\operatorname O(2^N)\). Since this is the minimal search space, it is the best case for Bob, and therefore the probability of him finding any information through extra calculation is negligible.
We can set \(\epsilon\) arbitrarily low, since neither party can calculate a probability distribution better than \(\frac{1}{|G|}\).
We can calculate \(\delta\) a bit more precisely. The probability of Bob changing his probability distribution is \(\frac{\operatorname O(N^k)}{2^{N/2+1}}\) best case, so for fixed \(k\) we can set \(\delta\leq \frac{\operatorname O(N^k)}{2^{N/2+1}}\), which rapidly approaches \(0\) as \(N\) increases.
Theorem 1For any \(\epsilon,\delta\gt0\) and any function \(f\), there exists a protocol for computing \(f\) that satisfies the \((\epsilon,\delta)\)-privacy constraint.
Yao did not present a proof for this theorem in this paper.
It is possible to consider the more general case when the initial distribution of \((i,j)\) is nonuniform. We will not go into that here. In Section 4, that becomes a special case of probabilistic computations.
3.3. Additional Requirements
Complexity
The solution given earlier for the millionaires' problem will become impractical if the range \(n\) of \(i,j\) become large, since the number of bits transmitted is proportional to \(n\). An interesting question is then to determine the minimum number of bits needed by any protocol to compute \(f\) that satisfies the \((\epsilon,\delta)\)-privacy constraint. Conceivably, there are functions that are easily computable without the privacy requirement, but become infeasible with the extra privacy constraint. Fortunately, we can prove that this is not the case. Let \(A\) be a protocol, let \(T(A)\) denote the maximum number of bits exchanged between Alice and Bob when \(A\) is used.
If we set \((\epsilon,\delta)=(1,1)\)—that is, if we don't require privacy at all—then the only information that needs to be sent is \(i\) to Bob, followed by \(f(i,j)\) back to Alice, meaning \(T(A)\)\(=\log_2{i}+1\leq N+1\); this is the lowest bound possible (\(T(A)\)\(\in\operatorname\Omega(N)\)). This would be increased further by the need for security, of course.
Theorem 2Let \(1\gt\epsilon,\delta\gt0\) and \(f(i,j)\) be a \(0-1\) function. If \(f\) can be computed by a boolean circuit of size \(C(f)\), then there is a protocol \(A\) computing \(f\) satisfying the \((\epsilon,\delta)\)-privacy constraint such that \(T(A)\)\(\in\operatorname O\left(C(f)\log{\frac{1}{\epsilon\cdot\delta}}\right)\).
Yao would later go on to develop this theorem into another pivotal work in multiparty computation, How to Generate and Exchange Secrets. The basic idea is that one can use a construction called a "garbled circuit" in order to securely transfer the outcome of an entire circuit, one gate at a time. Note that this is only secure against passive adversaries.
In fact, if \(f\) can be computed by a Turing machine in time \(S\), then the protocol can be implemented such that both Alice and Bob have Turing machine algorithms to execute the protocol with a time bound \(\operatorname O\left(S\log{\frac{1}{\epsilon\cdot\delta}}\right)\).
However, there exist functions that need exponentially many bits transmitted between Bob and Alice with the privacy constraint. Let \(F_n\) be the family of \(0-1\) valued function \(f(i,j)\) with \(i\) and \(j\) being \(n\)-bit integers. Clearly, at most \(n\) bits of transmitted information can compute \(f\), in the absence of the privacy constraint. (See [7] for further discussion).
Yao is referring to the lower bound mentioned above, though does not include in the calculation the final bit exchanged which would exchange the answer.
Theorem 3Let \(\frac{1}{5}\gt\epsilon,\delta\gt0\) be fixed. Let \(f\) be a random element of \(F_n\), then any protocol \(A\) that computes \(f\) with \((\epsilon,\delta)\)-privacy constraint must have \(T(A)\)\(\gt 2^\frac{n}{2}\) for all large \(n\).
We are yet uncertain what to make of this theorem: in particular, whether Yao means to indicate something significant about the value \(\frac{1}{5}\), or to specify a particular property of members of \(F_n\).
Mutually-Suspecting Participants
So far the discussions have assumed that Bob and Alice observe the rules specified by an agreed protocol. What if either of them might cheat in order to gain additional information or to mislead the other party to receive a wrong answer? It is true that with our protocol, any cheating will be discovered if there is a verification stage afterwards where both parties are required to reveal all their private computation. However, that will force both parties to reveal their variables. As will become clear in the applications to be given later, this sometimes can be a serious drawback. The following results will show that one can thwart cheating, without asking either to reveal the variable.
Since a protocol can never prohibit Alice (or Bob) from behaving as if she had a different variable value \(i'\), the most that a protocol can achieve is to make sure that this is the only cheating that Alice (or Bob) can do.
So, in particular, Alice and Bob can never:
- Start with one \(i\), then change to another \(i'\) at a different time during the computation.
- Start with an invalid \(i\), although this is sometimes impossible to do at all (as with Alice in the millionaires' protocol)
Consider an instance in the execution of a protocol. We will consider it to be a successful cheating by Alice, if Alice does not behave consistently with any value of \(i\) and yet Bob does not detect it. A successful cheating by Bob is defined similarly.
Theorem 4Let \(1\gt\gamma\gt0\). Under the same assumption of Theorem 2, there exists a protocol \(A\) for computing \(f\) such that
- \(T(A)\)\(\in \operatorname O\left(C(f)\log{\frac{1}{\epsilon\cdot\delta\cdot\gamma}}\log{\frac{1}{\gamma}}\right)\), and
- if one participant behaves according to \(A\), the probability of a successful cheating by the other participant is at most \(\gamma\)
Cheating and colluding are addressed in a tutorial section, or under the tags Collusion and Dishonest Parties in the research-by-category section.
3.4. Applications
Secret Voting
Suppose a committee of \(m\) members wish to decide on a yes-no action. Each member is to write an opinion \(x_i\), and the final action can be regarded as a function \(f(x_1, x_2, x_3,\dots, x_m)\). The results obtained in this paper means that it is possible to agree on the final action \(f\), without anyone knowing the opinion of any other member's. Furthermore, the protocol makes the probability of anyone having a successful cheating very remote.
Definitely the most relatable and understandable use of multiparty computation mentioned! A basic coverage of voting is dealt with in the first tutorial, and further research can be found under the Voting tag.
Oblivious Negotiation
Suppose that Alice is trying to sell Bob a house. In principle, each one has a strategy of negotiation in mind. If we number all the possible strategies of Alice as \(A_1,A_2,\dots,A_t\), and those of Bob' as \(B_1,B_2,\dots,B_u\), then the outcome (no deal, or sell at \(x\) dollars,&hellips;) will be decided once the actual strategies \(A_i, B_j\) used have been determined. Write the outcome as \(f(i, j)\), then it is possible to carry out the negotiation obliviously, in the sense that Alice will not gain any information on Bob's negotiation tactics except that it is consistent with the outcome, and vice versa.
Private Querying of a Database
The theorems we have proved can be extended to the case when each person \(P_i\) is computing a different function \(f_i\). In particular, Alice may wish to compute a function \(f(i, j)\) and Bob wishes to compute a trivial function \(g(i, j) =\) constant, meaning that Bob will know nothing about \(i\) in the end. If we regard Bob as a database query system with \(j\) the state of the database, and Alice is asking query number \(i\), then Alice can get answer to the query without knowing anything else about the data in it, while the database system does not know what Alice has queried.
An abstract but definitely extremely useful category of multiparty computation that is also a subproblem of Oblivious Transfer.
4. Probabilistic Computations
Let us consider the case with two parties Bob and Alice \((m = 2)\). Let \(V\) and \(W\) be finite sets. A function \(p\) from \(V \times W\) to the interval \([0, 1]\) is called a probability density if the sum of \(p(v,w)\) over \(v\) and \(w\) is equal to \(1\). Let \(P(V,W)\) be the set of all such probability densities.
Let \(I, J\) be finite sets of integers. Let \(F = \{f_{ij} | i \in I, j \in J\} \subseteq P(V,W)\) be a family of probability densities. Initially, Alice knows the value of \(i \in I\), and Bob knows \(j \in J\); the values of \((i, j)\) obey a certain initial probability density \(q \in P(I, J)\). They wish to send messages between them, so that at the end Alice will obtain a value \(v \in V\) and Bob a value \(w \in W\) with probability \(f_{ij}(v,w)\). The privacy constraint is that the information Alice can obtain about \(j\) and \(w\) is no more than what can be inferred from her values of \(i\) and \(v\) (plus a corresponding constraint on Bob). This statement can be made precise in terms of \(q\) and \(F\); we omit its full generality here but simply give an illustration for the special case \(q\) = constant. In this special case, the distribution \(h(w)\) that Alice can infer from the computation she has done, according to the privacy constraint, is equal to
$$\frac{1}{|J|}\sum\limits_{j\in J}\frac{f_{ij}(v,w)}{\sum\nolimits_{x\in W} f_{ij}(v,x)}$$
Keep in mind that this is the probability of \(w\) given a particular \(i\) and \(v\); Bob's equation would be the same, but with \(j\) and \(v\) instead. Since \(q\) is constant, the probability of each \(j\) is equally likely to any other, so we can simply add all \(|J|\) probabilities together and divide by \(|J|\) at the end.
For example, mental poker would correspond to the following situation: \(I = J = {0}\), \(q\) is a constant, \(V = W\) is the set of all 5-element subsets of \({1, 2,\dots, 52}\), \(f_{00}(v,w)\) is \(0\) if \(v\) and \(w\) are not disjoint and equal to a constant otherwise.
The results in Section 3 have generalizations to the probabilistic case. Basically, a reasonable probabilistic computation remains feasible when the privacy constraints are imposed. We will not give the details here.
One interesting corollary of our results is that mental poker can be played with any general public-key system. It differs from Shamir et. al's solution[5] in that we do not require the one-way functions used to be commutative, and that we can play it with a public-key system (instead of using private keys). (A solution with a special one-way function with publicized keys for playing mental poker was known in [2], but that solution depends on the special properties of the one-way function involved.) Moreover, the present solution uses much fewer bits as the number of cards becomes greater. Suppose we have a deck of \(n\) cards, and Alice and Bob each want to draw a random card from the deck in turn. All the previously known solutions transmit \(cn\) bits of information between Bob and Alice, while our scheme only needs about \(c(\log{n})^2\) bits.
5. Generalization to \(m\)-Party Case
When \(m\) parties \(A_1,A_2,\dots,A_m\) collaborate to compute a function \(f(x_1, x_2,\dots,x_m)\), more than one parties may collude to cheat. We will show that even the most severe constraint can be met in the following sense: No matter how many participants may collude, any cheating act will be detected and identified by all the honest parties (even if as many as \(m−1\) dishonest guys try to help cover up). We now make it precise.
Remember, however, that some collusions and types of cheating are impossible to fight against: Yao is only referring to collusions and cheating which involve inconsistencies in input variables. As an example, if ten people are trying to compute the sum of their private variables securely, but nine of them collude in order to determine the tenth's private variable, the protocol will not make a difference: they need only share those nine values and follow the protocol correctly, and they will all know the tenth value as well, by subtracting from the total sum. The guarantee Yao is making is that none of those people could convince someone they did the protocol correctly if they actually used changing random numbers throughout.
Let \(V\) be the range of the function \(f(x_1, x_2,\dots,x_m)\), where \(x_i \in X_i\). For any nonempty \(K \subseteq \{1, 2,\dots,m\}\), define \(H_K = X_{t_1} \times X_{t_2} \times \cdots \times X_{t_{|K|}}\) , where \(\{t_1, t_2,\dots, t_{|K|}\} = K\). Let \(K' = \{1, 2,\dots,m\} − K\), and define \(H_{K'}\) similarly. For any \(i \in H_{K'}\) and \(v \in V\) , let \(G_i(v) \subseteq H_K\) be the set of all \(j \in H_K\) such that the (unique vector) \(x = (x_1, x_2,\dots, x_m)\), whose projection on \(H_{K'}\) and \(H_K\) equals \(i\) and \(j\) respectively, satisfies \(f(x) = v\). Let \(q_{i,v}(j) = \frac{1}{|G_i(v)|}\) for \(j \in G_i(v)\) and 0 otherwise. (If all the participants \(A_r\) with \(r \in K'\) collude to infer the probability distribution of the variable values of other participants, and if the only information available, in addition to their only variable values \(i\), is that the function \(f\) has value \(v\), then \(q_{i,v}(j)\) is the distribution they can infer.) Let \(\epsilon,\delta\gt0\). A protocol \(A\) is said to satisfy the \((\epsilon,\delta)\)-private constraint if for every nonempty \(K\), even if the participants in \(K\) are allowed to perform in private an amount of calculation polynomial in \(T(A)\), they will still infer, with probability at least \(1−\delta\), that the distribution on \(j\) is equal to \(q_{i,v}(j)(1+\operatorname O(\epsilon))\). A successful cheating by \(K'\) (with respect to a protocol \(A\)) is an instance of the execution of \(A\), in which at least one participant \(A_r\) with \(r \in K'\) behaves inconsistently with any \(x_r \in X_r\) without being detected by all the participants of \(K\).
The above paragraph is extremely dense, so let's clarify a bit. \(K\) is the set of all honest parties, while \(K'\) is the set of all dishonest parties. The \((\epsilon,\delta)\)-privacy constraint is defined by specifying that all members of \(K\) (and therefore all honest parties) are only able to infer the probability distribution \(q_{i,v}(j)(1+\operatorname O(\epsilon))\). A successful cheating is defined by specifying that all of \(K'\) together was able to trick at least one member of \(K\) into not realizing they had behaved inconsistently with at least one value of \(x\).
Theorem 5For any \(\epsilon,\delta,\gamma\gt0\), there exists a protocol \(A\) for computing \(f\) which satisfies the \((\epsilon,\delta)\)-private constraint and which has the property that, for any \(K' \neq \{1,\dots,m\}\), the probability for \(K'\) to have a successful cheating can not be more than \(\gamma\).
The value of \(T(A)\) in the above theorem is \(\operatorname O(|X_1|\cdot |X_2|\cdot\cdots\cdot|X_m|\cdot|V|)\), which is almost optimal in general as the next theorem shows.
Theorem 6There exist functions \(f\) for which any protocol \(A\) satisfying the conditions in Theorem 5 must have \(T(A)\)\(=\Omega((|X_1|\cdot |X_2|\cdot\cdots\cdot|X_m|)^\frac{1}{4})\)
We should take a second to notice that this is an unreasonably high lower bound for a lot of real world applications. As an example, if there are \(m\) parties trying to calculate \(f\) on \(n\)-digit numbers, then that leaves a lower bound of \(\operatorname\Omega(2^{\frac{nm}{4}})\).
In special cases protocols can be designed with better running time than the bound given in Theorem 5. For example, the parity function \(f(x_1, x_2,\dots, x_m)\) = \(x_1 \bigoplus x_2 \bigoplus \cdots \bigoplus x_m\) and the tally function \(f(x_1, x_2,\dots, x_m) =\) # of 1's in the \(x\)'s (the \(x\)'s are boolean variables) both have protocols satisfying Theorem 5 with running time polynomial in \(m\).
The security measure as we considered above is a strong one. For some purposes, less stringent measures would be adequate. (For example, one may only require that no subset \(K'\) be able to force the outcome of the computation to be a certain value.) Sometimes protocols with better running time can be designed under such less stringent requirements. For example, there is a protocol with running time \(\operatorname O(p(m) \log{q})\), where \(p(m)\) is a polynomial, for \(m\) parties to compute the function \(f(x_1, x_2,\dots, x_m)\) = \(x_1 +x_2 +\cdots+x_m\pmod{q}\), under a security criterion only slightly relaxed from that given in Theorem 5.
6. What Cannot Be Done?
There are security constraints that can not be achieved by any protocols. We will only mention two results here.
The first impossibility result is valid for all three models given in this paper. Suppose \(m\) people try to generate a bit with bias \(\alpha\). It is easy to see how it can be done for \(m\gt2\). For example, A generates a random unbiased bit \(\alpha_1\) and sends it to B, B generates a random \(\alpha_2\) and sends it to C, C generates a random \(\alpha_3\) and sends it to A. Now let \(\alpha = \alpha_1 + \alpha_2 + \alpha_3\), and we get an unbiased \(\alpha\) with the property that it remains unbiased even if one of the persons cheats by generating a biased bit. Let us call a protocol for generating a bit with bias \(\alpha\) robust, if the bias remains correct if somebody has cheated.
Theorem 7No protocol \(A\) with finite \(T(A)\) which generates a bit with a transcendental bias \(\alpha\) can be robust.
The second result is valid for the model defined in Section 3.2. Suppose Alice and Bob wish to exchange a pair of solutions \(x, y\) with \(\operatorname E_a(x) = 1\) and \(\operatorname E_b(y) = 1\). Is there a protocol such that an honest party will not be doublecrossed, i.e. swindled out of its secret without getting the secret from the other party?
Theorem 8Let \(A\) be any protocol for exchanging secrets. Then either Alice or Bob will be able to double-cross successfully with probability at least ½.
It is of interest to mention that a different type of exchanging secrets is possible in the same model. Suppose Alice wants to know the solution \(y\) to \(\operatorname E_b(y) = w\) and Bob wants to know the solution \(x\) to \(\operatorname E_a(x) = u\), but Bob does not know the value of \(w\) and Alice does not know \(u\). Let \(N\) be the number of bits that the encryption functions \(\operatorname E_a\) and \(\operatorname E_b\) operate on.
Theorem 9Let \(\epsilon\gt0\) be fixed. There is a protocol \(A\) with polynomial (in \(N\)) running time which exchanges secrets \(\operatorname D_b(w)\) and \(\operatorname D_a(u)\), and under which the probability of anyone double-crossing successfully is bounded by \(\epsilon\).
As a short summary of theorems 8 and 9, when viewed together: either Alice or Bob can double-cross the other easily assuming that they know the value they are decrypting. If they do not know the value they are decrypting, their ability to double-cross can be bounded.
Different kinds of exchanging secrets have been considered previously. Blum[6] showed that it is possible to exchange factors of large composite numbers (a special type of secrets) with vanishing chance for cheating. Even (private communication, 1981) also devised some protocols for exchanging secrets.
Footnotes
- We have defined \(n\) to be the range of \(i,j\), fixed by the participants before the run of the protocol. Bob only sees the decryption of some \(n\) values under Alice's encryption scheme; in order for Bob to learn information, he must guess some value that encrypts to one of those values. By the definition of a permutation, there are only \(n\) values that Bob could guess correctly; this means there is a \(\frac n{2^N}\) probability that Bob will learn any information on each guess he makes. As such, the probability of Bob getting any information is \(\operatorname O\left(\frac{\operatorname{poly}(n)}{2^N}\right)\).
References
- Whitfield Diffie and Martin E. Hellman. New directions in cryptography. IEEE Transactions on Information Theory, IT-22(6):644–654, 1976.
- S. Goldwasser and S. Micali. Probabilistic encryption and how to play mental poker keeping secret all partial information. In Proceedings of the 14th ACM Symposium on Theory of Computing (STOC'82), pages 365–377, San Francisco, CA, USA, May 1982.
- M. O. Rabin. Digitalized signatures and public-key functions as intractable as factorization. Technical Report LCS/TR-212, Massachusetts Institute of Technology, 1979.
- R. L. Rivest, Adi Shamir, and Leonard M. Adleman. A method for obtaining digital signatures and publickey cryptosystems. Communications of the ACM, 21(2):120–126, February 1978.
- Adi Shamir, R. L. Rivest, and Leonard M. Adleman. Mental poker. Technical Report LCS/TR-125, Massachusetts Institute of Technology, April 1979.
- Manuel Blum. Three applications of the oblivious transfer: Part I: Coin flipping by telephone; part II: How to exchange secrets; part III: How to send certified electronic mail. Technical report, University of California, Berkeley, CA, USA, 1981.
- Andrew C. Yao. Some complexity questions related to distributive computing. In Conference Record of the 11th ACM Symposium on Theory of Computing (STOC'79), pages 209–213, Atlanta, GA, USA, April 1979.
His previous research on the minimum number of bits exchanges is an interesting read, but is not necessary to understand this paper. It is much more about minimizing the amount of information exchanged (in a more information theoretical way) than about privacy, so has much less bearing here.
Created by Nicolas Schank 2014, Brown University
All original work is free for any use by anyone whatsoever.
For more information about liability and licensing Yao's original paper, see Liability.
