Lines Matching refs:mp2
140 * Compute the greatest common divisor of mp1 and mp2; result goes in rmp.
143 mp_gcd(const MINT *mp1, const MINT *mp2, MINT *rmp)
152 BN_ERRCHECK("gcd", BN_gcd(&b, mp1->bn, mp2->bn, c));
183 * Compute rmp=mp1+mp2.
186 _madd(const char *msg, const MINT *mp1, const MINT *mp2, MINT *rmp)
191 BN_ERRCHECK(msg, BN_add(&b, mp1->bn, mp2->bn));
197 mp_madd(const MINT *mp1, const MINT *mp2, MINT *rmp)
200 _madd("madd", mp1, mp2, rmp);
204 * Return -1, 0, or 1 if mp1<mp2, mp1==mp2, or mp1>mp2, respectivley.
207 mp_mcmp(const MINT *mp1, const MINT *mp2)
210 return (BN_cmp(mp1->bn, mp2->bn));
217 _mcmpa(const char *msg __unused, const MINT *mp1, const MINT *mp2)
220 return (BN_ucmp(mp1->bn, mp2->bn));
398 * Compute rmp=mp1-mp2.
401 _msub(const char *msg, const MINT *mp1, const MINT *mp2, MINT *rmp)
406 BN_ERRCHECK(msg, BN_sub(&b, mp1->bn, mp2->bn));
412 mp_msub(const MINT *mp1, const MINT *mp2, MINT *rmp)
415 _msub("msub", mp1, mp2, rmp);
477 * Compute rmp=mp1*mp2.
480 _mult(const char *msg, const MINT *mp1, const MINT *mp2, MINT *rmp, BN_CTX *c)
485 BN_ERRCHECK(msg, BN_mul(&b, mp1->bn, mp2->bn, c));
491 mp_mult(const MINT *mp1, const MINT *mp2, MINT *rmp)
498 _mult("mult", mp1, mp2, rmp, c);