Trait group::Group

source · []
pub trait Group: Clone + Copy + Debug + Eq + Sized + Send + Sync + 'static + Sum + for<'a> Sum<&'a Self> + Neg<Output = Self> + GroupOps + GroupOpsOwned + ScalarMul<Self::Scalar> + ScalarMulOwned<Self::Scalar> {
    type Scalar: PrimeField;
    fn random(rng: impl RngCore) -> Self;
fn identity() -> Self;
fn generator() -> Self;
fn is_identity(&self) -> Choice;
fn double(&self) -> Self; }
Expand description

This trait represents an element of a cryptographic group.

Associated Types

Scalars modulo the order of this group’s scalar field.

Required methods

Returns an element chosen uniformly at random from the non-identity elements of this group.

This function is non-deterministic, and samples from the user-provided RNG.

Returns the additive identity, also known as the “neutral element”.

Returns a fixed generator of the prime-order subgroup.

Determines if this point is the identity.

Doubles this element.

Implementors