2014-09-22 Niels Möller <nisse@lysator.liu.se>
+ * examples/ecc-benchmark.c (bench_modinv_powm, bench_curve):
+ Updated benchmarking of mpn_sec_powm.
+
* ecc-internal.h (struct ecc_curve): Deleted redc function
pointer. Use only reduce pointer, which is redc or modp as
applicable. Updated all users.
const struct ecc_curve *ecc = ctx->ecc;
mp_size_t size = ecc->p.size;
- mpn_sub_1 (ctx->rp + size, ecc->p, size, 2);
+ mpn_sub_1 (ctx->rp + size, ecc->p.m, size, 2);
mpn_sec_powm (ctx->rp, ctx->ap, size,
- ctx->rp + size, ecc->bit_size,
- ecc->p, size, ctx->tp);
+ ctx->rp + size, ecc->p.bit_size,
+ ecc->p.m, size, ctx->tp);
}
#endif
#ifdef mpn_sec_powm
{
mp_size_t powm_itch
- = mpn_sec_powm_itch (ecc->p.size, ecc->bit_size, ecc->p.size);
+ = mpn_sec_powm_itch (ecc->p.size, ecc->p.bit_size, ecc->p.size);
if (powm_itch > itch)
itch = powm_itch;
}