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 16, 2024
1 parent f2a8cff commit 2cafdfc
Show file tree
Hide file tree
Showing 6 changed files with 636 additions and 13 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.2.0] - In development

### Added

- A basic implementation of threshold key resharing protocol. ([#96])


[#96]: https://github.com/entropyxyz/synedrion/pull/96


## [0.1.0] - 2023-12-07

Initial release.
Expand Down
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 2cafdfc

Please sign in to comment.