-
Notifications
You must be signed in to change notification settings - Fork 56
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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. |
There was a problem hiding this comment.
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
let proof_of_knowledge = | ||
compute_proof_of_knowledge(identifier, &coefficients, &commitment, &mut rng)?; |
There was a problem hiding this comment.
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)
This closes #663
This adds the refresh share functionality with DKG. It needs some tidying up but that will be done in another PR.