summaryrefslogtreecommitdiff
path: root/ecc-curve448.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2020-10-28 21:48:10 +0100
committerNiels Möller <nisse@lysator.liu.se>2020-10-28 21:48:10 +0100
commit2f3c633e94f09cd03a94ffd8f7ddac4020da81e7 (patch)
treededc83ac498c670e493e7df26f7b2fae90dc6c2b /ecc-curve448.c
parent1cbc9e094eae458ff83b0a59c33a929520c51a63 (diff)
downloadnettle-use-mpn_cnd-functions.tar.gz
Use GMP functions mpn_cnd_add_n, mpn_cnd_sub_n and mpn_cnd_swap.use-mpn_cnd-functions
Diffstat (limited to 'ecc-curve448.c')
-rw-r--r--ecc-curve448.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ecc-curve448.c b/ecc-curve448.c
index 729ce985..c00faa30 100644
--- a/ecc-curve448.c
+++ b/ecc-curve448.c
@@ -91,7 +91,7 @@ ecc_curve448_modp(const struct ecc_modulo *m, mp_limb_t *rp)
tp[4] = c4 + (c7 >> 32) + (tp[3] < c3);
tp[5] = tp[6] = 0;
c7 = mpn_add_n (rp, rp, tp, 7);
- c7 = cnd_add_n (c7, rp, m->B, 7);
+ c7 = mpn_cnd_add_n (c7, rp, rp, m->B, 7);
assert (c7 == 0);
}
#else
@@ -165,7 +165,7 @@ ecc_curve448_zero_p (const struct ecc_modulo *p, mp_limb_t *xp)
mp_limb_t w;
mp_size_t i;
cy = mpn_sub_n (xp, xp, p->m, ECC_LIMB_SIZE);
- cnd_add_n (cy, xp, p->m, ECC_LIMB_SIZE);
+ mpn_cnd_add_n (cy, xp, xp, p->m, ECC_LIMB_SIZE);
for (i = 0, w = 0; i < ECC_LIMB_SIZE; i++)
w |= xp[i];