diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_methods.c')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_methods.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/lib/libcrypto/ec/ecp_methods.c b/src/lib/libcrypto/ec/ecp_methods.c index 718bd4565a..62966e14d6 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.39 2025/01/17 11:11:27 tb Exp $ */ | 1 | /* $OpenBSD: ecp_methods.c,v 1.40 2025/01/22 09:56:58 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. |
@@ -1023,13 +1023,8 @@ ec_mul_ct(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, | |||
1023 | if ((s = EC_POINT_new(group)) == NULL) | 1023 | if ((s = EC_POINT_new(group)) == NULL) |
1024 | goto err; | 1024 | goto err; |
1025 | 1025 | ||
1026 | if (point == NULL) { | 1026 | if (!EC_POINT_copy(s, point)) |
1027 | if (!EC_POINT_copy(s, group->generator)) | 1027 | goto err; |
1028 | goto err; | ||
1029 | } else { | ||
1030 | if (!EC_POINT_copy(s, point)) | ||
1031 | goto err; | ||
1032 | } | ||
1033 | 1028 | ||
1034 | EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME); | 1029 | EC_POINT_BN_set_flags(s, BN_FLG_CONSTTIME); |
1035 | 1030 | ||
@@ -1195,13 +1190,6 @@ ec_mul_ct(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, | |||
1195 | #undef EC_POINT_CSWAP | 1190 | #undef EC_POINT_CSWAP |
1196 | 1191 | ||
1197 | static int | 1192 | static int |
1198 | ec_mul_generator_ct(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, | ||
1199 | BN_CTX *ctx) | ||
1200 | { | ||
1201 | return ec_mul_ct(group, r, scalar, NULL, ctx); | ||
1202 | } | ||
1203 | |||
1204 | static int | ||
1205 | ec_mul_single_ct(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, | 1193 | ec_mul_single_ct(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, |
1206 | const EC_POINT *point, BN_CTX *ctx) | 1194 | const EC_POINT *point, BN_CTX *ctx) |
1207 | { | 1195 | { |
@@ -1317,7 +1305,6 @@ static const EC_METHOD ec_GFp_simple_method = { | |||
1317 | .add = ec_add, | 1305 | .add = ec_add, |
1318 | .dbl = ec_dbl, | 1306 | .dbl = ec_dbl, |
1319 | .invert = ec_invert, | 1307 | .invert = ec_invert, |
1320 | .mul_generator_ct = ec_mul_generator_ct, | ||
1321 | .mul_single_ct = ec_mul_single_ct, | 1308 | .mul_single_ct = ec_mul_single_ct, |
1322 | .mul_double_nonct = ec_mul_double_nonct, | 1309 | .mul_double_nonct = ec_mul_double_nonct, |
1323 | .field_mul = ec_simple_field_mul, | 1310 | .field_mul = ec_simple_field_mul, |
@@ -1343,7 +1330,6 @@ static const EC_METHOD ec_GFp_mont_method = { | |||
1343 | .add = ec_add, | 1330 | .add = ec_add, |
1344 | .dbl = ec_dbl, | 1331 | .dbl = ec_dbl, |
1345 | .invert = ec_invert, | 1332 | .invert = ec_invert, |
1346 | .mul_generator_ct = ec_mul_generator_ct, | ||
1347 | .mul_single_ct = ec_mul_single_ct, | 1333 | .mul_single_ct = ec_mul_single_ct, |
1348 | .mul_double_nonct = ec_mul_double_nonct, | 1334 | .mul_double_nonct = ec_mul_double_nonct, |
1349 | .field_mul = ec_mont_field_mul, | 1335 | .field_mul = ec_mont_field_mul, |