# Secure two-party computation

Secure two-party computation (2PC) is sub-problem of secure multi-party computation (MPC) that has received special attention by researchers because of its close relation to many cryptographic tasks. The goal of 2PC is to create a generic protocol that allows two parties to jointly compute an arbitrary function on their inputs without sharing the value of their inputs with the opposing party. One of the most well known examples of 2PC is Yao's millionaire problem, in which two parties, Alice and Bob, are millionaires who wish to determine who is wealthier without revealing their wealth. Formally, Alice has wealth ${\displaystyle a}$, Bob has wealth ${\displaystyle b}$, and they wish to compute ${\displaystyle a\geq b}$ without revealing the values ${\displaystyle a}$ or ${\displaystyle b}$.

Yao's garbled circuit protocol for two-party computation [1] only provided security against passive adversaries. 2PC protocols that are secure against active adversaries were proposed by Lindell and Pinkas,[2] Ishai, Prabhakaran and Sahai [3] and Nielsen and Orlandi.[4] Another solution for this problem, that explicitly works with committed input was proposed by Jarecki and Shmatikov.[5]

## Security

The security of a two-party computation protocol is usually defined through a comparison with an idealised scenario that is secure by definition. The idealised scenario involves a trusted party that collects the input of the two parties over secure channels and returns the result if none of the parties chooses to abort. The cryptographic two-party computation protocol is secure, if it behaves no worse than this ideal protocol, but without the additional trust assumptions. This is usually modeled using a simulator. The task of the simulator is to act as a wrapper around the idealised protocol to make it appear like the cryptographic protocol. The simulation succeeds with respect to an information theoretic, respectively computationally bounded adversary if the output of the simulator is statistically close to, respectively computationally indistinguishable from the output of the cryptographic protocol. A two-party computation protocol is secure, if for all adversaries there exists a successful simulator.