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

Keep polynomial constant parameters during DKG #92

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Conversation

xoloki
Copy link
Collaborator

@xoloki xoloki commented Oct 8, 2024

The group key created during dkg is the sum of the constant parameters of the party polynomials. This change adds the ability to keep these constant parameters when rerunning dkg, so the group key stays the same. Tests show that it works on both the low level Signer interface and the high level state machines.

This change also adds common::Polynomial, in an attempt to fix the disparity between how we handle private and public polynomials. Private polynomials, which use Scalar for both parameters and args, have been using polynomial::Polynomial from an external crate. But we weren't using any of the advanced features from that crate, just calling eval to generate private shares. Public polynomials couldn't use the crate, because they have Point parameters but Scalar args, which the crate did not support. Also, we couldn't support the keep_constant feature with the crate, since it did not allow specifying or editing any of the polynomial parameters.

This change is now using common::Polynomial for private polynomials, but Vec<Point> for public polynomials (with some help from Polynomial to convert between the two). This is similar to how the code worked before this change, so should require few downstream changes.

@xoloki xoloki changed the title Keep polynomial constant during DKG Keep polynomial constant parameters during DKG Oct 8, 2024
@xoloki xoloki marked this pull request as ready for review October 8, 2024 16:35
@xoloki xoloki requested a review from djordon October 8, 2024 16:35
Copy link

@djordon djordon left a comment

Choose a reason for hiding this comment

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

Largely, looks good. I gave it a quick look though but will give another one later. Figured I'd add my questions and comments here until then.

src/compute.rs Outdated Show resolved Hide resolved
src/compute.rs Outdated Show resolved Hide resolved
src/state_machine/coordinator/fire.rs Outdated Show resolved Hide resolved
src/common.rs Show resolved Hide resolved
src/common.rs Show resolved Hide resolved
src/common.rs Show resolved Hide resolved
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