summaryrefslogtreecommitdiff
path: root/ecc-add-jja.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2020-11-06 19:46:32 +0100
committerNiels Möller <nisse@lysator.liu.se>2020-11-06 19:46:32 +0100
commitd6f3118575ad48fbae0e29d8e88280e4d6b7210e (patch)
tree4a91975287dc07f1ca01f65266c9580cf8a4eb18 /ecc-add-jja.c
parent001f561974b823418c8353df770b3b1b5129cde0 (diff)
downloadnettle-d6f3118575ad48fbae0e29d8e88280e4d6b7210e.tar.gz
Delete unneeded copy in ecc_add_jja.
Diffstat (limited to 'ecc-add-jja.c')
-rw-r--r--ecc-add-jja.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ecc-add-jja.c b/ecc-add-jja.c
index a8f92fe6..a79f995e 100644
--- a/ecc-add-jja.c
+++ b/ecc-add-jja.c
@@ -119,7 +119,6 @@ ecc_add_jja (const struct ecc_curve *ecc,
/* y_3, use (h, hh) as sqratch */
ecc_mod_mul (&ecc->p, h, y1, j, h); /* frees j */
ecc_mod_sub (&ecc->p, r + ecc->p.size, v, r);
- ecc_mod_mul (&ecc->p, j, r + ecc->p.size, w, j);
- ecc_mod_submul_1 (&ecc->p, j, h, 2);
- mpn_copyi (r + ecc->p.size, j, ecc->p.size);
+ ecc_mod_mul (&ecc->p, r + ecc->p.size, r + ecc->p.size, w, j);
+ ecc_mod_submul_1 (&ecc->p, r + ecc->p.size, h, 2);
}