diff options
-rw-r--r-- | src/lib/libcrypto/ec/ecp_methods.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/libcrypto/ec/ecp_methods.c b/src/lib/libcrypto/ec/ecp_methods.c index 2ab5d48a6f..4ab5c35080 100644 --- a/src/lib/libcrypto/ec/ecp_methods.c +++ b/src/lib/libcrypto/ec/ecp_methods.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_methods.c,v 1.33 2025/01/11 15:26:07 tb Exp $ */ | 1 | /* $OpenBSD: ecp_methods.c,v 1.34 2025/01/11 21:07:25 tb Exp $ */ |
2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
3 | * for the OpenSSL project. | 3 | * for the OpenSSL project. |
4 | * Includes code written by Bodo Moeller for the OpenSSL project. | 4 | * Includes code written by Bodo Moeller for the OpenSSL project. |
@@ -194,12 +194,10 @@ ec_point_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx) | |||
194 | goto err; | 194 | goto err; |
195 | 195 | ||
196 | /* | 196 | /* |
197 | * We have a curve defined by a Weierstrass equation y^2 = x^3 + a*x | 197 | * The curve is defined by a Weierstrass equation y^2 = x^3 + a*x + b. |
198 | * + b. The point to consider is given in Jacobian projective | 198 | * The point is given in Jacobian projective coordinates where (X, Y, Z) |
199 | * coordinates where (X, Y, Z) represents (x, y) = (X/Z^2, Y/Z^3). | 199 | * represents (x, y) = (X/Z^2, Y/Z^3). Substituting this and multiplying |
200 | * Substituting this and multiplying by Z^6 transforms the above | 200 | * by Z^6 transforms the above into Y^2 = X^3 + a*X*Z^4 + b*Z^6. |
201 | * equation into Y^2 = X^3 + a*X*Z^4 + b*Z^6. To test this, we add up | ||
202 | * the right-hand side in 'rh'. | ||
203 | */ | 201 | */ |
204 | 202 | ||
205 | /* rh := X^2 */ | 203 | /* rh := X^2 */ |