Skip to main content

Row Reduction

With the Free-XOR optimization, the bottleneck of garbled circuit is to handle AND\and gates. Row reduction aims to reduce the number of ciphertexts of each garbled AND\and gate. More specifically, it reduces 44 ciphertexts into 33. The optimization is given in the NPS99 paper.

To be compatible with the Free-XOR optimization, the garbled AND\and gates are of the following form (still use the example in the point-and-permute optimization).

Color Bits (a,b,c)(a,b,c)Garbled Gate
(0,0,0)(\zero,\zero,\zero)H(Xa,XbΔ)Xc\sH(X_a,X_b\oplus \Delta)\oplus X_c
(0,1,0)(\zero,\one,\zero)H(Xa,Xb)Xc\sH(X_a,X_b)\oplus X_c
(1,0,1)(\one,\zero,\one)H(XaΔ,XbΔ)XcΔ\sH(X_a\oplus \Delta,X_b\oplus \Delta)\oplus X_c\oplus \Delta
(1,1,0)(\one,\one,\zero)H(XaΔ,Xb)Xc\sH(X_a\oplus \Delta,X_b)\oplus X_c

Since H\sH is modeled as a random oracle, one could set the first row of the above garbled gate as 00, and then we could remove that row from the garbled gate. This means that we could choose Xc=H(Xa,XbΔ)X_c = \sH(X_a,X_b\oplus \Delta). Therefore, the garbled circuit is changed as follows.

Color Bits (a,b,c)(a,b,c)Garbled Gate
(0,1,0)(\zero,\one,\zero)H(Xa,Xb)H(Xa,XbΔ)\sH(X_a,X_b)\oplus \sH(X_a,X_b\oplus \Delta)
(1,0,1)(\one,\zero,\one)H(XaΔ,XbΔ)H(Xa,XbΔ)Δ\sH(X_a\oplus \Delta,X_b\oplus \Delta)\oplus \sH(X_a,X_b\oplus \Delta)\oplus \Delta
(1,1,0)(\one,\one,\zero)H(XaΔ,Xb)H(Xa,XbΔ)\sH(X_a\oplus \Delta,X_b)\oplus \sH(X_a,X_b\oplus \Delta)

The evaluator handles garbled AND\and gates as before, except he/she directly computes the hash function if the color bits are (0,0)(\zero,\zero).