-
Notifications
You must be signed in to change notification settings - Fork 90
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
tbls: library for BLS12-381 abstraction #1692
Conversation
This commit also adds an example implementation of the BLS abstraction for Herumi's BLS library. This code is not finished (missing testing, and many Godoc comments), and it is pushed as a request for comment from the team.
…cts. The `taketwo` package is a placeholder, once we settle on an interface it will be all merged under `tbls`.
use `var x type` form
Just a thin wrapper over []byte, to favorite type safety.
Needed because Kryptology API requires it.
Missing ThresholdAggregate, Verify and Sign, plus tests.
Since we're trying to abstract library details, it makes sense to have a common set of tests, and something in place that allows us to run it by switching the underlying implementation.
Shared test suite looks alright.
This taketwo.Implementation takes a set of taketwo.Implementation's, and whenever one of the interface's method is called it takes one randomly. This is useful for testing, since it can tell us whether a set of taketwo.Implementation's are compatible among themselves.
Helps with randomization/compatibility testing.
Once we migrate away from the original bls abstraction implementation, v2 package content will move to the root tbls package.
Helps with type safety.
Fixing linting issues as we speak. |
Codecov ReportBase: 54.31% // Head: 54.54% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1692 +/- ##
==========================================
+ Coverage 54.31% 54.54% +0.23%
==========================================
Files 158 161 +3
Lines 20339 20652 +313
==========================================
+ Hits 11047 11265 +218
- Misses 7807 7892 +85
- Partials 1485 1495 +10
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This PR adds a subpackage in
tbls
calledv2
, which is a new abstraction for BLS12-381 cryptography.It contains two concrete implementations — one using Herumi and another based on Kryptology, added for backwards compatibility while we work out the migration.
A complete test suite is provided, alongside a fuzzing target to test cross-compatibility between implementation.
Preliminary tests show substantial performance improvements.
category: refactor
ticket: #1658