Skip to content

Commit

Permalink
fix: add a proof for phase 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ujnss committed Sep 30, 2022
1 parent f782148 commit c4b6d01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ pub struct SignPhaseThreeMsg {
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct SignPhaseFourMsg {
pub open: DlogCommitmentOpen,
pub dl_proof: DLogProof<CU, sha2::Sha256>,
}

#[derive(Clone, Debug, Serialize, Deserialize)]
Expand Down
10 changes: 10 additions & 0 deletions multi_party_ecdsa/src/protocols/multi_party/dmz21/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,13 @@ impl SignPhase {
))?;
DlogCommitment::verify_dlog(&msg_one.commitment, &msg.open)?;

DLogProof::verify(&msg.dl_proof).map_err(|why| {
format_err!(
"Verify dlog failed error in sign offline phase four, cause {}",
why
)
})?;

Ok(())
}

Expand Down Expand Up @@ -629,8 +636,11 @@ impl SignPhase {

if self.msgs.phase_three_msgs.len() == self.party_num {
self.phase_two_compute_delta_sum_msg()?;

let dl_proof = DLogProof::<CU, sha2::Sha256>::prove(&self.gamma);
let msg_four = SignPhaseFourMsg {
open: self.dl_com.clone().open,
dl_proof,
};

// todo: compatibility(self to self), 20220823
Expand Down

0 comments on commit c4b6d01

Please sign in to comment.