Trait zero_crypto::behave::Group

source ·
pub trait Group: PartialEq + Eq + Add<Output = Self> + AddAssign + Neg<Output = Self> + Sub<Output = Self> + SubAssign + Mul<Self::Scalar, Output = Self> + MulAssign<Self::Scalar> + Sized {
    type Scalar: Group;

    const ADDITIVE_GENERATOR: Self;
    const ADDITIVE_IDENTITY: Self;

    fn zero() -> Self;
    fn invert(self) -> Option<Self>
    where
        Self: Sized
; fn random(rand: impl RngCore) -> Self; }
Expand description

group trait which supports additive and scalar arithmetic additive and scalar arithmetic hold associative and distributive property any element has its inverse and these is the identity in group existence of inverse is ensured for only additive arithmetic

Required Associated Types§

Required Associated Constants§

Required Methods§

Implementors§