SWIFT: Super-fast and Robust Privacy-Preserving Machine Learning

Nishat Koti, Mahak Pancholi, Arpita Patra, Ajith Suresh

Introduction

Privacy Preserving Machine Learning (PPML), a booming field of research, allows Machine Learning (ML) computations over private data of users while ensuring the privacy of the data. PPML finds applications in sectors that deal with sensitive/confidential data, e.g. healthcare, finance, and in cases where organisations are prohibited from sharing client information due to privacy laws such as CCPA and GDPR. However, PPML solutions make the already computationally heavy ML algorithms more compute-intensive. An average end-user who lacks the infrastructure required to run these tasks prefers to outsource the computation to a powerful set of specialized cloud servers and leverage their services on a pay-per-use basis. This is addressed by the Secure Outsourced Computation (SOC) paradigm, and thus is an apt fit for the need of the moment. Many recent works exploit Secure Multiparty Computation (MPC) techniques to realize PPML in the SOC setting where the servers enact the role of the parties. Informally, MPC enables nn mutually distrusting parties to compute a function over their private inputs, while ensuring the privacy of the same against an adversary controlling up to tt parties. Both the training and prediction phases of PPML can be realized in the SOC setting. The common approach of outsourcing followed in the PPML literature, as well as by our work, requires the users to secret-shareThe threshold of the secret-sharing is decided based on the number of corrupt servers so that privacy is preserved. their inputs between the set of hired (untrusted) servers, who jointly interact and compute the secret-shared output, and reconstruct it towards the users.

In a bid to improve practical efficiency, many recent works cast their protocols into the preprocessing model wherein the input-independent (yet function-dependent) phase computationally heavy tasks are computed in advance, resulting in a fast online phase. This paradigm suits scenario analogous to PPML setting, where functions (ML algorithms) typically need to be evaluated a large number of times, and the function description is known beforehand. To further enhance practical efficiency by leveraging CPU optimizations, recent works propose MPC protocols that work over 3232 or 6464 bit rings. Lastly, solutions for a small number of parties have received a huge momentum due to the many cost-effective customizations that they permit, for instance, a cheaper realisation of multiplication through custom-made secret sharing schemes .

We now motivate the need for robustness aka guaranteed output delivery (GOD) over fairnessThis ensures either all parties or none learn the output., or even abort securityThis may allow the corrupt parties alone to learn the output., in the domain of PPML. Robustness provides the guarantee of output delivery to all protocol participants, no matter how the adversary misbehaves. Robustness is crucial for real-world deployment and usage of PPML techniques. Consider the following scenario wherein an ML model owner wishes to provide inference service. The model owner shares the model parameters between the servers, while the end-users share their queries. A protocol that provides security with abort or fairness will not suffice as in both the cases a malicious adversary can lead to the protocol aborting, resulting in the user not obtaining the desired output. This leads to denial of service and heavy economic losses for the service provider. For data providers, as more training data leads to more accurate models, collaboratively building a model enables them to provide better ML services, and consequently, attract more clients. A robust framework encourages active involvement from multiple data providers. Hence, for the seamless adoption of PPML solutions in the real world, the robustness of the protocol is of utmost importance. Several works realizing PPML via MPC settle for weaker guarantees such as abort and fairness. Achieving the strongest notion of GOD without degrading performance is an interesting goal which is the focus of this work. The hall-mark result of suggests that an honest-majority amongst the servers is necessary to achieve robustness. Consequent to the discussion above, we focus on the honest-majority setting with a small set of parties, especially 3 and 4 parties, both of which have drawn enormous attention recently .

The 3/43/4-party setting enables simpler, more efficient, and customized secure protocols compared to the nn-party setting. Real-world MPC applications and frameworks such as the Danish sugar beet auction and Sharemind , have demonstrated the practicality of 33-party protocols. Additionally, in an outsourced setting, 3/43/4PC is useful and relevant even when there are more parties. Specifically, here the entire computation is offloaded to 3/43/4 hired servers, after initial sharing of inputs by the parties amongst the servers. This is precisely what we (and some existing papers ) contemplate as the setting for providing ML-as-a-service. Our protocols work over rings, are cast in the preprocessing paradigm, and achieve GOD.

We restrict the relevant work to a small number of parties and honest-majority, focusing first on MPC, followed by PPML. MPC protocols for a small population can be cast into orthogonal domains of low latency protocols , and high throughput protocols . In the 3PC setting, provide efficient semi-honest protocols wherein ASTRA improved upon by casting the protocols in the preprocessing model and provided a fast online phase. ASTRA further provided security with fairness in the malicious setting with an improved online phase compared to . Later, a maliciously-secure 3PC protocol based on distributed zero-knowledge techniques was proposed by Boneh et al. providing abort security. Further, building on and enhancing the security to GOD, Boyle et al. proposed a concretely efficient 3PC protocol with an amortized communication cost of 33 field elements (can be extended to work over rings) per multiplication gate. Concurrently, BLAZE provided a fair protocol in the preprocessing model, which required communicating 33 ring elements in each phase. However, BLAZE eliminated the reliance on the computationally intensive distributed zero-knowledge system (whose efficiency kicks in for large circuit or many multiplication gates) from the online phase and pushed it to the preprocessing phase. This resulted in a faster online phase compared to .

In the regime of 4PC, Gordon et al. presented protocols achieving abort security and GOD. However, relied on expensive public-key primitives and broadcast channels to achieve GOD. Trident improved over the abort protocol of , providing a fast online phase achieving security with fairness, and presented a framework for mixed world computations . A robust 4PC protocol was provided in FLASH , which requires communicating 66 ring elements, each, in the preprocessing and online phases.

In the PPML domain, MPC has been used for various ML algorithms such as Decision Trees , Linear Regression , k-means clustering , SVM Classification , Logistic Regression . In the 3PC SOC setting, the works of ABY3 and SecureNN , provide security with abort. This was followed by ASTRA , which improves upon ABY3 and achieves security with fairness. ASTRA presents primitives to build protocols for Linear Regression and Logistic Regression inference. Recently, BLAZE improves over the efficiency of ASTRA and additionally tackles training for the above ML tasks, which requires building additional PPML building blocks, such as truncation and bit to arithmetic conversions. In the 4PC setting, the first robust framework for PPML was provided by FLASH which proposed efficient building blocks for ML such as dot product, truncation, MSB extraction, and bit conversion. The works of work over rings to garner practical efficiency. In terms of efficiency, BLAZE and respectively FLASH and Trident are the closest competitors of this work in 3PC and 4PC settings.

1 Our Contributions

To the best of our knowledge, SWIFT is the first robust and efficient PPML framework in the 3PC setting and is as fast as (and is strictly better in some cases than) the best known fair 3PC framework BLAZE . We extend our 3PC framework for 4 servers. In this regime, SWIFT is as fast as the best known fair 4PC framework Trident and twice faster than best known robust 4PC framework FLASH . We detail our contributions next.

We demonstrate the practicality of our protocols by benchmarking PPML, particularly, Logistic Regression (training and inference) and popular Neural Networks (inference) such as , LeNet and VGG16 having millions of parameters. The NN training requires mixed-world conversions , which we leave as future work. Our PPML blocks can be used to perform training and inference of Linear Regression, Support Vector Machines, and Binarized Neural Networks (as demonstrated in ).

Second, instead of using the multiplication of (which has the same overall communication cost as that of our online phase), we build a new protocol. This is because the former involves distributed zero-knowledge protocols. The cost of this heavy machinery gets amortized only for large circuits having millions of gates, which is very unlikely for inference and moderately heavy training tasks in PPML. As in BLAZE , we follow a similar structure for our multiplication protocol but differ considerably in techniques as our goal is to obtain GOD. Our approach is to manipulate and transform some of the protocol steps so that two other servers can locally compute the information required by a server in a round. However, this transformation is not straight forward since BLAZE was constructed with a focus towards providing only fairness (details appear in §3). The multiplication protocol forms a technical basis for our dot product protocol and other PPML building blocks. We emphasise again that the (amortized) cost of our dot product protocol is independent of the vector size.

Third, extending to 4PC brings several performance improvements over 3PC. Most prominent of all is a conceptually simple jmp\mathsf{jmp} instantiation, which forgoes the broadcast channel while retaining the same communication cost; and a dot product with cost independent of vector size sans the 3PC amortization technique.

Fourth, we provide robust protocols for input sharing and output reconstruction phase in the SOC setting, wherein a user shares its input with the servers, and the output is reconstructed towards a user. The need for robustness and communication efficiency together makes these tasks slightly non-trivial. As a highlight, we introduce a super-fast online phase for the reconstruction protocol, which gives 4×4\times improvement in terms of rounds (apart from improvement in the communication) compared to BLAZE. Although we aim for GOD, we ensure that an end-user is never part of broadcast which is relatively expensive than atomic point-to-point communication.

As a final remark, we note that the recent work of proposes a variant of GOD in the 4PC setting, which is termed as private robustness. The authors of state that private robustness is a variant of GOD which guarantees that the correct output is produced in the end, but without relying on an honest party learning the user’s private inputs. Thus, departing from the approach of employing a TTP\mathsf{TTP} to complete the computation when malicious behaviour is detected, attains GOD by eliminating a potentially corrupt party, and repeating the secure computation with fewer number of parties which are deemed to be honest. We point out a few concerns on this work. Firstly, as mentioned earlier, the goal of private robustness is to prevent an honest party learning the user’s input, thereby preventing it from misusing this private information (user’s input) in the future if it goes rogue. We note, however, that in the private robustness setting, although an honest party does not learn a user’s input as a part of the protocol, nothing prevents an adversary from revealing its view to an honest party. In such a scenario, if the honest party goes rogue in the future, it can use its view together with the view received from the adversary to obtain a user’s input. Hence, we believe that the attacks that can be launched in our variant for achieving GOD, can also be launched in the private robustness variant, making the two equivalent. Secondly and importantly, a formal treatment of private robustness is missing in which makes it unclear what additional security is achieved on top of traditional GOD security. Here, we additionally note that the notion of private robustness does not comply with the recently introduced notion of FaF security Althought states that the issue of private robustness was identified and treated formally in , it is not clear whether achieves the FaF security of . For a corruption threshold tt and an honest threshold h∗h^{*}, FaF security demands that the view of any tt corrupt parties and separately the view of any h∗h^{*} honest parties must be simulatable. The latter part which is a new addition compared to traditional security definition requires the presence of a (semi-honest) simulator that can simulate the view of any subset of h∗h^{*} honest parties, given the input and output of those honest parties. This notion is shown to be achievable if and only if 2t+h∗<n2t+h^{*}<n, where nn is the total number of parties. With n=4n=4, t=1t=1 and h∗=1h^{*}=1, the results of does not satisfy FaF security since an honest party’s view may include the inputs of the other honest parties when a corrupt party, deviating from the protocol steps, sends its view to it. A formal analysis of protocols in satisfying the FaF security notion of is missing.. Lastly, we emphasize that the approach of eliminating a potentially corrupt party, and re-running the computation results in doubling or tripling the communication cost, thereby undermining the efficiency gains.

2 Organisation of the paper

The rest of the paper is organized as follows. In §2 we describe the system model, preliminaries and notations used. §3 and §4 detail our constructs in the 3PC and 4PC setting respectively. These are followed by the applications and benchmarking in §5. §A elaborates on additional preliminaries while the security proofs for our constructions are provided in §C.

Preliminaries

We consider a set of three servers P={P0,P1,P2}\mathcal{P}=\{P_{0},P_{1},P_{2}\} that are connected by pair-wise private and authentic channels in a synchronous network, and a static, malicious adversary that can corrupt at most one server. We use a broadcast channel for 3PC alone, which is inevitable . For ML training, several data-owners who wish to jointly train a model, secret share (using the sharing semantics that will appear later) their data among the servers. For ML inference, a model-owner and client secret share the model and the query, respectively, among the servers. Once the inputs are available in the shared format, the servers perform computations and obtain the output in the shared form. In the case of training, the output model is reconstructed towards the data-owners, whereas for inference, the prediction result is reconstructed towards the client. We assume that an arbitrary number of data-owners may collude with a corrupt server for training, whereas for the case of prediction, we assume that either the model-owner or the client can collude with a corrupt server. We prove the security of our protocols using a standard real-world / ideal-world paradigm. We also explore the above model for the four server setting with P={P0,P1,P2,P3}\mathcal{P}=\{P_{0},P_{1},P_{2},P_{3}\}. The aforementioned setting has been explored extensively .

Our constructions achieve the strongest security guarantee of GOD. A protocol is said to be robust or achieve GOD if all parties obtain the output of the protocol regardless of how the adversary behaves. In our model, this translates to all the data owners obtaining the trained model for the case of ML training, while the client obtaining the query output for ML inference. All our protocols are cast into: input-independent preprocessing phase and input-dependent online phase.

The servers use a one-time key setup, modelled as a functionality Fsetup\mathcal{F}_{\mathsf{setup}} (Fig. 27), to establish pre-shared random keys for pseudo-random functions (PRF) between them. A similar setup is used in for three server case and in for four server setting. The key-setup can be instantiated using any standard MPC protocol in the respective setting. Further, our protocols make use of a collision-resistant hash function, denoted by H()\mathsf{H}(), and a commitment scheme, denoted by Com()\mathsf{Com}(). The formal details of key setup, hash function, and commitment scheme are deferred to §A.

Robust 3PC and PPML

In this section, we first introduce the sharing semantics for three servers. Then, we introduce our new Joint Message Passing (jmp\mathsf{jmp}) primitive, which plays a crucial role in obtaining the strongest security guarantee of GOD, followed by our protocols in the three server setting.

We use the following secret-sharing semantics.

PsP_{s} holds (vs,v(s+1)%3)(\mathsf{v}_{s},\mathsf{v}_{(s+1)\%3}) for s∈{0,1,2}s\in\{0,1,2\}.

Given [⋅]\left[\cdot\right]-shares of v1,v2\mathsf{v}_{1},\mathsf{v}_{2}, and public constants c1,c2c_{1},c_{2}, servers can locally compute [⋅]\left[\cdot\right]-share of c1v1+c2v2c_{1}\mathsf{v}_{1}+c_{2}\mathsf{v}_{2} as c1[v1]+c2[v2]c_{1}\left[\mathsf{v}_{1}\right]+c_{2}\left[\mathsf{v}_{2}\right]. It is trivial to see that linearity property is satisfied by ⟨⋅⟩\langle\cdot\rangle and ⟦⋅⟧\llbracket\cdot\rrbracket sharings.

