Comments (8)
Apparently Celo (https://github.com/celo-org/celo-blockchain/tree/master/crypto/bls12381) gets a big speed improvement from batching subgroup checks, its worth considering combining batching with the fast algorithm described in Sean Bowe's paper.
from ferveo.
Additional resources:
zcash/zcash#3425 (comment)
zcash/zcash#3425 (comment)
zcash/zcash#3470
mratsim/constantine#47
mratsim/constantine#46
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2539.md
status-im/nimbus-eth2#1715
from ferveo.
Fast subgroup check from Bowe's eprint/2019/814 is more efficient than multiplying by the cofactor only on the G2 case (the G1 cofactor is small).
The G2 subgroup check is (partially) done in zkcrypto/bls12_381: the clear_cofactor
function uses the Bowe's trick but is not used in the is_torsion_free
function.
The arkworks-rs/curves
implementation does not provide a is_torsion_free
function.
I forked the zkcrypto/bis12_381 into heliaxdev/bls12_381 and implemented (as an exercise) the G1 subgroup check as in Bowe's paper.
from ferveo.
I think what's happening in the G1 case is that the implementation of multiply in bls12_381 is constant-time, therefore [u8; 16]
instead of [u8; 32]
otherwise it will continue to double the base point
from ferveo.
Actually the celo implementation I linked to is written in Go, and while it uses Bowe's method, it doesn't do the batching.
The batching is instead implemented in zexe (celo-org/zexe#4) and it seems like the performance speedup is substantial. So now we have yet another dependency issue to deal with, as zexe seemes like an arkworks fork?
from ferveo.
(as exercies) I have done the is_torsion_free_optimized
functions for G1 and G2 using the Bowe's trick and the gain is significant as expected. See heliaxdev/bls12_381
commit de80c8ab4cd2ceb2b7b9026f2571546695eaeb26
and 6a8eb9f9c534bf035a407d17081fa2e313bb0e1d
for details.
from ferveo.
Probably going to be integrated into arkworks anyway, so nothing probably required from our end right now.
from ferveo.
#58 (comment) provide benchmarks of the fast subgroup check for G1 and G2.
from ferveo.
Related Issues (20)
- Enclaves for secret sealing and secret operations HOT 1
- Coding tasks
- Batch pairings for threshold operations HOT 2
- Merge current specification and fix link to docs
- When does the DKG run for a new Epoch? HOT 1
- Summary 09/07/21
- Threshold signature verification benchmarking
- Implement threshold signatures
- Threshold decryption benchmarking HOT 7
- Use VariableBaseMSM to optimize decryption HOT 1
- Loading DKG keys in TPKE
- Complain messages HOT 1
- Caching G2 points
- Improve G2 deserialization performance in arkworks HOT 4
- Use of Ferveo for Threshold Signatures and Light Clients HOT 2
- Parallelize everything with rayon
- Cleanup benchmarks
- Create tests
- Batch subgroup checks
- Implement gossip-layer VSS transcript aggregation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ferveo.