Comments (3)
As it turns out, it's possible to omit all the checks and leave just a pair of sqrt_fp calls. This amounts to ~2.5x improvement for sqrt_fp2 itself, and >40% for hash-to-[g2-]curve. See new sqrt.c:-)
from blst.
Just a note that feedback is appreciated and is being considered. Thanks!
from blst.
Diving into the code here:
Lines 86 to 179 in 5c41509
We have roughly currently:
- An Fp2 addition chain with 894 operations
- 3 squarings/mul and a couple of cheap additions/substractions/conditional select
Adj-Hendriquez paper would require:
- line 2. An optional Fp addition chain for SQRT (short circuiting in non-constant time implementation)
- line 5. An Fp addition chain for the Legendre symbol (p-1)/2 that can be merged in the following SQRT
- line 9. An Fp addition chain for SQRT ~458 operations
- line 11. An Fp addition chain for Legendre symbol ~458 operations
- line 15. An Fp addition chain for SQRT ~ 458 operations
- line 16. An Fp addition chain for inversion, but it can be merged with the previous SQRT computation.
Hence your implementation seems to do 33% less operations on paper.
Closing the issue.
from blst.
Related Issues (20)
- Rust bindings reference non-existent "std" feature HOT 3
- Error building blst Wasm in Rust HOT 2
- Windows: bool is 4-bytes by default HOT 3
- `blst` fails to build in Windows on ARM device HOT 4
- `blst` fails to build macos 13.x HOT 2
- Rust bindings: `PublicKey::key_validate` not linking for `x86_64-fortanix-unknown-sgx` (current master branch) HOT 11
- [Rust-binding] Proposal to implement `std::hash::Hash` for publicly exposed structures HOT 6
- Rust Bindings: Replacing slices of references to iterators of references for aggregation HOT 3
- BLST throws illegal instruction error on AMD K10 CPUs (Windows) HOT 27
- How Derive keys by path? HOT 2
- The same private key but different public key results HOT 2
- Segmentation fault in some machines and not in others using OpenBSD adJ74 HOT 15
- Rust bindings not recompiled on target CPU change HOT 6
- Unable to build on x86 macOS using LLVM 17.0.6 HOT 4
- When might the next release be cut? HOT 5
- ARMv7 optimization HOT 19
- Bug: Incorrect result from blst_fp_inverse()
- Failed to build with `undefined: Message` HOT 1
- Rust bindings broken on Mac Sonoma 14.5. HOT 2
- RISC-V compilation? HOT 4
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 blst.