Trait elliptic_curve::Group
source · [−]pub trait Group: 'static + Clone + Copy + Debug + Eq + Send + Sync + Sum<Self> + for<'a> Sum<&'a Self> + Neg<Output = Self> + GroupOps<Self, Self> + GroupOpsOwned<Self, Self> + ScalarMul<Self::Scalar, Self> + ScalarMulOwned<Self::Scalar, Self> {
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.
Required Associated Types
type Scalar: PrimeField
type Scalar: PrimeField
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.
fn is_identity(&self) -> Choice
fn is_identity(&self) -> Choice
Determines if this point is the identity.