Skip to content

Commit

Permalink
small fixes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
sinui0 committed Oct 24, 2023
1 parent c87d88e commit c1e39f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion garble/mpz-garble/src/evaluator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct State {
decoded_values: HashSet<ValueId>,
/// 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<CircuitRefs, GarbledCircuit>,
/// OT logs
ot_log: HashMap<String, Vec<ValueId>>,
Expand Down
6 changes: 2 additions & 4 deletions garble/mpz-garble/src/generator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ struct State {
/// Encodings of values
memory: EncodingMemory<encoding_state::Full>,
/// Transferred garbled circuits
///
/// Each circuit is uniquely identified by its (input, output) references. Optionally, the garbled circuit may have been hashed.
garbled: HashMap<CircuitRefs, Option<Hash>>,
/// The set of values that are currently active.
///
Expand Down Expand Up @@ -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<encoding_state::Full> {
match (value, ty) {
(ValueRef::Value { id }, ty) if !ty.is_array() => self.encode_by_id(id, ty),
Expand Down
2 changes: 1 addition & 1 deletion garble/mpz-garble/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Circuit>,
Expand Down

0 comments on commit c1e39f9

Please sign in to comment.