With the Free-XOR optimization, the bottleneck of garbled circuit is to handle
AND gates. Row reduction aims to reduce the number of ciphertexts of each
garbled AND gate. More specifically, it reduces 4 ciphertexts into 3. The
optimization is given in the
NPS99 paper.
To be compatible with the Free-XOR optimization, the garbled AND gates are of
the following form (still use the example in the point-and-permute
optimization).
| Color Bits (a,b,c) | Garbled Gate |
|---|
| (0,0,0) | H(Xa,Xb⊕Δ)⊕Xc |
| (0,1,0) | H(Xa,Xb)⊕Xc |
| (1,0,1) | H(Xa⊕Δ,Xb⊕Δ)⊕Xc⊕Δ |
| (1,1,0) | H(Xa⊕Δ,Xb)⊕Xc |
Since H is modeled as a random oracle, one could set the first row of the
above garbled gate as 0, and then we could remove that row from the garbled
gate. This means that we could choose Xc=H(Xa,Xb⊕Δ).
Therefore, the garbled circuit is changed as follows.
| Color Bits (a,b,c) | Garbled Gate |
|---|
| (0,1,0) | H(Xa,Xb)⊕H(Xa,Xb⊕Δ) |
| (1,0,1) | H(Xa⊕Δ,Xb⊕Δ)⊕H(Xa,Xb⊕Δ)⊕Δ |
| (1,1,0) | H(Xa⊕Δ,Xb)⊕H(Xa,Xb⊕Δ) |
The evaluator handles garbled AND gates as before, except he/she directly
computes the hash function if the color bits are (0,0).