Commit 19f7da48 authored by Niels Möller's avatar Niels Möller

Use mpz_submul_ui.

parent 02416dc7
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>
* camellia-absorb.c: Include <limits.h>, needed for correct use of
......
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment