Docsity

Secure Multi-Party Computation: Simulating Trust in Distributed Systems, Study notes of Network security

Toggle sidebar
bg1
Dr. Dahlia Malkhi, Lecture Notes on
Secure Multi Party Computation (SMPC)
An advanced course in computer and network security, Spring 2002,
Hebrew University, Jerusalem
By Max Stepanov and Elena Pilipenko
1. Informal Setting
We start with the following example taken from [FGY92]. Suppose that the heads of the
Fortune 500 companies agree to cooperate in a comprehensive study of their collective
financial health. The study might consist of statistical functions that combine existing raw
data from each company, e.g., “the sum of 2003 net earnings of all 500 companies,” and
etc. Further suppose that, although all companies wish to know the results of this study,
none is willing to risk the exposure of its individual financial data in the process. If an
independent trusted agent is available (e.g., Price-Waterhouse), the problem is easy. Each
company gives its raw data to the trusted agent, who computes the statistics on
everyone’s behalf. In the absence of independent trusted agent, however, can these titans
of industry still achieve their goal?
They can. Secure distributed computing (or “fault-tolerant distributing computing”, or
“oblivious circuit evaluation”) is the problem of evaluating a function (or, equivalently, a
circuit) to which each player has one secret input, such that the output becomes
commonly known while the inputs remain secret. The problem would be trivial in the
presence of a trusted agent. All players give their private inputs to the agent, who
computes the function and distributes the output. The task of protocols for secure
distributed computation can be considered to be the simulation of the presence of a
trusted agent by a group of players who are mutually untrustworthy.
Of course, untrustworthiness, for cryptographers, is a many-flavored thing. It might mean
that all parties behave perfectly during the protocol, but later some group of gossipers
compares notes to try to learn everyone else’s secrets. A stronger meaning might be that
some fixed fraction of the parties cheats during the protocol, but in such a way that the
outcome (i.e., the value of the function) remains the same. Even stronger would be if
some fixed fraction of parties cheated arbitrary during the protocol: yet stronger
adversarial behavior can be imagined.
The solution to this problem exists, and it assumes nothing more than that each company
trusts that there are at least 333 other companies that will not betray it (plus secure phone
lines). Other solutions show that if conference calling is also allowed, then each company
need only assume that 250 other companies are honest. Still other solutions need only
assume that the Chief Number Theorist of each company certifies that certain problems
(such as discrete log) will remain intractable for as long as its financial information
remains sensitive.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Secure Multi-Party Computation: Simulating Trust in Distributed Systems and more Study notes Network security in PDF only on Docsity!

Dr. Dahlia Malkhi, Lecture Notes on

Secure Multi Party Computation (SMPC)

An advanced course in computer and network security, Spring 2002, Hebrew University, Jerusalem

By Max Stepanov and Elena Pilipenko

1. Informal Setting

We start with the following example taken from [FGY92]. Suppose that the heads of the Fortune 500 companies agree to cooperate in a comprehensive study of their collective financial health. The study might consist of statistical functions that combine existing raw data from each company, e.g., “the sum of 2003 net earnings of all 500 companies,” and etc. Further suppose that, although all companies wish to know the results of this study, none is willing to risk the exposure of its individual financial data in the process. If an independent trusted agent is available (e.g., Price-Waterhouse), the problem is easy. Each company gives its raw data to the trusted agent, who computes the statistics on everyone’s behalf. In the absence of independent trusted agent, however, can these titans of industry still achieve their goal? They can. Secure distributed computing (or “fault-tolerant distributing computing”, or “oblivious circuit evaluation”) is the problem of evaluating a function (or, equivalently, a circuit) to which each player has one secret input, such that the output becomes commonly known while the inputs remain secret. The problem would be trivial in the presence of a trusted agent. All players give their private inputs to the agent, who computes the function and distributes the output. The task of protocols for secure distributed computation can be considered to be the simulation of the presence of a trusted agent by a group of players who are mutually untrustworthy. Of course, untrustworthiness, for cryptographers, is a many-flavored thing. It might mean that all parties behave perfectly during the protocol, but later some group of gossipers compares notes to try to learn everyone else’s secrets. A stronger meaning might be that some fixed fraction of the parties cheats during the protocol, but in such a way that the outcome (i.e., the value of the function) remains the same. Even stronger would be if some fixed fraction of parties cheated arbitrary during the protocol: yet stronger adversarial behavior can be imagined. The solution to this problem exists, and it assumes nothing more than that each company trusts that there are at least 333 other companies that will not betray it (plus secure phone lines). Other solutions show that if conference calling is also allowed, then each company need only assume that 250 other companies are honest. Still other solutions need only assume that the Chief Number Theorist of each company certifies that certain problems (such as discrete log) will remain intractable for as long as its financial information remains sensitive.

