summaryrefslogtreecommitdiff
path: root/ecc-dup-th.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2020-02-10 18:09:33 +0300
committerNiels Möller <nisse@lysator.liu.se>2020-02-15 10:33:28 +0100
commit93eb83f20d56ff25dd57f3fa4e810cdf8d488239 (patch)
tree681d695bc06140a488bb9247aaaa67264adfa7cf /ecc-dup-th.c
parentd7f2dae963d279782582d785c80ddef377dfe6dc (diff)
downloadnettle-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 'ecc-dup-th.c')
-rw-r--r--ecc-dup-th.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/ecc-dup-th.c b/ecc-dup-th.c
index b4ce95c9..dd95b84a 100644
--- a/ecc-dup-th.c
+++ b/ecc-dup-th.c
@@ -81,29 +81,29 @@ ecc_dup_th (const struct ecc_curve *ecc,
#define J (scratch + 4*ecc->p.size)
/* B */
- ecc_modp_add (ecc, F, p, p + ecc->p.size);
- ecc_modp_sqr (ecc, B, F);
+ ecc_mod_add (&ecc->p, F, p, p + ecc->p.size);
+ ecc_mod_sqr (&ecc->p, B, F);
/* C */
- ecc_modp_sqr (ecc, C, p);
+ ecc_mod_sqr (&ecc->p, C, p);
/* D */
- ecc_modp_sqr (ecc, D, p + ecc->p.size);
+ ecc_mod_sqr (&ecc->p, D, p + ecc->p.size);
/* Can use r as scratch, even for in-place operation. */
- ecc_modp_sqr (ecc, r, p + 2*ecc->p.size);
+ ecc_mod_sqr (&ecc->p, r, p + 2*ecc->p.size);
/* F, */
- ecc_modp_sub (ecc, F, D, C);
+ ecc_mod_sub (&ecc->p, F, D, C);
/* B - C - D */
- ecc_modp_add (ecc, C, C, D);
- ecc_modp_sub (ecc, B, B, C);
+ ecc_mod_add (&ecc->p, C, C, D);
+ ecc_mod_sub (&ecc->p, B, B, C);
/* J */
- ecc_modp_add (ecc, r, r, r);
- ecc_modp_sub (ecc, J, r, F);
+ ecc_mod_add (&ecc->p, r, r, r);
+ ecc_mod_sub (&ecc->p, J, r, F);
/* x' */
- ecc_modp_mul (ecc, r, B, J);
+ ecc_mod_mul (&ecc->p, r, B, J);
/* y' */
- ecc_modp_mul (ecc, r + ecc->p.size, F, C);
+ ecc_mod_mul (&ecc->p, r + ecc->p.size, F, C);
/* z' */
- ecc_modp_mul (ecc, B, F, J);
+ ecc_mod_mul (&ecc->p, B, F, J);
mpn_copyi (r + 2*ecc->p.size, B, ecc->p.size);
}