summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2025-01-11 21:07:25 +0000
committertb <>2025-01-11 21:07:25 +0000
commit22081f1783889590b321c44967709d1831b1bac2 (patch)
treec3b78be636b334802312a7b0fc967d27ba2cf9f3
parentbed978106e5a26249556280f6db81a4b8114e947 (diff)
downloadopenbsd-22081f1783889590b321c44967709d1831b1bac2.tar.gz
openbsd-22081f1783889590b321c44967709d1831b1bac2.tar.bz2
openbsd-22081f1783889590b321c44967709d1831b1bac2.zip
ec_point_cmp: tidy up an ugly comment
-rw-r--r--src/lib/libcrypto/ec/ecp_methods.c12
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 */