2. Informal Definition

The Secure Multi-Party Computation problem can be presented as follows:

  • Let P 1 ,
, Pm be m players holding inputs x 1 ,
, xm respectively.
  • F(x 1 ,
, xm) is a function, which we want to compute in such a way, that no information about the inputs is revealed by the computation to the players.

Consider, for example, the following SMPC problem to see that the solution is possible:

  • Let P 1 ,
, Pm be a group of students. Each student holds his/her mark xi, and they altogether want to compute F(x 1 ,
, xm) as an average of their marks, without discovering any private information to others.

The protocol to solve the problem is the following: a. P 1 picks a random value r 1 and sends to P 2 the value r 2 =r 1 +x 1. b. Pi, 2 ≀ i ≀ m-1, sends to Pi+1 the value ri+1=ri+xi= r 1 + ÎŁ j=1i^ xj c. Pm sends to P 1 the value r=rm+xm= r 1 + ÎŁ i=1m^ xi d. P 1 computes R=(r-r 1 )/m= 1/m ÎŁ i=1m^ xi and sends R to others.

We can see that if all students follow the protocol no student gets information about the mark of other student. On another hand at the end of the protocol all students have an average of their marks. Is this protocol secure? What happens if one of the students is a cheater? If he follows the protocol and doesn’t get information from others, he still can learn nothing about the data of other students. On another hand nothing prevents him from breaking the protocol or leaking information to other students. For example, he easily can halt the computation just by not sending his share to the next student. It is also possible, for example, to get information about the mark of Pi if Pi-1 and Pi+1 are cooperative cheaters and could

exchange messages between them. To solve these problems we can either extend existing protocol by adding verification steps, or use new protocols for the same problem allowing us to increase security. It means that we can have a variety of possible solutions and schemes using different techniques that solve the particular problem and meeting particular requirements.

The SMPC protocols can be used in many applications where parties are not trusted or faulty and where disclosure of the private information is critical. Such applications can be ranged from electronic voting systems, e-commerce and financial applications where security is critical to games where SMPC can protect players from cheats.

3. Problem Reduction

Suppose that circuit C for function F of SMPC problem consists of gates AND and XOR only. (Note that for any circuit there exists the isomorphic circuit containing only AND and XOR gates.) In the computation of F we shall simulate the circuit computing C gate

2-way AND gate

The computation of AND gate is a core of the problem. The main difficulty is how Alice and Bob can securely compute shares r 1 and r 2 , such that (r 1 +r 2 )= (a 1 +a 2 )*(b 1 +b 2 ). We

shall see later how the problem can be solved. To do it we still need some additional tools.

4. Computational Model

In order to continue we have to state here a number of important terms. We consider two types of “faulty” behavior by the players.

First we assume that players always follow the protocol but may collaborate and try to learn additional information. Such kind of players is called passive adversaries. In the second case faulty players can collaborate in any way to gather information and disrupt the computation. These players are called active adversaries.

There are two important security properties of computation protocols: privacy and resilience.

  • A protocol is t-private if any set of at most of t players cannot compute after the protocol more than they could compute solely from their set of private input and outputs.
  • A protocol is t-resilient if no set of at most t players can influence the correctness of outputs of other players.

Defining the computational model we can assume also how power the adversary is. Traditional security approach also known as Information-Theoretic [Shn49] considers that the adversary is computationally unbounded. This assumption is quite restrictive and usually unpractical. The Cryptographic security approach [DH76], that was introduced as an alternative to the information-theoretic one, is less restricted by assuming that the adversary has a maximal computational power, and that adversary can solve the “hard” problems only with a negligible probability of success.

