perf:import the optimized aries-bbs module into idemix#67
Closed
neetance wants to merge 1 commit into
Closed
Conversation
Signed-off-by: Ankit Basu <ankitbasu14@gmail.com>
Member
|
Hi @neetance , sorry for misleading. I meant to have aries-bbs implementation directly inside the Idemix repo as an independent go modulo. The code will be maintained in the context of Idemix so we make sure it does not become stale. Sorry for the misunderstanding 🙏 |
Contributor
Author
|
Hi @adecaro, sorry for misunderstanding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the
aries-bbs-godependency with an optimized fork that eliminates the primary performance bottlenecks in BBS+ signing, verification, and proof operations. The optimized implementation is imported as an independent Go modulevia a
replacedirective, as suggested by @adecaro.Changes in the Optimized Fork
1. MSM Batching (
bbs.go)Replaced sequential
Mul+Addcalls insumOfG1ProductswithMul2pairing to process pairs in batches, reducing the number of individual scalar multiplication calls.2. Generator Cache (
keys.go)Introduced
publicKeyGeneratorCache, a struct owned byBBSLibwhose lifecycle is tied to theBBSLibinstance rather than the process.The full changes in the forked repo can be found here
Benchmark results for Idemix
I ran
Benchmark_SignVerifyfor both before and after the changes and here are the results:Before
After
Comparison using benchstat
We can see that aries-signing shows an improvement of 15.63% and verification an improvement of 6%
Testing
All existing tests pass with
make unit-testsandmake unit-tests-raceLet me know if this is good 🙏