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 }); }
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); }