From c33b0ea63bb7ece8f25e8e4de7822ee48dca43af Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niels=20M=C3=B6ller?= Date: Sat, 23 Sep 2017 11:33:31 +0200 Subject: [PATCH] Comment fixes. --- ecc-eh-to-a.c | 7 ++++--- ecc-internal.h | 9 ++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ecc-eh-to-a.c b/ecc-eh-to-a.c index b9d412d2..8173b887 100644 --- a/ecc-eh-to-a.c +++ b/ecc-eh-to-a.c @@ -68,9 +68,10 @@ ecc_eh_to_a (const struct ecc_curve *ecc, /* Skip y coordinate */ if (op > 1) { - /* Reduce modulo q. FIXME: Hardcoded for curve25519, - duplicates end of ecc_25519_modq. FIXME: Is this needed - at all? Full reduction mod p is maybe sufficient. */ + /* Reduce modulo q. Hardcoded for curve25519, duplicates end + of ecc_25519_modq. FIXME: Is this needed at all? op > 0 + is only used by ecdsa code, and ecdsa on Edwards curves + makes little sense and is is only used by tests. */ unsigned shift; assert (ecc->p.bit_size == 255); shift = ecc->q.bit_size - 1 - GMP_NUMB_BITS * (ecc->p.size - 1); diff --git a/ecc-internal.h b/ecc-internal.h index 643277c0..5090dec7 100644 --- a/ecc-internal.h +++ b/ecc-internal.h @@ -283,17 +283,16 @@ ecc_a_to_j (const struct ecc_curve *ecc, /* Converts a point P in jacobian coordinates into a point R in affine coordinates. If op == 1, produce x coordinate only. If op == 2, - produce the x coordiante only, and in also it modulo q. FIXME: For - the public interface, have separate for the three cases, and use - this flag argument only for the internal ecc->h_to_a function. */ + produce the x coordinate only, and also reduce it modulo q. */ void ecc_j_to_a (const struct ecc_curve *ecc, int op, mp_limb_t *r, const mp_limb_t *p, mp_limb_t *scratch); -/* Converts a point P on an Edwards curve to affine coordinates on - the corresponding Montgomery curve. */ +/* Converts a point P in homogeneous coordinates on an Edwards curve + to affine coordinates. Meaning of op is the same as for + ecc_j_to_a. */ void ecc_eh_to_a (const struct ecc_curve *ecc, int op, -- 2.47.2