1 Joint Message Passing primitive

Each PsP_{s} for s∈{i,j,k}s\in\{i,j,k\} maintains a bit bs\mathsf{b}_{s} initialized to , as an indicator for inconsistency. When PkP_{k} receives an inconsistent (value, hash) pair, it sets bk=1\mathsf{b}_{k}=1 and sends the bit to both Pi,PjP_{i},P_{j}, who cross-check with each other by exchanging the bit and turn on their inconsistency bit if the bit received from either PkP_{k} or its fellow sender is turned on. A server broadcasts a hash of its value when its inconsistency bit is on;hash can be computed on a combined message across many calls of jmp\mathsf{jmp}. PkP_{k}’s value is the one it receives from PiP_{i}. At this stage, there are a bunch of possible cases and a detailed analysis determines an eligible TTP\mathsf{TTP} in each case.

When PkP_{k} is silent, the protocol is understood to be complete. This is fine irrespective of the status of PkP_{k}– an honest PkP_{k} never skips this broadcast with inconsistency bit on, and a corrupt PkP_{k} implies honest senders. If either PiP_{i} or PjP_{j} is silent, then PkP_{k} is picked as TTP\mathsf{TTP} which is surely honest. A corrupt PkP_{k} could not make one of {Pi,Pj}\{P_{i},P_{j}\} speak, as the senders (honest in this case) are in agreement on their inconsistency bit (due to their mutual exchange of inconsistency bit). When all of them speak and (i) the senders’ hashes do not match, PkP_{k} is picked as TTP\mathsf{TTP}; (ii) one of the senders conflicts with PkP_{k}, the other sender is picked as TTP\mathsf{TTP}; and lastly (iii) if there is no conflict, PiP_{i} is picked as TTP\mathsf{TTP}. The first two cases are self-explanatory. In the last case, either PjP_{j} or PkP_{k} is corrupt. If not, a corrupt PiP_{i} can have honest PkP_{k} speak (and hence turn on its inconsistency bit), by sending a v′\mathsf{v}^{\prime} whose hash is not same as that of v\mathsf{v} and so inevitably, the hashes of honest PjP_{j} and PkP_{k} will conflict, contradicting (iii). As a final touch, we ensure that, in each step, a server raises a public alarm (via broadcast) accusing a server which is silent when it is not supposed to be, and the protocol terminates immediately by labelling the server as TTP\mathsf{TTP} who is neither the complainer nor the accused.

We say that Pi,PjP_{i},P_{j} jmp\mbox−send\mathsf{jmp\mbox{-}send} v\mathsf{v} to PkP_{k} when they invoke Πjmp(Pi,Pj,Pk,v)\Pi_{\mathsf{jmp}}(P_{i},P_{j},P_{k},\mathsf{v}).

Using jmp\mathsf{jmp} in protocols. As mentioned in the introduction, the jmp\mathsf{jmp} protocol needs to be viewed as consisting of two phases (send, verify), where send phase consists of PiP_{i} sending v\mathsf{v} to PkP_{k} and the rest goes to verify phase. Looking ahead, most of our protocols use jmp\mathsf{jmp}, and consequently, our final construction, either of general MPC or any PPML task, will have several calls to jmp\mathsf{jmp}. To leverage amortization, the send phase will be executed in all protocols invoking jmp\mathsf{jmp} on the flow, while the verify for a fixed ordered pair of senders will be executed once and for all in the end. The verify phase will determine if all the sends were correct. If not, a TTP\mathsf{TTP} is identified, as explained, and the computation completes with the help of TTP\mathsf{TTP}, just as in the ideal-world.

2 3PC Protocols

We now describe the protocols for 3 parties/servers and defer the security proofs to §C.1.

In this protocol, servers execute Πjmp\Pi_{\mathsf{jmp}} protocol once. Hence the overall cost follows from that of an instance of the Πjmp\Pi_{\mathsf{jmp}} protocol (Lemma 3.2). ∎

Given ⟦⋅⟧\llbracket\cdot\rrbracket-shares on input wires x,y\mathsf{x},\mathsf{y}, servers can use linearity property of the sharing scheme to locally compute ⟦⋅⟧\llbracket\cdot\rrbracket-shares of the output of addition gate, z=x+y\mathsf{z}=\mathsf{x}+\mathsf{y} as ⟦z⟧=⟦x⟧+⟦y⟧\llbracket\mathsf{z}\rrbracket=\llbracket\mathsf{x}\rrbracket+\llbracket\mathsf{y}\rrbracket.

servers P1,P2P_{1},P_{2} locally compute [βz]j=(j−1)βxβy−βx[αy]j−βy[αx]j+[Γxy]j+[αz]j\left[\beta_{\mathsf{z}}\right]_{j}=(j-1)\beta_{\mathsf{x}}\beta_{\mathsf{y}}-\beta_{x}\left[\alpha_{\mathsf{y}}\right]_{j}-\beta_{y}\left[\alpha_{\mathsf{x}}\right]_{j}+\left[\Gamma_{\mathsf{x}\mathsf{y}}\right]_{j}+\left[\alpha_{\mathsf{z}}\right]_{j} during the online phase and mutually exchange their shares to reconstruct βz\beta_{\mathsf{z}}. P1P_{1} then sends βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}} to P0P_{0}, completing the semi-honest protocol. The correctness that asserts z=xy\mathsf{z}=\mathsf{x}\mathsf{y} or in other words βz−αz=xy\beta_{\mathsf{z}}-\alpha_{\mathsf{z}}=\mathsf{x}\mathsf{y} holds due to Eq. 1.

The following issues arise in the above protocol when a malicious adversary is considered:

When P0P_{0} is corrupt, the [⋅]\left[\cdot\right]-sharing of Γxy\Gamma_{\mathsf{x}\mathsf{y}} performed by P0P_{0} might not be correct, i.e. Γxy≠αxαy\Gamma_{\mathsf{x}\mathsf{y}}\neq\alpha_{\mathsf{x}}\alpha_{\mathsf{y}}.

When P1P_{1} (or P2P_{2}) is corrupt, [⋅]\left[\cdot\right]-share of βz\beta_{\mathsf{z}} handed over to the fellow honest evaluator during the online phase might not be correct, causing reconstruction of an incorrect βz\beta_{\mathsf{z}}.

When P1P_{1} is corrupt, the value βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}} that is sent to P0P_{0} during the online phase may not be correct.

All the three issues are common with BLAZE (copied verbatim), but we differ from BLAZE in handling them. We begin with solving the last issue first. We simply make P1,P2P_{1},P_{2} jmp\mbox−send\mathsf{jmp\mbox{-}send} βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}} to P0P_{0} (after βz\beta_{\mathsf{z}} is computed). This either leads to success or a TTP\mathsf{TTP} selection. Due to jmp\mathsf{jmp}’s rate-1 communication, P1P_{1} alone sending the value to P0P_{0} remains as costly as using jmp\mathsf{jmp} in amortized sense. Whereas in BLAZE, the malicious version simply makes P2P_{2} to send a hash of βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}} to P0P_{0} (in addition to P1P_{1}’s communication of βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}} to P0P_{0}), who abort\mathtt{abort}s if the received values are inconsistent.

For the remaining two issues, similar to BLAZE, we reduce both to a multiplication (on values unrelated to inputs) in the preprocessing phase. However, our method leads to either success or TTP\mathsf{TTP} selection, with no additional cost.

We start with the second issue. To solve it, where a corrupt P1P_{1} (or P2P_{2}) sends an incorrect [⋅]\left[\cdot\right]-share of βz\beta_{\mathsf{z}}, BLAZE makes use of server P0P_{0} to compute a version of βz\beta_{\mathsf{z}} for verification, based on βx\beta_{\mathsf{x}} and βy\beta_{\mathsf{y}}, as follows. Using βx+γx\beta_{\mathsf{x}}+\gamma_{\mathsf{x}}, βy+γy\beta_{\mathsf{y}}+\gamma_{\mathsf{y}}, αx\alpha_{\mathsf{x}}, αy\alpha_{\mathsf{y}}, αz\alpha_{\mathsf{z}} and Γxy\Gamma_{\mathsf{x}\mathsf{y}}, P0P_{0} computes:

Clearly, both P0P_{0} and PiP_{i} can compute [βz⋆]i=−(βx+γx)[αy]i−(βy+γy)[αx]i+[αz]i+[χ]i\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{i}=-(\beta_{\mathsf{x}}+\gamma_{\mathsf{x}})\left[\alpha_{\mathsf{y}}\right]_{i}-(\beta_{\mathsf{y}}+\gamma_{\mathsf{y}})\left[\alpha_{\mathsf{x}}\right]_{i}+\left[\alpha_{\mathsf{z}}\right]_{i}+\left[\chi\right]_{i} given [χ]i\left[\chi\right]_{i}. The rest of our discussion explains how (a) iith share of [χ]\left[\chi\right] can be made available to {P0,Pi}\{P_{0},P_{i}\} and (b) ψ\psi can be derived by P1,P2P_{1},P_{2}, from a multiplication triple. Similar to BLAZE, yet for a different triple, we observe that (d,e,f)(\mathsf{d},\mathsf{e},\mathsf{f}) is a multiplication triple, where d=(γx+αx),e=(γy+αy),f=(γxγy+ψ)+χ\mathsf{d}=(\gamma_{\mathsf{x}}+\alpha_{\mathsf{x}}),\mathsf{e}=(\gamma_{\mathsf{y}}+\alpha_{\mathsf{y}}),\mathsf{f}=(\gamma_{\mathsf{x}}\gamma_{\mathsf{y}}+\psi)+\chi if and only if χ\chi and Γxy\Gamma_{\mathsf{x}\mathsf{y}} are correct. Indeed,

Based on this observation, we compute the above multiplication triple using a multiplication protocol and extract out the values for ψ\psi and χ\chi from the shares of f\mathsf{f} which are bound to be correct. This can be executed entirely in the preprocessing phase. Specifically, the servers (a) locally obtain ⟨⋅⟩\langle\cdot\rangle-shares of d,e\mathsf{d},\mathsf{e} as in Table 3, (b) compute ⟨⋅⟩\langle\cdot\rangle-shares of f(=de)\mathsf{f}(=\mathsf{d}\mathsf{e}), say denoted by f0,f1,f2\mathsf{f}_{0},\mathsf{f}_{1},\mathsf{f}_{2}, using an efficient, robust 3-party multiplication protocol, say ΠmulPre\Pi_{\mathsf{mulPre}} (abstracted in a functionality Fig. 6) and finally (c) extract out the required preprocessing data locally as in Eq. 2. We switch to ⟨⋅⟩\langle\cdot\rangle-sharing in this part to be able to use the best robust multiplication protocol of that supports this form of secret sharing and requires communication of just 33 elements. Fortunately, the switch does not cost anything, as both the step (a) and (c) (as above) involve local computation and the cost simply reduces to a single run of a multiplication protocol.

According to ⟨⋅⟩\langle\cdot\rangle-sharing, both P0P_{0} and P1P_{1} obtain f1\mathsf{f}_{1} and hence obtain [χ]1\left[\chi\right]_{1}. Similarly, P0,P2P_{0},P_{2} obtain f0\mathsf{f}_{0} and hence [χ]2\left[\chi\right]_{2}. Finally, P1,P2P_{1},P_{2} obtain f2\mathsf{f}_{2} from which they compute ψ=f2−γxγy\psi=\mathsf{f}_{2}-\gamma_{\mathsf{x}}\gamma_{\mathsf{y}}. This completes the informal discussion.

To leverage amortization, the send phase of jmp\mbox−send\mathsf{jmp\mbox{-}send} alone is executed on the fly and verify is performed once for multiple instances of jmp\mbox−send\mathsf{jmp\mbox{-}send}. Further, observe that P1,P2P_{1},P_{2} possess the required shares in the online phase to compute the entire circuit. Hence, P0P_{0} can come in only during verify of jmp\mbox−send\mathsf{jmp\mbox{-}send} towards P1,P2P_{1},P_{2}, which can be deferred towards the end. Hence, the jmp\mbox−send\mathsf{jmp\mbox{-}send} of βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}} to P0P_{0} (enabling computation of the verification information) can be performed once, towards the end, thereby requiring a single round for sending βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}} to P0P_{0} for multiple instances. Following this, the verify of jmp\mbox−send\mathsf{jmp\mbox{-}send} towards P0P_{0} is performed first, followed by performing the verify of jmp\mbox−send\mathsf{jmp\mbox{-}send} towards P1,P2P_{1},P_{2} in parallel.

We note that to facilitate a fast online phase for multiplication, our preprocessing phase leverages a robust multiplication protocol in a black-box manner to derive the necessary preprocessing information. A similar black-box approach is also taken for the dot product protocol in the preprocessing phase. This leaves room for further improvements in the communication cost, which can be obtained by instantiating the black-box with an efficient, robust protocol coupled with the fast online phase.

On the security of our framework: We emphasize that we follow the standard traditional (real-world / ideal-world based) security definition of MPC, according to which, in the 4-party setting with 1 corruption, exactly 1 party is assumed to be corrupt, and rest are honest. As per this definition, disclosing the honest parties’s inputs to a selected honest party is not a breach of security. Indeed, in our framework, the data sharing and the computation on the shared data is done in a way that any malicious behaviour leads to establishment of a TTP\mathsf{TTP} who is enabled to receive all the inputs and compute the output on the clear. There has been a recent study on the additional requirement of hiding the inputs from a quorum of honest parties (treating them as semi-honest), termed as Friends-and-Foes (FaF) security notion . This is a stronger security goal than the standard one and it has been shown that one cannot obtain FaF-secure robust 3PC. We leave FaF-secure 4PC for future exploration.

3 Building Blocks for PPML using 3PC

This section provides details on robust realizations of the following building blocks for PPML in 3-server setting– i) Dot Product, ii) Truncation, iii) Dot Product with Truncation, iv) Secure Comparison, and v) Non-linear Activation functions– Sigmoid and ReLU. We provide the security proofs in §C.1. We begin by providing details of input sharing and reconstruction in the SOC setting.

