halo2_ecc::ecc

Function ec_sub_strict

Source
pub fn ec_sub_strict<F: BigPrimeField, FC>(
    chip: &FC,
    ctx: &mut Context<F>,
    P: impl Into<EcPoint<F, FC::FieldPoint>>,
    Q: impl Into<EcPoint<F, FC::FieldPoint>>,
) -> EcPoint<F, FC::FieldPoint>
where FC: Selectable<F, FC::FieldPoint> + FieldChip<F>,
Expand description

Constrains P != -Q but allows P == Q, in which case output is (0,0). For Weierstrass curves only.

Assumptions

ยงNeither P or Q is the point at infinity