From dcb5b6ad7bdcf3cba425ba834efe54dd8220a758 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 11 Jan 2025 15:26:07 +0000 Subject: Rename the is_on_curve() method to point_is_on_curve() Rename ec_is_on_curve() to ec_point_is_on_curve() and ec_cmp() to ec_point_cmp(). --- src/lib/libcrypto/ec/ec_lib.c | 6 +++--- src/lib/libcrypto/ec/ec_local.h | 4 ++-- src/lib/libcrypto/ec/ecp_methods.c | 15 ++++++++------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index a8b74ce89d..5bfa16df3c 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_lib.c,v 1.110 2025/01/11 15:02:42 tb Exp $ */ +/* $OpenBSD: ec_lib.c,v 1.111 2025/01/11 15:26:07 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -1250,7 +1250,7 @@ EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, if (ctx == NULL) goto err; - if (group->meth->is_on_curve == NULL) { + if (group->meth->point_is_on_curve == NULL) { ECerror(ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); goto err; } @@ -1258,7 +1258,7 @@ EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, ECerror(EC_R_INCOMPATIBLE_OBJECTS); goto err; } - ret = group->meth->is_on_curve(group, point, ctx); + ret = group->meth->point_is_on_curve(group, point, ctx); err: if (ctx != ctx_in) diff --git a/src/lib/libcrypto/ec/ec_local.h b/src/lib/libcrypto/ec/ec_local.h index 66ff15a4f8..ecb81fc50b 100644 --- a/src/lib/libcrypto/ec/ec_local.h +++ b/src/lib/libcrypto/ec/ec_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_local.h,v 1.58 2025/01/11 15:20:23 tb Exp $ */ +/* $OpenBSD: ec_local.h,v 1.59 2025/01/11 15:26:07 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -87,7 +87,7 @@ struct ec_method_st { int (*group_get_curve)(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); - int (*is_on_curve)(const EC_GROUP *, const EC_POINT *, BN_CTX *); + int (*point_is_on_curve)(const EC_GROUP *, const EC_POINT *, BN_CTX *); int (*point_cmp)(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b, BN_CTX *); diff --git a/src/lib/libcrypto/ec/ecp_methods.c b/src/lib/libcrypto/ec/ecp_methods.c index 8477fa547f..2ab5d48a6f 100644 --- a/src/lib/libcrypto/ec/ecp_methods.c +++ b/src/lib/libcrypto/ec/ecp_methods.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecp_methods.c,v 1.32 2025/01/11 15:20:23 tb Exp $ */ +/* $OpenBSD: ecp_methods.c,v 1.33 2025/01/11 15:26:07 tb Exp $ */ /* Includes code written by Lenka Fibikova * for the OpenSSL project. * Includes code written by Bodo Moeller for the OpenSSL project. @@ -167,7 +167,7 @@ ec_group_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, } static int -ec_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx) +ec_point_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx) { int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); int (*field_sqr) (const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *); @@ -268,7 +268,8 @@ ec_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx) */ static int -ec_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx) +ec_point_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, + BN_CTX *ctx) { int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); int (*field_sqr) (const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *); @@ -1324,8 +1325,8 @@ static const EC_METHOD ec_GFp_simple_method = { .field_type = NID_X9_62_prime_field, .group_set_curve = ec_group_set_curve, .group_get_curve = ec_group_get_curve, - .is_on_curve = ec_is_on_curve, - .point_cmp = ec_cmp, + .point_is_on_curve = ec_point_is_on_curve, + .point_cmp = ec_point_cmp, .point_set_affine_coordinates = ec_point_set_affine_coordinates, .point_get_affine_coordinates = ec_point_get_affine_coordinates, .points_make_affine = ec_points_make_affine, @@ -1350,8 +1351,8 @@ static const EC_METHOD ec_GFp_mont_method = { .field_type = NID_X9_62_prime_field, .group_set_curve = ec_mont_group_set_curve, .group_get_curve = ec_group_get_curve, - .is_on_curve = ec_is_on_curve, - .point_cmp = ec_cmp, + .point_is_on_curve = ec_point_is_on_curve, + .point_cmp = ec_point_cmp, .point_set_affine_coordinates = ec_point_set_affine_coordinates, .point_get_affine_coordinates = ec_point_get_affine_coordinates, .points_make_affine = ec_points_make_affine, -- cgit v1.2.3-55-g6feb