Protocol ΠBitInj\Pi_{\mathsf{BitInj}} is essentially an execution of Πbit2A\Pi_{\mathsf{bit2A}} (Lemma 3.8) followed by one invocation of Πmult\Pi_{\mathsf{mult}} (Lemma 3.5) and the costs follow. ∎

To begin with, z=x⃗⊙y⃗\mathsf{z}=\vec{\mathbf{x}}\odot\vec{\mathbf{y}} can be viewed as n\mathsf{n} parallel multiplication instances of the form zi=xiyi\mathsf{z}_{i}=\mathsf{x}_{i}\mathsf{y}_{i} for i∈[n]i\in[n], followed by adding up the results. Let βz⋆=∑i=1nβzi⋆\mathsf{\beta}_{\mathsf{z}}^{\star}=\sum_{i=1}^{\mathsf{n}}\mathsf{\beta}_{\mathsf{z}_{i}}^{\star}. Then,

where χ=∑i=1n(γxiαyi+γyiαxi+Γxiyi−ψi)\chi=\sum_{i=1}^{\mathsf{n}}(\gamma_{\mathsf{x}_{i}}\alpha_{\mathsf{y}_{i}}+\gamma_{\mathsf{y}_{i}}\alpha_{\mathsf{x}_{i}}+\Gamma_{\mathsf{x}_{i}\mathsf{y}_{i}}-\psi_{i}).

Apart from the aforementioned modification, the online phase for dot product proceeds similar to that of multiplication protocol. P0,P1P_{0},P_{1} locally compute [βz⋆]1\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1} as per Eq. 3 and jmp\mbox−send\mathsf{jmp\mbox{-}send} [βz⋆]1\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1} to P2P_{2}. P1P_{1} obtains [βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2} in a similar fashion. P1,P2P_{1},P_{2} reconstruct βz⋆=[βz⋆]1+[βz⋆]2\mathsf{\beta}_{\mathsf{z}}^{\star}=\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1}+\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2} and compute βz=βz⋆+∑i=1nβxiβyi+ψ\beta_{\mathsf{z}}=\mathsf{\beta}_{\mathsf{z}}^{\star}+\sum_{i=1}^{\mathsf{n}}\beta_{\mathsf{x}_{i}}\beta_{\mathsf{y}_{i}}+\psi. Here, the value ψ\psi has to be correctly generated in the preprocessing phase satisfying Eq. 3. Finally, P1,P2P_{1},P_{2} jmp\mbox−send\mathsf{jmp\mbox{-}send} βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}} to P0P_{0}.

We now provide the details for preprocessing phase that enable servers to obtain the required values (χ,ψ\chi,\psi) with the invocation of a dot product protocol in a black-box way. Towards this, let d⃗=[d1,…,dn]\vec{\mathbf{d}}=[\mathsf{d}_{1},\ldots,\mathsf{d}_{\mathsf{n}}] and e⃗=[e1,…,en]\vec{\mathbf{e}}=[\mathsf{e}_{1},\ldots,\mathsf{e}_{\mathsf{n}}], where di=γxi+αxi\mathsf{d}_{i}=\gamma_{\mathsf{x}_{i}}+\alpha_{\mathsf{x}_{i}} and ei=γyi+αyi\mathsf{e}_{i}=\gamma_{\mathsf{y}_{i}}+\alpha_{\mathsf{y}_{i}} for i∈[n]i\in[\mathsf{n}], as in the case of multiplication. Then for f=d⃗⊙e⃗\mathsf{f}=\vec{\mathbf{d}}\odot\vec{\mathbf{e}},

where f2=∑i=1n(γxiγyi+ψi),f1=[χ]1\mathsf{f}_{2}=\sum_{i=1}^{\mathsf{n}}(\gamma_{\mathsf{x}_{i}}\gamma_{\mathsf{y}_{i}}+\psi_{i}),\mathsf{f}_{1}=\left[\chi\right]_{1} and f0=[χ]2\mathsf{f}_{0}=\left[\chi\right]_{2}.

It is easy to see from the semantics of ⟨⋅⟩\langle\cdot\rangle-sharing that both P1,P2P_{1},P_{2} obtain f2\mathsf{f}_{2} and hence ψ\psi. Similarly, both P0,P1P_{0},P_{1} obtain f1\mathsf{f}_{1} and hence [χ]1\left[\chi\right]_{1}, while P0,P2P_{0},P_{2} obtain [χ]2\left[\chi\right]_{2}.

Working over fixed-point values, repeated multiplications using FPA arithmetic can lead to an overflow resulting in loss of significant bits of information. This put forth the need for truncation that re-adjusts the shares after multiplication so that FPA semantics are maintained. As shown in SecureML , the method of truncation would result in loss of information on the least significant bits and affect the accuracy by a very minimal amount.

For truncation, servers execute Πtrgen\Pi_{\mathsf{trgen}} (Fig. 13) to generate ([r],⟦rd⟧)(\left[\mathsf{r}\right],\llbracket\mathsf{r}^{d}\rrbracket)-pair, where r\mathsf{r} is a random ring element, and rd\mathsf{r}^{d} is the truncated value of r\mathsf{r}, i.e the value r\mathsf{r} right-shifted by dd bit positions. Recall that dd denotes the number of bits allocated for the fractional part in the FPA representation. Given (r,rd)(\mathsf{r},\mathsf{r}^{d}), the truncated value of v\mathsf{v}, denoted as vd{\mathsf{v}}^{d}, is computed as vd=(v−r)d+rd{\mathsf{v}}^{d}={(\mathsf{v}-\mathsf{r})}^{d}+\mathsf{r}^{d}. The correctness and accuracy of this method was shown in ABY3 .

Similarly, for rd\mathsf{r}^{d} we have the following,

All the operations in Πtrgen\Pi_{\mathsf{trgen}} are non-interactive except for the two dot product calls required to compute A,B\mathsf{A},\mathsf{B}. The cost thus follows from Lemma 3.10. ∎

Given the ⟦⋅⟧\llbracket\cdot\rrbracket-sharing of vectors x⃗\vec{\mathbf{x}} and y⃗\vec{\mathbf{y}}, protocol Πdotpt\Pi_{\mathsf{dotpt}} (Fig. 14) allows servers to generate ⟦zd⟧\llbracket{\mathsf{z}}^{d}\rrbracket, where zd{\mathsf{z}}^{d} denotes the truncated value of z=x⃗⊙y⃗\mathsf{z}=\vec{\mathbf{x}}\odot\vec{\mathbf{y}}. A naive way is to compute the dot product using Πdotp\Pi_{\mathsf{dotp}}, followed by performing truncation using the (r,rd\mathsf{r},\mathsf{r}^{d}) pair. Instead, we follow the optimization of BLAZE where the online phase of Πdotp\Pi_{\mathsf{dotp}} is modified to integrate the truncation using (r,rd)(\mathsf{r},\mathsf{r}^{d}) at no additional cost.

The preprocessing phase now consists of the execution of one instance of Πtrgen\Pi_{\mathsf{trgen}} (Fig. 13) and the preprocessing corresponding to Πdotp\Pi_{\mathsf{dotp}} (Fig. 11). In the online phase, servers enable P1,P2P_{1},P_{2} to obtain z⋆−r\mathsf{z}^{\star}-\mathsf{r} instead of βz⋆\mathsf{\beta}_{\mathsf{z}}^{\star}, where z⋆=βz⋆−αz\mathsf{z}^{\star}=\mathsf{\beta}_{\mathsf{z}}^{\star}-\alpha_{\mathsf{z}}. Using z⋆−r\mathsf{z}^{\star}-\mathsf{r}, both P1,P2P_{1},P_{2} then compute (z−r)(\mathsf{z}-\mathsf{r}) locally, truncate it to obtain (z−r)d{(\mathsf{z}-\mathsf{r})}^{d} and execute Πjsh\Pi_{\mathsf{jsh}} to generate ⟦(z−r)d⟧\llbracket{(\mathsf{z}-\mathsf{r})}^{d}\rrbracket. Finally, servers locally compute the result as ⟦zd⟧=⟦(z−r)d⟧+⟦rd⟧\llbracket{\mathsf{z}}^{d}\rrbracket=\llbracket{(\mathsf{z}-\mathsf{r})}^{d}\rrbracket+\llbracket\mathsf{r}^{d}\rrbracket. The formal details for Πdotpt\Pi_{\mathsf{dotpt}} protocol appear in Fig. 14.

Secure comparison allows servers to check whether x<y\mathsf{x}<\mathsf{y}, given their ⟦⋅⟧\llbracket\cdot\rrbracket-shares. In FPA representation, checking x<y\mathsf{x}<\mathsf{y} is equivalent to checking the msb\mathsf{msb} of v=x−y\mathsf{v}=\mathsf{x}-\mathsf{y}. Towards this, servers locally compute ⟦v⟧=⟦x⟧−⟦y⟧\llbracket\mathsf{v}\rrbracket=\llbracket\mathsf{x}\rrbracket-\llbracket\mathsf{y}\rrbracket and extract the msb\mathsf{msb} of v\mathsf{v} using Πbitext\Pi_{\mathsf{bitext}}. In case an arithmetic sharing is desired, servers can apply Πbit2A\Pi_{\mathsf{bit2A}} (Fig. 10) protocol on the outcome of Πbitext\Pi_{\mathsf{bitext}} protocol.

We now elaborate on two of the most prominently used activation functions: i) Rectified Linear Unit (ReLU) and (ii) Sigmoid (Sig).

(i) ReLU: The ReLU function, relu(v)=max(0,v)\mathsf{relu}(\mathsf{v})=\mathsf{max}(0,\mathsf{v}), can be viewed as relu(v)=b‾⋅v\mathsf{relu}(\mathsf{v})=\overline{\mathsf{b}}\cdot\mathsf{v}, where bit b=1\mathsf{b}=1 if v<0\mathsf{v}<0 and otherwise. Here b‾\overline{\mathsf{b}} denotes the complement of b\mathsf{b}. Given ⟦v⟧\llbracket\mathsf{v}\rrbracket, servers execute Πbitext\Pi_{\mathsf{bitext}} on ⟦v⟧\llbracket\mathsf{v}\rrbracket to generate ⟦b⟧B\llbracket\mathsf{b}\rrbracket^{\bf B}. ⟦⋅⟧B\llbracket\cdot\rrbracket^{\bf B}-sharing of b‾\overline{\mathsf{b}} is locally computed by setting βb‾=1⊕βb\beta_{\overline{\mathsf{b}}}=1\oplus\beta_{\mathsf{b}}. Servers execute ΠBitInj\Pi_{\mathsf{BitInj}} protocol on ⟦b‾⟧B\llbracket\overline{\mathsf{b}}\rrbracket^{\bf B} and ⟦v⟧\llbracket\mathsf{v}\rrbracket to obtain the desired result.

One instance of relu\mathsf{relu} protocol comprises of execution of one instance of Πbitext\Pi_{\mathsf{bitext}}, followed by ΠBitInj\Pi_{\mathsf{BitInj}}. The cost, therefore, follows from Lemma 3.7, and Lemma 3.9. ∎

(ii) Sig: In this work, we use the MPC-friendly variant of the Sigmoid function . Note that sig(v)=b1‾b2(v+1/2)+b2‾\mathsf{sig}(\mathsf{v})=\overline{\mathsf{b}_{1}}\mathsf{b}_{2}(\mathsf{v}+1/2)+\overline{\mathsf{b}_{2}}, where b1=1\mathsf{b}_{1}=1 if v+1/2<0\mathsf{v}+1/2<0 and b2=1\mathsf{b}_{2}=1 if v−1/2<0\mathsf{v}-1/2<0. To compute ⟦sig(v)⟧\llbracket\mathsf{sig}(\mathsf{v})\rrbracket, servers proceed in a similar fashion as in ReLU, and hence, we skip the details.

The formal details of the MPC-friendly variant of the Sigmoid function is given below:

An instance of sig\mathsf{sig} protocol involves the execution of the following protocols in order– i) two parallel instances of Πbitext\Pi_{\mathsf{bitext}} protocol, ii) once instance of Πmult\Pi_{\mathsf{mult}} protocol over boolean value, and iii) one instance of ΠBitInj\Pi_{\mathsf{BitInj}} and Πbit2A\Pi_{\mathsf{bit2A}} in parallel. The cost follows from Lemma 3.7, Lemma 3.8 and Lemma 3.9. ∎

The goal of maxpool is to find the maximum value in a vector x⃗\vec{\mathbf{x}} of mm values. Maximum between two elements xi\mathsf{x}_{i}, xj\mathsf{x}_{j} can be computed by applying secure comparison, which returns a binary sharing of a bit b\mathsf{b} such that b=0\mathsf{b}=0 if xi>xj\mathsf{x}_{i}>\mathsf{x}_{j}, or 11, otherwise, followed by computing (b)B(xj−xi)+xi(\mathsf{b})^{\bf B}(\mathsf{x}_{j}-\mathsf{x}_{i})+\mathsf{x}_{i}, which can be performed using bit injection (3.3). To find the maximum value in vector x⃗\vec{\mathbf{x}}, the servers first group the values in x⃗\vec{\mathbf{x}} into pairs and securely compare each pair to obtain the maximum of the two. This results in a vector of size m/2m/2. This process is repeated for O⁡(log⁡m)\operatorname{O}\left(\log m\right) rounds to obtain the maximum value in the entire vector.

Linear matrix operations, such as addition of two matrices A,B\mathbf{A},\mathbf{B} to generate matrix C=A+B\mathbf{C}=\mathbf{A}+\mathbf{B}, can be computed by extending the scalar operations (addition, in this case) with respect to each element of the matrix. Matrix multiplication, on the other hand, can be expressed as a collection of dot products, where the element in the ithi^{\text{th}} row and jthj^{\text{th}} column of C=A×B\mathbf{C}=\mathbf{A}\times\mathbf{B}, where A,B\mathbf{A},\mathbf{B} are matrices of dimension p×q\mathsf{p}\times\mathsf{q}, q×r\mathsf{q}\times\mathsf{r}, respectively, can be computed as a dot product of the ithi^{\text{th}} row of A\mathbf{A} and the jthj^{\text{th}} column of B\mathbf{B}. Thus, computing C\mathbf{C} of dimension p×r\mathsf{p}\times\mathsf{r} requires pr\mathsf{p}\mathsf{r} dot products whose communication cost (amortized) is equal to that of computing pr\mathsf{p}\mathsf{r} multiplications in our case. This improves the cost of matrix multiplication over the naive approach which requires pqr\mathsf{p}\mathsf{q}\mathsf{r} multiplications.

