예제 #1
0
        protected override SecurePrimitive[] Run(CircuitBuilder builder, SecurePrimitive[] inputs)
        {
            SecureWord[]          inputWords      = inputs.Cast <SecureWord>().ToArray();
            SecureSetIntersection setIntersection = new SecureSetIntersection(inputWords, _numberOfCounterBits);

            return(new[]
            {
                setIntersection.Intersection,
                setIntersection.Counter
            });
        }
예제 #2
0
        public void Record(CircuitBuilder builder)
        {
            SecureWord[] inputs = new SecureWord[_numberOfParties];
            for (int i = 0; i < _numberOfParties; ++i)
            {
                inputs[i] = Input(builder, _numberOfElements);
            }

            SecureSetIntersection setIntersection = new SecureSetIntersection(inputs, _numberOfCounterBits);

            Output(builder, setIntersection.Intersection);
            Output(builder, setIntersection.Counter);
        }