ark_ec

Trait AdditiveGroup

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

    const ZERO: Self;

    // Provided methods
    fn double(&self) -> Self { ... }
    fn double_in_place(&mut self) -> &mut Self { ... }
    fn neg_in_place(&mut self) -> &mut Self { ... }
}

Required Associated Constants§

Source

const ZERO: Self

The additive identity of the field.

Required Associated Types§

Provided Methods§

Source

fn double(&self) -> Self

Doubles self.

Source

fn double_in_place(&mut self) -> &mut Self

Doubles self in place.

Source

fn neg_in_place(&mut self) -> &mut Self

Negates self in place.

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> AdditiveGroup for CubicExtField<P>
where P: CubicExtConfig,

Source§

impl<P> AdditiveGroup for QuadExtField<P>
where P: QuadExtConfig,

Source§

impl<P, const N: usize> AdditiveGroup for Fp<P, N>
where P: FpConfig<N>,

Source§

const ZERO: Fp<P, N> = P::ZERO

Source§

type Scalar = Fp<P, N>

Source§

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

Source§

const ZERO: Self = _

Source§

type Scalar = <P as CurveConfig>::ScalarField

Source§

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

Source§

const ZERO: Self = _

Source§

type Scalar = <P as CurveConfig>::ScalarField

Source§

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

Source§

const ZERO: Self = _

Source§

type Scalar = <P as Pairing>::ScalarField