Convolutions form an important building block in several neural network architectures and can be represented as matrix multiplications, as explained in the example below. Consider a 2-dimensional convolution (CV\mathsf{CV}) of a 3×33\times 3 input matrix X\mathbf{X} with a kernel K\mathbf{K} of size 2×22\times 2. This can be represented as a matrix multiplication as follows.

Generally, convolving a f×ff\times f kernel over a w×hw\times h input with p×pp\times p padding using s×ss\times s stride having ii input channels and oo output channels, is equivalent to performing a matrix multiplication on matrices of dimension (w′⋅h′)×(i⋅f⋅f)(w^{\prime}\cdot h^{\prime})\times(i\cdot f\cdot f) and (i⋅f⋅f)×(o)(i\cdot f\cdot f)\times(o) where w′=w−f+2ps+1w^{\prime}=\dfrac{w-f+2p}{s}+1 and h′=h−f+2ps+1h^{\prime}=\dfrac{h-f+2p}{s}+1. We refer readers to (cf. “Linear and Convolutional Layer”) and for more details.

Robust 4PC and PPML

In this section, we extend our 3PC results to the 4-party case and observe substantial efficiency gain. First, the use of broadcast is eliminated. Second, the preprocessing of multiplication becomes substantially computationally light, eliminating the multiplication protocol (used in the preprocessing) altogether. Third, we achieve a dot product protocol with communication cost independent of the size of the vector, completely eliminating the complex machinery required as in the 3PC case. At the heart of our 4PC constructions lies an efficient 4-party jmp\mathsf{jmp} primitive, denoted as jmp4\mathsf{jmp4}, that allows two servers to send a common value to a third server robustly.

This section is organized as follows. We begin with the secret-sharing semantics for 44 servers, for which we only use an extended version of ⟦⋅⟧\llbracket\cdot\rrbracket-sharing. We then explain the joint message passing primitive for four servers, followed by our 4PC protocols. We conclude this section with a detailed analysis about achieving private robustness.

For a value v\mathsf{v}, the shares for P0,P1P_{0},P_{1} and P2P_{2} remain the same as that for 3PC case. That is, P0P_{0} holds ([αv]1,[αv]2,βv+γv)(\left[\alpha_{\mathsf{v}}\right]_{1},\left[\alpha_{\mathsf{v}}\right]_{2},\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}) while PiP_{i} for i∈{1,2}i\in\{1,2\} holds ([αv]i,βv,γv)(\left[\alpha_{\mathsf{v}}\right]_{i},\beta_{\mathsf{v}},\gamma_{\mathsf{v}}). The shares for the fourth server P3P_{3} is defined as ([αv]1,[αv]2,γv)(\left[\alpha_{\mathsf{v}}\right]_{1},\left[\alpha_{\mathsf{v}}\right]_{2},\gamma_{\mathsf{v}}). Clearly, the secret is defined as v=βv−[αv]1−[αv]2\mathsf{v}=\beta_{\mathsf{v}}-\left[\alpha_{\mathsf{v}}\right]_{1}-\left[\alpha_{\mathsf{v}}\right]_{2}.

1 4PC Joint Message Passing Primitive

We say that Pi,PjP_{i},P_{j} jmp4\mbox−send\mathsf{jmp4\mbox{-}send} v\mathsf{v} to PkP_{k} when they invoke Πjmp4(Pi,Pj,Pk,v,Pl)\Pi_{\mathsf{jmp4}}(P_{i},P_{j},P_{k},\mathsf{v},P_{l}).

We note that the end goal of jmp4\mathsf{jmp4} primitive relates closely to the bi-convey primitive of FLASH . Bi-convey allows two servers S1,S2S_{1},S_{2} to convey a value to a server RR, and in case of an inconsistency, a pair of honest servers mutually identify each other, followed by exchanging their internal randomness to recover the clear inputs, computing the circuit, and sending the output to all. Note, however, that jmp4\mathsf{jmp4} primitive is more efficient and differs significantly in techniques from the bi-convey primitive. Unlike in bi-convey, in case of an inconsistency, jmp4\mathsf{jmp4} enables servers to learn the TTP\mathsf{TTP}’s identity unanimously. Moreover, bi-convey demands that honest servers, identified during an inconsistency, exchange their internal randomness (which comprises of the shared keys established during the key-setup phase) to proceed with the computation. This enforces the need for a fresh key-setup every time inconsistency is detected. On the efficiency front, jmp4\mathsf{jmp4} simply halves the communication cost of bi-convey, giving a 2×2\times improvement.

2 4PC Protocols

In this section, we revisit the protocols from 3PC (§3) and suggest optimizations leveraging the presence of an additional honest party in the system. We provide security proofs in §C.2.

To enable PiP_{i} to share a value v\mathsf{v}, protocol Πsh4\Pi_{\mathsf{sh4}} (Fig. 17) proceeds similar to that of 3PC case with the addition that P3P_{3} also samples the values [αv]1,[αv]2,γv\left[\alpha_{\mathsf{v}}\right]_{1},\left[\alpha_{\mathsf{v}}\right]_{2},\gamma_{\mathsf{v}} using the shared randomness with the respective servers. On a high level, PiP_{i} computes βv=v+[αv]1+[αv]2\beta_{\mathsf{v}}=\mathsf{v}+\left[\alpha_{\mathsf{v}}\right]_{1}+\left[\alpha_{\mathsf{v}}\right]_{2} and sends βv\beta_{\mathsf{v}} (or βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}) to another server and they together jmp4\mbox−send\mathsf{jmp4\mbox{-}send} this information to the intended servers. The formal protocol for sharing a value v\mathsf{v} by PiP_{i} is given in Fig. 17

We further observe that servers can generate a ⟦⋅⟧\llbracket\cdot\rrbracket-sharing of v\mathsf{v} non-interactively when v\mathsf{v} is available with P0,P1,P2P_{0},P_{1},P_{2}. For this, servers set [αv]1=[αv]2=γv=0\left[\alpha_{\mathsf{v}}\right]_{1}=\left[\alpha_{\mathsf{v}}\right]_{2}=\gamma_{\mathsf{v}}=0 and βv=v\beta_{\mathsf{v}}=\mathsf{v}. We abuse notation and use Πjsh4(P0,P1,P2,v)\Pi_{\mathsf{jsh4}}(P_{0},P_{1},P_{2},\mathsf{v}) to denote this sharing.

In some protocols, P3P_{3} is required to generate ⟨⋅⟩\langle\cdot\rangle-sharing of a value v\mathsf{v} in the preprocessing phase, where ⟨⋅⟩\langle\cdot\rangle-sharing of v\mathsf{v} is same as that defined in 3PC (where v=v0+v1+v2\mathsf{v}=\mathsf{v}_{0}+\mathsf{v}_{1}+\mathsf{v}_{2}, and P0P_{0} possesses (v0,v1)(\mathsf{v}_{0},\mathsf{v}_{1}), P1P_{1} possesses (v1,v2)(\mathsf{v}_{1},\mathsf{v}_{2}), and P2P_{2} possess (v2,v0)(\mathsf{v}_{2},\mathsf{v}_{0})) with the addition that P3P_{3} now possesses (v0,v1,v2)(\mathsf{v}_{0},\mathsf{v}_{1},\mathsf{v}_{2}). We call the resultant protocol Πash4\Pi_{\mathsf{ash4}} and it appears in Fig. 19.

Note that servers can locally convert ⟨v⟩\langle\mathsf{v}\rangle to ⟦v⟧\llbracket\mathsf{v}\rrbracket by setting their shares as shown in Table 5.

Given the ⟦⋅⟧\llbracket\cdot\rrbracket-shares of x\mathsf{x} and y\mathsf{y}, protocol Πmult4\Pi_{\mathsf{mult4}} (Fig. 20) allows servers to compute ⟦z⟧\llbracket\mathsf{z}\rrbracket with z=xy\mathsf{z}=\mathsf{x}\mathsf{y}. When compared with the state-of-the-art 4PC GOD protocol of FLASH , our solution improves communication in both, the preprocessing and online phase, from 66 to 33 ring elements. Moreover, our communication cost matches with the state-of-the-art 4PC protocol of Trident that only provides security with fairness.

Given ⟦v⟧\llbracket\mathsf{v}\rrbracket, protocol Πrec4\Pi_{\mathsf{rec4}} (Fig. 21) enables servers to robustly reconstruct the value v\mathsf{v} among the servers. Note that every server lacks one share for reconstruction and the same is available with three other servers. Hence, they communicate the missing share among themselves, and the majority value is accepted. As an optimization, two among the three servers can send the missing share while the third one can send a hash of the same for verification. Notice that, as opposed to the 3PC case, this protocol does not require commitments. The formal protocol for reconstruction is given in Fig. 21.

3 Building Blocks for PPML using 4PC

This section provides details on robust realizations of the PPML building blocks in 4-server setting (for the same blocks as in §3.3). We provide the security proofs in §C.2.

where cb=βb⊕γb, eb=αb⊕γb, cv=βv+γv\mathsf{c}_{\mathsf{b}}=\beta_{\mathsf{b}}\oplus\gamma_{\mathsf{b}},~{}\mathsf{e}_{\mathsf{b}}=\alpha_{\mathsf{b}}\oplus\gamma_{\mathsf{b}},~{}\mathsf{c}_{\mathsf{v}}=\beta_{\mathsf{v}}+\gamma_{\mathsf{v}} and ev=αv+γv\mathsf{e}_{\mathsf{v}}=\alpha_{\mathsf{v}}+\gamma_{\mathsf{v}}. The protocol proceeds with P3P_{3} generating ⟨⋅⟩\langle\cdot\rangle-shares of ebR\mathsf{e}_{\mathsf{b}}^{\sf R} and ez=ebRev\mathsf{e}_{\mathsf{z}}=\mathsf{e}_{\mathsf{b}}^{\sf R}\mathsf{e}_{\mathsf{v}}, followed by verification of the same by P0,P1,P2P_{0},P_{1},P_{2}. If verification succeeds, then to enable P2P_{2} to compute βz=z+αz\beta_{\mathsf{z}}=\mathsf{z}+\alpha_{\mathsf{z}}, P1,P0P_{1},P_{0} jmp4\mbox−send\mathsf{jmp4\mbox{-}send} the missing share of βz\beta_{\mathsf{z}} to P2P_{2}. Similarly for P1P_{1}. Next, P1,P2P_{1},P_{2} reconstruct βz\beta_{\mathsf{z}}, and jmp4\mbox−send\mathsf{jmp4\mbox{-}send} βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}} to P0P_{0} completing the protocol.

Given ⟦⋅⟧\llbracket\cdot\rrbracket-shares of two n\mathsf{n}-sized vectors x⃗,y⃗\vec{\mathbf{x}},\vec{\mathbf{y}}, protocol Πdotp4\Pi_{\mathsf{dotp4}} (Fig. 24) enables servers to compute ⟦z⟧\llbracket\mathsf{z}\rrbracket with z=x⃗⊙y⃗\mathsf{z}=\vec{\mathbf{x}}\odot\vec{\mathbf{y}}. The protocol is essentially similar to n\mathsf{n} instances of multiplications of the form zi=xiyi\mathsf{z}_{i}=\mathsf{x}_{i}\mathsf{y}_{i} for i∈[n]i\in[\mathsf{n}]. But instead of communicating values corresponding to each of the n\mathsf{n} instances, servers locally sum up the shares and communicate a single value. This helps to obtain a communication cost independent of the size of the vectors.

In more detail, the dot product protocol proceeds as follows. During the preprocessing phase, similar to the multiplication protocol P0,P1,P3P_{0},P_{1},P_{3} sample a random [Γx⃗⊙y⃗]1\left[\Gamma_{\vec{\mathbf{x}}\odot\vec{\mathbf{y}}}\right]_{1}. P0,P3P_{0},P_{3} compute Γx⃗⊙y⃗=∑i=1nαxiαyi\Gamma_{\vec{\mathbf{x}}\odot\vec{\mathbf{y}}}=\sum_{i=1}^{\mathsf{n}}\alpha_{\mathsf{x}_{i}}\alpha_{\mathsf{y}_{i}} and jmp4\mbox−send\mathsf{jmp4\mbox{-}send} [Γx⃗⊙y⃗]2=Γx⃗⊙y⃗−[Γx⃗⊙y⃗]1\left[\Gamma_{\vec{\mathbf{x}}\odot\vec{\mathbf{y}}}\right]_{2}=\Gamma_{\vec{\mathbf{x}}\odot\vec{\mathbf{y}}}-\left[\Gamma_{\vec{\mathbf{x}}\odot\vec{\mathbf{y}}}\right]_{1} to P2P_{2}. P1,P2,P3P_{1},P_{2},P_{3} sample a random ψ\psi, and generate its [⋅]\left[\cdot\right]-shares locally. Servers P3,PjP_{3},P_{j} for j∈{1,2}j\in\{1,2\} then compute [χ]j=∑i=1n(γxi[αyi]j+γyi[αxi]j)+[Γx⃗⊙y⃗]j−[ψ]j\left[\chi\right]_{j}=\sum_{i=1}^{\mathsf{n}}(\gamma_{\mathsf{x}_{i}}\left[\alpha_{\mathsf{y}_{i}}\right]_{j}+\gamma_{\mathsf{y}_{i}}\left[\alpha_{\mathsf{x}_{i}}\right]_{j})+\left[\Gamma_{\vec{\mathbf{x}}\odot\vec{\mathbf{y}}}\right]_{j}-\left[\psi\right]_{j}, and jmp4\mbox−send\mathsf{jmp4\mbox{-}send} [χ]j\left[\chi\right]_{j} to P0P_{0}. The formal protocol is given in Fig. 24.

