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

Refresh Shares with DKG #766

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

Refresh Shares with DKG #766

wants to merge 5 commits into from

Conversation

natalieesk
Copy link
Contributor

@natalieesk natalieesk commented Nov 8, 2024

This closes #663

This adds the refresh share functionality with DKG. It needs some tidying up but that will be done in another PR.

@natalieesk natalieesk linked an issue Nov 8, 2024 that may be closed by this pull request
Copy link
Contributor

@conradoplg conradoplg left a comment

Choose a reason for hiding this comment

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

Looks great, thanks. I added a couple of comments, feel free to mark them as solved and address them in the refactoring PR if you prefer to.

@@ -114,3 +118,260 @@ pub fn refresh_share<C: Ciphersuite>(

Ok(new_key_package)
}

/// Part 1 of refresh share with DKG. A refreshing_key is generated and a new package and secret_package are generated.
/// The identity commitment is removed from the packages.
Copy link
Contributor

@conradoplg conradoplg Nov 11, 2024

Choose a reason for hiding this comment

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

Nitpick: This line about the identity commitment is an implementation detail, I don't think it needs to be part of the public documentation

Comment on lines +148 to +149
let proof_of_knowledge =
compute_proof_of_knowledge(identifier, &coefficients, &commitment, &mut rng)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

This builds a kind of "nonsensical" proof of knowledge since it uses the first coefficient (zero) and the commitment to the second coefficient (now first in the list). Which is not an issue, since we simply don't verify it. But it may be confusing to whoever is reading the source.

My suggestion is to directly build a dummy Signature using Signature::new() and passing a generator element (generator()) and a 1 scalar (one()), and adding a comment saying that we are building a dummy proof of knowledge because the secret is always zero and the proof isn't needed (and couldn't be encoded since it would have an identity element)

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.

Feature: Remove signers or refresh shares with DKG
2 participants