I have been looking for a concrete example of GMW protocol for two parties. I was trying with the following example for computing $XOR$ of two parties:
- A's secret bit is $a = 0$, B's secret bit is $b = 1$.
- A chooses a random string of length 2, namely $a_1a_2 = 00$, so that $a = a_1 \oplus a_2 = 0 \oplus 0 = 0$. B does the same, his secret string is $b_1b_2 = 01$, so that $b = b_1 \oplus b_2 = 1$.
- A sends the second bit of her secret string, $a_2$ to B. B sends the first part of his secret string $b_1$ to A.
- A now has $a = 0, a_1 = 0, b_1 = 0$. B has $b = 1, a_2 = 0, b_2 = 1$.
- Now, GMW protocol says that A and B can locally compute $c_i = a_i \oplus b_i$ and the result should be same for both. However, as you can clearly see, in this particular example, they are not the same. A's xor is 0, B's is 1.
I think I have a misunderstanding somewhere, but I don't know where. Help, please?