Skip to content
Snippets Groups Projects
Commit 0118df62 authored by Niels Möller's avatar Niels Möller
Browse files

Updated FIXME comments.

parent 02c617a9
No related branches found
No related tags found
No related merge requests found
...@@ -72,12 +72,11 @@ ecc_eh_to_a (const struct ecc_curve *ecc, ...@@ -72,12 +72,11 @@ ecc_eh_to_a (const struct ecc_curve *ecc,
mp_limb_t cy; mp_limb_t cy;
ecc_modp_sub (ecc, izp, wp, vp); /* NOTE: For the infinity point, this subtraction gives zero (mod
/* FIXME: For the infinity point, this subtraction gives zero (mod
p), which isn't invertible. For curve25519, the desired output is p), which isn't invertible. For curve25519, the desired output is
x = 0, which we get if the modular inversion function returns 0 x = 0, and we should be fine, since ecc_modp_inv returns 0
in this case. Need to check that modular inversion really returns in this case. */
0. */ ecc_modp_sub (ecc, izp, wp, vp);
ecc_modp_mul (ecc, izp + ecc->size, izp, up); ecc_modp_mul (ecc, izp + ecc->size, izp, up);
/* Needs 3*size scratch */ /* Needs 3*size scratch */
ecc_modp_inv (ecc, izp, izp + ecc->size, izp + 2*ecc->size); ecc_modp_inv (ecc, izp, izp + ecc->size, izp + 2*ecc->size);
...@@ -93,7 +92,9 @@ ecc_eh_to_a (const struct ecc_curve *ecc, ...@@ -93,7 +92,9 @@ ecc_eh_to_a (const struct ecc_curve *ecc,
/* Skip y coordinate */ /* Skip y coordinate */
return; return;
ecc_modp_add (ecc, sp, wp, vp); /* FIXME: Redundant */ ecc_modp_add (ecc, sp, wp, vp); /* FIXME: Redundant. Also the (W +
V) Z^-1 multiplication is
redundant. */
ecc_modp_mul (ecc, tp, sp, wp); ecc_modp_mul (ecc, tp, sp, wp);
mpn_copyi (sp, tp, ecc->size); /* FIXME: Eliminate copy */ mpn_copyi (sp, tp, ecc->size); /* FIXME: Eliminate copy */
ecc_modp_mul (ecc, tp, sp, ecc->edwards_root); ecc_modp_mul (ecc, tp, sp, ecc->edwards_root);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment