Skip to main content

PrimeGroup

Trait PrimeGroup 

Source
pub trait PrimeGroup: AdditiveGroup<Scalar = Self::ScalarField> {
    type ScalarField: PrimeField;

    // Required methods
    fn generator() -> Self;
    fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self;

    // Provided method
    fn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self { ... }
}
Expand description

Represents (elements of) a group of prime order r.

Required Associated Types§

Source

type ScalarField: PrimeField

The scalar field F_r, where r is the order of this group.

Required Methods§

Source

fn generator() -> Self

Returns a fixed generator of this group.

Source

fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self

Performs scalar multiplication of this element.

Provided Methods§

Source

fn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self

Computes other * self, where other is a big-endian bit representation of some integer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<P: DOCurveConfig> PrimeGroup for ark_ec::models::double_odd::Projective<P>

Source§

impl<P: Pairing> PrimeGroup for PairingOutput<P>

Source§

impl<P: SWCurveConfig> PrimeGroup for ark_ec::models::short_weierstrass::Projective<P>

Source§

impl<P: TECurveConfig> PrimeGroup for ark_ec::models::twisted_edwards::Projective<P>