Skip to main content

CommitmentCurve

Trait CommitmentCurve 

Source
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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

type Params = P

Source§

type Map = BWParameters<P>

Source§

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

Source§

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

Implementors§