Skip to content

Commit

Permalink
fix: repair rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
th4s committed Oct 2, 2024
1 parent ce7d9e2 commit 5b1f701
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
13 changes: 3 additions & 10 deletions crates/tls/mpc/src/follower/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,12 @@ impl ludi::Actor for MpcTlsFollower {
async fn stopped(&mut self) -> Result<Self::Stop, Self::Error> {
debug!("follower actor stopped");

let Closed {
handshake_commitment,
server_key,
} = self.state.take().try_into_closed()?;
let Closed { server_key } = self.state.take().try_into_closed()?;

let bytes_sent = self.encrypter.sent_bytes();
let bytes_recv = self.decrypter.recv_bytes();

Ok(MpcTlsFollowerData {
handshake_commitment,
server_key,
bytes_sent,
bytes_recv,
Expand Down Expand Up @@ -116,13 +112,10 @@ impl Handler<ComputeKeyExchange> for MpcTlsFollower {
msg: ComputeKeyExchange,
ctx: &mut ludi::Context<Self>,
) -> impl std::future::Future<Output = <ComputeKeyExchange as Message>::Return> + Send {
let ComputeKeyExchange {
handshake_commitment,
server_random,
} = msg;
let ComputeKeyExchange { server_random } = msg;

async move {
ctx.try_or_stop(|_| self.compute_key_exchange(handshake_commitment, server_random))
ctx.try_or_stop(|_| self.compute_key_exchange(server_random))
.await
}
}
Expand Down
3 changes: 0 additions & 3 deletions crates/tls/mpc/src/follower/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use futures::{
use hmac_sha256::Prf;
use ke::KeyExchange;
use key_exchange as ke;
use mpz_core::hash::Hash;
use p256::elliptic_curve::sec1::ToEncodedPoint;
use std::{collections::VecDeque, mem};
use tls_core::{
Expand Down Expand Up @@ -451,8 +450,6 @@ impl MpcTlsFollower {
/// Data collected by the MPC-TLS follower.
#[derive(Debug)]
pub struct MpcTlsFollowerData {
/// The prover's commitment to the handshake data
pub handshake_commitment: Option<Hash>,
/// The server's public key
pub server_key: PublicKey,
/// The total number of bytes sent
Expand Down
1 change: 0 additions & 1 deletion crates/tls/mpc/src/leader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use hmac_sha256::Prf;
use ke::KeyExchange;
use key_exchange as ke;
use ludi::Context;
use mpz_core::commit::{Decommitment, HashCommit};
use std::collections::VecDeque;
use tls_backend::{
Backend, BackendError, BackendNotifier, BackendNotify, DecryptMode, EncryptMode,
Expand Down
2 changes: 0 additions & 2 deletions crates/tls/mpc/src/msg/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Contains message types for communication between leader and follower and actor messages.

use mpz_core::hash::Hash;
use serde::{Deserialize, Serialize};

pub mod mpc_tls_follower_msg;
Expand Down Expand Up @@ -28,7 +27,6 @@ pub enum MpcTlsMessage {
#[allow(missing_docs)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ComputeKeyExchange {
pub handshake_commitment: Option<Hash>,
pub server_random: [u8; 32],
}

Expand Down

0 comments on commit 5b1f701

Please sign in to comment.