Commit dd94851a authored by Niels Möller's avatar Niels Möller

Deleted unused INITIAL argument for ecc_a_to_j.

parent 308c1089
2014-08-23 Niels Möller <nisse@lysator.liu.se> 2014-08-23 Niels Möller <nisse@lysator.liu.se>
* ecc-a-to-j.c (ecc_a_to_j): Deleted INITIAL argument.
* ecc.h (ecc_a_to_j): Updated prototype.
* ecc-mul-a.c (ecc_mul_a, table_init): Updated calls to ecc_a_to_j.
* ecc-mul-a.c (ecc_mul_a): Deleted INITIAL argument, all callers, * ecc-mul-a.c (ecc_mul_a): Deleted INITIAL argument, all callers,
except the tests, pass 1. Updated all callers. except the tests, pass 1. Updated all callers.
(table_init): Likewise deleted INITIAL. (table_init): Likewise deleted INITIAL.
......
...@@ -40,10 +40,9 @@ ...@@ -40,10 +40,9 @@
void void
ecc_a_to_j (const struct ecc_curve *ecc, ecc_a_to_j (const struct ecc_curve *ecc,
int initial,
mp_limb_t *r, const mp_limb_t *p) mp_limb_t *r, const mp_limb_t *p)
{ {
if (ecc->use_redc && initial) if (ecc->use_redc)
{ {
mpn_copyd (r + ecc->size, p, 2*ecc->size); mpn_copyd (r + ecc->size, p, 2*ecc->size);
......
...@@ -67,7 +67,7 @@ ecc_mul_a (const struct ecc_curve *ecc, ...@@ -67,7 +67,7 @@ ecc_mul_a (const struct ecc_curve *ecc,
unsigned i; unsigned i;
ecc_a_to_j (ecc, 1, pj, p); ecc_a_to_j (ecc, pj, p);
mpn_zero (r, 3*ecc->size); mpn_zero (r, 3*ecc->size);
for (i = ecc->size, is_zero = 1; i-- > 0; ) for (i = ecc->size, is_zero = 1; i-- > 0; )
...@@ -111,7 +111,7 @@ table_init (const struct ecc_curve *ecc, ...@@ -111,7 +111,7 @@ table_init (const struct ecc_curve *ecc,
unsigned j; unsigned j;
mpn_zero (TABLE(0), 3*ecc->size); mpn_zero (TABLE(0), 3*ecc->size);
ecc_a_to_j (ecc, 1, TABLE(1), p); ecc_a_to_j (ecc, TABLE(1), p);
for (j = 2; j < size; j += 2) for (j = 2; j < size; j += 2)
{ {
......
...@@ -179,11 +179,9 @@ ecc_size_j (const struct ecc_curve *ecc); ...@@ -179,11 +179,9 @@ ecc_size_j (const struct ecc_curve *ecc);
infinity points properly? */ infinity points properly? */
/* Converts a point P in affine coordinates into a point R in jacobian /* Converts a point P in affine coordinates into a point R in jacobian
coordinates. If INITIAL is non-zero, and the curve uses montgomery coordinates. */
coordinates, also convert coordinates to montgomery form. */
void void
ecc_a_to_j (const struct ecc_curve *ecc, ecc_a_to_j (const struct ecc_curve *ecc,
int initial,
mp_limb_t *r, const mp_limb_t *p); mp_limb_t *r, const mp_limb_t *p);
/* Converts a point P in jacobian coordinates into a point R in affine /* Converts a point P in jacobian coordinates into a point R in affine
......
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