I am currently trying to do (blst_p2)a ^ (size_t)b.
I found out that sometimes, the blst_p2 in the header file becomes vec384 in the source file, so i guessed that exp_mont_384 might be what I want.
I then looked for its usage and I think I should be able to write my own power function
void blst_p2_power2(blst_p2* result, blst_p2* base, size_t exp) {
// 2 definitions of limb_t in the lib
// typedef uint64_t limb_t;
// typedef unsigned long long limb_t;
static const unsigned long long p0 = (limb_t)0x89f3fffcfffcfffd;
exp_mont_384(result, base, &exp, sizeof(exp) * 8, BLS12_381_P, p0);
}
The issue is that I cannot really import const.h for limb_t has 2 different definition in the project
typedef uint64_t limb_t;
typedef unsigned long long limb_t;
Questions
Am I understanding it right?
Is there something already available for the power function of blst_p2 types?
Hi,
Situation
I am currently trying to do
(blst_p2)a ^ (size_t)b
. I found out that sometimes, theblst_p2
in the header file becomesvec384
in the source file, so i guessed thatexp_mont_384
might be what I want.I then looked for its usage and I think I should be able to write my own power function
The issue is that I cannot really import
const.h
forlimb_t
has 2 different definition in the projectQuestions