Commit 5b7608fd authored by Niels Möller's avatar Niels Möller
Browse files

Use ecc_mod_mul_canonical for point comparison.

* eddsa-verify.c (equal_h): Use ecc_mod_mul_canonical.
parent 2bf497ba
2021-03-13 Niels Möller <nisse@lysator.liu.se>
* eddsa-verify.c (equal_h): Use ecc_mod_mul_canonical.
2021-03-11 Niels Möller <nisse@lysator.liu.se>
* ecc-mod-arith.c (ecc_mod_mul_canonical, ecc_mod_sqr_canonical):
......
......@@ -53,13 +53,8 @@ equal_h (const struct ecc_modulo *p,
#define t0 scratch
#define t1 (scratch + p->size)
ecc_mod_mul (p, t0, x1, z2, t0);
if (mpn_cmp (t0, p->m, p->size) >= 0)
mpn_sub_n (t0, t0, p->m, p->size);
ecc_mod_mul (p, t1, x2, z1, t1);
if (mpn_cmp (t1, p->m, p->size) >= 0)
mpn_sub_n (t1, t1, p->m, p->size);
ecc_mod_mul_canonical (p, t0, x1, z2, t0);
ecc_mod_mul_canonical (p, t1, x2, z1, t1);
return mpn_cmp (t0, t1, p->size) == 0;
......
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