Closed pat721 closed 1 year ago
What parameters do you use mcl.init
with?
The value of Fr::setStr
must be less than or equal to Fr(-1)
.
const max_r = new mcl.Fr();
max_r.setInt(-1);
console.log(max_r.getStr());
The init function is applied as following:
export async function init() {
await mcl.init(mcl.BN_SNARK1);
mcl.setMapToMode(1);
}
Side questions at this point: is 1 the right choice for the try and increment mapping mode?
Okay it seems like my generated number is bigger than Fr(-1)
, I have to double check then. Sorry for the inconvenience.
Is there documentation on the different parameters for the curves?
I'm currently trying to multiply a G2() point with a scalar value but I'm not sure if i do this correct.
I always receive the following error:
What am I doing wrong here?