
org.factcenter.fastgc.OT.Sender Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of inchworm Show documentation
Show all versions of inchworm Show documentation
Secure computation, one step at a time.
The newest version!
// Copyright (C) 2010 by Yan Huang
package org.factcenter.fastgc.OT;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.math.BigInteger;
public abstract class Sender {
protected int numOfPairs;
protected int msgBitLength;
protected BigInteger[][] msgPairs;
protected ObjectInputStream ois;
protected ObjectOutputStream oos;
public Sender(int numOfPairs, int msgBitLength, ObjectInputStream in,
ObjectOutputStream out) {
this.numOfPairs = numOfPairs;
this.msgBitLength = msgBitLength;
ois = in;
oos = out;
}
public void execProtocol(BigInteger[][] msgPairs) throws IOException {
if (msgPairs.length != numOfPairs)
throw new IOException("Message pair length error: " + msgPairs.length
+ " != " + numOfPairs);
this.msgPairs = msgPairs;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy