Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ec_mul

Multiplies a G2 point by a u256 scalar.

Returns

  • Option::None if the point is not on the curve.

Notes

  • curve_index should be either 0 (BN254) or 1 (BLS12_381). Behavior is undefined otherwise.
  • Input points outside of the r-torsion subgroup are supported.

Fully qualified path: garaga::ec::ec_ops_g2::ec_mul

pub fn ec_mul(pt: G2Point, s: u256, curve_index: u32) -> Option<G2Point>