Given the ⟦⋅⟧\llbracket\cdot\rrbracket-sharing of a value v\mathsf{v} and a random truncation pair ([r],⟦rd⟧)(\left[\mathsf{r}\right],\llbracket\mathsf{r}^{d}\rrbracket), the ⟦⋅⟧\llbracket\cdot\rrbracket-sharing of the truncated value vd{\mathsf{v}}^{d} (right shifted value by, say, dd positions) can be computed as follows. Servers open the value (v−r)(\mathsf{v}-\mathsf{r}), truncate it and add it to ⟦rd⟧\llbracket{\mathsf{r}}^{d}\rrbracket to obtain ⟦vd⟧\llbracket{\mathsf{v}}^{d}\rrbracket. The protocol for generating the truncation pair ([r],⟦rd⟧)(\left[\mathsf{r}\right],\llbracket\mathsf{r}^{d}\rrbracket) is described in Fig. 25.

The cost follows directly from that of Πjmp4\Pi_{\mathsf{jmp4}} (Lemma 4.2 and 4.4). ∎

Protocol Πdotpt4\Pi_{\mathsf{dotpt4}} (Fig. 26) enables servers to generate ⟦⋅⟧\llbracket\cdot\rrbracket-sharing of the truncated value of z=x⃗⊙y⃗\mathsf{z}=\vec{\mathbf{x}}\odot\vec{\mathbf{y}}, denoted as zd{\mathsf{z}}^{d}, given the ⟦⋅⟧\llbracket\cdot\rrbracket-sharing of n\mathsf{n}-sized vectors x⃗\vec{\mathbf{x}} and y⃗\vec{\mathbf{y}}. This protocol is similar to the 3PC protocol.

Here, as in the 3PC case, we consider two activation functions – ReLU and Sig.

One instance of relu\mathsf{relu} protocol comprises of execution of one instance of Πbitext4\Pi_{\mathsf{bitext4}}, followed by Πbitinj4\Pi_{\mathsf{bitinj4}}. The cost, therefore, follows from Lemma 4.8, and Lemma 4.10. ∎

An instance of sig\mathsf{sig} protocol involves the execution of the following protocols in order– i) two parallel instances of Πbitext4\Pi_{\mathsf{bitext4}} protocol, ii) one instance of Πmult4\Pi_{\mathsf{mult4}} protocol over boolean value, and iii) one instance of Πbitinj4\Pi_{\mathsf{bitinj4}} and Πbit2A4\Pi_{\mathsf{bit2A4}} in parallel. The cost follows from Lemma 4.8, Lemma 4.9 and Lemma 4.10. ∎

Applications and Benchmarking

In this section, we empirically show the practicality of our protocols for PPML. We consider training and inference for Logistic Regression, and inference for 33 different Neural Networks (NN). NN training requires additional tools to allow mixed world computations, which we leave as future work. We refer readers to SecureML , ABY3 , BLAZE , FALCON for a detailed description of the training and inference steps for the aforementioned ML algorithms. All our benchmarking is done over the publicly available MNIST and CIFAR-10 dataset. For training, we use a batch size of B=128B=128 and define 11 KB = 81928192 bits.

In 3PC, we compare our results against the best-known framework BLAZE that provides fairness in the same setting. We observe that the technique of making the dot product cost independent of feature size can also be applied to BLAZE to obtain better costs. Hence, for a fair comparison, we additionally report these improved values for BLAZE. Further, we only consider the PPA circuit based variant of bit extraction for BLAZE since we aim for high throughput; the GC based variant results in huge communication and is not efficient for deep NNs. Our results imply that we get GOD at no additional cost compared to BLAZE. For 4PC, we compare our results with two best-known works FLASH (which is robust) and Trident (which is fair). Our results halve the cost of FLASH and are on par with Trident.

We implement our protocols using the publicly available ENCRYPTO library in C++17. We obtained the code of BLAZE and FLASH from the respective authors and executed them in our environment. The collision-resistant hash function was instantiated using SHA-256. We have used multi-threading, and our machines were capable of handling a total of 32 threads. Each experiment is run for 20 times, and the average values are reported.

MNIST is a collection of 28×2828\times 28 pixel, handwritten digit images along with a label between and 99 for each image. It has 60,00060,000 and respectively, 10,00010,000 images in the training and test set. We evaluate logistic regression, and NN-1, NN-2 (cf. §5.2) on this dataset.

CIFAR-10 consists of 32×3232\times 32 pixel images of 1010 different classes such as dogs, horses, etc. There are 50,00050,000 images for training and 10,00010,000 for testing, with 60006000 images in each class. We evaluate NN-3 (cf. §5.2) on this dataset.

We use throughput (TP\mathsf{TP}) as the benchmarking parameter following BLAZE and ABY3 as it would help to analyse the effect of improved communication and round complexity in a single shot. Here, TP\mathsf{TP} denotes the number of operations (“iterations" for the case of training and “queries" for the case of inference) that can be performed in unit time. We consider minute as the unit time since most of our protocols over WAN requires more than a second to complete. An iteration in ML training consists of a forward propagation phase followed by a backward propagation phase. In the former phase, servers compute the output from the inputs. At the same time, in the latter, the model parameters are adjusted according to the difference in the computed output and the actual output. The inference can be viewed as one forward propagation of the algorithm alone. In addition to TP\mathsf{TP}, we provide the online and overall communication and latency for all the benchmarked ML algorithms.

We observe that due to our protocols’ asymmetric nature, the communication load is unevenly distributed among all the servers, which leaves several communication channels under-utilized. Thus, to improve the performance, we perform load balancing, where we run several parallel execution threads, each with roles of the servers changed. This helps in utilizing all channels and improving the performance. We report the communication and runtime of the protocols for online phase and total (= preprocessing + online).

1 Logistic Regression

In Logistic Regression, one iteration comprises updating the weight vector w⃗\vec{\mathbf{w}} using the gradient descent algorithm (GD). It is updated according to the function given below: w⃗=w⃗−αBXiT∘(sig(Xi∘w⃗)−Yi).\vec{\mathbf{w}}=\vec{\mathbf{w}}-\frac{\alpha}{B}\mathbf{X}_{i}^{T}\circ\left(\mathsf{sig}(\mathbf{X}_{i}\circ\vec{\mathbf{w}})-\mathbf{Y}_{i}\right). where α\alpha and Xi\mathbf{X}_{i} denote the learning rate, and a subset, of batch size B, randomly selected from the entire dataset in the iith iteration, respectively. The forward propagation comprises of computing the value Xi∘w⃗\mathbf{X}_{i}\circ\vec{\mathbf{w}} followed by an application of a sigmoid function on it. The weight vector is updated in the backward propagation, which internally requires the computation of a series of matrix multiplications, and can be achieved using a dot product. The update function can be computed using ⟦⋅⟧\llbracket\cdot\rrbracket shares as: ⟦w⃗⟧=⟦w⃗⟧−αB⟦XjT⟧∘(sig(⟦Xj⟧∘⟦w⃗⟧)−⟦Yj⟧).\llbracket\vec{\mathbf{w}}\rrbracket=\llbracket\vec{\mathbf{w}}\rrbracket-\frac{\alpha}{B}\llbracket\mathbf{X}_{j}^{T}\rrbracket\circ(\mathsf{sig}(\llbracket\mathbf{X}_{j}\rrbracket\circ\llbracket\vec{\mathbf{w}}\rrbracket)-\llbracket\mathbf{Y}_{j}\rrbracket). We summarize our results in Table 6.

We observe that the online TP\mathsf{TP} for the case of 3PC inference is slightly lower compared to that of BLAZE. This is because the total number of rounds for the inference phase is slightly higher in our case due to the additional rounds introduced by the verification mechanism (aka verify phase which also needs broadcast). This gap becomes less evident for protocols with more number of rounds, as is demonstrated in the case of NN (presented next), where verification for several iterations is clubbed together, making the overhead for verification insignificant.

For the case of 4PC, our solution outperforms FLASH in terms of communication as well as throughput. Concretely, we observe a 2×2\times improvement in TP\mathsf{TP} for inference and a 2.3×2.3\times improvement for training. For Trident , we observe a drop of 15.86%15.86\% in TP\mathsf{TP} for inference due to the extra rounds required for verification to achieve GOD. This loss is, however, traded-off with the stronger security guarantee. For training, we are on par with Trident as the effect of extra rounds becomes less significant for more number of rounds, as will also be evident from the comparisons for NN inference.

As a final remark, note that our 4PC sees roughly 2.5×2.5\times improvement compared to our 3PC for logistic regression.

2 NN Inference

We consider the following popular neural networks for benchmarking. These are chosen based on the different range of model parameters and types of layers used in the network. We refer readers to for a detailed architecture of the neural networks.

NN-1: This is a 33-layered fully connected network with ReLU activation after each layer. This network has around 118118K parameters and is chosen from .

NN-2: This network, called LeNet , contains 22 convolutional layers and 22 fully connected layers with ReLU activation after each layer, additionally followed by maxpool for convolutional layers. This network has approximately 431431K parameters.

NN-3: This network, called VGG16 , was the runner-up of ILSVRC-2014 competition. This network has 1616 layers in total and comprises of fully-connected, convolutional, ReLU activation and maxpool layers. This network has about 138138 million parameters.

Table 7 summarise our benchmarking results for 3PC NN inference. As illustrated, the performance of our 3PC framework is on par with BLAZE while providing better security guarantee.

Table 8 summarises NN inference for 4PC setting. Here, we outperform FLASH in every aspect, with the improvement in TP\mathsf{TP} being at least 2.5×2.5\times for each NN architecture. Further, we are on par with Trident because the extra rounds required for verification get amortized with an increase in the number of rounds required for computing NN inference. This establishes the practical relevance of our work.

As a final remark, note that our 4PC sees roughly 3×3\times improvement compared to our 3PC for NN inference. This reflects the improvements brought in by the additional honest server in the system.

Conclusion

In this work, we presented an efficient framework for PPML that achieves the strongest security of GOD or robustness. Our 3PC protocol builds upon the recent work of BLAZE and achieves almost similar (in some cases, better) performance albeit improving the security guarantee. For the case of 4PC, we outperform the best-known– (a) robust protocol of FLASH by 2×2\times performance-wise and (b) fair protocol of Trident by uplifting its security.

We leave the problem of extending our framework to support mixed-world conversions as well as to design protocols to support algorithms like Decision Trees, k-means Clustering etc. as open problem.

Acknowledgements

We thank our shepherd Guevara Noubir, and anonymous reviewers for their valuable feedback.

Nishat Koti would like to acknowledge financial support from Cisco PhD Fellowship 2020. Mahak Pancholi would like to acknowledge financial support from Cisco MTech Fellowship 2020. Arpita Patra would like to acknowledge financial support from SERB MATRICS (Theoretical Sciences) Grant 2020 and Google India AI/ML Research Award 2020. Ajith Suresh would like to acknowledge financial support from Google PhD Fellowship 2019. The authors would also like to acknowledge the financial support from Google Cloud to perform the benchmarking.

References

Appendix A Preliminaries

One key shared between every pair– k01,k02,k12k_{01},k_{02},\allowbreak k_{12} for the servers (P0,P1),(P0,P2)(P_{0},P_{1}),(P_{0},P_{2})and(P1,P2)(P_{1},P_{2}), respectively.

One shared key known to all the servers– kPk_{\mathcal{P}}.

The key setup is modelled via a functionality Fsetup\mathcal{F}_{\mathsf{setup}} (Fig. 27) that can be realised using any secure MPC protocol. Analogously, key setup functionality for 4PC is given in Fig. 28.

To generate a 3-out-of-3 additive sharing of i.e. ζs\zeta_{s} for s∈{0,1,2}s\in\{0,1,2\} such that PsP_{s} holds ζs\zeta_{s}, and ζ0+ζ1+ζ2=0\zeta_{0}+\zeta_{1}+\zeta_{2}=0, servers proceed as follows. Every pair of servers, Ps,P(s+1)%3P_{s},P_{(s+1)\%3}, non-interactively generate rs\mathsf{r}_{s}, as described earlier, and each PsP_{s} sets ζs=rs−r(s−1)%3\zeta_{s}=\mathsf{r}_{s}-\mathsf{r}_{(s-1)\%3}.

A.2 Collision Resistant Hash Function

Consider a hash function family H=K×L→Y\mathsf{H}=\mathcal{K}\times\mathcal{L}\rightarrow\mathcal{Y}. The hash function H\mathsf{H} is said to be collision resistant if, for all probabilistic polynomial-time adversaries A\mathcal{A}, given the description of Hk\mathsf{H}_{k} where k∈RKk\in_{R}\mathcal{K}, there exists a negligible function negl()\mathsf{negl}() such that Pr⁡[(x1,x2)←A(k):(x1≠x2)∧Hk(x1)=Hk(x2)]≤negl(κ)\Pr[(x_{1},x_{2})\leftarrow\mathcal{A}(k):(x_{1}\neq x_{2})\wedge\mathsf{H}_{k}(x_{1})=\mathsf{H}_{k}(x_{2})]\leq\mathsf{negl}(\kappa), where m=poly(κ)m=\mathsf{poly}(\kappa) and x1,x2∈R{0,1}mx_{1},x_{2}\in_{R}\{0,1\}^{m}.

A.3 Commitment Scheme

Let Com(x)\mathsf{Com}(x) denote the commitment of a value xx. The commitment scheme Com(x)\mathsf{Com}(x) possesses two properties; hiding and binding. The former ensures privacy of the value v\mathsf{v} given just its commitment Com(v)\mathsf{Com}(\mathsf{v}), while the latter prevents a corrupt server from opening the commitment to a different value x′≠xx^{\prime}\neq x. The practical realization of a commitment scheme is via a hash function H()\mathcal{H}() given below, whose security can be proved in the random-oracle model (ROM)– for (c,o)=(H(x∣∣r),x∣∣r)=Com(x;r)(c,o)=(\mathcal{H}(x||r),\allowbreak x||r)=\mathsf{Com}(x;r).

As mentioned earlier, a trivial way to instantiate ΠdotpPre\Pi_{\mathsf{dotpPre}} is to treat a dot product operation as n\mathsf{n} multiplications. However, this results in a communication cost that is linearly dependent on the feature size. Instead, we instantiate ΠdotpPre\Pi_{\mathsf{dotpPre}} by a semi-honest dot product protocol followed by a verification phase to check the correctness. For the verification phase, we extend the techniques of to provide support for verification of dot product tuples. Setting the verification phase parameters appropriately gives a ΠdotpPre\Pi_{\mathsf{dotpPre}} whose (amortized) communication cost is independent of the feature size. We provide the details next.

