-
Notifications
You must be signed in to change notification settings - Fork 245
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
Fix sqrt for QuadExtField #358
Conversation
Should use sqrt(c0/beta)
bls12-381 regression tests will go into the curves repo
Bug fixed in PR arkworks-rs#358
// or we need to compute sqrt(c0/P::NONRESIDUE) | ||
return (self.c0.div(P::NONRESIDUE)) | ||
.sqrt() | ||
.map(|res| Self::new(P::BaseField::zero(), res)); |
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.
I wonder if there's a way to precompute P::NONRESIDUE.inverse()
here
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.
One simple solution is to add NONRESIDUE_INV
into the trait of the field parameters.
Description
Fix for the case when
c1 = 0
&c0.legendre.is_qnr()
closes: #344
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Pending
section inCHANGELOG.md
Files changed
in the GitHub PR explorer