Closed ghost closed 5 years ago
Also, I have written Rust wrappers for mcl and bls. Would you like me to push a pull request for these?
The pairing is written in C++ ; mcl/bn.hpp
But some detail is a little different. Maybe, there are no complete documents about it.
bn.hpp requires some elementary arithmetic operations such as Fp::add, mul, etc. For these functions, you can select some way:
I have written Rust wrappers for mcl and bls. Would you like me to push a pull request for these?
Thank you. Does it use bn.h and is put in {mcl,bls}/ffi/rust/*? I'll see your code.
Yes, I used bindgen using bn.h and then I wrapped the generated code in some nice functions that accept references for the mclBn.. types. I measured performance in Rust and it's the same as in C++
Also, a few more questions:
Do you think we could benefit from making use of AVX2 intrinsics for computing the miller loop and finalexp?
I tried to use AVX before but it was slower than the current code. I'll try again for a new CPU later.
Does this group make use of Montgomery ladder or wNAF tricks to speed up public key generation?
G2::mul() uses GLV method.
do you believe it would make sense to optimize further than precomputing the G2 coefficients?
I do not know.
Hi @herumi
I am interested in contributing to the repo to attempt to provide faster signature verification. For this, I wanted to understand the underlying implementation of the miller_loop and finalexp functions. As far as I understand, these functions are implemented in the llvm IR. I am having some trouble understanding what is going on. Do you have more high-level code on the miller_loop and finalexp implementation?
Kind regards