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

serialization: fix potPubkey calculation #4

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

jsign
Copy link
Contributor

@jsign jsign commented Jan 3, 2023

This PR fixes the calculation of potPubkey which is the signature of the contribution. This was detected by the test-vector repo, which in it's first version used this repo implementation (now uses the sequencer one)..

The code originally targeted [t^0]_2, which is always G2 and not dependent on the secret for the sub-ceremony, which isn't correct.

Considering the assumption that this work is done against the spec initialContribution.json, where the starting point of [t^1]_2 is effective G2 (t=identity), the first contribution first power of tau value in G2 will always be [x]_2, which is the correct value (i.e: index 1).

This repo still isn't suitable for a third or more iterations of contributions since potPubkey can't exploit current G2 POT calculations, since they have already baked existing secrets from previous contributions. The correct calculated value should be [x]_2.

As a note for other potential readers, you might be interested in looking at the sequencer repo for a reference implementation.

@kevaundray kevaundray merged commit 37ce36d into crate-crypto:master Jan 3, 2023
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