To realize FDotPPre\mathcal{F}_{\mathsf{DotPPre}}, the approach is to run a semi-honest dot product protocol followed by a verification phase to check the correctness of the output. For verification, the work of provides techniques to verify the correctness of mm multiplication triples (and degree-two relations) at a cost of O(m)\mathcal{O}(\sqrt{m}) extended ring elements, albeit with abort security. While improves their techniques to provide robust verification for multiplication, we show how to extend the techniques in to robustly verify the correctness of mm dot product tuples (dot product being a degree two relation), with vectors of dimension n\mathsf{n}, at a cost of O(nm)\mathcal{O}(\sqrt{\mathsf{n}m}) extended ring elements. Thus, the cost to realize one instance of FDotPPre\mathcal{F}_{\mathsf{DotPPre}} can be brought down to only the cost of a semi-honest dot product computation (which is 33 ring elements and independent of the vector dimension), where the cost due to verification can be amortized away by setting n,m\mathsf{n},m appropriately.

Now, to complete the ⟨⋅⟩\langle\cdot\rangle-sharing of f\mathsf{f}, PiP_{i} sends fi\mathsf{f}_{i} to Pi−1P_{i-1}. To check the correctness of the computation ⟨f⟩=⟨d⃗⊙e⃗⟩\langle\mathsf{f}\rangle=\langle\vec{\mathbf{d}}\odot\vec{\mathbf{e}}\rangle, each Pi∈PP_{i}\in\mathcal{P} needs to prove that the fi\mathsf{f}_{i} it sent in the semi-honest protocol satisfies 7, i.e.

This difference in the expected message that should be sent (computed using PiP_{i}’s correct input shares) and actual message that is sent by PiP_{i} is captured by a circuit cc, defined below.

Here, cc takes as input u=4n+2u=4\mathsf{n}+2 values: ⟨⋅⟩\langle\cdot\rangle-shares of d⃗,e⃗\vec{\mathbf{d}},\vec{\mathbf{e}} held by PiP_{i}, i.e. {dj,i,dj,i+1,ej,i,ej,i+1}j=1n\{\mathsf{d}_{j,i},\mathsf{d}_{j,{i+1}},\mathsf{e}_{j,i},\mathsf{e}_{j,{i+1}}\}_{j=1}^{\mathsf{n}}, the additive share of zero, ζi\zeta_{i}, that PiP_{i} holds, and the additive share fi\mathsf{f}_{i} sent by PiP_{i}. For correct computation with respect to PiP_{i}, we require the difference in the expected message and the actual message to be , i.e.,

We now explain how to verify the correctness for mm dot product tuples assuming that the operations are carried out over a prime-order field. The verification can be extended to support operations over rings following the techniques of . To verify the correctness for mm dot product tuples, {d⃗k,e⃗k,fk}k=1m\{\vec{\mathbf{d}}_{k},\vec{\mathbf{e}}_{k},\mathsf{f}_{k}\}_{k=1}^{m} where fk=d⃗k⊙e⃗k\mathsf{f}_{k}=\vec{\mathbf{d}}_{k}\odot\vec{\mathbf{e}}_{k}, the output of cc (which is the difference in the expected and actual message sent) for each of the corresponding dot product tuple must be . To check correctness of all dot products at once, it suffices to check if a random linear combination of the output of each cc (for each dot product) is . This is because the random linear combination of the differences will be with high probability if fk=d⃗k⊙e⃗k\mathsf{f}_{k}=\vec{\mathbf{d}}_{k}\odot\vec{\mathbf{e}}_{k} for each k∈{1,…,m}k\in\{1,\ldots,m\}. We remark that the definition of c(⋅)c(\cdot) in enables the verification of only multiplication triples. With the re-definition of cc as in 9, we can now verify the correctness of dot products while the rest of the verification steps remain similar to that in . We elaborate on the details, next.

A verification circuit, constructed as follows, enables PiP_{i} to prove the correctness of the additive share of f\mathsf{f} that it sent, for mm instances of dot product at once. Note that the proof system is designed for the distributed-verifier setting where the proof generated by PiP_{i} will be shared among Pi−1,Pi+1P_{i-1},P_{i+1}, who can together verify its correctness. First, a sub-circuit gg is defined as: group LL small cc circuits and take a random linear combination of the values on their output wires. Since each cc circuit takes u=4n+2u=4\mathsf{n}+2 inputs as described earlier, gg takes in uLuL inputs. Precisely, gg is defined as follows:

Since there are total mm dot products to be verified, there will be M=m/LM=m/L sub-circuits gg. Looking ahead, this grouping technique enables obtaining a sub-linear communication cost for verification because the communication cost turns out to be O(uL+M)\mathcal{O}(uL+M) and setting uL=MuL=M gives the desired result. The sub-circuits gg make up the circuit GG which outputs a random linear combination of the values on the output wires of each gg, i.e:

We note that both, and our technique require a communication cost of O(mn)\mathcal{O}(\sqrt{m\mathsf{n}}) ring elements for verifying mm dot products of vector size n\mathsf{n}. This is because multiplication is a special case of dot product with n=1\mathsf{n}=1. However, since our verification is for dot products, we can get away with performing only mm semi-honest dot products whose cost is equivalent to computing mm semi-honest multiplications, whereas requires to execute mnm\mathsf{n} multiplications (as their technique can only verify correctness of multiplications), resulting in a dot product cost dependent on the vector size. Concretely, to get 4040 bits of statistical security and for a vector size of 2102^{10} (CIFAR-10 dataset), the aforementioned parameters can be set as given in Table 9.

It is possible to further bring down the communication cost required for verifying mm dot product tuples to O(log⁡(nm))\mathcal{O}(\log(\mathsf{n}m)) at the expense of requiring more rounds by further extending the technique of , which we leave as an exercise. We refer readers to for formal details.

Appendix C Security Analysis of Our Protocols

In this section, we provide detailed security proofs for our constructions in both the 3PC and 4PC domains. We prove security using the real-world/ ideal-word simulation based technique. We provide proofs in the Fsetup\mathcal{F}_{\mathsf{setup}}-hybrid model for the case of 3PC, where Fsetup\mathcal{F}_{\mathsf{setup}} (Fig. 27) denotes the ideal functionality for the three server shared-key setup. Similarly, 4PC proofs are provided in Fsetup4\mathcal{F}_{\mathsf{setup4}}-hybrid model (Fig. 28).

Let A\mathcal{A} denote the real-world adversary corrupting at most one server in P\mathcal{P}, and S\mathcal{S} denote the corresponding ideal world adversary. The strategy for simulating the computation of function ff (represented by a circuit ckt\mathsf{ckt}) is as follows: The simulation begins with the simulator emulating the shared-key setup (Fsetup/Fsetup4\mathcal{F}_{\mathsf{setup}}/\mathcal{F}_{\mathsf{setup4}}) functionality and giving the respective keys to the adversary. This is followed by the input sharing phase in which S\mathcal{S} extracts the input of A\mathcal{A}, using the known keys, and sets the inputs of the honest parties to be . S\mathcal{S} now knows all the inputs and can compute all the intermediate values for each of the building blocks in clear. Also, S\mathcal{S} can obtain the output of the ckt\mathsf{ckt} in clear. S\mathcal{S} now proceeds simulating each of the building block in topological order using the aforementioned values (inputs of A\mathcal{A}, intermediate values and circuit output).

In some of our sub protocols, adversary is able to decide on which among the honest parties should be chosen as the Trusted Third Party (TTP\mathsf{TTP}) in that execution of the protocol. To capture this, we consider corruption-aware functionalities for the sub-protocols, where the functionality is provided the identity of the corrupt server as an auxiliary information.

For modularity, we provide the simulation steps for each of the sub-protocols separately. These steps, when carried out in the respective order, result in the simulation steps for the entire 3/4PC protocol. If a TTP\mathsf{TTP} is identified during the simulation of any of the sub-protocols, simulator will stop the simulation at that step. In the next round, the simulator receives the input of the corrupt party in clear on behalf of the TTP\mathsf{TTP} for the 3PC case, whereas it receives the input shares from adversary for 4PC.

The ideal functionality F3PC\mathcal{F}_{\mathsf{3PC}} for 3PC appears in Fig. 29.

This section provides the security proof for the jmp\mathsf{jmp} primitive, which forms the crux for achieving GOD in our constructions. Let Fjmp\mathcal{F}_{\mathsf{jmp}} (Fig. 1) denote the ideal functionality and let SjmpPs\mathcal{S}_{\mathsf{jmp}}^{P_{s}} denote the corresponding simulator for the case of corrupt Ps∈PP_{s}\in\mathcal{P}. We begin with the case for a corrupt sender, PiP_{i}. The case for a corrupt PjP_{j} is similar and hence we omit details for the same. – SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} initializes ttp=⊥\mathsf{ttp}=\bot and receives vi\mathsf{v}_{i} from A\mathcal{A} on behalf of PkP_{k}. – In case, A\mathcal{A} fails to send a value SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} broadcasts "(accuse,PiP_{i})", sets ttp=Pj\mathsf{ttp}=P_{j}, vi=⊥\mathsf{v}_{i}=\bot, and skip to the last step. – Else, it checks if vi=v\mathsf{v}_{i}=\mathsf{v}, where v\mathsf{v} is the value computed by SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} based on the interaction with A\mathcal{A}, and using the knowledge of the shared keys. If the values are equal, SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} sets bk=0b_{k}=0, else, sets bk=1b_{k}=1, and sends the same to A\mathcal{A} on the behalf of PkP_{k}. – If A\mathcal{A} broadcasts "(accuse,PkP_{k})", SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} sets vi=⊥\mathsf{v}_{i}=\bot, ttp=Pj\mathsf{ttp}=P_{j}, and skips to the last step. – SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} computes and sends bjb_{j} to A\mathcal{A} on behalf of PjP_{j} and receives bAb_{\mathcal{A}} from A\mathcal{A} on behalf of honest PjP_{j}. – If SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} does not receive a bAb_{\mathcal{A}} on behalf of PjP_{j}, it broadcasts "(accuse,PiP_{i})", sets vi=⊥\mathsf{v}_{i}=\bot, ttp=Pk\mathsf{ttp}=P_{k}. If A\mathcal{A} broadcasts "(accuse,PjP_{j})", SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} sets vi=⊥\mathsf{v}_{i}=\bot, ttp=Pk\mathsf{ttp}=P_{k}. If ttp\mathsf{ttp} is set, skip to the last step. – If (vi=v)(\mathsf{v}_{i}=\mathsf{v}) and bA=1b_{\mathcal{A}}=1, SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} broadcasts Hj=H(v)\mathsf{H}_{j}=\mathsf{H}(\mathsf{v}) on behalf of PjP_{j}. – Else if vi≠vj\mathsf{v}_{i}\neq\mathsf{v}_{j} : SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} broadcasts Hj=H(v)\mathsf{H}_{j}=\mathsf{H}(\mathsf{v}) and Hk=H(vi)\mathsf{H}_{k}=\mathsf{H}(\mathsf{v}_{i}) on behalf of PjP_{j} and PkP_{k}, respectively. If A\mathcal{A} does not broadcast, SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} sets ttp=Pk\mathsf{ttp}=P_{k}. Else if, A\mathcal{A} broadcasts a value HA\mathsf{H}_{\mathcal{A}}: ∙\bullet If HA≠Hj\mathsf{H}_{\mathcal{A}}\neq\mathsf{H}_{j} : SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} sets ttp=Pk\mathsf{ttp}=P_{k}. ∙\bullet Else if HA≠Hk\mathsf{H}_{\mathcal{A}}\neq\mathsf{H}_{k} : SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} sets ttp=Pj\mathsf{ttp}=P_{j}. – SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} invokes Fjmp\mathcal{F}_{\mathsf{jmp}} on (Input,vi)(\mathsf{Input},\mathsf{v}_{i}) and (Select,ttp)(\mathsf{Select},\mathsf{ttp}) on behalf of A\mathcal{A}.

The case for a corrupt receiver, PkP_{k} is provided in Fig. 31.

C.1.2 Sharing Protocol

The case for a corrupt P0P_{0} is provided in Fig. 37. \justify Preprocessing: SshP0\mathcal{S}_{\mathsf{sh}}^{P_{0}} emulates Fsetup\mathcal{F}_{\mathsf{setup}} and gives the keys (k01,k02,kP)(k_{01},k_{02},k_{\mathcal{P}}) to A\mathcal{A}. The values that are commonly held along with A\mathcal{A} are sampled using appropriate shared key. Otherwise, values are sampled randomly. \justify Online: – If the dealer Ps=P0P_{s}=P_{0}: ∙\bullet SshP0\mathcal{S}_{\mathsf{sh}}^{P_{0}} receives βv\beta_{\mathsf{v}} on behalf of P1P_{1} and sets msg=v\mathsf{msg}=\mathsf{v} accordingly. ∙\bullet Steps for Πjmp\Pi_{\mathsf{jmp}} protocol are simulated according to SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} (Fig. 30), where P0P_{0} plays the role of one of the senders. – If the dealer Ps=P1P_{s}=P_{1}: ∙\bullet SshP0\mathcal{S}_{\mathsf{sh}}^{P_{0}} sets v=0\mathsf{v}=0 by assigning βv=αv\beta_{\mathsf{v}}=\alpha_{\mathsf{v}}. ∙\bullet Steps for Πjmp\Pi_{\mathsf{jmp}} protocol are simulated similar to SjmpPk\mathcal{S}_{\mathsf{jmp}}^{P_{k}} (Fig. 31), with P0P_{0} acting as the receiver. – If the dealer if P2P_{2} : Similar to the case when Ps=P1P_{s}=P_{1}.