We can divide SMPC protocols into two main categories:

  • Cryptographic Protocols – protocols that use cryptography.
  • Non-Cryptographic Protocols – protocols that doesn’t use cryptography and therefore secure in Information-Theoretic sense.

5. Cryptographic SMPC

In this section we present an example how cryptography can be used in SMPC protocol.

Oblivious Transfer

Oblivious Transfer (OT) is one of basic primitives used in many security protocols. The first version of Oblivious Transfer, due to Rabin [Rab81], is the following:

  • Alice has a secret bit (message) unknown to Bob.
  • Alice sends it to Bob, but Bob receives it with probability œ. Bob always knows when the bit sent by Alice was either received or not. On another hand Alice doesn’t know it and the best she can do is to guess the result with probability œ. Another version of Oblivious Transfer is as follows: (i) Alice has two secret bits (messages) b 0 , b 1 unknown to Bob. (ii) Bob can select to receive exactly one of the bits without letting Alice know which bit was chosen. Again, in this case Alice can only guess the bit selected by Bob, when Bob doesn’t obtain information about the bit that was not selected by him. The last case can be easily generalized to the case of n Alice’s messages. Importance of OT is that it can break the “knowledge symmetry” between two players.

Using OT to compute XOR gate

Finally, we can complete the computation of the 2-way XOR gate. We shall use OT to achieve the goal: a. Alice picks c 1 at random. b. Alice (sender) computes multiplication table of (a 1 + a 2 )*(b 1 +b 2 )-c 1 for all a 2 , b 2. c. Bob (receiver) designates index in multiplication table according to the values of a 2 and b 2. d. Alice and Bob use OT to pass the right value from Alice to Bob.

At the end of the protocol:

  • Alice has c 1
  • Bob has c 2 = (a 1 + a 2 )(b 1 +b 2 )-c 1 (⇒ c1+ c 2 =(a 1 + a 2 )(b 1 +b 2 ))
  • Alice doesn’t learn anything about a 2 , b 2.
  • Bob doesn’t learn other values in the table.

OT with one-way trapdoor function

Intuitively one-way function is a function that easy to compute, but difficult to invert.

Let f = {fk} be a family of functions defined on bit strings, where fk:{0,1}k^ → {0,1}*.

f is called one-way function if the following requirements are satisfied: a. There is a deterministic polynomial time (in k) algorithm to compute fk. b. For every probabilistic polynomial- time algorithm A and for every polynomial p(n) there exists nc such that for any n > nc and x ∈ {0,1}n Pr(A(f(x)) ∈ f –1(f(x))) < 1/p(n).

amount of computation, send a message to each of the players and read all messages sent to it by other players at this round. There are two kinds of faults: a. “Gossip” – bad players always follow a protocol, but try to learn as much as they can by sharing the information they receive. We can think about this case as about SMPC with passive adversaries. b. “Byzantine” – bad players can break a protocol by cheating, collaborating with each other in order to acquire more information or even sabotaging the computation. In this case the adversaries are active.

We estimate the power of security protocol in the terms of t-privacy and t-resiliency as was defined above. The full understanding of power and limits of the model mentioned above can be found in [BGW88].

The main results of the work:

  1. For every (probabilistic) function f and t < n/2 there exists a t-private protocol.
  2. There are functions for which there are no n/2 private protocols.
  3. For every probabilistic function and every t < n/3 there exists a protocol that is both t-resilient and t-private.
  4. There are functions for which there is no n/3 resilient protocol.

Note1: [CCD88] presents other implementation of t-resilient protocol for n > 3t.

Note 2: It’s clear that results can be different depending on the computational model or on assumptions about the computational strength of the players. Therefore the model definition is quite important here. Thus, for example, adding a broadcast channel to the model mentioned above makes it possible to achieve t-resilient and t-private protocol with n> 2t players with exponential small probability of error [RB89], [Bea89].

7. SMPC Protocol (Passive Adversary)

Let P 1 ,
, Pn are players and n ≄ 2t+1. Let E be a finite field such that |E| > n. We want to compute a function F, where without lost of ge nerality, F is a polynomial over E, and all player’s inputs are also some elements from E. The computation of function f can be divided into three stages: a. Input Stage – all players enter their input variables to the computation using a secret sharing procedure. b. Computation Stage – the players simulates the circuit computing f, gate by gate, keeping the value of each computed gate as a secret shared by all players. c. Final Stage – players send their shares to one (or all) of the players, allowing calculation of the final result.

