-
Notifications
You must be signed in to change notification settings - Fork 168
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 Circl bls12-381 and Kilic bls12-381 + benchmarks #499
Conversation
4be24f8
to
2a28ef9
Compare
ac2e53a
to
d8f6f67
Compare
1ae2641
to
72086f9
Compare
Good point, feel free to do another pr to add a gnark_bls12381 package in the pairing folder 😬 |
I seem to recall (I may be wrong here) that we'd discussed it would make sense to put this kind of extra libraries in separate repos. Otherwise it makes it impossible to include Kyber in a project without also depending on all these other extra (competing) dependencies. |
There was already an external repo for kilic made by drand, while the circl was integrated into the kyber drand fork, so the actual original idea was to bring both back into kyber. My thoughts on that are that I don't see any strong reason for which increasing the dependencies is worse than creating separate repos, one for each extra dependency. This makes the project more fragmented, while still requiring maintenance on each of such separate repos. Besides, it's not a service dependency that we have, where each dependency represents a failure point for the service; those are just stable libraries frozen at some specific versions. So my preference would go towards having everything centralized but it's just my opinion. |
I guess my only worry with this PR is that it should probably be rebased on #452 and #487 rather than be giant merge commits. In general I'd advice against every using merge commits except for very small changes or changes on a branch that will be merged back into the original branch (since then the original branch already has these commits). |
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.
Also, could you please pull the tests from and add them in the bls12381 folder?
kilic/bls12-381#39
and rename the circl_bls1238
1 into circl
since it's in the bls12381 folder anyway?
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.
Ups. Approved by mistake.
57e27f6
to
6e728a9
Compare
|
Quality Gate failedFailed conditions |
I think you rebased this the wrong way around:
|
This PR adds to kyber the implementation for the pairing-friendly ecc bls12-381. Two versions of it are implemented, respectively based on the library used.
Here are the results of the benchmarks on a M1 Pro with 8-core using benchstat of kilic vs circl:
Side note: researching potential libraries for bls12-381 I found this benchmarks: https://hackmd.io/@gnark/eccbench#BLS12-381, which suggests as best library gnark-crypto, which could be worth to take in consideration.