Trait elliptic_curve::Group[][src]

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

This trait represents an element of a cryptographic group.

Associated Types

type Scalar: PrimeField[src]

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

Loading content...

Required methods

pub fn random(rng: impl RngCore) -> Self[src]

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.

pub fn identity() -> Self[src]

Returns the additive identity, also known as the "neutral element".

pub fn generator() -> Self[src]

Returns a fixed generator of the prime-order subgroup.

pub fn is_identity(&self) -> Choice[src]

Determines if this point is the identity.

#[must_use]pub fn double(&self) -> Self[src]

Doubles this element.

Loading content...

Implementors

impl Group for ProjectivePoint[src]

This is supported on crate feature dev only.

type Scalar = Scalar

Loading content...