diff options
author | Niels Möller <nisse@lysator.liu.se> | 2014-07-02 09:59:37 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2014-07-02 09:59:37 +0200 |
commit | 19f7da48ea790a826d04f5f96e5db60c9f26ca45 (patch) | |
tree | 95533c28709d31ae5447cfb6a11b1cb3924e440b /eccdata.c | |
parent | 02416dc7f8f713f9d72967b67f497333c91a7dab (diff) | |
download | nettle-19f7da48ea790a826d04f5f96e5db60c9f26ca45.tar.gz |
Use mpz_submul_ui.
Diffstat (limited to 'eccdata.c')
-rw-r--r-- | eccdata.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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 */ |