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

FROST Round Two: Signature Share Generation #8

Merged
merged 4 commits into from
Jan 4, 2024
Merged

FROST Round Two: Signature Share Generation #8

merged 4 commits into from
Jan 4, 2024

Conversation

pdyraga
Copy link
Member

@pdyraga pdyraga commented Dec 21, 2023

Depends on #7

Round2 implements the Round Two - Signature Share Generation phase from [FROST], section 5.2 Round Two - Signature Share Generation, based on @eth-r's prototype code.

Note that Round2 code is not covered with unit tests. Those will be implemented for the protocol as a whole, in a separate PR, once the Coordinator code is ready.

Base automatically changed from polynomials to main December 22, 2023 14:23
computeChallenge implements def compute_group_commitment(commitment_list,
binding_factor_list) from [FROST] as defined in section 4.6. Signature
Challenge Computation.
This way we iterate only once over the commitments. The participant list
will be needed in Round2 function of signer.
Round2 implements the Round Two - Signature Share Generation phase from
[FROST], section 5.2 Round Two - Signature Share Generation.

This code is not yet covered with unit tests and until this happens
should be treated as a late prototype.
The validateGroupCommitments logic was improved to cover the case when the
commitment from the current signer is missing. Also, it now covers the case when
one of the commitments is missing. Improved unit test coverage to check all
cases individually and then all of them together.

This allowed to simplify deriveInterpolatingValue logic and skip the validation
in this function as all the required validation happens earlier, in
validateGroupCommitments.
@pdyraga pdyraga marked this pull request as ready for review January 2, 2024 11:16
nonce *Nonce,
commitments []*NonceCommitment,
) (*big.Int, error) {
// TODO: validate number of commitments?
Copy link
Member Author

Choose a reason for hiding this comment

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

Let's look at it in a separate PR, where we figure out the coordinator's code.

@pdyraga pdyraga changed the title FROST Round Two: Signature Share Generation. FROST Round Two: Signature Share Generation Jan 2, 2024
@pdyraga pdyraga mentioned this pull request Jan 3, 2024
@pdyraga pdyraga requested a review from eth-r January 3, 2024 12:07
Copy link
Contributor

@eth-r eth-r left a comment

Choose a reason for hiding this comment

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

Looks good. I can see one potential future compatibility issue with H2 if someone comes up with a weird FROST protocol, but that should not be a blocker for now.

// challenge_input = group_comm_enc || group_public_key_enc || msg
// challenge = H2(challenge_input)
// return challenge
return s.ciphersuite.H2(groupCommitmentEncoded, publicKeyEncoded, message)
Copy link
Contributor

Choose a reason for hiding this comment

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

It is possible that some suites may use something weird for H2 which would be incompatible with this, but I think for the most part this is likely to be fine. Something we may want to consider is whether H2 should take in (Point, Point, []byte) arguments instead, but it shouldn't be a blocker.

@eth-r eth-r merged commit bb69649 into main Jan 4, 2024
2 checks passed
@eth-r eth-r deleted the round-2 branch January 4, 2024 13:34
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