GarbledCircuitEvaluator

Models & Types · AiDotNet.FederatedLearning.MPC

Evaluates garbled circuits produced by GarbledCircuitGenerator.

Implements: IGarbledCircuit

For Beginners

The evaluator is the second party in a garbled circuit protocol. It receives the garbled circuit and wire labels for its inputs (via oblivious transfer), then processes each gate to compute the output — without learning the garbler’s inputs or any intermediate values.

How It Works

Workflow:

Security: The evaluator learns only the output. It cannot determine the garbler’s inputs because each wire label is a random cryptographic value that reveals nothing about the underlying bit.

Constructors

Constructor Summary
GarbledCircuitEvaluator(bool enableFreeXor, int labelLengthBits) Initializes a new instance of GarbledCircuitEvaluator.

Methods

Method Summary
GarbledCircuitData Garble(IReadOnlyList<CircuitGate> gates, int inputWireCount, int outputWireCount) Not supported by the evaluator — use GarbledCircuitGenerator to garble.
byte[][] Evaluate(GarbledCircuitData garbledData, byte[][] inputLabels)
byte[][] ObtainInputLabels(GarbledCircuitData garbledData, int[] evaluatorInputBits, int evaluatorWireStart, IObliviousTransfer ot) Obtains input wire labels for the evaluator’s input bits using oblivious transfer.
int[] Decode(byte[][] outputLabels, byte[][] decodingTable)