diff --git a/garble/mpz-garble/src/evaluator/mod.rs b/garble/mpz-garble/src/evaluator/mod.rs index 0d5fc102..efdd2021 100644 --- a/garble/mpz-garble/src/evaluator/mod.rs +++ b/garble/mpz-garble/src/evaluator/mod.rs @@ -63,7 +63,7 @@ struct State { decoded_values: HashSet, /// Pre-transferred garbled circuits /// - /// (inputs, outputs) => garbled circuit + /// A map used to look up a garbled circuit by its unique (inputs, outputs) reference. garbled_circuits: HashMap, /// OT logs ot_log: HashMap>, diff --git a/garble/mpz-garble/src/generator/mod.rs b/garble/mpz-garble/src/generator/mod.rs index 5fdf62f2..22584a4b 100644 --- a/garble/mpz-garble/src/generator/mod.rs +++ b/garble/mpz-garble/src/generator/mod.rs @@ -45,6 +45,8 @@ struct State { /// Encodings of values memory: EncodingMemory, /// Transferred garbled circuits + /// + /// Each circuit is uniquely identified by its (input, output) references. Optionally, the garbled circuit may have been hashed. garbled: HashMap>, /// The set of values that are currently active. /// @@ -370,10 +372,6 @@ impl State { /// Generates an encoding for a value /// /// If an encoding for the value already exists, it is returned instead. - /// - /// # Panics - /// - /// If the provided value type does not match the value reference. fn encode(&mut self, value: &ValueRef, ty: &ValueType) -> EncodedValue { match (value, ty) { (ValueRef::Value { id }, ty) if !ty.is_array() => self.encode_by_id(id, ty), diff --git a/garble/mpz-garble/src/lib.rs b/garble/mpz-garble/src/lib.rs index 8884095a..042235a2 100644 --- a/garble/mpz-garble/src/lib.rs +++ b/garble/mpz-garble/src/lib.rs @@ -314,7 +314,7 @@ pub trait Memory { /// Implementations may perform pre-processing prior to execution. #[async_trait] pub trait Load { - /// Loads a circuit with the provided inputs and output values. + /// Loads a circuit with the provided input and output values. async fn load( &mut self, circ: Arc,