Trait ark_ec::Group

source ·
pub trait Group: Eq + 'static + Sized + CanonicalSerialize + CanonicalDeserialize + Copy + Clone + Default + Send + Sync + Hash + Debug + Display + UniformRand + Zeroize + Zero + Neg<Output = Self> + Add<Self, Output = Self> + Sub<Self, Output = Self> + Mul<Self::ScalarField, Output = Self> + AddAssign<Self> + SubAssign<Self> + MulAssign<Self::ScalarField> + for<'a> Add<&'a Self, Output = Self> + for<'a> Sub<&'a Self, Output = Self> + for<'a> Mul<&'a Self::ScalarField, Output = Self> + for<'a> AddAssign<&'a Self> + for<'a> SubAssign<&'a Self> + for<'a> MulAssign<&'a Self::ScalarField> + Sum<Self> + 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.

Implementors§

source§

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

source§

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

source§

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