-
Notifications
You must be signed in to change notification settings - Fork 145
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
Add Missing Components for BLS12-377 Curve #922
Conversation
/// (a0 + a1 * t) * (b0 + b1 * t) = a0 * b0 + a1 * b1 * Self::residue() + (a0 * b1 + a1 * b0) * t | ||
/// where `t.pow(2)` equals `Q::residue()`. | ||
fn mul(a: &Self::BaseType, b: &Self::BaseType) -> Self::BaseType { | ||
let q = -FieldElement::from(5); // This is where u^2 = -5 is applied |
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.
Have this as a constant, since it is the non-residue
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #922 +/- ##
==========================================
+ Coverage 70.95% 70.96% +0.01%
==========================================
Files 143 144 +1
Lines 31284 31669 +385
==========================================
+ Hits 22197 22474 +277
- Misses 9087 9195 +108 ☔ View full report in Codecov by Sentry. |
pub struct BLS12377Residue; | ||
impl HasQuadraticNonResidue<BLS12377PrimeField> for BLS12377Residue { | ||
fn residue() -> FieldElement<BLS12377PrimeField> { | ||
-FieldElement::from(5) |
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 should be the constant
Add Missing Components for BLS12-377 Curve
Description
This PR adds the missing components of the curve, such as the twist and field extension implementations