pub fn scalar_multiply<F, FC, C>(
    chip: &FC,
    ctx: &mut Context<F>,
    point: &C,
    scalar: Vec<AssignedValue<F>>,
    max_bits: usize,
    window_bits: usize
) -> EcPoint<F, FC::FieldPoint>where
    F: PrimeField,
    C: CurveAffineExt,
    FC: FieldChip<F, FieldType = C::Base> + Selectable<F, FC::FieldPoint>,
Expand description

Computes [scalar] * P on y^2 = x^3 + b where P is fixed (constant)

  • scalar is represented as a non-empty reference array of AssignedValues
  • scalar = sum_i scalar_i * 2^{max_bits * i}
  • an array of length > 1 is needed when scalar exceeds the modulus of scalar field F

Assumptions

  • scalar_i < 2^{max_bits} for all i (constrained by num_to_bits)
  • scalar > 0
  • max_bits <= modulus::<F>.bits()