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 component doesn't work with jubjub::ExtendedPoint #196

Open
mikelodder7 opened this issue Dec 9, 2024 · 8 comments
Open

Frost component doesn't work with jubjub::ExtendedPoint #196

mikelodder7 opened this issue Dec 9, 2024 · 8 comments

Comments

@mikelodder7
Copy link

mikelodder7 commented Dec 9, 2024

When I run the Frost DKG for jubjub and try to sign it fails about 8 out of 10 times. When I switch it to use jubjub::SubgroupPoint, then it works every time. Is this supposed to be the case? If so, I can submit a PR to make the fix.

@mikelodder7 mikelodder7 changed the title Frost component doesn't work with ExtendedPoint Frost component doesn't work with jubjub::ExtendedPoint Dec 9, 2024
@conradoplg
Copy link
Contributor

😨 That's certainly a bug! A PR would be welcome, thanks

@mikelodder7
Copy link
Author

Another problem too. It doesn't happen every time, but randomly after refreshing the shares, I test to make sure the underlying secret hasn't changed and that also fails. Is this something with this library or with the curve itself?

@conradoplg
Copy link
Contributor

Another problem too. It doesn't happen every time, but randomly after refreshing the shares, I test to make sure the underlying secret hasn't changed and that also fails. Is this something with this library or with the curve itself?

I haven't looked into it but I guess it's related to the issue you pointed out. Did you try that with ExtendedPoint or SubgroupPoint?

@mikelodder7
Copy link
Author

It doesn’t matter because it’s in the scalar field

@str4d
Copy link
Collaborator

str4d commented Dec 10, 2024

It should indeed fail with ExtendedPoint. FROST requires a prime order group, which is what SubgroupPoint provides; ExtendedPoint is the full group with cofactor.

@mikelodder7
Copy link
Author

That's what I figured but the code here uses ExtendedPoint in the frost section when it should be SubgroupPoint.
The other issue with the refresh still remains as it applies to the Scalar field.

@conradoplg
Copy link
Contributor

Got it, I'll look into it

@conradoplg
Copy link
Contributor

When I run the Frost DKG for jubjub and try to sign it fails about 8 out of 10 times. When I switch it to use jubjub::SubgroupPoint, then it works every time. Is this supposed to be the case? If so, I can submit a PR to make the fix.

I'm looking into the first issue. I can't reproduce this. While using SubgroupPoint would probably be safer, I can't see where in the code it could leave the prime-order subgroup; everything is computed based on the prime-order generator, and deserialization checks for prime-order membership.

I ran 1024 iterations of the DKG & signing and it didn't fail once. Do you have code to reproduce the issue?

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

No branches or pull requests

3 participants