summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2014-08-23 23:31:47 +0200
committerNiels Möller <nisse@lysator.liu.se>2014-08-23 23:31:47 +0200
commitdd94851aaaea0e76992260b0696d6dc843c22819 (patch)
tree0d9c7f53ece6c00f84aa8c31d2e4874510d410f1
parent308c10895e695edd08b09453360b390b591c3c7e (diff)
downloadnettle-dd94851aaaea0e76992260b0696d6dc843c22819.tar.gz
Deleted unused INITIAL argument for ecc_a_to_j.
-rw-r--r--ChangeLog4
-rw-r--r--ecc-a-to-j.c3
-rw-r--r--ecc-mul-a.c4
-rw-r--r--ecc.h4
4 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ba0c738..874a1b7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
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,
except the tests, pass 1. Updated all callers.
(table_init): Likewise deleted INITIAL.
diff --git a/ecc-a-to-j.c b/ecc-a-to-j.c
index 5f7cc687..36e4d150 100644
--- a/ecc-a-to-j.c
+++ b/ecc-a-to-j.c
@@ -40,10 +40,9 @@
void
ecc_a_to_j (const struct ecc_curve *ecc,
- int initial,
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);
diff --git a/ecc-mul-a.c b/ecc-mul-a.c
index 6cfc8a48..82f72e65 100644
--- a/ecc-mul-a.c
+++ b/ecc-mul-a.c
@@ -67,7 +67,7 @@ ecc_mul_a (const struct ecc_curve *ecc,
unsigned i;
- ecc_a_to_j (ecc, 1, pj, p);
+ ecc_a_to_j (ecc, pj, p);
mpn_zero (r, 3*ecc->size);
for (i = ecc->size, is_zero = 1; i-- > 0; )
@@ -111,7 +111,7 @@ table_init (const struct ecc_curve *ecc,
unsigned j;
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)
{
diff --git a/ecc.h b/ecc.h
index 97de76e1..360d60b1 100644
--- a/ecc.h
+++ b/ecc.h
@@ -179,11 +179,9 @@ ecc_size_j (const struct ecc_curve *ecc);
infinity points properly? */
/* 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, also convert coordinates to montgomery form. */
+ coordinates. */
void
ecc_a_to_j (const struct ecc_curve *ecc,
- int initial,
mp_limb_t *r, const mp_limb_t *p);
/* Converts a point P in jacobian coordinates into a point R in affine