Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dkg round2 function #53

Merged
merged 5 commits into from
Apr 11, 2024
Merged

add dkg round2 function #53

merged 5 commits into from
Apr 11, 2024

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Apr 11, 2024

defines round2 to take a round1 SecretPackage and a vector of round1 PublicPackages and run round2 of DKG.

finds the PublicPackage corresponding to self_identity and uses it to verify the checksums contained in all of the other PublicPackages.

iterates over round1 PublicPackages to construct map from identifier to frost package required for frost part2 inputs and to collect group_secret_key_shards

moves 'Error' enum from round1 to separate error module to allow reuse across dkg rounds, adds ChecksumError to enum

hughy added 2 commits April 10, 2024 15:42
defines round2 to take a round1 SecretPackage and a vector of round1
PublicPackages and run round2 of DKG.

finds the PublicPackage corresponding to self_identity and uses it to verify the
checksums contained in all of the other PublicPackages.

iterates over round1 PublicPackages to construct map from identifier to frost
package required for frost part2 inputs and to collect group_secret_key_shards

moves 'Error' enum from round1 to separate error module to allow reuse across
dkg rounds, adds ChecksumError to enum
src/dkg/round1.rs Outdated Show resolved Hide resolved
src/dkg/round2.rs Outdated Show resolved Hide resolved

for public_package in round1_public_packages {
if public_package.checksum() != self_public_package.checksum() {
return Err(Error::ChecksumError(ChecksumError));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we provide a more error message? I don't remember how we do it for TKD (if the error message is generated on ironfish-frost, ironfish-rust, ironfish-rust-nodejs, or typescript), but ideally we should use the same pattern.

This doesn't need to be done in this PR though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update this in a separate PR since it will affect signing_commitment too

@hughy hughy merged commit ffd36cb into main Apr 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants