You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to select two independent generators from the curve.
How can I select them? If I use the generator function from ecp I always get the same points.
I this maybe e bug or i miss an initialisation?
This is the code i used.
let g = ctx.ECP.generator(); const g_Bytes = []; g.toBytes(g_Bytes, true);
For the second one i used:
let u = ctx.ECP.generator(); const u_Bytes = []; u.toBytes(u_Bytes, true);
The text was updated successfully, but these errors were encountered:
No, that won't work. Typically elliptic curves come with a standard
generator as part of their specification. So ECP.generator() always returns
that same point.
To create two independent generators use ECP.map2point(). DIg into
BenchtestALL>html for some example code, e.g.
var rw1=ctx.FP.rand(rng);
G1=ctx.ECP.map2point(rw1);
var rw2=ctx.FP.rand(rng);
G2=ctx.ECP.map2point(rw2);
Now G1 and G2 are independent generators.
Mike
Hey,
I need to select two independent generators from the curve.
How can I select them? If I use the generator function from ecp I always get the same points.
I this maybe e bug or i miss an initialisation?
This is the code i used.
let g = ctx.ECP.generator(); const g_Bytes = []; g.toBytes(g_Bytes, true);
For the second one i used:
let u = ctx.ECP.generator(); const u_Bytes = []; u.toBytes(u_Bytes, true);
The text was updated successfully, but these errors were encountered: