summaryrefslogtreecommitdiff
path: root/eccdata.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2014-07-02 09:59:37 +0200
committerNiels Möller <nisse@lysator.liu.se>2014-07-02 09:59:37 +0200
commit19f7da48ea790a826d04f5f96e5db60c9f26ca45 (patch)
tree95533c28709d31ae5447cfb6a11b1cb3924e440b /eccdata.c
parent02416dc7f8f713f9d72967b67f497333c91a7dab (diff)
downloadnettle-19f7da48ea790a826d04f5f96e5db60c9f26ca45.tar.gz
Use mpz_submul_ui.
Diffstat (limited to 'eccdata.c')
-rw-r--r--eccdata.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/eccdata.c b/eccdata.c
index b8dc0011..13717bb1 100644
--- a/eccdata.c
+++ b/eccdata.c
@@ -151,9 +151,7 @@ ecc_dup (const struct ecc_curve *ecc,
/* x' = t^2 - 2 x */
mpz_mul (x, t, t);
- /* mpz_submul_ui (x, p->x, 2); not available in mini-gmp */
- mpz_mul_ui (m, p->x, 2);
- mpz_sub (x, x, m);
+ mpz_submul_ui (x, p->x, 2);
mpz_mod (x, x, ecc->p);
/* y' = (x - x') * t - y */