Input Stage

The goal of this stage is to share initial inputs using Shamir’s secret sharing scheme [Sha79]. Let α 1 ,
, α n be n distinct non- zero points in field E. Let ai be an input for F of

the player Pi, i = 1..n. Every player Pi selects random polynomial fi (x) of degree t such

that fi(0)=ai, and sends sj = fi ( α j) to player Pj. Since each player holds random shares uniformly distributed over E, the value of input is completely independent from shares, therefore t-privacy condition is kept.

Final Stage

At the end of the computation stage each player Pj holds a part of the final result

g( α j)=rj ∈ E, where g is a random polynomial of degree t over E, such that

g(0)=F(a 1 ,
,an). In this case (assuming that a computation stage keeps t-privacy condition) shares also are totally independent from the final result as well as from initial inputs. If players want to let some player know the output value they send their shares rj to this player. Since all coefficients of g, except only its free one, are uniform random variables independent of the inputs, the set of the shares doesn’t contain any information about the inputs that cannot be calculated from g(0).

Computational Stage

As it was mentioned above, the function F that we want to compute is a polynomial of degree t over finite field E. Let a and b are two secrets shared using polynomials f(x) and g(x), and c is a constant. To compute t-private the polynomial F, it’s enough to be able to compute keeping t-privacy condition the following: a. a + b b. ca c. ab

Computation of a + b = f(x) + g(x): the player Pi has to compute the following:

ai + bi = f( α i) + g( α i)=(f+g)( α i).

It is also easy to compute ca. Player Pi computes cai =cf( α i)=(cf)( α i).

In the both cases if f and g are random polynomials of degree t, we have that the result is also a random polynomial of degree t. Note, that having distributed shares we can compute ai+bi and cai with no communication at all.

Computation of a*b = h(0) is not so trivial. There are two main problems:

  • The degree of the result polynomial h(x) =(f*g)(x) = f(x)g(x) is 2t and therefore interpolation of the result polynomial requires 2t+1points. Consequent multiplications only raise degree of the result polynomial.
  • The result polynomial h(x) is not random. Thus, for example, we know that the result polynomial can be divided by other polynomial.

The solution assumes the following:

On the other hand it is easy to see that two players each holding one input bit cannot compute OR function without one of them leaking some information. Therefore we conclude the following: Theorem 2 : There are functions for which there is no n/2-private protocol.

8. Robust SMPC

When the adversary is active it can cause faulty players to deviate from a protocol. If a protocol is secure against such kind of adversary the honest players should be able to detect cheating and to take corrective actions. The goals of such protocol are: a. Ensure unique computation: verify that all values are shared properly. b. Ensure correct values: verify that intermediate results are shared and used correctly. c. Suppose a and b are shared among players a. Verify that shares of good players encode unique value (VSS) b. In multiplication, verify that hi(0) encodes multiplication result consistent with shares a, b. We shall see later how these goals can be achieved.

Information Theoretic Verifiable Secret Sharing

In this section we shall show how to share secret with active adversaries to achieve both t-resilience and t-privacy in information theoretic sense with more than 3t players.

Problem definition:

Let n = 3t + 1 and P 0 
Pn-1 are players.

We want to share a secret between the players such that: (i) Any set of at most t players doesn’t have any information about the secret (ii) The secret can be computed from the player’s shares even if up to t pieces are wrong or missing (up to t cheaters)

Scheme:

Let E be a finite field with a primitive nth root of unity, w ∈ E, wn^ = 1 and for all 1<j<n wj^ ≠ 1 (Note: The importance of this choice for share is that the vector of n shares of any secret is a codeword of a generalized Reed-Muller error-correction code that is used later.). We can assume without lost of generality that a secret s ∈ E.

Pick a random polynomial f(x) ∈ E[x], f(x) = a 0 + a 1 x +
atxt^ of degree t such that f(0) =

s (i.e. a 0 = s and ai ∈ E, 1<i<t, are independent random variables uniformly distributed over E). The secret share for player Pi is defined as si = f(wi).

As in Shamir’s [Sha79] secret sharing scheme, si are independent random variables

