public class OTExtensionMaliciousSender extends java.lang.Object implements Malicious, OTBatchSender
The base OT is done once in the construction time. After that, the transfer function will be always optimized and fast, no matter how much OT's there are. There are three versions of OT extension: General, Correlated and Random. The difference between them is the way of getting the inputs:
In general OT extension both x0 and x1 are given by the user.
In Correlated OT extension the user gives a delta array and x0, x1 arrays are chosen such that x0 = delta^x1.
In random OT extension both x0 and x1 are chosen randomly.
To allow the user decide which OT extension's version he wants, each option has a corresponding input class.
The particular OT extension version is executed according to the given input instance; For example, if the user gave as input an instance of OTExtensionRandomSInput than the random OT Extension will be execute.
NOTE: Unlike a regular implementation the connection is done via the native code and thus the channel provided in the transfer function is ignored.
|Constructor and Description|
A constructor that creates the native sender with communication abilities.
|Modifier and Type||Method and Description|
Deletes the native OT object, ideally the resources were already released explicitly.
Deletes the native OT object.
The overloaded function that runs the protocol.
public OTExtensionMaliciousSender(java.lang.String bindAddress, int listeningPort, int numOfThreads, int numBaseOts, int numOts)
The construction runs the base OT phase. Further calls to transfer function will be optimized and fast, no matter how much OTs there are. THE SENDER ACTS AS THE SERVER!!!
bindAddress- the ip of this party.
listeningPort- the port of this party.
numBaseOts- base ots in the ot extension
numOts- number of ots to do in parallel
public OTExtensionMaliciousSender(java.lang.String bindAddress, int listeningPort, int numOts)
The construction runs the base OT phase. Further calls to transfer function will be optimized and fast, no matter how much OTs there are.
bindAddress- The address of this party
listeningPort- the port of this party
numOts- the number of ots to do in parallel
public OTBatchSOutput transfer(Channel channel, OTBatchSInput input)
After the base OT was done by the constructor, call to this function will be optimized and fast, no matter how much OTs there are.
channel- Disregarded. This is ignored since the connection is done in the c++ code.
input- The input for the sender specifying the version of the OT extension to run. Every call to the transfer function can run a different OT extension version.
public void releaseResources()
public void finalize() throws java.lang.Throwable