The case for a corrupt P1P_{1} is provided in Fig. 33. The case for a corrupt P2P_{2} is similar. \justify Preprocessing: SjshP1\mathcal{S}_{\mathsf{jsh}}^{P_{1}} emulates Fsetup\mathcal{F}_{\mathsf{setup}} and gives the keys (k01,k12,kP)(k_{01},k_{12},k_{\mathcal{P}}) to A\mathcal{A}. The values that are commonly held along with A\mathcal{A} are sampled using appropriate shared key. Otherwise, values are sampled randomly. \justify Online: – If dealer Ps=P1P_{s}=P_{1} : SshP1\mathcal{S}_{\mathsf{sh}}^{P_{1}} receives βv\beta_{\mathsf{v}} from A\mathcal{A} on behalf of P2P_{2}. – If Ps=P0P_{s}=P_{0} : SshP1\mathcal{S}_{\mathsf{sh}}^{P_{1}} sets v=0\mathsf{v}=0 by assigning βv=αv\beta_{\mathsf{v}}=\alpha_{\mathsf{v}} and sends βv\beta_{\mathsf{v}} to A\mathcal{A} on behalf of PsP_{s}. – If Ps=P2P_{s}=P_{2} : Similar to the case where Ps=P0P_{s}=P_{0}. – Steps of Πjmp\Pi_{\mathsf{jmp}}, in all the steps above, are simulated similar to SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}} (Fig. 30), ie. the case of corrupt sender.

C.1.3 Multiplication Protocol

The case for a corrupt P0P_{0} is provided in Fig. 34.

C.1.4 Reconstruction Protocol

The case for a corrupt P0P_{0} is provided in Fig. 52. The case for a corrupt P1,P2P_{1},P_{2} is similar.

C.1.5 Joint Sharing Protocol

The case for a corrupt P0P_{0} is provided in Fig. 37. The case for a corrupt P1,P2P_{1},P_{2} is similar. \justify Preprocessing: SshP0\mathcal{S}_{\mathsf{sh}}^{P_{0}} emulates Fsetup\mathcal{F}_{\mathsf{setup}} and gives the keys (k01,k02,kP)(k_{01},k_{02},k_{\mathcal{P}}) to A\mathcal{A}. The values that are commonly held along with A\mathcal{A} are sampled using appropriate shared key. Otherwise, values are sampled randomly. \justify Online: – If (Pi,Pj)=(P1,P0)(P_{i},P_{j})=(P_{1},P_{0}) : Sjsh\mathcal{S}_{\mathsf{jsh}} computes βv=v+αv\beta_{\mathsf{v}}=\mathsf{v}+\alpha_{\mathsf{v}} on behalf of P1P_{1}. The steps of Πjmp\Pi_{\mathsf{jmp}} are simulated similar to SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}}, where the A\mathcal{A} acts as one of the senders. – If (Pi,Pj)=(P2,P0)(P_{i},P_{j})=(P_{2},P_{0}) : Similar to the case when (Pi,Pj)=(P1,P0)(P_{i},P_{j})=(P_{1},P_{0}). – If (Pi,Pj)=(P1,P2)(P_{i},P_{j})=(P_{1},P_{2}) : Sjsh\mathcal{S}_{\mathsf{jsh}} sets v=0\mathsf{v}=0 by setting βv=αv\beta_{\mathsf{v}}=\alpha_{\mathsf{v}}. The steps of Πjmp\Pi_{\mathsf{jmp}} are simulated similar to SjmpPk\mathcal{S}_{\mathsf{jmp}}^{P_{k}}, where the A\mathcal{A} acts as the receiver.

C.1.6 Dot Product Protocol

The case for a corrupt P0P_{0} is provided in Fig. 38. \justify Preprocessing: Sdotp\mathcal{S}_{\mathsf{dotp}} emulates FDotPPre\mathcal{F}_{\mathsf{DotPPre}} and derives ψ\psi and respective [⋅]\left[\cdot\right]-shares of χ\chi honestly on behalf of P1,P2P_{1},P_{2}. \justify Online: – SdotpP0\mathcal{S}_{\mathsf{dotp}}^{P_{0}} computes [⋅]\left[\cdot\right]-shares of βz⋆\mathsf{\beta}_{\mathsf{z}}^{\star} on behalf of P1,P2P_{1},P_{2}. The steps of Πjmp\Pi_{\mathsf{jmp}}, required to provide P1P_{1} with [βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2}, and P2P_{2} with [βz⋆]1\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1}, are simulated similar to SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}}, where P0P_{0} acts as one of the sender in both cases. – SdotpP0\mathcal{S}_{\mathsf{dotp}}^{P_{0}} computes βz⋆\mathsf{\beta}_{\mathsf{z}}^{\star} and βz\beta_{\mathsf{z}} on behalf of P1,P2P_{1},P_{2}. The steps of the Πjmp\Pi_{\mathsf{jmp}}, required to provide P0P_{0} with βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}}, are simulated similar to SjmpPk\mathcal{S}_{\mathsf{jmp}}^{P_{k}}, where P0P_{0} acts as the receiver.

The case for a corrupt P1P_{1} is provided in Fig. 39. The case for a corrupt P2P_{2} is similar. \justify Preprocessing: SdotpP1\mathcal{S}_{\mathsf{dotp}}^{P_{1}} emulates FDotPPre\mathcal{F}_{\mathsf{DotPPre}} and derives [⋅]\left[\cdot\right]-shares of ψ,χ\psi,\chi honestly on behalf of P0,P2P_{0},P_{2}. \justify Online: – SdotpP1\mathcal{S}_{\mathsf{dotp}}^{P_{1}} computes [βz⋆]1\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1} on behalf of P0P_{0}, and [βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2} on behalf of P0P_{0} and P2P_{2}. The steps of Πjmp\Pi_{\mathsf{jmp}}, required to provide P1P_{1} with [βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2}, and P2P_{2} with [βz⋆]1\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1}, are simulated similar to SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}}, where A\mathcal{A} acts as one of the sender in the former case, and as a receiver in the latter case. – SdotpP1\mathcal{S}_{\mathsf{dotp}}^{P_{1}} computes βz⋆\mathsf{\beta}_{\mathsf{z}}^{\star} and βz\beta_{\mathsf{z}} on behalf of P2P_{2}. The steps of Πjmp\Pi_{\mathsf{jmp}}, required to provide P0P_{0} with βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}}, are simulated similar to SjmpPi\mathcal{S}_{\mathsf{jmp}}^{P_{i}}, where A\mathcal{A} acts as one of the sender.

C.1.7 Truncation Protocol

C.2 Security Proofs for 4PC protocols

The ideal functionality F4PC\mathcal{F}_{\mathsf{4PC}} for evaluating a function ff to be computed by ckt\mathsf{ckt} in 4PC appears in Fig. 42. \justify F4PC\mathcal{F}_{\mathsf{4PC}} interacts with the servers in P\mathcal{P} and the adversary S\mathcal{S}. Let ff denote the function to be computed. Let xs\mathsf{x}_{s} be the input corresponding to the server PsP_{s}, and ys\mathsf{y}_{s} be the corresponding output, i.e (y0,y1,y2,y3)=f(x0,x1,x2,x3).(\mathsf{y}_{0},\mathsf{y}_{1},\mathsf{y}_{2},\mathsf{y}_{3})=f(\mathsf{x}_{0},\mathsf{x}_{1},\mathsf{x}_{2},\mathsf{x}_{3}). Step 1: F4PC\mathcal{F}_{\mathsf{4PC}} receives (Input,xs)(\mathsf{Input},\mathsf{x}_{s}) from Ps∈PP_{s}\in\mathcal{P}, and computes (y0,y1,y3,y3)=f(x0,x1,x2,x3).(\mathsf{y}_{0},\mathsf{y}_{1},\mathsf{y}_{3},\mathsf{y}_{3})=f(\mathsf{x}_{0},\mathsf{x}_{1},\mathsf{x}_{2},\mathsf{x}_{3}). Step 2: F4PC\mathcal{F}_{\mathsf{4PC}} sends (Output,ys)(\mathsf{Output},\mathsf{y}_{s}) to Ps∈PP_{s}\in\mathcal{P}.

Let Fjmp4\mathcal{F}_{\mathsf{jmp4}} Fig. 15 denote the ideal functionality and let Sjmp4Ps\mathcal{S}_{\mathsf{jmp4}}^{P_{s}} denote the corresponding simulator for the case of corrupt Ps∈PP_{s}\in\mathcal{P}.

We begin with the case for a corrupt sender, PiP_{i}, which is provided in Fig. 43. The case for a corrupt PjP_{j} is similar and hence we omit details for the same. \justify – Sjmp4Pi\mathcal{S}_{\mathsf{jmp4}}^{P_{i}} receives vi\mathsf{v}_{i} from A\mathcal{A} on behalf of honest PkP_{k}. If vi=vj\mathsf{v}_{i}=\mathsf{v}_{j} (where vj\mathsf{v}_{j} is the value computed by Sjmp4Pi\mathcal{S}_{\mathsf{jmp4}}^{P_{i}} based on the interaction with A\mathcal{A}, and using the knowledge of the shared keys), then Sjmp4Pi\mathcal{S}_{\mathsf{jmp4}}^{P_{i}} sets bk=0b_{k}=0, else it sets bk=1b_{k}=1. If A\mathcal{A} fails to send a value, bkb_{k} is set to be 11. Sjmp4Pi\mathcal{S}_{\mathsf{jmp4}}^{P_{i}} sends bkb_{k} to A\mathcal{A} on behalf of PkP_{k}. – Sjmp4Pi\mathcal{S}_{\mathsf{jmp4}}^{P_{i}} sends bl=bkb_{l}=b_{k} and bj=bkb_{j}=b_{k} to A\mathcal{A}, and receives bib_{i} from A\mathcal{A} on behalf of honest Pl,PjP_{l},P_{j}, respectively. – If bk=1b_{k}=1, Sjmp4Pi\mathcal{S}_{\mathsf{jmp4}}^{P_{i}} sets ttp=1\mathsf{ttp}=1, else it sets ttp=0\mathsf{ttp}=0. Sjmp4Pi\mathcal{S}_{\mathsf{jmp4}}^{P_{i}} invokes Fjmp4\mathcal{F}_{\mathsf{jmp4}} with (Input,vi)(\mathsf{Input},\mathsf{v}_{i}) and (Select,bk)(\mathsf{Select},b_{k}) on behalf of A\mathcal{A}.

The case for a corrupt receiver, PkP_{k} is provided in Fig. 44.

The case for a corrupt receiver, PlP_{l}, which is the server outside the computation involved in Πjmp4\Pi_{\mathsf{jmp4}}, is provided in Fig. 45.

C.2.2 Sharing Protocol

The case for corrupt P0P_{0} is given in Fig. 46. \justify Preprocessing: SΠsh4P0\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{0}} emulates Fsetup4\mathcal{F}_{\mathsf{setup4}} and gives the keys (k01,k02,k03,k012,k013,k023(k_{01},k_{02},k_{03},k_{012},k_{013},k_{023} and kP)k_{\mathcal{P}}) to A\mathcal{A}. The values that are commonly held with A\mathcal{A} are sampled using the respective keys, while others are sampled randomly. \justify Online: – If dealer is P0P_{0}, SΠsh4P0\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{0}} receives βv\beta_{\mathsf{v}} from A\mathcal{A} on behalf of P1P_{1}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P0P_{0} acts as one of the sender for sending βv\beta_{\mathsf{v}}. – If dealer is P1P_{1} or P2P_{2}, SΠsh4P0\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{0}} sets v=0\mathsf{v}=0 by assigning βv=αv\beta_{\mathsf{v}}=\alpha_{\mathsf{v}}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} for sending βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}} to A\mathcal{A} are simulated according to SΠjmp4Pk\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{k}} where P0P_{0} acts as the receiver. – If dealer is P3P_{3}, SΠsh4P0\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{0}} sets v=0\mathsf{v}=0 by assigning βv=αv\beta_{\mathsf{v}}=\alpha_{\mathsf{v}}. SΠsh4P0\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{0}} sends βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}} to A\mathcal{A} on behalf of P3P_{3}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pj\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{j}} where P0P_{0} acts as one of the sender with P1P_{1}, P2P_{2} as the receivers, separately.

The case for corrupt P1P_{1} is given in Fig. 47. The case for a corrupt P2P_{2} is similar. \justify Preprocessing: SΠsh4P1\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{1}} emulates Fsetup4\mathcal{F}_{\mathsf{setup4}} and gives the keys (k01,k12,k13,k012,k013,k123(k_{01},k_{12},k_{13},k_{012},k_{013},k_{123} and kP)k_{\mathcal{P}}) to A\mathcal{A}. The values that are commonly held with A\mathcal{A} are sampled using the respective keys, while others are sampled randomly. \justify Online: – If dealer is P1P_{1}, SΠsh4P1\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{1}} receives βv\beta_{\mathsf{v}} from A\mathcal{A} on behalf of P2P_{2}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P1P_{1} acts as one of the sender for sending βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}} to P0P_{0}. – If dealer is P0P_{0} or P2P_{2}, SΠsh4P1\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{1}} sets v=0\mathsf{v}=0 by assigning βv=αv\beta_{\mathsf{v}}=\alpha_{\mathsf{v}}. ∙\bullet If dealer is P0P_{0}, SΠsh4P1\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{1}} sends βv\beta_{\mathsf{v}} to A\mathcal{A} on behalf of P0P_{0}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pj\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{j}} where P1P_{1} acts as one of the sender to send βv\beta_{\mathsf{v}}. ∙\bullet If dealer is P2P_{2}, SΠsh4P1\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{1}} sends βv\beta_{\mathsf{v}} to A\mathcal{A} on behalf of P2P_{2}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P1P_{1} acts as one of the sender to send βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}. – If dealer is P3P_{3}, SΠsh4P1\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{1}} sets v=0\mathsf{v}=0 by assigning βv=αv\beta_{\mathsf{v}}=\alpha_{\mathsf{v}}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pk\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{k}} where P1P_{1} acts as the receiver for receiving βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}.

The case for corrupt P3P_{3} is given in Fig. 48. \justify Preprocessing: SΠsh4P3\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{3}} emulates Fsetup4\mathcal{F}_{\mathsf{setup4}} and gives the keys (k03,k13,k23,k013,k023,k123(k_{03},k_{13},k_{23},k_{013},k_{023},k_{123} and kP)k_{\mathcal{P}}) to A\mathcal{A}. The values that are commonly held with A\mathcal{A} are sampled using the respective keys, while others are sampled randomly. \justify Online: – If dealer is P3P_{3}, SΠsh4P3\mathcal{S}_{\Pi_{\mathsf{sh4}}}^{P_{3}} receives βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}} from A\mathcal{A} on behalf of P0P_{0}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P3P_{3} acts as one of the sender with P1P_{1}, P2P_{2} as the receivers, separately. – If dealer is P0P_{0} or P1P_{1} or P2P_{2}, steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pl\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{l}} where P3P_{3} acts as the server outside the computation.