uniformly distributed over E. Thus, distributing the shares si between the players, any

group of at most t players cannot get any information about the secret.

If t pieces are wrong or missing the polynomial f(x) passes through n-t correct points. Therefore, knowing that t ≄ degree( f) it’s still possible to reconstruct f using t+1 point of good player with interpolation.

Setting ai = 0 for all i > t and taking in consideration that w was selected as nth^ root of unity makes the vector (s 0 , s 1 
 sn-1) the DFT of (a 0 , a 1 
 an-1) and DFTn-1^ can be

calculated as ai = 1/n ÎŁ (^) k=0 n-1^ skw-ki.

Since ai = 0 for all i = t+1,
,n-1 we get that

0 = Σ (^) k=0 n-1^ skw-ik^ where i = t+1,
,n- and the last equation is equivalent to 0 = Σ (^) k=0 n-1^ skwjk^ where j = 1,
,2t.

Thus, the polynomial g(x) = Π i=t+1n-1(x-w-i) divides the polynomial h(x)= Σ (^) k=0 n-1^ skxk

meaning that the vector s=(s 0 , s 1 
 sn-1) is a codeword in the Cyclic Code of length n

generated by g(x). Seeing the code as Generalized Reed-Miller code allows correction of 1/2 degree g(x) = t errors [PW, page 238].

Verifying a Secret

The previous section’s assumption was that a secret distributor P was not faulty. If P is faulty he can distribute incorrect shares to other players. In this case other good players have to verify that the secret shares distributed by P are really valid shares. The following protocol makes it possible for the good players to guarantee absolute correctness with up to t ≀ n/3 faulty players.

Assume that a dealer P distributes the secret. P selects n random polynomials f 0 (x), f 1 (x), 
, fn-1(x) of degree t with

(i) si = fi(0) for i=0,
,n- (ii) Σ (^) i=0 n-1^ w r i^ fi(x) = 0 for r = 1,
,2t

In another words, the dealer selects a random two-variable polynomial f(x,y) of degree t such that f(0,0) = s. Then the dealer sends to Pi , 0 ≀ i ≀ n-1, two polynomials:

fi(x) = f(x, w i) and gi(x) = f(w i, x).

The value si =fi(0) is a secret share of the player Pi. The player Pi sends si,j= fi(w j)= f(w j, wi)= gj(wi) to each player Pj.

some player finds out the contradiction he broadcasts request to make all his information public, etc. If more than t players have requested to make their information public the dealer is clearly faulty. In this case all players use zero polynomial instead of that received from the dealer. The dealer can “halt” the process just not answering to requests. In this case, players also use zero polynomial and the dealer is considered as faulty. If at most t players have asked to make their information public, we have at most t bad players among 2t+1 players not complaining (with their information private). Thus, between them we have at least t+1 good players who are satisfied. The information of these players uniquely defines the polynomial f(x,y) and conforms all public data published by the dealer. In this case all complaining players use the public information as their shares.

Note, that the good player Pj requests to publish his information only when the public

information doesn’t conform its polynomials. Since, the dealer distributes both public data and polynomials the player Pj concludes that the dealer is bad. In this case the player

do not have to protect the data received from the dealer and publish it. If the dealer P is good then the good player Pj does not discover the information received

from the dealer and verification process insures that all good players values are on a polynomial of degree t.

9. SMPC Protocol (Active Adversary)

Lets divide again the protocol into three stages: Input, Computation and Final.

Input Stage

At the Input stage players use secret sharing sche me described above to enter their inputs to the computation. The scheme guarantees that the inputs of bad players are well defined, i.e. lays on the polynomial of degree t. But it doesn’t guarantee that the inputs of the players lay in the domain of the function F. For example, the legal values for Boolean functions are false and true, which are usually represented as 0 and 1 respectively. We assume, that such verification will be done later in the computation stage.

Final Stage

The final stage is the same as in the case of SMPC with Passive Adversaries.

Computation Stage

Assume that a and b are shared between all players with polynomials f(x) and g(x) respectively and c ∈ E is a constant. As it was already mentioned above the shares’ computation of a+b and ca is done without communication between the players at all. All

good players are guaranteed to have correct shares after the computation, and therefore the correct result of the computation does not depend on the bad players.

