Skip to content

Commit

Permalink
First draft of key resharing protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
fjarri committed Jan 15, 2024
1 parent f2a8cff commit e04d225
Show file tree
Hide file tree
Showing 5 changed files with 626 additions and 13 deletions.
1 change: 1 addition & 0 deletions synedrion/src/cggmp21/protocols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pub(crate) mod interactive_signing;
pub(crate) mod key_gen;
pub(crate) mod key_init;
pub(crate) mod key_refresh;
pub(crate) mod key_resharing;
pub(crate) mod presigning;
pub(crate) mod signing;
mod threshold;
Expand Down
3 changes: 3 additions & 0 deletions synedrion/src/cggmp21/protocols/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ pub(crate) enum FinalizationRequirement {
AllBroadcasts,
AllDms,
AllBroadcastsAndDms,
Custom,
}

pub(crate) trait Finalizable: BroadcastRound + DirectRound {
Expand All @@ -150,6 +151,7 @@ pub(crate) trait Finalizable: BroadcastRound + DirectRound {
&& contains_all_except(dm_payloads, self.num_parties(), self.party_idx())
&& contains_all_except(dm_artifacts, self.num_parties(), self.party_idx())
}
FinalizationRequirement::Custom => panic!("`can_finalize` must be implemented"),

Check warning on line 154 in synedrion/src/cggmp21/protocols/generic.rs

View check run for this annotation

Codecov / codecov/patch

synedrion/src/cggmp21/protocols/generic.rs#L154

Added line #L154 was not covered by tests
}
}

Expand Down Expand Up @@ -188,6 +190,7 @@ pub(crate) trait Finalizable: BroadcastRound + DirectRound {
));
missing
}
FinalizationRequirement::Custom => panic!("`missing_payloads` must be implemented"),

Check warning on line 193 in synedrion/src/cggmp21/protocols/generic.rs

View check run for this annotation

Codecov / codecov/patch

synedrion/src/cggmp21/protocols/generic.rs#L193

Added line #L193 was not covered by tests
}
}
}
Expand Down
Loading

0 comments on commit e04d225

Please sign in to comment.