emp-sh2pc icon indicating copy to clipboard operation
emp-sh2pc copied to clipboard

Does sh2pc do garbled circuit?

Open tomato990 opened this issue 4 years ago • 4 comments

I am looking at circuit_file.cpp and try to understand how sh2pc works. In circuit_file.cpp, Alice and Bob tries to compute AES function together, but it seems they do not run it on a garbled circuit or ot. Instead, they run on a straight-forward circuit evaluation. I do not know whether it can be defined as semi-honest, since either Bob or Alice can easily learn the other's secret in the test function. Is there any hint?

tomato990 avatar Dec 06 '21 18:12 tomato990

It is done using garbled circuits and OT. You need to look into emp-tool and emp-ot for these components as well.

wangxiao1254 avatar Dec 06 '21 18:12 wangxiao1254

It is done using garbled circuits and OT. You need to look into emp-tool and emp-ot for these components as well.

Now I understand that it is doing OT and Garbled circuit. Thank you.

I have a quick follow-up question for garbling AES. Will the efficiency be improved a lot if Alice sends all garbled circuit tables to Bob first and let Bob evaluate the circuit offline instead of sending tables for each AND gate during the evaluation? It seems that it can make much much fewer round trips.

tomato990 avatar Dec 09 '21 16:12 tomato990

the protocol is constant round regardless of how the data is sent. Sending a lot of data all at once will only make it slower because now when the garbling is done, the evaluator is just waiting and not doing anything.

wangxiao1254 avatar Jan 13 '22 18:01 wangxiao1254

io->send(xx, 1); io->send(xx, 1) has the same round complexity as io->send(xx, 2)

wangxiao1254 avatar Jan 13 '22 18:01 wangxiao1254