public class GarbledWire
extends java.lang.Object
implements java.io.Serializable
Like, a standard Wire
in a nongarbled BooleanCircuit
, a GarbledWire
can carry one of two values.
However, these values, as its name suggests, are garbled. Meaning that the actual boolean value of the wire is encoded and
cannot be determined from the garbled value.
Constructor and Description 

GarbledWire(javax.crypto.SecretKey valueAndSignalBit)
Constructs a
GarbledWire and assigns it a value and signalBit. 
Modifier and Type  Method and Description 

byte 
getSignalBit()
Clarification: The signal bit works as follows:

javax.crypto.SecretKey 
getValueAndSignalBit() 
public GarbledWire(javax.crypto.SecretKey valueAndSignalBit)
GarbledWire
and assigns it a value and signalBit.
The least significant bit of the underlying byte[]
of the SecretKey
is the signal bit.
valueAndSignalBit
 A secretKey containing the GarbledWire
's garbled value.public javax.crypto.SecretKey getValueAndSignalBit()
GarbledWire
, and the least significant bit of the
underlying byte[]
is the signal bit.public byte getSignalBit()
When we are assigning possible values to a wire we have to randomly generate a signal bit.
If the signal bit is 0, then the 0encoding has a 0 as its least significant bit and the 1encoding has a 1.
If the signal bit is a 1, then the 0encoding has a 1 as its least significant bit and the 1 encoding has a 0.
What we are returning here is the last bit on the Wire which we also call the signal bit.
We are not returning the initial signal bit that determined which bit to put on each wire as this information cannot be recovered (if it could be, we would be able to determine the actual value of a garbled wire and thus it would not be garbled.)
See Fairplay  A Secure TwoParty Computation System by Dahlia Malkhi, Noam Nisan, Benny Pinkas, and Yaron Sella. Section 4.2 describes in more detail how the signal bit works.