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
654 stars 242 forks source link

MIRACL error from routine nres #56

Open bika12 opened 6 years ago

bika12 commented 6 years ago

I extract ECn2 point Pf=([x1,x2],[y1,y2]) to 4 Big values x1,x2,y1,y2 i create a programm the regenerate that point,the generation of Pf should be like:

`ZZn2 xx ,yy; ECn2 Pf;

xx =ZZn2(x1,x2); yy=ZZn2(y1,y2);

                Pf.ECn2::set(xx,yy);

` but I got this error

MIRACL error from routine nres called from zzn2_from_bigs called from your program No modulus defined

what can i do ??

mcarrickscott commented 6 years ago

You need to define the prime modulus!

This can be done by calling

modulo(p);

where p is the prime modulus associated with the elliptic curve.

Mike

On Fri, Dec 8, 2017 at 7:59 PM, bika12 notifications@github.com wrote:

I extract ECn2 point Pf=([x1,x2],[y1,y2]) to 4 Big values x1,x2,y1,y2 i create a programm the regenerate that point,the generation of Pf should be like:

`ZZn2 xx ,yy; ECn2 Pf;

xx =ZZn2(x1,x2); yy=ZZn2(y1,y2);

            Pf.ECn2::set(xx,yy);

` but I got this error

MIRACL error from routine nres called from zzn2_from_bigs called from your program No modulus defined

what can i do ??

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/56, or mute the thread https://github.com/notifications/unsubscribe-auth/ACm8jjZEkREXKj5zCQ1rGw5igQ754QXTks5s-ZU2gaJpZM4Q7kzG .