diff options
author | Tim Taubert <ttaubert@mozilla.com> | 2016-04-21 12:03:16 +0200 |
---|---|---|
committer | Tim Taubert <ttaubert@mozilla.com> | 2016-04-21 12:03:16 +0200 |
commit | d723525c987386f368911dd2572490b2417f8d21 (patch) | |
tree | 48146747525e2a0b88a2ce77a872607eaffabed7 /lib/freebl/ecl | |
parent | 0bb23f28b5609a6acc88a9c0bfe2c37b7378d07c (diff) | |
download | nss-hg-d723525c987386f368911dd2572490b2417f8d21.tar.gz |
Bug 1222908 - Remove mp_cmp_int() r=franziskus,mt,rrelyea
Diffstat (limited to 'lib/freebl/ecl')
-rw-r--r-- | lib/freebl/ecl/ecp_jac.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/freebl/ecl/ecp_jac.c b/lib/freebl/ecl/ecp_jac.c index f174b1692..0eea3fadc 100644 --- a/lib/freebl/ecl/ecp_jac.c +++ b/lib/freebl/ecl/ecp_jac.c @@ -232,7 +232,9 @@ ec_GFp_pt_dbl_jac(const mp_int *px, const mp_int *py, const mp_int *pz, MP_CHECKOK(group->meth->field_add(&t0, &M, &t0, group->meth)); MP_CHECKOK(group->meth-> field_add(&t0, &group->curvea, &M, group->meth)); - } else if (mp_cmp_int(&group->curvea, -3) == 0) { + } else if (MP_SIGN(&group->curvea) == MP_NEG && + MP_USED(&group->curvea) == 1 && + MP_DIGIT(&group->curvea, 0) == 3) { /* M = 3 * (px + pz^2) * (px - pz^2) */ MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth)); MP_CHECKOK(group->meth->field_add(px, &M, &t0, group->meth)); |