Commit eb8e052c authored by Kunxian Xia's avatar Kunxian Xia Committed by Rich Salz
Browse files

Correct the equation for Y' in the comment of point_double function

parent a9b7a06e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -813,7 +813,7 @@ static void copy_conditional(felem out, const felem in, limb icopy)
 * Double an elliptic curve point:
 * (X', Y', Z') = 2 * (X, Y, Z), where
 * X' = (3 * (X - Z^2) * (X + Z^2))^2 - 8 * X * Y^2
 * Y' = 3 * (X - Z^2) * (X + Z^2) * (4 * X * Y^2 - X') - 8 * Y^2
 * Y' = 3 * (X - Z^2) * (X + Z^2) * (4 * X * Y^2 - X') - 8 * Y^4
 * Z' = (Y + Z)^2 - Y^2 - Z^2 = 2 * Y * Z
 * Outputs can equal corresponding inputs, i.e., x_out == x_in is allowed,
 * while x_out == y_in is not (maybe this works, but it's not tested).