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

how to convert big to Big #19

Open privetpoka opened 8 years ago

privetpoka commented 8 years ago

Hello, i have some issues with function xgcd(): it works only with big types, but i want it to work with Big type, because i can make Big from char* for example. Or how could i make big type from char* Hope you understand what i mean. Thank you.

mcarrickscott commented 8 years ago

Well you can use the Big friend functions inverse() or moddiv() which use xgcd() internally, if they do what you want from C++

Or you can use the bytes_to_big() C function to convert from a char array to a big...

Mike

On Thu, Feb 18, 2016 at 11:29 AM, privetpoka notifications@github.com wrote:

Hello, i have some issues with function xgcd(): it works only with big types, but i want it to work with Big type, because i can make Big from char* for example. Or how could i make big type from char* Hope you understand what i mean. Thank you.

— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/19.

baicaihenxiao commented 8 years ago

Big a(bigVar);//bigVar is the big type.

mcarrickscott commented 8 years ago

Yes.

big one=mirvar(1);
Big nf(one);

is same as

Big nf=1;

Mike

On Mon, Oct 31, 2016 at 4:59 AM, baicaihenxiao notifications@github.com wrote:

Big a(bigVar);//bigVar is the big type.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/19#issuecomment-257214250, or mute the thread https://github.com/notifications/unsubscribe-auth/ACm8juGvy977wNSyKuU57ObYwMQGmmK8ks5q5XW3gaJpZM4Hc-gk .