/** * Creates a new {@link CopeInputter} and initializes the COPE protocol. * * <p>This will run the initialization sub-protocol of COPE using an OT protocol to set up the PRG * seeds used in the <i>Extend</i> sub-protocol.</p> */ public CopeInputter(MascotResourcePool resourcePool, Network network, int otherId) { this.otherId = otherId; this.resourcePool = resourcePool; this.network = network; this.leftPrgs = new ArrayList<>(); this.rightPrgs = new ArrayList<>(); this.helper = new MultiplyRightHelper(resourcePool, network, otherId); seedPrgs(helper.generateSeeds(1, resourcePool.getLambdaSecurityParam())); }
/** * Creates new cope signer. * * <p>This will run the initialization sub-protocol of COPE using an OT protocol to set up the PRG * seeds used in the <i>Extend</i> sub-protocol.</p> * * @param resourcePool The resource pool for the protocol * @param network the network to use for communication * @param otherId the id of the other party * @param macKeyShare this party's share of the mac key */ public CopeSigner(MascotResourcePool resourcePool, Network network, int otherId, FieldElement macKeyShare) { this.otherId = otherId; this.resourcePool = resourcePool; this.network = network; this.macKeyShare = macKeyShare; this.multiplier = new MultiplyLeftHelper(resourcePool, network, otherId); this.prgs = new ArrayList<>(); seedPrgs(multiplier.generateSeeds(macKeyShare, resourcePool.getLambdaSecurityParam())); }