Commit 19ef5194 authored by Niels Möller's avatar Niels Möller

Deleted unused function ecc_modp_sub_1.

parent a0221c33
2014-08-23 Niels Möller <nisse@lysator.liu.se>
* ecc-modp.c (ecc_modp_sub_1): Deleted unused function.
* ecc-internal.h: Deleted corresponding declaration.
* examples/nettle-benchmark.c (time_cipher): Fixed memset calls,
amending the totally broken change from 2014-02-06.
......
......@@ -45,7 +45,6 @@
#define ecc_generic_modq _nettle_ecc_generic_modq
#define ecc_modp_add _nettle_ecc_modp_add
#define ecc_modp_sub _nettle_ecc_modp_sub
#define ecc_modp_sub_1 _nettle_ecc_modp_sub_1
#define ecc_modp_mul_1 _nettle_ecc_modp_mul_1
#define ecc_modp_addmul_1 _nettle_ecc_modp_addmul_1
#define ecc_modp_submul_1 _nettle_ecc_modp_submul_1
......@@ -158,10 +157,6 @@ void
ecc_modp_sub (const struct ecc_curve *ecc, mp_limb_t *rp,
const mp_limb_t *ap, const mp_limb_t *bp);
void
ecc_modp_sub_1 (const struct ecc_curve *ecc, mp_limb_t *rp,
const mp_limb_t *ap, mp_limb_t b);
void
ecc_modp_mul_1 (const struct ecc_curve *ecc, mp_limb_t *rp,
const mp_limb_t *ap, const mp_limb_t b);
......
......@@ -64,22 +64,6 @@ ecc_modp_sub (const struct ecc_curve *ecc, mp_limb_t *rp,
assert (cy == 0);
}
void
ecc_modp_sub_1 (const struct ecc_curve *ecc, mp_limb_t *rp,
const mp_limb_t *ap, mp_limb_t b)
{
mp_size_t i;
for (i = 0; i < ecc->size; i++)
{
mp_limb_t cy = ap[i] < b;
rp[i] = ap[i] - b;
b = cy;
}
b = cnd_sub_n (b, rp, ecc->Bmodp, ecc->size);
assert (b == 0);
}
void
ecc_modp_mul_1 (const struct ecc_curve *ecc, mp_limb_t *rp,
const mp_limb_t *ap, mp_limb_t b)
......
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