{'fraction_non_alphanumeric': 0.04974811083123426, 'fraction_numerical': 0.014919589226894013, 'mean_word_length': 3.933094384707288, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
How to Securely Compute the Modulo-Two Sum of Binary Sources

In secure multiparty computation, mutually distrusting users in a network want to collaborate to compute functions of data which is distributed among the users. The users should not learn any additional information about the data of others than what they may infer from their own data and the functions they are computing. Previous works have mostly considered the worst case context (i.e., without assuming any distribution for the data); Lee and Abbe (2014) is a notable exception. Here, we study the average case (i.e., we work with a distribution on the data) where correctness and privacy is only desired asymptotically. For concreteness and simplicity, we consider a secure version of the function computation problem of K\"orner and Marton (1979) where two users observe a doubly symmetric binary source with parameter p and the third user wants to compute the XOR. We show that the amount of communication and randomness resources required depends on the level of correctness desired. When zero-error and perfect privacy are required, the results of Data et al. (2014) show that it can be achieved if and only if a total rate of 1 bit is communicated between every pair of users and private randomness at the rate of 1 is used up. In contrast, we show here that, if we only want the probability of error to vanish asymptotically in block length, it can be achieved by a lower rate (binary entropy of p) for all the links and for private randomness; this also guarantees perfect privacy. We also show that no smaller rates are possible even if privacy is only required asymptotically.


I. INTRODUCTION
In secure multiparty computation (MPC), mutually distrusting users in a network want to collaborate to compute functions of data which is distributed among the users. The users should not learn any additional information about the data of others than what they may infer from their own data and the functions they are computing. Various applications such as online auctions, electronic voting, and privacy preserving data mining motivate the study of MPC [6,Chapter 1].
In a seminal result, Ben-Or, Goldwasser, and Wigderson [1] (also see Chaum, Crépeau, and Damgård [3]), established that information theoretically secure computation of any function is feasible by n users who are connected pairwise by private noiseless communication links and who have access to private randomness, even if any set of strictly less than n/2 users collude. The n/2 threshold is for the honest-but-curious setting where the users do not deviate from the protocol during its execution, but a subset of users may collude at the end of the protocol to try to infer information about data of other Authors are listed in the alphabetical order. users that they cannot infer from their own data and outputs of the function they computed. In making this inference, they may make use of their own data, their private randomness, and all the messages they sent and received during the execution of the protocol. The threshold is n/3 for the malicious case where the colluding users may also deviate from the protocol during its execution. It is also known that these thresholds are tight in the sense that there exist functions which cannot be securely computed when the number of colluders exceed these thresholds 1 .
The amount of communication and randomness required to securely compute in the model of [1], [3] is an important open problem. Several works have addressed this to a limited extent, for the most part, in the worst case context (i.e., without assuming any distribution for the data) and for zeroerror computation with perfect privacy [2], [4], [8]- [11], [13], [14]. Most directly relevant to this paper is [8] where generic information theoretic lower bounds were obtained for zeroerror computation in a three-user model with perfect privacy against individual users.
In this paper, in contrast to the above works, we take a distributed source coding approach to this problem. Specifically, we will assume a probability distribution for the data (discrete memoryless distributed source), and seek the averagecase performance under asymptotically vanishing error and vanishing privacy leakage. We would like to point out that [15] already considered a similar setting, but for a much weaker notion of security than what we consider below. For concreteness and simplicity, we focus on the famous example of Körner and Marton [12]. Consider Figure 1. Alice (user 1) and Bob (user 2) observe data X n and Y n which are nlength bit strings drawn i.i.d. according to the distribution p XY (x, y) = p 2 1 x =y + 1−p 2 1 x=y , where 0 ≤ p ≤ 1/2. This is sometimes referred to as the doubly symmetric binary source (DSBS) with parameter p. Charlie (user 3) wants to compute the function Z n = X n ⊕ Y n , the binary sum (XOR) of the corresponding elements of the data vectors. Note that Z n ∼ i.i.d. Bernoulli(p). Körner and Marton gave a function computation scheme which requires a rate of R = H 2 (p) each from Alice to Charlie and Bob to Charlie such that Charlie recovers Z n with vanishing error (as n → ∞), where H 2 is the binary entropy function. The scheme involved Alice and Bob sending syndromes of their observations computed for the same capacity approaching linear code for binary symmetric channel with crossover probability p (BSC(p)). Charlie computes the binary sum of the syndromes to obtain the syndrome of Z n from which Z n can be recovered with high probability.
We will additionally require the privacy conditions that Alice and Bob must not learn more information about each other's data than what they can already infer from their own data, and that Charlie should not learn more information about Alice and Bob's data than what he can infer from the binary sum Z n he wants to compute. Users only have access to private randomness and pairwise noiseless bidirectional communication links which they may use over multiple rounds. The users are assumed to be honest-but-curious. By [1], it is known that any function of the data at Alice and Bob can be computed at Charlie while guaranteeing these privacy requirements. We are interested in characterizing the rates of communication (expected number of bits exchanged over each link per source symbol) and the rate of private randomness used. Our main result is a characterization of these rates for the case where we only require that Charlie reconstruct Z n with asymptotically vanishing probability of error (as n → ∞) and when the privacy conditions hold in the sense of asymptotically vanishing information leakage (stated formally in Section II).
One of the examples in [8] gives the answers for the zeroerror and perfect privacy case. It is easy to see that a simple protocol achieves a rate of one bit per source symbol over each of the links and a rate of one bit of private randomness 2 . [8] shows that there is no zero-error, perfectly private protocol which can do with less. In fact, none of these rates can be lowered even at the expense of higher rates for the others. For completeness, a short proof of this is presented in the appendix.
If the zero-error requirement is relaxed to vanishing error, the coding scheme of Körner and Marton suggests the following secure computation scheme which only requires rates of H 2 (p). Recall that Körner and Marton's function computation scheme requires a rate of R = H 2 (p) from each of Alice and Bob to Charlie. For secure computation, Alice sends to Bob an nR-length vector K nR of i.i.d. uniformly distributed bits drawn from her private randomness. Both Alice and Bob send their respective syndromes (of length nR) XORed with K nR to Charlie. Charlie adds these to recover the syndrome of Z n as before. It is easy to see that this scheme, in fact, guarantees perfect privacy. We show that this scheme is optimal in the sense that none of the rates can be reduced even at the expense of higher rates for the others and even if only asymptotically vanishing information leakage is desired.
We prove this converse result for a fairly general class of interactive protocols.
Related works include works on function computation without the privacy requirement [16]- [18]. As already pointed out above, another related work is [15]. It studies the randomness required for secure sum computation under two different settings: (i) in the zero-error, perfect privacy, worst-case setting, and (ii) average case, asymptotically correct setting under a much weaker notion of privacy that users are unable to asymptotically correctly guess the entire data of another user, but when no private randomness is available to the users.  In the setup of Figure 1, Alice (user 1) and Bob (user 2) have blocks of data/input bits X n and Y n respectively, where (X n , Y n ) are drawn i.i.d. from a Doubly Symmetric Binary Source (DSBS)-p distribution p XY (x, y) such that X and Y are both Bernoulli(1/2), and P r(X = Y ) = p. Charlie (user 3) wishes to compute an estimateẐ n of the bit-wise XOR of X n and Y n . That is,Ẑ n is an estimate of Z n = X n ⊕ Y n . Notice that X n , Z n are independent and so are Y n , Z n . Each pair of users is connected by a binary, error-free, bidirectional link private from the other user. At the beginning of the protocol, all users are allowed to generate private random variables, i.e., they may generate random variables which are independent of each other and the data. We are interested in reliably and securely computing the XOR, where any single user does not learn anything about the other users' inputs/output (if any) at the end of the protocol than what its own input/output (if any) reveals about them. We formalise this in Definition 3. We assume that the users are honest-but-curious, i.e., they follow the protocol honestly but are interested in obtaining additional illegitimate information about the inputs/output of other users from all the messages exchanged.
To accomplish the above task, users need to communicate. Communication proceeds over multiple rounds. In each round t, every user sends a (potentially empty) message in the form of a variable length, binary string to every other user. Let M− → ij ,t denote the message from user i to user j, sent in round t. M− → ij ,t may depend only on user i's input (if any), private randomness, and all the messages it has seen so far. We require that M− → ij ,t belong to a variable length prefix-free code C− → ij ,t which itself could be random (determined by the inputs and the private randomnesses). However, at the beginning of round-t, both users i and j must each deterministically know C− → ij ,t from the messages they have exchanged with each other over the ij-link between them in the previous (t − 1) rounds. The total number of rounds is also allowed to be random, but from the above description, it is clear that each user will come to know when the exchanges involving it have finished. We insist that the protocol terminates in finite number of rounds with probability 1. On termination, Charlie outputsẐ n as a function of his private randomness and all the messages he received.

Definition 1.
In a protocol Π n , where n is the input block length, users exchange messages with each other over several rounds as described above at the end of which Charlie produces an outputẐ n . We use the following notation throughout this paper. The transcript on ij-link at time t is We also define M We note that once the protocol ends at some finite time, all the subsequent messages are of zero-length.

Definition 3.
A rate quadruple (R 13 , R 23 , R 12 , ρ) is achievable in the setup of Figure 1 if there exists a sequence of protocols (Π n ) n∈N , with rates r ij,n ≤ R ij for i, j = 1, 2, 3, i = j, and ρ n ≤ ρ, such that Notice that we do not need to explicitly include the private random variables in the privacy conditions since conditioned on the messages and input (if any) at a user, its private random variable is independent of the the other input(s). (4) is a privacy promise to Alice and Bob that Charlie learns only asymptotically vanishing amount of information about their data in addition to Z n which he is allowed to compute. Similar interpretations hold for the other two privacy conditions. Figure 1 is defined as the closure of the set of all achievable rate quadruples.

Definition 4. The rate region R for the setup in
Our main result is a characterization of the rate region R.

Remark 1:
The achievability is in fact proved for the perfect privacy case where the privacy conditions (2)-(4) hold with equality. And, our converse is proved for the weak privacy setting where (2)-(4) are replaced by (5)-(7) (see Section IV), i.e., only the rates of information leaked need to vanish asymptotically. Remark 2: We note that if Charlie is required to compute Z n with zero error and perfect privacy (i.e., when (1)-(4) hold with equality), then on all three links we need n bits to be exchanged and n bits of private randomness is needed [8]. This result is discussed in the Appendix.

III. PROOF OF ACHIEVABILITY
Our achievability scheme directly builds on Körner and Marton's scheme for modulo-two sum of doubly symmetric binary sources [12]. Since (X, Y ) is a DSBS-p, their XOR Z = X ⊕ Y is Bernoulli(p). It is well-known that linear codes achieve the capacity of the binary symmetric channel. i.e., for fixed ǫ > 0, R = H(p) + ǫ and for each block length n, there is a linear coding matrix Λ n of size (nR) × n and a decoder D n such that P (D n (Λ n Z n ) = Z n ) → 0 as n → ∞. In Körner and Marton's scheme, Alice sends (Λ n X n ) and Bob sends (Λ n Y n ) to Charlie, who XORs the received vectors component-wise to get (Λ n Z n ). Using the decoder D n , Charlie recovers Z n with vanishing probability of error.
In our scheme, Alice first generates m := nR private random Bernoulli(1/2) bits K m and sends it to Bob. She also sends A = K m ⊕ (Λ n X n ) to Charlie. Bob sends B = K m ⊕ (Λ n Y n ) to Charlie. Charlie XORs the two binary vectors he received component-wise to get (Λ n Z n ) and proceeds to decode as before. This scheme has the rate-tuple (R, R, R, R) with R = H(p) + ǫ. Since ǫ can be chosen to be arbitrarily small, it is sufficient to consider this class of protocols for the achievability of Theorem 1.
It is straightforward to show that our protocol is perfectly private, i.e., (2), (3), and (4) hold with equality. For (2), since K m is independent of (X n , Y n ), and A is a function of (X n , K m ). Similarly, (3) holds with equality. Finally, for (4), I(A, B; X n , Y n |Z n ) = I(A, B; X n |Z n ) = I(A, B, Z n ; X n ) − I(Z n ; X n ) The penultimate step follows from the fact that K m ⊕ (Λ n Y n ) = (K m ⊕ (Λ n X n )) ⊕ (Λ n Z n ).

IV. PROOF OF CONVERSE
Let (R 13 , R 23 , R 12 , ρ) be an achievable rate quadruple. Then, by Definition 3, there exists a sequence of protocols (Π n ) n∈N with the corresponding rates r ij,n ≤ R ij , i, j = 1, 2, 3, i = j, ρ n ≤ ρ, satisfying (1) and the weak privacy conditions as n → ∞. By Fano's inequality, (1) implies, as n → ∞, For the lower bound on R 12 , we proceed as follows. ≥ nH(Z) + I(X n ; Y n ) − I(X n ; M 12 ) − I(X n ; Y n |M 12 ) Here, in (10), C− → 12,t and C− → 21,t denote the prefix-free codes that are used in sending the messages M 12,t and M 21,t , respectively. These codes depend on the particular instance of the protocol, and are known to Alice and Bob based on all the messages (M t−1 12 ) communicated between them till time t − 1. (10) follows from the fact that expected length L of any prefix-free binary code for a random variable U is lower bounded by H(U ) [5, Theorem 5.3.1]. (11) holds because at time t, the prefix-free codes used by any two users (say 1 and 2) are determined by M t−1 12 . (13) follows because, since X n and Z n are independent, I(X n ; M 13 ) ≤ I(X n ; M 13 , M 23 , Z n ) = I(X n ; M 13 , M 23 |Z n ) ≤ nǫ 3 . (14) follows from H(X n |Y n , M 12 , M 13 ) ≤ nǫ 4 which can be seen as follows: From the cut separating Alice from Bob and Charlie, it follows that, conditioned on (M 12 , M 13 , Y n ), Charlie's outputẐ n is independent of X n , which implies the Markov chainẐ n − (M 12 , M 13 , Y n ) − X n . Therefore, H(X n |Y n , M 12 , M 13 ) = H(X n |Y n , M 12 , M 13 ,Ẑ n ). Since Z = X ⊕ Y , we have H(X n |Y n , M 12 , M 13 ,Ẑ n ) = H(Z n |Y n , M 12 , M 13 ,Ẑ n ) ≤ H(Z n |Ẑ n ) = nǫ 4 . Now, since ǫ 1 + ǫ 2 + ǫ 3 + ǫ 4 → 0 as n → ∞, and r 12,n = Remark: Körner and Marton [12] proved a lower bound of H(Z) on R 13 and R 23 assuming non-interactive communication between Alice/Bob and Charlie, that is, Alice and Bob both send one message to Charlie and based on these two messages Charlie produces the output. However, this does not directly apply here since now there is a link between Alice and Bob, and in addition we allow interactive communication and private randomness. Note that our bound depends on both the privacy and correctness conditions since, in the absence of the privacy conditions, Alice need not communicate directly with Charlie, for instance.
For the randomness rate ρ, we proceed as follows: where (15) follows for the same reason as (13). To bound I(X n ; M 13 |M 12 ) in (15), we proceed similarly as done from (13). Since 2ǫ 1 + ǫ 2 + ǫ 3 + ǫ 4 → 0 as n → ∞, and ρ n ≤ ρ, we have This completes the proof of the converse. Remark: Our converse allows for a very general class of protocols. We not only consider protocols with fixed-length messages, but those with variable length messages as well. We imposed a technical condition that the (potentially random) prefix-free code used for any message transmission on a link be fully determined by previous messages exchanged over the same link. Strictly speaking, this is not necessary. It will suffice for the two communicating users to both agree on the same code (with probability 1), but in this they may rely on their data (if any), private randomness, and messages from the third user as well. We believe that the same result holds even for this slightly more general setting. The proof here can be readily extended to derive the same lower bounds in this more general case for all but R 12 .

APPENDIX
Here we summarize the arguments of [8] specialized to perfectly secure computation of XOR (with zero error and perfect privacy), i.e., (1)-(4) hold with equality. We allow all input distributions p XY with full support. Alice and Bob each have a block X n and Y n of n bits respectively, and Charlie wants to compute Z n , component-wise XOR of the input bits. A simple protocol for this is: Alice samples n i.i.d. uniformly distributed bits (K 1 , K 2 , . . . , K n ) from her private randomness and sends M 13 = K n ⊕ X n to Charlie and M 12 = K n to Bob. Bob computes M 12 ⊕ Y n and sends it to Charlie as M 23 . Charlie computes M 13 ⊕ M 23 , which is equal to X n ⊕Y n and outputs it. Clearly, this protocol requires n privately random bits as well as n bits to be communicated on each of the three links. In Theorem 2, we show that this is optimal. Lemma 1. Any perfectly secure protocol for computing XOR (with zero-error and perfect privacy), for p XY with full support, satisfies H(X n |M 12 , M 13 ) = H(Y n |M 12 , M 23 ) = 0, I(M 12 ; X n , Y n ) = I(M 13 ; X n , Y n ) = I(M 23 ; X n , Y n ) = 0.
Proof: See [8, Lemmas 2 and 3]. The lemma states that (i) examining the transcripts on the links which Alice is party to must reveal X n (similarly for Bob and Y n ), and (ii) examining the transcripts on any one of the links must reveal nothing about X n , Y n . Theorem 2 (Theorem 13 of [8]). Any perfectly secure protocol for computing XOR (with zero-error and perfect privacy), for p XY with full support, satisfies, r 12,n , r 23,n , r 13 , ρ n ≥ 1.
where (17) and (18) follow from Lemma 1. Now we apply the distribution switching idea from [8] to complete the argument. Briefly, we note that any secure protocol for XOR, where input distribution p XY has full support, continues to be a secure protocol even if we switch the input distribution to a different one pXỸ . This follows directly from zero-error and prefect privacy conditions. Together with Lemma 1, this implies that the marginal distributions of the transcripts M 12 , M 23 and M 13 (and therefore their expected lengths) do not change if we switch the input distribution; see [8, Section 3.2] for more details. This allows us to argue that nr 12,n ≥ sup pXỸ H(X n ) = n, where pXỸ is any distribution having full support. Now, taking the uniform distribution gives r 12,n ≥ 1. For randomness, ≥ n. (as for nr 12,n above)