Function halo2_ecc::ecc::fixed_base::scalar_multiply
source · [−]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)
scalaris represented as a non-empty reference array ofAssignedValuesscalar = sum_i scalar_i * 2^{max_bits * i}- an array of length > 1 is needed when
scalarexceeds the modulus of scalar fieldF
Assumptions
scalar_i < 2^{max_bits} for all i(constrained by num_to_bits)scalar > 0max_bits <= modulus::<F>.bits()