Skip to content

Commit

Permalink
Finalize VM first
Browse files Browse the repository at this point in the history
  • Loading branch information
th4s committed Nov 19, 2023
1 parent 2250be4 commit 019a4d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tlsn/tlsn-prover/src/tls/prove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,19 @@ impl Prover<ProveState> {
let mut verify_fut = Box::pin(async move {
let mut channel = verify_mux.get_channel("finalize").await?;

_ = vm
.finalize()
.await
.map_err(|e| ProverError::MpcError(Box::new(e)))?
.expect("encoder seed returned");

// This is a temporary approach until a maliciously secure share conversion protocol is implemented.
// The prover is essentially revealing the TLS MAC key. In some exotic scenarios this allows a malicious
// TLS verifier to modify the prover's request.
gf2.reveal()
.await
.map_err(|e| ProverError::MpcError(Box::new(e)))?;

_ = vm
.finalize()
.await
.map_err(|e| ProverError::MpcError(Box::new(e)))?
.expect("encoder seed returned");

// Send session_info to the verifier
channel.send(TlsnMessage::SessionInfo(session_info)).await?;

Expand Down

0 comments on commit 019a4d9

Please sign in to comment.