Skip to content
Snippets Groups Projects
Commit 19f7da48 authored by Niels Möller's avatar Niels Möller
Browse files

Use mpz_submul_ui.

parent 02416dc7
No related branches found
No related tags found
No related merge requests found
2014-07-02 Niels Möller <nisse@lysator.liu.se>
* eccdata.c (ecc_dup): Use mpz_submul_ui, now available in
mini-gmp.
2014-06-30 Niels Möller <nisse@lysator.liu.se> 2014-06-30 Niels Möller <nisse@lysator.liu.se>
* camellia-absorb.c: Include <limits.h>, needed for correct use of * camellia-absorb.c: Include <limits.h>, needed for correct use of
......
...@@ -151,9 +151,7 @@ ecc_dup (const struct ecc_curve *ecc, ...@@ -151,9 +151,7 @@ ecc_dup (const struct ecc_curve *ecc,
/* x' = t^2 - 2 x */ /* x' = t^2 - 2 x */
mpz_mul (x, t, t); mpz_mul (x, t, t);
/* mpz_submul_ui (x, p->x, 2); not available in mini-gmp */ mpz_submul_ui (x, p->x, 2);
mpz_mul_ui (m, p->x, 2);
mpz_sub (x, x, m);
mpz_mod (x, x, ecc->p); mpz_mod (x, x, ecc->p);
/* y' = (x - x') * t - y */ /* y' = (x - x') * t - y */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment