Skip to content

Commit

Permalink
update exec_counter in expand
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangxiecrypto committed Oct 19, 2023
1 parent 2bc913d commit f532bc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ot/mpz-ot-core/src/ferret/spcot/receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ impl Receiver<state::Extension> {
self.state.unchecked_ws.extend_from_slice(&tree);
self.state.alphas_and_length.push((alpha, 1 << h));

self.state.exec_counter += 1;

Ok(())
}

Expand Down Expand Up @@ -250,7 +252,6 @@ impl Receiver<state::Extension> {
return Err(ReceiverError::ConsistencyCheckFailed);
}

self.state.exec_counter += self.state.alphas_and_length.len();
self.state.cot_counter += self.state.unchecked_ws.len();
self.state.extended = true;

Expand Down
3 changes: 2 additions & 1 deletion ot/mpz-ot-core/src/ferret/spcot/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ impl Sender<state::Extension> {
self.state.hasher.update(&ms.to_bytes());
self.state.hasher.update(&sum.to_bytes());

self.state.exec_counter += 1;

Ok(ExtendFromSender { ms, sum })
}

Expand Down Expand Up @@ -200,7 +202,6 @@ impl Sender<state::Extension> {
res.push(tmp);
}

self.state.exec_counter += self.state.vs_length.len();
self.state.cot_counter += self.state.unchecked_vs.len();
self.state.extended = true;

Expand Down

0 comments on commit f532bc2

Please sign in to comment.