public class IdentityGate
The identity gates are used in the extended circuit.
There are cases when the user want to set the input and/or output keys (which are the garbled values of 0/1 for each wire).
In that cases, the extended circuit adds to the composed circuit identity gates for each input and output wires.
This way, if the user gave input keys, there are input identity gates for each input wire w, with input wire indexed -(w+1) and output wire w.
If the user gave output keys, there are output identity gates for each output wire w, with input wire indexed w and output wire -(w+1).
Notice that for the composed circuit the input and output wires remain the same.
The identity gates maps the 0 input key to the 0 output key, and the 1 input key to the 1 output key.
Cryptography and Computer Security Research Group Department of Computer Science Bar-Ilan University (Moriya Farbstein)