Consider 3 parties, Alice, Bob and Charlie. Suppose each party has a bit as input, i.e. Alice, Bob and Charlie hold $a, b, c \in \{0, 1\}$ respectively. Show how construct a scheme with which they can compute the function $f (a, b, c) = a + b + c$$f (a, b, c) = a \oplus b \oplus c$ such that the following are satisfied:
(1) All parties learn $f(a, b, c)$ at the end.
(2) No party can learn more about the other party's input than what they can infer from $f(a, b, c)$ and choosing their own input wisely.
My attempt: A chooses $r_1,r_2\in\{0,1\}$, B chooses $s_1,s_2,\in\{0,1\}$, and C chooses $t_1,t_2\in\{0,1\}$ randomly. Then dealer of respective secrets (bold) distribute 3 shares to each party in the following manner.
$A: \it{\bf{a\oplus r_1 \oplus r_2}}, s_1, t_1$
$B: r_1, \it{\bf{b\oplus s_1 \oplus s_2}}, t_2$
$C: r_2, s_2, \it{\bf{c\oplus t_1 \oplus t_2}}$.
To reconstruct the secret $a\oplus b\oplus c$, they can compute their sum of shares,
$A: (a\oplus r_1 \oplus r_2)\oplus s_1\oplus t_1$
$B: r_1\oplus( b\oplus s_1 \oplus s_2)\oplus t_2$
$C: r_2\oplus s_2\oplus( c\oplus t_1 \oplus t_2)$.