-
Notifications
You must be signed in to change notification settings - Fork 148
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
Compression for bls12381 #904
Conversation
The implementation was ported and adapted from https://github.com/lambdaclass/lambdaworks_kzg/blob/8f031b1f32e170c1af06029e46c73404f4c85e2e/src/compression.rs#L29.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #904 +/- ##
==========================================
- Coverage 72.83% 72.75% -0.09%
==========================================
Files 150 150
Lines 34158 34196 +38
==========================================
Hits 24880 24880
- Misses 9278 9316 +38 ☔ View full report in Codecov by Sentry. |
math/src/elliptic_curve/short_weierstrass/curves/bls12_381/compression.rs
Outdated
Show resolved
Hide resolved
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.
LGTM
@@ -18,3 +19,16 @@ pub trait IsShortWeierstrass: IsEllipticCurve + Clone + Debug { | |||
y.pow(2_u16) - x.pow(3_u16) - Self::a() * x - Self::b() | |||
} | |||
} | |||
|
|||
pub trait Compress { |
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.
You could add some docs here explaining what is the purpose of this trait.
Port compression for BLS12381
Note: replaces #902
Description
Port compression for BLS12381 from lambdaworks_kzg.
The motivation for this PR is to introduce missing compression functionality for the
BLS12381Curve
, specifically, decompression for G1 and G2 points.The changes included are:
Compress
trait, which defines compression and decompression for G1, and decompression for G2.Compress
trait forBLS12381Curve
.Type of change
Checklist