From d723525c987386f368911dd2572490b2417f8d21 Mon Sep 17 00:00:00 2001 From: Tim Taubert Date: Thu, 21 Apr 2016 12:03:16 +0200 Subject: Bug 1222908 - Remove mp_cmp_int() r=franziskus,mt,rrelyea --- lib/freebl/ecl/ecp_jac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/freebl/ecl') 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)); -- cgit v1.2.1