build_circuit

Function build_circuit 

Source
pub fn build_circuit<F: Field, const NUM_IRIS_4_CHUNKS: usize>(
    layer_visibility: LayerVisibility,
) -> Circuit<F>
Expand description

Builds the mpc circuit. The full circuit spec can be referenced here: https://www.notion.so/MPC-Circuit-Builders-8fe15c8d8f4b4db18cbf85344ccbb9df?pvs=4

To summerize, this circuit takes in slope, iris code and mask code as private inputs, computes the masked iris code, encodes the masked iris code to a GR4 element. Then, the circuit does a GR4 multiplication between the evaluation points and the slopes. The result is then summed with the masked iris code to get the computed shares. The quotients, shares_reduced_modulo_gr4_modulus are to count for congruency (modulo 2^16).