diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2020-02-10 18:09:33 +0300 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2020-02-15 10:33:28 +0100 |
commit | 93eb83f20d56ff25dd57f3fa4e810cdf8d488239 (patch) | |
tree | 681d695bc06140a488bb9247aaaa67264adfa7cf /curve25519-eh-to-x.c | |
parent | d7f2dae963d279782582d785c80ddef377dfe6dc (diff) | |
download | nettle-93eb83f20d56ff25dd57f3fa4e810cdf8d488239.tar.gz |
ecc: remove ecc_modp_foo/ecc_modq_foo macros
To make ecc functions usage more obvious remove ecc_modp_foo() and
ecc_modq_foo() wrapper macros.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Diffstat (limited to 'curve25519-eh-to-x.c')
-rw-r--r-- | curve25519-eh-to-x.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/curve25519-eh-to-x.c b/curve25519-eh-to-x.c index 3a8787f0..1ce2dd83 100644 --- a/curve25519-eh-to-x.c +++ b/curve25519-eh-to-x.c @@ -62,14 +62,14 @@ curve25519_eh_to_x (mp_limb_t *xp, const mp_limb_t *p, */ /* NOTE: For the infinity point, this subtraction gives zero (mod p), which isn't invertible. For curve25519, the desired output is - x = 0, and we should be fine, since ecc_modp_inv returns 0 + x = 0, and we should be fine, since ecc_mod_inv for ecc->p returns 0 in this case. */ - ecc_modp_sub (ecc, t0, wp, vp); + ecc_mod_sub (&ecc->p, t0, wp, vp); /* Needs a total of 5*size storage. */ ecc->p.invert (&ecc->p, t1, t0, t2 + ecc->p.size); - ecc_modp_add (ecc, t0, wp, vp); - ecc_modp_mul (ecc, t2, t0, t1); + ecc_mod_add (&ecc->p, t0, wp, vp); + ecc_mod_mul (&ecc->p, t2, t0, t1); cy = mpn_sub_n (xp, t2, ecc->p.m, ecc->p.size); cnd_copy (cy, xp, t2, ecc->p.size); |