pub trait CommitmentCurve: AffineRepr + Sub<Output = Self::Group> {
    type Params: SWCurveConfig;
    type Map: GroupMap<Self::BaseField>;

    // Required methods
    fn to_coordinates(&self) -> Option<(Self::BaseField, Self::BaseField)>;
    fn of_coordinates(x: Self::BaseField, y: Self::BaseField) -> Self;
}
Expand description

A useful trait extending AffineRepr for commitments. Unfortunately, we can’t specify that AffineRepr<BaseField : PrimeField>, so usage of this traits must manually bind G::BaseField: PrimeField.

Required Associated Types§

source

type Params: SWCurveConfig

source

type Map: GroupMap<Self::BaseField>

Required Methods§

source

fn to_coordinates(&self) -> Option<(Self::BaseField, Self::BaseField)>

source

fn of_coordinates(x: Self::BaseField, y: Self::BaseField) -> Self

Implementations on Foreign Types§

source§

impl<P: SWCurveConfig + Clone> CommitmentCurve for SWJAffine<P>

§

type Params = P

§

type Map = BWParameters<P>

source§

fn to_coordinates(&self) -> Option<(Self::BaseField, Self::BaseField)>

source§

fn of_coordinates(x: P::BaseField, y: P::BaseField) -> SWJAffine<P>

Implementors§