示例#1
0
 public DkmsProtocol(Circuit circuit, AsyncParty p, IList <int> playerIds,
                     Zp playerInput, int numSlots, StateKey stateKey)
     : base(p, playerIds, stateKey)
 {
     Circuit  = circuit;
     Input    = playerInput;
     Prime    = playerInput.Prime;
     NumSlots = numSlots;
 }
示例#2
0
        public DkmsProtocol(Circuit circuit, AsyncParty p, IList<int> playerIds,
			Zp playerInput, int numSlots, StateKey stateKey)
            : base(p, playerIds, stateKey)
        {
            Circuit = circuit;
            Input = playerInput;
            Prime = playerInput.Prime;
            NumSlots = numSlots;
        }
示例#3
0
        public ByzantineBgwProtocol(AsyncParty e, Circuit circuit, ReadOnlyCollection<int> playerIds,
			Zp playerInput, StateKey stateKey)
            : base(e, circuit, playerIds, playerInput, stateKey)
        {
            throw new NotImplementedException();

            // PolynomialDeg = NumParties % 4 == 0 ? (NumParties / 4 - 1) : (NumParties / 4);
            // Mahdi: Changed to the following since n/3 - 1 of players can be dishonest.
            // degree = n - t, where t is the number of dishonest players
            PolynomialDeg = (int)Math.Floor(2 * NumParties / 3.0);
        }
示例#4
0
        public ByzantineBgwProtocol(AsyncParty e, Circuit circuit, ReadOnlyCollection <int> playerIds,
                                    Zp playerInput, StateKey stateKey)
            : base(e, circuit, playerIds, playerInput, stateKey)
        {
            throw new NotImplementedException();

            // PolynomialDeg = NumParties % 4 == 0 ? (NumParties / 4 - 1) : (NumParties / 4);
            // Mahdi: Changed to the following since n/3 - 1 of players can be dishonest.
            // degree = n - t, where t is the number of dishonest players
            PolynomialDeg = (int)Math.Floor(2 * NumParties / 3.0);
        }
示例#5
0
        public AlmostEverywhereProtocol(AsyncParty e, ReadOnlyCollection<int> processorIds, SafeRandom randGen, StateKey stateKey)
            : base(e, processorIds, stateKey)
        {
            if (randGen == null)
                randUtils = new RandomUtils();
            else
                randUtils = new RandomUtils(randGen);

            var cStr = ConfigurationManager.AppSettings["SampleListSizeFactor"];
            C = cStr == null ? 1 : float.Parse(cStr);
        }
示例#6
0
        public BgwProtocol(Circuit circuit, ReadOnlyCollection <int> pIds,
                           AsyncParty e, Zp pInput, SendHandler send, StateKey stateKey)
            : base(e, pIds, pInput, send, stateKey)
        {
            Debug.Assert(circuit.InputCount == pIds.Count);
            Circuit = circuit;
            Prime   = pInput.Prime;

            // to get the maximum polynomial degree, we should ask if there is a MUL in the circuit
            // Mahdi: This is probably valid only when we assume a reliable broadcast channel.
            //PolynomialDeg = circuit.MultipleContained ? (NumEntities - 1) / 2 : NumEntities - 1;

            // Mahdi: Changed to the following since n/3 - 1 of players can be dishonest.
            // degree = n - t, where t is the number of dishonest players
            PolynomialDeg = (int)Math.Floor(2 * NumParties / 3.0);
        }
示例#7
0
        public AlmostEverywhereProtocol(AsyncParty e, ReadOnlyCollection <int> processorIds, SafeRandom randGen, StateKey stateKey)
            : base(e, processorIds, stateKey)
        {
            if (randGen == null)
            {
                randUtils = new RandomUtils();
            }
            else
            {
                randUtils = new RandomUtils(randGen);
            }

            var cStr = ConfigurationManager.AppSettings["SampleListSizeFactor"];

            C = cStr == null ? 1 : float.Parse(cStr);
        }
示例#8
0
 public CuckooRule(AsyncParty e, ReadOnlyCollection <int> processorIds, StateKey stateKey)
     : base(e, processorIds, stateKey)
 {
 }
示例#9
0
 public AlmostEverywhereProtocol(AsyncParty e, ReadOnlyCollection<int> processorIds, StateKey stateKey)
     : this(e, processorIds, null, stateKey)
 {
 }
示例#10
0
 public BgwProtocol(AsyncParty p, Circuit circuit, ReadOnlyCollection <int> playerIds,
                    Zp playerInput, StateKey stateKey)
     : this(circuit, playerIds, p, playerInput, p.Send, stateKey)
 {
 }
示例#11
0
 public CuckooRule(AsyncParty e, ReadOnlyCollection<int> processorIds, StateKey stateKey)
     : base(e, processorIds, stateKey)
 {
 }
示例#12
0
 public AlmostEverywhereProtocol(AsyncParty e, ReadOnlyCollection <int> processorIds, StateKey stateKey)
     : this(e, processorIds, null, stateKey)
 {
 }