public interface GarbledGate
StandardGarbledGate's and any specialized or optimized garbled gate will implement.
This will allow the correct method to be caused in cases in which we are dealing with different types of optimized Gates.
For example, say that we are using the Free-XOR technique. In this case, we will have a mixture of
FreeXORGates. We will use this interface so that we can access both of them without knowing ahead of time which one we will be given.
|Modifier and Type||Method and Description|
Computes the output of this gate and sets the output wire(s) to that value.
This method tests an ungarbled
void compute(java.util.Map<java.lang.Integer,GarbledWire> computedWires) throws java.security.InvalidKeyException, javax.crypto.IllegalBlockSizeException, CiphertextTooLongException
boolean verify(Gate g, java.util.Map<java.lang.Integer,javax.crypto.SecretKey> allWireValues) throws java.security.InvalidKeyException, javax.crypto.IllegalBlockSizeException, CiphertextTooLongException
Gatefor equality to this
That is, they have the same truth table and indices.
It is called verify since in general, when this method is used, the assumption is that they are equal and we are verifying this assumption.
g- an ungarbled
Gateto be tested for equality to this
allWireValues- contains both keys of all wires.
trueif the gates have the same truth table and indeces, and