Commit 971bed6a 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.

(cherry picked from commit 5b7608fd)
parent a6389379
2021-03-13 Niels Möller <>
* eddsa-verify.c (equal_h): Use ecc_mod_mul_canonical.
2021-03-11 Niels Möller <>
* 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;
Supports Markdown
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