diff options
| author | jsing <> | 2025-01-06 12:36:41 +0000 |
|---|---|---|
| committer | jsing <> | 2025-01-06 12:36:41 +0000 |
| commit | 051a032902292b03f16e63ce6ed25db3377355c3 (patch) | |
| tree | ba8bff059e64a65423b4174c17f79d7ef590ff66 /src/lib/libcrypto/ec/ecp_methods.c | |
| parent | a17554dd266dd401e31d7f1f76fdd12969d11aaf (diff) | |
| download | openbsd-051a032902292b03f16e63ce6ed25db3377355c3.tar.gz openbsd-051a032902292b03f16e63ce6ed25db3377355c3.tar.bz2 openbsd-051a032902292b03f16e63ce6ed25db3377355c3.zip | |
Revise comments to note that these are Jacobian projective coordinates.
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_methods.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ecp_methods.c | 9 |
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 | * |
