I have two questions I couldn't find straightforward answers to after many searches.
(1) We can perform 2-party MPC over arbitrary functions using Garbled Circuit. To do that, we first need to convert a function to a boolean circuit and then garble it. Is there any tool available where we can convert any arbitrary function to a boolean circuit? Say I want to sort three numbers from a given input. How can I convert this function to a boolean circuit?
(2) How do conditional statements work in the boolean circuit? I understand mux or X switch and Y switch operations can be done for simple operations like if (c) swap(a,b) can be done. But how it works in the case of multiple statements?
E.g, I have three numbers a, b, c. The operation I want to perform is like below:
func(a,b,c): if c == 1: c = a + b a = 2 * c b = 2 * a else a = 0 b = 0
What will the above function look like in boolean circuits? Please give me references if available.