Trait modular_frost::curve::Group
source · pub trait Group: Sized + Clone + Copy + Debug + Eq + Send + Sync + 'static + Sum + for<'a> Sum<&'a Self> + Neg<Output = Self> + GroupOps + GroupOpsOwned + ScalarMul<Self::Scalar> + ScalarMulOwned<Self::Scalar> {
type Scalar: PrimeField;
// Required methods
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§
sourcetype Scalar: PrimeField
type Scalar: PrimeField
Scalars modulo the order of this group’s scalar field.
Required Methods§
sourcefn random(rng: impl RngCore) -> Self
fn random(rng: impl RngCore) -> Self
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.
sourcefn is_identity(&self) -> Choice
fn is_identity(&self) -> Choice
Determines if this point is the identity.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl Group for EdwardsPoint
Available on crate feature group
only.
impl Group for EdwardsPoint
Available on crate feature
group
only.type Scalar = Scalar
fn random(rng: impl RngCore) -> EdwardsPoint
fn identity() -> EdwardsPoint
fn generator() -> EdwardsPoint
fn is_identity(&self) -> Choice
fn double(&self) -> EdwardsPoint
source§impl Group for SubgroupPoint
Available on crate feature group
only.
impl Group for SubgroupPoint
Available on crate feature
group
only.type Scalar = Scalar
fn random(rng: impl RngCore) -> SubgroupPoint
fn identity() -> SubgroupPoint
fn generator() -> SubgroupPoint
fn is_identity(&self) -> Choice
fn double(&self) -> SubgroupPoint
source§impl Group for RistrettoPoint
Available on crate feature group
only.
impl Group for RistrettoPoint
Available on crate feature
group
only.