Here's how this works as a protocol--we have two participants.
We'll call Alice the generator--that means she is going to make the circuit,
and Bob the evaluator--that means he's going to evaluate the circuit.
At the beginning of the protocol, they've agreed on some circuit they want to evaluate.
For this to be interesting would be much larger than that.
It takes inputs from both Bob and from Alice.
Alice is going to generate a garble table for each one of these logic gates in the circuit,
and send the garbled circuit to Bob.
She is also going to send her input values, but because they're
random nonces Bob can't tell what they mean.
Bob's going to evaluate the circuit using the garbled circuit protocol
decrypting one entry from each of these.
At the end of this, Bob's going to get some output values.
Then they're going to do something to turn that into the semantic value,
which possibly Bob receives, possibly Alice receives.
We can design the protocol either way.
I am not going to talk about that final step of how you turn the encrypted values
at the end of the circuit into meaningful values.
We'll leave that as a question for your exam.
But there is one more question that I do need to talk about.
That's the question of how does Bob obtain his inputs to the circuit.
To evaluate these tables, Bob needs to have both Alice's inputs and his inputs.
Here are the choices. Bob could generate them himself.
He could ask Alice to provide his inputs.
He could ask Alice for both possible values for all these wire labels,
and then select the right one corresponding to his inputs.
Or none of these possibilities actually work.
