diff --git a/elliptic-curve/src/ops.rs b/elliptic-curve/src/ops.rs index de87b5806..84dddd60d 100644 --- a/elliptic-curve/src/ops.rs +++ b/elliptic-curve/src/ops.rs @@ -172,6 +172,15 @@ where .map(|(point, scalar)| point * scalar) .sum() } + + /// Calculates `x1 * k1 + ... + xn * kn`. + /// + /// This is equivalent to [`LinearCombination::lincomb`] except + /// that it may leak the value of the points and/or scalars due to + /// variable-time behavior. + fn lincomb_vartime(points_and_scalars: &PointsAndScalars) -> Self { + Self::lincomb(points_and_scalars) + } } /// Modular reduction to a non-zero output.