]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Comment fixes.
authorNiels Möller <nisse@lysator.liu.se>
Sat, 23 Sep 2017 09:33:31 +0000 (11:33 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 23 Sep 2017 09:33:31 +0000 (11:33 +0200)
ecc-eh-to-a.c
ecc-internal.h

index b9d412d21a7a5dc70da7d0cd9b56a3c9c236fc60..8173b887d59d918740e8320edba74d4c0f50d81a 100644 (file)
@@ -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);
index 643277c086736c61d0d5a6a9b060e2ed26ee8fc3..5090dec734262d632096d4f6789dcd9a19b11f56 100644 (file)
@@ -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,