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.
#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
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);
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)