C.2.3 Multiplication Protocol

The case for corrupt P0P_{0} is given in Fig. 49. \justify Preprocessing: – SΠmult4P0\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{0}} samples [αz]1,[αz]2,[Γxy]1\left[\alpha_{\mathsf{z}}\right]_{1},\left[\alpha_{\mathsf{z}}\right]_{2},\left[\Gamma_{\mathsf{x}\mathsf{y}}\right]_{1} using the respective keys with A\mathcal{A}. SΠmult4P0\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{0}} samples γz,ψ,r\gamma_{\mathsf{z}},\psi,\mathsf{r} randomly on behalf of the respective honest parties, and computes [Γxy]2\left[\Gamma_{\mathsf{x}\mathsf{y}}\right]_{2} honestly. – Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P0P_{0} acts as one of the sender for sending [Γxy]2\left[\Gamma_{\mathsf{x}\mathsf{y}}\right]_{2}. – SΠmult4P0\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{0}} computes [χ]1,[χ]2\left[\chi\right]_{1},\left[\chi\right]_{2} honestly. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pk\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{k}} where P0P_{0} acts as the receiver for [χ]1,[χ]2\left[\chi\right]_{1},\left[\chi\right]_{2}. \justify Online: – SΠmult4P0\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{0}} computes [βz⋆]1,[βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1},\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2} honestly. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pj\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{j}} where P0P_{0} acts as one of the sender for sending [βz⋆]1,[βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1},\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2}. – SΠmult4P0\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{0}} computes βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pk\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{k}} where P0P_{0} acts as the receiver for receiving βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}}.

The case for corrupt P1P_{1} is given in Fig. 50. The case for a corrupt P2P_{2} is similar. \justify Preprocessing: – SΠmult4P1\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{1}} samples [αz]1,γz,ψ,r,[Γxy]1\left[\alpha_{\mathsf{z}}\right]_{1},\gamma_{\mathsf{z}},\psi,\mathsf{r},\left[\Gamma_{\mathsf{x}\mathsf{y}}\right]_{1} using the respective keys with A\mathcal{A}. SΠmult4P1\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{1}} samples [αz]2\left[\alpha_{\mathsf{z}}\right]_{2} randomly on behalf of the respective honest parties. – Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pl\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{l}} where P1P_{1} acts as the server outside the computation while communicating [Γxy]2\left[\Gamma_{\mathsf{x}\mathsf{y}}\right]_{2}. – SΠmult4P1\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{1}} computes [χ]1\left[\chi\right]_{1}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P1P_{1} acts as one of the sender for [χ]1\left[\chi\right]_{1}. – Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pl\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{l}} where P1P_{1} acts as the server outside the computation while communicating [χ]2\left[\chi\right]_{2}. \justify Online: – SΠmult4P1\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{1}} computes [βz⋆]1,[βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1},\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} and SΠjmp4Pk\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{k}}, where P1P_{1} acts as one of the sender for sending [βz⋆]1\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1}, and P1P_{1} acts as the receiver for receiving [βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2}, respectively. – SΠmult4P1\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{1}} computes βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P1P_{1} acts as one of the sender for sending βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}}.

The case for corrupt P3P_{3} is given in Fig. 51. \justify Preprocessing: – SΠmult4P3\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{3}} samples [αz]1,[αz]2,γz,ψ,r,[Γxy]1\left[\alpha_{\mathsf{z}}\right]_{1},\left[\alpha_{\mathsf{z}}\right]_{2},\gamma_{\mathsf{z}},\psi,\mathsf{r},\left[\Gamma_{\mathsf{x}\mathsf{y}}\right]_{1} using the respective keys with A\mathcal{A}. SΠmult4P3\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{3}} computes [Γxy]2\left[\Gamma_{\mathsf{x}\mathsf{y}}\right]_{2} honestly. – Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pj\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{j}} where P3P_{3} acts as one of the sender for sending [Γxy]2\left[\Gamma_{\mathsf{x}\mathsf{y}}\right]_{2}. – SΠmult4P3\mathcal{S}_{\Pi_{\mathsf{mult4}}}^{P_{3}} computes [χ]1,[χ]2\left[\chi\right]_{1},\left[\chi\right]_{2}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pj\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{j}} where P3P_{3} acts as one of the sender for sending [χ]1\left[\chi\right]_{1} and [χ]2\left[\chi\right]_{2}. \justify Online: – Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pl\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{l}} where P3P_{3} acts as the server outside the computation involving [βz⋆]1,[βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1},\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2} and βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}}.

C.2.4 Reconstruction Protocol

The case for corrupt P0P_{0} is given in Fig. 52. The cases for corrupt P1,P2,P3P_{1},P_{2},P_{3} are similar. \justify – SΠrec4P0\mathcal{S}_{\Pi_{\mathsf{rec4}}}^{P_{0}} sends γv\gamma_{\mathsf{v}} to A\mathcal{A} on behalf of P1,P2P_{1},P_{2}, and H(γv)\mathsf{H}(\gamma_{\mathsf{v}}) on behalf of P3P_{3}, respectively. – SΠrec4P0\mathcal{S}_{\Pi_{\mathsf{rec4}}}^{P_{0}} receives H([αv]1),H([αv]2),βv+γv\mathsf{H}(\left[\alpha_{\mathsf{v}}\right]_{1}),\mathsf{H}(\left[\alpha_{\mathsf{v}}\right]_{2}),\beta_{\mathsf{v}}+\gamma_{\mathsf{v}} from A\mathcal{A} on behalf of P2,P1,P3P_{2},P_{1},P_{3}, respectively.

C.2.5 Joint Sharing Protocol

The case for corrupt P0P_{0} is given in Fig. 53. \justify Preprocessing: – SΠjsh4P0\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{0}} has knowledge of αv\alpha_{\mathsf{v}} and γv\gamma_{\mathsf{v}}, which it obtains while emulating Fsetup4\mathcal{F}_{\mathsf{setup4}}. The common values shared with the A\mathcal{A} are sampled using the appropriate shared keys, while other values are sampled at random. \justify Online: – If dealers are (P0,P1)(P_{0},P_{1}): SΠjsh4P0\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{0}} computes βv\beta_{\mathsf{v}} using v\mathsf{v}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pj\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{j}} where P0P_{0} acts as one of the sender for βv\beta_{\mathsf{v}}. – If dealers are (P0,P2)(P_{0},P_{2}) or (P0,P3)(P_{0},P_{3}): Analogous to the above case. – If dealers are (P1,P2)(P_{1},P_{2}): SΠjsh4P0\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{0}} sets v=0\mathsf{v}=0 and βv=[αv]1+[αv]2\beta_{\mathsf{v}}=\left[\alpha_{\mathsf{v}}\right]_{1}+\left[\alpha_{\mathsf{v}}\right]_{2}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pk\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{k}} where P0P_{0} acts as the receiver for βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}. – If dealers are (P3,P1)(P_{3},P_{1}): SΠjsh4P0\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{0}} sets v=0\mathsf{v}=0 and βv=[αv]1+[αv]2\beta_{\mathsf{v}}=\left[\alpha_{\mathsf{v}}\right]_{1}+\left[\alpha_{\mathsf{v}}\right]_{2}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pl\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{l}} where P0P_{0} acts as the server outside the computation for βv\beta_{\mathsf{v}}, and according to SΠjmp4Pk\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{k}} where P0P_{0} acts as the receiver for βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}. – If dealers are (P3,P2)(P_{3},P_{2}): Analogous to the above case.

The case for corrupt P1P_{1} is given in Fig. 54. The case for corrupt P2P_{2} is similar. \justify Preprocessing: – SΠjsh4P1\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{1}} has knowledge of α\alpha-values and γ\gamma corresponding to v\mathsf{v} which it obtains while emulating Fsetup4\mathcal{F}_{\mathsf{setup4}}. The common values shared with the A\mathcal{A} are sampled using the appropriate shared keys, while other values are sampled at random. \justify Online: – If dealers are (P0,P1)(P_{0},P_{1}): SΠjsh4P1\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{1}} computes βv\beta_{\mathsf{v}} using v\mathsf{v}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P1P_{1} acts as one of the sender for βv\beta_{\mathsf{v}}. – If dealers are (P1,P2)(P_{1},P_{2}): Analogous to the previous case, except that now βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}} is sent instead of βv\beta_{\mathsf{v}}. – If dealers are (P3,P1)(P_{3},P_{1}): SΠjsh4P1\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{1}} computes βv\beta_{\mathsf{v}} and βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P1P_{1} acts as one of the sender for βv\beta_{\mathsf{v}}, βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}. – If dealers are (P0,P2)(P_{0},P_{2}) or (P0,P3)(P_{0},P_{3}) or (P3,P2)(P_{3},P_{2}): SΠjsh4P1\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{1}} sets v=0\mathsf{v}=0 and βv=[αv]1+[αv]2\beta_{\mathsf{v}}=\left[\alpha_{\mathsf{v}}\right]_{1}+\left[\alpha_{\mathsf{v}}\right]_{2}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pk\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{k}} where P1P_{1} acts as the receiver for βv\beta_{\mathsf{v}}.

The case for corrupt P3P_{3} is given in Fig. 55. \justify Preprocessing: – SΠjsh4P3\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{3}} has knowledge of α\alpha-values and γ\gamma corresponding to v\mathsf{v} which it obtains while emulating Fsetup4\mathcal{F}_{\mathsf{setup4}}. The common values shared with the A\mathcal{A} are sampled using the appropriate shared keys, while other values are sampled at random. \justify Online: – If dealers are (P1,P2)(P_{1},P_{2}): SΠjsh4P3\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{3}} sets v=0\mathsf{v}=0. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pl\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{l}} where P3P_{3} acts as the server outside the computation for βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}. – If dealers are (P0,P1)(P_{0},P_{1}) or (P0,P2)(P_{0},P_{2}): Analogous to the above case. – If dealers are (P0,P3)(P_{0},P_{3}): SΠjsh4P3\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{3}} computes βv\beta_{\mathsf{v}} using v\mathsf{v}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P3P_{3} acts as one of the sender for sending βv\beta_{\mathsf{v}}. – If dealers are (P3,P1)(P_{3},P_{1}): SΠjsh4P3\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{3}} computes βv\beta_{\mathsf{v}} and βv+γv\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pj\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{j}} where P3P_{3} acts as one of the sender for sending βv,βv+γv\beta_{\mathsf{v}},\beta_{\mathsf{v}}+\gamma_{\mathsf{v}}. – If dealers are (P3,P2)(P_{3},P_{2}): Analogous to the above case.

C.2.6 Dot Product Protocol

The case for corrupt P0P_{0} is given in Fig. 56. \justify Preprocessing: – SΠdotp4P0\mathcal{S}_{\Pi_{\mathsf{dotp4}}}^{P_{0}} samples [αz]1,[αz]2,[Γx⃗⊙y⃗]1\left[\alpha_{\mathsf{z}}\right]_{1},\left[\alpha_{\mathsf{z}}\right]_{2},\left[\Gamma_{\vec{\mathbf{x}}\odot\vec{\mathbf{y}}}\right]_{1} using the respective keys with A\mathcal{A}. SΠdotp4P0\mathcal{S}_{\Pi_{\mathsf{dotp4}}}^{P_{0}} samples γz,ψ,r\gamma_{\mathsf{z}},\psi,\mathsf{r} randomly on behalf of the respective honest parties, and computes [Γx⃗⊙y⃗]2\left[\Gamma_{\vec{\mathbf{x}}\odot\vec{\mathbf{y}}}\right]_{2} honestly. – Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pi\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{i}} where P0P_{0} acts as one of the sender for [Γx⃗⊙y⃗]2\left[\Gamma_{\vec{\mathbf{x}}\odot\vec{\mathbf{y}}}\right]_{2}. – SΠdotp4P0\mathcal{S}_{\Pi_{\mathsf{dotp4}}}^{P_{0}} computes χ1,χ2\chi_{1},\chi_{2} honestly. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pk\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{k}} where P0P_{0} acts as the receiver for χ1\chi_{1} and χ2\chi_{2}. \justify Online: – SΠdotp4P0\mathcal{S}_{\Pi_{\mathsf{dotp4}}}^{P_{0}} computes [βz⋆]1,[βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1},\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2} honestly. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pj\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{j}} where P0P_{0} acts as one of the sender for [βz⋆]1,[βz⋆]2\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{1},\left[\mathsf{\beta}_{\mathsf{z}}^{\star}\right]_{2}. – SΠdotp4P0\mathcal{S}_{\Pi_{\mathsf{dotp4}}}^{P_{0}} computes βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}}. Steps corresponding to Πjmp4\Pi_{\mathsf{jmp4}} are simulated according to SΠjmp4Pk\mathcal{S}_{\Pi_{\mathsf{jmp4}}}^{P_{k}} where P0P_{0} acts as the receiver for βz+γz\beta_{\mathsf{z}}+\gamma_{\mathsf{z}}.

The case for corrupt P1P_{1} is given in Fig. 57. The case for corrupt P2P_{2} is similar.

C.2.7 Truncation Pair Generation

Here we give the simulation steps for Πtrgen4\Pi_{\mathsf{trgen4}}. The case for corrupt P0P_{0} is given in Fig. 59. The case for corrupt P3P_{3} is similar. \justify – SΠtrgen4P0\mathcal{S}_{\Pi_{\mathsf{trgen4}}}^{P_{0}} samples R1,R2R_{1},R_{2} using the respective keys with A\mathcal{A}. – Steps corresponding to Πjsh4\Pi_{\mathsf{jsh4}} are simulated according to SΠjsh4P0\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{0}} (Fig. 53).

The case for corrupt P1P_{1} is given in Fig. 60. The case for corrupt P2P_{2} is similar. \justify – SΠtrgen4P1\mathcal{S}_{\Pi_{\mathsf{trgen4}}}^{P_{1}} samples R1R_{1} using the respective keys with A\mathcal{A}, and samples R2R_{2} randomly. – Steps corresponding to Πjsh4\Pi_{\mathsf{jsh4}} are simulated according to SΠjsh4P1\mathcal{S}_{\Pi_{\mathsf{jsh4}}}^{P_{1}} (Fig. 54).