On the other hand, in the multiplication step ab the good players have to verify that all hi,j= hi( α j) used in the computation of their result shares are consistent with shares of a and b. We want to verify that hi(0)=aibi.

Note: The scheme presented here is based on ZK proof that used in [RB89] remaining exponential small probability of error. The original protocol presented in [BGW88] provides us with unconditional proof of the protocol correctness.

Lemma: The dealer can prove that two secrets, s 1 and s 2 , which shared using VSS

described above, are equal.

Proof: Suppose s 1 and s 2 are shared properly (meaning that all good players have correct

shares) via f 1 (x) and f 2 (x), two random polynomials of degree t over E. All players can

compute g(x) =f 1 (x )- f 2 (x) without communication with other players. If a dealer is not

faulty then g(0) = 0 and this can be verified using the shares of the good players.

Lemma : Using the Zero Knowledge technique the dealer can prove that three secrets, a, b and c, satisfy ab=c.

Proof : Let f, g and h be the polynomials used to distribute a, b and c respectively. Denote p=|E|. Let Z={(x,y,z)|xy=z for all x,y ∈ E} be a multiplication table of E. The dealer randomly permutes the members of Z to a list {(xi,yi,zi)} and generates random

polynomials fi, gi, hi of degree t, i = 1,
,p^2 , such that fi(0)= xi, gi(0)= yi, hi(0)= zi.

The dealer prepares independent encoded copies of the multiplication table of E. Then the dealer distributes all the randomly chosen triples in these lists using verifiable secret sharing protocol. Each player randomly chooses to ask dealer either to open completely one of the encoded lists or to proof, using result of the previous lemma, that for some i in the list f(0)= fi(0), g(0)= gi(0), h(0)= hi(0). This procedure provides a zero knowledge

proof with an exponential small probability that h(0)=f(0)g(0).

Now return to multiplication step. We use the same scheme that was used in the case of SMPC with passive adversaries. The last lemma provides us with tools (mostly theoretical, but not practical because of inefficiency) to verify that hi,j, received by the

player Pj from user Pi , is correct. If the value hi,j of some bad player Pi is wrong or

missing, good players can reconstruct the value and use it in the computation. It guarantees that at the end of the computation all good players hold correct shares of the multiplication result.

Since all three stages keep t-privacy and t-resiliency properties we have the following result: Theorem 3: For every probabilistic function and every t < n/3 there exists a protocol that is both t-resilient and t-private.

10. References

[Bea89] D. Beaver. Distributed Computations Tolerating a Faulty Minority, and Multiparty zero- knowledge proof systems. J.Cryptology

[BGW88] M. Ben-Or, S. Goldwasser, and A. Wigderson. Completeness Theorems for Non- Cryptographic Fault-Tolerant Distributed Computations. In Proc. 20th^ Annual Symp. on the Theory of Computing, pp. 1-10, ACM, 1988.

[DH76] W. Diffie and M. E. Helman. New Directions in cryptography IEEE Trans. Inform. Theory, Vol. IT-22, pp.644-654, 1976.

[Gol] O. Goldreich. "Secure Multi-Party Computation", working draft.

[GRR98] R.Gennaro, M. Rabin, T. Rabin. Simplified VSS and Fast-track Multiparty Computations with Applications to Threshold Cryptography. Proceedings of the seventeenth annual ACM symposium on Principles of distributed computing, p.101-111, June 28-July 02, 1998, Puerto Vallarta, Mexico

[FGY92] M. Franclin, Z. Galil, M. Yung. An Overview of Secure Distributed Computing.

[PW] W. W. Peterson and E. J. Weldon. Error correcting codes, Second Ed. MIT Press, (1972)

[Rab81] M. Rabin. How to exchange secrets by oblivious transfer. Tech. Memo TR-81, Aiken Computation Laboratory, Harvard University, 1981.

[RB89] T. Rabin, M. Ben-Or. Verifiable Secret Sharing and Multiparty protocols with Honest Majority. ACM STOC 1989, pp. 73-85.

[Sha79] A. Shamir. How to Share a Secret. Communications of the ACM, 22:612-613, 1979.

[Shn49] C. Shannon. Communication Theory of Secrecy Systems. Bell System Technical Journal, Vol 28, Oct 1949, pgs 656-715.