From 9c5cffbcbf9cbe48fd4c1ced980da5a0201c9550 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 11 Jan 2025 13:58:31 +0000 Subject: Neuter the EC_POINTs_* API EC_POINTs_mul() was only ever used by Ruby and they stopped doing so for LibreSSL when we incorporated the constant time multiplication work of Brumley et al and restricted the length of the points array to 1, making this API effectively useless. The only real reason you want to have an API to calculate \sum n_i P_i is for ECDSA where you want m * G + n * P. Whether something like his needs to be in the public API is doubtful. EC_POINTs_make_affine() is an implementation detail of EC_POINTs_mul(). As such it never really belonged into the public API. ok jsing --- src/lib/libcrypto/ec/ecp_methods.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/libcrypto/ec/ecp_methods.c') diff --git a/src/lib/libcrypto/ec/ecp_methods.c b/src/lib/libcrypto/ec/ecp_methods.c index a2a74334f4..d1895c959f 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.27 2025/01/11 13:38:42 tb Exp $ */ +/* $OpenBSD: ecp_methods.c,v 1.28 2025/01/11 13:58:31 tb Exp $ */ /* Includes code written by Lenka Fibikova * for the OpenSSL project. * Includes code written by Bodo Moeller for the OpenSSL project. @@ -892,7 +892,7 @@ ec_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx) } static int -ec_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], +ec_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT **points, BN_CTX *ctx) { BIGNUM **prod_Z = NULL; @@ -1425,12 +1425,12 @@ static const EC_METHOD ec_GFp_simple_method = { .point_set_affine_coordinates = ec_point_set_affine_coordinates, .point_get_affine_coordinates = ec_point_get_affine_coordinates, .point_set_compressed_coordinates = ec_set_compressed_coordinates, + .points_make_affine = ec_points_make_affine, .add = ec_add, .dbl = ec_dbl, .invert = ec_invert, .is_on_curve = ec_is_on_curve, .point_cmp = ec_cmp, - .points_make_affine = ec_points_make_affine, .mul_generator_ct = ec_mul_generator_ct, .mul_single_ct = ec_mul_single_ct, .mul_double_nonct = ec_mul_double_nonct, @@ -1452,12 +1452,12 @@ static const EC_METHOD ec_GFp_mont_method = { .point_set_affine_coordinates = ec_point_set_affine_coordinates, .point_get_affine_coordinates = ec_point_get_affine_coordinates, .point_set_compressed_coordinates = ec_set_compressed_coordinates, + .points_make_affine = ec_points_make_affine, .add = ec_add, .dbl = ec_dbl, .invert = ec_invert, .is_on_curve = ec_is_on_curve, .point_cmp = ec_cmp, - .points_make_affine = ec_points_make_affine, .mul_generator_ct = ec_mul_generator_ct, .mul_single_ct = ec_mul_single_ct, .mul_double_nonct = ec_mul_double_nonct, -- cgit v1.2.3-55-g6feb