pub trait IsGroup: Clone + PartialEq + Eq {
    // Required methods
    fn neutral_element() -> Self;
    fn operate_with(&self, other: &Self) -> Self;
    fn neg(&self) -> Self;

    // Provided methods
    fn is_neutral_element(&self) -> bool { ... }
    fn operate_with_self<T: IsUnsignedInteger>(&self, exponent: T) -> Self { ... }
}

Required Methods§

source

fn neutral_element() -> Self

Returns the neutral element of the group. The equality neutral_element().operate_with(g) == g must hold for every group element g.

source

fn operate_with(&self, other: &Self) -> Self

Applies the group operation between self and other. The operation can be addition or multiplication depending on the notation of the particular group.

source

fn neg(&self) -> Self

Provided Methods§

source

fn is_neutral_element(&self) -> bool

Check if an element the neutral element.

source

fn operate_with_self<T: IsUnsignedInteger>(&self, exponent: T) -> Self

Applies the group operation times times with itself The operation can be addition or multiplication depending on the notation of the particular group.

Implementors§

source§

impl<E: IsEdwards> IsGroup for EdwardsProjectivePoint<E>

source§

impl<E: IsMontgomery> IsGroup for MontgomeryProjectivePoint<E>

source§

impl<E: IsShortWeierstrass> IsGroup for ShortWeierstrassProjectivePoint<E>

source§

impl<const MODULUS: u64> IsGroup for U64FieldElement<MODULUS>

Represents an element in Fp. (E.g: 0, 1, 2 are the elements of F3)