ark_test_curves

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", so this trait is not object safe.

Implementors§

Source§

impl<P> PrimeGroup for ark_test_curves::models::short_weierstrass::Projective<P>
where P: SWCurveConfig,

Source§

impl<P> PrimeGroup for ark_test_curves::models::twisted_edwards::Projective<P>
where P: TECurveConfig,

Source§

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