Commit 2fd0eb16 authored by Niels Möller's avatar Niels Möller

Fixed bug in 64-bit ecc_384_modp.

parent ad85f7ac
2013-02-27 Niels Möller <nisse@lysator.liu.se>
* ecc-384.c (ecc_384_modp): Fixed typo which broke carry handling
in the 64-bit version.
* examples/ecc-benchmark.c (bench_add_jjj): Typo fix, benchmark
the right function.
......
......@@ -114,7 +114,7 @@ ecc_384_modp (const struct ecc_curve *ecc, mp_limb_t *rp)
/* Reduce from 9 to 6 limbs */
tp[0] = 0;
mpn_copyi (tp + 1, rp + 6, 2);
tp[3] = rp[8] -= mpn_sub_n (tp, tp, rp + 6, 3);
tp[3] = rp[8] - mpn_sub_n (tp, tp, rp + 6, 3);
tp[4] = mpn_lshift (tp, tp, 4, 32);
cy = mpn_add_n (rp, rp, rp + 6, 3);
......
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