This is a description of (basic version of) the BGW protocol following the original paper. A full proof can be found here.
Consider ${ n }$ parties ${ P _0, \ldots, P _{n-1} }$ (with secure pairwise communication channels) with private inputs
$${ \vec{x} = (x _0, \ldots, x _{n-1}) }$$
respectively. Their goal is to evaluate a public function
$${ F ( \vec{x} ) = (F _0 (\vec{x}), \ldots, F _{n-1} (\vec{x})) }$$
in such a way that at the end each ${ P _i }$ additionally learns ${ F _i (\vec{x}) }$ and nothing else.
A protocol for computing a function is a specification of ${ n }$ programs, one for each of the parties.
Two kinds of faults can occur: “Gossip” (involving semi-honest adversaries) and “Byzantine” (involving malicious adversaries). We can focus on the former, where faulty parties send messages according to their predetermined programs, but try to learn as much as they can by sharing with each other the information they received.
A protocol is ${ t -}$private if any set of atmost ${ t }$ parties cannot compute after the protocol more than they could jointly compute solely from their set of private inputs and outputs.
In this setup, we have:
Thm: For every function ${ F }$ and ${ t < \frac{n}{2} ,}$ there is a ${ t-}$private protocol.
Proof:
We are given ${ n > 2 t }$ that is ${ n \geq 2 t + 1 .}$ WLOG say the inputs ${ x _i \in \mathbb{E} }$ for some finite field ${ \mathbb{E} }$ with ${ \vert \mathbb{E} \vert > n },$ and ${ F }$ is a polynomial function over ${ \mathbb{E} .}$ So there is an arithmetic circuit computing ${ F }$ using ${ +, \times }$ and the constants from ${ \mathbb{E} .}$
The BGW protocol happens in ${ 3 }$ stages:
- Input stage: Each party enters its input using a secret sharing procedure.
- Computation stage: The parties simulate the arithmetic circuit for ${ F ,}$ gate by gate, keeping the value of each computed gate as a secret shared by all parties.
- Output stage: The secret shares of the final value of ${ F }$ are revealed to one party.
Input stage: Fix distinct nonzero values ${ \alpha _0, \ldots, \alpha _{n-1} \in \mathbb{E} .}$ Now each party holding a private input ${ s \in \mathbb{E} }$ introduces it into the computation by doing the following:
- Select random elements ${ a _1, \ldots, a _t \in \mathbb{E} }$ and consider the polynomial $${ f(x) = s + a _1 x + \ldots + a _t x ^t .}$$
- Send to each party ${ P _i }$ the share ${ s _i = f(\alpha _i) .}$
Output stage: During the whole computation, each gate which evaluates to some ${ s \in \mathbb{E} }$ is considered evaluated by the parties if ${ s }$ is shared amongst the parties via a random polynomial ${ f(x) }$ of degree ${ t }$ with the only restriction that ${ f(0) = s .}$
At the end of the computation, we will have the value of ${ F }$ shared amongst the parties in a similar way. All the parties can send their shares to a particular party, and to it the final output is revealed.
Computation stage: Let ${ a, b \in \mathbb{E} }$ be two secrets shared via polynomials ${ f(x), g(x) }$ respectively. It is enough to show how the parties can compute (in the sense described above) values ${ a + b, }$ ${ a \cdot b }$ and ${ c \cdot a }$ (where ${ c \in \mathbb{E} }$ is a nonzero constant).
Note addition and scalar multiplication are trivial to perform. If ${ f(x), g(x) }$ encode ${ a,b }$ respectively then ${ f(x)+g(x), c \cdot f(x) }$ encode ${ a + b, c \cdot a }$ respectively. So for example to compute ${ a + b ,}$ each party ${ P _i }$ holding the shares ${ f(\alpha _i ) , g(\alpha _i) }$ can compute ${ f(\alpha _i) + g(\alpha _i) }$ and this will be its share of ${ a + b .}$
It is left to show how multiplication ${ a \cdot b }$ is performed (as asked by the OP).
Note ${ h(x) = f(x)g(x) }$ is a bad choice of a polynomial to encode ${ a \cdot b ,}$ because its degree is ${ 2 t }$ and more importantly because the non-free coefficients are not random (for eg ${ h(x) }$ is known to be a reducible polynomial). We remedy the problem by introducing randomness to the non-free coefficients, and reducing the degree of encoding polynomial from ${ 2t }$ to ${ t .}$
To randomise the non-free coefficients: Each party ${ P _i }$ selects a random polynomial ${ q _i (x) }$ of degree ${ 2 t }$ with zero free coefficient, and distributes its shares amongst the parties. Now the polynomial
$${ h(x) := f(x)g(x) + \sum _{i=0} ^{n-1} q _i (x) }$$
is a degree ${ 2t }$ polynomial with free coefficient ${ a \cdot b }$ and random non-free coefficients. Each party ${ P _i }$ is equipped with the share ${ h(\alpha _i) }$ as well. The only problem now is that the degree is ${ 2 t }$ instead of ${ t ,}$ which will be remedied by truncation.
The goal now is to truncate ${ h(x) }$ of degree ${ 2 t }$ to ${ \tilde{h}(x) }$ of degree ${ t ,}$ and equip each party ${ P _i }$ with its share ${ \tilde{h} (\alpha _i) .}$
The natural truncation of ${ h(x) = h _0 + h _1 x + \ldots + h _{2t} x ^{2t} }$ is
$${ \tilde{h}(x) = h _0 + h _1 x + \ldots + h _t x ^t .}$$
Now shares
$${ \begin{align*} &\quad (\tilde{h}(\alpha _0), \ldots, \tilde{h}(\alpha _{n-1}) ) \\ &= (h _0, \ldots, h _t, 0, \ldots, 0) \underbrace{\begin{pmatrix} 1 &1 &\ldots &1 \\ \alpha _0 &\alpha _1 &\ldots &\alpha _{n-1} \\ \vdots &\vdots &\ddots &\vdots \\ \alpha _0 ^{n-1} &\alpha _1 ^{n-1} &\ldots &\alpha _{n-1} ^{n-1} \end{pmatrix}} _{=: V} \\ &= (h _0, \ldots, h _{2t}, 0, \ldots, 0) \underbrace{\begin{pmatrix} I _{t+1} &0 \\ 0 &0 \end{pmatrix}} _{=: P} V \\ &= (h (\alpha _0), \ldots, h(\alpha _{n-1})) \, V ^{-1} P V \end{align*} . }$$
We already have ${ (h(\alpha _0), \ldots, h(\alpha _{n-1})) }$ distributed such that each party ${ P _i }$ has its private share ${ h(\alpha _i) .}$ By the manipulation above, we can compute ${ (\tilde{h}(\alpha _0), \ldots, \tilde{h}(\alpha _{n-1})) }$ in such a way that each party ${ P _i }$ is revealed its private share ${ \tilde{h}(\alpha _i) }.$
Finally ${ a \cdot b }$ is encoded by the degree ${ t }$ polynomial ${ \tilde{h}(x) }$ with random non-free coefficients, and has its shares ${ \tilde{h}(\alpha _i) }$ distributed, as needed.
While there are n coefficients, as discussed before this polynomial (uniquely determined from c⃗ ) is of degree 2t, so the higher-order coefficients are 0.
Are you sure this is the case? Can you elaborate further? I know this is mentioned in the link provided but it doesn't make sense to me. – tur11ng Jun 29 '22 at 10:32