Group

Trait Group 

Source
pub trait Group:
    Sized
    + Eq
    + 'static
    + CanonicalSerialize
    + CanonicalDeserialize
    + Copy
    + Clone
    + Default
    + Send
    + Sync
    + Hash
    + Debug
    + Display
    + UniformRand
    + Zeroize
    + Zero<Output = Self, Output = Self>
    + Neg<Output = Self>
    + Add
    + Sub<Output = Self, Output = Self>
    + Mul<Self::ScalarField, Output = Self, Output = Self>
    + AddAssign
    + SubAssign
    + MulAssign<Self::ScalarField>
    + for<'a> Add<&'a Self>
    + for<'a> Sub<&'a Self>
    + for<'a> Mul<&'a Self::ScalarField>
    + for<'a> AddAssign<&'a Self>
    + for<'a> SubAssign<&'a Self>
    + for<'a> MulAssign<&'a Self::ScalarField>
    + Sum
    + for<'a> Sum<&'a Self> {
    type ScalarField: PrimeField;

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

    // Provided methods
    fn double(&self) -> Self { ... }
    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 double_in_place(&mut self) -> &mut Self

Double self in place.

Source

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

Performs scalar multiplication of this element.

Provided Methods§

Source

fn double(&self) -> Self

Doubles self.

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> Group for PairingOutput<P>
where P: Pairing,

Source§

impl<P> Group for sp_ark_models::models::short_weierstrass::Projective<P>
where P: SWCurveConfig,

Source§

impl<P> Group for sp_ark_models::Projective<P>
where P: TECurveConfig,