summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2025-01-06 12:36:41 +0000
committerjsing <>2025-01-06 12:36:41 +0000
commitfafe30f82ec033509fdf464bd0f8a9e3b9b2a12f (patch)
treeba8bff059e64a65423b4174c17f79d7ef590ff66
parent75d0c2055bd9a0ead97a9eaa83b7887c8a89f10e (diff)
downloadopenbsd-fafe30f82ec033509fdf464bd0f8a9e3b9b2a12f.tar.gz
openbsd-fafe30f82ec033509fdf464bd0f8a9e3b9b2a12f.tar.bz2
openbsd-fafe30f82ec033509fdf464bd0f8a9e3b9b2a12f.zip
Revise comments to note that these are Jacobian projective coordinates.
-rw-r--r--src/lib/libcrypto/ec/ecp_methods.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ecp_methods.c b/src/lib/libcrypto/ec/ecp_methods.c
index 9ff27cf104..44322f27f2 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.21 2025/01/06 12:35:14 jsing Exp $ */ 1/* $OpenBSD: ecp_methods.c,v 1.22 2025/01/06 12:36:41 jsing 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.
@@ -289,7 +289,10 @@ ec_point_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point,
289 if ((Z_3 = BN_CTX_get(ctx)) == NULL) 289 if ((Z_3 = BN_CTX_get(ctx)) == NULL)
290 goto err; 290 goto err;
291 291
292 /* Convert from projective coordinates (X, Y, Z) into (X/Z^2, Y/Z^3). */ 292 /*
293 * Convert from Jacobian projective coordinates (X, Y, Z) into
294 * (X/Z^2, Y/Z^3).
295 */
293 296
294 if (!ec_decode_scalar(group, z, point->Z, ctx)) 297 if (!ec_decode_scalar(group, z, point->Z, ctx))
295 goto err; 298 goto err;
@@ -1146,7 +1149,7 @@ ec_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
1146} 1149}
1147 1150
1148/* 1151/*
1149 * Apply randomization of EC point projective coordinates: 1152 * Apply randomization of EC point Jacobian projective coordinates:
1150 * 1153 *
1151 * (X, Y, Z) = (lambda^2 * X, lambda^3 * Y, lambda * Z) 1154 * (X, Y, Z) = (lambda^2 * X, lambda^3 * Y, lambda * Z)
1152 * 1155 *