aztec-nr - std::embedded_curve_ops

Function multi_scalar_mul

pub fn multi_scalar_mul<let N: u32>(
    points: [EmbeddedCurvePoint; N],
    scalars: [EmbeddedCurveScalar; N],
) -> EmbeddedCurvePoint

Computes a multi scalar multiplication over the embedded curve. For bn254, We have Grumpkin.

The embedded curve being used is decided by the underlying proof system.

IMPORTANT: Prefer multi_scalar_mul() over repeated embedded_curve_add() for adding multiple points. This is significantly more efficient. For adding exactly 2 points, use embedded_curve_add() directly.