private byte[][] RunObliviousTransferReceiverParty(BitArray selectionBits) { using (CryptoContext cryptoContext = CryptoContext.CreateDefault()) { using (ITwoPartyNetworkSession session = TestNetworkSession.EstablishTwoParty()) { ITwoChoicesObliviousTransferChannel baseOT = new StatelessTwoChoicesObliviousTransferChannel(new InsecureObliviousTransfer(), session.Channel); ITwoChoicesRandomObliviousTransferChannel obliviousTransfer = new TwoChoicesRandomExtendedObliviousTransferChannel(baseOT, 8, cryptoContext); return(obliviousTransfer.ReceiveAsync(selectionBits, selectionBits.Length, NumberOfMessageBytes).Result); } } }
private Pair <byte[]>[] RunObliviousTransferSenderParty(int numberOfInvocations) { using (CryptoContext cryptoContext = CryptoContext.CreateDefault()) { using (ITwoPartyNetworkSession session = TestNetworkSession.EstablishTwoParty()) { ITwoChoicesObliviousTransferChannel baseOT = new StatelessTwoChoicesObliviousTransferChannel(new InsecureObliviousTransfer(), session.Channel); ITwoChoicesRandomObliviousTransferChannel obliviousTransfer = new TwoChoicesRandomExtendedObliviousTransferChannel(baseOT, 8, cryptoContext); return(obliviousTransfer.SendAsync(numberOfInvocations, NumberOfMessageBytes).Result); } } }