miracl / MIRACL

MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).
https://miracl.com
653 stars 242 forks source link

How to assign a value to ECn2 #43

Closed newdible closed 7 years ago

newdible commented 7 years ago

When I try the point multiplication on G2, which is a Abel group on E(P^2),P2 is a basic point,and we have known its point value, which is big type, how can I assign the P2 value to P,when I invoke the function ECn2 G2_mult(ECn2 &P,Big &e,ZZn2 &X,Big &r,Big WB[4],Big B[4][4]) which is in the file ake12bnx.app. Another question is what is the X mean in this function ? When I use it, I would only do set_frobenius_constant(X); Is it enough? Thank you very much.

newdible commented 7 years ago

big a, b, c, d; ZZn2 f1, f2; ECn2 p1; f1.set((Big)a, (Big)b); f2.set((Big)c, (Big)d); p1.set(f1, f2);

I follow the above form, but the result is not correct. I'm puzzled. and looking forward your reply. Thanks.