summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ecp_methods.c
diff options
context:
space:
mode:
authortb <>2025-01-11 13:58:31 +0000
committertb <>2025-01-11 13:58:31 +0000
commit9c5cffbcbf9cbe48fd4c1ced980da5a0201c9550 (patch)
tree460f3b16a854d1bc55ed31d9d7db53ad50353aa0 /src/lib/libcrypto/ec/ecp_methods.c
parent5ea88094167c5741d321839ce7cb0186a8a7028f (diff)
downloadopenbsd-9c5cffbcbf9cbe48fd4c1ced980da5a0201c9550.tar.gz
openbsd-9c5cffbcbf9cbe48fd4c1ced980da5a0201c9550.tar.bz2
openbsd-9c5cffbcbf9cbe48fd4c1ced980da5a0201c9550.zip
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
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_methods.c')
-rw-r--r--src/lib/libcrypto/ec/ecp_methods.c8
1 files changed, 4 insertions, 4 deletions
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 @@
1/* $OpenBSD: ecp_methods.c,v 1.27 2025/01/11 13:38:42 tb Exp $ */ 1/* $OpenBSD: ecp_methods.c,v 1.28 2025/01/11 13:58:31 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.
@@ -892,7 +892,7 @@ ec_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
892} 892}
893 893
894static int 894static int
895ec_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], 895ec_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT **points,
896 BN_CTX *ctx) 896 BN_CTX *ctx)
897{ 897{
898 BIGNUM **prod_Z = NULL; 898 BIGNUM **prod_Z = NULL;
@@ -1425,12 +1425,12 @@ static const EC_METHOD ec_GFp_simple_method = {
1425 .point_set_affine_coordinates = ec_point_set_affine_coordinates, 1425 .point_set_affine_coordinates = ec_point_set_affine_coordinates,
1426 .point_get_affine_coordinates = ec_point_get_affine_coordinates, 1426 .point_get_affine_coordinates = ec_point_get_affine_coordinates,
1427 .point_set_compressed_coordinates = ec_set_compressed_coordinates, 1427 .point_set_compressed_coordinates = ec_set_compressed_coordinates,
1428 .points_make_affine = ec_points_make_affine,
1428 .add = ec_add, 1429 .add = ec_add,
1429 .dbl = ec_dbl, 1430 .dbl = ec_dbl,
1430 .invert = ec_invert, 1431 .invert = ec_invert,
1431 .is_on_curve = ec_is_on_curve, 1432 .is_on_curve = ec_is_on_curve,
1432 .point_cmp = ec_cmp, 1433 .point_cmp = ec_cmp,
1433 .points_make_affine = ec_points_make_affine,
1434 .mul_generator_ct = ec_mul_generator_ct, 1434 .mul_generator_ct = ec_mul_generator_ct,
1435 .mul_single_ct = ec_mul_single_ct, 1435 .mul_single_ct = ec_mul_single_ct,
1436 .mul_double_nonct = ec_mul_double_nonct, 1436 .mul_double_nonct = ec_mul_double_nonct,
@@ -1452,12 +1452,12 @@ static const EC_METHOD ec_GFp_mont_method = {
1452 .point_set_affine_coordinates = ec_point_set_affine_coordinates, 1452 .point_set_affine_coordinates = ec_point_set_affine_coordinates,
1453 .point_get_affine_coordinates = ec_point_get_affine_coordinates, 1453 .point_get_affine_coordinates = ec_point_get_affine_coordinates,
1454 .point_set_compressed_coordinates = ec_set_compressed_coordinates, 1454 .point_set_compressed_coordinates = ec_set_compressed_coordinates,
1455 .points_make_affine = ec_points_make_affine,
1455 .add = ec_add, 1456 .add = ec_add,
1456 .dbl = ec_dbl, 1457 .dbl = ec_dbl,
1457 .invert = ec_invert, 1458 .invert = ec_invert,
1458 .is_on_curve = ec_is_on_curve, 1459 .is_on_curve = ec_is_on_curve,
1459 .point_cmp = ec_cmp, 1460 .point_cmp = ec_cmp,
1460 .points_make_affine = ec_points_make_affine,
1461 .mul_generator_ct = ec_mul_generator_ct, 1461 .mul_generator_ct = ec_mul_generator_ct,
1462 .mul_single_ct = ec_mul_single_ct, 1462 .mul_single_ct = ec_mul_single_ct,
1463 .mul_double_nonct = ec_mul_double_nonct, 1463 .mul_double_nonct = ec_mul_double_nonct,