Correct the equation for Y' in the comment of point_double function
authorKunxian Xia <xiakunxian130@gmail.com>
Mon, 9 Apr 2018 12:38:51 +0000 (08:38 -0400)
committerRich Salz <rsalz@openssl.org>
Mon, 9 Apr 2018 12:38:51 +0000 (08:38 -0400)
CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5908)

crypto/ec/ecp_nistp224.c

index 346f84dcde2ed37bacc28f268c980349ad4d0dbe..5b8da3f817e173027f19bb0b138883be62b145f0 100644 (file)
@@ -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).