[crypto/ec] disable SCA mitigations for curves with incomplete parameters
@@ -389,6 +389,7 @@ int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
return EC_POINT_set_to_infinity(group, r);
}
+ if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) {
/*-
* Handle the common cases where the scalar is secret, enforcing a constant
* time scalar multiplication algorithm.
@@ -414,6 +415,7 @@ int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
*/
return ec_mul_consttime(group, r, scalars[0], points[0], ctx);
}
+ }
for (i = 0; i < num; i++) {
if (!ec_point_is_compat(points[i], group)) {
